From 0debeff598b9575de3f1ce9f25ba9593e150ed00 Mon Sep 17 00:00:00 2001 From: mqliang Date: Fri, 11 Dec 2015 10:59:04 +0800 Subject: [PATCH 001/328] remove newPod.Status = oldPod.Status in validation.go --- pkg/api/validation/validation.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/api/validation/validation.go b/pkg/api/validation/validation.go index a16a2c8f2f5..06bbf1cc184 100644 --- a/pkg/api/validation/validation.go +++ b/pkg/api/validation/validation.go @@ -1207,7 +1207,6 @@ func ValidatePodUpdate(newPod, oldPod *api.Pod) validation.ErrorList { allErrs = append(allErrs, validation.NewInvalidError(specPath, "contents not printed here, please refer to the \"details\"", "may not update fields other than container.image")) } - newPod.Status = oldPod.Status return allErrs } From 3c0745211fd45f02c15f793304be8dee40bf7649 Mon Sep 17 00:00:00 2001 From: Vishnu Kannan Date: Thu, 17 Dec 2015 10:24:30 -0800 Subject: [PATCH 002/328] Fix docker root dir detection. --- pkg/kubelet/dockertools/manager.go | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/pkg/kubelet/dockertools/manager.go b/pkg/kubelet/dockertools/manager.go index afe0e49d2ce..2702fb46724 100644 --- a/pkg/kubelet/dockertools/manager.go +++ b/pkg/kubelet/dockertools/manager.go @@ -172,26 +172,8 @@ func NewDockerManager( glog.Errorf("Failed to execute Info() call to the Docker client: %v", err) glog.Warningf("Using fallback default of /var/lib/docker for location of Docker runtime") } else { - driverStatus := dockerInfo.Get("DriverStatus") - // The DriverStatus is a*string* which represents a list of list of strings (pairs) e.g. - // DriverStatus=[["Root Dir","/var/lib/docker/aufs"],["Backing Filesystem","extfs"],["Dirs","279"]] - // Strip out the square brakcets and quotes. - s := strings.Replace(driverStatus, "[", "", -1) - s = strings.Replace(s, "]", "", -1) - s = strings.Replace(s, `"`, "", -1) - // Separate by commas. - ss := strings.Split(s, ",") - // Search for the Root Dir string - for i, k := range ss { - if k == "Root Dir" && i+1 < len(ss) { - // Discard the /aufs suffix. - dockerRoot, _ = path.Split(ss[i+1]) - // Trim the last slash. - dockerRoot = strings.TrimSuffix(dockerRoot, "/") - glog.Infof("Setting dockerRoot to %s", dockerRoot) - } - - } + dockerRoot = dockerInfo.Get("DockerRootDir") + glog.Infof("Setting dockerRoot to %s", dockerRoot) } reasonCache := reasonInfoCache{cache: lru.New(maxReasonCacheEntries)} From 32ca82de048b3b32d04a57036e3653edb307d217 Mon Sep 17 00:00:00 2001 From: Minhan Xia Date: Fri, 18 Dec 2015 14:05:44 -0800 Subject: [PATCH 003/328] remove cluster logging e2e test from flaky suite --- test/e2e/es_cluster_logging.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/e2e/es_cluster_logging.go b/test/e2e/es_cluster_logging.go index 0e40bdf4f8b..b4c5d08eb1f 100644 --- a/test/e2e/es_cluster_logging.go +++ b/test/e2e/es_cluster_logging.go @@ -30,8 +30,7 @@ import ( . "github.com/onsi/gomega" ) -// Flaky issue #17873 -var _ = Describe("Cluster level logging using Elasticsearch [Flaky]", func() { +var _ = Describe("Cluster level logging using Elasticsearch", func() { f := NewFramework("es-logging") BeforeEach(func() { From 79533385cf4999a02109aa203cbc78b710148c97 Mon Sep 17 00:00:00 2001 From: Brendan Burns Date: Tue, 22 Dec 2015 10:57:12 -0800 Subject: [PATCH 004/328] Add kind to APIResource --- pkg/api/rest/rest.go | 8 ++++++++ pkg/api/unversioned/types.go | 2 ++ pkg/api/unversioned/types_swagger_doc_generated.go | 1 + pkg/apiserver/api_installer.go | 13 ++++++++++++- pkg/client/unversioned/client_test.go | 12 ++++++------ pkg/registry/thirdpartyresourcedata/etcd/etcd.go | 11 ++++++++++- 6 files changed, 39 insertions(+), 8 deletions(-) diff --git a/pkg/api/rest/rest.go b/pkg/api/rest/rest.go index 32c78215ca2..584670f7789 100644 --- a/pkg/api/rest/rest.go +++ b/pkg/api/rest/rest.go @@ -55,6 +55,14 @@ type Storage interface { New() runtime.Object } +// KindProvider specifies a different kind for its API than for its internal storage. This is necessary for external +// objects that are not compiled into the api server. For such objects, there is no in-memory representation for +// the object, so they must be represented as generic objects (e.g. RawJSON), but when we present the object as part of +// API discovery we want to present the specific kind, not the generic internal representation. +type KindProvider interface { + Kind() string +} + // Lister is an object that can retrieve resources that match the provided field and label criteria. type Lister interface { // NewList returns an empty object that can be used with the List call. diff --git a/pkg/api/unversioned/types.go b/pkg/api/unversioned/types.go index 3c77fcfdf91..bc910a61c2c 100644 --- a/pkg/api/unversioned/types.go +++ b/pkg/api/unversioned/types.go @@ -339,6 +339,8 @@ type APIResource struct { Name string `json:"name"` // namespaced indicates if a resource is namespaced or not. Namespaced bool `json:"namespaced"` + // kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo') + Kind string `json:"kind"` } // APIResourceList is a list of APIResource, it is used to expose the name of the diff --git a/pkg/api/unversioned/types_swagger_doc_generated.go b/pkg/api/unversioned/types_swagger_doc_generated.go index 6633ddf4fc1..0e2180a1c30 100644 --- a/pkg/api/unversioned/types_swagger_doc_generated.go +++ b/pkg/api/unversioned/types_swagger_doc_generated.go @@ -51,6 +51,7 @@ var map_APIResource = map[string]string{ "": "APIResource specifies the name of a resource and whether it is namespaced.", "name": "name is the name of the resource.", "namespaced": "namespaced indicates if a resource is namespaced or not.", + "kind": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", } func (APIResource) SwaggerDoc() map[string]string { diff --git a/pkg/apiserver/api_installer.go b/pkg/apiserver/api_installer.go index 10126e5f691..aa24aa33203 100644 --- a/pkg/apiserver/api_installer.go +++ b/pkg/apiserver/api_installer.go @@ -144,10 +144,11 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag } } + kind := fqKindToRegister.Kind + if fqKindToRegister.IsEmpty() { return nil, fmt.Errorf("unable to locate fully qualified kind for %v: found %v when registering for %v", reflect.TypeOf(object), fqKinds, a.group.GroupVersion) } - kind := fqKindToRegister.Kind versionedPtr, err := a.group.Creater.New(a.group.GroupVersion.WithKind(kind)) if err != nil { @@ -323,6 +324,14 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag params := []*restful.Parameter{} actions := []action{} + var resourceKind string + kindProvider, ok := storage.(rest.KindProvider) + if ok { + resourceKind = kindProvider.Kind() + } else { + resourceKind = fqKindToRegister.Kind + } + var apiResource unversioned.APIResource // Get the list of actions for the given scope. switch scope.Name() { @@ -340,6 +349,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag } apiResource.Name = path apiResource.Namespaced = false + apiResource.Kind = resourceKind namer := rootScopeNaming{scope, a.group.Linker, gpath.Join(a.prefix, itemPath)} // Handler for standard REST verbs (GET, PUT, POST and DELETE). @@ -382,6 +392,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag } apiResource.Name = path apiResource.Namespaced = true + apiResource.Kind = resourceKind namer := scopeNaming{scope, a.group.Linker, gpath.Join(a.prefix, itemPath), false} actions = appendIf(actions, action{"LIST", resourcePath, resourceParams, namer}, isLister) diff --git a/pkg/client/unversioned/client_test.go b/pkg/client/unversioned/client_test.go index 75d64ab1fe2..8bffc0fe240 100644 --- a/pkg/client/unversioned/client_test.go +++ b/pkg/client/unversioned/client_test.go @@ -131,17 +131,17 @@ func TestGetServerResources(t *testing.T) { stable := unversioned.APIResourceList{ GroupVersion: "v1", APIResources: []unversioned.APIResource{ - {"pods", true}, - {"services", true}, - {"namespaces", false}, + {"pods", true, "Pod"}, + {"services", true, "Service"}, + {"namespaces", false, "Namespace"}, }, } beta := unversioned.APIResourceList{ GroupVersion: "extensions/v1", APIResources: []unversioned.APIResource{ - {"deployments", true}, - {"ingresses", true}, - {"jobs", true}, + {"deployments", true, "Deployment"}, + {"ingresses", true, "Ingress"}, + {"jobs", true, "Job"}, }, } tests := []struct { diff --git a/pkg/registry/thirdpartyresourcedata/etcd/etcd.go b/pkg/registry/thirdpartyresourcedata/etcd/etcd.go index 505cb8f7801..98e7662a9f7 100644 --- a/pkg/registry/thirdpartyresourcedata/etcd/etcd.go +++ b/pkg/registry/thirdpartyresourcedata/etcd/etcd.go @@ -33,6 +33,7 @@ import ( // REST implements a RESTStorage for ThirdPartyResourceDatas against etcd type REST struct { *etcdgeneric.Etcd + kind string } // NewREST returns a registry which will store ThirdPartyResourceData in the given helper @@ -64,5 +65,13 @@ func NewREST(s storage.Interface, storageDecorator generic.StorageDecorator, gro Storage: storageInterface, } - return &REST{store} + return &REST{ + Etcd: store, + kind: kind, + } +} + +// Implements the rest.KindProvider interface +func (r *REST) Kind() string { + return r.kind } From b8b532b974be2b2157ad82761005fb0a5866a85b Mon Sep 17 00:00:00 2001 From: Yu-Ju Hong Date: Sat, 15 Aug 2015 08:40:19 -0700 Subject: [PATCH 005/328] Proposal: add pod lifecycle event generator for kubelet --- docs/proposals/pleg.png | Bin 0 -> 49079 bytes .../pod-lifecycle-event-generator.md | 230 ++++++++++++++++++ 2 files changed, 230 insertions(+) create mode 100644 docs/proposals/pleg.png create mode 100644 docs/proposals/pod-lifecycle-event-generator.md diff --git a/docs/proposals/pleg.png b/docs/proposals/pleg.png new file mode 100644 index 0000000000000000000000000000000000000000..f15c5d83dadd3ee30bf4687f1b02302240ea807a GIT binary patch literal 49079 zcmcdzg;!PE)(0dGedvb6QKVbC8>OYYyE~-2L#4X}r6i=gr5mIh1?lc@dov)OyCHDk^Bo3V&cl$SzBAx43LfkA&QE&dh;=2s|!3w(aM%?yS7dBnw90IDIU2obY)GKFw3y<%d43Zg(D5Pl~UGv2r2l7GJrd=r3L zxVSj*GBdloyED17GubTK*} z>EL2%ZwGlA*U-q`)kOdbeVXXsKYy*$#nSAbne3eZCJP{t`ROmrtV}G-{~jB7mH+83 zuY!}MDKPWX_=2qbf1doWdwgkfHb zi>P?O{%*l^P&M^^e1v?BX>z2lbtG=AB(b(Jj;j7?)Pq8WOZs)y9|09j!>A(=6`w() z(g+8!RMF8NR=t!Z7!CoELDA4ZlIoR)Lq`Ckw_kT>61TzdT|b&Ps&X{~*UIJX8vm@b zg55#(=JICNyOq(QuG7bry^P?~ksY2AUk? zj(2PP&ac|_>|reswPswK_UNffr;V3IL?%B zwFHC&XS$U*d(``;V^GFNEo&Iv_Lcku7KFo98k@aQDlgnuF?+PxLr94_X1n}ALI_#E zXlbud`$~-H z$1;*8(@~1H^=*|0^x$~)te>QlMZQTTDl}Jw%vyzVmWXq7@F8^@*0r?~Y8J&KdhOmr;FhFT%X-CqEAPRaUSo$&NAf>t)~Qo~q1(D&0)MtQxN zu_<@lh_dc$8}w}GssB;5R4Ak)g|=#!ivpy$DCb`hWM5DpV8I=9WpbqwqR+}`h5Onf z{e4jQTm)kNm>cZPD(8sj5gr&q0bN0Eh67rf?gYP_=j7yj}j3+ z8opshz8M5QI$?rIIdEme&a37f`Vz}*I@#kk;b#~gvkHt=7x{M}(UENHWg~xADL;Q1(@$)TA_t*W0Pb3>TnZ$p%R2*0^$7#!YGA>NH z+7jk1#(rDtagL}RE zxz?(p5>{v*5ZSn&q3 zu^+4=gmGcR(XBf~x8*?51I41ogtY6p~gBC<+yjl<3eK|dh8lzgKB!H}pV7bx~s(*FjYJ^4)TjMyUsPkZ> zC!k6E+YO0Bg5X`=SRt-`*;{-8Gq~gs9*Z4bMW$h>$lx?Sv;eQL#+gWz>Xb4l?cv)R zFeAG|GdDxo;i(Zt+B;pX}i>M+VFsq*r`Kf&s``Gf#FZEC{uM}>NrpIf; z2Z?P?g3j`hVsHMNL7@87eOH5{9%1;b@_%rdO*TDLhG( z?b5}rD<=hhR~*FGLZCFDKF6YTwdn&`kOb>6ge_95m7pH?_@(&u0eM+0t}8z{G~1RY zAbZs7HMdriTSr__5lf+eH22UB$BQey!dr0!1r)LfR!=%h5$uhzFH)@HmFaFfEy{0L zg%D5YMb(b(+l_cmUUpFgYutlQ$s#y(L~qc%=SgSm%R&g>@igNd_HVf6hG)h&n%^La z{lIo_QS?LcuwQrGJU^RN*7;}0KFI^Z2bxn>JO)$DzU}?I4x3H=;pA*E*L%*KbpOi- zUBul591hyw*fqH{)y9r!qxu~h%t-UcIOP0T)6<6i3Z~+kmCYyT0ksJQb>y|S&YiUM zO8&VFR)Q&m5}Vg$>88?1o=21T>Z|$NI7Icf1#%P?d?EL2CazVdMJ-JArYY2|C(h7P znbAqbhHcRqk&FyzcGuB-51Jygm8>7t$I3&o*5+2iTbb?W&8u4k&wb}h79#nxMjDq( zszH=Otew6(`gpAmxOlKw;Qzb=3P2x)A?V`6tw$~EH8k>7dKpab>DImJl-M-`lvk&j z-+Z|oQK!qPFHFSJm5BMZ<+x}5lC(mO$a^Y9+L^yK?oEdk!t*@SqY$Dj%+Pq8{~Y_z zXAnYwzX4iL2FL4vO&qZJBFCN3`LxkW^}lc>VE4x?;jp7KC5tisFuVoc;j7#;uhJm< z*Y=~ka{n!k|2L@p|1!}@rtqjYQqDO5dQGSU^jf@Bjm(q*fd6BIpzTV+*lpx(HTJ(* z8?gA&LEDa5p#;AbNstlwWt% z{&%cSdEpg9v|GHXI|+ys^6CfT#4`;&T>#Xtk?MX*niheJXr26ga<#&Wmwn~U>!JN6 z^=Z=07qFUy&L>q?N`C;t0z9@)k@D7Yn=zf>@%83~LY&$k==d2cK7^G+?+f6R#w6fP z41Yt%D9JvVk7fxNc-l4Z*Dhd)-MvCg&UHHeHFS^Foc$61U&I63qMr>83^(oZ)7~`2 zRC&_nKdi7l$U??yS;vY|<$tMp`y3#Xn0fl&%_pkla{|Z(!m`#qm?PjOrH8-Rv)X=v~ zr{rnt25f@P-jt_V{S6C+-M~kh!B#B!jlWY8&9Kzqxa^lV1ysUr=}KkBnkAmBRzARl zAsRhbra$tDw}Yz!6{Z*8{Jl{FE|B{>=LAU-|JDpjVB)HyJc~Df$&g1z7{528rA8~| zf938H3sAIk_4(WX{$Y~=(4qf&MHmXl>&k^inFvt2`J`dqZO>{RbRdf3)#jt;9zTgv zP@~3)pO~FPk9;M+M7Ef?Va4#oDG=(DKI+g8E5pxI!sKcM=Fxde{a$waLZc1u6zR_( z%Hzt@aZasO+Bz=gS!XG(7()>rEDnaiXf4(gghj2Wt<1gKa_j_VX zn{_#!J7$0=ns!F_m_)Hylp(aw>-!l&3B^bugPKS*|47I=PQzOj=}&r9dor)G22N9e zNj<%fzq$NNkbu%4z_q-)B=--SNA;+4cy%XurRKGnDZ$NIFS!|WIiSMcvEV^U()HH6;aez56!(1;6+-QPg&g?`i* z;X|3BO<7UwCZHUt?OP%YuLx^He8d}A+2n1m<+0Bsj=wc>L z$O5p4`+L__%}X)n3f=MWn`u2VWJx65-2Yyg@D(z52WZ?GqvY6rnn9EtVMWtEu?H-H zYhLv1+#+#7x+A#t_pc(o8^qo7^Z9w0>yf}8)4Prva5Udy8i0W?-ov*ROn$Kn*hDPGQW8+?%5Dkrq%% zGq^jS;T0~l$;EGtPrEK40|GwxRgo{1jsgcTK>fqwmAS`Rtt7ARB*fy#1<=Ul-zche zaPRuym%4BC#^8YUY-9{2V5R6+Jpn|F^B{P-E3tKpqo-ezz=i5duv-V=4{Z3|QBMMH zL$N12NdxC%HX?pZ^i1XKZpK8Q&yD@2X5>@&^Y$G>A2CVLdAwbCLeZby_46&i4} zTfP-|#$dIPiA*Qx$*c&2K+-Ist5D0x+?PkLX=W?GvZpKB9&QkZwsgarD?PZ0Lp`X( z3U)R`ei;@pdpZ}U$o4LY7tR|NzA84h4tjXNr5%$eXJ#VA9(fHoj;Z!J*BLG)# zUNr#?e&@x1V0nAGw7i&@O%8Xb8!Yt3Rz}MH2E&+_<_jjUVx55>@JOY;^hHlQfJ;Ab@k=I95V<`!_E z0~YyL{C3P^O_TEHEwHDlL2kI=Sba$PLyTtjFPX6uZzeBth6!l<6 zl~ryjH+j=F366V;>(E^5TkBRU^0QNEh{LO{LE0J$^6>Ae;$!eB7Y8qVHbsIEQwIhH zOp^1w$RLX9>gKz9d)G}8Gm98U$~gZr!~qPDcK1?9{BLt=Nb%LaSeDVinM81cJxk+f zs2|e_b9L-ao9Gq!Kt6-toG&kAY$dtayv;e>A##sdEu07avTlo8I$Ml;Vp?i3>wVrYr zU-iMiN#EMaD#v(}?X`dOc@rg{AI2+sKy4OZfX@|^(`BZZ~&(w^^|+!)1d?|1O)&t_Su=&ae7^xt1B1hZQices5I@&gPBCfG@X-y_h^EDTmRMmNjT6wU z@p^_2uLKgGJa7Ximx%kcbBDmIvEVx;YnIY(z^Af@PnQ5X){nf1e{yYo^UpkEhH$u1 zbLelozIJ66|M3KyEPzWVZLQbRy2NVlLQ+616Pugzsh0LJX?7QvvC!RRoEC*|jD=wo z^)`<;oQ?UC;FJi%7d{xpPum5_+bYGmKQW4zWtL!cYEB^slc|QqU70dQ;;f&}XaKr`bhkhiPRVw)_ zCITS=7_-YU^OekBS``O)`$oLKVPMW42!Kkir5x}7+oSn|f+GPeRLqq8GTj>f>$d~B zt7KhU?`m?d;U3ZI13xkQpbz4-nxr$FSL$KzzD6O{of$OPEX`-+n@Eh#A} z*v4|Li&6x6@0&VhqT`)U^ToXN_F5PPr+S4R2PXfKe;du-I0PklC|AMgk zcc29?k3>%VAq^1GoU+|XTv;ET1EA@ELWgQsF6?na-JW_^v0H+a{C!xJ0FcB+J(?Zc zX6PJGcmuZVH~xWp<*tFWJne&Xo+mG9CNR|&9&fB4u!13!=3|ic%=;eyxu1Y{fl&8l zZu6pgpFwQb_(g&GVID!bRHl)iK#xQYJA9`N7V#^Kc+b1zzWk(>u`z>#h8^Ii;kw=(QSA2HdTSujjo!l2@^iyp zd6VqdSnGDL(nG(xgpH$2F|HB!wp-oPZXAV_)1A>Kv+apOncAgV+XWkMJRY5AZr~4_Pi%n=9;9nGR~nym_NVNva)3 zAw+K3_b@mxpcNGvsYR`jwTRL&b2F{3|4mIzZQfhmu_qF*_VLS?FEb=uc5^n5+@utT z0<})Qq+t)8A*i+FVzFI3tl1lAq}(hMn6(EWAf;E#U@ChxK?+NX(tBD2AA0 zAd+cYIfq9oR|-qA&g0l!$% zn$d_9GnHUff$hNEqG{P$e|ymWR35S`YbX$^CqPd~d69HG|D%{|2H~ZmV8(tt7rSJO zRnj&5^Rn3Fpz{<-Ux7OgW;+SCiLfy@nv*-xkE(B-QqnV#o>Zg?WRe8)2v#1+#$4R{ z;NUkBQbcwC{Axx#Fd<1$3*IszKi@RYvNr!JO~|ixxCmtICzHfbX&EU6;BKlhGp|Q( zk?m4Ho4y;79r%2lD0Z_UkXq$Fw>*Q?@j$}_PY1Wn+*b|N{FBAIJT|@rAil5Ws`vT> zARz%CAJ!>sN^1a1*aT14{Qi>xI{%SGi$n0Jl@9uhCAF?U(xkdl8}q>R0i^Fp8|(S- zk)Zsdppss!FO3EXIIhMR{yOFXt$+u=uhwW%Ka`s>D?{x2tiE3h0Va?iDMAj!oSelH zf@^zbnvPZ5J{Tc9gVWx^hkVKMIHw$Vn{7xtQ5b$Ha>u6wGl6z>+UfD^j=cM^-K_T- zDQ~Pj&*CZqweh)BEMd4byVse8GJstKPBBTj+uNhb_+~=A{lL(8zu%RXk3w_4Rv-9t zdV45u?o^@2%&k|QLz#TDpRNx~#vC)UAMbW9?z;_$R%|zQt{?K8z1@}mO147kkZbO< zsq1D-rXz%DkXK>dP+qp;KfJtS_2SPd?|DWyIdoVov+XVn+q;fqWa|LlY%0YUw-Y6l z4@PjM>P$#kVA+hx37gA6GQ6Q#cMM?|*b;}3fR1j9jqh+o=Ch-_kJ;OW8qqog1O?uw zLPR_2eQw>}frq6id`vKta|weH#u&6}`m-1st!J5>S9~siblJ|4De%Tn;p3o9e@gL# zc&&vH*ys-?GjrLu-Pfk_oTkSh;zq69E?=UR2HMUyqG=HAlj`#RrY!4OWh0zD`ijwt zd^-)~hJ@kSL?EeQJ+jdyf)bEfWJQDVkpxnS_71%U!pH|dD-?_41*dizwiW{i0KZ9i_w8~(^hMR&t!Rtuk8s)VdIg#iPR zZ-My7v#XwsyXikGP>f@xC=Q_j@~ldOIhYQqSI>txHt4*Qd5w8zqfr^|v1!hx$ZY1c z*`H8zKoTj@JZT{rO=!4>P9eC6BB@1?DrCRhEd4Gka^R4-*QthKg35S*~xN=j_AAN;N&Fd}<&aH8vHf{yvVAR402Xz%D(um6RfJVM@p z0ffLNx(a#MBepgreCTs*PzB@p?Ai74dt6fq3n@x`ZT%F+I1z_Oh zNPsSNd*xsEPzcByIvupeaExL^Nx1dy=fw$Jr2MEf4!b^^R46k|xW2!=coZR+?{ zfav^HH1^sBH&MM@hxGu5q|WIW6&4!X8JFFgQ!Klgk@#NQc;(%pKvU1h>@kPfnNdIk z>WIP?ln&b-efM;ibdVjHk1q|;yL2=^%uqfB=f7S6p_P2vt_(asTn+g;>?UsT3^sr8 zQ3z!g&A=gvozxxgK=LP;5-cB%ya&)3E4d*N=7@;5!1@S^=$;;3If8RKf_^LySy=Y4 zXD5Y3mcFnP{o-2%otY|(-h;kx?Wf8_xK*b-ECb7u4mfK_3{uT-YZ^7Wfmg0~=e{IB z9QE@RY_^1jLlIxp5^Q4f?IY_Al|Jrj)glwzTT-Y8wGkaX!Kljn0g?%Eg%U$RF$rqj5V3bz;H_qI|fYsWn z?K+*rx#$)P|6C2$NhlI7V9xoi=1+-vna3An=k6w8{YliJDL>7uR9*%{l=#a!(FD* z?$0-R#>?leSIiiX=RY%CBAbkL_TOd*y*n_!AZSLq&$?s>CBxG;-Exf6eg>z{9P@?z zCeRkqO+sJdA~Mc27~tejoD!n&MM_vPIpa$bL%XTA$?)trHuz@Kqo(%m<};ru#|-z~ zOx~k1$-zez&>-gqJiA7i^PA*J+Rq(L3YP!&VPA1*@+81fG%{VH11+tQygvx)!g?2b zBav3Pt{lQnstAp7-)&IO->OL_L|xdDml~fDu@4IPvqx)+q(b8b;Y4z!JL<_FUOzB! z$Gv0yq_O#G@jk88;CHk~XVUmgzEs@Hy9Yz_UIT3|3v7tYhkzZSikr zvhw=+xiRy3*J@{LjiwA)=S!4s|CbC!d^hG=u=p}7ghiZ_UiXSR8~hX9;|*%I5MnA zSVHV5SV+Ui0*!784B!==#$v4~;FbSPbqAO*ik61$&s2zl(N4F!N56M}qcQV3*cG}3 z85H#xEhLrdfIo<=;HUE!B~qUORE!L{Jr*5&_ezw7uJDj=Far1##_T* zwXDQ|?WG_`yr*6rgyG*L+Z!Sr;BV-~nsqzEPu?l%g=9CNgTv98V!mQr<3@)tNHt;^ zigtv1;o(LJ-K}8`Kab-NeChNtB200{_3-BGo ziDGdLPh^i~wOL`Akn2ZsINWHbYdIiHZL4Tg`%~k|rGgn8un^qryxf3-on)4YHMCyf zioH`6<8ag(|G8m{z<9L#s!v0c_Qc{^-lh00*6x^oU>kDwmkn;x?Cdzp4F?((zq=s^ zR4ck7V=fVfUTybu$B%#u0P6uNy4K>B*6?KbHmP8#aVxKU7kjsnd#F5CeF!{RDI%Lt zRCIN9)zK5{He9%jHD*HBv$O+I$5xs^!_v%M_kEYwXtlDVk}ODT?EQ~0j*%@|8e3Ts z8vb`yi*=J==Fp;zooKy47(OR@%g6l?uL`JINEKVUvkU{dxDYeMhg=BBn04Fg0j=G+ znXUjSH@dTGjKmyqJ-5-0z#(&FcT0oA2p>zY3~9QxBsbPQ zS(J*3I1pn~BcBa?SG9bqROP<#4|^|>;=$gD$p5iEEJLwe;)A?UfDL}6M%lO8so7Z) zuLdScgH(677ohexcdf61NWC6ON|a_lPzWGe{Vmm4SCd!U9lDcdT4l+Z8W5{ zS?NR8YviZC_AYlsF!FVrY^T?&kFkK=Eag z;gDI4CoW|V(UP9d?T30U+QsE6o-3qZ#$Z>4rdJ0Wex?_~*%l{k;7yac>seBkw##+LdK#!DZ7Qt{vVfx#4^A zx12eqI}hGS8#Z*yNFn^pHgZG|=w6Rf3VHLSbm)NHZEl#-Dh34ywv!K4p|nn))~$(z zU`n%tPoxif!YP812Yuk=X_(sI4tm}n!^oCkF!B%_kKNKRusu5hYbP_(uoTsRQfxF8 zT8ExpDp#!-ZobYsyAzMXiNeR3zzyYE)AnBEyk3uv-4H4sbho)bpu1TNi6%O_^KnOR z+dB}}fH`!3&?Uf)R&qX4&1mQD^;}5qv%t9%@fhi<4fEf0n@T44vgh@4t=c zq2YZKF6{f12ddaBn~oG#!)X^AgynBvY=7~tOG-A{Zi40=1*QnoXBIBx8fsjEjd}at z_x9@|Nr(Q^5ZxdbGQgF%r1)P-g*A$|X&)h>9Ju6wt;1R8t_{c!CP$C?hO^~Z``t<7 zZrEG65i&Xmw^Bx_#I=uZ?Pv~84GF7BThWeD)C^lZFkES^ct(B^o=2vJ*?u-%uARb? zCJ$;G@!lEBa@Jid_0h<^i>pf+z*Ri!1mBp@W*7N=u$@v>lGXGe0;|Rq~paD za$qp~Hykqw45)mgjKpag@zzDSHKXFK^AzDHBw>tp&Db*6E>#&&A%1<+hzlF7b(-Lm znCMk=L%u*qaFHBgT%es0zaQsIb_&6)jcT&Ka&$GPjrs;k0W{Yc_&v%cRMSP@!Lo0s zN9VGwpciDV}joytV}ZlapwFA2FfPnbN0%i3uw#e?g6>$C}G=&Y3U1g0`|uCQQh> z%@wK#;Z`p3;(R%4tnQ7 zei8^btZ$2nvrHj8ko!B`(XuXtg7M*EJi@Pq z9==1%_KSTXYq5Pek(i=12N;(puWm_SI^e+B3VQQ&Pa@UOo#bDFJR5(}++}IS#H)3u zU|e39P4R?WaDWZ%y=>{nXXQ7~C5XyAhNb;FG2*j&c*Bz@?O)83iVB!V)CA%|FR=GI zW5hf;I2et1_gE(w{40jsW)9!79qB#<*t`4;DNBYukQRL<=rUdWrG5dR^`1wVB8J!e&9gey6t&!tIX=iQ)>d?8P(5%XOZlQ4b`lLvL>^FQD-s;E%x0@R&jT zxPgbK7JOFR6;86b;bBuD%lLH|6?Aw}ieX5vD=80@$stCF=)@*;^z_O$WxJoj#U&-| z=jZ1&C#nS#d@L6TAmOSb;2))fol*R$gnDuHjlPdV!9xF!Hyz#9OfX7y~T77Am% zQF*clu}}739JRzWLKp))7sR2`VLu%3ZF3Tv?IkW*w+f?ZxvqLJZq)R&ccLuQ2Y4F7 z$u0i1r{)V?-7geR7_6Tbj`!?k5mOQVb2uIe|3Iap{Lr2ENk>PR8li2$g=L77+ZU6( z-C+(<+Pq~%HK2~h?jSLYFr+v$y1&cSYcC+E#@rR@WRhG$@laf!Vgb_&$=*1-n*t*()o;(9pSWwv^QZZDwZCX@~qnXCN1k<xV%?B_Wx=8JsI#7#cs#6hjKbJ-&P>+TpR0&sz1jq# z5E6wYbSh~%EdWrNBmW#r|94YKK?q>yysoN$mJRGx;=>*LUYWC6AT9gIgEk7jTqx{o}@(4-qB@&4zg zn;J=ZJtM|90DnF_@dsIP_)nE68FY5A)I>p^c1_u#bY!<@sRokh`(cjtMMN)iP@M*j zj50^roljKG7MSrQ0-#n<*S1XciTruW)nI7%9AU*9R16udn6O`U@vT$x)pp;LB#Mpa zl9_a^($dq1)9qV-RARifn4Xw0;I)JOJrS#Pi8Y5OzG6rePbu3RKf^hv!`!_fD(&Tj$8wC3Unlzjdpb76OI zyuojbU1H@wbEU#8KO;>Mrr~rw#pUppM*dSNIUN<^0utM=`r;_K!Z66#c1AMUFPGm{ z7!n~A0N(zo^z8A}Pq3q9`ROUM1$6lFvmlBdgIjYo;zlf#nj^2+vY#|&@+13-2vFx* z+D)~1VJEU5-Q+^c^XzoGM17wHjTQ_n-TI1_V&~19H$&?^QRoa^W{1lyOxl07m;BSS z@MjK9IKf;GkdJDoGR=%4%{t`+RRI+)Yyifg^vI_oJpAvX>8YRmo(u)K-`#QX@<_Ij z{hxBsl(K@vRyMa|=U?TZY@^@TJK0?Bi;iJF)JF>|54HPI3xfBtK4m%$6a2Tot3yTi z%bO0^e$yuz3(WZaqFRQlBkjwjir@H{n3!tsv#0H5mr>-5``)I`c7gLxb!dIvXtGFw zLX2|Iw#a#B#8vgVp@>L8%xPw?jnmza_VaSH6uHw0ojb)4W$@%4{U zUo*3j49lC#L;G8eDwBv@P@!s^r^|2a^WEtS|Ma44-}ww4=Ux>Rl{vOYA>1fjH{37w z&BvjP>sP-It49UdfyS;{wa(B`#A=%#Z0UYyKb7dAv^U)Ha&mGeq;?!zxtx`~MmyHC z<=>1Q1b%EDRkIMz)&UvNZPjEs=gGgwCjr#PtV?x_^ba$J;UO-P`GW{xo;sCo#wa6s zkVK?`;HFqJ*+_Q>m%$7SELH}Bk1ruVZ~d@UFT^)Zg6Z3n z4};{Tr$V=$lC=%@7Yq9VEV7et`??IxhSPe=zJ4k%kNpvA}WiJq}Z|vK>th?sCuN%F2b}u>ygJSbqrssV-zd zMZGEZo8(h@Gawo(M={vpa|g^l#Hc>z{oxCyj-aC^koKx`?;7Q|YW!TNw|oJq%>hD@ z(-GaX3>0Qx>ud|BntoUM?P~164E&`u@!>1-m13oQXkfw$?cHuk1zMR0Zmc}Z1l(&b z-#ZVIlluT0bw}t47 zsznvBACUog@>0A2>JY~ zv?yKeNb8+u57c1e=j&|&cNev(ocSZfXUCkouhuA2XGBnX3rG<*F7_AplayN9qz5Ti zgh)AUQkJ|1#LV6H=S?NjZ^r}}6MSV1-ahLo?sj!1p}WmynCGs2p+;qCczB#BY`cL%>t#XBx`J-)<{_b}O1QsWyttJt02>PKfNO`gt1K#)L3 zVSgWzfat)};8Kg!DAG)bN=6wyU-y<`-C>AyWRjx|9}* z{S}HqW`)nFWpZk1o55wTSKx;tMXrZ4*lB~B5b6en0om{`__*QmtZ3oI;3|WmA)`j&DZ?o$<+cbLk4mQCkjuBYq9&Rm zpf$4|$^jH`9Comv<6QKKq(`JE+qwv6w%AaH6nWjABo8%{PpXP}qFy7$8r#(CK_vKV zWR%vy{!3WDo5^g+Qcr%g&_gaJjj!#C^^VV-uF!Yd-HB+=t|HKVH^zAEa0)q24w?>Y zsXsQ}U5J_&7W~{;cl>aBSf?hM6-zwYaOi63_b1XSNX?ue>2mvg=dHsOHjGNB_^#@Kvb*`ry=ynycYY zmDB}Y^UEHyr!6?2iWCiXk;jED1#=_h;DprRKA;&zc^+TNR^?wE;6_@Hue>?y^UzuX z${o-{?1?IADOPn&P0Oot3dR6_#omTwecvB8^EKZiWwdVQLbK;`>YLs6(>|A#xvGA^ z;KA>KhU71#4LEunq1P3h=t^jb2|eDO_H*CqNbyV2|KvMtHfAiwP5mwOv;JZ{|HEXn-UFn8x2A zHP&?`fVnG(phuaIF_Pb;w?*M+Z8Wcv#%}rZ*`16ip6WAk{g4P>YDB}y)Y2Ol z<*?hb@()W}a?Wv@rUo6j5odKB3ltVCEy0cNR^2-~{RpqgmPcZ0od5%}BrN<-;#OL? z9l7V)qkmn0hZa|Xa-^)NDWN$v$HyI)07;&lvF}AjoO}O}Toy+`YzTg z`(=Amv)1>#;>OrJIwiB?qhC-y>md%qe{;javn+Mh@Wn9vwwy`U`EaBmkYG40F@Q($ z#RNsy=n466(z$eGR38Ibs;4roERY`V@}F*bf_nwRIRd#F8^}GljRVrE*9Hlxtv6^P$+0FK-Ohg`%H4TUWjEX^oIioWYdYv==qc$<$!icn)H?XdGl zvsVn?zRC2AKhqB8oy44_1WpnFoojaudO_LFwjBE`q8zvZ4geNL>vNr804R3)AdJ;L zYQyhvOx6RnkDvxOmKCLHxWe)>o|3VNQA#UW^iZz1JXsKVQfPMA(5pNQ%+$5d`8BwW zm&m|rrDSd(@_?^K#0sbfszk)Tol;Lm7!v?I+Z_@!*b)#jc(=o4+qlCWN}|OtGn#cS zzuw+5;or)HZM@TEZaI6u^o7fnF2?mUU)FB_<+sN69_&b0umP$7>(mcgT*PH+2C*>Q zkUM{$&wHef1Ti4-sWn(UbeiyH1(4EDdGg^oO7?^Z8tC6KCNy3ZU|#jElLZ?zz6D-B zlh;&1U=yijl9KSc!^ziyUpMd=Xjw{7CQ`9Zuro0O9p| zRQ_k6RN{gTo5k(pOSQJjApG}z-NcgyPNE1#3&U$IVgSie+LSlHtm3At9wEPvf` z$=1DqcDDJl85MfKSh^KH`!4k`p6K04u>vVR)UL!+bWA9>gr+)46p;4=+Wmx+$9Me% zM{`HCZF)wyYk7YoEFpakkac?=(~76X{S#sUzi7uS8Tiv~9R?!hc4$B9T2m0bE?7$% z1A6{`oBUz~XcNp7Nj z@*e#0rqx5Bi#Q0BEqR5~>AHLymzl-i``t<^3e2s-KC~NQ<&+B%9)$X~{&pu6V>Og} z`zMM_5w2h&SLgyr-vk8!tuZN%8@;IjW=mz%u1)Fe6t(WykZQLaM&*rU;a`<9^*in% z0AdjyvxmEDvvz;j3&l+LWzW9Wg)5-xaJ~^Y4mVxs_Q&XNqz-y|`hBTE0%kp%(}u*4 z6j*UvG?GOM*>>dKM4^sHK-mN#k^qVfj zl6V)@e;w)w09ZF1$P$J7dJP63SRw;5PNf#Elt!iKS#R~ZEd}rO7kdk9H@TG&3HdhL z3cCDMq^DCa(=vSu$huxJ`ai|ZB%C%ZA708uPUVli`A(Q@SZL(fG)Lv^)SVIWU1jOkpyYOUY;)S!9UW>4YXY`(3tT*w7WT4z{CK zu*0E7lwz&G=Irz|RVAG2FEm)z12lnef6fw3Jsmn4k!2KzR3Li;jge-((L|r}^7538 z62J|3(-9I#iTEOs4Z2NknjQ7VeHhL=neLL^c_p)T_WGy&&*SF2m_{kc1-<8Vn%suT zO~m$!R+Mnd_1l&mWEgM1`{xsVEt)-)(*Tb`TJfNcT%DY7<0VCq*KnFvSXS$2dwY9j z3Qn|NW_aL|Ja-xut^cZ8iUYO?2kR|R0|d?xx5`MDU|@dE#bc)F&7-51R&+tk9CSXU zK7m)Z>)LF3FVg2u(sr{;-&FWYqu0%4v9ZypC$iWGgpuy%nujtO?=Rsg&vSAL}a40>k1;h#z zgTVUya=P%1LG8wI0%nZSi{v+Vr=#in3w7ou#0NfoK#O8Z(_!m^imK{2J`4rfLXUI4 zWO5EGm8L^(CqApt#YfRiJIR%^9x(O?2sSlD5T+F+unNU9d6kx&%OIvGo|(W24x5Ft z%|EU6uWX4dkhf*6qybVcz^R1Af$w5w^`;+<5{lx1tWa&sZh|*CLzkOxUvrLgl0;VM z8~3N4D|a-Yr6@>spPJJ{7`-f`BgjqX_Tm0EJ(b;D@>^j_f$RICPi_I$q4BGgm1kSH zaUg0jnv>f|=bs6){>^g5QUO0e%+zp1RQ~S{Oc#Uj>K{G)T0f3=R5d$i)uJK-ryr8^ zsh>_%0ln+uWJ6;zeKyXqg*jBxXRnO#QGJOUAWp5Sc8j5hFQ(yxGt{3 zslZv7ZyIkm_tkLwWNT0@WghL2BK8_cJ!u?{x;v6bPByvQSDOtJZ`9^ARu#%5YaQ?Q zI$ev5|2ml@%<2pJC3tM-x}Tf-Osy!e?Q;jcn+U|W4PzO*IHMd*Lhx}QI(9byB~HD z^7!06PH72052EWtgQSFP-y9(#g?C+(?=K*y$n5{Hxt)gxBe9I;kE%`#tR*T|fj>A) z%t##_9jEgxOd6$AB?ZOpXBZcylnO7t(yv&4yk1)hK*cGpd31Wu$h3K>27on8BnECU zJP&OK1w$BW!TYkN%R)htARXmty8CMY3;fMcA~0q?U18R0YxDU?r`*tw*WAN$GRH36D<%8Q#0i*&b6vK(>5?kad%i|Z)h z_G#~Rg~FsAhziB*5!Iv#P8Z%QpJ-n9Z477YC93BfdPFg2XAh+Tw)su^DgX$7r+&mB zCo9NULV3T^AI1K_3lW*>?Cj7>THE)nIcZ?SOB5GTnTagh1@eTIN|bTm*Q5=)p~(9| zp_B|<-P2p=$%XC9TlNO99ikuXaI4yQ*a^tUW2Wv}3ltZ|2ps^2-H#*0H$Dg~U?ObY7L@%Hqn^q&#(xn=j0S@urfsBsL76 zh0~QSe0CN;cScAtBM27W^&{JrWTR)u1?RAu%IA4;-0+o~-d7TglL4(r1490v+-Y;MsX2y;1KlH!y((a^4?&O$Q20WBn#wbq z36dF)VkP!@E{BXqhEI2M352iO9E%RNJ9JVP`zs!kCpeP1{m8F=Ou6E=WQx@j)>|wI zj|-qzhl<$Po<#FhY!qIB`tcyUY7T7g3ox%61$W|of1xbUc2u6~2!3I~bvb0j3lS-l zfd|V!$k$77hzkysZT>8tI?~)nH1ydp%qSOe<_8$PT8K-(+8s_?!JoI;rWHT0M$PN(rJY+_p>0x*DCv7<$6vJay^mL@jJU^ z_VQeRemHROOmPr7Ws`p1_X1Hf??O6|(G{Fws8QeX@7!CEHjBZB0<1n&9R0)HML;A= zIART0p*Z)Tz<=7p{Y9RmjhCJut!RYz+-f!c;mk)WhA>5XR+YE3AsP3*f;e7iyv6}> zYvT!6kakr1t_7iE|sHH%1agLcf2P8$5`vo+s9)4Bg+Ib~ z@h^l~5YlUk^ZLeihk-A)9M{Y_+u!iwf?z<%(vT(;_dl~bqD?@Yb=>i{;{9{a50Dbe zVX;9l0R+Euil57zP$OP+LkL*cE~UQ!k7Kv}>~TH@f|MR=N!eX3nF2ejoPgJ8#JPkL)n4!}9hrHF!h#i1i2>XxzW zKc%?b7H6Lim&ZD*lArIVH-bx)|F>xUJr?3#dFpz(Sv)Xnzcca#6?DY5b_aS1scdGG zAlNUeG0CR_3LpL6PPh;pt!i7tWuBze(ckWd__;`b{8dz-AcAvNNqm&U<}X4L79F&z z+NSVDTK{<)X}Or~$DvhGK1)ZTFvZ7wC9ie5F2KiaSB}4bo9I?PzNm99(fPMk1K{_6WaDo$5P&VC-BJ7`0smhnO;CA&2oB5u)!j1z zjNZ+CBPI}pubzs~z&8ti#%$rZv2E7YUzu~uemRNZ7oWgA5;2~UL!N<3fl^;r-H-1{ zuhli{t0=)UW;$z*x)xVbjfJ6fuR_RQx}Lp}F)z0KV?wU*M(f#(L3%TQIVv7pww27P&={NkpcQ$Qh--1*6&pMx%~5vz1!|EWYsOATu?UC`a zOZaa3=~4nF6O)GWHl`mk^0|gvZ67w~%9A6Q5wBh5OD_Y^Ug%;J_<3YV0!|MC(x*M~ z!<=!Oa+LTZN&|dK%$V&Lh<~B{&D$}*KkkDFSfXxy7SMftry2Umd@CuG<`ZwnAMW6Z z%h5g@FYMn)&HDe@Nf!a8A8}|hqDP4Ip?M?`jChN_}KP)Q_J34 z_T*N7h9cF%(Uruq(g|853g4hFE(eK@74)cB(X$jNw+O~dhQVt)xib=LteNF2$PF$8 zQC}VcyEFYMt;AfR5pYC7;X^z;Q%;u9?)2*~BQaQn3to4x6=m0kh&rf8c?#28=%3WIEM>UHBm%m|qKN1XBQ48RwpyJ+M#E$;=fDgYHSmowHFHXMN z{)tg6$Q1Z)4(5o=*`uQ)nS9+eNFbEmyI$EpThvd!H+V)Iw&ba zt6ekkZ~S3i6rf-H`POn^S6q>6j*P-JmfQmFA21d%m!a;Lr^fGNhzTrUe5)a7!cy;4 zKEL=SjJhOq$4P&HK*|gEm+=4maN)%airhFHka~?UtMt$$z&O%B=+>Y^z5P`(sZ!%Q zir)j2pOcGwtzOSjthMh!!(D~XX=7J3U^%ZI7Zd!=cpTN5VC)%e? zN>*a~H2`*^b2aIS&kcg9+3~1i!v}myaNY^igJ5&N=T+!LVkgAO5*#tx{6Ik33=yYe ztbJMc$i&;fLXo`fcsY#iGr-`@uODawl_Mc&Rk)o_Tg;O7j$2w;Syjtx;O(pG=|Thf z^s0-3tx3Qpl>?UAqglLBPf3a()Wyts8|j+_yX5Q7rzq!5O#+ffNg_ndV%O?xvM60a zOMC5JUBCy56C9SOy3wzQ@~-v732NkL`YX7)OoSzHdtzZ## zIAx=!H|tf1h(30(=6j@~>gK%tFGBp$Wv1!aGL@1W0?1S#AY=GP2f>Ozt{d^1p=`R( zp;6sAgl!e*PGu2kDSf0`G+paUHeuDPi_63s`#bVPL<8OnN9!RH2N@A1BGg&cVi>h* z>B@qpRqm@Kg&uN4yMz8>g4*!~^!EumhZ`I68V5>NTy?$!(^{R=c2-@J`$?fzjlB`E zHA%HKC-iP%DTZ3Q58h1#O=w7chx~(N!^Z{*QR?mFuh5obNbk}9nqaLO*f;Ij#&=LC#+N#Ox8S9gfRk&>e zE|VF+;`~c>dZcdb7IHQ+@%cU4{JYnr(^;|y+}0D! zE5bXl>?k2lkX=_y@Z2TUyX;k6Bt`Xm11YPVnb}vkDujWNk<(%zl|v<0?pxL_93jm8 zqmo=J$V=y(!@nHh-}{agUo7`cMzjXhc+Xw;xgQ2NkTiX$0a_syWo6^-H=kd03)~!! z#(2{|n&)A@+Hc3`55;4mg6(8DW=D@rsE+*cH-7tIS0C;D810j!$U_lfPxmj&>}uO; z=oqgRU~9fo__a@)OW}gLsPDKpLR%?gt0ahekQ8^~F_y2i))_$z@AXC=d+k$T*uI<~ zk`7CA^f=w&@VY$a0D6|{i8g=->4YtTlC2N4-ugkw(+}V>vq&;QE7va(P%qF1&aJDP zK^w)PlTWIs;Pin=Fe|&J3%HHI``-@QG`vqbXuCiy7{=>;U6X0{9zZ$H0zT3J8u&i( z3Qc{2iM1+2F+w#{vvDPozrx*`5xKUhouJk@^v{Xa0hymoGQBjYu8C0$!=SVK=$i*E z`dtj{@7?qX8tqDn*9s^dGZ1#`f046cR{Q)6e(L{=_WaQFS2zjph`J+HObB=kX?Zq5 z&+~GYy!)S=I>VPNo*fv&w#Gm1AuIdh;o?pS+&=d>eRs5x9X0d2*qdoZ&t=}Mh9+*J z8{RD4dcMpIqA_4^RH#d6v_>2Ow!m~1tIzIS?OM9W?zah<#IAkNkm3eZkspp*v(>+A zRlk1yI&qlPucLBMF9|g|Hc;(=2WkqD#R;KAk=#%JPE$&d-(oF`3n7m!$$6q7dNrqQ z&2S`IX%Ys}Saq?aaKgU}+z#wr z%g5C?nm|$*OTvqv+b@cw{AT`G8i@`-zF9>!gQj-?i=N08K0Qd=^X#&!GozJUEpQ><~xUmDEt23E(BQSqhl}r4CDEQ2G(B-LihspZx}H} zRb&=R9p9%Ux7qq+lgM%c@0nMJ9V!yTJF-h~6o~$s%Vx$DdM~GCSzZ3jmh!&72UWCK zB&+NBo8ps^5$R#sUh?W>;F7s|kh&rENX4K%7BN0I=XEyUY1jSUq^o$RH>cy%giQKp zK7a!nygHL^6y~$%7C%#vdj2PtF+cmlQlRCk^n&K^O`W0+QT=4edNf-W-$;XN`TpS( zlJZ$4a<^416-~{z7@seI*%yC}!Ix>;+dw9Sn!U5NjjW}oTbz=nlE&(>$@e_N%qZl5 zYtQ3`R@K$fRJ5^Yk8o28_?l*awL4X~Sz8raD|^8|>mM=^_)l0!fRsk`ogHUZsU8XI zJ|XnsDu3vle-F;9%~V(fU8?s5EHUPHJ~J`9p)VW(nQ!a)4m}{1(Y|leD85nF#RJvJ z35;<}0=iE@p7oPSgDBM%9s#)^9kUO%Kvu18_~0n^jS78ztPVpkoZt%gRv;VTAenqs z37<0nZh;br!49tizt_~-YqMD7x`620jxW zUlM-Qr7p9Nfzjc%==bo^{cQfUapB0j*@$a(Y6WvA{6S>BYMnlDkKKkNc}KXUdprNn z$4XGt!}%tYCqwW4-p8SD3xGr(LzC+Pr-J(7xc#(e)NtS}ORhlQ$Am6`)&JC{V_>fJ zdOu#MHeuCeN0qxpe@nl(F*l(axz||>x`f5PFrFQsp)aDRvBU+DD`k6CxtB+{e=GD~ zws2-(eOZ+G-+UnY1DL`vS)yantg}%)^Cm-R-uCHDD~9)w`S^2-ffv`zT~~X}cGck{ zvagt)RmWVCUcstHzpUV^o;77NndqeJ%NEfHLKPlGwu`&-7&LdpwneSXdF(Zo7Rme? ze5dI8pt*a4(cYS|q$u^Zhm-DnDN1WI_OhT!-mY^8(Tk7p;A#2^6tT3Mg?4|=93ob* zs4o@A#5xU_yz$7(Bhu`e)>z4$(xC6e?mWi~Fwa!{jxvCk;vz*`=Tj*sa6tq0CCuM~ZPloJ0vRI^P2;5F=e zEd762cM`rCvHABNc!w#y_`8?jU(lq)?|gJm{p??^>2DncFL=~}12AfI`20VOsXvJy zd_j`Hf_y|Q^1zb$Bq9kWh)u4Hb)8!b(@ksPt6E=S)i5W;<^H*jD15M#jKm-9S}>Rp zL(nhIfVF{-@9`53ah0kXo!I4MZ>#eKZ<$pKLpU zOA{Vk~uK@E0su#ffryK8{uOsLl`j-hzP)#d|7FK3 zH?3X0?|{BYRO|i`ARG5t3Cyud%EXwGUjB}1aEad7Gb0tR!~fl2dX2CWE(s0uTG15? zqX9~yDv1kRJF-gluEyI1MXnH=gT!Nt#-JSiU^X#>QN^;UA`hg^#Onm&??uw}CclK+ zPf-|HH&0E%EwH%Uj0(rU#Kf5GM3`*P0~0=o8AT$jSQ`#t z=0v|MrYFfgmDOR=k3+m+_NW5)O*oK;ILG)uxQj$ z7`p#RfOPw}I8R&d%w3Rie}s7N{F^ey`&1?FM=|;jp(xD{y>UIUuGL)YIM4m^rIlQ8 zY^112KDdqYU7#%wG)A4IiQh7s3M_ICm*QSTE!03(k`k*Cy%c5C+n%;(NDJ>#M>z@v zo8Jmt4#TmcQPs{_k0Q4jC;9-iJ6Uy1MVYSGc{Y&z=_HeN6YA z7sk0%dy7aFt%YPgbmIiY{7$y(TP8vV_}#chh}TxGK7!h08dOoUDqYV5vV*f1`Pu^< z(}NwmlPEh0BazTV2D(Bdb)NpV##%ZZ8RojDE)#J7?emG(j;!C02~jjcW$Pf<5B*tc zO1Am7Y$Y?ilynF9-fN1-Dlpdx(2+5ioA4cv1|y}XUp}c`agVnZ6M536s~Rq(0ON+>Qi3zbtB4TphY0cq?nD8jJs{L zjp0vVnwLdrUS~Y;DEMqtEidsQC=`Juz~^St$EFleU^CtB_Jf4uoW6;#j^*>iCnUNk zP9_;qgQ;P(bJH2zlinC>qXelq5`>khHH{(XwC8U7U(0vm#fsyz2bgniB2TPt2*W+R zlw7$kdo-)5OHoaPQT$}kH|fu@_G33=s$Z6?;Z4H{GE_rO$op58?01+!GqUGFD{z*8`NmKt*Y@7s?cVPs48h}Qqtq3LNb!%4LdGCAgbq)19aU6RQZBw- zH{V?~+X(M8XJ)o~?*<9n9xL39U5~KcU>E%hT6&*=KrVZbA;WZ?DPj=lT7Hh5{t!A8 zpEUq_c0aRkQ9d-N?eDZVy$-hLzkWQn-TQHXa&SCl`OrAPHZ_|*jOd}G+dVIPlC#nr zo5*9ObNBP!eVuDBDnY!ac$=Gx9bz{+rA{~e%14{%G7ov#n?HMfktN)2jd$}>hsrKk z^`6Q|_Y-<1de~%ZmZxneW^PMoqVOQq36r1(QbiLZ&kY`fYJ2E%+9KoYDqzD-qxp5+ z-Dy(>Yg3kMH($-~RW08oO_1N6cf~Z_?hM}cP57Zyo&W~mn@W}|`<03e05nVsQ4r~T zbNY^l)H~sIb24eusA1ss1MlI4#HEQ~)!muT-Ptc)iU&5Sj>Z|qcL!bM(h*0}KF88A zFRm7KHOq2xenwvXw)2^-N_%c0pF`G_%xMCnZL0+`kxpv8O-gLAT@_e*_LY zTWF)QtG8`{m;--jfkYi!Pj2>|WpIYC@IBB*eudL=<4AB8^#g@wUIq{3YYv|fSe$@P zxgZ&o0n?QhQK0P>FL#W6 zB88p{RHmGmNe{AmuiJ&MKTQ9yPP`a!X);kSSzcP|yzb7p4$*2#z3U)8I_zbebq^n< z>aG=0oZ%t~a$KG}FQqO?IUt$6Js`h>n9hOvVMv?s4j2&YNO(g3n-s2OfM5|NI5ys0 z58l0_RY-q#Bz(U3K}Jss44HczPzw6k0b0%8jm2R~@8e_=Kt@=RqsnH7y4d<2)zjyl z8eix>g+R4SWUKSoy(efr`r<;+rz9C*zA~TAR{e80LtzsZyL(^IB4mJA?YsGe20f!WS7R7Z6>;(nc*3B9AU zd0F~l)||n;wlO}^IOgQ`knN6BIqCwpv=3TAWA!{Hjk|iiP1~}%r2=R`b7U#3!ZZsb z)C`ah{Sa*-B5W^$_J{Y(yIF3-!2V%a>%F)BZAWCQKOmlO zrD?r>W(wc3U1577Hrzn5PUwXUg4RFd^b?N%3ni1F;6Q9D;&w2d6|ZI(NmX2_55slD zH58SmbiF*byc#fU_P%+?QRV)ii13}GP3+S?Lxbbg(OSp#K6pG#28xHz03Vqy#4S4@ z2`s<~D9t$!uE|D>&?Xy^36S@l;Tj2Xiq2++B%0E|h_yh(POrtNj>LKV<7$ z14p;}w@X>GRL$QX+$K2^b?&n7zvfGbq%mZWiZvVkrZf(8NpOs14`tsz$u$xw(w`&2 z@nOp~aNKsq%W;Qqzv==Wf?)Uqeyevnp(3GNbVMso=OuPtO#0vECwjcW)+CH;vi|Z< zkOZ?%;8S`BuvI<&RqSE<4Ph_Vk5Apt1f%ji?tfEzK$rc1RFaCt{X4$0#1D&kM;#^0 zwC&<-&ADcu=43vnLP527;~4+A*;i+~PC)@Kp15=mE*^LNu%2{op#Fgi;CSG!aQzD0 zZ!ufcRkgdfFgtxVDSV>eeuangXh)zrJMd`wXf(jWih=*LBrC)7@Ks9u;eKKlxz8L4 zuftFKB8KYVPV9uc%d$JGed&8w43S)EIZ3Sw@8S{?K7)1FF3PIZcX<7-j-(`BfF#I& zYHyz}IGNWm_X31f9iOUYs%U(Wz+1NF%R9s%RKHz*x{rCc#8q1(U-AmMO$yXg>22F- zb;MPh)=gScB6+*!)AwIN_ykCg;hLsBfDh!*U?eUTt z0KbJOeYcP$e{-o=KMNJ4OD{0K{w+`|QvXaWESR{+OL^;&*|TET+$SxxU|BEVHtEB} zK!%MpD16r-xDlAqFxBK$j~60v9*7j3k!pAjhx8P56jdLS2~26<(Q{s~QZ%W&H6Kh* zJG8oxe|A+`Qt~4`WAJ=9%G*>Jb^xDH7aEGzenw@fmkLPCOY7{|X`ep#Jxd4c?;(P5 zA7alUpcF3vvZ{Gx+qBt~UH$P4cs2CiAE7EpZ6rI4?^^BLo~}-Ll;oMO3bMyy)7u;~ z6pV`qKN|U^Q?Z0<$Gv=A&*gdWojtF*ODPt;*GGwdsYt0n&IJt>UU>mp+art!24?0L zCY|9N@%uGGO}ZGRVro1KfuX8j(zhH4MF9ewk*3j^yOwG;pR}v?w3-I zzevd6^Yh0sAcMkR+&<=ozNeOF3r!if?zIP7~8=H=n zAz6TNAmh^~rBu;-19w+?J3rRvQ@oz6lW?VaT@jfYn zQy?Ish#(+g`hu53_{f;yHlk@hi8co~O?h-~s-@26)&A_tVtYmS?M+E>UY3VXN9V*(N@aNPg^(8;2n*yRuw#}Iz)|~c>EfJkDDqvfbL z{_!-&DCdN2^}BUUS`Ds{!;#l)flo?-1a1=yybN}cXfjL{aC5*6R@&#i4rKGBB;>Z$ zJp`=-I*;923s+hQXse0N={fel?4Gr2PJ>G*Grg-fZ3=*9?zPaxYV1(t{k;1tLFC>9 zZE!7(fAl;6&Bc>J(nvQbc&2*@a%cWpAjybL7xZ{Q$!k4P{1fRt0Fo&)uDqws5@`kn zj^suF&3A|`F^$Vc+g1G#dixtHCUh(EWeRM02d%8vpY!(jl+lPUMsP34ka-;smlK_V zY<*q8Vk%W$`<-^57K!u55M?p$6GF~s#hCi`t@n)r2dVb94es0>W-Rk)0CD-z_+`MD zSf|*2)736|*2pH{`*~q{0kNnwC-7|)vMf)$3?pZ&5PobNhvsxFmm9TzDk`mGRQ>JA zYG(w}T@8(=%NO_jjIkGoQjAA(SpUZu5d1z-8Ty%tuE$HFmnD1#$}bxI#!Aia7sq+R zq!PyB;^Ia6$&ew@hh`mF+x$D_?K=TB<@&APAvy*(TN)pP$#Q^fIL_X80E{FfTQ(6o z>(|jGci+f-CqRaR8;igc-jVZ4@1M&c*)l82-L+HE%StRLT{G`I8_0MQDQTx=6Eba6 zJ?~IqSO2?;a>s&jv=fP&NcgVC^Wv~v*8ObWrE8;j`_`2P@17rvC_-xuO};YSe@sy1 z6=tx1@iV?``J6z*It9r6=cG?>yl;m)2bFHG*M*~owI&~)7*dpfMWG<5#?{&i{EthZ zXF^g+ir3D|ra0a#hV$}Xmv|iKwW01mG6_^*Z~yS0cb*F)K{|#XcIHGFKn{kb$-idH zcJ8gydT|zFj2yHITCVH|V^MzshfR<)f*eVb+SiboNS4w6KNp~PLh@c4dN_SPPJkc6 zJPBmmUCK$ z3||i{h1b;9=6L;Uw#FA1I~KwzB(95o-9W}nRA)pvRc6qf1LpGb&Q}n8Z;_h>mLW~Y z|NFa2Fh3}Ya574_96%q!X9T2Q`&;N4(OYLUpph~#ed*a|$!8!(KL%p*6RF`c-eK@*Hkatw&NpWyCi=?;P_KcK#&eBcv06`GdE z@E`N}8&;+qfWhlTvb_AK!v?;a-Wmy|vm#xH592@K2ks6Gd$B~=ZF#H49{um%eC`^nJR#r~Sdj99QMAP^h_GPu)^D7Z=F;-#`EKbQO88vjP#)fujE@Xc>1IrQ% zzK|}7f+$5of(m@J9~U^h@17sO&@Dl3s7S&J^G4lGwSokZ&sZctFk@4hlrv| zf#@}{{i2x9Syy#&mGc=0Y{tOAn9LaoWoog?HCMkL!?>)EpMr&;MYQ7`4DK{mfBn}R zC`uraxT{Dcsowvu75D_dfF&0p`hTqe6}AXFJ{GN-=s!Xtc$xnUtg!6oH=RiTb)8_a zBa#8H)c#>F@Ry7s2>#zbna6(ncQ)|XJ7dyQfnbVdq>T4pA1h1cYgn8!ZOZ&#*9nzD zXx03`+yB4Sho7VWe}`vGb;OVW9Q`48q}g|sZ|vfC&!c>BLmLv#792lBy3le%TFG-#%7U>m{&x( z!rV)I%r90!j4v5kw+I=T$Q@Z(FV%-sMG*Ov5)%>eaetUB*%7uH;=3h4iFfb@>Q_Bb;{>M;C_v4$cRZ0f!ht9jLPtLNFG zD5#_lCkve5hoKE7(36y={9<6GyK})kE4O7Pl~c8AO#Or#zO@b8+O|Kj6SsgBywB#y zDBy4zX_(XBG_hGbuM6uYt@Dn0Yku25kb7#YOe1J!XKz-pJ=98)T`PNBtCKl6%Dc59 zN7p%+wk&N;R@Tc9{d9j_Tgl07IMBbIsX{2;koAm7H!&1lzeA@%DCahn&BckUye%LS40PEsPHG+Jcay3#IjHBC3~OueBW+fd`!pTpq-2?IW8c|z=oQv%GS1Q+ zC5LK#{#_XPCZuNP38LDJ_)Q8+by!ctt{@Zpj2ML`I`=LQz z4Y#R6tdDGX*Pj%{?~t}7Lf37OyfH{b2S>AzxPA19Z}=5=+(`kkPMMS;h!R-Qn#Wtq z#bfK#y^5Ptpg%i@e1 z8hNIGLa*QilBUT4zEetk1;*x)u=*}_#X?nNfdf*Vy8OgTrK0W0$)6RBU9BLpBp~w~ z=Q8I-$ZMb@-t_p?mUM3aHp2Mjezm?*(S>Wg=sIm#F>n^plb+{Ee8Zlj=I<@*!ydaQ zD!i_m-(>#tM3EGuMhN!Ud!FEUs8Hf*SJ91*veSE&^IW-gTArtZ z>7l!Tv>CQZBiW>s)Wxp)G`cdX?a`&2;J5x6Rd>;{Lvl9j0l)0I*mwwawZzk-cLlsavO8@&nH;L+d3sEf|~BcS(~Q z6qtng@6xF|x-NLsy~F&;zNLwkUS)b7xPQ)VI#xUHlbe1Y6KS=L)FI4bZ9Y0;V&5ru zWjpHV`uSa|ft^R+A!H$ZvyiWHGVBnVd7ip039)eBiA;nZ!A@5!va?6cRs`w{cpaB2 zn)K(>NBX87Wp`&t4^I1W43{2~uQ(ij+*bA;jFQw7U8z+SOWQG>HYY~yUVomPl3Hf2 zF(uL2*KneiKxoCyg6}A6nL0^t+$7N=zlq$TFtQHSQHfIMS}D^>F+`Hm12{pT)Y`W5%EM@$=%` z?WC|WwG?M-&Rbgt7I)?s-eup>@pKvLb#0!g%@yHe55#h$%^95O7)`2_)p^CloPc#6_5sdpC4uihiCXkEzUUthbIF z!)#fwG&j8Z&@I*0F@DEk+yru3_zsg(JJap;LHo^nTj9{#eE7mS}gvdc89%zno_s&zZlm&$8Hon1GeLRx9Y zLbherD7Lu0hISFuD`jGI5;{XvhH`X}dJ>mb;(9lQ72f9Y%j6c{=ImYYV;^byU9*e2 zu9~qqz5E*c#{6qc*wG0m`&#U_wMG7no9^zniVtyRLAvOglbe8>cT!<(YN8_uJ40lh zH%+ruDXP%pa&1qL8_e$7a!BtICA#Y^JoA@Jmw+_F&XSmkf_k4QCO0{t6TyW0QL&8` z@cV{jaym)YZPci>LJ3JrRU%f>a~a1Am&GDh7O%g#!cmO}*N1YR!T$gRDI=uI^)2GfkU9>2rqMUTbjLNzY~v9ps?aYCJH*48 z6=xf{6AzV&o%B007%Z~pW;tPA;sW~I?_bC58D41gYA5NIUUo7zEi6qCoQcDpsOVIx zMRiDenioph2JoYo?u$89#&u4jIYs5Xd^V0Nd#p^Sd;O(=ic#fX$;%nCA$qswrt z?6vA7Pwf$|k4N~ROT5sV3%wfGJqOKR4 zXzo#nu2;12*0W7w>c8+q8&oscQ|Fgv5+VxAQRe~+V z@oSlt#rB)d|ANe};BDjOyqhg#)1}*-D;yNo)%1O=7HCHu;d;?ERjKC7jY_ZRdDDxVqsH1xlSIAE1+E;2 zCxV(2li(ZBQ*kkV(x1T{R_I?hJct-?$Beb#C2ZlHI1^h^*?2N2`r zTdtg1k|AMEy+8~jgUU#oEIEC>?S7KrQ9;ErCiSaSeG2JWuw*U%o7lKPOMI2}UY|H! zC`wd3F>>&n1a}4Zwt4?W=xy3!yzu;^_lb>SCu~k0ge$S+UB85hZu=z4Av{eqm&iTO*J+@E<6mY=^sYRo7K&#LC2d+;*~}% z8cTd(cT}t9DaF_yZp)_1Gny+II<1W>VKNYzQtC~<#~b65Rnn$4%+##m%-1cS@FTd| zwPbi|K5<9)RX(%oLJ;nH)BAWmO6$s*o4Lh#%n7JL&uQFm=6cyGEh(F;x|w{N@xAR; zl9K{1m6$7jRcCecTh8HE4N^gcebb@W`f|}8Q9FkO>b24@(nAU>!&crm9zPWyL|*8D zA|MDJzmgDDou|J)>R7Gp);B!a%fY&S%@tZLGZ3k;$;LP@%$MXeL2nx~lJ%>vGfyzt z?YPQ{{FIX|zDnDqS;ncU*nN4Ol{PAoZlL`$LGt?Nyme!DeNV3Z%XP-+o9muE&UsG4 z+@kq{={}a@{Pf`nyy2u&F1lF#SjdViXY1ox=SshDX~5co*~xeD%m03i)k|h+ls2H! zVvxt_bbmRd5DDq?RVmrpSb<8cS#JUjpijv=&)QTo67Y%#h`3<}-x2g=S07^|smZi( z8xT34n)7@x44Hd*N#|imJEyZN)@9bFB@J6=Fff2NblZuVP}WkUP_8JY2g+`zkT=&F z&C9u?7ubzF+%RvH*7sVX75#lFb?F8xh`)+{7uh{mGx%C^Alj$=oyD|T;UtqZep@U| zd(msSw9WjJNnC;+r03NXCVSU-;ovN-WBBD1$7plvIRWOVzN|}%xB9*xK?Y=Afq2sH z7XKB_Dk&|oWZ4Z<{ArHvB+g->p75Ys?n;)Dt|232T>M>IMB}nLqoB|2QTw-0+WD!f zt@MlxCCkVnr-ssk^yO(K8y6;abBk}?$&T?DH}lcBx25tIf-Vmk6&m#G@{ z*-kkPx_le-N$snnaJ%4@$2IG#M$?%UWYx2zISx3hr7=G?zqd|PeB!)aq|Yb|;jIW< z<5->U6MoY#xs%aFw5Dz|UBWVyyY39}JI~D$ODn8*G$Fw=$j}g7CCc{N==p&5$X?>( zq;YK}?#@z8XZTFS-)ehx1?x}^*#}TrLIUlv%GvT|7 zL2CRX5v%|a2F!ehK>4AE0I`4|)x~TnQ;ZksH4*A0y{h!xP^HMYQ*v=^u)95u@(66x zC)_F?|8%``zjxijN^)xXmkx88B6+$^mM1QG;N>uHWur|&k4NuDW%9R2DpO1j_zzZ0 zKlqLiY{RO*On2L+9~iNbHQR+BMO@X%oscJFloyoGJmQ{o=*su>Oeh;R?%|faA+{Z6 znlw2*ZD%MzN>?e9B4eRrm-}jCY3G%TXkfy0NYopOaN_dga@W)@@pxj|IEh_-Tu|2O z3`Njkpy8t9UNXHKx_VdG;vAdL6&_2HAS1I?u@uX5L?X zdP#K0_VP5QVm&|hjh8+#>4zTeovZrw5~=4giY3VER*Ry~w(eTd4}%5+n+C7cm@qpZ z`#Dgw;H<&eUmt%fMBT_O%0mFNJ06R3H{Scb)%h+#FWIf4(X5^~n)79k2?xw)r1x0C zEpqfdHCfMW2FHSWjpVISQGfZ3+6g%^aad_5q++Mndq4?d9cS@vj!z4kWD#*ll1+S< zxKa~eu6|0XMIHyq)fJvi!qXvwT8CC1OgV;c)j*vXDro79#0{HL{YlgY%FOl))kL$o zR=A*<7lf(7jI__~DUt-{v-rFfVD9 zrf#WQlY9)5v40Oa<_*K-r1C`08pNK9b4AHb_}xz&nLyq^2ZH-p! ztk%-QIQ63I72MOub4Q0B)(i9@-|2~Nn(Fv*t0iqs$8!Ut>_l$dqbp$#j55`l?!m~} zX7$|gyH7%YBJ=8vkqe7Y4MRA+Pv3nnu1@V-zqu~f!3<_}3_Ps4{R$*EuU7{?k!IFa zaO)A?A#^At=uxMbs3!7CM$SJE@r$~4+G?*zMXE)tzIZ)NNwf}gs9aI4^}yZDyltlE zwxMNIq?=W6u6Q?L+PO|#0wEM79pN+~DDd4jz@pMQmtOf!UmE{gH9!CI;`zz+WcO5G z>UbfBH`fsa7In0og@1t)H#msqKETJXO#2SiiJy^t%~||7_s+aD(XEG9*K9C01xDXo z_Efl<&<9h|-XvRyMPpVkZsd9HrMshn2@j058oClYsy5*$pjR~{Ph=fcSi!S`)S=9eecf(@M0>Tpl4o7(QDmg###*`42~-fBU&JUOjT2CpPwClPng z9rP6FU%np@v#qmDhuiIhTLlVyw(w9Orims2wPBSagy9NsBEXd*q#m0WG_n8#GRVkfG$~<)H znG|>4%su3$7VI<1^u%uQrje=3h((8mL5TM3BRsTdcVa`Y=y$mS#fcBQiih>y4lu?x z+x*DpJdQv4;crQU_^naZ*@-DkO+h2ebpg~sh}#R=MA zoL>BHRh#}vQi10J*W?>m1NO2-%kmq;zFm|3GnFP2+@-ZSZ?f)d|mpp*8*D%@Th`zMqsI)MbZ>-qS2xnHG zAFPwhePX90IPBfgmA}ZC3f?Uc#MrEnc+>Q2(gAJtL0?%^mb;aJ-dG~+kWEFa8J%NZ zpaqKtC8vTw(K?KLSVpGR#Sk)d_*9x_=8MBT*gVS-{k(N(U(dKE+Jwnf9_(5dEC z_O%e{WKmUDZ^q4ms7(i?c*>NfXYsVJqM+fMg4H%vME|4DFYd2(FkRB+M=P}aF5|1S zVBDX(AA z!lBKrKlxHpg4>`nzD)hX*^bd5K6gAA#&66k&8;EIuEr3Qg`qQ<=95~Z=sBn$tWm&Y z=jbh6n(XoQ@u(Qm@|myD=&h)c0$zXUExx)+#q`T2y0KdMI-w`l@^m_fUQ?-;MBSs^ zzv+K#dKtWb>T{>~T#srR+Pox<6j-LAEj;}#^bCWumHzf!$73}^FiQISBZ`*z%8Vlbbyu&2g#;Z^a@fCIx=WXU6RN>@#drfPDd?!>Wf z2_a3EsG$@KJ-?MGBT%J)Agm*CJP+M$y+FmA%el_hdl1slmNuuPx2=yQsJJUpi|;4& zrmnh2E_$-)VBztS9-4Ql^T%Qg+#?L1^w8oZLyqJl56~16Nmut+ zI|iMkI-=q$6`gCAS&%;{HB`@}SUmEe>-bhtiMP~+tGi36C2XByqp`IAsOnNs-MOHR zI&RX$zDZ+sqQ@BCfcqZoTfGVgSyAF1BhJ^5#?^+PbL+S<8Jazh#NONBJh2Pd;hBFo zFdk8Cmp>1SkDMfN^`OgjLQV+Ve2Yg)XB}y6#?-b!RI7h4IbV$fz48+~_N&B=tE@b} z=em=>2@j$d)@BwgR`-XA1DV#>H9M>4g{F-T*`#0 zd-zo$KPpZtTImOL_L@sY=*v9kSF58*$TcwVnnahlVeUV^DP`ALjh_ZuU7aSqIuXo2 zH@c;K0}VvSyNw+2+&WC^t1+I)VCbiN3C+57E#d&UkgrH3Xga1ugoa~IT_SUGGkVIa zY&hYprZnCS^(S<^Ze7n;o<6Ahxw>9^ z*s8PgSRopsO1AZ?x);Ko?SB6Ekw&4mJ zwuFj+3>_jRA<`WRs32WKBi-FF41xkuA|fFmDS~tlJ%}{Y(k0y>F_gr4M`7>p+CR?! zbNDq}vu3S#z47#YKL!ETMU4gF~Mtr>KJ?J#MThKo0e>tY-2eyMD`x#_WO(P9M4%l+dx8g*{mcpxnuEa zgZMu7|I(9_*WSy2du30v8#bUp_+cQ5D8fSa$-YJvMrca5#J#-3#ec^YVQAc? z3$3Y2e&^`YoBP@UTWK-!=1SoNB-v;|ze5iQSlz#{I3+zh&?Hb_;)@s#N) z)DWs`c<$VkI#AB-fut%FR(wN!*WXjt+9wOT+`^v?PWQWXuxs8K? z!>e%R%Lp&6>g7XN)G&#j2xPC>FkDG_^J?c8@o6X-GNHBS&@C1vmmUEnXqCHmZzwdq zGp{SJfAqtrBE$UR26D5Y_Mx#m1Nv@9BoYtQ?O$2fAXk5FP<+KhHDuK#Ga)o9vQ8pD zM@}vv9}nqja-kLKpK?3PB@N_NDIC+(_{Ry(ZDz9<8b<(W72BzeO-HGIFycq zhInv}o3jl947OPlaxW=3a;?||XE}0gdrc(W(al$Ah0E~H2D`@5>AS3~o;d}F zj0lY%U^F*J7%;Hrm~2MjD+Z!(8K#`{2zLZdGY$? zogLZ7@Nf|)$Ie)p9rIbO!jv|xD^I`o#1nvI|8vP)+#<&E!DSY(zWorh<9~{9&|mdh1K&t9BZKZgx9MO4$@=vp zGuQtl>vhmeZS8vNa;dLiDiB!?u62$f9Q^$4qWPlH<9x=3uE}8R;92s=Oa!S24QS;7T(bU3~gZ96IDR9p|fjR4rWCf0b2~ zL(RVOq*Oy`OTMynJl0o#`#Sj1`GLJiG!0c8BEqRye>meX%j_IF?uB3gCr z`k&WVUch4SH5l6O-5i@0Qej{0%#Zf@+@$P~KkqvUn@6NlFo`gi#*~GfEae#@&&)!y zz5vPyU(Fe5t2!RH4;eqM9kphQhjkd`WYnyRXw4v5L=CNc7YgG+Uu&4lifT+a)y5Xm$uRs*+g|g(o&23{Q)C zspv(d+-rB-)uy641SF4cXzJDFDSYU!X6ZWBX3=G<(OaNZgGn51Md{P~Mamxu$4u)w z<(dK6AV~stf@Ys7kNU-;@DaXwBFuRwFX-tvh4ygYQ0XX{o+lw+gsaA7Z)vlOe-zDX zi&!)Op#!UElH!_m3g+y3d*^p8BDP9A!Gp3SD+u0%@8+|o z)_mW%O)j>+Ix|LC7RlXWG8Puti$rZ14i99XAeYa`<6ke%A<<=^v$Sbq@Z4_#NMzM5l? z7?&FIwJq2l8Y*jF30_5o&ghhHOAAMz%IyxRP9J!&cT#0Jn*K=bVqMsEA69WrQ4uo; zDer|nO7FY6J&!14xrRljyn=Po?2kU!K;VFLAM+%&>Octch>{#Pi;qYVqT7{kks+)~ zs9)ZAnA8YyV_Ucv^?_4Fao=dvnCxI+79o!0E+?OJmNtir=Q9{&a1`(`-mI&0d(+{C z?f$B1P78Iu_MQWA)Qkh-0VMLNWQNa4!h_Q;%b1i4uo(7g1BR+3&wa_dt%x3QKB4m( z%zMgY*o~LaU(31_BZyzy#cjQ&qoKS^{zzh4>(-a}6${dky3+5O_4oJ04B>idT!WsB z>bUr3oYCdIV!CdTkjPvT@dpreg%%-3vQb`oyLtA7tg@!3i{g1&foPc!6SK!H^ADxv z#BhBsy}+I&d+WpdZWH9rwdhh!Oxp)=9iFe$YDeB9h5Q3orw*%Hzp8ohcjgv*{<36_ z*gC8YJ;}L_te-nqgHn~HU>6%u(E+FkyIkI#COspC%&9t z@wS#=WM0e_?}x_Oif1~w=@|@pC)FVfaw)7_ys~GRM8O#`JzG+FF&m#@@WCL%2(Aa4 z&ZDvMmGnYdC@q*c)}80k4A=WvNNk4b)wUb4D7<8BU7N0sZ(8i`926#E@Y9w<^Ki5B9qKG6 ziPQidymvhknS4W$_+YW_qf1eg?nzy!J9QC^`~)$!ziZa$;{IZMDJ*yMsH{KGOYdYg z;_IzpeYU8{q)*P>CNps$>>5?oR~HT4za=3vl z$6S&v-+3gT_~fS4HRndp;m1TCIf1l82Xj$hoWTOYd%}mQyg19|X^KexxJMSt*kGCc z`RM@fRsQ#NosiO_E=!yDO?@RyJDGvn!imjVujx7&?rGGlz(N|2j0aZ$rN`2(4w9EE z4ESSIDv5G?B9ORGjYm_*C$H2;YVlA!G1#2ojB)^#JIFl{UiuEFiSl)IzGtbr+*}qX zdeL@po3@%yJR5&6U~darH;ZEM8v0_DF|JH~>o6W+RrkdrbGm!8H!Fmn@=PuOEM~&dM%Tu+wHcD(-#o zM;U;~0Xqgw>R1WvGd0*XlI?_VlxrJ4^vfY4yITJ-c0iRT9T}yJ6efB;LK%MK_ezOz z+dUPlrhnX)dLe0UvQU8a?o(DJL|@d;oT?#%jITBMl;ykNe)rU1KGEq^3sh%4{&RBxzd?74&|#ecvIxV)SHIVb=#zj*TqE*+uXvGqPiR+Za`ER+PIPoBz{9zOUKi+ z=KsnG-Zoo0zR@`Mm(sE>Ey!JJwK15fmyCT+?>`Y zTKDp6`*`RtXOlk|01aH0RUqgmkl%cBvsPeIf%-Ym^c%dp>CZw2eW#qVjCc7)jOe1$far&D=*|myNjaxMf{xVVQ za9a!=cfc}n@=~S5Vhw#hHGDvg8%{&Q$MW~?;I)8Fba^3!3Sd9kTA!k81)rEjg!ZXp z_&Z)1PL~NI(v_Db`thdhZBlIhz-M>eEOH&7YC9sHH>V$;I98z&&w&5Yt}J~A`k;!i zmq5!Rx5w$Kbd?*j|5we!t&KWF|JC+G3T9v{%-KHim((Es*^zFz32(r-%5at1Rav9- z+0UCSS23rA7YE7RvEO~Q?Q4Z$;=F~?zr3w13}itj59uBjCZlYFvD1886yvCXFsL`4 zCweAgc#q)W?v9z?W;&Ds%ygTTnew0iFLpWrs-%GZ^Z)nt&v8Wo zc&{Dw1@KqF!UP~(2Mvx$i8IdV&jyv|P#bO!^Y6@~A<2Oyi=4pp2#M?qN*%UbR;&mK1T zSF#wVZ2u8bYXhn(MhibQ$_)n8T@6hY6W`<2pMgo%hJL50rib&LhG)*N&Ozso|DhMvT3P%Aj<)Jh!< z5SpS#6HDT8YC{-H+9js4C7`C(w6Jbp4iw|Y*&-(0Z>MzD1CY~~a{!DA^ah`{n(W5b zE5_|Z5OQNwUh`4y762;s<6wVK$YqfMK&WthY3@Ihbd)k)jYLp(e-IIHN&%;dv}JK$ z;&esH!lk)l!roidzDHEgekf1ds57H=$>~$41sm&+5EBnoz!ww^aABSqdQ);MF!R;z z{jF(G%8S!h6wawCrzO$e09gerIaeE!!BoOXl0eLjofVZ^Q% zd|=qoWs$QY5Li9`>ddzcy`X)84I>2wfWDptp|Lpm6$Nv;)5k-P7TjE>f0StL(7Z@qrcrywEeCgIw>}>x1blW7WeHE=ipkms=fP>&3K&M;%a#Gf+Au_U`m6?OCs5BQEnx zQ5vcFxmvK`4i#s`CapoDfV06(ib`rd5=*^;Goo1jpxLd}U9S~Pc8!V%f%xIGSEXyB zqz0Zw73anJ2oykrns#~@Fpf#V54b9B-;V!av%Af=DqI%GTe)AOm!Q9w*rW28nq;SH zy52r%`m8;gIhea1Vv@36ZFq0%jLLn)=yunsY-z~G>G3eK`|jG#Hjk+}QS#`%Xt1J3 z(tt6o?%JapXX~-^ad;p8KzT|S8hFCZgzQ`?Fk@sJ*nE&jT@G)_dCVEAw-p&^8doEl z^k!q&69G_8@X(?DXwejO#|W`6Bc5Ci9;A`5u>i%tR4(#AB|sme5NWxezapVIwQt>r z^*tC1=0N4j4V1pmM!6BH!_2M@&lQa;lsNoC5HM|~zX?EK__;EhS-+SGqbmJqefLzj zjT*5mIw=Z`tHNK}(x(xvI@fQ(mPBT%#1BpnkmtV6fR2*Mp$?@<=278@(F5R;q?)yW zc9FDYbNeX+13rZP$tLprOxgJ4aJwC#oOb6yCq;L942r`iZ9y7cVfU(8@>oCRy6eM- z22Ou!>2()^K?7NBh%<;jTv5#!bwZVue%JDEw++GAQ@-Xa<<6-L_&pm3^#^sfVpfq*)fB*;shoA> zc?0lPl547q4f6|3x~kFlQJ&OSd~0a&-K|ZWYYfDfs$EhJ5ZmJ^U`mKi8Q;svI7Q?A z7WBJwXE!s(_v1GKLbGURV-4>jF2y1Pj0n{vl4C4?R;C|cHD+TU_U zeq{t-tU?VW1@aq$Hu7kVH?I7?@N(*lfM@%$U3b+!z2v9{6=pZa89(&sKAB8L$bQ0p zKTwtc8S~JmSpzL0*Ox!`YCU|o*aNsblak!Wtc=(k!w(?J`BRMMR7-b1E!0eLd+)R} z2lG!B$i!$$myQQ<2-5nj7tiM!o?4S-?2dRo&Cv|}3j84`vg5Nmz}y<$6MftbZEJ!b zC4{sLCu-`wcopsxsK-MA@NLdR+7{UR-E%_W!}=2~I@x)CKa2Qy3_1JaU(B%|CnlW7 z(_UD=MdbkeH#fwj=mS(sG#0Ehg@0_HG?_4*E!+ULEBCfJIfcu0q=!IwLN6Ll(`5!L zwV$!%BE*)->)g=I8`XNLrT)mo|L0<&LlC7eK2=ySjJVk${D9{VxlS&qB%Lk~1!7k7AL#`+Lqnj&0%oE#l#yJ1qES^)>VckM`y9po3!SL@0@yV+%Ac+SrKpXy6R6H^ znnoO$q%^U|`Vrbu8`E0>db7;*5;-`1Bb6+EU1sC-mfyfjw;txjt;eRG$UT*_YWGrn zq$!}KC7|$)q_sTGBGQ;1DG_-5%-^`Q^Ipv@xf@P?N1cWNHc=XFo;8-D*H}IYWNpL? zYJtLic;Z}7k-wVDDL;3DlfB6`tI>t177(2>U8}9x9$Bn-cY623NKkK zv5(!WntxkFF+U(NIW=6rU)~Z*!YGbc(?V7iCAitLBi&b0MP1TRQMtdGgNX4S97u1^ z{R~lu2Nh|xj4M(4a0K5-w$k7!=o#vXIKFx%#Z%;Q)||J!Z-@0+NPRJ(!!U{`e9Ard ztHaw#k7==a)M{FalwC)YhIDDWq1)>P&+CsF{Qv06OzBkLyKX`C=unkx>Ko;4JdOHo zce${JvhAF(xmisyWFJ3$t>brfb%i-XNwUQi>GQ@Pewj-elhmWTKettpX) zC$pq8Lf`*6lFF=TW1gFM?=MUexrT8pU*cp4k&+lnU2F0#uj%x+EQE*muT<>D5awjE z5+A-c-P^kaI3ZVGH!b~`wN^N*XntsSY^oflkkav<-@tAM(g?$dHOxW?RG-B1Zi_{N zMo1k-Rv1=H5G|S-rS&~)?ORow(O$>uYKac;-NY|;T`4Cqov<6p#14e_g0_c@!*nGI z6Bf6M53kVH(KBe5TWf?R?%d5ZU#7+EXEKm*is7$5GTB?T9y_dd_vJtG8jzqrB$q`( zzq5r~`LA$iJc__$E8QOb=6ZT~as2EQ0KnHy?5{Ece>~=AX&#_1H*i=_>zijxr@+R3 z>tCwadrRcJ4tAwe5Rj681qN4-H9tKM{DbzXLr(c#iaEW5> z%l(y#^l3J;&9Ic1Qo-$xsOBi>yIQ=3jVylg$^P7McwL|pDQfj?=h4yQFiLz3{Dewh z-XX(l!*)juN{9`ogp~0e8+u`nO)5ouHxY4+AyA+wN4sb|V-mEPxYWpI!olZMzJ*iVsay!?^%Z_`Oo~{VY$(~hRVQFtx3KjQe~_0o4QSpJG{yb&WGZwKukTT&92a9R1GZyFnr-nfLl54hbb z;Jz})Bv>39=?;yjd2!GeFq8E}2YgzI-Nmnlvmwb-tl6Zo!5*vy26e(XHzf`hUOef~ zQq#F|WGYYVY7#ZekqeRUCZ7JVB(AgP)r@YsJM&%&v5P>Sa;zyuN^uGk=nC7|*hC}G zP=zy+#12YjEPFLav(^I^pk3HU!2I!mrP6MxobG4nFpbYTVNTiFiG64AH!A10+bf@l zXyxaYXu25f*oCPPz`^>M;c~K>B9jQ^nFi(!-Ox$GRs1Nwvn9V9ULtO*w_fH$wLmwk zzdTASBzM**(~Em~C>?T9mHjQg#dM**C;f5tw>(86Tj!Vf>ah0#uQ#sCkHM-B?qhdt z*F?__=e~}J^(4O-QM_egkmhoZU!K?l`Xjvd{ZM(`P-^?AZ%?cC?ULvjhS9GLgc5<- z9pnJV2+XcYSj2suO!@=#IDJHb#}EoxFkkbc67_VnY=wQBb~`*S!#VjieV&Zwl2hAv z;{-o8^o$58f$;bGcocgZiR_mF5cWr$Yk+(~ zl#M)vRGx9>f7k&m?*MCyA5*CmY^Hk{v_(V&+U*LrvHo>idNr{|-i~R`TV00EF20fs z0XfasL##fr{|v`Y1|%c@@7Jda;~oYcpv9Zpjru4RFA(j(Q7%l!Vcry$yA zkDK!y=rYM?Jh(}&{j%+4Rs;N{u^o5MK-(~8(2dEw#Cf5kgZ$Q=i}c3-GMwZ@He98J zDf_;#H*WfAiFrfzLPv5uc|L4y`=C<&ItWqm`vV>U0nph?@i(yspk~nRNBW)552T#A zE|+0<03wd)9^XxuFN=}$;569HdOSkAk)t1F!XS*mAJ*9cL>J6}8rb7Ep$N6GYuhIu zk<7IX(3WARh0=imv?W&<%GZtC155%$T8g{5*&ubba2<&Uh_1QPCW;R^ddw zk0vWqtP zkcJxE^adRfE%xgYATQ9Kt@GK@5;K~Hgyk5-b(oRIgM~x~R)E%`9e76X)&X6^17%%a zANEBvCp!;7$dWcOQf%^~;S^QqN8RW|13&j4r5gCeiyZ&yES!9;-vY6NV!UN&*FaP2qAd5N#J)V zW$6Pt++Clw-JWeWV(i(5xEf%WBDso}z5RZ^pk;U(%Z^(B-I_Q<)ArCo1~#hE@c_X* zm^f%Fkft9wdCk6ZCa9=Cq5B+AI5CiefKGOg@pmuw)s{%wl&(clNZ9n*KH_W6B;ba8 zQ)!RiN_gjy?OttKbAtB!2<#8o#a|8Tc>Uu1P=nCuM2C8zGCrfmm%T#@0+YAKJQ^?s zLz~e~__qw`Ex+Bw>6beNt@P6#6mbAOa_za_!^n7URsG{c*}|b$*#MagHIVt5}%Fc$lt3P)s@(Tx~z5S zi+1T&GqZ#F=(t_Ys)doIzr`-_YFf+_7FsIMVFGjLK&|tB-Igz>5ODmQR}TTH5JjUw z^WMHLW#pt$jrm)Cz@K5G<>i{tYU;F}pYCLny{p6SzBa^BwU}U2LZy#blXnS6Ri^+> zQtJ_WYjMczq9x5DZ5N)IpOk3{K*)nM^usC zVpp?r{1csZKqncBxG*X{+JAeA&g%u>dUh^=K7cP$cUFz+w>8_ywn)VB=^eVta7y22 zSkTn*CwUDo(<67w)JOBpGe0!H^|ygHA7Cg3)h2Qs}QNpix#8nhc%Uoq0olXgLe zl472Ok%hfMTf#-i#D_S;4KAYOrZj_iqQ@`GU`;(DGN5=r1>K< zMW)z-`JE;}<6c!`-L|H)=CaCTim&b*m8W_c*tt+cJN84^p@JII{vFVmb_r#jjp+ZR zARg^X0lyp;9x+R|{?nQ25VRUpcE(Dt-1)*2Ax0Sw;h&;eS=z7V7<|~m77iE(t_Oee zbaW!=>zUjDK^N@Sn#`AS6G1Bj>bnZJ)VZeU2brrsLHCSxT(~&Amw2#mARj!>A}7 z`pPQhDG@Wns@JFli`qA0R=7E~TRCD4?xJS+tfG-(L#HP|o!vT);(T_>o*L*NdY4aM z$poHqW$lF@T5*UMwVZ}g;SZV++9$&o@7L)M=7vGOs7#QuuJKPUo!Aw2ukDEAWET&% zK12~-z103jm>c+yiP0`wDmSi{=^+UOA}nskV|Q}=H*&Ml%4*K;vqACBZB~e!3WIQD z^GE0+4PZ_BY2U2XT{u<=IJ~0K#51+4^eu=cJ6ja{&<^!kXPVGVOLyiQETun2AZ?eNPF%pH@+NMWEpqkV7 z7ZV^6lLb|0DeJ%(cyOh~yT2eX4?4!~eX2JTSHG88RI*Y6=bT%~N=aTX8&FJ3zVlj; zetV4@_AH{g5b?she6WzX7^k#Y@)rneLNxD9+K&lN^-#8`Y1egFrdjx(7@ngH{WE^? z*p3walzV-6Edz=@TxdwEY0||?@k>ncpmpL5goXe1UtfCA)nihapMU)n*p(8rhc$ki zFFLF8L91d5LkDAw^(9*0^!${N@D0*g%3sQ|1&G@|-DZoH_J-LXi@6}bw~D0*=Ehio zl@1VJa_^tp4;98-q3{LfAHTPt{M`d2#j&~nyvHMN8_P4+Pf!&Q1bzQ4MM456*ZPOb zhRL2w#uO$;v7ip-X|?szmp@)`D(F=iR4hpK8J*N=&}9BWA}+z^3Aok*HM&Opy>=G^ z^D7LB_gJa^t=A}vz0z~PB9>|ay`p7Y7!LV$$E&%~pqnxO3V8F8?p2M)4g#p%a6pr0 zHAmC`53$mMBJc_}d7hjD{g}h_0}4A7QbX2%z1r<5Qw%LMnE6SKFZXY%d4vkM0bOa2 zwb5_RDA|x3l7yp!N&JBH!lxj4^4x-q%~6${=s#IRV_>F3UeLQ;8jKgI>ugDIKfEOM zp#SkC&|jsJfjCEV>J#cqsdw=^);B5RQg#nNPBH@sOqa + + + +WARNING +WARNING +WARNING +WARNING +WARNING + +

PLEASE NOTE: This document applies to the HEAD of the source tree

+ +If you are using a released version of Kubernetes, you should +refer to the docs that go with that version. + +Documentation for other releases can be found at +[releases.k8s.io](http://releases.k8s.io). + +-- + + + + + +# Kubelet: Pod Lifecycle Event Generator (PLEG) + +In Kubernetes, Kubelet is a per-node daemon that manages the pods on the node, +driving the pod states to match their pod specifications (specs). To achieve +this, Kubelet needs to react to changes in both (1) pod specs and (2) the +container states. For the former, Kubelet watches the pod specs changes from +multiple sources; for the latter, Kubelet polls the container runtime +periodically (e.g., 10s) for the latest states for all containers. + +Polling incurs non-negligible overhead as the number of pods/containers increases, +and is exacerbated by Kubelet's parallelism -- one worker (goroutine) per pod, which +queries the container runtime individually. Periodic, concurrent, large number +of requests causes high CPU usage spikes (even when there is no spec/state +change), poor performance, and reliability problems due to overwhelmed container +runtime. Ultimately, it limits Kubelet's scalability. + +(Related issues reported by users: [#10451](https://issues.k8s.io/10451), +[#12099](https://issues.k8s.io/12099), [#12082](https://issues.k8s.io/12082)) + +## Goals and Requirements + +The goal of this proposal is to improve Kubelet's scalability and performance +by lowering the pod management overhead. + - Reduce unnecessary work during inactivity (no spec/state changes) + - Lower the concurrent requests to the container runtime. + +The design should be generic so that it can support different container runtimes +(e.g., Docker and rkt). + +## Overview + +This proposal aims to replace the periodic polling with a pod lifecycle event +watcher. + +![pleg](pleg.png) + +## Pod Lifecycle Event + +A pod lifecycle event interprets the underlying container state change at the +pod-level abstraction, making it container-runtime-agnostic. The abstraction +shields Kubelet from the runtime specifics. + +```go +type PodLifeCycleEventType string + +const ( + ContainerStarted PodLifeCycleEventType = "ContainerStarted" + ContainerStopped PodLifeCycleEventType = "ContainerStopped" + NetworkSetupCompleted PodLifeCycleEventType = "NetworkSetupCompleted" + NetworkFailed PodLifeCycleEventType = "NetworkFailed" +) + +// PodLifecycleEvent is an event reflects the change of the pod state. +type PodLifecycleEvent struct { + // The pod ID. + ID types.UID + // The type of the event. + Type PodLifeCycleEventType + // The accompanied data which varies based on the event type. + Data interface{} +} +``` + +Using Docker as an example, starting of a POD infra container would be +translated to a NetworkSetupCompleted`pod lifecycle event. + + +## Detect Changes in Container States Via Relisting + +In order to generate pod lifecycle events, PLEG needs to detect changes in +container states. We can achieve this by periodically relisting all containers +(e.g., docker ps). Although this is similar to Kubelet's polling today, it will +only be performed by a single thread (PLEG). This means that we still +benefit from not having all pod workers hitting the container runtime +concurrently. Moreover, only the relevant pod worker would be woken up +to perform a sync. + +The upside of relying on relisting is that it is container runtime-agnostic, +and requires no external dependency. + +### Relist period + +The shorter the relist period is, the sooner that Kubelet can detect the +change. Shorter relist period also implies higher cpu usage. Moreover, the +relist latency depends on the underlying container runtime, and usually +increases as the number of containers/pods grows. We should set a default +relist period based on measurements. Regardless of what period we set, it will +likely be significantly shorter than the current pod sync period (10s), i.e., +Kubelet will detect container changes sooner. + + +## Impact on the Pod Worker Control Flow + +Kubelet is responsible for dispatching an event to the appropriate pod +worker based on the pod ID. Only one pod worker would be woken up for +each event. + +Today, the pod syncing routine in Kubelet is idempotent as it always +examines the pod state and the spec, and tries to drive to state to +match the spec by performing a series of operations. It should be +noted that this proposal does not intend to change this property -- +the sync pod routine would still perform all necessary checks, +regardless of the event type. This trades some efficiency for +reliability and eliminate the need to build a state machine that is +compatible with different runtimes. + +## Leverage Upstream Container Events + +Instead of relying on relisting, PLEG can leverage other components which +provide container events, and translate these events into pod lifecycle +events. This will further improve Kubelet's responsiveness and reduce the +resource usage caused by frequent relisting. + +The upstream container events can come from: + +(1). *Event stream provided by each container runtime* + +Docker's API exposes an [event +stream](https://docs.docker.com/reference/api/docker_remote_api_v1.17/#monitor-docker-s-events). +Nonetheless, rkt does not support this yet, but they will eventually support it +(see [coreos/rkt#1193](https://github.com/coreos/rkt/issues/1193)). + +(2). *cgroups event stream by cAdvisor* + +cAdvisor is integrated in Kubelet to provide container stats. It watches cgroups +containers using inotify and exposes an event stream. Even though it does not +support rkt yet, it should be straightforward to add such a support. + +Option (1) may provide richer sets of events, but option (2) has the advantage +to be more universal across runtimes, as long as the container runtime uses +cgroups. Regardless of what one chooses to implement now, the container event +stream should be easily swappable with a clearly defined interface. + +Note that we cannot solely rely on the upstream container events due to the +possibility of missing events. PLEG should relist infrequently to ensure no +events are missed. + +## Generate Expected Events + +*This is optional for PLEGs which performs only relisting, but required for +PLEGs that watch upstream events.* + +A pod worker's actions could lead to pod lifecycle events (e.g., +create/kill a container), which the worker would not observe until +later. The pod worker should ignore such events to avoid unnecessary +work. + +For example, assume a pod has two containers, A and B. The worker + + - Creates container A + - Receives an event `(ContainerStopped, B)` + - Receives an event `(ContainerStarted, A)` + + +The worker should ignore the `(ContainerStarted, A)` event since it is +expected. Arguably, the worker could process `(ContainerStopped, B)` +as soon as it receives the event, before observing the creation of +A. However, it is desirable to wait until the expected event +`(ContainerStarted, A)` is observed to keep a consistent per-pod view +at the worker. Therefore, the control flow of a single pod worker +should adhere to the following rules: + +1. Pod worker should process the events sequentially. +2. Pod worker should not start syncing until it observes the outcome of its own + actions in the last sync to maintain a consistent view. + +In other words, a pod worker should record the expected events, and +only wake up to perform the next sync until all expectations are met. + + - Creates container A, records an expected event `(ContainerStarted, A)` + - Receives `(ContainerStopped, B)`; stores the event and goes back to sleep. + - Receives `(ContainerStarted, A)`; clears the expectation. Proceeds to handle + `(ContainerStopped, B)`. + +We should set an expiration time for each expected events to prevent the worker +from being stalled indefinitely by missing events. + +## TODOs for v1.2 + +For v1.2, we will add a generic PLEG which relists periodically, and leave +adopting container events for future work. We will also *not* implement the +optimization that generate and filters out expected events to minimize +redundant syncs. + +- Add a generic PLEG using relisting. Modify the container runtime interface + to provide all necessary information to detect container state changes + in `GetPods()` (#13571). + +- Benchmark docker to adjust relising frequency. + +- Fix/adapt features that rely on frequent, periodic pod syncing. + * Liveness/Readiness probing: Create a separate probing manager using + explicitly container probing period [#10878](https://issues.k8s.io/10878). + * Instruct pod workers to set up a wake-up call if syncing failed, so that + it can retry. + + + + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/proposals/pod-lifecycle-event-generator.md?pixel)]() + From 7944fa01ec013ed97ba12e88c750f4146589e60a Mon Sep 17 00:00:00 2001 From: Eric Tune Date: Fri, 22 Jan 2016 09:55:39 -0800 Subject: [PATCH 006/328] Disable flaky test. --- hack/test-cmd.sh | 55 +++++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/hack/test-cmd.sh b/hack/test-cmd.sh index 61bdb3a2a6e..c97717dba9e 100755 --- a/hack/test-cmd.sh +++ b/hack/test-cmd.sh @@ -33,6 +33,7 @@ function stop-proxy() PROXY_PORT= } + # Starts "kubect proxy" to test the client proxy. $1: api_prefix function start-proxy() { @@ -235,32 +236,34 @@ runTests() { ####################### # kubectl local proxy # ####################### - - # Make sure the UI can be proxied - start-proxy - check-curl-proxy-code /ui 301 - check-curl-proxy-code /metrics 200 - check-curl-proxy-code /api/ui 404 - if [[ -n "${version}" ]]; then - check-curl-proxy-code /api/${version}/namespaces 200 - fi - check-curl-proxy-code /static/ 200 - stop-proxy - - # Make sure the in-development api is accessible by default - start-proxy - check-curl-proxy-code /apis 200 - check-curl-proxy-code /apis/extensions/ 200 - stop-proxy - - # Custom paths let you see everything. - start-proxy /custom - check-curl-proxy-code /custom/ui 301 - check-curl-proxy-code /custom/metrics 200 - if [[ -n "${version}" ]]; then - check-curl-proxy-code /custom/api/${version}/namespaces 200 - fi - stop-proxy +# This next block disabled until non-racy solution to +# port allocation can be found (#19999). +# +# # Make sure the UI can be proxied +# start-proxy +# check-curl-proxy-code /ui 301 +# check-curl-proxy-code /metrics 200 +# check-curl-proxy-code /api/ui 404 +# if [[ -n "${version}" ]]; then +# check-curl-proxy-code /api/${version}/namespaces 200 +# fi +# check-curl-proxy-code /static/ 200 +# stop-proxy +# +# # Make sure the in-development api is accessible by default +# start-proxy +# check-curl-proxy-code /apis 200 +# check-curl-proxy-code /apis/extensions/ 200 +# stop-proxy +# +# # Custom paths let you see everything. +# start-proxy /custom +# check-curl-proxy-code /custom/ui 301 +# check-curl-proxy-code /custom/metrics 200 +# if [[ -n "${version}" ]]; then +# check-curl-proxy-code /custom/api/${version}/namespaces 200 +# fi +# stop-proxy ########################### # POD creation / deletion # From a2f68e2591f5e900827e6b65f0e28091c30ce2af Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Sun, 24 Jan 2016 19:08:20 -0500 Subject: [PATCH 007/328] Move the loader file log level to v(6) It's extremely rare that a user *must* have this, and we typically test and verify at V(5) to get debugging info, which clogs up e2e output. --- pkg/client/unversioned/clientcmd/loader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/client/unversioned/clientcmd/loader.go b/pkg/client/unversioned/clientcmd/loader.go index 42f1210d5b0..135aacf688c 100644 --- a/pkg/client/unversioned/clientcmd/loader.go +++ b/pkg/client/unversioned/clientcmd/loader.go @@ -226,7 +226,7 @@ func LoadFromFile(filename string) (*clientcmdapi.Config, error) { if err != nil { return nil, err } - glog.V(3).Infoln("Config loaded from file", filename) + glog.V(6).Infoln("Config loaded from file", filename) // set LocationOfOrigin on every Cluster, User, and Context for key, obj := range config.AuthInfos { From 6cd10d4f8724b550cffce581a965d132f3b448fb Mon Sep 17 00:00:00 2001 From: Julian Strobl Date: Mon, 11 Jan 2016 15:26:44 +0100 Subject: [PATCH 008/328] add container names kubectl logs output Present a list of container names one can choose from. --- pkg/registry/pod/strategy.go | 26 ++++++++++++++++++++++---- pkg/registry/pod/strategy_test.go | 2 +- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/pkg/registry/pod/strategy.go b/pkg/registry/pod/strategy.go index 4e957fd1eb7..ffdeb988ef1 100644 --- a/pkg/registry/pod/strategy.go +++ b/pkg/registry/pod/strategy.go @@ -22,6 +22,7 @@ import ( "net/http" "net/url" "strconv" + "strings" "time" "k8s.io/kubernetes/pkg/api" @@ -231,6 +232,15 @@ func ResourceLocation(getter ResourceGetter, rt http.RoundTripper, ctx api.Conte return loc, rt, nil } +// getContainerNames returns a formatted string containing the container names +func getContainerNames(pod *api.Pod) string { + names := []string{} + for _, c := range pod.Spec.Containers { + names = append(names, c.Name) + } + return strings.Join(names, " ") +} + // LogLocation returns the log URL for a pod container. If opts.Container is blank // and only one container is present in the pod, that container is used. func LogLocation( @@ -249,10 +259,14 @@ func LogLocation( // If a container was provided, it must be valid container := opts.Container if len(container) == 0 { - if len(pod.Spec.Containers) == 1 { + switch len(pod.Spec.Containers) { + case 1: container = pod.Spec.Containers[0].Name - } else { + case 0: return nil, nil, errors.NewBadRequest(fmt.Sprintf("a container name must be specified for pod %s", name)) + default: + containerNames := getContainerNames(pod) + return nil, nil, errors.NewBadRequest(fmt.Sprintf("a container name must be specified for pod %s, choose one of: [%s]", name, containerNames)) } } else { if !podHasContainerWithName(pod, container) { @@ -386,10 +400,14 @@ func streamLocation( // Try to figure out a container // If a container was provided, it must be valid if container == "" { - if len(pod.Spec.Containers) == 1 { + switch len(pod.Spec.Containers) { + case 1: container = pod.Spec.Containers[0].Name - } else { + case 0: return nil, nil, errors.NewBadRequest(fmt.Sprintf("a container name must be specified for pod %s", name)) + default: + containerNames := getContainerNames(pod) + return nil, nil, errors.NewBadRequest(fmt.Sprintf("a container name must be specified for pod %s, choose one of: [%s]", name, containerNames)) } } else { if !podHasContainerWithName(pod, container) { diff --git a/pkg/registry/pod/strategy_test.go b/pkg/registry/pod/strategy_test.go index 17e746dd9b2..08ed1680e18 100644 --- a/pkg/registry/pod/strategy_test.go +++ b/pkg/registry/pod/strategy_test.go @@ -129,7 +129,7 @@ func TestCheckLogLocation(t *testing.T) { Status: api.PodStatus{}, }, opts: &api.PodLogOptions{}, - expectedErr: errors.NewBadRequest("a container name must be specified for pod test"), + expectedErr: errors.NewBadRequest("a container name must be specified for pod test, choose one of: [container1 container2]"), }, { in: &api.Pod{ From 190c829ac5e5aa628e613a635af9e7ac153108ab Mon Sep 17 00:00:00 2001 From: Dogan Narinc and James Ravn Date: Tue, 26 Jan 2016 11:01:15 +0000 Subject: [PATCH 009/328] Fix AWS ip permission comparison on security group Change isEqualIPPermission to consider the entire list of security group ids on when checking if a security group id has already been added. This is used for example when adding and removing ingress rules to the cluster nodes from an elastic load balancer. Without this, once there are multiple load balancers, the method as it stands incorrectly returns false even if the security group id is in the list of group ids. This causes a few problems: dangling security groups which fill up an account's limit since they don't get removed, and inability to recreate load balancers in certain situations (receiving an InvalidPermission.Duplicate from AWS when adding the same security group). --- pkg/cloudprovider/providers/aws/aws.go | 31 +++++++--- pkg/cloudprovider/providers/aws/aws_test.go | 67 +++++++++++++++++++++ 2 files changed, 88 insertions(+), 10 deletions(-) diff --git a/pkg/cloudprovider/providers/aws/aws.go b/pkg/cloudprovider/providers/aws/aws.go index d2114e54c1f..fac2fe1e35f 100644 --- a/pkg/cloudprovider/providers/aws/aws.go +++ b/pkg/cloudprovider/providers/aws/aws.go @@ -1447,23 +1447,32 @@ func isEqualIPPermission(l, r *ec2.IpPermission, compareGroupUserIDs bool) bool } } - if len(l.UserIdGroupPairs) != len(r.UserIdGroupPairs) { - return false - } - for j := range l.UserIdGroupPairs { - if !isEqualStringPointer(l.UserIdGroupPairs[j].GroupId, r.UserIdGroupPairs[j].GroupId) { - return false - } - if compareGroupUserIDs { - if !isEqualStringPointer(l.UserIdGroupPairs[j].UserId, r.UserIdGroupPairs[j].UserId) { - return false + for _, leftPair := range l.UserIdGroupPairs { + for _, rightPair := range r.UserIdGroupPairs { + if isEqualUserGroupPair(leftPair, rightPair, compareGroupUserIDs) { + return true } } + return false } return true } +func isEqualUserGroupPair(l, r *ec2.UserIdGroupPair, compareGroupUserIDs bool) bool { + if isEqualStringPointer(l.GroupId, r.GroupId) { + if compareGroupUserIDs { + if isEqualStringPointer(l.UserId, r.UserId) { + return true + } + } else { + return true + } + } + + return false +} + // Makes sure the security group includes the specified permissions // Returns true if and only if changes were made // The security group must already exist @@ -1478,6 +1487,8 @@ func (s *AWSCloud) ensureSecurityGroupIngress(securityGroupId string, addPermiss return false, fmt.Errorf("security group not found: %s", securityGroupId) } + glog.V(2).Infof("Existing security group ingress: %s %v", securityGroupId, group.IpPermissions) + changes := []*ec2.IpPermission{} for _, addPermission := range addPermissions { hasUserID := false diff --git a/pkg/cloudprovider/providers/aws/aws_test.go b/pkg/cloudprovider/providers/aws/aws_test.go index 44d701d2347..c604a36872a 100644 --- a/pkg/cloudprovider/providers/aws/aws_test.go +++ b/pkg/cloudprovider/providers/aws/aws_test.go @@ -799,3 +799,70 @@ func TestSubnetIDsinVPC(t *testing.T) { } } + +func TestIsEqualIPPermissionHandlesMultipleGroupIds(t *testing.T) { + oldIpPermission := ec2.IpPermission { + UserIdGroupPairs: []*ec2.UserIdGroupPair { + &ec2.UserIdGroupPair{GroupId: aws.String("firstGroupId")}, + &ec2.UserIdGroupPair{GroupId: aws.String("secondGroupId")}, + &ec2.UserIdGroupPair{GroupId: aws.String("thirdGroupId")}, + }, + } + + existingIpPermission := ec2.IpPermission { + UserIdGroupPairs: []*ec2.UserIdGroupPair { + &ec2.UserIdGroupPair{GroupId: aws.String("secondGroupId")}, + }, + } + + newIpPermission := ec2.IpPermission { + UserIdGroupPairs: []*ec2.UserIdGroupPair { + &ec2.UserIdGroupPair{GroupId: aws.String("fourthGroupId")}, + }, + } + + + equals := isEqualIPPermission(&existingIpPermission, &oldIpPermission, false) + if !equals { + t.Errorf("Should have been considered equal since first is in the second array of groups") + } + + equals = isEqualIPPermission(&newIpPermission, &oldIpPermission, false) + if equals { + t.Errorf("Should have not been considered equal since first is not in the second array of groups") + } + +} + +func TestIsEqualIPPermissionHandlesMultipleGroupIdsWithUserIds(t *testing.T) { + oldIpPermission := ec2.IpPermission { + UserIdGroupPairs: []*ec2.UserIdGroupPair { + &ec2.UserIdGroupPair{GroupId: aws.String("firstGroupId"), UserId: aws.String("firstUserId")}, + &ec2.UserIdGroupPair{GroupId: aws.String("secondGroupId"), UserId: aws.String("secondUserId")}, + &ec2.UserIdGroupPair{GroupId: aws.String("thirdGroupId"), UserId: aws.String("thirdUserId")}, + }, + } + + existingIpPermission := ec2.IpPermission { + UserIdGroupPairs: []*ec2.UserIdGroupPair { + &ec2.UserIdGroupPair{GroupId: aws.String("secondGroupId"), UserId: aws.String("secondUserId")}, + }, + } + + newIpPermission := ec2.IpPermission { + UserIdGroupPairs: []*ec2.UserIdGroupPair { + &ec2.UserIdGroupPair{GroupId: aws.String("secondGroupId"), UserId: aws.String("anotherUserId")}, + }, + } + + + equals := isEqualIPPermission(&existingIpPermission, &oldIpPermission, true) + if !equals { + t.Errorf("Should have been considered equal since first is in the second array of groups") + } + + equals = isEqualIPPermission(&newIpPermission, &oldIpPermission, true) + if equals { + t.Errorf("Should have not been considered equal since first is not in the second array of groups") + } +} From b4bbc3b3efe636004a0111e0b7704a40e8b971c9 Mon Sep 17 00:00:00 2001 From: James Ravn Date: Tue, 26 Jan 2016 13:57:52 +0000 Subject: [PATCH 010/328] Fix removal of aws security group ingress The ip permission method now checks for containment, not equality, so order of parameters matter. This change fixes `removeSecurityGroupIngress` to pass in the removal permission first to compare against the existing permission. --- pkg/cloudprovider/providers/aws/aws.go | 26 +++++++++++---------- pkg/cloudprovider/providers/aws/aws_test.go | 13 +++++------ 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/pkg/cloudprovider/providers/aws/aws.go b/pkg/cloudprovider/providers/aws/aws.go index fac2fe1e35f..33e1fc2f316 100644 --- a/pkg/cloudprovider/providers/aws/aws.go +++ b/pkg/cloudprovider/providers/aws/aws.go @@ -1418,6 +1418,7 @@ func isEqualIntPointer(l, r *int64) bool { } return *l == *r } + func isEqualStringPointer(l, r *string) bool { if l == nil { return r == nil @@ -1428,27 +1429,27 @@ func isEqualStringPointer(l, r *string) bool { return *l == *r } -func isEqualIPPermission(l, r *ec2.IpPermission, compareGroupUserIDs bool) bool { - if !isEqualIntPointer(l.FromPort, r.FromPort) { +func ipPermissionExists(newPermission, existing *ec2.IpPermission, compareGroupUserIDs bool) bool { + if !isEqualIntPointer(newPermission.FromPort, existing.FromPort) { return false } - if !isEqualIntPointer(l.ToPort, r.ToPort) { + if !isEqualIntPointer(newPermission.ToPort, existing.ToPort) { return false } - if !isEqualStringPointer(l.IpProtocol, r.IpProtocol) { + if !isEqualStringPointer(newPermission.IpProtocol, existing.IpProtocol) { return false } - if len(l.IpRanges) != len(r.IpRanges) { + if len(newPermission.IpRanges) != len(existing.IpRanges) { return false } - for j := range l.IpRanges { - if !isEqualStringPointer(l.IpRanges[j].CidrIp, r.IpRanges[j].CidrIp) { + for j := range newPermission.IpRanges { + if !isEqualStringPointer(newPermission.IpRanges[j].CidrIp, existing.IpRanges[j].CidrIp) { return false } } - for _, leftPair := range l.UserIdGroupPairs { - for _, rightPair := range r.UserIdGroupPairs { + for _, leftPair := range newPermission.UserIdGroupPairs { + for _, rightPair := range existing.UserIdGroupPairs { if isEqualUserGroupPair(leftPair, rightPair, compareGroupUserIDs) { return true } @@ -1460,6 +1461,7 @@ func isEqualIPPermission(l, r *ec2.IpPermission, compareGroupUserIDs bool) bool } func isEqualUserGroupPair(l, r *ec2.UserIdGroupPair, compareGroupUserIDs bool) bool { + glog.V(2).Infof("Comparing %v to %v", *l.GroupId, *r.GroupId) if isEqualStringPointer(l.GroupId, r.GroupId) { if compareGroupUserIDs { if isEqualStringPointer(l.UserId, r.UserId) { @@ -1500,7 +1502,7 @@ func (s *AWSCloud) ensureSecurityGroupIngress(securityGroupId string, addPermiss found := false for _, groupPermission := range group.IpPermissions { - if isEqualIPPermission(addPermission, groupPermission, hasUserID) { + if ipPermissionExists(addPermission, groupPermission, hasUserID) { found = true break } @@ -1555,8 +1557,8 @@ func (s *AWSCloud) removeSecurityGroupIngress(securityGroupId string, removePerm var found *ec2.IpPermission for _, groupPermission := range group.IpPermissions { - if isEqualIPPermission(groupPermission, removePermission, hasUserID) { - found = groupPermission + if ipPermissionExists(removePermission, groupPermission, hasUserID) { + found = removePermission break } } diff --git a/pkg/cloudprovider/providers/aws/aws_test.go b/pkg/cloudprovider/providers/aws/aws_test.go index c604a36872a..5d46bdb356b 100644 --- a/pkg/cloudprovider/providers/aws/aws_test.go +++ b/pkg/cloudprovider/providers/aws/aws_test.go @@ -800,7 +800,7 @@ func TestSubnetIDsinVPC(t *testing.T) { } -func TestIsEqualIPPermissionHandlesMultipleGroupIds(t *testing.T) { +func TestIpPermissionExistsHandlesMultipleGroupIds(t *testing.T) { oldIpPermission := ec2.IpPermission { UserIdGroupPairs: []*ec2.UserIdGroupPair { &ec2.UserIdGroupPair{GroupId: aws.String("firstGroupId")}, @@ -822,19 +822,18 @@ func TestIsEqualIPPermissionHandlesMultipleGroupIds(t *testing.T) { } - equals := isEqualIPPermission(&existingIpPermission, &oldIpPermission, false) + equals := ipPermissionExists(&existingIpPermission, &oldIpPermission, false) if !equals { t.Errorf("Should have been considered equal since first is in the second array of groups") } - equals = isEqualIPPermission(&newIpPermission, &oldIpPermission, false) + equals = ipPermissionExists(&newIpPermission, &oldIpPermission, false) if equals { t.Errorf("Should have not been considered equal since first is not in the second array of groups") } - } -func TestIsEqualIPPermissionHandlesMultipleGroupIdsWithUserIds(t *testing.T) { +func TestIpPermissionExistsHandlesMultipleGroupIdsWithUserIds(t *testing.T) { oldIpPermission := ec2.IpPermission { UserIdGroupPairs: []*ec2.UserIdGroupPair { &ec2.UserIdGroupPair{GroupId: aws.String("firstGroupId"), UserId: aws.String("firstUserId")}, @@ -856,12 +855,12 @@ func TestIsEqualIPPermissionHandlesMultipleGroupIdsWithUserIds(t *testing.T) { } - equals := isEqualIPPermission(&existingIpPermission, &oldIpPermission, true) + equals := ipPermissionExists(&existingIpPermission, &oldIpPermission, true) if !equals { t.Errorf("Should have been considered equal since first is in the second array of groups") } - equals = isEqualIPPermission(&newIpPermission, &oldIpPermission, true) + equals = ipPermissionExists(&newIpPermission, &oldIpPermission, true) if equals { t.Errorf("Should have not been considered equal since first is not in the second array of groups") } From 45a4b4c3bb36f309c099a354fb6bee96c7def89c Mon Sep 17 00:00:00 2001 From: Ben Parees Date: Fri, 22 Jan 2016 16:47:19 -0500 Subject: [PATCH 011/328] bump(github.com/fsouza/go-dockerclient) 25bc220b299845ae5489fd19bf89c5278864b050 --- Godeps/Godeps.json | 4 ++-- .../fsouza/go-dockerclient/.travis.yml | 4 ++-- .../github.com/fsouza/go-dockerclient/AUTHORS | 2 ++ .../fsouza/go-dockerclient/image.go | 2 ++ .../fsouza/go-dockerclient/network.go | 21 ++++++++-------- .../fsouza/go-dockerclient/testing/server.go | 24 +++++++++++++++++-- 6 files changed, 41 insertions(+), 16 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 58ac1e16357..5974a8919f4 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -416,8 +416,8 @@ }, { "ImportPath": "github.com/fsouza/go-dockerclient", - "Comment": "0.2.1-728-g1399676", - "Rev": "299d728486342c894e7fafd68e3a4b89623bef1d" + "Comment": "0.2.1-860-g25bc220", + "Rev": "25bc220b299845ae5489fd19bf89c5278864b050" }, { "ImportPath": "github.com/garyburd/redigo/internal", diff --git a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/.travis.yml b/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/.travis.yml index 597b849d4c3..6b9cd96aef7 100644 --- a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/.travis.yml +++ b/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/.travis.yml @@ -3,8 +3,8 @@ sudo: required go: - 1.3.3 - 1.4.2 - - 1.5.2 - - 1.6beta1 + - 1.5.3 + - 1.6beta2 - tip env: - GOARCH=amd64 DOCKER_VERSION=1.7.1 diff --git a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/AUTHORS b/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/AUTHORS index 3359e7288c3..988849612e9 100644 --- a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/AUTHORS +++ b/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/AUTHORS @@ -12,6 +12,7 @@ Antonio Murdaca Artem Sidorenko Ben Marini Ben McCann +Ben Parees Benno van den Berg Brendan Fosberry Brian Lalor @@ -37,6 +38,7 @@ Dave Choi David Huie Dawn Chen Dinesh Subhraveti +Drew Wells Ed Elias G. Schneevoigt Erez Horev diff --git a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/image.go b/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/image.go index fd13bc23f22..47da77dbeb3 100644 --- a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/image.go +++ b/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/image.go @@ -410,6 +410,8 @@ type BuildImageOptions struct { Memory int64 `qs:"memory"` Memswap int64 `qs:"memswap"` CPUShares int64 `qs:"cpushares"` + CPUQuota int64 `qs:"cpuquota"` + CPUPeriod int64 `qs:"cpuperiod"` CPUSetCPUs string `qs:"cpusetcpus"` InputStream io.Reader `qs:"-"` OutputStream io.Writer `qs:"-"` diff --git a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/network.go b/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/network.go index 38b3432461c..30d54230a43 100644 --- a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/network.go +++ b/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/network.go @@ -17,19 +17,20 @@ var ErrNetworkAlreadyExists = errors.New("network already exists") // Network represents a network. // -// See https://goo.gl/1kmPKZ for more details. +// See https://goo.gl/6GugX3 for more details. type Network struct { Name string ID string `json:"Id"` Scope string Driver string + IPAM IPAMOptions Containers map[string]Endpoint Options map[string]string } // Endpoint contains network resources allocated and used for a container in a network // -// See https://goo.gl/1kmPKZ for more details. +// See https://goo.gl/6GugX3 for more details. type Endpoint struct { Name string ID string `json:"EndpointID"` @@ -40,7 +41,7 @@ type Endpoint struct { // ListNetworks returns all networks. // -// See https://goo.gl/1kmPKZ for more details. +// See https://goo.gl/6GugX3 for more details. func (c *Client) ListNetworks() ([]Network, error) { resp, err := c.do("GET", "/networks", doOptions{}) if err != nil { @@ -56,7 +57,7 @@ func (c *Client) ListNetworks() ([]Network, error) { // NetworkInfo returns information about a network by its ID. // -// See https://goo.gl/1kmPKZ for more details. +// See https://goo.gl/6GugX3 for more details. func (c *Client) NetworkInfo(id string) (*Network, error) { path := "/networks/" + id resp, err := c.do("GET", path, doOptions{}) @@ -77,7 +78,7 @@ func (c *Client) NetworkInfo(id string) (*Network, error) { // CreateNetworkOptions specify parameters to the CreateNetwork function and // (for now) is the expected body of the "create network" http request message // -// See https://goo.gl/1kmPKZ for more details. +// See https://goo.gl/6GugX3 for more details. type CreateNetworkOptions struct { Name string `json:"Name"` CheckDuplicate bool `json:"CheckDuplicate"` @@ -107,7 +108,7 @@ type IPAMConfig struct { // CreateNetwork creates a new network, returning the network instance, // or an error in case of failure. // -// See https://goo.gl/1kmPKZ for more details. +// See https://goo.gl/6GugX3 for more details. func (c *Client) CreateNetwork(opts CreateNetworkOptions) (*Network, error) { resp, err := c.do( "POST", @@ -144,7 +145,7 @@ func (c *Client) CreateNetwork(opts CreateNetworkOptions) (*Network, error) { // RemoveNetwork removes a network or returns an error in case of failure. // -// See https://goo.gl/1kmPKZ for more details. +// See https://goo.gl/6GugX3 for more details. func (c *Client) RemoveNetwork(id string) error { resp, err := c.do("DELETE", "/networks/"+id, doOptions{}) if err != nil { @@ -159,14 +160,14 @@ func (c *Client) RemoveNetwork(id string) error { // NetworkConnectionOptions specify parameters to the ConnectNetwork and DisconnectNetwork function. // -// See https://goo.gl/1kmPKZ for more details. +// See https://goo.gl/6GugX3 for more details. type NetworkConnectionOptions struct { Container string } // ConnectNetwork adds a container to a network or returns an error in case of failure. // -// See https://goo.gl/1kmPKZ for more details. +// See https://goo.gl/6GugX3 for more details. func (c *Client) ConnectNetwork(id string, opts NetworkConnectionOptions) error { resp, err := c.do("POST", "/networks/"+id+"/connect", doOptions{data: opts}) if err != nil { @@ -181,7 +182,7 @@ func (c *Client) ConnectNetwork(id string, opts NetworkConnectionOptions) error // DisconnectNetwork removes a container from a network or returns an error in case of failure. // -// See https://goo.gl/1kmPKZ for more details. +// See https://goo.gl/6GugX3 for more details. func (c *Client) DisconnectNetwork(id string, opts NetworkConnectionOptions) error { resp, err := c.do("POST", "/networks/"+id+"/disconnect", doOptions{data: opts}) if err != nil { diff --git a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/testing/server.go b/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/testing/server.go index 2c09f21c292..b16e713676e 100644 --- a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/testing/server.go +++ b/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/testing/server.go @@ -38,6 +38,7 @@ var nameRegexp = regexp.MustCompile(`^[a-zA-Z0-9][a-zA-Z0-9_.-]+$`) // For more details on the remote API, check http://goo.gl/G3plxW. type DockerServer struct { containers []*docker.Container + uploadedFiles map[string]string execs []*docker.ExecInspect execMut sync.RWMutex cMut sync.RWMutex @@ -89,6 +90,7 @@ func NewServer(bind string, containerChan chan<- *docker.Container, hook func(*h execCallbacks: make(map[string]func()), statsCallbacks: make(map[string]func(string) docker.Stats), customHandlers: make(map[string]http.Handler), + uploadedFiles: make(map[string]string), cChan: containerChan, } server.buildMuxer() @@ -120,6 +122,7 @@ func (s *DockerServer) buildMuxer() { s.mux.Path("/containers/{id:.*}").Methods("DELETE").HandlerFunc(s.handlerWrapper(s.removeContainer)) s.mux.Path("/containers/{id:.*}/exec").Methods("POST").HandlerFunc(s.handlerWrapper(s.createExecContainer)) s.mux.Path("/containers/{id:.*}/stats").Methods("GET").HandlerFunc(s.handlerWrapper(s.statsContainer)) + s.mux.Path("/containers/{id:.*}/archive").Methods("PUT").HandlerFunc(s.handlerWrapper(s.uploadToContainer)) s.mux.Path("/exec/{id:.*}/resize").Methods("POST").HandlerFunc(s.handlerWrapper(s.resizeExecContainer)) s.mux.Path("/exec/{id:.*}/start").Methods("POST").HandlerFunc(s.handlerWrapper(s.startExecContainer)) s.mux.Path("/exec/{id:.*}/json").Methods("GET").HandlerFunc(s.handlerWrapper(s.inspectExecContainer)) @@ -440,8 +443,8 @@ func (s *DockerServer) createContainer(w http.ResponseWriter, r *http.Request) { s.cMut.Unlock() w.WriteHeader(http.StatusCreated) s.notify(&container) - var c = struct{ ID string }{ID: container.ID} - json.NewEncoder(w).Encode(c) + + json.NewEncoder(w).Encode(container) } func (s *DockerServer) generateID() string { @@ -503,6 +506,23 @@ func (s *DockerServer) statsContainer(w http.ResponseWriter, r *http.Request) { } } +func (s *DockerServer) uploadToContainer(w http.ResponseWriter, r *http.Request) { + id := mux.Vars(r)["id"] + container, _, err := s.findContainer(id) + if err != nil { + http.Error(w, err.Error(), http.StatusNotFound) + return + } + if !container.State.Running { + w.WriteHeader(http.StatusInternalServerError) + fmt.Fprintf(w, "Container %s is not running", id) + return + } + path := r.URL.Query().Get("path") + s.uploadedFiles[id] = path + w.WriteHeader(http.StatusOK) +} + func (s *DockerServer) topContainer(w http.ResponseWriter, r *http.Request) { id := mux.Vars(r)["id"] container, _, err := s.findContainer(id) From c3383b34221bc43d952d61950ed57eeb45c14067 Mon Sep 17 00:00:00 2001 From: James Ravn Date: Tue, 26 Jan 2016 15:13:25 +0000 Subject: [PATCH 012/328] Fix formatting of aws_test.go --- pkg/cloudprovider/providers/aws/aws_test.go | 46 ++++++++++----------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/pkg/cloudprovider/providers/aws/aws_test.go b/pkg/cloudprovider/providers/aws/aws_test.go index 5d46bdb356b..0f65bde8cce 100644 --- a/pkg/cloudprovider/providers/aws/aws_test.go +++ b/pkg/cloudprovider/providers/aws/aws_test.go @@ -801,27 +801,26 @@ func TestSubnetIDsinVPC(t *testing.T) { } func TestIpPermissionExistsHandlesMultipleGroupIds(t *testing.T) { - oldIpPermission := ec2.IpPermission { - UserIdGroupPairs: []*ec2.UserIdGroupPair { - &ec2.UserIdGroupPair{GroupId: aws.String("firstGroupId")}, - &ec2.UserIdGroupPair{GroupId: aws.String("secondGroupId")}, - &ec2.UserIdGroupPair{GroupId: aws.String("thirdGroupId")}, + oldIpPermission := ec2.IpPermission{ + UserIdGroupPairs: []*ec2.UserIdGroupPair{ + {GroupId: aws.String("firstGroupId")}, + {GroupId: aws.String("secondGroupId")}, + {GroupId: aws.String("thirdGroupId")}, }, } - existingIpPermission := ec2.IpPermission { - UserIdGroupPairs: []*ec2.UserIdGroupPair { - &ec2.UserIdGroupPair{GroupId: aws.String("secondGroupId")}, + existingIpPermission := ec2.IpPermission{ + UserIdGroupPairs: []*ec2.UserIdGroupPair{ + {GroupId: aws.String("secondGroupId")}, }, } - newIpPermission := ec2.IpPermission { - UserIdGroupPairs: []*ec2.UserIdGroupPair { - &ec2.UserIdGroupPair{GroupId: aws.String("fourthGroupId")}, + newIpPermission := ec2.IpPermission{ + UserIdGroupPairs: []*ec2.UserIdGroupPair{ + {GroupId: aws.String("fourthGroupId")}, }, } - equals := ipPermissionExists(&existingIpPermission, &oldIpPermission, false) if !equals { t.Errorf("Should have been considered equal since first is in the second array of groups") @@ -834,27 +833,26 @@ func TestIpPermissionExistsHandlesMultipleGroupIds(t *testing.T) { } func TestIpPermissionExistsHandlesMultipleGroupIdsWithUserIds(t *testing.T) { - oldIpPermission := ec2.IpPermission { - UserIdGroupPairs: []*ec2.UserIdGroupPair { - &ec2.UserIdGroupPair{GroupId: aws.String("firstGroupId"), UserId: aws.String("firstUserId")}, - &ec2.UserIdGroupPair{GroupId: aws.String("secondGroupId"), UserId: aws.String("secondUserId")}, - &ec2.UserIdGroupPair{GroupId: aws.String("thirdGroupId"), UserId: aws.String("thirdUserId")}, + oldIpPermission := ec2.IpPermission{ + UserIdGroupPairs: []*ec2.UserIdGroupPair{ + {GroupId: aws.String("firstGroupId"), UserId: aws.String("firstUserId")}, + {GroupId: aws.String("secondGroupId"), UserId: aws.String("secondUserId")}, + {GroupId: aws.String("thirdGroupId"), UserId: aws.String("thirdUserId")}, }, } - existingIpPermission := ec2.IpPermission { - UserIdGroupPairs: []*ec2.UserIdGroupPair { - &ec2.UserIdGroupPair{GroupId: aws.String("secondGroupId"), UserId: aws.String("secondUserId")}, + existingIpPermission := ec2.IpPermission{ + UserIdGroupPairs: []*ec2.UserIdGroupPair{ + {GroupId: aws.String("secondGroupId"), UserId: aws.String("secondUserId")}, }, } - newIpPermission := ec2.IpPermission { - UserIdGroupPairs: []*ec2.UserIdGroupPair { - &ec2.UserIdGroupPair{GroupId: aws.String("secondGroupId"), UserId: aws.String("anotherUserId")}, + newIpPermission := ec2.IpPermission{ + UserIdGroupPairs: []*ec2.UserIdGroupPair{ + {GroupId: aws.String("secondGroupId"), UserId: aws.String("anotherUserId")}, }, } - equals := ipPermissionExists(&existingIpPermission, &oldIpPermission, true) if !equals { t.Errorf("Should have been considered equal since first is in the second array of groups") From c906e9c90ac4aca98547a2f1bcffcc701f33b67c Mon Sep 17 00:00:00 2001 From: derekwaynecarr Date: Tue, 26 Jan 2016 21:28:05 -0500 Subject: [PATCH 013/328] hack/test-cmd.sh did not run any admission control --- hack/test-cmd.sh | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/hack/test-cmd.sh b/hack/test-cmd.sh index 61bdb3a2a6e..d2495f37eec 100755 --- a/hack/test-cmd.sh +++ b/hack/test-cmd.sh @@ -161,10 +161,15 @@ kube::util::wait_for_url "http://127.0.0.1:${KUBELET_HEALTHZ_PORT}/healthz" "kub # Start kube-apiserver kube::log::status "Starting kube-apiserver" + +# Admission Controllers to invoke prior to persisting objects in cluster +ADMISSION_CONTROL="NamespaceLifecycle,LimitRanger,ResourceQuota" + KUBE_API_VERSIONS="v1,extensions/v1beta1" "${KUBE_OUTPUT_HOSTBIN}/kube-apiserver" \ --address="127.0.0.1" \ --public-address-override="127.0.0.1" \ --port="${API_PORT}" \ + --admission-control="${ADMISSION_CONTROL}" \ --etcd-servers="http://${ETCD_HOST}:${ETCD_PORT}" \ --public-address-override="127.0.0.1" \ --kubelet-port=${KUBELET_PORT} \ @@ -684,7 +689,7 @@ runTests() { ### Create a new namespace # Pre-condition: only the "default" namespace exists - kube::test::get_object_assert 'namespaces' "{{range.items}}{{$id_field}}:{{end}}" 'default:' + kube::test::get_object_assert namespaces "{{range.items}}{{$id_field}}:{{end}}" 'default:' # Command kubectl create namespace my-namespace # Post-condition: namespace 'my-namespace' is created. @@ -696,6 +701,14 @@ runTests() { # Pods in Namespaces # ############## + ### Create a new namespace + # Pre-condition: the other namespace does not exist + kube::test::get_object_assert 'namespaces' '{{range.items}}{{ if eq $id_field \"other\" }}found{{end}}{{end}}:' ':' + # Command + kubectl create namespace other + # Post-condition: namespace 'other' is created. + kube::test::get_object_assert 'namespaces/other' "{{$id_field}}" 'other' + ### Create POD valid-pod in specific namespace # Pre-condition: no POD exists kube::test::get_object_assert 'pods --namespace=other' "{{range.items}}{{$id_field}}:{{end}}" '' @@ -710,12 +723,22 @@ runTests() { # Command kubectl delete "${kube_flags[@]}" pod --namespace=other valid-pod --grace-period=0 # Post-condition: valid-pod POD doesn't exist - kube::test::get_object_assert 'pods --namespace=other' "{{range.items}}{{$id_field}}:{{end}}" '' + kube::test::get_object_assert 'pods --namespace=other' "{{range.items}}{{$id_field}}:{{end}}" '' + # Clean up + kubectl delete namespace other ############## # Secrets # ############## + ### Create a new namespace + # Pre-condition: the test-secrets namespace does not exist + kube::test::get_object_assert 'namespaces' '{{range.items}}{{ if eq $id_field \"test-secrets\" }}found{{end}}{{end}}:' ':' + # Command + kubectl create namespace test-secrets + # Post-condition: namespace 'test-secrets' is created. + kube::test::get_object_assert 'namespaces/test-secrets' "{{$id_field}}" 'test-secrets' + ### Create a generic secret in a specific namespace # Pre-condition: no SECRET exists kube::test::get_object_assert 'secrets --namespace=test-secrets' "{{range.items}}{{$id_field}}:{{end}}" '' @@ -739,6 +762,8 @@ runTests() { [[ "$(kubectl get secret/test-secret --namespace=test-secrets -o yaml "${kube_flags[@]}" | grep '.dockercfg:')" ]] # Clean-up kubectl delete secret test-secret --namespace=test-secrets + # Clean up + kubectl delete namespace test-secrets ################# # Pod templates # From 1ad2df6b6156f53f653d6cd2d0a9044a051bfb8c Mon Sep 17 00:00:00 2001 From: markturansky Date: Tue, 26 Jan 2016 22:40:48 -0500 Subject: [PATCH 014/328] verify UID when releasing and binding volumes --- ...ersistentvolume_claim_binder_controller.go | 8 ++- ...tentvolume_claim_binder_controller_test.go | 62 +++++++++++++++++++ pkg/controller/persistentvolume/types.go | 2 +- 3 files changed, 70 insertions(+), 2 deletions(-) diff --git a/pkg/controller/persistentvolume/persistentvolume_claim_binder_controller.go b/pkg/controller/persistentvolume/persistentvolume_claim_binder_controller.go index 08da69dfc96..13fddefa8bb 100644 --- a/pkg/controller/persistentvolume/persistentvolume_claim_binder_controller.go +++ b/pkg/controller/persistentvolume/persistentvolume_claim_binder_controller.go @@ -281,13 +281,19 @@ func syncVolume(volumeIndex *persistentVolumeOrderedIndex, binderClient binderCl if volume.Spec.ClaimRef == nil { return fmt.Errorf("PersistentVolume[%s] expected to be bound but found nil claimRef: %+v", volume.Name, volume) } else { - _, err := binderClient.GetPersistentVolumeClaim(volume.Spec.ClaimRef.Namespace, volume.Spec.ClaimRef.Name) + claim, err := binderClient.GetPersistentVolumeClaim(volume.Spec.ClaimRef.Namespace, volume.Spec.ClaimRef.Name) + + // A volume is Released when its bound claim cannot be found in the API server. + // A claim by the same name can be found if deleted and recreated before this controller can release + // the volume from the original claim, so a UID check is necessary. if err != nil { if errors.IsNotFound(err) { nextPhase = api.VolumeReleased } else { return err } + } else if claim != nil && claim.UID != volume.Spec.ClaimRef.UID { + nextPhase = api.VolumeReleased } } diff --git a/pkg/controller/persistentvolume/persistentvolume_claim_binder_controller_test.go b/pkg/controller/persistentvolume/persistentvolume_claim_binder_controller_test.go index 32a0bc70936..6f1f348eb18 100644 --- a/pkg/controller/persistentvolume/persistentvolume_claim_binder_controller_test.go +++ b/pkg/controller/persistentvolume/persistentvolume_claim_binder_controller_test.go @@ -143,6 +143,68 @@ func TestClaimRace(t *testing.T) { } } +func TestNewClaimWithSameNameAsOldClaim(t *testing.T) { + c1 := &api.PersistentVolumeClaim{ + ObjectMeta: api.ObjectMeta{ + Name: "c1", + Namespace: "foo", + UID: "12345", + }, + Spec: api.PersistentVolumeClaimSpec{ + AccessModes: []api.PersistentVolumeAccessMode{api.ReadWriteOnce}, + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("3Gi"), + }, + }, + }, + Status: api.PersistentVolumeClaimStatus{ + Phase: api.ClaimBound, + }, + } + c1.ObjectMeta.SelfLink = testapi.Default.SelfLink("pvc", "") + + v := &api.PersistentVolume{ + ObjectMeta: api.ObjectMeta{ + Name: "foo", + }, + Spec: api.PersistentVolumeSpec{ + ClaimRef: &api.ObjectReference{ + Name: c1.Name, + Namespace: c1.Namespace, + UID: "45678", + }, + AccessModes: []api.PersistentVolumeAccessMode{api.ReadWriteOnce}, + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10Gi"), + }, + PersistentVolumeSource: api.PersistentVolumeSource{ + HostPath: &api.HostPathVolumeSource{ + Path: "/tmp/data01", + }, + }, + }, + Status: api.PersistentVolumeStatus{ + Phase: api.VolumeBound, + }, + } + + volumeIndex := NewPersistentVolumeOrderedIndex() + mockClient := &mockBinderClient{ + claim: c1, + volume: v, + } + + plugMgr := volume.VolumePluginMgr{} + plugMgr.InitPlugins(host_path.ProbeRecyclableVolumePlugins(newMockRecycler, volume.VolumeConfig{}), volume.NewFakeVolumeHost("/tmp/fake", nil, nil)) + + syncVolume(volumeIndex, mockClient, v) + if mockClient.volume.Status.Phase != api.VolumeReleased { + t.Errorf("Expected phase %s but got %s", api.VolumeReleased, mockClient.volume.Status.Phase) + } + +} + func TestClaimSyncAfterVolumeProvisioning(t *testing.T) { // Tests that binder.syncVolume will also syncClaim if the PV has completed // provisioning but the claim is still Pending. We want to advance to Bound diff --git a/pkg/controller/persistentvolume/types.go b/pkg/controller/persistentvolume/types.go index df9a0bb011f..42ca3680180 100644 --- a/pkg/controller/persistentvolume/types.go +++ b/pkg/controller/persistentvolume/types.go @@ -117,7 +117,7 @@ func (pvIndex *persistentVolumeOrderedIndex) findByClaim(claim *api.PersistentVo continue } - if claim.Name == volume.Spec.ClaimRef.Name && claim.Namespace == volume.Spec.ClaimRef.Namespace { + if claim.Name == volume.Spec.ClaimRef.Name && claim.Namespace == volume.Spec.ClaimRef.Namespace && claim.UID == volume.Spec.ClaimRef.UID { // exact match! No search required. return volume, nil } From 23cd0913f7c6dadb6a38fdbc8fc2fe4983ed4e7c Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Wed, 27 Jan 2016 15:16:05 +0100 Subject: [PATCH 015/328] Tag dynamically created GCE PD disks. GCE disks don't have tags, we must encode the tags into Description field. It's encoded as JSON, which is both human and machine readable: description: '{"kubernetes.io/created-for/pv/name":"pv-gce-oxwts","kubernetes.io/created-for/pvc/name":"myclaim","kubernetes.io/created-for/pvc/namespace":"default"}' --- pkg/cloudprovider/providers/gce/gce.go | 35 ++++++++++++++++++++++---- pkg/volume/gce_pd/gce_util.go | 2 +- test/e2e/pd.go | 3 ++- 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/pkg/cloudprovider/providers/gce/gce.go b/pkg/cloudprovider/providers/gce/gce.go index 9da69182411..2746b8ea156 100644 --- a/pkg/cloudprovider/providers/gce/gce.go +++ b/pkg/cloudprovider/providers/gce/gce.go @@ -17,6 +17,7 @@ limitations under the License. package gce import ( + "encoding/json" "fmt" "io" "net" @@ -1617,12 +1618,36 @@ func (gce *GCECloud) GetZone() (cloudprovider.Zone, error) { }, nil } -// Create a new Persistent Disk, with the specified name & size, in the specified zone. -func (gce *GCECloud) CreateDisk(name string, zone string, sizeGb int64) error { - diskToCreate := &compute.Disk{ - Name: name, - SizeGb: sizeGb, +// encodeDiskTags encodes requested volume tags into JSON string, as GCE does +// not support tags on GCE PDs and we use Description field as fallback. +func (gce *GCECloud) encodeDiskTags(tags map[string]string) (string, error) { + if len(tags) == 0 { + // No tags -> empty JSON + return "", nil } + + enc, err := json.Marshal(tags) + if err != nil { + return "", err + } + return string(enc), nil +} + +// CreateDisk creates a new Persistent Disk, with the specified name & size, in +// the specified zone. It stores specified tags endoced in JSON in Description +// field. +func (gce *GCECloud) CreateDisk(name string, zone string, sizeGb int64, tags map[string]string) error { + tagsStr, err := gce.encodeDiskTags(tags) + if err != nil { + return err + } + + diskToCreate := &compute.Disk{ + Name: name, + SizeGb: sizeGb, + Description: tagsStr, + } + createOp, err := gce.service.Disks.Insert(gce.projectID, zone, diskToCreate).Do() if err != nil { return err diff --git a/pkg/volume/gce_pd/gce_util.go b/pkg/volume/gce_pd/gce_util.go index fddf7312359..b79032a4012 100644 --- a/pkg/volume/gce_pd/gce_util.go +++ b/pkg/volume/gce_pd/gce_util.go @@ -146,7 +146,7 @@ func (gceutil *GCEDiskUtil) CreateVolume(c *gcePersistentDiskProvisioner) (volum return "", 0, err } - err = cloud.CreateDisk(name, zone.FailureDomain, int64(requestGB)) + err = cloud.CreateDisk(name, zone.FailureDomain, int64(requestGB), *c.options.CloudTags) if err != nil { glog.V(2).Infof("Error creating GCE PD volume: %v", err) return "", 0, err diff --git a/test/e2e/pd.go b/test/e2e/pd.go index 50120b63ade..0126b826662 100644 --- a/test/e2e/pd.go +++ b/test/e2e/pd.go @@ -314,7 +314,8 @@ func createPD() (string, error) { return "", err } - err = gceCloud.CreateDisk(pdName, testContext.CloudConfig.Zone, 10 /* sizeGb */) + tags := map[string]string{} + err = gceCloud.CreateDisk(pdName, testContext.CloudConfig.Zone, 10 /* sizeGb */, tags) if err != nil { return "", err } From 70408d2cbd8a170f51450daaa2d8573a1f32fc9a Mon Sep 17 00:00:00 2001 From: Hongchao Deng Date: Wed, 27 Jan 2016 18:26:12 -0800 Subject: [PATCH 016/328] PluginFactoryArgs: Expose explicit fields None of the embedded fields are used for inheritance methods. Expose them for better code analysis. --- plugin/pkg/scheduler/factory/plugins.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plugin/pkg/scheduler/factory/plugins.go b/plugin/pkg/scheduler/factory/plugins.go index 93f95594e54..1d0d80caa4c 100644 --- a/plugin/pkg/scheduler/factory/plugins.go +++ b/plugin/pkg/scheduler/factory/plugins.go @@ -33,13 +33,13 @@ import ( // PluginFactoryArgs are passed to all plugin factory functions. type PluginFactoryArgs struct { - algorithm.PodLister - algorithm.ServiceLister - algorithm.ControllerLister - NodeLister algorithm.NodeLister - NodeInfo predicates.NodeInfo - PVInfo predicates.PersistentVolumeInfo - PVCInfo predicates.PersistentVolumeClaimInfo + PodLister algorithm.PodLister + ServiceLister algorithm.ServiceLister + ControllerLister algorithm.ControllerLister + NodeLister algorithm.NodeLister + NodeInfo predicates.NodeInfo + PVInfo predicates.PersistentVolumeInfo + PVCInfo predicates.PersistentVolumeClaimInfo } // A FitPredicateFactory produces a FitPredicate from the given args. From ec2008d9486e5dc46f30e9dbc35bfa1d8b43fc41 Mon Sep 17 00:00:00 2001 From: deads2k Date: Thu, 28 Jan 2016 12:55:09 -0500 Subject: [PATCH 017/328] pin the run command to produce a job --- hack/test-cmd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/test-cmd.sh b/hack/test-cmd.sh index 9cb251845db..0aaf0e3ed3c 100755 --- a/hack/test-cmd.sh +++ b/hack/test-cmd.sh @@ -646,7 +646,7 @@ runTests() { # Pre-Condition: no Job exists kube::test::get_object_assert jobs "{{range.items}}{{$id_field}}:{{end}}" '' # Command - kubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'print bpi(20)' "${kube_flags[@]}" + kubectl run pi --generator=job/v1beta1 --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'print bpi(20)' "${kube_flags[@]}" # Post-Condition: Job "pi" is created kube::test::get_object_assert jobs "{{range.items}}{{$id_field}}:{{end}}" 'pi:' # Clean up From 1b34e2c314e148eef22570015d2fe96dfa729146 Mon Sep 17 00:00:00 2001 From: Yifan Gu Date: Fri, 29 Jan 2016 10:43:00 -0800 Subject: [PATCH 018/328] rkt: If resource's limit is empty, populate it with request,and vice versa. --- pkg/kubelet/rkt/rkt.go | 13 +++++++------ pkg/kubelet/rkt/rkt_test.go | 8 ++++---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/pkg/kubelet/rkt/rkt.go b/pkg/kubelet/rkt/rkt.go index b9e149ce09f..27bf14080af 100644 --- a/pkg/kubelet/rkt/rkt.go +++ b/pkg/kubelet/rkt/rkt.go @@ -262,17 +262,18 @@ func setIsolators(app *appctypes.App, c *api.Container, ctx *api.SecurityContext request string } - resources := make(map[api.ResourceName]resource) + // If limit is empty, populate it with request and vice versa. + resources := make(map[api.ResourceName]*resource) for name, quantity := range c.Resources.Limits { - resources[name] = resource{limit: quantity.String()} + resources[name] = &resource{limit: quantity.String(), request: quantity.String()} } for name, quantity := range c.Resources.Requests { r, ok := resources[name] - if !ok { - r = resource{} + if ok { + r.request = quantity.String() + continue } - r.request = quantity.String() - resources[name] = r + resources[name] = &resource{limit: quantity.String(), request: quantity.String()} } for name, res := range resources { diff --git a/pkg/kubelet/rkt/rkt_test.go b/pkg/kubelet/rkt/rkt_test.go index 3bf77488498..7b1ddbbbc07 100644 --- a/pkg/kubelet/rkt/rkt_test.go +++ b/pkg/kubelet/rkt/rkt_test.go @@ -867,8 +867,8 @@ func TestSetApp(t *testing.T) { Args: []string{"hello", "world"}, WorkingDir: tmpDir, Resources: api.ResourceRequirements{ - Limits: api.ResourceList{"cpu": resource.MustParse("50m"), "memory": resource.MustParse("50M")}, - Requests: api.ResourceList{"cpu": resource.MustParse("5m"), "memory": resource.MustParse("5M")}, + Limits: api.ResourceList{"cpu": resource.MustParse("50m")}, + Requests: api.ResourceList{"memory": resource.MustParse("5M")}, }, }, opts: &kubecontainer.RunContainerOptions{ @@ -912,8 +912,8 @@ func TestSetApp(t *testing.T) { Isolators: []appctypes.Isolator{ generateCapRetainIsolator(t, "CAP_SYS_CHROOT", "CAP_SYS_BOOT"), generateCapRevokeIsolator(t, "CAP_SETUID", "CAP_SETGID"), - generateCPUIsolator(t, "5m", "50m"), - generateMemoryIsolator(t, "5M", "50M"), + generateCPUIsolator(t, "50m", "50m"), + generateMemoryIsolator(t, "5M", "5M"), }, }, }, From 43e45bbe5ae86b49a9c2c288ebd59b839c80169c Mon Sep 17 00:00:00 2001 From: Aaron Crickenberger Date: Fri, 29 Jan 2016 12:14:55 -0800 Subject: [PATCH 019/328] Copy-paste on-call docs out of wiki Changed links to docs/wiki where appropriate. No content changes aside from explicitly calling out FAQ's as living in the wiki. Ran `hack/update-generated-docs.sh` --- docs/devel/README.md | 2 + docs/devel/on-call-build-cop.md | 105 +++++++++++++++++++++++++++++ docs/devel/on-call-rotations.md | 52 ++++++++++++++ docs/devel/on-call-user-support.md | 83 +++++++++++++++++++++++ docs/devel/pull-requests.md | 2 +- 5 files changed, 243 insertions(+), 1 deletion(-) create mode 100644 docs/devel/on-call-build-cop.md create mode 100644 docs/devel/on-call-rotations.md create mode 100644 docs/devel/on-call-user-support.md diff --git a/docs/devel/README.md b/docs/devel/README.md index 8a01a8d65c7..4a0498884dc 100644 --- a/docs/devel/README.md +++ b/docs/devel/README.md @@ -48,6 +48,8 @@ Guide](../admin/README.md). * **Pull Request Process** ([pull-requests.md](pull-requests.md)): When and why pull requests are closed. +* **Kubernetes On-Call Rotations** ([on-call-rotations.md](on-call-rotations.md)): Descriptions of on-call rotations for build and end-user support + * **Faster PR reviews** ([faster_reviews.md](faster_reviews.md)): How to get faster PR reviews. * **Getting Recent Builds** ([getting-builds.md](getting-builds.md)): How to get recent builds including the latest builds that pass CI. diff --git a/docs/devel/on-call-build-cop.md b/docs/devel/on-call-build-cop.md new file mode 100644 index 00000000000..7530963ec65 --- /dev/null +++ b/docs/devel/on-call-build-cop.md @@ -0,0 +1,105 @@ + + + + +WARNING +WARNING +WARNING +WARNING +WARNING + +

PLEASE NOTE: This document applies to the HEAD of the source tree

+ +If you are using a released version of Kubernetes, you should +refer to the docs that go with that version. + +Documentation for other releases can be found at +[releases.k8s.io](http://releases.k8s.io). + +-- + + + + +Kubernetes "Github and Build-cop" Rotation +========================================== + +Preqrequisites +-------------- + +* Ensure you have [write access to http://github.com/kubernetes/kubernetes](https://github.com/orgs/kubernetes/teams/kubernetes-maintainers) + * Test your admin access by e.g. adding a label to an issue. + +Traffic sources and responsibilities +------------------------------------ + +* GitHub [https://github.com/kubernetes/kubernetes/issues](https://github.com/kubernetes/kubernetes/issues) and [https://github.com/kubernetes/kubernetes/pulls](https://github.com/kubernetes/kubernetes/pulls): Your job is to be the first responder to all new issues and PRs. If you are not equipped to do this (which is fine!), it is your job to seek guidance! + * Support issues should be closed and redirected to Stackoverflow (see example response below). + * All incoming issues should be tagged with a team label (team/{api,ux,control-plane,node,cluster,csi,redhat,mesosphere,gke,release-infra,test-infra,none}); for issues that overlap teams, you can use multiple team labels + * There is a related concept of "Github teams" which allow you to @ mention a set of people; feel free to @ mention a Github team if you wish, but this is not a substitute for adding a team/* label, which is required + * [Google teams](https://github.com/orgs/kubernetes/teams?utf8=%E2%9C%93&query=goog-) + * [Redhat teams](https://github.com/orgs/kubernetes/teams?utf8=%E2%9C%93&query=rh-) + * [SIGs](https://github.com/orgs/kubernetes/teams?utf8=%E2%9C%93&query=sig-) + * If the issue is reporting broken builds, broken e2e tests, or other obvious P0 issues, label the issue with priority/P0 and assign it to someone. This is the only situation in which you should add a priority/* label + * non-P0 issues do not need a reviewer assigned initially + * Assign any issues related to Vagrant to @derekwaynecarr (and @mention him in the issue) + * All incoming PRs should be assigned a reviewer. + * unless it is a WIP (Work in Progress), RFC (Request for Comments), or design proposal. + * An auto-assigner [should do this for you] (https://github.com/kubernetes/kubernetes/pull/12365/files) + * When in doubt, choose a TL or team maintainer of the most relevant team; they can delegate + * Keep in mind that you can @ mention people in an issue/PR to bring it to their attention without assigning it to them. You can also @ mention github teams, such as @kubernetes/goog-ux or @kubernetes/kubectl + * If you need help triaging an issue or PR, consult with (or assign it to) @brendandburns, @thockin, @bgrant0607, @quinton-hoole, @davidopp, @dchen1107, @lavalamp (all U.S. Pacific Time) or @fgrzadkowski (Central European Time). + * At the beginning of your shift, please add team/* labels to any issues that have fallen through the cracks and don't have one. Likewise, be fair to the next person in rotation: try to ensure that every issue that gets filed while you are on duty is handled. The Github query to find issues with no team/* label is: [here](https://github.com/kubernetes/kubernetes/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+-label%3Ateam%2Fcontrol-plane+-label%3Ateam%2Fmesosphere+-label%3Ateam%2Fredhat+-label%3Ateam%2Frelease-infra+-label%3Ateam%2Fnone+-label%3Ateam%2Fnode+-label%3Ateam%2Fcluster+-label%3Ateam%2Fux+-label%3Ateam%2Fcsi+-label%3Ateam%2Fapi+-label%3Ateam%2Ftest-infra+). + +Example response for support issues: + + Please re-post your question to [stackoverflow](http://stackoverflow.com/questions/tagged/kubernetes). + + We are trying to consolidate the channels to which questions for help/support are posted so that we can improve our efficiency in responding to your requests, and to make it easier for you to find answers to frequently asked questions and how to address common use cases. + + We regularly see messages posted in multiple forums, with the full response thread only in one place or, worse, spread across multiple forums. Also, the large volume of support issues on github is making it difficult for us to use issues to identify real bugs. + + The Kubernetes team scans stackoverflow on a regular basis, and will try to ensure your questions don't go unanswered. + + Before posting a new question, please search stackoverflow for answers to similar questions, and also familiarize yourself with: + * [the user guide](http://kubernetes.io/v1.0/) + * [the troubleshooting guide](http://kubernetes.io/v1.0/docs/troubleshooting.html) + + Again, thanks for using Kubernetes. + + The Kubernetes Team + +Build-copping +------------- + +* The [merge-bot submit queue](http://submit-queue.k8s.io/) ([source](https://github.com/kubernetes/contrib/tree/master/submit-queue)) should auto-merge all eligible PRs for you once they've passed all the relevant checks mentioned below and all [critical e2e tests] (https://goto.google.com/k8s-test/view/Critical%20Builds/) are passing. If the merge-bot been disabled for some reason, or tests are failing, you might need to do some manual merging to get things back on track. +* Once a day or so, look at the [flaky test builds](https://goto.google.com/k8s-test/view/Flaky/); if they are timing out, clusters are failing to start, or tests are consistently failing (instead of just flaking), file an issue to get things back on track. +* Jobs that are not in [critical e2e tests] (https://goto.google.com/k8s-test/view/Critical%20Builds/) or [flaky test builds](https://goto.google.com/k8s-test/view/Flaky/) are not your responsibility to monitor. The `Test owner:` in the job description will be automatically emailed if the job is failing. +* If you are a weekday oncall, ensure that PRs confirming to the following pre-requisites are being merged at a reasonable rate: + * [Have been LGTMd](https://github.com/kubernetes/kubernetes/labels/lgtm) + * Pass Travis and Shippable. + * Author has signed CLA if applicable. +* If you are a weekend oncall, [never merge PRs manually](collab.md), instead add the label "lgtm" to the PRs once they have been LGTMd and passed Travis and Shippable; this will cause merge-bot to merge them automatically (or make them easy to find by the next oncall, who will merge them). +* When the build is broken, roll back the PRs responsible ASAP +* When E2E tests are unstable, a "merge freeze" may be instituted. During a merge freeze: + * Oncall should slowly merge LGTMd changes throughout the day while monitoring E2E to ensure stability. + * Ideally the E2E run should be green, but some tests are flaky and can fail randomly (not as a result of a particular change). + * If a large number of tests fail, or tests that normally pass fail, that is an indication that one or more of the PR(s) in that build might be problematic (and should be reverted). + * Use the Test Results Analyzer to see individual test history over time. +* Flake mitigation + * Tests that flake (fail a small percentage of the time) need an issue filed against them. Please read [this](https://github.com/kubernetes/kubernetes/blob/doc-flaky-test/docs/devel/flaky-tests.md#filing-issues-for-flaky-tests); the build cop is expected to file issues for any flaky tests they encounter. + * It's reasonable to manually merge PRs that fix a flake or otherwise mitigate it. + +Contact information +------------------- + +[@k8s-oncall](https://github.com/k8s-oncall) will reach the current person on call. + + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/devel/on-call-build-cop.md?pixel)]() + diff --git a/docs/devel/on-call-rotations.md b/docs/devel/on-call-rotations.md new file mode 100644 index 00000000000..9544db5102c --- /dev/null +++ b/docs/devel/on-call-rotations.md @@ -0,0 +1,52 @@ + + + + +WARNING +WARNING +WARNING +WARNING +WARNING + +

PLEASE NOTE: This document applies to the HEAD of the source tree

+ +If you are using a released version of Kubernetes, you should +refer to the docs that go with that version. + +Documentation for other releases can be found at +[releases.k8s.io](http://releases.k8s.io). + +-- + + + + +Kubernetes On-Call Rotations +==================== + +Kubernetes "first responder" rotations +-------------------------------------- + +Kubernetes has generated a lot of public traffic: email, pull-requests, bugs, etc. So much traffic that it's becoming impossible to keep up with it all! This is a fantastic problem to have. In order to be sure that SOMEONE, but not EVERYONE on the team is paying attention to public traffic, we have instituted two "first responder" rotations, listed below. Please read this page before proceeding to the pages linked below, which are specific to each rotation. + +Please also read our [notes on OSS collaboration](collab.md), particularly the bits about hours. Specifically, each rotation is expected to be active primarily during work hours, less so off hours. + +During regular workday work hours of your shift, your primary responsibility is to monitor the traffic sources specific to your rotation. You can check traffic in the evenings if you feel so inclined, but it is not expected to be as highly focused as work hours. For weekends, you should check traffic very occasionally (e.g. once or twice a day). Again, it is not expected to be as highly focused as workdays. It is assumed that over time, everyone will get weekday and weekend shifts, so the workload will balance out. + +If you can not serve your shift, and you know this ahead of time, it is your responsibility to find someone to cover and to change the rotation. If you have an emergency, your responsibilities fall on the primary of the other rotation, who acts as your secondary. If you need help to cover all of the tasks, partners with oncall rotations (e.g., [Redhat](https://github.com/orgs/kubernetes/teams/rh-oncall)). + +If you are not on duty you DO NOT need to do these things. You are free to focus on "real work". + +Note that Kubernetes will occasionally enter code slush/freeze, prior to milestones. When it does, there might be changes in the instructions (assigning milestones, for instance). + +* [Github and Build Cop Rotation](on-call-build-cop.md) +* [User Support Rotation](on-call-user-support.md) + + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/devel/on-call-rotations.md?pixel)]() + diff --git a/docs/devel/on-call-user-support.md b/docs/devel/on-call-user-support.md new file mode 100644 index 00000000000..ceea9c76a18 --- /dev/null +++ b/docs/devel/on-call-user-support.md @@ -0,0 +1,83 @@ + + + + +WARNING +WARNING +WARNING +WARNING +WARNING + +

PLEASE NOTE: This document applies to the HEAD of the source tree

+ +If you are using a released version of Kubernetes, you should +refer to the docs that go with that version. + +Documentation for other releases can be found at +[releases.k8s.io](http://releases.k8s.io). + +-- + + + + +Kubernetes "User Support" Rotation +================================== + +Traffic sources and responsibilities +------------------------------------ + +* [StackOverflow](http://stackoverflow.com/questions/tagged/kubernetes) and [ServerFault](http://serverfault.com/questions/tagged/google-kubernetes): Respond to any thread that has no responses and is more than 6 hours old (over time we will lengthen this timeout to allow community responses). If you are not equipped to respond, it is your job to redirect to someone who can. + * [Query for unanswered Kubernetes StackOverflow questions](http://stackoverflow.com/search?q=%5Bkubernetes%5D+answers%3A0) + * [Query for unanswered Kubernetes ServerFault questions](http://serverfault.com/questions/tagged/google-kubernetes?sort=unanswered&pageSize=15) + * Direct poorly formulated questions to [stackoverflow's tips about how to ask](http://stackoverflow.com/help/how-to-ask) + * Direct off-topic questions to [stackoverflow's policy](http://stackoverflow.com/help/on-topic) +* [Slack](https://kubernetes.slack.com) ([registration](http://slack.k8s.io)): Your job is to be on Slack, watching for questions and answering or redirecting as needed. Also check out the [Slack Archive](http://kubernetes.slackarchive.io/). +* [Email/Groups](https://groups.google.com/forum/#!forum/google-containers): Respond to any thread that has no responses and is more than 6 hours old (over time we will lengthen this timeout to allow community responses). If you are not equipped to respond, it is your job to redirect to someone who can. +* [Legacy] [IRC](irc://irc.freenode.net/#google-containers) (irc.freenode.net #google-containers): watch IRC for questions and try to redirect users to Slack. Also check out the [IRC logs](https://botbot.me/freenode/google-containers/). + +In general, try to direct support questions to: + +1. Documentation, such as the [user guide](../user-guide/README.md) and [troubleshooting guide](../troubleshooting.md) +2. Stackoverflow + +If you see questions on a forum other than Stackoverflow, try to redirect them to Stackoverflow. Example response: + + Please re-post your question to [stackoverflow](http://stackoverflow.com/questions/tagged/kubernetes). + + We are trying to consolidate the channels to which questions for help/support are posted so that we can improve our efficiency in responding to your requests, and to make it easier for you to find answers to frequently asked questions and how to address common use cases. + + We regularly see messages posted in multiple forums, with the full response thread only in one place or, worse, spread across multiple forums. Also, the large volume of support issues on github is making it difficult for us to use issues to identify real bugs. + + The Kubernetes team scans stackoverflow on a regular basis, and will try to ensure your questions don't go unanswered. + + Before posting a new question, please search stackoverflow for answers to similar questions, and also familiarize yourself with: + * [the user guide](http://kubernetes.io/v1.1/) + * [the troubleshooting guide](http://kubernetes.io/v1.1/docs/troubleshooting.html) + + Again, thanks for using Kubernetes. + + The Kubernetes Team + +If you answer a question (in any of the above forums) that you think might be useful for someone else in the future, *please add it to one of the FAQs in the wiki*: +* [User FAQ](https://github.com/kubernetes/kubernetes/wiki/User-FAQ) +* [Developer FAQ](https://github.com/kubernetes/kubernetes/wiki/Developer-FAQ) +* [Debugging FAQ](https://github.com/kubernetes/kubernetes/wiki/Debugging-FAQ). + +Getting it into the FAQ is more important than polish. Please indicate the date it was added, so people can judge the likelihood that it is out-of-date (and please correct any FAQ entries that you see contain out-of-date information). + +Contact information +------------------- + +[@k8s-support-oncall](https://github.com/k8s-support-oncall) will reach the current person on call. + + + + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/devel/on-call-user-support.md?pixel)]() + diff --git a/docs/devel/pull-requests.md b/docs/devel/pull-requests.md index eaffce237d6..5394d5740ce 100644 --- a/docs/devel/pull-requests.md +++ b/docs/devel/pull-requests.md @@ -53,7 +53,7 @@ Life of a Pull Request Unless in the last few weeks of a milestone when we need to reduce churn and stabilize, we aim to be always accepting pull requests. -Either the [on call](https://github.com/kubernetes/kubernetes/wiki/Kubernetes-on-call-rotations) manually or the [github "munger"](https://github.com/kubernetes/contrib/tree/master/mungegithub) submit-queue plugin automatically will manage merging PRs. +Either the [on call](on-call-rotations.md) manually or the [github "munger"](https://github.com/kubernetes/contrib/tree/master/mungegithub) submit-queue plugin automatically will manage merging PRs. There are several requirements for the submit-queue to work: * Author must have signed CLA ("cla: yes" label added to PR) From d52855cab40a306aaeec7851cb0a5b01c5e19a02 Mon Sep 17 00:00:00 2001 From: Aaron Crickenberger Date: Fri, 29 Jan 2016 12:19:46 -0800 Subject: [PATCH 020/328] Link how-to-doc.md in devel/README.md --- docs/devel/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/devel/README.md b/docs/devel/README.md index 4a0498884dc..4128e00179e 100644 --- a/docs/devel/README.md +++ b/docs/devel/README.md @@ -75,6 +75,9 @@ Guide](../admin/README.md). * **Coding Conventions** ([coding-conventions.md](coding-conventions.md)): Coding style advice for contributors. +* **Document Conventions** ([how-to-doc.md](how-to-doc.md)) + Document style advice for contributors. + * **Running a cluster locally** ([running-locally.md](running-locally.md)): A fast and lightweight local cluster deployment for developement. From 63b7ba0414ab85745b5f458c0011edeadbd2696f Mon Sep 17 00:00:00 2001 From: Prashanth Balasubramanian Date: Wed, 25 Nov 2015 10:50:44 -0800 Subject: [PATCH 021/328] [wip] CI testing guidelines --- docs/devel/testing.md | 66 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 docs/devel/testing.md diff --git a/docs/devel/testing.md b/docs/devel/testing.md new file mode 100644 index 00000000000..ed51dcc68fa --- /dev/null +++ b/docs/devel/testing.md @@ -0,0 +1,66 @@ + + + + +WARNING +WARNING +WARNING +WARNING +WARNING + +

PLEASE NOTE: This document applies to the HEAD of the source tree

+ +If you are using a released version of Kubernetes, you should +refer to the docs that go with that version. + + +The latest release of this document can be found +[here](http://releases.k8s.io/release-1.1/docs/devel/testing.md). + +Documentation for other releases can be found at +[releases.k8s.io](http://releases.k8s.io). + +-- + + + + +Kubernetes Commit Queue Testing +=============================== + +A quick overview of how we add, remove and recycle tests from CI. + +## What is CI? + +Throughout this document we will refer to CI as any suite of e2e tests that can potentially hold up the submit queue, this means Kubernetes PRs must pass these tests prior to getting merged. + +## Adding a test to CI + +When first adding a test it should *not* go straight into CI, because failures block ordinary development. A test should only be added to CI after is has been running in some non-CI suite long enought to establish a track record showing that the test does not fail when run against *working* software. A suite named `flaky` exists, and can be overloaded to mean `experimental` and used for this reason (can it really?). In addition to this track record, consider the following as requirements: +* The test must be short (20m?) +* Failures must indicate that the product is unfit (TODO: establish a firmer bar, what I'm trying to say is testing random controller X in CI doesn't help anyone, but maybe it does if controller X is a cluster addon, or our largest customer wants X, or what?) +* Failures must reliably indicate a bug in the product, not a bug in the test + +(TODO: is there a parallelism requirement here?) + +## Moving a test out of CI + +Do *not* move a test to flaky as soon as it starts failing just to clear up the submit queue, this risks introducing more bugs and compounding the problem even further (TODO: or do this? but why). Build cop can use their better judgement to call a test `flaky`. This means it fails for presumably random reasons, once in X runs (TODO: is X == 0?). Move flaky tests out of CI, create a P0/1 bug and try to triage it along to the right person. Adding the `kind/flake` label on github will grab the attention of the grumpy CI shamer bot, which will include the bug in its daily report. + +If your test got moved to flaky, it must demonstrate the run of greens required for getting added to CI once again (or nah?). + +## Non CI channels for testing + +If you want to test against Kubernetes but your test doesn't meet the following requirements, peruse [this list](../../hack/jenkins/e2e.sh) and add your test in whatever makes sense (TODO: What about release-lists, shouldn't they mirror other lists?). + + + + + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/devel/testing.md?pixel)]() + From 1cd140fe49e646a6fbeccdacde0638f6c0245ceb Mon Sep 17 00:00:00 2001 From: Matt Liggett Date: Fri, 29 Jan 2016 15:56:51 -0800 Subject: [PATCH 022/328] When running test-update-storage-objects, only build kube-apiserver. Prior to this we built everything. So slow! --- hack/test-update-storage-objects.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/test-update-storage-objects.sh b/hack/test-update-storage-objects.sh index 24d25d8622b..2985ebf5732 100755 --- a/hack/test-update-storage-objects.sh +++ b/hack/test-update-storage-objects.sh @@ -83,7 +83,7 @@ kube::etcd::start kube::log::status "Running test for update etcd object scenario" -"${KUBE_ROOT}/hack/build-go.sh" +"${KUBE_ROOT}/hack/build-go.sh" cmd/kube-apiserver ####################################################### From b6cb8be2bda76f00196b25241ea5830162b08768 Mon Sep 17 00:00:00 2001 From: Isaac Hollander McCreery Date: Fri, 29 Jan 2016 16:20:53 -0800 Subject: [PATCH 023/328] CI testing guidelines redux --- docs/devel/e2e-tests.md | 45 ++++++++++++++++++++++++---- docs/devel/testing.md | 66 ----------------------------------------- 2 files changed, 40 insertions(+), 71 deletions(-) delete mode 100644 docs/devel/testing.md diff --git a/docs/devel/e2e-tests.md b/docs/devel/e2e-tests.md index 388e25f08e6..63ebd16e25c 100644 --- a/docs/devel/e2e-tests.md +++ b/docs/devel/e2e-tests.md @@ -112,19 +112,54 @@ We are working on implementing clearer partitioning of our e2e tests to make run - `[Disruptive]`: If a test restarts components that might cause other tests to fail or break the cluster completely, it is labeled `[Disruptive]`. Any `[Disruptive]` test is also assumed to qualify for the `[Serial]` label, but need not be labeled as both. These tests are not run against soak clusters to avoid restarting components. - `[Flaky]`: If a test is found to be flaky, it receives the `[Flaky]` label until it is fixed. A `[Flaky]` label should be accompanied with a reference to the issue for de-flaking the test, because while a test remains labeled `[Flaky]`, it is not monitored closely in CI. `[Flaky]` tests are by default not run, unless a `focus` or `skip` argument is explicitly given. - `[Skipped]`: `[Skipped]` is a legacy label that we're phasing out. If a test is marked `[Skipped]`, there should be an issue open to label it properly. `[Skipped]` tests are by default not run, unless a `focus` or `skip` argument is explicitly given. -- `[Feature:...]`: If a test has non-default requirements to run or targets some non-core functionality, and thus should not be run as part of the standard suite, it receives a `[Feature:...]` label, e.g. `[Feature:Performance]` or `[Feature:Ingress]`. `[Feature:...]` tests are not run in our core suites, instead running in custom suites. There are a few use-cases for `[Feature:...]` tests: - - If a feature is experimental or alpha and is not enabled by default due to being incomplete or potentially subject to breaking changes, it should *not* block the merge-queue, and thus should run in some separate test suites owned by the feature owner(s). - - If a feature is in beta or GA, it *should* block the merge-queue. In moving from experimental to beta or GA, tests that are expected to pass by default should simply remove the `[Feature:...]` label, and will be incorporated into our core suites. If tests are not expected to pass by default, (e.g. they require a special environment such as added quota,) they should remain with the `[Feature:...]` label, and the suites that run them should be incorporated into our merge-queue, owned by the Build Cop. +- `[Feature:.+]`: If a test has non-default requirements to run or targets some non-core functionality, and thus should not be run as part of the standard suite, it receives a `[Feature:.+]` label, e.g. `[Feature:Performance]` or `[Feature:Ingress]`. `[Feature:.+]` tests are not run in our core suites, instead running in custom suites. There are a few use-cases for `[Feature:.+]` tests: + - If a feature is experimental or alpha and is not enabled by default due to being incomplete or potentially subject to breaking changes, it does *not* block the merge-queue, and thus should run in some separate test suites owned by the feature owner(s) (see #continuous_integration below). Finally, `[Conformance]` tests are tests we expect to pass on **any** Kubernetes cluster. The `[Conformance]` label does not supersede any other labels. `[Conformance]` test policies are a work-in-progress; see #18162. -## Adding a New Test +## Continuous Integration + +A quick overview of how we run e2e CI on Kubernetes. + +### What is CI? + +We run a battery of `e2e` tests against `HEAD` of the master branch on a continuous basis, and block merges via the [submit queue](http://submit-queue.k8s.io/) on a subset of those tests if they fail (the subset is defined in the [munger config](https://github.com/kubernetes/contrib/blob/master/mungegithub/mungers/submit-queue.go) via the `jenkins-jobs` flag; note we also block on `kubernetes-build` and `kubernetes-test-go` jobs for build and unit and integration tests). + +CI results can be found at [ci-test.k8s.io](ci-test.k8s.io), e.g. [ci-test.k8s.io/kubernetes-e2e-gce/10594](ci-test.k8s.io/kubernetes-e2e-gce/10594). + +### What runs in CI? + +We run all default tests (those that aren't marked `[Flaky]` or `[Feature:.+]`) against GCE and GKE. To minimize the time from regression-to-green-run, we partition tests across different jobs: + +- `kubernetes-` runs all non-`[Slow]`, non-`[Serial]`, non-`[Disruptive]`, non-`[Flaky]`, non-`[Feature:.+]` tests in parallel. +- `kubernetes--slow` runs all `[Slow]`, non-`[Serial]`, non-`[Disruptive]`, non-`[Flaky]`, non-`[Feature:.+]` tests in parallel. +- `kubernetes--serial` runs all `[Serial]` and `[Disruptive]`, non-`[Flaky]`, non-`[Feature:.+]` tests in serial. + +We also run non-default tests if the tests exercise general-availability ("GA") features that require a special environment to run in, e.g. `kubernetes-e2e-gce-scalability` and `kubernetes-kubemark-gce`, which test for Kubernetes performance. + +#### Non-default tests + +Many `[Feature:.+]` tests we don't run in CI. These tests are for features that are experimental (often in the `experimental` API), and aren't enabled by default. + +### Adding a test to CI As mentioned above, prior to adding a new test, it is a good idea to perform a `-ginkgo.dryRun=true` on the system, in order to see if a behavior is already being tested, or to determine if it may be possible to augment an existing set of tests for a specific use case. If a behavior does not currently have coverage and a developer wishes to add a new e2e test, navigate to the ./test/e2e directory and create a new test using the existing suite as a guide. -**TODO:** Create a self-documented example which has been disabled, but can be copied to create new tests and outlines the capabilities and libraries used. +TODO(#20357): Create a self-documented example which has been disabled, but can be copied to create new tests and outlines the capabilities and libraries used. + +When writing a test, consult #kinds_of_tests above to determine how your test should be marked, (e.g. `[Slow]`, `[Serial]`; remember, by default we assume a test can run in parallel with other tests!). + +When first adding a test it should *not* go straight into CI, because failures block ordinary development. A test should only be added to CI after is has been running in some non-CI suite long enough to establish a track record showing that the test does not fail when run against *working* software. + +Generally, a feature starts as `experimental`, and will be run in some suite owned by the team developing the feature. If a feature is in beta or GA, it *should* block the merge-queue. In moving from experimental to beta or GA, tests that are expected to pass by default should simply remove the `[Feature:.+]` label, and will be incorporated into our core suites. If tests are not expected to pass by default, (e.g. they require a special environment such as added quota,) they should remain with the `[Feature:.+]` label, and the suites that run them should be incorporated into the [munger config](https://github.com/kubernetes/contrib/blob/master/mungegithub/mungers/submit-queue.go) via the `jenkins-jobs` flag. + +Occasionally, we'll want to add tests to better exercise features that are already GA. These tests also shouldn't go straight to CI. They should begin by being marked as `[Flaky]` to be run outside of CI, and once a track-record for them is established, they may be promoted out of `[Flaky]`. + +### Moving a test out of CI + +TODO(ihmccreery) do we want to keep the `[Flaky]` label at all? ## Performance Evaluation diff --git a/docs/devel/testing.md b/docs/devel/testing.md deleted file mode 100644 index ed51dcc68fa..00000000000 --- a/docs/devel/testing.md +++ /dev/null @@ -1,66 +0,0 @@ - - - - -WARNING -WARNING -WARNING -WARNING -WARNING - -

PLEASE NOTE: This document applies to the HEAD of the source tree

- -If you are using a released version of Kubernetes, you should -refer to the docs that go with that version. - - -The latest release of this document can be found -[here](http://releases.k8s.io/release-1.1/docs/devel/testing.md). - -Documentation for other releases can be found at -[releases.k8s.io](http://releases.k8s.io). - --- - - - - -Kubernetes Commit Queue Testing -=============================== - -A quick overview of how we add, remove and recycle tests from CI. - -## What is CI? - -Throughout this document we will refer to CI as any suite of e2e tests that can potentially hold up the submit queue, this means Kubernetes PRs must pass these tests prior to getting merged. - -## Adding a test to CI - -When first adding a test it should *not* go straight into CI, because failures block ordinary development. A test should only be added to CI after is has been running in some non-CI suite long enought to establish a track record showing that the test does not fail when run against *working* software. A suite named `flaky` exists, and can be overloaded to mean `experimental` and used for this reason (can it really?). In addition to this track record, consider the following as requirements: -* The test must be short (20m?) -* Failures must indicate that the product is unfit (TODO: establish a firmer bar, what I'm trying to say is testing random controller X in CI doesn't help anyone, but maybe it does if controller X is a cluster addon, or our largest customer wants X, or what?) -* Failures must reliably indicate a bug in the product, not a bug in the test - -(TODO: is there a parallelism requirement here?) - -## Moving a test out of CI - -Do *not* move a test to flaky as soon as it starts failing just to clear up the submit queue, this risks introducing more bugs and compounding the problem even further (TODO: or do this? but why). Build cop can use their better judgement to call a test `flaky`. This means it fails for presumably random reasons, once in X runs (TODO: is X == 0?). Move flaky tests out of CI, create a P0/1 bug and try to triage it along to the right person. Adding the `kind/flake` label on github will grab the attention of the grumpy CI shamer bot, which will include the bug in its daily report. - -If your test got moved to flaky, it must demonstrate the run of greens required for getting added to CI once again (or nah?). - -## Non CI channels for testing - -If you want to test against Kubernetes but your test doesn't meet the following requirements, peruse [this list](../../hack/jenkins/e2e.sh) and add your test in whatever makes sense (TODO: What about release-lists, shouldn't they mirror other lists?). - - - - - -[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/devel/testing.md?pixel)]() - From 89dfad4087d00c5c4576d0a055a9e0551c591fd0 Mon Sep 17 00:00:00 2001 From: Isaac Hollander McCreery Date: Fri, 29 Jan 2016 16:23:59 -0800 Subject: [PATCH 024/328] Add docs about the PR builder --- docs/devel/e2e-tests.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/devel/e2e-tests.md b/docs/devel/e2e-tests.md index 63ebd16e25c..12915543ef5 100644 --- a/docs/devel/e2e-tests.md +++ b/docs/devel/e2e-tests.md @@ -141,6 +141,10 @@ We also run non-default tests if the tests exercise general-availability ("GA") Many `[Feature:.+]` tests we don't run in CI. These tests are for features that are experimental (often in the `experimental` API), and aren't enabled by default. +### The PR-builder + +We also run a battery of tests against every PR before we merge it. These tests are equivalent to `kubernetes-gce`: it runs all non-`[Slow]`, non-`[Serial]`, non-`[Disruptive]`, non-`[Flaky]`, non-`[Feature:.+]` tests in parallel. These tests are considered "smoke tests" to give a decent signal that the PR doesn't break most functionality. Results for you PR can be found at [pr-test.k8s.io](pr-test.k8s.io), e.g. [pr-test.k8s.io/20354](pr-test.k8s.io/20354) for #20354. + ### Adding a test to CI As mentioned above, prior to adding a new test, it is a good idea to perform a `-ginkgo.dryRun=true` on the system, in order to see if a behavior is already being tested, or to determine if it may be possible to augment an existing set of tests for a specific use case. From b06094f09d283f3d6a2c9df7fab20154436a8451 Mon Sep 17 00:00:00 2001 From: Minhan Xia Date: Fri, 29 Jan 2016 18:29:35 -0800 Subject: [PATCH 025/328] explictly check log tainted string --- test/e2e/es_cluster_logging.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/e2e/es_cluster_logging.go b/test/e2e/es_cluster_logging.go index 088e6543088..93775bada5a 100644 --- a/test/e2e/es_cluster_logging.go +++ b/test/e2e/es_cluster_logging.go @@ -408,6 +408,10 @@ func ClusterLevelLoggingWithElasticsearch(f *Framework) { Logf("Index value out of range: %d", index) continue } + if words[1] != taintName { + Logf("Elasticsearch query return unexpected log line: %s", msg) + continue + } // Record the observation of a log line from node n at the given index. observed[n][index]++ } From 372635588746fa2bebae68a3878219cba50c8546 Mon Sep 17 00:00:00 2001 From: Prashanth Balasubramanian Date: Sat, 30 Jan 2016 12:13:12 -0800 Subject: [PATCH 026/328] Mark L7 tests as Feature:Ingress --- test/e2e/ingress.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/e2e/ingress.go b/test/e2e/ingress.go index 6a5c7c71262..3adfd3ff9ee 100644 --- a/test/e2e/ingress.go +++ b/test/e2e/ingress.go @@ -396,8 +396,7 @@ func (cont *IngressController) Cleanup(del bool) error { // test requires at least 5. // // Slow by design (10 min) -// Flaky issue #17518 -var _ = Describe("GCE L7 LoadBalancer Controller [Serial] [Slow] [Flaky]", func() { +var _ = Describe("GCE L7 LoadBalancer Controller [Feature:Ingress]", func() { // These variables are initialized after framework's beforeEach. var ns string var addonDir string From 6e0ad75a6e4a0584272ce7220ea934001908b50f Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Sat, 30 Jan 2016 17:58:15 -0500 Subject: [PATCH 027/328] Change the signature of resthandler.err for upcoming watch changes Watch will need to be able to invoke scope.err, and it will not have access to the go-restful req/res. Change to use the raw http type now. --- pkg/apiserver/resthandler.go | 116 +++++++++++++++++------------------ pkg/apiserver/watch.go | 2 +- 2 files changed, 59 insertions(+), 59 deletions(-) diff --git a/pkg/apiserver/resthandler.go b/pkg/apiserver/resthandler.go index 43674b933ef..1d85a9261e1 100644 --- a/pkg/apiserver/resthandler.go +++ b/pkg/apiserver/resthandler.go @@ -79,8 +79,8 @@ type RequestScope struct { Subresource string } -func (scope *RequestScope) err(err error, req *restful.Request, res *restful.Response) { - errorNegotiated(err, scope.Serializer, scope.Kind.GroupVersion(), res.ResponseWriter, req.Request) +func (scope *RequestScope) err(err error, w http.ResponseWriter, req *http.Request) { + errorNegotiated(err, scope.Serializer, scope.Kind.GroupVersion(), w, req) } // getterFunc performs a get request with the given context and object name. The request @@ -97,7 +97,7 @@ func getResourceHandler(scope RequestScope, getter getterFunc) restful.RouteFunc w := res.ResponseWriter namespace, name, err := scope.Namer.Name(req) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } ctx := scope.ContextFunc(req) @@ -105,11 +105,11 @@ func getResourceHandler(scope RequestScope, getter getterFunc) restful.RouteFunc result, err := getter(ctx, name, req) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } if err := setSelfLink(result, req, scope.Namer); err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } write(http.StatusOK, scope.Kind.GroupVersion(), scope.Serializer, result, w, req.Request) @@ -178,14 +178,14 @@ func ConnectResource(connecter rest.Connecter, scope RequestScope, admit admissi w := res.ResponseWriter namespace, name, err := scope.Namer.Name(req) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } ctx := scope.ContextFunc(req) ctx = api.WithNamespace(ctx, namespace) opts, subpath, subpathKey := connecter.NewConnectOptions() if err := getRequestOptions(req, scope, opts, subpath, subpathKey); err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } if admit.Handles(admission.Connect) { @@ -198,13 +198,13 @@ func ConnectResource(connecter rest.Connecter, scope RequestScope, admit admissi err = admit.Admit(admission.NewAttributesRecord(connectRequest, scope.Kind.GroupKind(), namespace, name, scope.Resource.GroupResource(), scope.Subresource, admission.Connect, userInfo)) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } } handler, err := connecter.Connect(ctx, name, opts, &responder{scope: scope, req: req, res: res}) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } handler.ServeHTTP(w, req.Request) @@ -223,7 +223,7 @@ func (r *responder) Object(statusCode int, obj runtime.Object) { } func (r *responder) Error(err error) { - r.scope.err(err, r.req, r.res) + r.scope.err(err, r.res.ResponseWriter, r.req.Request) } // ListResource returns a function that handles retrieving a list of resources from a rest.Storage object. @@ -236,7 +236,7 @@ func ListResource(r rest.Lister, rw rest.Watcher, scope RequestScope, forceWatch namespace, err := scope.Namer.Namespace(req) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } @@ -253,7 +253,7 @@ func ListResource(r rest.Lister, rw rest.Watcher, scope RequestScope, forceWatch opts := api.ListOptions{} if err := scope.ParameterCodec.DecodeParameters(req.Request.URL.Query(), scope.Kind.GroupVersion(), &opts); err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } @@ -266,7 +266,7 @@ func ListResource(r rest.Lister, rw rest.Watcher, scope RequestScope, forceWatch if opts.FieldSelector, err = opts.FieldSelector.Transform(fn); err != nil { // TODO: allow bad request to set field causes based on query parameters err = errors.NewBadRequest(err.Error()) - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } } @@ -282,7 +282,7 @@ func ListResource(r rest.Lister, rw rest.Watcher, scope RequestScope, forceWatch // and a field selector, since just the name is // sufficient to narrow down the request to a // single object. - scope.err(errors.NewBadRequest("both a name and a field selector provided; please provide one or the other."), req, res) + scope.err(errors.NewBadRequest("both a name and a field selector provided; please provide one or the other."), res.ResponseWriter, req.Request) return } opts.FieldSelector = nameSelector @@ -291,7 +291,7 @@ func ListResource(r rest.Lister, rw rest.Watcher, scope RequestScope, forceWatch if (opts.Watch || forceWatch) && rw != nil { watcher, err := rw.Watch(ctx, &opts) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } // TODO: Currently we explicitly ignore ?timeout= and use only ?timeoutSeconds=. @@ -311,13 +311,13 @@ func ListResource(r rest.Lister, rw rest.Watcher, scope RequestScope, forceWatch trace.Step("About to List from storage") result, err := r.List(ctx, &opts) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } trace.Step("Listing from storage done") numberOfItems, err := setListSelfLink(result, req, scope.Namer) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } trace.Step("Self-linking done") @@ -347,7 +347,7 @@ func createHandler(r rest.NamedCreater, scope RequestScope, typer runtime.Object namespace, err = scope.Namer.Namespace(req) } if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } @@ -357,14 +357,14 @@ func createHandler(r rest.NamedCreater, scope RequestScope, typer runtime.Object gv := scope.Kind.GroupVersion() s, err := negotiateInputSerializer(req.Request, scope.Serializer) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } decoder := scope.Serializer.DecoderToVersion(s, unversioned.GroupVersion{Group: gv.Group, Version: runtime.APIVersionInternal}) body, err := readBody(req.Request) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } @@ -374,12 +374,12 @@ func createHandler(r rest.NamedCreater, scope RequestScope, typer runtime.Object obj, gvk, err := decoder.Decode(body, &defaultGVK, original) if err != nil { err = transformDecodeError(typer, err, original, gvk) - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } if gvk.GroupVersion() != gv { err = errors.NewBadRequest(fmt.Sprintf("the API version in the data (%s) does not match the expected API version (%v)", gvk.GroupVersion().String(), gv.String())) - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } trace.Step("Conversion done") @@ -389,7 +389,7 @@ func createHandler(r rest.NamedCreater, scope RequestScope, typer runtime.Object err = admit.Admit(admission.NewAttributesRecord(obj, scope.Kind.GroupKind(), namespace, name, scope.Resource.GroupResource(), scope.Subresource, admission.Create, userInfo)) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } } @@ -403,13 +403,13 @@ func createHandler(r rest.NamedCreater, scope RequestScope, typer runtime.Object return out, err }) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } trace.Step("Object stored in database") if err := setSelfLink(result, req, scope.Namer); err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } trace.Step("Self-link added") @@ -449,7 +449,7 @@ func PatchResource(r rest.Patcher, scope RequestScope, typer runtime.ObjectTyper namespace, name, err := scope.Namer.Name(req) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } @@ -458,7 +458,7 @@ func PatchResource(r rest.Patcher, scope RequestScope, typer runtime.ObjectTyper versionedObj, err := converter.ConvertToVersion(r.New(), scope.Kind.GroupVersion().String()) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } @@ -472,13 +472,13 @@ func PatchResource(r rest.Patcher, scope RequestScope, typer runtime.ObjectTyper patchJS, err := readBody(req.Request) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } s, ok := scope.Serializer.SerializerForMediaType("application/json", nil) if !ok { - scope.err(fmt.Errorf("no serializer defined for JSON"), req, res) + scope.err(fmt.Errorf("no serializer defined for JSON"), res.ResponseWriter, req.Request) return } gv := scope.Kind.GroupVersion() @@ -498,12 +498,12 @@ func PatchResource(r rest.Patcher, scope RequestScope, typer runtime.ObjectTyper result, err := patchResource(ctx, updateAdmit, timeout, versionedObj, r, name, patchType, patchJS, scope.Namer, codec) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } if err := setSelfLink(result, req, scope.Namer); err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } @@ -624,7 +624,7 @@ func UpdateResource(r rest.Updater, scope RequestScope, typer runtime.ObjectType namespace, name, err := scope.Namer.Name(req) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } ctx := scope.ContextFunc(req) @@ -632,13 +632,13 @@ func UpdateResource(r rest.Updater, scope RequestScope, typer runtime.ObjectType body, err := readBody(req.Request) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } s, err := negotiateInputSerializer(req.Request, scope.Serializer) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } defaultGVK := scope.Kind @@ -647,18 +647,18 @@ func UpdateResource(r rest.Updater, scope RequestScope, typer runtime.ObjectType obj, gvk, err := scope.Serializer.DecoderToVersion(s, defaultGVK.GroupVersion()).Decode(body, &defaultGVK, original) if err != nil { err = transformDecodeError(typer, err, original, gvk) - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } if gvk.GroupVersion() != defaultGVK.GroupVersion() { err = errors.NewBadRequest(fmt.Sprintf("the API version in the data (%s) does not match the expected API version (%s)", gvk.GroupVersion(), defaultGVK.GroupVersion())) - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } trace.Step("Conversion done") if err := checkName(obj, name, namespace, scope.Namer); err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } @@ -667,7 +667,7 @@ func UpdateResource(r rest.Updater, scope RequestScope, typer runtime.ObjectType err = admit.Admit(admission.NewAttributesRecord(obj, scope.Kind.GroupKind(), namespace, name, scope.Resource.GroupResource(), scope.Subresource, admission.Update, userInfo)) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } } @@ -680,13 +680,13 @@ func UpdateResource(r rest.Updater, scope RequestScope, typer runtime.ObjectType return obj, err }) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } trace.Step("Object stored in database") if err := setSelfLink(result, req, scope.Namer); err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } trace.Step("Self-link added") @@ -713,7 +713,7 @@ func DeleteResource(r rest.GracefulDeleter, checkBody bool, scope RequestScope, namespace, name, err := scope.Namer.Name(req) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } ctx := scope.ContextFunc(req) @@ -723,23 +723,23 @@ func DeleteResource(r rest.GracefulDeleter, checkBody bool, scope RequestScope, if checkBody { body, err := readBody(req.Request) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } if len(body) > 0 { s, err := negotiateInputSerializer(req.Request, scope.Serializer) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } defaultGVK := scope.Kind.GroupVersion().WithKind("DeleteOptions") obj, _, err := scope.Serializer.DecoderToVersion(s, defaultGVK.GroupVersion()).Decode(body, &defaultGVK, options) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } if obj != options { - scope.err(fmt.Errorf("decoded object cannot be converted to DeleteOptions"), req, res) + scope.err(fmt.Errorf("decoded object cannot be converted to DeleteOptions"), res.ResponseWriter, req.Request) return } } @@ -750,7 +750,7 @@ func DeleteResource(r rest.GracefulDeleter, checkBody bool, scope RequestScope, err = admit.Admit(admission.NewAttributesRecord(nil, scope.Kind.GroupKind(), namespace, name, scope.Resource.GroupResource(), scope.Subresource, admission.Delete, userInfo)) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } } @@ -760,7 +760,7 @@ func DeleteResource(r rest.GracefulDeleter, checkBody bool, scope RequestScope, return r.Delete(ctx, name, options) }) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } trace.Step("Object deleted from database") @@ -780,7 +780,7 @@ func DeleteResource(r rest.GracefulDeleter, checkBody bool, scope RequestScope, // when a non-status response is returned, set the self link if _, ok := result.(*unversioned.Status); !ok { if err := setSelfLink(result, req, scope.Namer); err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } } @@ -799,7 +799,7 @@ func DeleteCollection(r rest.CollectionDeleter, checkBody bool, scope RequestSco namespace, err := scope.Namer.Namespace(req) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } @@ -811,14 +811,14 @@ func DeleteCollection(r rest.CollectionDeleter, checkBody bool, scope RequestSco err = admit.Admit(admission.NewAttributesRecord(nil, scope.Kind.GroupKind(), namespace, "", scope.Resource.GroupResource(), scope.Subresource, admission.Delete, userInfo)) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } } listOptions := api.ListOptions{} if err := scope.ParameterCodec.DecodeParameters(req.Request.URL.Query(), scope.Kind.GroupVersion(), &listOptions); err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } @@ -831,7 +831,7 @@ func DeleteCollection(r rest.CollectionDeleter, checkBody bool, scope RequestSco if listOptions.FieldSelector, err = listOptions.FieldSelector.Transform(fn); err != nil { // TODO: allow bad request to set field causes based on query parameters err = errors.NewBadRequest(err.Error()) - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } } @@ -840,23 +840,23 @@ func DeleteCollection(r rest.CollectionDeleter, checkBody bool, scope RequestSco if checkBody { body, err := readBody(req.Request) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } if len(body) > 0 { s, err := negotiateInputSerializer(req.Request, scope.Serializer) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } defaultGVK := scope.Kind.GroupVersion().WithKind("DeleteOptions") obj, _, err := scope.Serializer.DecoderToVersion(s, defaultGVK.GroupVersion()).Decode(body, &defaultGVK, options) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } if obj != options { - scope.err(fmt.Errorf("decoded object cannot be converted to DeleteOptions"), req, res) + scope.err(fmt.Errorf("decoded object cannot be converted to DeleteOptions"), res.ResponseWriter, req.Request) return } } @@ -866,7 +866,7 @@ func DeleteCollection(r rest.CollectionDeleter, checkBody bool, scope RequestSco return r.DeleteCollection(ctx, options, &listOptions) }) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } @@ -884,7 +884,7 @@ func DeleteCollection(r rest.CollectionDeleter, checkBody bool, scope RequestSco // when a non-status response is returned, set the self link if _, ok := result.(*unversioned.Status); !ok { if _, err := setListSelfLink(result, req, scope.Namer); err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } } diff --git a/pkg/apiserver/watch.go b/pkg/apiserver/watch.go index 8b951d9e539..086ebfe3d83 100644 --- a/pkg/apiserver/watch.go +++ b/pkg/apiserver/watch.go @@ -68,7 +68,7 @@ func (w *realTimeoutFactory) TimeoutCh() (<-chan time.Time, func() bool) { func serveWatch(watcher watch.Interface, scope RequestScope, req *restful.Request, res *restful.Response, timeout time.Duration) { s, mediaType, err := negotiateOutputSerializer(req.Request, scope.Serializer) if err != nil { - scope.err(err, req, res) + scope.err(err, res.ResponseWriter, req.Request) return } // TODO: replace with typed serialization From 470d7af8c9d8921b2a61b6d56a52756a5ac7e860 Mon Sep 17 00:00:00 2001 From: mqliang Date: Sun, 31 Jan 2016 11:49:31 +0800 Subject: [PATCH 028/328] pod cidr validation --- pkg/api/validation/validation.go | 10 +++++++-- pkg/api/validation/validation_test.go | 30 +++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/pkg/api/validation/validation.go b/pkg/api/validation/validation.go index 4594a7cffda..414a59ce730 100644 --- a/pkg/api/validation/validation.go +++ b/pkg/api/validation/validation.go @@ -1729,13 +1729,19 @@ func ValidateNodeUpdate(node, oldNode *api.Node) field.ErrorList { addresses[address] = true } + if len(oldNode.Spec.PodCIDR) == 0 { + // Allow the controller manager to assign a CIDR to a node if it doesn't have one. + oldNode.Spec.PodCIDR = node.Spec.PodCIDR + } else { + if oldNode.Spec.PodCIDR != node.Spec.PodCIDR { + allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "podCIDR"), "node updates may not change podCIDR except from \"\" to valid")) + } + } // TODO: move reset function to its own location // Ignore metadata changes now that they have been tested oldNode.ObjectMeta = node.ObjectMeta // Allow users to update capacity oldNode.Status.Capacity = node.Status.Capacity - // Allow the controller manager to assign a CIDR to a node. - oldNode.Spec.PodCIDR = node.Spec.PodCIDR // Allow users to unschedule node oldNode.Spec.Unschedulable = node.Spec.Unschedulable // Clear status diff --git a/pkg/api/validation/validation_test.go b/pkg/api/validation/validation_test.go index 2566fa369a4..3b2d5678f15 100644 --- a/pkg/api/validation/validation_test.go +++ b/pkg/api/validation/validation_test.go @@ -3035,6 +3035,36 @@ func TestValidateNodeUpdate(t *testing.T) { Labels: map[string]string{"foo": "baz"}, }, }, true}, + {api.Node{ + ObjectMeta: api.ObjectMeta{ + Name: "foo", + }, + Spec: api.NodeSpec{ + PodCIDR: "", + }, + }, api.Node{ + ObjectMeta: api.ObjectMeta{ + Name: "foo", + }, + Spec: api.NodeSpec{ + PodCIDR: "192.168.0.0/16", + }, + }, true}, + {api.Node{ + ObjectMeta: api.ObjectMeta{ + Name: "foo", + }, + Spec: api.NodeSpec{ + PodCIDR: "192.123.0.0/16", + }, + }, api.Node{ + ObjectMeta: api.ObjectMeta{ + Name: "foo", + }, + Spec: api.NodeSpec{ + PodCIDR: "192.168.0.0/16", + }, + }, false}, {api.Node{ ObjectMeta: api.ObjectMeta{ Name: "foo", From e3f4e823bae76331d0d3314e076ff9bafbf48dd3 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Sun, 31 Jan 2016 01:03:05 -0500 Subject: [PATCH 029/328] Allow the Kubelet Docker container prefix to be changed Enables running multiple Kubelets on the same instance for testing and for node bootstrapping experimentation --- pkg/kubelet/dockertools/docker.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkg/kubelet/dockertools/docker.go b/pkg/kubelet/dockertools/docker.go index 8d499c4db70..91f6ba1ae74 100644 --- a/pkg/kubelet/dockertools/docker.go +++ b/pkg/kubelet/dockertools/docker.go @@ -81,6 +81,17 @@ type KubeletContainerName struct { ContainerName string } +// containerNamePrefix is used to identify the containers on the node managed by this +// process. +var containerNamePrefix = "k8s" + +// SetContainerNamePrefix allows the container prefix name for this process to be changed. +// This is intended to support testing and bootstrapping experimentation. It cannot be +// changed once the Kubelet starts. +func SetContainerNamePrefix(prefix string) { + containerNamePrefix = prefix +} + // DockerPuller is an abstract interface for testability. It abstracts image pull operations. type DockerPuller interface { Pull(image string, secrets []api.Secret) error @@ -209,8 +220,6 @@ func (p throttledDockerPuller) IsImagePresent(name string) (bool, error) { return p.puller.IsImagePresent(name) } -const containerNamePrefix = "k8s" - // Creates a name which can be reversed to identify both full pod name and container name. func BuildDockerName(dockerName KubeletContainerName, container *api.Container) (string, string) { containerName := dockerName.ContainerName + "." + strconv.FormatUint(kubecontainer.HashContainer(container), 16) From 1c9b12fe7283ad895ba8ce10755713ae0f28f198 Mon Sep 17 00:00:00 2001 From: mqliang Date: Sun, 31 Jan 2016 21:14:08 +0800 Subject: [PATCH 030/328] make eventType versioned correctly --- pkg/client/unversioned/request.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/client/unversioned/request.go b/pkg/client/unversioned/request.go index 3789cdccd2a..d0d36c5c28b 100644 --- a/pkg/client/unversioned/request.go +++ b/pkg/client/unversioned/request.go @@ -361,6 +361,7 @@ var fieldMappings = versionToResourceToFieldMapping{ ObjectNameField: ObjectNameField, EventReason: EventReason, EventSource: EventSource, + EventType: EventType, EventInvolvedKind: EventInvolvedKind, EventInvolvedNamespace: EventInvolvedNamespace, EventInvolvedName: EventInvolvedName, From 426ef9335865ebef43f682da90796bd8bf976637 Mon Sep 17 00:00:00 2001 From: Michail Kargakis Date: Wed, 27 Jan 2016 16:17:17 +0100 Subject: [PATCH 031/328] docs: kubectl command structure and generators conventions --- docs/devel/kubectl-conventions.md | 136 +++++++++++++++++++++++++++--- 1 file changed, 126 insertions(+), 10 deletions(-) diff --git a/docs/devel/kubectl-conventions.md b/docs/devel/kubectl-conventions.md index 126fd71aaf5..ba72d6fb467 100644 --- a/docs/devel/kubectl-conventions.md +++ b/docs/devel/kubectl-conventions.md @@ -45,6 +45,8 @@ Updated: 8/27/2015 - [Flag conventions](#flag-conventions) - [Output conventions](#output-conventions) - [Documentation conventions](#documentation-conventions) + - [Command implementation conventions](#command-implementation-conventions) + - [Generators](#generators) @@ -59,19 +61,15 @@ Updated: 8/27/2015 ## Command conventions * Command names are all lowercase, and hyphenated if multiple words. -* kubectl VERB NOUNs for commands that apply to multiple resource types -* NOUNs may be specified as TYPE name1 name2 ... or TYPE/name1 TYPE/name2; TYPE is omitted when only a single type is expected -* Resource types are all lowercase, with no hyphens; both singular and plural forms are accepted +* kubectl VERB NOUNs for commands that apply to multiple resource types. +* NOUNs may be specified as `TYPE name1 name2` or `TYPE/name1 TYPE/name2` or `TYPE1,TYPE2,TYPE3/name1`; TYPE is omitted when only a single type is expected. +* Resource types are all lowercase, with no hyphens; both singular and plural forms are accepted. * NOUNs may also be specified by one or more file arguments: -f file1 -f file2 ... * Resource types may have 2- or 3-letter aliases. * Business logic should be decoupled from the command framework, so that it can be reused independently of kubectl, cobra, etc. - * Ideally, commonly needed functionality would be implemented server-side in order to avoid problems typical of "fat" clients and to make it readily available to non-Go clients -* Commands that generate resources, such as `run` or `expose`, should obey the following conventions: - * Flags should be converted to a parameter Go map or json map prior to invoking the generator - * The generator must be versioned so that users depending on a specific behavior may pin to that version, via `--generator=` - * Generation should be decoupled from creation - * `--dry-run` should output the resource that would be created, without creating it -* A command group (e.g., `kubectl config`) may be used to group related non-standard commands, such as custom generators, mutations, and computations + * Ideally, commonly needed functionality would be implemented server-side in order to avoid problems typical of "fat" clients and to make it readily available to non-Go clients. +* Commands that generate resources, such as `run` or `expose`, should obey specific conventions, see [generators](#generators). +* A command group (e.g., `kubectl config`) may be used to group related non-standard commands, such as custom generators, mutations, and computations. ## Flag conventions @@ -136,6 +134,124 @@ Updated: 8/27/2015 * Use "TYPE" for the particular flavor of resource type accepted by kubectl, rather than "RESOURCE" or "KIND" * Use "NAME" for resource names +## Command implementation conventions + +For every command there should be a `NewCmd` function that creates the command and returns a pointer to a `cobra.Command`, which can later be added to other parent commands to compose the structure tree. There should also be a `Config` struct with a variable to every flag and argument declared by the command (and any other variable required for the command to run). This makes tests and mocking easier. The struct ideally exposes three methods: + +* `Complete`: Completes the struct fields with values that may or may not be directly provided by the user, for example, by flags pointers, by the `args` slice, by using the Factory, etc. +* `Validate`: performs validation on the struct fields and returns appropriate errors. +* `Run`: runs the actual logic of the command, taking as assumption that the struct is complete with all required values to run, and they are valid. + +Sample command skeleton: + +```go +// MineRecommendedName is the recommended command name for kubectl mine. +const MineRecommendedName = "mine" + +// MineConfig contains all the options for running the mine cli command. +type MineConfig struct { + mineLatest bool +} + +const ( + mineLong = `Some long description +for my command.` + + mineExample = ` # Run my command's first action + $ %[1]s first + + # Run my command's second action on latest stuff + $ %[1]s second --latest` +) + +// NewCmdMine implements the kubectl mine command. +func NewCmdMine(parent, name string, f *cmdutil.Factory, out io.Writer) *cobra.Command { + opts := &MineConfig{} + + cmd := &cobra.Command{ + Use: fmt.Sprintf("%s [--latest]", name), + Short: "Run my command", + Long: mineLong, + Example: fmt.Sprintf(mineExample, parent+" "+name), + Run: func(cmd *cobra.Command, args []string) { + if err := opts.Complete(f, cmd, args, out); err != nil { + cmdutil.CheckErr(err) + } + if err := opts.Validate(); err != nil { + cmdutil.CheckErr(cmdutil.UsageError(cmd, err.Error())) + } + if err := opts.RunMine(); err != nil { + cmdutil.CheckErr(err) + } + }, + } + + cmd.Flags().BoolVar(&options.mineLatest, "latest", false, "Use latest stuff") + return cmd +} + +// Complete completes all the required options for mine. +func (o *MineConfig) Complete(f *cmdutil.Factory, cmd *cobra.Command, args []string, out io.Writer) error { + return nil +} + +// Validate validates all the required options for mine. +func (o MineConfig) Validate() error { + return nil +} + +// RunMine implements all the necessary functionality for mine. +func (o MineConfig) RunMine() error { + return nil +} +``` + +The `Run` method should contain the business logic of the command and as noted in [command conventions](#command-conventions), ideally that logic should exist server-side so any client could take advantage of it. Notice that this is not a mandatory structure and not every command is implemented this way, but this is a nice convention so try to be compliant with it. As an example, have a look at how [kubectl logs](../../pkg/kubectl/cmd/logs.go) is implemented. + +## Generators + +Generators are kubectl commands that generate resources based on a set of inputs (other resources, flags, or a combination of both). + +The point of generators is: +* to enable users using kubectl in a scripted fashion to pin to a particular behavior which may change in the future. Explicit use of a generator will always guarantee that the expected behavior stays the same. +* to enable potential expansion of the generated resources for scenarios other than just creation, similar to how -f is supported for most general-purpose commands. + +Generator commands shoud obey to the following conventions: +* A `--generator` flag should be defined. Users then can choose between different generators, if the command supports them (for example, `kubectl run` currently supports generators for pods, jobs, replication controllers, and deployments), or between different versions of a generator so that users depending on a specific behavior may pin to that version (for example, `kubectl expose` currently supports two different versions of a service generator). +* Generation should be decoupled from creation. A generator should implement the `kubectl.StructuredGenerator` interface and have no dependencies on cobra or the Factory. See, for example, how the first version of the namespace generator is defined: + +```go +// NamespaceGeneratorV1 supports stable generation of a namespace +type NamespaceGeneratorV1 struct { + // Name of namespace + Name string +} + +// Ensure it supports the generator pattern that uses parameters specified during construction +var _ StructuredGenerator = &NamespaceGeneratorV1{} + +// StructuredGenerate outputs a namespace object using the configured fields +func (g *NamespaceGeneratorV1) StructuredGenerate() (runtime.Object, error) { + if err := g.validate(); err != nil { + return nil, err + } + namespace := &api.Namespace{} + namespace.Name = g.Name + return namespace, nil +} + +// validate validates required fields are set to support structured generation +func (g *NamespaceGeneratorV1) validate() error { + if len(g.Name) == 0 { + return fmt.Errorf("name must be specified") + } + return nil +} +``` + +The generator struct (`NamespaceGeneratorV1`) holds the necessary fields for namespace generation. It also satisfies the `kubectl.StructuredGenerator` interface by implementing the `StructuredGenerate() (runtime.Object, error)` method which configures the generated namespace that callers of the generator (`kubectl create namespace` in our case) need to create. +* `--dry-run` should output the resource that would be created, without creating it. + [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/devel/kubectl-conventions.md?pixel)]() From e9c1d1ebd685367ac345979a6b51e9a7a1518be0 Mon Sep 17 00:00:00 2001 From: Jimmi Dyson Date: Sun, 31 Jan 2016 23:27:34 +0000 Subject: [PATCH 032/328] Do not move pid 1 to system container --- pkg/kubelet/cm/container_manager_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kubelet/cm/container_manager_linux.go b/pkg/kubelet/cm/container_manager_linux.go index 31d016e9ca7..f4748e9cd18 100644 --- a/pkg/kubelet/cm/container_manager_linux.go +++ b/pkg/kubelet/cm/container_manager_linux.go @@ -387,7 +387,7 @@ func ensureSystemContainer(rootContainer *fs.Manager, manager *fs.Manager) error // Remove kernel pids and other protected PIDs (pid 1, PIDs already in system & kubelet containers) pids := make([]int, 0, len(allPids)) for _, pid := range allPids { - if isKernelPid(pid) { + if pid == 1 || isKernelPid(pid) { continue } From 6aaabc6f46e4a67df1f958791e164cd05985dd82 Mon Sep 17 00:00:00 2001 From: gmarek Date: Mon, 1 Feb 2016 12:37:38 +0100 Subject: [PATCH 033/328] Allow some NotReady nodes in 1000 node clusters --- cluster/validate-cluster.sh | 22 ++++++++++++++++++++-- hack/jenkins/e2e.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/cluster/validate-cluster.sh b/cluster/validate-cluster.sh index 017ba477a54..c6d0622b19f 100755 --- a/cluster/validate-cluster.sh +++ b/cluster/validate-cluster.sh @@ -15,6 +15,10 @@ # limitations under the License. # Validates that the cluster is healthy. +# Error codes are: +# 0 - success +# 1 - fatal (cluster is unlikely to work) +# 2 - non-fatal (encountered some errors, but cluster should be working correctly) set -o errexit set -o nounset @@ -29,11 +33,14 @@ fi source "${KUBE_ROOT}/cluster/kube-env.sh" source "${KUBE_ROOT}/cluster/kube-util.sh" +ALLOWED_NOTREADY_NODES="${ALLOWED_NOTREADY_NODES:-0}" + EXPECTED_NUM_NODES="${NUM_NODES}" if [[ "${REGISTER_MASTER_KUBELET:-}" == "true" ]]; then EXPECTED_NUM_NODES=$((EXPECTED_NUM_NODES+1)) fi # Make several attempts to deal with slow cluster birth. +return_value=0 attempt=0 while true; do # The "kubectl get nodes -o template" exports node information. @@ -59,7 +66,12 @@ while true; do if (( attempt > 100 )); then echo -e "${color_red}Detected ${ready} ready nodes, found ${found} nodes out of expected ${EXPECTED_NUM_NODES}. Your cluster may not be fully functional.${color_norm}" "${KUBE_ROOT}/cluster/kubectl.sh" get nodes - exit 2 + if [ "$((${EXPECTED_NUM_NODES} - ${found}))" -gt "${ALLOWED_NOTREADY_NODES}" ]; then + exit 1 + else + return_value=2 + break + fi else echo -e "${color_yellow}Waiting for ${EXPECTED_NUM_NODES} ready nodes. ${ready} ready nodes, ${found} registered. Retrying.${color_norm}" fi @@ -99,4 +111,10 @@ done echo "Validate output:" "${KUBE_ROOT}/cluster/kubectl.sh" get cs -echo -e "${color_green}Cluster validation succeeded${color_norm}" +if [ "${return_value}" == "0" ]; then + echo -e "${color_green}Cluster validation succeeded${color_norm}" +else + echo -e "${color_yellow}Cluster validation encountered some problems, but cluster should be in working order${color_norm}" +fi + +exit "${return_value}" diff --git a/hack/jenkins/e2e.sh b/hack/jenkins/e2e.sh index d10b5155cd8..fffd1d790a3 100755 --- a/hack/jenkins/e2e.sh +++ b/hack/jenkins/e2e.sh @@ -508,6 +508,7 @@ case ${JOB_NAME} in # Runs the performance/scalability test on huge 1000-node cluster on GCE. # Flannel is used as network provider. + # Allows a couple of nodes to be NotReady during startup kubernetes-e2e-gce-enormous-cluster) : ${E2E_CLUSTER_NAME:="jenkins-gce-enormous-cluster"} : ${E2E_NETWORK:="e2e-enormous-cluster"} @@ -526,6 +527,32 @@ case ${JOB_NAME} in NODE_SIZE="n1-standard-1" NODE_DISK_SIZE="50GB" NUM_NODES="1000" + ALLOWED_NOTREADY_NODES="2" + # Reduce logs verbosity + TEST_CLUSTER_LOG_LEVEL="--v=1" + # Increase resync period to simulate production + TEST_CLUSTER_RESYNC_PERIOD="--min-resync-period=12h" + ;; + + # Starts and tears down 1000-node cluster on GCE using flannel networking + # Requires all 1000 nodes to come up. + kubernetes-e2e-gce-enormous-startup) + : ${E2E_CLUSTER_NAME:="jenkins-gce-enormous-startup"} + # TODO: increase a quota for networks in kubernetes-scale and move this test to its own network + : ${E2E_NETWORK:="e2e-enormous-cluster"} + : ${E2E_TEST:="false"} + : ${KUBE_GCE_INSTANCE_PREFIX:="e2e-enormous-startup"} + : ${PROJECT:="kubernetes-scale"} + # Override GCE defaults. + NETWORK_PROVIDER="flannel" + # Temporarily switch of Heapster, as this will not schedule anywhere. + # TODO: Think of a solution to enable it. + ENABLE_CLUSTER_MONITORING="none" + E2E_ZONE="asia-east1-a" + MASTER_SIZE="n1-standard-32" + NODE_SIZE="n1-standard-1" + NODE_DISK_SIZE="50GB" + NUM_NODES="1000" # Reduce logs verbosity TEST_CLUSTER_LOG_LEVEL="--v=1" # Increase resync period to simulate production @@ -900,6 +927,7 @@ export KUBE_GCE_NODE_IMAGE=${KUBE_GCE_NODE_IMAGE:-} export KUBE_OS_DISTRIBUTION=${KUBE_OS_DISTRIBUTION:-} export GCE_SERVICE_ACCOUNT=$(gcloud auth list 2> /dev/null | grep active | cut -f3 -d' ') export FAIL_ON_GCP_RESOURCE_LEAK="${FAIL_ON_GCP_RESOURCE_LEAK:-false}" +export ALLOWED_NOTREADY_NODES=${ALLOWED_NOTREADY_NODES:-} # GKE variables export CLUSTER_NAME=${E2E_CLUSTER_NAME} From 63b61a7205b17679e24bb0c1b6c37dded1bb3e0a Mon Sep 17 00:00:00 2001 From: Kyle Gordon Date: Mon, 1 Feb 2016 11:41:49 +0000 Subject: [PATCH 034/328] Use kube account to make changes via govc Use -l kube:kube to login to VM and make changes before public key is inserted. Fixes #14366 --- cluster/vsphere/util.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cluster/vsphere/util.sh b/cluster/vsphere/util.sh index d41cbea756f..0bc488cb351 100755 --- a/cluster/vsphere/util.sh +++ b/cluster/vsphere/util.sh @@ -188,6 +188,7 @@ function kube-up-vm { govc vm.ip "${vm_name}" > /dev/null govc guest.mkdir \ + -l "kube:kube" \ -vm="${vm_name}" \ -p \ /home/kube/.ssh @@ -195,6 +196,7 @@ function kube-up-vm { ssh-add -L > "${KUBE_TEMP}/${vm_name}-authorized_keys" govc guest.upload \ + -l "kube:kube" \ -vm="${vm_name}" \ -f \ "${KUBE_TEMP}/${vm_name}-authorized_keys" \ @@ -209,7 +211,7 @@ function kube-run { local vm_name="$1" local file="$2" local dst="/tmp/$(basename "${file}")" - govc guest.upload -vm="${vm_name}" -f -perm=0755 "${file}" "${dst}" + govc guest.upload -l "kube:kube" -vm="${vm_name}" -f -perm=0755 "${file}" "${dst}" echo "uploaded ${file} to ${dst}" local vm_ip vm_ip=$(govc vm.ip "${vm_name}") From 05565ff7e5f6ab91abf983ade9182e4994638676 Mon Sep 17 00:00:00 2001 From: Marcin Wielgus Date: Fri, 29 Jan 2016 12:20:19 +0100 Subject: [PATCH 035/328] CustomMetrics in HPA controller --- pkg/controller/podautoscaler/horizontal.go | 114 +++++++++++++++++- .../podautoscaler/horizontal_test.go | 63 ++++++++++ 2 files changed, 172 insertions(+), 5 deletions(-) diff --git a/pkg/controller/podautoscaler/horizontal.go b/pkg/controller/podautoscaler/horizontal.go index 4220f6158fc..b73c1b15c69 100644 --- a/pkg/controller/podautoscaler/horizontal.go +++ b/pkg/controller/podautoscaler/horizontal.go @@ -17,12 +17,14 @@ limitations under the License. package podautoscaler import ( + "encoding/json" "fmt" "math" "time" "github.com/golang/glog" "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/record" @@ -35,6 +37,9 @@ const ( // Usage shoud exceed the tolerance before we start downscale or upscale the pods. // TODO: make it a flag or HPA spec element. tolerance = 0.1 + + HpaCustomMetricsDefinitionAnnotationName = "alpha/definiton.custom-metrics.podautoscaler.kubernetes.io" + HpaCustomMetricsStatusAnnotationName = "alpha/status.custom-metrics.podautoscaler.kubernetes.io" ) type HorizontalController struct { @@ -93,6 +98,71 @@ func (a *HorizontalController) computeReplicasForCPUUtilization(hpa extensions.H } } +// Computes the desired number of replicas based on the CustomMetrics passed in cmAnnotation as json-serialized +// extensions.CustomMetricsTargetList. +// Returns number of replicas, status string (also json-serialized extensions.CustomMetricsCurrentStatusList), +// last timestamp of the metrics involved in computations or error, if occurred. +func (a *HorizontalController) computeReplicasForCustomMetrics(hpa extensions.HorizontalPodAutoscaler, scale *extensions.Scale, + cmAnnotation string) (int, string, time.Time, error) { + + currentReplicas := scale.Status.Replicas + replicas := 0 + timestamp := time.Time{} + + if cmAnnotation == "" { + return 0, "", time.Time{}, nil + } + + var targetList extensions.CustomMetricTargetList + if err := json.Unmarshal([]byte(cmAnnotation), &targetList); err != nil { + return 0, "", time.Time{}, fmt.Errorf("failed to parse custom metrics annotation: %v", err) + } + if len(targetList.Items) == 0 { + return 0, "", time.Time{}, fmt.Errorf("no custom metrics in annotation") + } + + statusList := extensions.CustomMetricCurrentStatusList{ + Items: make([]extensions.CustomMetricCurrentStatus, 0), + } + + for _, customMetricTarget := range targetList.Items { + value, currentTimestamp, err := a.metricsClient.GetCustomMetric(customMetricTarget.Name, hpa.Namespace, scale.Status.Selector) + // TODO: what to do on partial errors (like metrics obtained for 75% of pods). + if err != nil { + a.eventRecorder.Event(&hpa, api.EventTypeWarning, "FailedGetCustomMetrics", err.Error()) + return 0, "", time.Time{}, fmt.Errorf("failed to get custom metric value: %v", err) + } + floatTarget := float64(customMetricTarget.TargetValue.MilliValue()) / 1000.0 + usageRatio := *value / floatTarget + + replicaCountProposal := 0 + if math.Abs(1.0-usageRatio) > tolerance { + replicaCountProposal = int(math.Ceil(usageRatio * float64(currentReplicas))) + } else { + replicaCountProposal = currentReplicas + } + if replicaCountProposal > replicas { + timestamp = currentTimestamp + replicas = replicaCountProposal + } + quantity, err := resource.ParseQuantity(fmt.Sprintf("%.3f", *value)) + if err != nil { + return 0, "", time.Time{}, fmt.Errorf("failed to set custom metric value: %v", err) + } + statusList.Items = append(statusList.Items, extensions.CustomMetricCurrentStatus{ + Name: customMetricTarget.Name, + CurrentValue: *quantity, + }) + } + byteStatusList, err := json.Marshal(statusList) + if err != nil { + return 0, "", time.Time{}, fmt.Errorf("failed to serialize custom metric status: %v", err) + } + + return replicas, string(byteStatusList), timestamp, nil + +} + func (a *HorizontalController) reconcileAutoscaler(hpa extensions.HorizontalPodAutoscaler) error { reference := fmt.Sprintf("%s/%s/%s", hpa.Spec.ScaleRef.Kind, hpa.Namespace, hpa.Spec.ScaleRef.Name) @@ -103,10 +173,40 @@ func (a *HorizontalController) reconcileAutoscaler(hpa extensions.HorizontalPodA } currentReplicas := scale.Status.Replicas - desiredReplicas, currentUtilization, timestamp, err := a.computeReplicasForCPUUtilization(hpa, scale) - if err != nil { - a.eventRecorder.Event(&hpa, api.EventTypeWarning, "FailedComputeReplicas", err.Error()) - return fmt.Errorf("failed to compute desired number of replicas based on CPU utilization for %s: %v", reference, err) + cpuDesiredReplicas := 0 + var cpuCurrentUtilization *int = nil + cpuTimestamp := time.Time{} + + cmDesiredReplicas := 0 + cmStatus := "" + cmTimestamp := time.Time{} + + if hpa.Spec.CPUUtilization != nil { + cpuDesiredReplicas, cpuCurrentUtilization, cpuTimestamp, err = a.computeReplicasForCPUUtilization(hpa, scale) + if err != nil { + a.eventRecorder.Event(&hpa, api.EventTypeWarning, "FailedComputeReplicas", err.Error()) + return fmt.Errorf("failed to compute desired number of replicas based on CPU utilization for %s: %v", reference, err) + } + } + + if cmAnnotation, cmAnnotationFound := hpa.Annotations[HpaCustomMetricsDefinitionAnnotationName]; cmAnnotationFound { + cmDesiredReplicas, cmStatus, cmTimestamp, err = a.computeReplicasForCustomMetrics(hpa, scale, cmAnnotation) + if err != nil { + a.eventRecorder.Event(&hpa, api.EventTypeWarning, "FailedComputeCMReplicas", err.Error()) + return fmt.Errorf("failed to compute desired number of replicas based on Custom Metrics for %s: %v", reference, err) + } + } + + desiredReplicas := 0 + timestamp := time.Time{} + + if cpuDesiredReplicas > desiredReplicas { + desiredReplicas = cpuDesiredReplicas + timestamp = cpuTimestamp + } + if cmDesiredReplicas > desiredReplicas { + desiredReplicas = cmDesiredReplicas + timestamp = cmTimestamp } if hpa.Spec.MinReplicas != nil && desiredReplicas < *hpa.Spec.MinReplicas { @@ -158,9 +258,13 @@ func (a *HorizontalController) reconcileAutoscaler(hpa extensions.HorizontalPodA hpa.Status = extensions.HorizontalPodAutoscalerStatus{ CurrentReplicas: currentReplicas, DesiredReplicas: desiredReplicas, - CurrentCPUUtilizationPercentage: currentUtilization, + CurrentCPUUtilizationPercentage: cpuCurrentUtilization, LastScaleTime: hpa.Status.LastScaleTime, } + if cmStatus != "" { + hpa.Annotations[HpaCustomMetricsStatusAnnotationName] = cmStatus + } + if rescale { now := unversioned.NewTime(time.Now()) hpa.Status.LastScaleTime = &now diff --git a/pkg/controller/podautoscaler/horizontal_test.go b/pkg/controller/podautoscaler/horizontal_test.go index bd0bd63b691..c60bb812e54 100644 --- a/pkg/controller/podautoscaler/horizontal_test.go +++ b/pkg/controller/podautoscaler/horizontal_test.go @@ -62,6 +62,7 @@ type testCase struct { CPUTarget int reportedLevels []uint64 reportedCPURequests []resource.Quantity + cmTarget *extensions.CustomMetricTargetList scaleUpdated bool eventCreated bool verifyEvents bool @@ -101,6 +102,14 @@ func (tc *testCase) prepareTestClient(t *testing.T) *testclient.Fake { if tc.CPUTarget > 0.0 { obj.Items[0].Spec.CPUUtilization = &extensions.CPUTargetUtilization{TargetPercentage: tc.CPUTarget} } + if tc.cmTarget != nil { + b, err := json.Marshal(tc.cmTarget) + if err != nil { + t.Fatalf("Failed to marshal cm: %v", err) + } + obj.Items[0].Annotations = make(map[string]string) + obj.Items[0].Annotations[HpaCustomMetricsDefinitionAnnotationName] = string(b) + } return true, obj, nil }) @@ -229,6 +238,25 @@ func TestScaleUp(t *testing.T) { tc.runTest(t) } +func TestScaleUpCM(t *testing.T) { + tc := testCase{ + minReplicas: 2, + maxReplicas: 6, + initialReplicas: 3, + desiredReplicas: 4, + CPUTarget: 0, + cmTarget: &extensions.CustomMetricTargetList{ + Items: []extensions.CustomMetricTarget{{ + Name: "qps", + TargetValue: resource.MustParse("15.0"), + }}, + }, + reportedLevels: []uint64{20, 10, 30}, + reportedCPURequests: []resource.Quantity{resource.MustParse("1.0"), resource.MustParse("1.0"), resource.MustParse("1.0")}, + } + tc.runTest(t) +} + func TestScaleDown(t *testing.T) { tc := testCase{ minReplicas: 2, @@ -242,6 +270,24 @@ func TestScaleDown(t *testing.T) { tc.runTest(t) } +func TestScaleDownCM(t *testing.T) { + tc := testCase{ + minReplicas: 2, + maxReplicas: 6, + initialReplicas: 5, + desiredReplicas: 3, + CPUTarget: 0, + cmTarget: &extensions.CustomMetricTargetList{ + Items: []extensions.CustomMetricTarget{{ + Name: "qps", + TargetValue: resource.MustParse("20"), + }}}, + reportedLevels: []uint64{12, 12, 12, 12, 12}, + reportedCPURequests: []resource.Quantity{resource.MustParse("1.0"), resource.MustParse("1.0"), resource.MustParse("1.0"), resource.MustParse("1.0"), resource.MustParse("1.0")}, + } + tc.runTest(t) +} + func TestTolerance(t *testing.T) { tc := testCase{ minReplicas: 1, @@ -255,6 +301,23 @@ func TestTolerance(t *testing.T) { tc.runTest(t) } +func TestToleranceCM(t *testing.T) { + tc := testCase{ + minReplicas: 1, + maxReplicas: 5, + initialReplicas: 3, + desiredReplicas: 3, + cmTarget: &extensions.CustomMetricTargetList{ + Items: []extensions.CustomMetricTarget{{ + Name: "qps", + TargetValue: resource.MustParse("20"), + }}}, + reportedLevels: []uint64{20, 21, 21}, + reportedCPURequests: []resource.Quantity{resource.MustParse("0.9"), resource.MustParse("1.0"), resource.MustParse("1.1")}, + } + tc.runTest(t) +} + func TestMinReplicas(t *testing.T) { tc := testCase{ minReplicas: 2, From efacc0435e12f4bd012fb34e56e1a60c380e1525 Mon Sep 17 00:00:00 2001 From: gmarek Date: Mon, 1 Feb 2016 14:26:31 +0100 Subject: [PATCH 036/328] Add a flag to allow non-fatal errors in validate-cluster --- cluster/kube-up.sh | 14 +++++++++++++- hack/jenkins/e2e.sh | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/cluster/kube-up.sh b/cluster/kube-up.sh index 55894074149..d9d58c81b26 100755 --- a/cluster/kube-up.sh +++ b/cluster/kube-up.sh @@ -25,6 +25,7 @@ set -o nounset set -o pipefail KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. +EXIT_ON_WEAK_ERROR="${EXIT_ON_WEAK_ERROR:-true}" if [ -f "${KUBE_ROOT}/cluster/env.sh" ]; then source "${KUBE_ROOT}/cluster/env.sh" @@ -47,7 +48,18 @@ echo "... calling kube-up" >&2 kube-up echo "... calling validate-cluster" >&2 -validate-cluster +if [[ "${EXIT_ON_WEAK_ERROR}" == "true" ]]; then + validate-cluster +else + if ! validate-cluster; then + local validate_result="$?" + if [[ "${validate_result}" == "1" ]]; then + exit 1 + elif [[ "${validate_result}" == "2" ]]; then + echo "...ignoring non-fatal errors in validate-cluster" >&2 + fi + fi +fi echo -e "Done, listing cluster services:\n" >&2 "${KUBE_ROOT}/cluster/kubectl.sh" cluster-info diff --git a/hack/jenkins/e2e.sh b/hack/jenkins/e2e.sh index fffd1d790a3..24fd383b7ab 100755 --- a/hack/jenkins/e2e.sh +++ b/hack/jenkins/e2e.sh @@ -528,6 +528,7 @@ case ${JOB_NAME} in NODE_DISK_SIZE="50GB" NUM_NODES="1000" ALLOWED_NOTREADY_NODES="2" + EXIT_ON_WEAK_ERROR="false" # Reduce logs verbosity TEST_CLUSTER_LOG_LEVEL="--v=1" # Increase resync period to simulate production @@ -928,6 +929,7 @@ export KUBE_OS_DISTRIBUTION=${KUBE_OS_DISTRIBUTION:-} export GCE_SERVICE_ACCOUNT=$(gcloud auth list 2> /dev/null | grep active | cut -f3 -d' ') export FAIL_ON_GCP_RESOURCE_LEAK="${FAIL_ON_GCP_RESOURCE_LEAK:-false}" export ALLOWED_NOTREADY_NODES=${ALLOWED_NOTREADY_NODES:-} +export EXIT_ON_WEAK_ERROR=${EXIT_ON_WEAK_ERROR:-} # GKE variables export CLUSTER_NAME=${E2E_CLUSTER_NAME} From b795a1021d3d781b2d9adc5e5df038deb5cd2601 Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Mon, 1 Feb 2016 12:22:18 -0500 Subject: [PATCH 037/328] bump(docker/spdystream):106e140db2cb50923efe088bf2906b2ee5a45fec --- Godeps/Godeps.json | 2 +- .../_workspace/src/github.com/docker/spdystream/connection.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 5847fcde6da..bb07e42dbc1 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -403,7 +403,7 @@ }, { "ImportPath": "github.com/docker/spdystream", - "Rev": "c33989bcb56748d2473194d11f8ac3fc563688eb" + "Rev": "106e140db2cb50923efe088bf2906b2ee5a45fec" }, { "ImportPath": "github.com/elazarl/go-bindata-assetfs", diff --git a/Godeps/_workspace/src/github.com/docker/spdystream/connection.go b/Godeps/_workspace/src/github.com/docker/spdystream/connection.go index aa6c75202e3..6031a0db1ab 100644 --- a/Godeps/_workspace/src/github.com/docker/spdystream/connection.go +++ b/Godeps/_workspace/src/github.com/docker/spdystream/connection.go @@ -320,6 +320,7 @@ func (s *Connection) Serve(newHandler StreamHandler) { partitionRoundRobin int goAwayFrame *spdy.GoAwayFrame ) +Loop: for { readFrame, err := s.framer.ReadFrame() if err != nil { @@ -362,7 +363,7 @@ func (s *Connection) Serve(newHandler StreamHandler) { case *spdy.GoAwayFrame: // hold on to the go away frame and exit the loop goAwayFrame = frame - break + break Loop default: priority = 7 partition = partitionRoundRobin From 3d1972054f8a3af5f20668140551a23b9a956eb4 Mon Sep 17 00:00:00 2001 From: Yu-Ju Hong Date: Mon, 1 Feb 2016 10:29:45 -0800 Subject: [PATCH 038/328] Adjust the limits in the kubelet resource tracking test The new limits reflect the recent changes in kubelet, and also account for noise better. --- test/e2e/kubelet_perf.go | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/test/e2e/kubelet_perf.go b/test/e2e/kubelet_perf.go index f428ee1478f..59fcf242bae 100644 --- a/test/e2e/kubelet_perf.go +++ b/test/e2e/kubelet_perf.go @@ -160,17 +160,25 @@ var _ = Describe("Kubelet [Serial] [Slow]", func() { rm.Stop() }) Describe("regular resource usage tracking", func() { + // We assume that the scheduler will make reasonable scheduling choices + // and assign ~N pods on the node. + // Although we want to track N pods per node, there are N + add-on pods + // in the cluster. The cluster add-on pods can be distributed unevenly + // among the nodes because they are created during the cluster + // initialization. This *noise* is obvious when N is small. We + // deliberately set higher resource usage limits to account for the + // noise. rTests := []resourceTest{ {podsPerNode: 0, limits: containersCPUSummary{ - "/kubelet": {0.50: 0.05, 0.95: 0.15}, - "/docker-daemon": {0.50: 0.03, 0.95: 0.06}, + "/kubelet": {0.50: 0.06, 0.95: 0.08}, + "/docker-daemon": {0.50: 0.05, 0.95: 0.06}, }, }, {podsPerNode: 35, limits: containersCPUSummary{ - "/kubelet": {0.50: 0.15, 0.95: 0.35}, - "/docker-daemon": {0.50: 0.06, 0.95: 0.30}, + "/kubelet": {0.50: 0.12, 0.95: 0.14}, + "/docker-daemon": {0.50: 0.06, 0.95: 0.08}, }, }, } From c929d81d524c1b6afded30d44a0f1d039bbfd0e3 Mon Sep 17 00:00:00 2001 From: Isaac Hollander McCreery Date: Mon, 1 Feb 2016 10:40:23 -0800 Subject: [PATCH 039/328] Use [Feature:ComprehensiveNamespaceDraining] instead of PIt --- test/e2e/namespace.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/namespace.go b/test/e2e/namespace.go index 49e8b2375fa..bf8cf87b831 100644 --- a/test/e2e/namespace.go +++ b/test/e2e/namespace.go @@ -120,7 +120,7 @@ var _ = Describe("Namespaces [Serial]", func() { It("should delete fast enough (90 percent of 100 namespaces in 150 seconds)", func() { extinguish(c, 100, 10, 150) }) - //comprehensive draining ; uncomment after #7372 - PIt("should always delete fast (ALL of 100 namespaces in 150 seconds)", + // On hold until etcd3; see #7372 + It("should always delete fast (ALL of 100 namespaces in 150 seconds) [Feature:ComprehensiveNamespaceDraining]", func() { extinguish(c, 100, 0, 150) }) }) From 4f50292347642b31d4c22cb8fcc0c141b26a557f Mon Sep 17 00:00:00 2001 From: Prashanth Balasubramanian Date: Sat, 30 Jan 2016 12:56:47 -0800 Subject: [PATCH 040/328] Create new ingress suite. --- hack/jenkins/e2e.sh | 27 ++++++++++++++++++++ hack/jenkins/job-configs/kubernetes-e2e.yaml | 10 ++++++++ 2 files changed, 37 insertions(+) diff --git a/hack/jenkins/e2e.sh b/hack/jenkins/e2e.sh index 98977130962..d90c5fabdbb 100755 --- a/hack/jenkins/e2e.sh +++ b/hack/jenkins/e2e.sh @@ -364,6 +364,33 @@ case ${JOB_NAME} in ADMISSION_CONTROL="NamespaceLifecycle,InitialResources,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota" ;; + # Runs only the ingress tests on GCE. + kubernetes-e2e-gce-ingress) + : ${E2E_CLUSTER_NAME:="jenkins-gce-e2e-ingress"} + : ${E2E_NETWORK:="e2e-ingress"} + : ${GINKGO_TEST_ARGS:="--ginkgo.focus=\[Feature:Ingress\]"} + : ${KUBE_GCE_INSTANCE_PREFIX:="e2e-ingress"} + : ${FAIL_ON_GCP_RESOURCE_LEAK:="true"} + # TODO: Move this into a different project. Currently, since this test + # shares resources with various other networking tests, so it's easier + # to zero in on the source of a leak if it's run in isolation. + : ${PROJECT:="kubernetes-flannel"} + ;; + + # Runs only the ingress tests on GKE. + kubernetes-e2e-gke-ingress) + : ${E2E_CLUSTER_NAME:="jenkins-gke-e2e-ingress"} + : ${E2E_NETWORK:="e2e-gke-ingress"} + : ${E2E_SET_CLUSTER_API_VERSION:=y} + : ${GINKGO_TEST_ARGS:="--ginkgo.focus=\[Feature:Ingress\]"} + : ${FAIL_ON_GCP_RESOURCE_LEAK:="true"} + : ${KUBE_GCE_INSTANCE_PREFIX:="e2e-gke-ingress"} + # TODO: Move this into a different project. Currently, since this test + # shares resources with various other networking tests, it's easier to + # zero in on the source of a leak if it's run in isolation. + : ${PROJECT:="kubernetes-flannel"} + ;; + # Runs the flaky tests on GCE, sequentially. kubernetes-e2e-gce-flaky) : ${E2E_CLUSTER_NAME:="jenkins-gce-e2e-flaky"} diff --git a/hack/jenkins/job-configs/kubernetes-e2e.yaml b/hack/jenkins/job-configs/kubernetes-e2e.yaml index 354f8a3e64a..743737f9c3e 100644 --- a/hack/jenkins/job-configs/kubernetes-e2e.yaml +++ b/hack/jenkins/job-configs/kubernetes-e2e.yaml @@ -212,5 +212,15 @@ timeout: 300 emails: '$DEFAULT_RECIPIENTS, ihmccreery@google.com' test-owner: 'ihmccreery' + - 'gke-ingress': + description: 'Run [Feature:Ingress] tests on GKE using the latest successful build.' + timeout: 90 + emails: '$DEFAULT_RECIPIENTS, beeps@google.com' + test-owner: 'beeps' + - 'gce-ingress': + description: 'Run [Feature:Ingress] tests on GCE using the latest successful build.' + timeout: 90 + emails: '$DEFAULT_RECIPIENTS, beeps@google.com' + test-owner: 'beeps' jobs: - 'kubernetes-e2e-{suffix}' From 02dec92b1dea7b31293080620b534d159e5f87c2 Mon Sep 17 00:00:00 2001 From: deads2k Date: Mon, 1 Feb 2016 15:25:14 -0500 Subject: [PATCH 041/328] tighten api server installation for bad groups --- pkg/genericapiserver/genericapiserver.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/genericapiserver/genericapiserver.go b/pkg/genericapiserver/genericapiserver.go index 538094b2153..bc32168a257 100644 --- a/pkg/genericapiserver/genericapiserver.go +++ b/pkg/genericapiserver/genericapiserver.go @@ -674,6 +674,15 @@ func (s *GenericAPIServer) installAPIGroup(apiGroupInfo *APIGroupInfo) error { // Add a handler at /api to enumerate the supported api versions. apiserver.AddApiWebService(s.Serializer, s.HandlerContainer, apiPrefix, apiVersions) } else { + // Do not register empty group or empty version. Doing so claims /apis/ for the wrong entity to be returned. + // Catching these here places the error much closer to its origin + if len(apiGroupInfo.GroupMeta.GroupVersion.Group) == 0 { + return fmt.Errorf("cannot register handler with an empty group for %#v", *apiGroupInfo) + } + if len(apiGroupInfo.GroupMeta.GroupVersion.Version) == 0 { + return fmt.Errorf("cannot register handler with an empty version for %#v", *apiGroupInfo) + } + // Add a handler at /apis/ to enumerate all versions supported by this group. apiVersionsForDiscovery := []unversioned.GroupVersionForDiscovery{} for _, groupVersion := range apiGroupInfo.GroupMeta.GroupVersions { From a5e00da8678d7d20d71ec7f6f2a0b56d6040429c Mon Sep 17 00:00:00 2001 From: Maru Newby Date: Wed, 16 Dec 2015 22:35:10 +0000 Subject: [PATCH 042/328] Fix nodeport service compat with default-deny fw --- pkg/proxy/userspace/proxier.go | 68 +++++++++++++++++++++++++++++----- pkg/util/iptables/iptables.go | 4 +- test/e2e/service.go | 3 ++ 3 files changed, 65 insertions(+), 10 deletions(-) diff --git a/pkg/proxy/userspace/proxier.go b/pkg/proxy/userspace/proxier.go index f06210cba3a..3fc92f5cc96 100644 --- a/pkg/proxy/userspace/proxier.go +++ b/pkg/proxy/userspace/proxier.go @@ -213,18 +213,28 @@ func CleanupLeftovers(ipt iptables.Interface) (encounteredError bool) { glog.Errorf("Error removing userspace rule: %v", err) encounteredError = true } + args = []string{"-m", "comment", "--comment", "Ensure that non-local NodePort traffic can flow"} + if err := ipt.DeleteRule(iptables.TableFilter, iptables.ChainInput, append(args, "-j", string(iptablesNonLocalNodePortChain))...); err != nil { + glog.Errorf("Error removing userspace rule: %v", err) + encounteredError = true + } // flush and delete chains. - chains := []iptables.Chain{iptablesContainerPortalChain, iptablesHostPortalChain, iptablesHostNodePortChain, iptablesContainerNodePortChain} - for _, c := range chains { - // flush chain, then if successful delete, delete will fail if flush fails. - if err := ipt.FlushChain(iptables.TableNAT, c); err != nil { - glog.Errorf("Error flushing userspace chain: %v", err) - encounteredError = true - } else { - if err = ipt.DeleteChain(iptables.TableNAT, c); err != nil { - glog.Errorf("Error deleting userspace chain: %v", err) + tableChains := map[iptables.Table][]iptables.Chain{ + iptables.TableNAT: {iptablesContainerPortalChain, iptablesHostPortalChain, iptablesHostNodePortChain, iptablesContainerNodePortChain}, + iptables.TableFilter: {iptablesNonLocalNodePortChain}, + } + for table, chains := range tableChains { + for _, c := range chains { + // flush chain, then if successful delete, delete will fail if flush fails. + if err := ipt.FlushChain(table, c); err != nil { + glog.Errorf("Error flushing userspace chain: %v", err) encounteredError = true + } else { + if err = ipt.DeleteChain(table, c); err != nil { + glog.Errorf("Error deleting userspace chain: %v", err) + encounteredError = true + } } } } @@ -626,6 +636,17 @@ func (proxier *Proxier) openNodePort(nodePort int, protocol api.Protocol, proxyI if !existed { glog.Infof("Opened iptables from-host public port for service %q on %s port %d", name, protocol, nodePort) } + + args = proxier.iptablesNonLocalNodePortArgs(nodePort, protocol, proxyIP, proxyPort, name) + existed, err = proxier.iptables.EnsureRule(iptables.Append, iptables.TableFilter, iptablesNonLocalNodePortChain, args...) + if err != nil { + glog.Errorf("Failed to install iptables %s rule for service %q", iptablesNonLocalNodePortChain, name) + return err + } + if !existed { + glog.Infof("Opened iptables from-non-local public port for service %q on %s port %d", name, protocol, nodePort) + } + return nil } @@ -711,6 +732,13 @@ func (proxier *Proxier) closeNodePort(nodePort int, protocol api.Protocol, proxy el = append(el, err) } + // Handle traffic not local to the host + args = proxier.iptablesNonLocalNodePortArgs(nodePort, protocol, proxyIP, proxyPort, name) + if err := proxier.iptables.DeleteRule(iptables.TableFilter, iptablesNonLocalNodePortChain, args...); err != nil { + glog.Errorf("Failed to delete iptables %s rule for service %q", iptablesNonLocalNodePortChain, name) + el = append(el, err) + } + if err := proxier.releaseNodePort(nil, nodePort, protocol, name); err != nil { el = append(el, err) } @@ -743,6 +771,7 @@ var iptablesHostPortalChain iptables.Chain = "KUBE-PORTALS-HOST" // Chains for NodePort services var iptablesContainerNodePortChain iptables.Chain = "KUBE-NODEPORT-CONTAINER" var iptablesHostNodePortChain iptables.Chain = "KUBE-NODEPORT-HOST" +var iptablesNonLocalNodePortChain iptables.Chain = "KUBE-NODEPORT-NON-LOCAL" // Ensure that the iptables infrastructure we use is set up. This can safely be called periodically. func iptablesInit(ipt iptables.Interface) error { @@ -798,6 +827,17 @@ func iptablesInit(ipt iptables.Interface) error { return err } + // Create a chain intended to explicitly allow non-local NodePort + // traffic to work around default-deny iptables configurations + // that would otherwise reject such traffic. + args = []string{"-m", "comment", "--comment", "Ensure that non-local NodePort traffic can flow"} + if _, err := ipt.EnsureChain(iptables.TableFilter, iptablesNonLocalNodePortChain); err != nil { + return err + } + if _, err := ipt.EnsureRule(iptables.Prepend, iptables.TableFilter, iptables.ChainInput, append(args, "-j", string(iptablesNonLocalNodePortChain))...); err != nil { + return err + } + // TODO: Verify order of rules. return nil } @@ -817,6 +857,9 @@ func iptablesFlush(ipt iptables.Interface) error { if err := ipt.FlushChain(iptables.TableNAT, iptablesHostNodePortChain); err != nil { el = append(el, err) } + if err := ipt.FlushChain(iptables.TableFilter, iptablesNonLocalNodePortChain); err != nil { + el = append(el, err) + } if len(el) != 0 { glog.Errorf("Some errors flushing old iptables portals: %v", el) } @@ -974,6 +1017,13 @@ func (proxier *Proxier) iptablesHostNodePortArgs(nodePort int, protocol api.Prot return args } +// Build a slice of iptables args for an from-non-local public-port rule. +func (proxier *Proxier) iptablesNonLocalNodePortArgs(nodePort int, protocol api.Protocol, proxyIP net.IP, proxyPort int, service proxy.ServicePortName) []string { + args := iptablesCommonPortalArgs(nil, false, false, proxyPort, protocol, service) + args = append(args, "-m", "comment", "--comment", service.String(), "-m", "state", "--state", "NEW", "-j", "ACCEPT") + return args +} + func isTooManyFDsError(err error) bool { return strings.Contains(err.Error(), "too many open files") } diff --git a/pkg/util/iptables/iptables.go b/pkg/util/iptables/iptables.go index 9b0bc0e7bb9..4329dcc3f5d 100644 --- a/pkg/util/iptables/iptables.go +++ b/pkg/util/iptables/iptables.go @@ -84,7 +84,8 @@ const ( type Table string const ( - TableNAT Table = "nat" + TableNAT Table = "nat" + TableFilter Table = "filter" ) type Chain string @@ -93,6 +94,7 @@ const ( ChainPostrouting Chain = "POSTROUTING" ChainPrerouting Chain = "PREROUTING" ChainOutput Chain = "OUTPUT" + ChainInput Chain = "INPUT" ) const ( diff --git a/test/e2e/service.go b/test/e2e/service.go index f5292d5f500..7e0080d8b66 100644 --- a/test/e2e/service.go +++ b/test/e2e/service.go @@ -356,6 +356,9 @@ var _ = Describe("Services", func() { expectNoError(verifyServeHostnameServiceUp(c, ns, host, podNames2, svc2IP, servicePort)) }) + // TODO: Run this test against the userspace proxy and nodes + // configured with a default deny firewall to validate that the + // proxy whitelists NodePort traffic. It("should be able to create a functioning NodePort service", func() { serviceName := "nodeportservice-test" ns := f.Namespace.Name From 404d0696a9d8c72589996faeb6074c8d0a643661 Mon Sep 17 00:00:00 2001 From: Robert Bailey Date: Mon, 1 Feb 2016 13:44:31 -0800 Subject: [PATCH 043/328] Add timestamps to the liveness e2e test by changing By -> Logf in places where the statement is for debugging rather than describing what the test is doing. --- test/e2e/pods.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/e2e/pods.go b/test/e2e/pods.go index ed432d2a0a4..2a7707ad362 100644 --- a/test/e2e/pods.go +++ b/test/e2e/pods.go @@ -68,14 +68,14 @@ func runLivenessTest(c *client.Client, ns string, podDescr *api.Pod, expectNumRe // 'Terminated' which can cause indefinite blocking.) expectNoError(waitForPodNotPending(c, ns, podDescr.Name), fmt.Sprintf("starting pod %s in namespace %s", podDescr.Name, ns)) - By(fmt.Sprintf("Started pod %s in namespace %s", podDescr.Name, ns)) + Logf("Started pod %s in namespace %s", podDescr.Name, ns) // Check the pod's current state and verify that restartCount is present. By("checking the pod's current state and verifying that restartCount is present") pod, err := c.Pods(ns).Get(podDescr.Name) expectNoError(err, fmt.Sprintf("getting pod %s in namespace %s", podDescr.Name, ns)) initialRestartCount := api.GetExistingContainerStatus(pod.Status.ContainerStatuses, "liveness").RestartCount - By(fmt.Sprintf("Initial restart count of pod %s is %d", podDescr.Name, initialRestartCount)) + Logf("Initial restart count of pod %s is %d", podDescr.Name, initialRestartCount) // Wait for the restart state to be as desired. deadline := time.Now().Add(timeout) @@ -86,8 +86,8 @@ func runLivenessTest(c *client.Client, ns string, podDescr *api.Pod, expectNumRe expectNoError(err, fmt.Sprintf("getting pod %s", podDescr.Name)) restartCount := api.GetExistingContainerStatus(pod.Status.ContainerStatuses, "liveness").RestartCount if restartCount != lastRestartCount { - By(fmt.Sprintf("Restart count of pod %s/%s is now %d (%v elapsed)", - ns, podDescr.Name, restartCount, time.Since(start))) + Logf("Restart count of pod %s/%s is now %d (%v elapsed)", + ns, podDescr.Name, restartCount, time.Since(start)) if restartCount < lastRestartCount { Failf("Restart count should increment monotonically: restart cont of pod %s/%s changed from %d to %d", ns, podDescr.Name, lastRestartCount, restartCount) From bb41ba986bb580cdf4e8f8d2008a0006550f2191 Mon Sep 17 00:00:00 2001 From: Isaac Hollander McCreery Date: Mon, 1 Feb 2016 13:50:10 -0800 Subject: [PATCH 044/328] Make HPA Deployment tests [Feature:Deployment] until GKE has enabled them --- test/e2e/horizontal_pod_autoscaling.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/horizontal_pod_autoscaling.go b/test/e2e/horizontal_pod_autoscaling.go index a64bb638700..978832c3458 100644 --- a/test/e2e/horizontal_pod_autoscaling.go +++ b/test/e2e/horizontal_pod_autoscaling.go @@ -41,7 +41,7 @@ var _ = Describe("Horizontal pod autoscaling (scale resource: CPU) [Serial] [Slo titleUp := "Should scale from 1 pod to 3 pods and from 3 to 5" titleDown := "Should scale from 5 pods to 3 pods and from 3 to 1" - Describe("Deployment", func() { + Describe("Deployment [Feature:Deployment]", func() { // CPU tests via deployments It(titleUp, func() { scaleUp("deployment", kindDeployment, rc, f) From 78c9a7718a373545085042912b85ed41e453086c Mon Sep 17 00:00:00 2001 From: Brendan Burns Date: Mon, 1 Feb 2016 12:30:45 -0800 Subject: [PATCH 045/328] Don't re-check with gcloud for a firewall's existence to fix a potential flake. --- cluster/gce/util.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index 3e4c7061abb..9c1e66d7f79 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -1262,11 +1262,13 @@ function test-setup { "${NODE_TAG}-${INSTANCE_PREFIX}-http-alt" 2> /dev/null || true # As there is no simple way to wait longer for this operation we need to manually # wait some additional time (20 minutes altogether). - until gcloud compute firewall-rules describe --project "${PROJECT}" "${NODE_TAG}-${INSTANCE_PREFIX}-http-alt" 2> /dev/null || [ $(($start + 1200)) -lt `date +%s` ] - do sleep 5 + while ! gcloud compute firewall-rules describe --project "${PROJECT}" "${NODE_TAG}-${INSTANCE_PREFIX}-http-alt" 2> /dev/null; do + if [[ $(($start + 1200)) -lt `date +%s` ]]; then + echo -e "${color_red}Failed to create firewall ${NODE_TAG}-${INSTANCE_PREFIX}-http-alt in ${PROJECT}" >&2 + exit 1 + fi + sleep 5 done - # Check if the firewall rule exists and fail if it does not. - gcloud compute firewall-rules describe --project "${PROJECT}" "${NODE_TAG}-${INSTANCE_PREFIX}-http-alt" # Open up the NodePort range # TODO(justinsb): Move to main setup, if we decide whether we want to do this by default. @@ -1279,11 +1281,13 @@ function test-setup { "${NODE_TAG}-${INSTANCE_PREFIX}-nodeports" 2> /dev/null || true # As there is no simple way to wait longer for this operation we need to manually # wait some additional time (20 minutes altogether). - until gcloud compute firewall-rules describe --project "${PROJECT}" "${NODE_TAG}-${INSTANCE_PREFIX}-nodeports" 2> /dev/null || [ $(($start + 1200)) -lt `date +%s` ] - do sleep 5 + while ! gcloud compute firewall-rules describe --project "${PROJECT}" "${NODE_TAG}-${INSTANCE_PREFIX}-nodeports" 2> /dev/null; do + if [[ $(($start + 1200)) -lt `date +%s` ]]; then + echo -e "${color_red}Failed to create firewall ${NODE_TAG}-${INSTANCE_PREFIX}-nodeports in ${PROJECT}" >&2 + exit 1 + fi + sleep 5 done - # Check if the firewall rule exists and fail if it does not. - gcloud compute firewall-rules describe --project "${PROJECT}" "${NODE_TAG}-${INSTANCE_PREFIX}-nodeports" } # Execute after running tests to perform any required clean-up. This is called From 0f6b3611d8b20ee93a7e95923032d72ffc81eba1 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Mon, 1 Feb 2016 22:42:50 +0000 Subject: [PATCH 046/328] AWS: Fix e2e usage of find-tagged-master-ip In the e2e tests detect-master is called directly. In turn, it calls find-tagged-master-ip, which assumed that find-master-pd has already already been called. But this wasn't true in the e2e case. We add a call to find-master-pd; it is idempotent. --- cluster/aws/util.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cluster/aws/util.sh b/cluster/aws/util.sh index 66be11c09db..6bcae8cff47 100755 --- a/cluster/aws/util.sh +++ b/cluster/aws/util.sh @@ -160,6 +160,7 @@ function get_security_group_id { # Finds the master ip, if it is saved (tagged on the master disk) # Sets KUBE_MASTER_IP function find-tagged-master-ip { + find-master-pd if [[ -n "${MASTER_DISK_ID:-}" ]]; then KUBE_MASTER_IP=$(get-tag ${MASTER_DISK_ID} ${TAG_KEY_MASTER_IP}) fi @@ -175,6 +176,7 @@ function get-tag { } # Gets an existing master, exiting if not found +# Note that this is called directly by the e2e tests function detect-master() { find-tagged-master-ip KUBE_MASTER=${MASTER_NAME} From a61361b3dfb4b205edd7bb077dc531f479acf5d2 Mon Sep 17 00:00:00 2001 From: Isaac Hollander McCreery Date: Fri, 29 Jan 2016 16:31:43 -0800 Subject: [PATCH 047/328] Knock down the timeouts for gce, gce-slow, gke, and gke-slow now that they run in parallel --- hack/jenkins/job-configs/kubernetes-e2e.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hack/jenkins/job-configs/kubernetes-e2e.yaml b/hack/jenkins/job-configs/kubernetes-e2e.yaml index 1d5cd706108..37c31b13fe2 100644 --- a/hack/jenkins/job-configs/kubernetes-e2e.yaml +++ b/hack/jenkins/job-configs/kubernetes-e2e.yaml @@ -38,7 +38,10 @@ suffix: - 'gce': description: 'Run E2E tests on GCE using the latest successful build.' - timeout: 150 + timeout: 30 + - 'gce-slow': + description: 'Run slow E2E tests on GCE using the latest successful build.' + timeout: 60 - 'gce-autoscaling': description: 'Run autoscaling E2E tests on GCE using the latest successful build.' timeout: 210 @@ -51,9 +54,6 @@ - 'gce-scalability': description: 'Run scalability E2E tests on GCE using the latest successful build.' timeout: 210 - - 'gce-slow': - description: 'Run slow E2E tests on GCE using the latest successful build.' - timeout: 270 - 'gce-flannel': description: 'Run E2E tests on GCE using Flannel and the latest successful build. This suite is quarantined in a dedicated project because Flannel integration is experimental.' timeout: 90 @@ -72,10 +72,10 @@ suffix: - 'gke': description: Runs all non-slow, non-serial, non-flaky, tests on GKE in parallel (against GKE test endpoint) - timeout: 300 + timeout: 30 - 'gke-slow': description: 'Run slow E2E tests on GKE using the latest successful build.' - timeout: 300 + timeout: 60 - 'gke-flaky': description: | Run flaky e2e tests using the following config:
From 4a7d70aef1016c3f1a1ea07398ec56cf1fdce68a Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Mon, 1 Feb 2016 10:50:05 -0800 Subject: [PATCH 048/328] extend fake clock --- pkg/client/cache/expiration_cache_test.go | 2 +- pkg/client/record/event_test.go | 6 +- pkg/controller/controller_utils_test.go | 4 +- pkg/kubelet/container/image_puller_test.go | 2 +- .../container/serialized_image_puller_test.go | 2 +- pkg/kubelet/dockertools/manager_test.go | 4 +- pkg/kubelet/image_manager_test.go | 4 +- pkg/kubelet/kubelet_test.go | 2 +- pkg/kubelet/util/queue/work_queue_test.go | 2 +- pkg/master/tunneler_test.go | 18 ++-- pkg/util/backoff_test.go | 12 +-- pkg/util/clock.go | 97 +++++++++++++++++-- pkg/util/clock_test.go | 62 +++++++++++- plugin/pkg/scheduler/scheduler_test.go | 4 +- 14 files changed, 181 insertions(+), 40 deletions(-) diff --git a/pkg/client/cache/expiration_cache_test.go b/pkg/client/cache/expiration_cache_test.go index 546b98d919f..ff6bd1d4fa7 100644 --- a/pkg/client/cache/expiration_cache_test.go +++ b/pkg/client/cache/expiration_cache_test.go @@ -113,7 +113,7 @@ func TestTTLPolicy(t *testing.T) { exactlyOnTTL := fakeTime.Add(-ttl) expiredTime := fakeTime.Add(-(ttl + 1)) - policy := TTLPolicy{ttl, &util.FakeClock{Time: fakeTime}} + policy := TTLPolicy{ttl, util.NewFakeClock(fakeTime)} fakeTimestampedEntry := ×tampedEntry{obj: struct{}{}, timestamp: exactlyOnTTL} if policy.IsExpired(fakeTimestampedEntry) { t.Errorf("TTL cache should not expire entries exactly on ttl") diff --git a/pkg/client/record/event_test.go b/pkg/client/record/event_test.go index 3c8983b5b02..61597e0d590 100644 --- a/pkg/client/record/event_test.go +++ b/pkg/client/record/event_test.go @@ -348,7 +348,7 @@ func TestEventf(t *testing.T) { eventBroadcaster := NewBroadcaster() sinkWatcher := eventBroadcaster.StartRecordingToSink(&testEvents) - clock := &util.FakeClock{time.Now()} + clock := util.NewFakeClock(time.Now()) recorder := recorderWithFakeClock(api.EventSource{Component: "eventTest"}, eventBroadcaster, clock) for index, item := range table { clock.Step(1 * time.Second) @@ -559,7 +559,7 @@ func TestEventfNoNamespace(t *testing.T) { eventBroadcaster := NewBroadcaster() sinkWatcher := eventBroadcaster.StartRecordingToSink(&testEvents) - clock := &util.FakeClock{time.Now()} + clock := util.NewFakeClock(time.Now()) recorder := recorderWithFakeClock(api.EventSource{Component: "eventTest"}, eventBroadcaster, clock) for index, item := range table { @@ -846,7 +846,7 @@ func TestMultiSinkCache(t *testing.T) { } eventBroadcaster := NewBroadcaster() - clock := &util.FakeClock{time.Now()} + clock := util.NewFakeClock(time.Now()) recorder := recorderWithFakeClock(api.EventSource{Component: "eventTest"}, eventBroadcaster, clock) sinkWatcher := eventBroadcaster.StartRecordingToSink(&testEvents) diff --git a/pkg/controller/controller_utils_test.go b/pkg/controller/controller_utils_test.go index 2f3fc8f43f4..a9d75ec63be 100644 --- a/pkg/controller/controller_utils_test.go +++ b/pkg/controller/controller_utils_test.go @@ -43,7 +43,7 @@ import ( // NewFakeControllerExpectationsLookup creates a fake store for PodExpectations. func NewFakeControllerExpectationsLookup(ttl time.Duration) (*ControllerExpectations, *util.FakeClock) { fakeTime := time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC) - fakeClock := &util.FakeClock{Time: fakeTime} + fakeClock := util.NewFakeClock(fakeTime) ttlPolicy := &cache.TTLPolicy{Ttl: ttl, Clock: fakeClock} ttlStore := cache.NewFakeExpirationStore( ExpKeyFunc, nil, ttlPolicy, fakeClock) @@ -177,7 +177,7 @@ func TestControllerExpectations(t *testing.T) { } // Expectations have expired because of ttl - fakeClock.Time = fakeClock.Time.Add(ttl + 1) + fakeClock.Step(ttl + 1) if !e.SatisfiedExpectations(rcKey) { t.Errorf("Expectations should have expired but didn't") } diff --git a/pkg/kubelet/container/image_puller_test.go b/pkg/kubelet/container/image_puller_test.go index df48428fa56..f8d3ae16f3b 100644 --- a/pkg/kubelet/container/image_puller_test.go +++ b/pkg/kubelet/container/image_puller_test.go @@ -98,7 +98,7 @@ func TestPuller(t *testing.T) { } backOff := util.NewBackOff(time.Second, time.Minute) - fakeClock := &util.FakeClock{Time: time.Now()} + fakeClock := util.NewFakeClock(time.Now()) backOff.Clock = fakeClock fakeRuntime := &FakeRuntime{} diff --git a/pkg/kubelet/container/serialized_image_puller_test.go b/pkg/kubelet/container/serialized_image_puller_test.go index 9313dfc09e6..df0f003a2e6 100644 --- a/pkg/kubelet/container/serialized_image_puller_test.go +++ b/pkg/kubelet/container/serialized_image_puller_test.go @@ -98,7 +98,7 @@ func TestSerializedPuller(t *testing.T) { } backOff := util.NewBackOff(time.Second, time.Minute) - fakeClock := &util.FakeClock{Time: time.Now()} + fakeClock := util.NewFakeClock(time.Now()) backOff.Clock = fakeClock fakeRuntime := &FakeRuntime{} diff --git a/pkg/kubelet/dockertools/manager_test.go b/pkg/kubelet/dockertools/manager_test.go index a360e978455..8d6b568599f 100644 --- a/pkg/kubelet/dockertools/manager_test.go +++ b/pkg/kubelet/dockertools/manager_test.go @@ -1160,7 +1160,7 @@ func TestGetAPIPodStatusWithLastTermination(t *testing.T) { } func TestSyncPodBackoff(t *testing.T) { - var fakeClock = &util.FakeClock{Time: time.Now()} + var fakeClock = util.NewFakeClock(time.Now()) startTime := fakeClock.Now() dm, fakeDocker := newTestDockerManager() @@ -1232,7 +1232,7 @@ func TestSyncPodBackoff(t *testing.T) { backOff.Clock = fakeClock for _, c := range tests { fakeDocker.SetFakeContainers(dockerContainers) - fakeClock.Time = startTime.Add(time.Duration(c.tick) * time.Second) + fakeClock.SetTime(startTime.Add(time.Duration(c.tick) * time.Second)) runSyncPod(t, dm, fakeDocker, pod, backOff, c.expectErr) verifyCalls(t, fakeDocker, c.result) diff --git a/pkg/kubelet/image_manager_test.go b/pkg/kubelet/image_manager_test.go index 538277b55e3..b023475607e 100644 --- a/pkg/kubelet/image_manager_test.go +++ b/pkg/kubelet/image_manager_test.go @@ -431,8 +431,8 @@ func TestGarbageCollectImageNotOldEnough(t *testing.T) { }, } - fakeClock := util.FakeClock{Time: time.Now()} - fmt.Println(fakeClock.Now()) + fakeClock := util.NewFakeClock(time.Now()) + t.Log(fakeClock.Now()) require.NoError(t, manager.detectImages(fakeClock.Now())) require.Equal(t, manager.imageRecordsLen(), 2) // no space freed since one image is in used, and another one is not old enough diff --git a/pkg/kubelet/kubelet_test.go b/pkg/kubelet/kubelet_test.go index 715e4e9489e..eaa825ea931 100644 --- a/pkg/kubelet/kubelet_test.go +++ b/pkg/kubelet/kubelet_test.go @@ -171,7 +171,7 @@ func newTestKubelet(t *testing.T) *TestKubelet { LowThresholdPercent: 80, } kubelet.imageManager, err = newImageManager(fakeRuntime, mockCadvisor, fakeRecorder, fakeNodeRef, fakeImageGCPolicy) - fakeClock := &util.FakeClock{Time: time.Now()} + fakeClock := util.NewFakeClock(time.Now()) kubelet.backOff = util.NewBackOff(time.Second, time.Minute) kubelet.backOff.Clock = fakeClock kubelet.podKillingCh = make(chan *kubecontainer.Pod, 20) diff --git a/pkg/kubelet/util/queue/work_queue_test.go b/pkg/kubelet/util/queue/work_queue_test.go index 6dd452a9112..40ba6d95d88 100644 --- a/pkg/kubelet/util/queue/work_queue_test.go +++ b/pkg/kubelet/util/queue/work_queue_test.go @@ -26,7 +26,7 @@ import ( ) func newTestBasicWorkQueue() (*basicWorkQueue, *util.FakeClock) { - fakeClock := &util.FakeClock{Time: time.Now()} + fakeClock := util.NewFakeClock(time.Now()) wq := &basicWorkQueue{ clock: fakeClock, queue: make(map[types.UID]time.Time), diff --git a/pkg/master/tunneler_test.go b/pkg/master/tunneler_test.go index 24822f2e06e..1326c615714 100644 --- a/pkg/master/tunneler_test.go +++ b/pkg/master/tunneler_test.go @@ -37,32 +37,32 @@ func TestSecondsSinceSync(t *testing.T) { tunneler.lastSync = time.Date(2015, time.January, 1, 1, 1, 1, 1, time.UTC).Unix() // Nano Second. No difference. - tunneler.clock = &util.FakeClock{Time: time.Date(2015, time.January, 1, 1, 1, 1, 2, time.UTC)} + tunneler.clock = util.NewFakeClock(time.Date(2015, time.January, 1, 1, 1, 1, 2, time.UTC)) assert.Equal(int64(0), tunneler.SecondsSinceSync()) // Second - tunneler.clock = &util.FakeClock{Time: time.Date(2015, time.January, 1, 1, 1, 2, 1, time.UTC)} + tunneler.clock = util.NewFakeClock(time.Date(2015, time.January, 1, 1, 1, 2, 1, time.UTC)) assert.Equal(int64(1), tunneler.SecondsSinceSync()) // Minute - tunneler.clock = &util.FakeClock{Time: time.Date(2015, time.January, 1, 1, 2, 1, 1, time.UTC)} + tunneler.clock = util.NewFakeClock(time.Date(2015, time.January, 1, 1, 2, 1, 1, time.UTC)) assert.Equal(int64(60), tunneler.SecondsSinceSync()) // Hour - tunneler.clock = &util.FakeClock{Time: time.Date(2015, time.January, 1, 2, 1, 1, 1, time.UTC)} + tunneler.clock = util.NewFakeClock(time.Date(2015, time.January, 1, 2, 1, 1, 1, time.UTC)) assert.Equal(int64(3600), tunneler.SecondsSinceSync()) // Day - tunneler.clock = &util.FakeClock{Time: time.Date(2015, time.January, 2, 1, 1, 1, 1, time.UTC)} + tunneler.clock = util.NewFakeClock(time.Date(2015, time.January, 2, 1, 1, 1, 1, time.UTC)) assert.Equal(int64(86400), tunneler.SecondsSinceSync()) // Month - tunneler.clock = &util.FakeClock{Time: time.Date(2015, time.February, 1, 1, 1, 1, 1, time.UTC)} + tunneler.clock = util.NewFakeClock(time.Date(2015, time.February, 1, 1, 1, 1, 1, time.UTC)) assert.Equal(int64(2678400), tunneler.SecondsSinceSync()) // Future Month. Should be -Month. tunneler.lastSync = time.Date(2015, time.February, 1, 1, 1, 1, 1, time.UTC).Unix() - tunneler.clock = &util.FakeClock{Time: time.Date(2015, time.January, 1, 1, 1, 1, 1, time.UTC)} + tunneler.clock = util.NewFakeClock(time.Date(2015, time.January, 1, 1, 1, 1, 1, time.UTC)) assert.Equal(int64(-2678400), tunneler.SecondsSinceSync()) } @@ -89,12 +89,12 @@ func TestIsTunnelSyncHealthy(t *testing.T) { // Pass case: 540 second lag tunneler.lastSync = time.Date(2015, time.January, 1, 1, 1, 1, 1, time.UTC).Unix() - tunneler.clock = &util.FakeClock{Time: time.Date(2015, time.January, 1, 1, 9, 1, 1, time.UTC)} + tunneler.clock = util.NewFakeClock(time.Date(2015, time.January, 1, 1, 9, 1, 1, time.UTC)) err := master.IsTunnelSyncHealthy(nil) assert.NoError(err, "IsTunnelSyncHealthy() should not have returned an error.") // Fail case: 720 second lag - tunneler.clock = &util.FakeClock{Time: time.Date(2015, time.January, 1, 1, 12, 1, 1, time.UTC)} + tunneler.clock = util.NewFakeClock(time.Date(2015, time.January, 1, 1, 12, 1, 1, time.UTC)) err = master.IsTunnelSyncHealthy(nil) assert.Error(err, "IsTunnelSyncHealthy() should have returned an error.") } diff --git a/pkg/util/backoff_test.go b/pkg/util/backoff_test.go index 9035c565f45..d5b744cb3f7 100644 --- a/pkg/util/backoff_test.go +++ b/pkg/util/backoff_test.go @@ -32,7 +32,7 @@ func NewFakeBackOff(initial, max time.Duration, tc *FakeClock) *Backoff { func TestSlowBackoff(t *testing.T) { id := "_idSlow" - tc := &FakeClock{Time: time.Now()} + tc := NewFakeClock(time.Now()) step := time.Second maxDuration := 50 * step @@ -58,7 +58,7 @@ func TestSlowBackoff(t *testing.T) { func TestBackoffReset(t *testing.T) { id := "_idReset" - tc := &FakeClock{Time: time.Now()} + tc := NewFakeClock(time.Now()) step := time.Second maxDuration := step * 5 b := NewFakeBackOff(step, maxDuration, tc) @@ -84,7 +84,7 @@ func TestBackoffReset(t *testing.T) { func TestBackoffHightWaterMark(t *testing.T) { id := "_idHiWaterMark" - tc := &FakeClock{Time: time.Now()} + tc := NewFakeClock(time.Now()) step := time.Second maxDuration := 5 * step b := NewFakeBackOff(step, maxDuration, tc) @@ -106,7 +106,7 @@ func TestBackoffHightWaterMark(t *testing.T) { func TestBackoffGC(t *testing.T) { id := "_idGC" - tc := &FakeClock{Time: time.Now()} + tc := NewFakeClock(time.Now()) step := time.Second maxDuration := 5 * step @@ -134,7 +134,7 @@ func TestBackoffGC(t *testing.T) { func TestIsInBackOffSinceUpdate(t *testing.T) { id := "_idIsInBackOffSinceUpdate" - tc := &FakeClock{Time: time.Now()} + tc := NewFakeClock(time.Now()) step := time.Second maxDuration := 10 * step b := NewFakeBackOff(step, maxDuration, tc) @@ -186,7 +186,7 @@ func TestIsInBackOffSinceUpdate(t *testing.T) { } for _, c := range cases { - tc.Time = startTime.Add(c.tick * step) + tc.SetTime(startTime.Add(c.tick * step)) if c.inBackOff != b.IsInBackOffSinceUpdate(id, tc.Now()) { t.Errorf("expected IsInBackOffSinceUpdate %v got %v at tick %s", c.inBackOff, b.IsInBackOffSinceUpdate(id, tc.Now()), c.tick*step) } diff --git a/pkg/util/clock.go b/pkg/util/clock.go index 4d27baa3735..56ea16c6916 100644 --- a/pkg/util/clock.go +++ b/pkg/util/clock.go @@ -17,6 +17,7 @@ limitations under the License. package util import ( + "sync" "time" ) @@ -25,39 +26,115 @@ import ( type Clock interface { Now() time.Time Since(time.Time) time.Duration + After(d time.Duration) <-chan time.Time } +var ( + _ = Clock(RealClock{}) + _ = Clock(&FakeClock{}) + _ = Clock(&IntervalClock{}) +) + // RealClock really calls time.Now() type RealClock struct{} // Now returns the current time. -func (r RealClock) Now() time.Time { +func (RealClock) Now() time.Time { return time.Now() } // Since returns time since the specified timestamp. -func (r RealClock) Since(ts time.Time) time.Duration { +func (RealClock) Since(ts time.Time) time.Duration { return time.Since(ts) } +// Same as time.After(d). +func (RealClock) After(d time.Duration) <-chan time.Time { + return time.After(d) +} + // FakeClock implements Clock, but returns an arbitrary time. type FakeClock struct { - Time time.Time + lock sync.RWMutex + time time.Time + + // waiters are waiting for the fake time to pass their specified time + waiters []fakeClockWaiter +} + +type fakeClockWaiter struct { + targetTime time.Time + destChan chan<- time.Time +} + +func NewFakeClock(t time.Time) *FakeClock { + return &FakeClock{ + time: t, + } } // Now returns f's time. func (f *FakeClock) Now() time.Time { - return f.Time + f.lock.RLock() + defer f.lock.RUnlock() + return f.time } // Since returns time since the time in f. func (f *FakeClock) Since(ts time.Time) time.Duration { - return f.Time.Sub(ts) + f.lock.RLock() + defer f.lock.RUnlock() + return f.time.Sub(ts) } -// Move clock by Duration +// Fake version of time.After(d). +func (f *FakeClock) After(d time.Duration) <-chan time.Time { + f.lock.Lock() + defer f.lock.Unlock() + stopTime := f.time.Add(d) + ch := make(chan time.Time, 1) // Don't block! + f.waiters = append(f.waiters, fakeClockWaiter{ + targetTime: stopTime, + destChan: ch, + }) + return ch +} + +// Move clock by Duration, notify anyone that's called After func (f *FakeClock) Step(d time.Duration) { - f.Time = f.Time.Add(d) + f.lock.Lock() + defer f.lock.Unlock() + f.setTimeLocked(f.time.Add(d)) +} + +// Sets the time. +func (f *FakeClock) SetTime(t time.Time) { + f.lock.Lock() + defer f.lock.Unlock() + f.setTimeLocked(t) +} + +// Actually changes the time and checks any waiters. f must be write-locked. +func (f *FakeClock) setTimeLocked(t time.Time) { + f.time = t + newWaiters := make([]fakeClockWaiter, 0, len(f.waiters)) + for i := range f.waiters { + w := &f.waiters[i] + if !w.targetTime.After(t) { + w.destChan <- t + } else { + newWaiters = append(newWaiters, f.waiters[i]) + } + } + f.waiters = newWaiters +} + +// Returns true if After has been called on f but not yet satisfied (so you can +// write race-free tests). +func (f *FakeClock) HasWaiters() bool { + f.lock.RLock() + defer f.lock.RUnlock() + return len(f.waiters) > 0 } // IntervalClock implements Clock, but each invocation of Now steps the clock forward the specified duration @@ -76,3 +153,9 @@ func (i *IntervalClock) Now() time.Time { func (i *IntervalClock) Since(ts time.Time) time.Duration { return i.Time.Sub(ts) } + +// Unimplemented, will panic. +// TODO: make interval clock use FakeClock so this can be implemented. +func (*IntervalClock) After(d time.Duration) <-chan time.Time { + panic("IntervalClock doesn't implement After") +} diff --git a/pkg/util/clock_test.go b/pkg/util/clock_test.go index d3523ffda15..db0cce40a11 100644 --- a/pkg/util/clock_test.go +++ b/pkg/util/clock_test.go @@ -23,7 +23,7 @@ import ( func TestFakeClock(t *testing.T) { startTime := time.Now() - tc := &FakeClock{Time: startTime} + tc := NewFakeClock(startTime) tc.Step(time.Second) now := tc.Now() if now.Sub(startTime) != time.Second { @@ -31,8 +31,66 @@ func TestFakeClock(t *testing.T) { } tt := tc.Now() - tc.Time = tt.Add(time.Hour) + tc.SetTime(tt.Add(time.Hour)) if tc.Now().Sub(tt) != time.Hour { t.Errorf("input: %s now=%s gap=%s expected=%s", tt, tc.Now(), tc.Now().Sub(tt), time.Hour) } } + +func TestFakeAfter(t *testing.T) { + tc := NewFakeClock(time.Now()) + if tc.HasWaiters() { + t.Errorf("unexpected waiter?") + } + oneSec := tc.After(time.Second) + if !tc.HasWaiters() { + t.Errorf("unexpected lack of waiter?") + } + + oneOhOneSec := tc.After(time.Second + time.Millisecond) + twoSec := tc.After(2 * time.Second) + select { + case <-oneSec: + t.Errorf("unexpected channel read") + case <-oneOhOneSec: + t.Errorf("unexpected channel read") + case <-twoSec: + t.Errorf("unexpected channel read") + default: + } + + tc.Step(999 * time.Millisecond) + select { + case <-oneSec: + t.Errorf("unexpected channel read") + case <-oneOhOneSec: + t.Errorf("unexpected channel read") + case <-twoSec: + t.Errorf("unexpected channel read") + default: + } + + tc.Step(time.Millisecond) + select { + case <-oneSec: + // Expected! + case <-oneOhOneSec: + t.Errorf("unexpected channel read") + case <-twoSec: + t.Errorf("unexpected channel read") + default: + t.Errorf("unexpected non-channel read") + } + tc.Step(time.Millisecond) + select { + case <-oneSec: + // should not double-trigger! + t.Errorf("unexpected channel read") + case <-oneOhOneSec: + // Expected! + case <-twoSec: + t.Errorf("unexpected channel read") + default: + t.Errorf("unexpected non-channel read") + } +} diff --git a/plugin/pkg/scheduler/scheduler_test.go b/plugin/pkg/scheduler/scheduler_test.go index fe568cedc0d..9ce9a6ab52d 100644 --- a/plugin/pkg/scheduler/scheduler_test.go +++ b/plugin/pkg/scheduler/scheduler_test.go @@ -176,7 +176,7 @@ func TestSchedulerForgetAssumedPodAfterDelete(t *testing.T) { // all entries inserted with fakeTime will expire. ttl := 30 * time.Second fakeTime := time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC) - fakeClock := &util.FakeClock{Time: fakeTime} + fakeClock := util.NewFakeClock(fakeTime) ttlPolicy := &cache.TTLPolicy{Ttl: ttl, Clock: fakeClock} assumedPodsStore := cache.NewFakeExpirationStore( cache.MetaNamespaceKeyFunc, nil, ttlPolicy, fakeClock) @@ -274,7 +274,7 @@ func TestSchedulerForgetAssumedPodAfterDelete(t *testing.T) { // Second scheduling pass will fail to schedule if the store hasn't expired // the deleted pod. This would normally happen with a timeout. //expirationPolicy.NeverExpire = util.NewStringSet() - fakeClock.Time = fakeClock.Time.Add(ttl + 1) + fakeClock.Step(ttl + 1) called = make(chan struct{}) events = eventBroadcaster.StartEventWatcher(func(e *api.Event) { From 26683fda29e6f342cd599484b69ccc03dd3c30de Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Mon, 1 Feb 2016 10:50:22 -0800 Subject: [PATCH 049/328] add timeout to cacher --- pkg/storage/cacher.go | 5 ++- pkg/storage/watch_cache.go | 32 +++++++++++++++++-- pkg/storage/watch_cache_test.go | 55 ++++++++++++++++++++++++++++----- 3 files changed, 82 insertions(+), 10 deletions(-) diff --git a/pkg/storage/cacher.go b/pkg/storage/cacher.go index 635a1b5dfa7..9469e46de26 100644 --- a/pkg/storage/cacher.go +++ b/pkg/storage/cacher.go @@ -313,7 +313,10 @@ func (c *Cacher) List(ctx context.Context, key string, resourceVersion string, f } filterFunc := filterFunction(key, c.keyFunc, filter) - objs, readResourceVersion := c.watchCache.WaitUntilFreshAndList(listRV) + objs, readResourceVersion, err := c.watchCache.WaitUntilFreshAndList(listRV) + if err != nil { + return fmt.Errorf("failed to wait for fresh list: %v", err) + } for _, obj := range objs { object, ok := obj.(runtime.Object) if !ok { diff --git a/pkg/storage/watch_cache.go b/pkg/storage/watch_cache.go index 24d7ed2d1bb..eeb451f003b 100644 --- a/pkg/storage/watch_cache.go +++ b/pkg/storage/watch_cache.go @@ -21,14 +21,22 @@ import ( "sort" "strconv" "sync" + "time" "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/meta" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/runtime" + "k8s.io/kubernetes/pkg/util" "k8s.io/kubernetes/pkg/watch" ) +const ( + // MaximumListWait determines how long we're willing to wait for a + // list if a client specified a resource version in the future. + MaximumListWait = 60 * time.Second +) + // watchCacheEvent is a single "watch event" that is send to users of // watchCache. Additionally to a typical "watch.Event" it contains // the previous value of the object to enable proper filtering in the @@ -85,6 +93,9 @@ type watchCache struct { // This handler is run at the end of every Add/Update/Delete method // and additionally gets the previous value of the object. onEvent func(watchCacheEvent) + + // for testing timeouts. + clock util.Clock } func newWatchCache(capacity int) *watchCache { @@ -95,6 +106,7 @@ func newWatchCache(capacity int) *watchCache { endIndex: 0, store: cache.NewStore(cache.MetaNamespaceKeyFunc), resourceVersion: 0, + clock: util.RealClock{}, } wc.cond = sync.NewCond(wc.RLocker()) return wc @@ -193,13 +205,29 @@ func (w *watchCache) List() []interface{} { return w.store.List() } -func (w *watchCache) WaitUntilFreshAndList(resourceVersion uint64) ([]interface{}, uint64) { +func (w *watchCache) WaitUntilFreshAndList(resourceVersion uint64) ([]interface{}, uint64, error) { + startTime := w.clock.Now() + go func() { + // Wake us up when the time limit has expired. The docs + // promise that time.After (well, NewTimer, which it calls) + // will wait *at least* the duration given. Since this go + // routine starts sometime after we record the start time, and + // it will wake up the loop below sometime after the broadcast, + // we don't need to worry about waking it up before the time + // has expired accidentally. + <-w.clock.After(MaximumListWait) + w.cond.Broadcast() + }() + w.RLock() for w.resourceVersion < resourceVersion { + if w.clock.Since(startTime) >= MaximumListWait { + return nil, 0, fmt.Errorf("time limit exceeded while waiting for resource version %v (current value: %v)", resourceVersion, w.resourceVersion) + } w.cond.Wait() } defer w.RUnlock() - return w.store.List(), w.resourceVersion + return w.store.List(), w.resourceVersion, nil } func (w *watchCache) ListKeys() []string { diff --git a/pkg/storage/watch_cache_test.go b/pkg/storage/watch_cache_test.go index a96fd1a1ce9..3251be96731 100644 --- a/pkg/storage/watch_cache_test.go +++ b/pkg/storage/watch_cache_test.go @@ -19,6 +19,7 @@ package storage import ( "strconv" "testing" + "time" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" @@ -40,8 +41,15 @@ func makeTestPod(name string, resourceVersion uint64) *api.Pod { } } +// newTestWatchCache just adds a fake clock. +func newTestWatchCache(capacity int) *watchCache { + wc := newWatchCache(capacity) + wc.clock = util.NewFakeClock(time.Now()) + return wc +} + func TestWatchCacheBasic(t *testing.T) { - store := newWatchCache(2) + store := newTestWatchCache(2) // Test Add/Update/Delete. pod1 := makeTestPod("pod", 1) @@ -111,7 +119,7 @@ func TestWatchCacheBasic(t *testing.T) { } func TestEvents(t *testing.T) { - store := newWatchCache(5) + store := newTestWatchCache(5) store.Add(makeTestPod("pod", 2)) @@ -231,7 +239,7 @@ func TestEvents(t *testing.T) { } func TestWaitUntilFreshAndList(t *testing.T) { - store := newWatchCache(3) + store := newTestWatchCache(3) // In background, update the store. go func() { @@ -239,7 +247,10 @@ func TestWaitUntilFreshAndList(t *testing.T) { store.Add(makeTestPod("bar", 5)) }() - list, resourceVersion := store.WaitUntilFreshAndList(4) + list, resourceVersion, err := store.WaitUntilFreshAndList(5) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } if resourceVersion != 5 { t.Errorf("unexpected resourceVersion: %v, expected: 5", resourceVersion) } @@ -248,6 +259,30 @@ func TestWaitUntilFreshAndList(t *testing.T) { } } +func TestWaitUntilFreshAndListTimeout(t *testing.T) { + store := newTestWatchCache(3) + fc := store.clock.(*util.FakeClock) + + // In background, step clock after the below call starts the timer. + go func() { + for !fc.HasWaiters() { + time.Sleep(time.Millisecond) + } + fc.Step(MaximumListWait) + + // Add an object to make sure the test would + // eventually fail instead of just waiting + // forever. + time.Sleep(30 * time.Second) + store.Add(makeTestPod("bar", 5)) + }() + + _, _, err := store.WaitUntilFreshAndList(5) + if err == nil { + t.Fatalf("unexpected lack of timeout error") + } +} + type testLW struct { ListFunc func(options api.ListOptions) (runtime.Object, error) WatchFunc func(options api.ListOptions) (watch.Interface, error) @@ -261,10 +296,13 @@ func (t *testLW) Watch(options api.ListOptions) (watch.Interface, error) { } func TestReflectorForWatchCache(t *testing.T) { - store := newWatchCache(5) + store := newTestWatchCache(5) { - _, version := store.WaitUntilFreshAndList(0) + _, version, err := store.WaitUntilFreshAndList(0) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } if version != 0 { t.Errorf("unexpected resource version: %d", version) } @@ -284,7 +322,10 @@ func TestReflectorForWatchCache(t *testing.T) { r.ListAndWatch(util.NeverStop) { - _, version := store.WaitUntilFreshAndList(10) + _, version, err := store.WaitUntilFreshAndList(10) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } if version != 10 { t.Errorf("unexpected resource version: %d", version) } From 5d713bb6aab4a3cf75e03f4cfa67b8398db34004 Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Mon, 1 Feb 2016 10:50:44 -0800 Subject: [PATCH 050/328] don't cross-pollinate RVs --- pkg/registry/service/ipallocator/controller/repair.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/registry/service/ipallocator/controller/repair.go b/pkg/registry/service/ipallocator/controller/repair.go index 2cf212e4c14..e811379c525 100644 --- a/pkg/registry/service/ipallocator/controller/repair.go +++ b/pkg/registry/service/ipallocator/controller/repair.go @@ -99,8 +99,12 @@ func (c *Repair) runOnce() error { } ctx := api.WithNamespace(api.NewDefaultContext(), api.NamespaceAll) - options := &api.ListOptions{ResourceVersion: latest.ObjectMeta.ResourceVersion} - list, err := c.registry.ListServices(ctx, options) + // We explicitly send no resource version, since the resource version + // of 'latest' is from a different collection, it's not comparable to + // the service collection. The caching layer keeps per-collection RVs, + // and this is proper, since in theory the collections could be hosted + // in separate etcd (or even non-etcd) instances. + list, err := c.registry.ListServices(ctx, nil) if err != nil { return fmt.Errorf("unable to refresh the service IP block: %v", err) } From fbc5e3f807f54edb5829ef7a29771dc253382241 Mon Sep 17 00:00:00 2001 From: Isaac Hollander McCreery Date: Mon, 1 Feb 2016 15:58:29 -0800 Subject: [PATCH 051/328] Reference 20015 for [Flaky] NodeOutOfDisk tests --- test/e2e/nodeoutofdisk.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/nodeoutofdisk.go b/test/e2e/nodeoutofdisk.go index 0fc97d83287..592422fb433 100644 --- a/test/e2e/nodeoutofdisk.go +++ b/test/e2e/nodeoutofdisk.go @@ -63,7 +63,7 @@ const ( // choose that node to be node with index 1. // 7. Observe that the pod in pending status schedules on that node. // -// Flaky issue #17687 +// Flaky issue #20015. We have no clear path for how to test this functionality in a non-flaky way. var _ = Describe("NodeOutOfDisk [Serial] [Flaky]", func() { var c *client.Client var unfilledNodeName, recoveredNodeName string From 3889cd5a6c99d60f948e2ebef0ad34f002e2e81a Mon Sep 17 00:00:00 2001 From: Isaac Hollander McCreery Date: Mon, 1 Feb 2016 16:01:32 -0800 Subject: [PATCH 052/328] Update docs on flaky issues --- docs/devel/e2e-tests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/devel/e2e-tests.md b/docs/devel/e2e-tests.md index 388e25f08e6..8d736f2546f 100644 --- a/docs/devel/e2e-tests.md +++ b/docs/devel/e2e-tests.md @@ -110,7 +110,7 @@ We are working on implementing clearer partitioning of our e2e tests to make run - `[Slow]`: If a test takes more than five minutes to run (by itself or in parallel with many other tests), it is labeled `[Slow]`. This partition allows us to run almost all of our tests quickly in parallel, without waiting for the stragglers to finish. - `[Serial]`: If a test cannot be run in parallel with other tests (e.g. it takes too many resources or restarts nodes), it is labeled `[Serial]`, and should be run in serial as part of a separate suite. - `[Disruptive]`: If a test restarts components that might cause other tests to fail or break the cluster completely, it is labeled `[Disruptive]`. Any `[Disruptive]` test is also assumed to qualify for the `[Serial]` label, but need not be labeled as both. These tests are not run against soak clusters to avoid restarting components. -- `[Flaky]`: If a test is found to be flaky, it receives the `[Flaky]` label until it is fixed. A `[Flaky]` label should be accompanied with a reference to the issue for de-flaking the test, because while a test remains labeled `[Flaky]`, it is not monitored closely in CI. `[Flaky]` tests are by default not run, unless a `focus` or `skip` argument is explicitly given. +- `[Flaky]`: If a test is found to be flaky and we have decided that it's too hard to fix in the short term (e.g. it's going to take a full engineer-week), it receives the `[Flaky]` label until it is fixed. The `[Flaky]` label should be used very sparingly, and should be accompanied with a reference to the issue for de-flaking the test, because while a test remains labeled `[Flaky]`, it is not monitored closely in CI. `[Flaky]` tests are by default not run, unless a `focus` or `skip` argument is explicitly given. - `[Skipped]`: `[Skipped]` is a legacy label that we're phasing out. If a test is marked `[Skipped]`, there should be an issue open to label it properly. `[Skipped]` tests are by default not run, unless a `focus` or `skip` argument is explicitly given. - `[Feature:...]`: If a test has non-default requirements to run or targets some non-core functionality, and thus should not be run as part of the standard suite, it receives a `[Feature:...]` label, e.g. `[Feature:Performance]` or `[Feature:Ingress]`. `[Feature:...]` tests are not run in our core suites, instead running in custom suites. There are a few use-cases for `[Feature:...]` tests: - If a feature is experimental or alpha and is not enabled by default due to being incomplete or potentially subject to breaking changes, it should *not* block the merge-queue, and thus should run in some separate test suites owned by the feature owner(s). From dea73fd306c1ffe368b1ca2f3349a53221882ad6 Mon Sep 17 00:00:00 2001 From: Isaac Hollander McCreery Date: Mon, 1 Feb 2016 16:07:21 -0800 Subject: [PATCH 053/328] Promote DaemonRestart e2es out of Flaky --- test/e2e/daemon_restart.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/e2e/daemon_restart.go b/test/e2e/daemon_restart.go index 7ef21b5fd31..6bd4ebe685e 100644 --- a/test/e2e/daemon_restart.go +++ b/test/e2e/daemon_restart.go @@ -183,8 +183,7 @@ func getContainerRestarts(c *client.Client, ns string, labelSelector labels.Sele return failedContainers, containerRestartNodes.List() } -// Flaky issues #17829, #19023 -var _ = Describe("DaemonRestart [Disruptive] [Flaky]", func() { +var _ = Describe("DaemonRestart [Disruptive]", func() { framework := NewFramework("daemonrestart") rcName := "daemonrestart" + strconv.Itoa(numPods) + "-" + string(util.NewUUID()) From bb4a41d84c3f9f9afb2362774a171bb1e4490b8e Mon Sep 17 00:00:00 2001 From: Isaac Hollander McCreery Date: Mon, 1 Feb 2016 16:24:41 -0800 Subject: [PATCH 054/328] Updates based on comments --- docs/devel/e2e-tests.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/docs/devel/e2e-tests.md b/docs/devel/e2e-tests.md index 12915543ef5..54c7caefe01 100644 --- a/docs/devel/e2e-tests.md +++ b/docs/devel/e2e-tests.md @@ -112,8 +112,7 @@ We are working on implementing clearer partitioning of our e2e tests to make run - `[Disruptive]`: If a test restarts components that might cause other tests to fail or break the cluster completely, it is labeled `[Disruptive]`. Any `[Disruptive]` test is also assumed to qualify for the `[Serial]` label, but need not be labeled as both. These tests are not run against soak clusters to avoid restarting components. - `[Flaky]`: If a test is found to be flaky, it receives the `[Flaky]` label until it is fixed. A `[Flaky]` label should be accompanied with a reference to the issue for de-flaking the test, because while a test remains labeled `[Flaky]`, it is not monitored closely in CI. `[Flaky]` tests are by default not run, unless a `focus` or `skip` argument is explicitly given. - `[Skipped]`: `[Skipped]` is a legacy label that we're phasing out. If a test is marked `[Skipped]`, there should be an issue open to label it properly. `[Skipped]` tests are by default not run, unless a `focus` or `skip` argument is explicitly given. -- `[Feature:.+]`: If a test has non-default requirements to run or targets some non-core functionality, and thus should not be run as part of the standard suite, it receives a `[Feature:.+]` label, e.g. `[Feature:Performance]` or `[Feature:Ingress]`. `[Feature:.+]` tests are not run in our core suites, instead running in custom suites. There are a few use-cases for `[Feature:.+]` tests: - - If a feature is experimental or alpha and is not enabled by default due to being incomplete or potentially subject to breaking changes, it does *not* block the merge-queue, and thus should run in some separate test suites owned by the feature owner(s) (see #continuous_integration below). +- `[Feature:.+]`: If a test has non-default requirements to run or targets some non-core functionality, and thus should not be run as part of the standard suite, it receives a `[Feature:.+]` label, e.g. `[Feature:Performance]` or `[Feature:Ingress]`. `[Feature:.+]` tests are not run in our core suites, instead running in custom suites. If a feature is experimental or alpha and is not enabled by default due to being incomplete or potentially subject to breaking changes, it does *not* block the merge-queue, and thus should run in some separate test suites owned by the feature owner(s) (see #continuous_integration below). Finally, `[Conformance]` tests are tests we expect to pass on **any** Kubernetes cluster. The `[Conformance]` label does not supersede any other labels. `[Conformance]` test policies are a work-in-progress; see #18162. @@ -125,15 +124,15 @@ A quick overview of how we run e2e CI on Kubernetes. We run a battery of `e2e` tests against `HEAD` of the master branch on a continuous basis, and block merges via the [submit queue](http://submit-queue.k8s.io/) on a subset of those tests if they fail (the subset is defined in the [munger config](https://github.com/kubernetes/contrib/blob/master/mungegithub/mungers/submit-queue.go) via the `jenkins-jobs` flag; note we also block on `kubernetes-build` and `kubernetes-test-go` jobs for build and unit and integration tests). -CI results can be found at [ci-test.k8s.io](ci-test.k8s.io), e.g. [ci-test.k8s.io/kubernetes-e2e-gce/10594](ci-test.k8s.io/kubernetes-e2e-gce/10594). +CI results can be found at [ci-test.k8s.io](http://ci-test.k8s.io), e.g. [ci-test.k8s.io/kubernetes-e2e-gce/10594](http://ci-test.k8s.io/kubernetes-e2e-gce/10594). ### What runs in CI? We run all default tests (those that aren't marked `[Flaky]` or `[Feature:.+]`) against GCE and GKE. To minimize the time from regression-to-green-run, we partition tests across different jobs: -- `kubernetes-` runs all non-`[Slow]`, non-`[Serial]`, non-`[Disruptive]`, non-`[Flaky]`, non-`[Feature:.+]` tests in parallel. -- `kubernetes--slow` runs all `[Slow]`, non-`[Serial]`, non-`[Disruptive]`, non-`[Flaky]`, non-`[Feature:.+]` tests in parallel. -- `kubernetes--serial` runs all `[Serial]` and `[Disruptive]`, non-`[Flaky]`, non-`[Feature:.+]` tests in serial. +- `kubernetes-e2e-` runs all non-`[Slow]`, non-`[Serial]`, non-`[Disruptive]`, non-`[Flaky]`, non-`[Feature:.+]` tests in parallel. +- `kubernetes-e2e--slow` runs all `[Slow]`, non-`[Serial]`, non-`[Disruptive]`, non-`[Flaky]`, non-`[Feature:.+]` tests in parallel. +- `kubernetes-e2e--serial` runs all `[Serial]` and `[Disruptive]`, non-`[Flaky]`, non-`[Feature:.+]` tests in serial. We also run non-default tests if the tests exercise general-availability ("GA") features that require a special environment to run in, e.g. `kubernetes-e2e-gce-scalability` and `kubernetes-kubemark-gce`, which test for Kubernetes performance. @@ -143,7 +142,7 @@ Many `[Feature:.+]` tests we don't run in CI. These tests are for features that ### The PR-builder -We also run a battery of tests against every PR before we merge it. These tests are equivalent to `kubernetes-gce`: it runs all non-`[Slow]`, non-`[Serial]`, non-`[Disruptive]`, non-`[Flaky]`, non-`[Feature:.+]` tests in parallel. These tests are considered "smoke tests" to give a decent signal that the PR doesn't break most functionality. Results for you PR can be found at [pr-test.k8s.io](pr-test.k8s.io), e.g. [pr-test.k8s.io/20354](pr-test.k8s.io/20354) for #20354. +We also run a battery of tests against every PR before we merge it. These tests are equivalent to `kubernetes-gce`: it runs all non-`[Slow]`, non-`[Serial]`, non-`[Disruptive]`, non-`[Flaky]`, non-`[Feature:.+]` tests in parallel. These tests are considered "smoke tests" to give a decent signal that the PR doesn't break most functionality. Results for you PR can be found at [pr-test.k8s.io](http://pr-test.k8s.io), e.g. [pr-test.k8s.io/20354](http://pr-test.k8s.io/20354) for #20354. ### Adding a test to CI @@ -155,7 +154,7 @@ TODO(#20357): Create a self-documented example which has been disabled, but can When writing a test, consult #kinds_of_tests above to determine how your test should be marked, (e.g. `[Slow]`, `[Serial]`; remember, by default we assume a test can run in parallel with other tests!). -When first adding a test it should *not* go straight into CI, because failures block ordinary development. A test should only be added to CI after is has been running in some non-CI suite long enough to establish a track record showing that the test does not fail when run against *working* software. +When first adding a test it should *not* go straight into CI, because failures block ordinary development. A test should only be added to CI after is has been running in some non-CI suite long enough to establish a track record showing that the test does not fail when run against *working* software. Note also that tests running in CI are generally running on a well-loaded cluster, so must contend for resources; see above about [kinds of tests](#kinds_of_tests). Generally, a feature starts as `experimental`, and will be run in some suite owned by the team developing the feature. If a feature is in beta or GA, it *should* block the merge-queue. In moving from experimental to beta or GA, tests that are expected to pass by default should simply remove the `[Feature:.+]` label, and will be incorporated into our core suites. If tests are not expected to pass by default, (e.g. they require a special environment such as added quota,) they should remain with the `[Feature:.+]` label, and the suites that run them should be incorporated into the [munger config](https://github.com/kubernetes/contrib/blob/master/mungegithub/mungers/submit-queue.go) via the `jenkins-jobs` flag. @@ -163,7 +162,7 @@ Occasionally, we'll want to add tests to better exercise features that are alrea ### Moving a test out of CI -TODO(ihmccreery) do we want to keep the `[Flaky]` label at all? +If we have determined that a test is known-flaky and cannot be fixed in the short-term, we may move it out of CI indefinitely. This move should be used sparingly, as it effectively means that we have no coverage of that test. When a test if demoted, it should be marked `[Flaky]` with a comment accompanying the label with a reference to an issue opened to fix the test. ## Performance Evaluation From e9de110a5d888d60d4df9c30a8f03646fad47138 Mon Sep 17 00:00:00 2001 From: mqliang Date: Tue, 2 Feb 2016 14:22:16 +0800 Subject: [PATCH 055/328] fix the bug that ubuntu check-pods-torn-down doesn't take into account terminating pods nor pods in other namespaces --- cluster/ubuntu/util.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/ubuntu/util.sh b/cluster/ubuntu/util.sh index de82f359bf1..34d96be826d 100755 --- a/cluster/ubuntu/util.sh +++ b/cluster/ubuntu/util.sh @@ -553,7 +553,7 @@ function provision-masterandnode() { function check-pods-torn-down() { local kubectl="${KUBE_ROOT}/cluster/kubectl.sh" local attempt=0 - while [[ ! -z "$(kubectl get pods | tail -n +2)" ]]; do + while [[ ! -z "$(kubectl get pods --show-all --all-namespaces| tail -n +2)" ]]; do if (( attempt > 120 )); then echo "timeout waiting for tearing down pods" >> ~/kube/err.log fi From 21c2b836ed6b424c227c5bba93ef83b31fc34d9f Mon Sep 17 00:00:00 2001 From: Michail Kargakis Date: Mon, 25 Jan 2016 12:34:48 +0100 Subject: [PATCH 056/328] kubectl: add rollout pause/resume subcommands --- .generated_docs | 4 + contrib/completions/bash/kubectl | 92 +++++++++++ docs/man/man1/kubectl-rollout-pause.1 | 145 ++++++++++++++++++ docs/man/man1/kubectl-rollout-resume.1 | 143 +++++++++++++++++ docs/man/man1/kubectl-rollout.1 | 2 +- docs/user-guide/kubectl/kubectl_rollout.md | 4 +- .../kubectl/kubectl_rollout_pause.md | 98 ++++++++++++ .../kubectl/kubectl_rollout_resume.md | 96 ++++++++++++ pkg/kubectl/cmd/rollout/rollout.go | 2 + pkg/kubectl/cmd/rollout/rollout_pause.go | 118 ++++++++++++++ pkg/kubectl/cmd/rollout/rollout_resume.go | 116 ++++++++++++++ pkg/kubectl/cmd/util/factory.go | 48 ++++++ 12 files changed, 866 insertions(+), 2 deletions(-) create mode 100644 docs/man/man1/kubectl-rollout-pause.1 create mode 100644 docs/man/man1/kubectl-rollout-resume.1 create mode 100644 docs/user-guide/kubectl/kubectl_rollout_pause.md create mode 100644 docs/user-guide/kubectl/kubectl_rollout_resume.md create mode 100644 pkg/kubectl/cmd/rollout/rollout_pause.go create mode 100644 pkg/kubectl/cmd/rollout/rollout_resume.go diff --git a/.generated_docs b/.generated_docs index 0622264cd62..94898c0a4da 100644 --- a/.generated_docs +++ b/.generated_docs @@ -44,6 +44,8 @@ docs/man/man1/kubectl-proxy.1 docs/man/man1/kubectl-replace.1 docs/man/man1/kubectl-rolling-update.1 docs/man/man1/kubectl-rollout-history.1 +docs/man/man1/kubectl-rollout-pause.1 +docs/man/man1/kubectl-rollout-resume.1 docs/man/man1/kubectl-rollout.1 docs/man/man1/kubectl-run.1 docs/man/man1/kubectl-scale.1 @@ -92,6 +94,8 @@ docs/user-guide/kubectl/kubectl_replace.md docs/user-guide/kubectl/kubectl_rolling-update.md docs/user-guide/kubectl/kubectl_rollout.md docs/user-guide/kubectl/kubectl_rollout_history.md +docs/user-guide/kubectl/kubectl_rollout_pause.md +docs/user-guide/kubectl/kubectl_rollout_resume.md docs/user-guide/kubectl/kubectl_run.md docs/user-guide/kubectl/kubectl_scale.md docs/user-guide/kubectl/kubectl_uncordon.md diff --git a/contrib/completions/bash/kubectl b/contrib/completions/bash/kubectl index e5235d5ccf3..03af9e59d88 100644 --- a/contrib/completions/bash/kubectl +++ b/contrib/completions/bash/kubectl @@ -1702,11 +1702,103 @@ _kubectl_rollout_history() must_have_one_noun=() } +_kubectl_rollout_pause() +{ + last_command="kubectl_rollout_pause" + commands=() + + flags=() + two_word_flags=() + flags_with_completion=() + flags_completion=() + + flags+=("--filename=") + flags_with_completion+=("--filename") + flags_completion+=("__handle_filename_extension_flag json|yaml|yml") + two_word_flags+=("-f") + flags_with_completion+=("-f") + flags_completion+=("__handle_filename_extension_flag json|yaml|yml") + flags+=("--alsologtostderr") + flags+=("--api-version=") + flags+=("--certificate-authority=") + flags+=("--client-certificate=") + flags+=("--client-key=") + flags+=("--cluster=") + flags+=("--context=") + flags+=("--insecure-skip-tls-verify") + flags+=("--kubeconfig=") + flags+=("--log-backtrace-at=") + flags+=("--log-dir=") + flags+=("--log-flush-frequency=") + flags+=("--logtostderr") + flags+=("--match-server-version") + flags+=("--namespace=") + flags+=("--password=") + flags+=("--server=") + two_word_flags+=("-s") + flags+=("--stderrthreshold=") + flags+=("--token=") + flags+=("--user=") + flags+=("--username=") + flags+=("--v=") + flags+=("--vmodule=") + + must_have_one_flag=() + must_have_one_noun=() +} + +_kubectl_rollout_resume() +{ + last_command="kubectl_rollout_resume" + commands=() + + flags=() + two_word_flags=() + flags_with_completion=() + flags_completion=() + + flags+=("--filename=") + flags_with_completion+=("--filename") + flags_completion+=("__handle_filename_extension_flag json|yaml|yml") + two_word_flags+=("-f") + flags_with_completion+=("-f") + flags_completion+=("__handle_filename_extension_flag json|yaml|yml") + flags+=("--alsologtostderr") + flags+=("--api-version=") + flags+=("--certificate-authority=") + flags+=("--client-certificate=") + flags+=("--client-key=") + flags+=("--cluster=") + flags+=("--context=") + flags+=("--insecure-skip-tls-verify") + flags+=("--kubeconfig=") + flags+=("--log-backtrace-at=") + flags+=("--log-dir=") + flags+=("--log-flush-frequency=") + flags+=("--logtostderr") + flags+=("--match-server-version") + flags+=("--namespace=") + flags+=("--password=") + flags+=("--server=") + two_word_flags+=("-s") + flags+=("--stderrthreshold=") + flags+=("--token=") + flags+=("--user=") + flags+=("--username=") + flags+=("--v=") + flags+=("--vmodule=") + + must_have_one_flag=() + must_have_one_noun=() +} + _kubectl_rollout() { last_command="kubectl_rollout" commands=() commands+=("history") + commands+=("pause") + commands+=("resume") flags=() two_word_flags=() diff --git a/docs/man/man1/kubectl-rollout-pause.1 b/docs/man/man1/kubectl-rollout-pause.1 new file mode 100644 index 00000000000..5dc75d21fa7 --- /dev/null +++ b/docs/man/man1/kubectl-rollout-pause.1 @@ -0,0 +1,145 @@ +.TH "KUBERNETES" "1" " kubernetes User Manuals" "Eric Paris" "Jan 2015" "" + + +.SH NAME +.PP +kubectl rollout pause \- Mark the provided resource as paused + + +.SH SYNOPSIS +.PP +\fBkubectl rollout pause\fP [OPTIONS] + + +.SH DESCRIPTION +.PP +Mark the provided resource as paused + +.PP +Paused resources will not be reconciled by a controller. +Use \\"kubectl rollout resume\\" to resume a paused resource. +Currently only deployments support being paused. + + +.SH OPTIONS +.PP +\fB\-f\fP, \fB\-\-filename\fP=[] + Filename, directory, or URL to a file identifying the resource to get from a server. + + +.SH OPTIONS INHERITED FROM PARENT COMMANDS +.PP +\fB\-\-alsologtostderr\fP=false + log to standard error as well as files + +.PP +\fB\-\-api\-version\fP="" + The API version to use when talking to the server + +.PP +\fB\-\-certificate\-authority\fP="" + Path to a cert. file for the certificate authority. + +.PP +\fB\-\-client\-certificate\fP="" + Path to a client certificate file for TLS. + +.PP +\fB\-\-client\-key\fP="" + Path to a client key file for TLS. + +.PP +\fB\-\-cluster\fP="" + The name of the kubeconfig cluster to use + +.PP +\fB\-\-context\fP="" + The name of the kubeconfig context to use + +.PP +\fB\-\-insecure\-skip\-tls\-verify\fP=false + If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure. + +.PP +\fB\-\-kubeconfig\fP="" + Path to the kubeconfig file to use for CLI requests. + +.PP +\fB\-\-log\-backtrace\-at\fP=:0 + when logging hits line file:N, emit a stack trace + +.PP +\fB\-\-log\-dir\fP="" + If non\-empty, write log files in this directory + +.PP +\fB\-\-log\-flush\-frequency\fP=5s + Maximum number of seconds between log flushes + +.PP +\fB\-\-logtostderr\fP=true + log to standard error instead of files + +.PP +\fB\-\-match\-server\-version\fP=false + Require server version to match client version + +.PP +\fB\-\-namespace\fP="" + If present, the namespace scope for this CLI request. + +.PP +\fB\-\-password\fP="" + Password for basic authentication to the API server. + +.PP +\fB\-s\fP, \fB\-\-server\fP="" + The address and port of the Kubernetes API server + +.PP +\fB\-\-stderrthreshold\fP=2 + logs at or above this threshold go to stderr + +.PP +\fB\-\-token\fP="" + Bearer token for authentication to the API server. + +.PP +\fB\-\-user\fP="" + The name of the kubeconfig user to use + +.PP +\fB\-\-username\fP="" + Username for basic authentication to the API server. + +.PP +\fB\-\-v\fP=0 + log level for V logs + +.PP +\fB\-\-vmodule\fP= + comma\-separated list of pattern=N settings for file\-filtered logging + + +.SH EXAMPLE +.PP +.RS + +.nf +# Mark the nginx deployment as paused. Any current state of +# the deployment will continue its function, new updates to the deployment will not +# have an effect as long as the deployment is paused. +$ kubectl rollout pause deployment/nginx + +.fi +.RE + + +.SH SEE ALSO +.PP +\fBkubectl\-rollout(1)\fP, + + +.SH HISTORY +.PP +January 2015, Originally compiled by Eric Paris (eparis at redhat dot com) based on the kubernetes source material, but hopefully they have been automatically generated since! diff --git a/docs/man/man1/kubectl-rollout-resume.1 b/docs/man/man1/kubectl-rollout-resume.1 new file mode 100644 index 00000000000..34b9e8d7035 --- /dev/null +++ b/docs/man/man1/kubectl-rollout-resume.1 @@ -0,0 +1,143 @@ +.TH "KUBERNETES" "1" " kubernetes User Manuals" "Eric Paris" "Jan 2015" "" + + +.SH NAME +.PP +kubectl rollout resume \- Resume a paused resource + + +.SH SYNOPSIS +.PP +\fBkubectl rollout resume\fP [OPTIONS] + + +.SH DESCRIPTION +.PP +Resume a paused resource + +.PP +Paused resources will not be reconciled by a controller. By resuming a +resource, we allow it to be reconciled again. +Currently only deployments support being resumed. + + +.SH OPTIONS +.PP +\fB\-f\fP, \fB\-\-filename\fP=[] + Filename, directory, or URL to a file identifying the resource to get from a server. + + +.SH OPTIONS INHERITED FROM PARENT COMMANDS +.PP +\fB\-\-alsologtostderr\fP=false + log to standard error as well as files + +.PP +\fB\-\-api\-version\fP="" + The API version to use when talking to the server + +.PP +\fB\-\-certificate\-authority\fP="" + Path to a cert. file for the certificate authority. + +.PP +\fB\-\-client\-certificate\fP="" + Path to a client certificate file for TLS. + +.PP +\fB\-\-client\-key\fP="" + Path to a client key file for TLS. + +.PP +\fB\-\-cluster\fP="" + The name of the kubeconfig cluster to use + +.PP +\fB\-\-context\fP="" + The name of the kubeconfig context to use + +.PP +\fB\-\-insecure\-skip\-tls\-verify\fP=false + If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure. + +.PP +\fB\-\-kubeconfig\fP="" + Path to the kubeconfig file to use for CLI requests. + +.PP +\fB\-\-log\-backtrace\-at\fP=:0 + when logging hits line file:N, emit a stack trace + +.PP +\fB\-\-log\-dir\fP="" + If non\-empty, write log files in this directory + +.PP +\fB\-\-log\-flush\-frequency\fP=5s + Maximum number of seconds between log flushes + +.PP +\fB\-\-logtostderr\fP=true + log to standard error instead of files + +.PP +\fB\-\-match\-server\-version\fP=false + Require server version to match client version + +.PP +\fB\-\-namespace\fP="" + If present, the namespace scope for this CLI request. + +.PP +\fB\-\-password\fP="" + Password for basic authentication to the API server. + +.PP +\fB\-s\fP, \fB\-\-server\fP="" + The address and port of the Kubernetes API server + +.PP +\fB\-\-stderrthreshold\fP=2 + logs at or above this threshold go to stderr + +.PP +\fB\-\-token\fP="" + Bearer token for authentication to the API server. + +.PP +\fB\-\-user\fP="" + The name of the kubeconfig user to use + +.PP +\fB\-\-username\fP="" + Username for basic authentication to the API server. + +.PP +\fB\-\-v\fP=0 + log level for V logs + +.PP +\fB\-\-vmodule\fP= + comma\-separated list of pattern=N settings for file\-filtered logging + + +.SH EXAMPLE +.PP +.RS + +.nf +# Resume an already paused deployment +$ kubectl rollout resume deployment/nginx + +.fi +.RE + + +.SH SEE ALSO +.PP +\fBkubectl\-rollout(1)\fP, + + +.SH HISTORY +.PP +January 2015, Originally compiled by Eric Paris (eparis at redhat dot com) based on the kubernetes source material, but hopefully they have been automatically generated since! diff --git a/docs/man/man1/kubectl-rollout.1 b/docs/man/man1/kubectl-rollout.1 index 99e74cb6ab4..8015cd445a6 100644 --- a/docs/man/man1/kubectl-rollout.1 +++ b/docs/man/man1/kubectl-rollout.1 @@ -112,7 +112,7 @@ rollout manages a deployment using subcommands .SH SEE ALSO .PP -\fBkubectl(1)\fP, \fBkubectl\-rollout\-history(1)\fP, +\fBkubectl(1)\fP, \fBkubectl\-rollout\-history(1)\fP, \fBkubectl\-rollout\-pause(1)\fP, \fBkubectl\-rollout\-resume(1)\fP, .SH HISTORY diff --git a/docs/user-guide/kubectl/kubectl_rollout.md b/docs/user-guide/kubectl/kubectl_rollout.md index 3e2c755dc7b..767d9dc0f11 100644 --- a/docs/user-guide/kubectl/kubectl_rollout.md +++ b/docs/user-guide/kubectl/kubectl_rollout.md @@ -72,8 +72,10 @@ kubectl rollout SUBCOMMAND * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl rollout history](kubectl_rollout_history.md) - view rollout history +* [kubectl rollout pause](kubectl_rollout_pause.md) - Mark the provided resource as paused +* [kubectl rollout resume](kubectl_rollout_resume.md) - Resume a paused resource -###### Auto generated by spf13/cobra on 20-Jan-2016 +###### Auto generated by spf13/cobra on 2-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_rollout.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_rollout_pause.md b/docs/user-guide/kubectl/kubectl_rollout_pause.md new file mode 100644 index 00000000000..2f42c8993db --- /dev/null +++ b/docs/user-guide/kubectl/kubectl_rollout_pause.md @@ -0,0 +1,98 @@ + + + + +WARNING +WARNING +WARNING +WARNING +WARNING + +

PLEASE NOTE: This document applies to the HEAD of the source tree

+ +If you are using a released version of Kubernetes, you should +refer to the docs that go with that version. + +Documentation for other releases can be found at +[releases.k8s.io](http://releases.k8s.io). + +-- + + + + + +## kubectl rollout pause + +Mark the provided resource as paused + +### Synopsis + + +Mark the provided resource as paused + +Paused resources will not be reconciled by a controller. +Use \"kubectl rollout resume\" to resume a paused resource. +Currently only deployments support being paused. + +``` +kubectl rollout pause RESOURCE +``` + +### Examples + +``` +# Mark the nginx deployment as paused. Any current state of +# the deployment will continue its function, new updates to the deployment will not +# have an effect as long as the deployment is paused. +$ kubectl rollout pause deployment/nginx +``` + +### Options + +``` + -f, --filename=[]: Filename, directory, or URL to a file identifying the resource to get from a server. +``` + +### Options inherited from parent commands + +``` + --alsologtostderr[=false]: log to standard error as well as files + --api-version="": The API version to use when talking to the server + --certificate-authority="": Path to a cert. file for the certificate authority. + --client-certificate="": Path to a client certificate file for TLS. + --client-key="": Path to a client key file for TLS. + --cluster="": The name of the kubeconfig cluster to use + --context="": The name of the kubeconfig context to use + --insecure-skip-tls-verify[=false]: If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure. + --kubeconfig="": Path to the kubeconfig file to use for CLI requests. + --log-backtrace-at=:0: when logging hits line file:N, emit a stack trace + --log-dir="": If non-empty, write log files in this directory + --log-flush-frequency=5s: Maximum number of seconds between log flushes + --logtostderr[=true]: log to standard error instead of files + --match-server-version[=false]: Require server version to match client version + --namespace="": If present, the namespace scope for this CLI request. + --password="": Password for basic authentication to the API server. + -s, --server="": The address and port of the Kubernetes API server + --stderrthreshold=2: logs at or above this threshold go to stderr + --token="": Bearer token for authentication to the API server. + --user="": The name of the kubeconfig user to use + --username="": Username for basic authentication to the API server. + --v=0: log level for V logs + --vmodule=: comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [kubectl rollout](kubectl_rollout.md) - rollout manages a deployment + +###### Auto generated by spf13/cobra on 25-Jan-2016 + + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_rollout_pause.md?pixel)]() + diff --git a/docs/user-guide/kubectl/kubectl_rollout_resume.md b/docs/user-guide/kubectl/kubectl_rollout_resume.md new file mode 100644 index 00000000000..0b616043198 --- /dev/null +++ b/docs/user-guide/kubectl/kubectl_rollout_resume.md @@ -0,0 +1,96 @@ + + + + +WARNING +WARNING +WARNING +WARNING +WARNING + +

PLEASE NOTE: This document applies to the HEAD of the source tree

+ +If you are using a released version of Kubernetes, you should +refer to the docs that go with that version. + +Documentation for other releases can be found at +[releases.k8s.io](http://releases.k8s.io). + +-- + + + + + +## kubectl rollout resume + +Resume a paused resource + +### Synopsis + + +Resume a paused resource + +Paused resources will not be reconciled by a controller. By resuming a +resource, we allow it to be reconciled again. +Currently only deployments support being resumed. + +``` +kubectl rollout resume RESOURCE +``` + +### Examples + +``` +# Resume an already paused deployment +$ kubectl rollout resume deployment/nginx +``` + +### Options + +``` + -f, --filename=[]: Filename, directory, or URL to a file identifying the resource to get from a server. +``` + +### Options inherited from parent commands + +``` + --alsologtostderr[=false]: log to standard error as well as files + --api-version="": The API version to use when talking to the server + --certificate-authority="": Path to a cert. file for the certificate authority. + --client-certificate="": Path to a client certificate file for TLS. + --client-key="": Path to a client key file for TLS. + --cluster="": The name of the kubeconfig cluster to use + --context="": The name of the kubeconfig context to use + --insecure-skip-tls-verify[=false]: If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure. + --kubeconfig="": Path to the kubeconfig file to use for CLI requests. + --log-backtrace-at=:0: when logging hits line file:N, emit a stack trace + --log-dir="": If non-empty, write log files in this directory + --log-flush-frequency=5s: Maximum number of seconds between log flushes + --logtostderr[=true]: log to standard error instead of files + --match-server-version[=false]: Require server version to match client version + --namespace="": If present, the namespace scope for this CLI request. + --password="": Password for basic authentication to the API server. + -s, --server="": The address and port of the Kubernetes API server + --stderrthreshold=2: logs at or above this threshold go to stderr + --token="": Bearer token for authentication to the API server. + --user="": The name of the kubeconfig user to use + --username="": Username for basic authentication to the API server. + --v=0: log level for V logs + --vmodule=: comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [kubectl rollout](kubectl_rollout.md) - rollout manages a deployment + +###### Auto generated by spf13/cobra on 25-Jan-2016 + + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_rollout_resume.md?pixel)]() + diff --git a/pkg/kubectl/cmd/rollout/rollout.go b/pkg/kubectl/cmd/rollout/rollout.go index 16e77940f28..fbfc631a81b 100644 --- a/pkg/kubectl/cmd/rollout/rollout.go +++ b/pkg/kubectl/cmd/rollout/rollout.go @@ -44,6 +44,8 @@ func NewCmdRollout(f *cmdutil.Factory, out io.Writer) *cobra.Command { } cmd.AddCommand(NewCmdRolloutHistory(f, out)) + cmd.AddCommand(NewCmdRolloutPause(f, out)) + cmd.AddCommand(NewCmdRolloutResume(f, out)) return cmd } diff --git a/pkg/kubectl/cmd/rollout/rollout_pause.go b/pkg/kubectl/cmd/rollout/rollout_pause.go new file mode 100644 index 00000000000..ae07dcefd5f --- /dev/null +++ b/pkg/kubectl/cmd/rollout/rollout_pause.go @@ -0,0 +1,118 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +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 rollout + +import ( + "fmt" + "io" + + "github.com/spf13/cobra" + + "k8s.io/kubernetes/pkg/api/meta" + "k8s.io/kubernetes/pkg/kubectl" + cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" + "k8s.io/kubernetes/pkg/kubectl/resource" + "k8s.io/kubernetes/pkg/runtime" +) + +// PauseConfig is the start of the data required to perform the operation. As new fields are added, add them here instead of +// referencing the cmd.Flags() +type PauseConfig struct { + PauseObject func(object runtime.Object) (bool, error) + Mapper meta.RESTMapper + Typer runtime.ObjectTyper + Info *resource.Info + + Out io.Writer + Filenames []string +} + +const ( + pause_long = `Mark the provided resource as paused + +Paused resources will not be reconciled by a controller. +Use \"kubectl rollout resume\" to resume a paused resource. +Currently only deployments support being paused.` + + pause_example = `# Mark the nginx deployment as paused. Any current state of +# the deployment will continue its function, new updates to the deployment will not +# have an effect as long as the deployment is paused. +$ kubectl rollout pause deployment/nginx` +) + +func NewCmdRolloutPause(f *cmdutil.Factory, out io.Writer) *cobra.Command { + opts := &PauseConfig{} + + cmd := &cobra.Command{ + Use: "pause RESOURCE", + Short: "Mark the provided resource as paused", + Long: pause_long, + Example: pause_example, + Run: func(cmd *cobra.Command, args []string) { + cmdutil.CheckErr(opts.CompletePause(f, cmd, out, args)) + cmdutil.CheckErr(opts.RunPause()) + }, + } + + usage := "Filename, directory, or URL to a file identifying the resource to get from a server." + kubectl.AddJsonFilenameFlag(cmd, &opts.Filenames, usage) + return cmd +} + +func (o *PauseConfig) CompletePause(f *cmdutil.Factory, cmd *cobra.Command, out io.Writer, args []string) error { + if len(args) == 0 && len(o.Filenames) == 0 { + return cmdutil.UsageError(cmd, cmd.Use) + } + + o.Mapper, o.Typer = f.Object() + o.PauseObject = f.PauseObject + o.Out = out + + cmdNamespace, enforceNamespace, err := f.DefaultNamespace() + if err != nil { + return err + } + + infos, err := resource.NewBuilder(o.Mapper, o.Typer, resource.ClientMapperFunc(f.ClientForMapping), f.Decoder(true)). + NamespaceParam(cmdNamespace).DefaultNamespace(). + FilenameParam(enforceNamespace, o.Filenames...). + ResourceTypeOrNameArgs(true, args...). + SingleResourceType(). + Latest(). + Do().Infos() + if err != nil { + return err + } + if len(infos) != 1 { + return fmt.Errorf("rollout pause is only supported on individual resources - %d resources were found", len(infos)) + } + o.Info = infos[0] + return nil +} + +func (o PauseConfig) RunPause() error { + isAlreadyPaused, err := o.PauseObject(o.Info.Object) + if err != nil { + return err + } + if isAlreadyPaused { + cmdutil.PrintSuccess(o.Mapper, false, o.Out, o.Info.Mapping.Resource, o.Info.Name, "already paused") + return nil + } + cmdutil.PrintSuccess(o.Mapper, false, o.Out, o.Info.Mapping.Resource, o.Info.Name, "paused") + return nil +} diff --git a/pkg/kubectl/cmd/rollout/rollout_resume.go b/pkg/kubectl/cmd/rollout/rollout_resume.go new file mode 100644 index 00000000000..a38147e75fa --- /dev/null +++ b/pkg/kubectl/cmd/rollout/rollout_resume.go @@ -0,0 +1,116 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +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 rollout + +import ( + "fmt" + "io" + + "github.com/spf13/cobra" + + "k8s.io/kubernetes/pkg/api/meta" + "k8s.io/kubernetes/pkg/kubectl" + cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" + "k8s.io/kubernetes/pkg/kubectl/resource" + "k8s.io/kubernetes/pkg/runtime" +) + +// ResumeConfig is the start of the data required to perform the operation. As new fields are added, add them here instead of +// referencing the cmd.Flags() +type ResumeConfig struct { + ResumeObject func(object runtime.Object) (bool, error) + Mapper meta.RESTMapper + Typer runtime.ObjectTyper + Info *resource.Info + + Out io.Writer + Filenames []string +} + +const ( + resume_long = `Resume a paused resource + +Paused resources will not be reconciled by a controller. By resuming a +resource, we allow it to be reconciled again. +Currently only deployments support being resumed.` + + resume_example = `# Resume an already paused deployment +$ kubectl rollout resume deployment/nginx` +) + +func NewCmdRolloutResume(f *cmdutil.Factory, out io.Writer) *cobra.Command { + opts := &ResumeConfig{} + + cmd := &cobra.Command{ + Use: "resume RESOURCE", + Short: "Resume a paused resource", + Long: resume_long, + Example: resume_example, + Run: func(cmd *cobra.Command, args []string) { + cmdutil.CheckErr(opts.CompleteResume(f, cmd, out, args)) + cmdutil.CheckErr(opts.RunResume()) + }, + } + + usage := "Filename, directory, or URL to a file identifying the resource to get from a server." + kubectl.AddJsonFilenameFlag(cmd, &opts.Filenames, usage) + return cmd +} + +func (o *ResumeConfig) CompleteResume(f *cmdutil.Factory, cmd *cobra.Command, out io.Writer, args []string) error { + if len(args) == 0 && len(o.Filenames) == 0 { + return cmdutil.UsageError(cmd, cmd.Use) + } + + o.Mapper, o.Typer = f.Object() + o.ResumeObject = f.ResumeObject + o.Out = out + + cmdNamespace, enforceNamespace, err := f.DefaultNamespace() + if err != nil { + return err + } + + infos, err := resource.NewBuilder(o.Mapper, o.Typer, resource.ClientMapperFunc(f.ClientForMapping), f.Decoder(true)). + NamespaceParam(cmdNamespace).DefaultNamespace(). + FilenameParam(enforceNamespace, o.Filenames...). + ResourceTypeOrNameArgs(true, args...). + SingleResourceType(). + Latest(). + Do().Infos() + if err != nil { + return err + } + if len(infos) != 1 { + return fmt.Errorf("rollout resume is only supported on individual resources - %d resources were found", len(infos)) + } + o.Info = infos[0] + return nil +} + +func (o ResumeConfig) RunResume() error { + isAlreadyResumed, err := o.ResumeObject(o.Info.Object) + if err != nil { + return err + } + if isAlreadyResumed { + cmdutil.PrintSuccess(o.Mapper, false, o.Out, o.Info.Mapping.Resource, o.Info.Name, "already resumed") + return nil + } + cmdutil.PrintSuccess(o.Mapper, false, o.Out, o.Info.Mapping.Resource, o.Info.Name, "resumed") + return nil +} diff --git a/pkg/kubectl/cmd/util/factory.go b/pkg/kubectl/cmd/util/factory.go index 4ae94131ce7..eea080f5378 100644 --- a/pkg/kubectl/cmd/util/factory.go +++ b/pkg/kubectl/cmd/util/factory.go @@ -96,6 +96,10 @@ type Factory struct { LabelsForObject func(object runtime.Object) (map[string]string, error) // LogsForObject returns a request for the logs associated with the provided object LogsForObject func(object, options runtime.Object) (*client.Request, error) + // PauseObject marks the provided object as paused ie. it will not be reconciled by its controller. + PauseObject func(object runtime.Object) (bool, error) + // ResumeObject resumes a paused object ie. it will be reconciled by its controller. + ResumeObject func(object runtime.Object) (bool, error) // Returns a schema that can validate objects stored on disk. Validator func(validate bool, cacheDir string) (validation.Schema, error) // SwaggerSchema returns the schema declaration for the provided group version. @@ -300,6 +304,50 @@ func NewFactory(optionalClientConfig clientcmd.ClientConfig) *Factory { return nil, fmt.Errorf("cannot get the logs from %v", gvk) } }, + PauseObject: func(object runtime.Object) (bool, error) { + c, err := clients.ClientForVersion(nil) + if err != nil { + return false, err + } + + switch t := object.(type) { + case *extensions.Deployment: + if t.Spec.Paused { + return true, nil + } + t.Spec.Paused = true + _, err := c.Extensions().Deployments(t.Namespace).Update(t) + return false, err + default: + gvk, err := api.Scheme.ObjectKind(object) + if err != nil { + return false, err + } + return false, fmt.Errorf("cannot pause %v", gvk) + } + }, + ResumeObject: func(object runtime.Object) (bool, error) { + c, err := clients.ClientForVersion(nil) + if err != nil { + return false, err + } + + switch t := object.(type) { + case *extensions.Deployment: + if !t.Spec.Paused { + return true, nil + } + t.Spec.Paused = false + _, err := c.Extensions().Deployments(t.Namespace).Update(t) + return false, err + default: + gvk, err := api.Scheme.ObjectKind(object) + if err != nil { + return false, err + } + return false, fmt.Errorf("cannot resume %v", gvk) + } + }, Scaler: func(mapping *meta.RESTMapping) (kubectl.Scaler, error) { mappingVersion := mapping.GroupVersionKind.GroupVersion() client, err := clients.ClientForVersion(&mappingVersion) From f18d40c28edfc4e0cd17b972e3766c3573098aa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20K=C3=A4ldstr=C3=B6m?= Date: Tue, 2 Feb 2016 15:34:38 +0200 Subject: [PATCH 057/328] Update docker-multinode, use restart=on-failure and bump to 1.2.0-alpha.7 --- .../docker-multinode.md | 5 +++-- .../docker-multinode/master.md | 21 ++++++++++--------- .../docker-multinode/master.sh | 14 +++++++------ .../docker-multinode/worker.md | 3 ++- .../docker-multinode/worker.sh | 12 ++++++----- docs/getting-started-guides/docker.md | 19 ++++++++--------- 6 files changed, 40 insertions(+), 34 deletions(-) diff --git a/docs/getting-started-guides/docker-multinode.md b/docs/getting-started-guides/docker-multinode.md index fac16f3319b..16c6b69e84c 100644 --- a/docs/getting-started-guides/docker-multinode.md +++ b/docs/getting-started-guides/docker-multinode.md @@ -55,7 +55,7 @@ The only thing you need is a machine with **Docker 1.7.1 or higher** ## Overview This guide will set up a 2-node Kubernetes cluster, consisting of a _master_ node which hosts the API server and orchestrates work -and a _worker_ node which receives work from the master. You can repeat the process of adding worker nodes an arbitrary number of +and a _worker_ node which receives work from the master. You can repeat the process of adding worker nodes an arbitrary number of times to create larger clusters. Here's a diagram of what the final result will look like: @@ -74,10 +74,11 @@ it is still useful to use containers for deployment and management, so we create You can specify the version on every node before install: ```sh -export K8S_VERSION= +export K8S_VERSION= export ETCD_VERSION= export FLANNEL_VERSION= export FLANNEL_IFACE= +export FLANNEL_IPMASQ= ``` Otherwise, we'll use latest `hyperkube` image as default k8s version. diff --git a/docs/getting-started-guides/docker-multinode/master.md b/docs/getting-started-guides/docker-multinode/master.md index 3a79243d59a..42b0041841d 100644 --- a/docs/getting-started-guides/docker-multinode/master.md +++ b/docs/getting-started-guides/docker-multinode/master.md @@ -36,16 +36,17 @@ Documentation for other releases can be found at We'll begin by setting up the master node. For the purposes of illustration, we'll assume that the IP of this machine is `${MASTER_IP}`. We'll need to run several versioned Kubernetes components, so we'll assume that the version we want -to run is `${K8S_VERSION}`, which should hold a released version of Kubernetes >= "1.2.0-alpha.6" +to run is `${K8S_VERSION}`, which should hold a released version of Kubernetes >= "1.2.0-alpha.7" Enviroinment variables used: ```sh export MASTER_IP= -export K8S_VERSION= +export K8S_VERSION= export ETCD_VERSION= export FLANNEL_VERSION= export FLANNEL_IFACE= +export FLANNEL_IPMASQ= ``` There are two main phases to installing the master: @@ -82,7 +83,7 @@ Run: ```sh sudo docker -H unix:///var/run/docker-bootstrap.sock run -d \ --net=host \ - gcr.io/google_containers/etcd:${ETCD_VERSION} \ + gcr.io/google_containers/etcd-amd64:${ETCD_VERSION} \ /usr/local/bin/etcd \ --listen-client-urls=http://127.0.0.1:4001,http://${MASTER_IP}:4001 \ --advertise-client-urls=http://${MASTER_IP}:4001 \ @@ -94,7 +95,7 @@ Next, you need to set a CIDR range for flannel. This CIDR should be chosen to b ```sh sudo docker -H unix:///var/run/docker-bootstrap.sock run \ --net=host \ - gcr.io/google_containers/etcd:${ETCD_VERSION} \ + gcr.io/google_containers/etcd-amd64:${ETCD_VERSION} \ etcdctl set /coreos.com/network/config '{ "Network": "10.1.0.0/16" }' ``` @@ -139,7 +140,7 @@ sudo docker -H unix:///var/run/docker-bootstrap.sock run -d \ --privileged \ -v /dev/net:/dev/net \ quay.io/coreos/flannel:${FLANNEL_VERSION} \ - --ip-masq \ + --ip-masq=${FLANNEL_IPMASQ} \ --iface=${FLANNEL_IFACE} ``` @@ -225,11 +226,11 @@ sudo docker run \ At this point, you should have a functioning 1-node cluster. Let's test it out! Download the kubectl binary for `${K8S_VERSION}` (look at the URL in the following links) and make it available by editing your PATH environment variable. -([OS X/amd64](http://storage.googleapis.com/kubernetes-release/release/v1.2.0-alpha.6/bin/darwin/amd64/kubectl)) -([OS X/386](http://storage.googleapis.com/kubernetes-release/release/v1.2.0-alpha.6/bin/darwin/386/kubectl)) -([linux/amd64](http://storage.googleapis.com/kubernetes-release/release/v1.2.0-alpha.6/bin/linux/amd64/kubectl)) -([linux/386](http://storage.googleapis.com/kubernetes-release/release/v1.2.0-alpha.6/bin/linux/386/kubectl)) -([linux/arm](http://storage.googleapis.com/kubernetes-release/release/v1.2.0-alpha.6/bin/linux/arm/kubectl)) +([OS X/amd64](http://storage.googleapis.com/kubernetes-release/release/v1.2.0-alpha.7/bin/darwin/amd64/kubectl)) +([OS X/386](http://storage.googleapis.com/kubernetes-release/release/v1.2.0-alpha.7/bin/darwin/386/kubectl)) +([linux/amd64](http://storage.googleapis.com/kubernetes-release/release/v1.2.0-alpha.7/bin/linux/amd64/kubectl)) +([linux/386](http://storage.googleapis.com/kubernetes-release/release/v1.2.0-alpha.7/bin/linux/386/kubectl)) +([linux/arm](http://storage.googleapis.com/kubernetes-release/release/v1.2.0-alpha.7/bin/linux/arm/kubectl)) For example, OS X: diff --git a/docs/getting-started-guides/docker-multinode/master.sh b/docs/getting-started-guides/docker-multinode/master.sh index d831845a5da..5024410e496 100755 --- a/docs/getting-started-guides/docker-multinode/master.sh +++ b/docs/getting-started-guides/docker-multinode/master.sh @@ -26,9 +26,10 @@ if ( ! ps -ef | grep "/usr/bin/docker" | grep -v 'grep' &> /dev/null ); then fi # Make sure k8s version env is properly set -K8S_VERSION=${K8S_VERSION:-"1.2.0-alpha.6"} +K8S_VERSION=${K8S_VERSION:-"1.2.0-alpha.7"} ETCD_VERSION=${ETCD_VERSION:-"2.2.1"} FLANNEL_VERSION=${FLANNEL_VERSION:-"0.5.5"} +FLANNEL_IPMASQ=${FLANNEL_IPMASQ:-"true"} FLANNEL_IFACE=${FLANNEL_IFACE:-"eth0"} ARCH=${ARCH:-"amd64"} @@ -47,6 +48,7 @@ echo "K8S_VERSION is set to: ${K8S_VERSION}" echo "ETCD_VERSION is set to: ${ETCD_VERSION}" echo "FLANNEL_VERSION is set to: ${FLANNEL_VERSION}" echo "FLANNEL_IFACE is set to: ${FLANNEL_IFACE}" +echo "FLANNEL_IPMASQ is set to: ${FLANNEL_IPMASQ}" echo "MASTER_IP is set to: ${MASTER_IP}" echo "ARCH is set to: ${ARCH}" @@ -120,10 +122,10 @@ DOCKER_CONF="" start_k8s(){ # Start etcd docker -H unix:///var/run/docker-bootstrap.sock run \ - --restart=always \ + --restart=on-failure \ --net=host \ -d \ - gcr.io/google_containers/etcd:${ETCD_VERSION} \ + gcr.io/google_containers/etcd-${ARCH}:${ETCD_VERSION} \ /usr/local/bin/etcd \ --listen-client-urls=http://127.0.0.1:4001,http://${MASTER_IP}:4001 \ --advertise-client-urls=http://${MASTER_IP}:4001 \ @@ -139,14 +141,14 @@ start_k8s(){ # iface may change to a private network interface, eth0 is for default flannelCID=$(docker -H unix:///var/run/docker-bootstrap.sock run \ - --restart=always \ + --restart=on-failure \ -d \ --net=host \ --privileged \ -v /dev/net:/dev/net \ quay.io/coreos/flannel:${FLANNEL_VERSION} \ /opt/bin/flanneld \ - --ip-masq \ + --ip-masq="${FLANNEL_IPMASQ}" \ --iface="${FLANNEL_IFACE}") sleep 8 @@ -200,7 +202,7 @@ start_k8s(){ --net=host \ --pid=host \ --privileged \ - --restart=always \ + --restart=on-failure \ -d \ -v /sys:/sys:ro \ -v /var/run:/var/run:rw \ diff --git a/docs/getting-started-guides/docker-multinode/worker.md b/docs/getting-started-guides/docker-multinode/worker.md index 82308a13522..5ec5b77b6f5 100644 --- a/docs/getting-started-guides/docker-multinode/worker.md +++ b/docs/getting-started-guides/docker-multinode/worker.md @@ -47,6 +47,7 @@ export MASTER_IP= export K8S_VERSION= export FLANNEL_VERSION= export FLANNEL_IFACE= +export FLANNEL_IPMASQ= ``` For each worker node, there are three steps: @@ -105,7 +106,7 @@ sudo docker -H unix:///var/run/docker-bootstrap.sock run -d \ -v /dev/net:/dev/net \ quay.io/coreos/flannel:${FLANNEL_VERSION} \ /opt/bin/flanneld \ - --ip-masq \ + --ip-masq=${FLANNEL_IPMASQ} \ --etcd-endpoints=http://${MASTER_IP}:4001 \ --iface=${FLANNEL_IFACE} ``` diff --git a/docs/getting-started-guides/docker-multinode/worker.sh b/docs/getting-started-guides/docker-multinode/worker.sh index 759d638275f..419b14b3f69 100755 --- a/docs/getting-started-guides/docker-multinode/worker.sh +++ b/docs/getting-started-guides/docker-multinode/worker.sh @@ -26,9 +26,10 @@ if ( ! ps -ef | grep "/usr/bin/docker" | grep -v 'grep' &> /dev/null ); then fi # Make sure k8s version env is properly set -K8S_VERSION=${K8S_VERSION:-"1.2.0-alpha.6"} +K8S_VERSION=${K8S_VERSION:-"1.2.0-alpha.7"} FLANNEL_VERSION=${FLANNEL_VERSION:-"0.5.5"} FLANNEL_IFACE=${FLANNEL_IFACE:-"eth0"} +FLANNEL_IPMASQ=${FLANNEL_IPMASQ:-"true"} ARCH=${ARCH:-"amd64"} # Run as root @@ -46,6 +47,7 @@ fi echo "K8S_VERSION is set to: ${K8S_VERSION}" echo "FLANNEL_VERSION is set to: ${FLANNEL_VERSION}" echo "FLANNEL_IFACE is set to: ${FLANNEL_IFACE}" +echo "FLANNEL_IPMASQ is set to: ${FLANNEL_IPMASQ}" echo "MASTER_IP is set to: ${MASTER_IP}" echo "ARCH is set to: ${ARCH}" @@ -118,13 +120,13 @@ start_k8s() { # Start flannel flannelCID=$(docker -H unix:///var/run/docker-bootstrap.sock run \ -d \ - --restart=always \ + --restart=on-failure \ --net=host \ --privileged \ -v /dev/net:/dev/net \ quay.io/coreos/flannel:${FLANNEL_VERSION} \ /opt/bin/flanneld \ - --ip-masq \ + --ip-masq="${FLANNEL_IPMASQ}" \ --etcd-endpoints=http://${MASTER_IP}:4001 \ --iface="${FLANNEL_IFACE}") @@ -180,7 +182,7 @@ start_k8s() { --net=host \ --pid=host \ --privileged \ - --restart=always \ + --restart=on-failure \ -d \ -v /sys:/sys:ro \ -v /var/run:/var/run:rw \ @@ -203,7 +205,7 @@ start_k8s() { -d \ --net=host \ --privileged \ - --restart=always \ + --restart=on-failure \ gcr.io/google_containers/hyperkube-${ARCH}:v${K8S_VERSION} \ /hyperkube proxy \ --master=http://${MASTER_IP}:8080 \ diff --git a/docs/getting-started-guides/docker.md b/docs/getting-started-guides/docker.md index 7582ffd6c8c..806514014a3 100644 --- a/docs/getting-started-guides/docker.md +++ b/docs/getting-started-guides/docker.md @@ -58,7 +58,7 @@ Here's a diagram of what the final result will look like: 1. You need to have docker installed on one machine. 2. Decide what Kubernetes version to use. Set the `${K8S_VERSION}` variable to - a released version of Kubernetes >= "1.2.0-alpha.6" + a released version of Kubernetes >= "1.2.0-alpha.7" ### Run it @@ -96,11 +96,11 @@ At this point you should have a running Kubernetes cluster. You can test this by downloading the kubectl binary for `${K8S_VERSION}` (look at the URL in the following links) and make it available by editing your PATH environment variable. -([OS X/amd64](http://storage.googleapis.com/kubernetes-release/release/v1.2.0-alpha.6/bin/darwin/amd64/kubectl)) -([OS X/386](http://storage.googleapis.com/kubernetes-release/release/v1.2.0-alpha.6/bin/darwin/386/kubectl)) -([linux/amd64](http://storage.googleapis.com/kubernetes-release/release/v1.2.0-alpha.6/bin/linux/amd64/kubectl)) -([linux/386](http://storage.googleapis.com/kubernetes-release/release/v1.2.0-alpha.6/bin/linux/386/kubectl)) -([linux/arm](http://storage.googleapis.com/kubernetes-release/release/v1.2.0-alpha.6/bin/linux/arm/kubectl)) +([OS X/amd64](http://storage.googleapis.com/kubernetes-release/release/v1.2.0-alpha.7/bin/darwin/amd64/kubectl)) +([OS X/386](http://storage.googleapis.com/kubernetes-release/release/v1.2.0-alpha.7/bin/darwin/386/kubectl)) +([linux/amd64](http://storage.googleapis.com/kubernetes-release/release/v1.2.0-alpha.7/bin/linux/amd64/kubectl)) +([linux/386](http://storage.googleapis.com/kubernetes-release/release/v1.2.0-alpha.7/bin/linux/386/kubectl)) +([linux/arm](http://storage.googleapis.com/kubernetes-release/release/v1.2.0-alpha.7/bin/linux/arm/kubectl)) For example, OS X: @@ -159,7 +159,7 @@ Now run `docker ps` you should see nginx running. You may need to wait a few mi kubectl expose rc nginx --port=80 ``` -Run the following command to obtain the IP of this service we just created. There are two IPs, the first one is internal (CLUSTER_IP), and the second one is the external load-balanced IP. +Run the following command to obtain the IP of this service we just created. There are two IPs, the first one is internal (CLUSTER_IP), and the second one is the external load-balanced IP (if a LoadBalancer is configured) ```sh kubectl get svc nginx @@ -219,9 +219,8 @@ parameters as follows: output of /proc/cmdline: ```console - $cat /proc/cmdline - BOOT_IMAGE=/boot/vmlinuz-3.18.4-aufs root=/dev/sda5 ro cgroup_enable=memory - swapaccount=1 + $ cat /proc/cmdline + BOOT_IMAGE=/boot/vmlinuz-3.18.4-aufs root=/dev/sda5 ro cgroup_enable=memory swapaccount=1 ``` From e2713651920c4c5ea852d6aba8718cd83ee3c61d Mon Sep 17 00:00:00 2001 From: gmarek Date: Tue, 2 Feb 2016 14:55:27 +0100 Subject: [PATCH 058/328] Re-add deletion of replication controller to the density test --- test/e2e/density.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/e2e/density.go b/test/e2e/density.go index c44f2eac2ce..b72180841d3 100644 --- a/test/e2e/density.go +++ b/test/e2e/density.go @@ -462,6 +462,21 @@ var _ = Describe("Density", func() { Logf("Approx throughput: %v pods/min", float64(nodeCount)/(e2eLag[len(e2eLag)-1].Latency.Minutes())) } + + By("Deleting ReplicationController and all additional Pods") + // We explicitly delete all pods to have API calls necessary for deletion accounted in metrics. + rc, err := c.ReplicationControllers(ns).Get(RCName) + if err == nil && rc.Spec.Replicas != 0 { + By("Cleaning up the replication controller") + err := DeleteRC(c, ns, RCName) + expectNoError(err) + } + + By("Removing additional pods if any") + for i := 1; i <= nodeCount; i++ { + name := additionalPodsPrefix + "-" + strconv.Itoa(i) + c.Pods(ns).Delete(name, nil) + } }) } }) From de740236b85e80e8b735fd59e03c547d0915e79c Mon Sep 17 00:00:00 2001 From: gmarek Date: Tue, 2 Feb 2016 15:36:08 +0100 Subject: [PATCH 059/328] Randomize password to kubemark master --- test/kubemark/start-kubemark.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/kubemark/start-kubemark.sh b/test/kubemark/start-kubemark.sh index e7b5f6b6d8c..1a024067780 100755 --- a/test/kubemark/start-kubemark.sh +++ b/test/kubemark/start-kubemark.sh @@ -117,6 +117,8 @@ until gcloud compute ssh --zone="${ZONE}" --project="${PROJECT}" "${MASTER_NAME} sleep 1 done +password=$(python -c 'import string,random; print("".join(random.SystemRandom().choice(string.ascii_letters + string.digits) for _ in range(16)))') + gcloud compute ssh --zone="${ZONE}" --project="${PROJECT}" "${MASTER_NAME}" \ --command="sudo mkdir /srv/kubernetes -p && \ sudo bash -c \"echo ${MASTER_CERT_BASE64} | base64 -d > /srv/kubernetes/server.cert\" && \ @@ -127,7 +129,7 @@ gcloud compute ssh --zone="${ZONE}" --project="${PROJECT}" "${MASTER_NAME}" \ sudo bash -c \"echo \"${KUBE_BEARER_TOKEN},admin,admin\" > /srv/kubernetes/known_tokens.csv\" && \ sudo bash -c \"echo \"${KUBELET_TOKEN},kubelet,kubelet\" >> /srv/kubernetes/known_tokens.csv\" && \ sudo bash -c \"echo \"${KUBE_PROXY_TOKEN},kube_proxy,kube_proxy\" >> /srv/kubernetes/known_tokens.csv\" && \ - sudo bash -c \"echo admin,admin,admin > /srv/kubernetes/basic_auth.csv\"" + sudo bash -c \"echo ${password},admin,admin > /srv/kubernetes/basic_auth.csv\"" if [ "${RUN_FROM_DISTRO}" == "false" ]; then gcloud compute copy-files --zone="${ZONE}" --project="${PROJECT}" \ @@ -220,3 +222,4 @@ until [[ "$(kubectl --kubeconfig="${KUBE_ROOT}"/test/kubemark/kubeconfig.loc get sleep 1 done echo "" +echo "Password to kubemark master: ${password}" From fdf6a0f61c354928e4d9329841328ab52d37ab00 Mon Sep 17 00:00:00 2001 From: Chao Xu Date: Tue, 26 Jan 2016 23:08:50 -0800 Subject: [PATCH 060/328] skip update when deleting with grace-period=0 --- pkg/api/rest/resttest/resttest.go | 3 ++- pkg/registry/generic/etcd/etcd.go | 2 +- test/e2e/pods.go | 8 ++++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/pkg/api/rest/resttest/resttest.go b/pkg/api/rest/resttest/resttest.go index 17e0a584220..f170ec7711d 100644 --- a/pkg/api/rest/resttest/resttest.go +++ b/pkg/api/rest/resttest/resttest.go @@ -673,7 +673,8 @@ func (t *Tester) testDeleteGracefulImmediate(obj runtime.Object, setFn SetFunc, t.Errorf("unexpected error, object should be deleted immediately: %v", err) } objectMeta = t.getObjectMetaOrFail(out) - if objectMeta.DeletionTimestamp == nil || objectMeta.DeletionGracePeriodSeconds == nil || *objectMeta.DeletionGracePeriodSeconds != 0 { + // the second delete shouldn't update the object, so the objectMeta.DeletionGracePeriodSeconds should eqaul to the value set in the first delete. + if objectMeta.DeletionTimestamp == nil || objectMeta.DeletionGracePeriodSeconds == nil || *objectMeta.DeletionGracePeriodSeconds != expectedGrace { t.Errorf("unexpected deleted meta: %#v", objectMeta) } } diff --git a/pkg/registry/generic/etcd/etcd.go b/pkg/registry/generic/etcd/etcd.go index a6532d9d42f..d83180dba39 100644 --- a/pkg/registry/generic/etcd/etcd.go +++ b/pkg/registry/generic/etcd/etcd.go @@ -387,7 +387,7 @@ func (e *Etcd) Delete(ctx api.Context, name string, options *api.DeleteOptions) if pendingGraceful { return e.finalizeDelete(obj, false) } - if graceful { + if graceful && *options.GracePeriodSeconds > 0 { out := e.NewFunc() lastGraceful := int64(0) err := e.Storage.GuaranteedUpdate( diff --git a/test/e2e/pods.go b/test/e2e/pods.go index ed432d2a0a4..7f87aac8763 100644 --- a/test/e2e/pods.go +++ b/test/e2e/pods.go @@ -343,8 +343,12 @@ var _ = Describe("Pods", func() { Fail("Timeout while waiting for pod creation") } + // We need to wait for the pod to be scheduled, otherwise the deletion + // will be carried out immediately rather than gracefully. + expectNoError(framework.WaitForPodRunning(pod.Name)) + By("deleting the pod gracefully") - if err := podClient.Delete(pod.Name, nil); err != nil { + if err := podClient.Delete(pod.Name, api.NewDeleteOptions(30)); err != nil { Failf("Failed to delete pod: %v", err) } @@ -352,7 +356,7 @@ var _ = Describe("Pods", func() { deleted := false timeout := false var lastPod *api.Pod - timer := time.After(podStartTimeout) + timer := time.After(30 * time.Second) for !deleted && !timeout { select { case event, _ := <-w.ResultChan(): From 156d301140ee40a3f4c6ed11e40479c4e55670fa Mon Sep 17 00:00:00 2001 From: Yu-Ju Hong Date: Tue, 2 Feb 2016 11:08:21 -0800 Subject: [PATCH 061/328] Change docker health checker to using `docker ps` `docker ps` is a more reliable health check than docker version from past experiences. --- cluster/gce/trusty/node.yaml | 2 +- cluster/saltbase/salt/supervisor/docker-checker.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cluster/gce/trusty/node.yaml b/cluster/gce/trusty/node.yaml index fde84c1e5b5..eb69e33b8b3 100644 --- a/cluster/gce/trusty/node.yaml +++ b/cluster/gce/trusty/node.yaml @@ -258,7 +258,7 @@ script # We simply kill the process when there is a failure. Another upstart job will automatically # restart the process. while [ 1 ]; do - if ! timeout 10 docker version > /dev/null; then + if ! timeout 20 docker ps > /dev/null; then echo "Docker daemon failed!" pkill docker fi diff --git a/cluster/saltbase/salt/supervisor/docker-checker.sh b/cluster/saltbase/salt/supervisor/docker-checker.sh index 05492e75589..22195033a17 100755 --- a/cluster/saltbase/salt/supervisor/docker-checker.sh +++ b/cluster/saltbase/salt/supervisor/docker-checker.sh @@ -25,7 +25,7 @@ echo "waiting a minute for startup" sleep 60 while true; do - if ! sudo timeout 10 docker version > /dev/null; then + if ! sudo timeout 20 docker ps > /dev/null; then echo "Docker failed!" exit 2 fi From f2d5375bc0497d10252d9ef240dc80416597eea7 Mon Sep 17 00:00:00 2001 From: Matt Liggett Date: Wed, 27 Jan 2016 10:27:14 -0800 Subject: [PATCH 062/328] Stop deleting DaemonSet pods during drain. We do this because they will be recreated immediately by the DaemonSet Controller. In addition, we also require a specific flag (--ignore-daemonsets) when there are DaemonSet pods on the node. --- contrib/completions/bash/kubectl | 1 + docs/man/man1/kubectl-drain.1 | 13 +++- docs/user-guide/kubectl/kubectl_drain.md | 12 ++-- hack/verify-flags/known-flags.txt | 1 + pkg/kubectl/cmd/drain.go | 79 +++++++++++++++++++----- pkg/kubectl/cmd/drain_test.go | 12 +++- 6 files changed, 96 insertions(+), 22 deletions(-) diff --git a/contrib/completions/bash/kubectl b/contrib/completions/bash/kubectl index e5235d5ccf3..4fa8a53294b 100644 --- a/contrib/completions/bash/kubectl +++ b/contrib/completions/bash/kubectl @@ -1194,6 +1194,7 @@ _kubectl_drain() flags+=("--force") flags+=("--grace-period=") + flags+=("--ignore-daemonsets") flags+=("--alsologtostderr") flags+=("--api-version=") flags+=("--certificate-authority=") diff --git a/docs/man/man1/kubectl-drain.1 b/docs/man/man1/kubectl-drain.1 index 512969f2e2f..d8514b45278 100644 --- a/docs/man/man1/kubectl-drain.1 +++ b/docs/man/man1/kubectl-drain.1 @@ -18,9 +18,12 @@ Drain node in preparation for maintenance. .PP The given node will be marked unschedulable to prevent new pods from arriving. Then drain deletes all pods except mirror pods (which cannot be deleted through -the API server). If there are any pods that are neither mirror pods nor -managed by a ReplicationController, Job, or DaemonSet, then drain will not -delete any pods unless you use \-\-force. +the API server). If there are DaemonSet\-managed pods, drain will not proceed +without \-\-ignore\-daemonsets, and regardless it will not delete any +DaemonSet\-managed pods, because those pods would be immediately replaced by the +DaemonSet controller, which ignores unschedulable marknigs. If there are any +pods that are neither mirror pods nor managed\-\-by ReplicationController, +DaemonSet or Job\-\-, then drain will not delete any pods unless you use \-\-force. .PP When you are ready to put the node back into service, use kubectl uncordon, which @@ -36,6 +39,10 @@ will make the node schedulable again. \fB\-\-grace\-period\fP=\-1 Period of time in seconds given to each pod to terminate gracefully. If negative, the default value specified in the pod will be used. +.PP +\fB\-\-ignore\-daemonsets\fP=false + Ignore DaemonSet\-managed pods. + .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP diff --git a/docs/user-guide/kubectl/kubectl_drain.md b/docs/user-guide/kubectl/kubectl_drain.md index 6a586aa1f22..1b4199c9106 100644 --- a/docs/user-guide/kubectl/kubectl_drain.md +++ b/docs/user-guide/kubectl/kubectl_drain.md @@ -38,9 +38,12 @@ Drain node in preparation for maintenance. The given node will be marked unschedulable to prevent new pods from arriving. Then drain deletes all pods except mirror pods (which cannot be deleted through -the API server). If there are any pods that are neither mirror pods nor -managed by a ReplicationController, Job, or DaemonSet, then drain will not -delete any pods unless you use --force. +the API server). If there are DaemonSet-managed pods, drain will not proceed +without --ignore-daemonsets, and regardless it will not delete any +DaemonSet-managed pods, because those pods would be immediately replaced by the +DaemonSet controller, which ignores unschedulable marknigs. If there are any +pods that are neither mirror pods nor managed--by ReplicationController, +DaemonSet or Job--, then drain will not delete any pods unless you use --force. When you are ready to put the node back into service, use kubectl uncordon, which will make the node schedulable again. @@ -66,6 +69,7 @@ $ kubectl drain foo --grace-period=900 ``` --force[=false]: Continue even if there are pods not managed by a ReplicationController, Job, or DaemonSet. --grace-period=-1: Period of time in seconds given to each pod to terminate gracefully. If negative, the default value specified in the pod will be used. + --ignore-daemonsets[=false]: Ignore DaemonSet-managed pods. ``` ### Options inherited from parent commands @@ -100,7 +104,7 @@ $ kubectl drain foo --grace-period=900 * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 28-Jan-2016 +###### Auto generated by spf13/cobra on 2-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_drain.md?pixel)]() diff --git a/hack/verify-flags/known-flags.txt b/hack/verify-flags/known-flags.txt index d30e43f3b9f..8772eb57781 100644 --- a/hack/verify-flags/known-flags.txt +++ b/hack/verify-flags/known-flags.txt @@ -138,6 +138,7 @@ host-pid-sources hostname-override http-check-frequency http-port +ignore-daemonsets ignore-not-found image-gc-high-threshold image-gc-low-threshold diff --git a/pkg/kubectl/cmd/drain.go b/pkg/kubectl/cmd/drain.go index e05985d74a6..89cba686db3 100644 --- a/pkg/kubectl/cmd/drain.go +++ b/pkg/kubectl/cmd/drain.go @@ -17,6 +17,7 @@ limitations under the License. package cmd import ( + "errors" "fmt" "io" "reflect" @@ -41,6 +42,7 @@ type DrainOptions struct { factory *cmdutil.Factory Force bool GracePeriodSeconds int + IgnoreDaemonsets bool mapper meta.RESTMapper nodeInfo *resource.Info out io.Writer @@ -98,9 +100,12 @@ const ( The given node will be marked unschedulable to prevent new pods from arriving. Then drain deletes all pods except mirror pods (which cannot be deleted through -the API server). If there are any pods that are neither mirror pods nor -managed by a ReplicationController, Job, or DaemonSet, then drain will not -delete any pods unless you use --force. +the API server). If there are DaemonSet-managed pods, drain will not proceed +without --ignore-daemonsets, and regardless it will not delete any +DaemonSet-managed pods, because those pods would be immediately replaced by the +DaemonSet controller, which ignores unschedulable marknigs. If there are any +pods that are neither mirror pods nor managed--by ReplicationController, +DaemonSet or Job--, then drain will not delete any pods unless you use --force. When you are ready to put the node back into service, use kubectl uncordon, which will make the node schedulable again. @@ -127,6 +132,7 @@ func NewCmdDrain(f *cmdutil.Factory, out io.Writer) *cobra.Command { }, } cmd.Flags().BoolVar(&options.Force, "force", false, "Continue even if there are pods not managed by a ReplicationController, Job, or DaemonSet.") + cmd.Flags().BoolVar(&options.IgnoreDaemonsets, "ignore-daemonsets", false, "Ignore DaemonSet-managed pods.") cmd.Flags().IntVar(&options.GracePeriodSeconds, "grace-period", -1, "Period of time in seconds given to each pod to terminate gracefully. If negative, the default value specified in the pod will be used.") return cmd } @@ -196,6 +202,7 @@ func (o *DrainOptions) getPodsForDeletion() ([]api.Pod, error) { return pods, err } unreplicatedPodNames := []string{} + daemonSetPodNames := []string{} for _, pod := range podList.Items { _, found := pod.ObjectMeta.Annotations[types.ConfigMirrorAnnotationKey] @@ -204,6 +211,7 @@ func (o *DrainOptions) getPodsForDeletion() ([]api.Pod, error) { continue } replicated := false + daemonset_pod := false creatorRef, found := pod.ObjectMeta.Annotations[controller.CreatedByAnnotation] if found { @@ -227,7 +235,11 @@ func (o *DrainOptions) getPodsForDeletion() ([]api.Pod, error) { // gone/missing, not for any other cause. TODO(mml): something more // sophisticated than this if err == nil && ds != nil { - replicated = true + // Otherwise, treat daemonset-managed pods as unmanaged since + // DaemonSet Controller currently ignores the unschedulable bit. + // FIXME(mml): Add link to the issue concerning a proper way to drain + // daemonset pods, probably using taints. + daemonset_pod = true } } else if sr.Reference.Kind == "Job" { job, err := o.client.Jobs(sr.Reference.Namespace).Get(sr.Reference.Name) @@ -240,24 +252,63 @@ func (o *DrainOptions) getPodsForDeletion() ([]api.Pod, error) { } } } - if replicated || o.Force { - pods = append(pods, pod) - } - if !replicated { + + switch { + case daemonset_pod: + daemonSetPodNames = append(daemonSetPodNames, pod.Name) + case !replicated: unreplicatedPodNames = append(unreplicatedPodNames, pod.Name) + if o.Force { + pods = append(pods, pod) + } + default: + pods = append(pods, pod) } } - if len(unreplicatedPodNames) > 0 { - joined := strings.Join(unreplicatedPodNames, ", ") - if !o.Force { - return pods, fmt.Errorf("refusing to continue due to pods managed by neither a ReplicationController, nor a Job, nor a DaemonSet: %s (use --force to override)", joined) - } - fmt.Fprintf(o.out, "WARNING: About to delete these pods managed by neither a ReplicationController, nor a Job, nor a DaemonSet: %s\n", joined) + daemonSetErrors := !o.IgnoreDaemonsets && len(daemonSetPodNames) > 0 + unreplicatedErrors := !o.Force && len(unreplicatedPodNames) > 0 + + switch { + case daemonSetErrors && unreplicatedErrors: + return []api.Pod{}, errors.New(unmanagedMsg(unreplicatedPodNames, daemonSetPodNames, true)) + case daemonSetErrors && !unreplicatedErrors: + return []api.Pod{}, errors.New(unmanagedMsg([]string{}, daemonSetPodNames, true)) + case unreplicatedErrors && !daemonSetErrors: + return []api.Pod{}, errors.New(unmanagedMsg(unreplicatedPodNames, []string{}, true)) } + + if len(unreplicatedPodNames) > 0 { + fmt.Fprintf(o.out, "WARNING: About to delete these %s\n", unmanagedMsg(unreplicatedPodNames, []string{}, false)) + } + if len(daemonSetPodNames) > 0 { + fmt.Fprintf(o.out, "WARNING: Skipping %s\n", unmanagedMsg([]string{}, daemonSetPodNames, false)) + } + return pods, nil } +// Helper for generating errors or warnings about unmanaged pods. +func unmanagedMsg(unreplicatedNames []string, daemonSetNames []string, include_guidance bool) string { + msgs := []string{} + if len(unreplicatedNames) > 0 { + msg := fmt.Sprintf("pods not managed by ReplicationController, Job, or DaemonSet: %s", strings.Join(unreplicatedNames, ",")) + if include_guidance { + msg += " (use --force to override)" + } + msgs = append(msgs, msg) + } + if len(daemonSetNames) > 0 { + msg := fmt.Sprintf("DaemonSet-managed pods: %s", strings.Join(daemonSetNames, ",")) + if include_guidance { + msg += " (use --ignore-daemonsets to ignore)" + } + msgs = append(msgs, msg) + } + + return strings.Join(msgs, " and ") +} + // deletePods deletes the pods on the api server func (o *DrainOptions) deletePods(pods []api.Pod) error { deleteOptions := api.DeleteOptions{} diff --git a/pkg/kubectl/cmd/drain_test.go b/pkg/kubectl/cmd/drain_test.go index a9691a7fa0d..ddfd62ca727 100644 --- a/pkg/kubectl/cmd/drain_test.go +++ b/pkg/kubectl/cmd/drain_test.go @@ -323,8 +323,18 @@ func TestDrain(t *testing.T) { pods: []api.Pod{ds_pod}, rcs: []api.ReplicationController{rc}, args: []string{"node"}, + expectFatal: true, + expectDelete: false, + }, + { + description: "DS-managed pod with --ignore-daemonsets", + node: node, + expected: cordoned_node, + pods: []api.Pod{ds_pod}, + rcs: []api.ReplicationController{rc}, + args: []string{"node", "--ignore-daemonsets"}, expectFatal: false, - expectDelete: true, + expectDelete: false, }, { description: "Job-managed pod", From ccd810550a1fb7e30c4aece9c5bb4704f2a98c87 Mon Sep 17 00:00:00 2001 From: David Oppenheimer Date: Tue, 2 Feb 2016 11:37:59 -0800 Subject: [PATCH 063/328] Un-disable "Pods should get a host IP" e2e. --- test/e2e/pods.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/pods.go b/test/e2e/pods.go index 2a7707ad362..2eed3614888 100644 --- a/test/e2e/pods.go +++ b/test/e2e/pods.go @@ -209,7 +209,7 @@ func getRestartDelay(c *client.Client, pod *api.Pod, ns string, name string, con var _ = Describe("Pods", func() { framework := NewFramework("pods") - PIt("should get a host IP [Conformance]", func() { + It("should get a host IP [Conformance]", func() { name := "pod-hostip-" + string(util.NewUUID()) testHostIP(framework.Client, framework.Namespace.Name, &api.Pod{ ObjectMeta: api.ObjectMeta{ From 04eb90a5d488de787ebe99fea4d394f1a53c6450 Mon Sep 17 00:00:00 2001 From: CJ Cullen Date: Fri, 4 Dec 2015 18:01:29 -0800 Subject: [PATCH 064/328] Make tunneler hold tunnels open and healthcheck vs. reopening every 5 minutes. Also add a test for the Update() logic. Reordered tunnels vs. storage initialization (prevent a nil ptr panic) --- cmd/kube-apiserver/app/server.go | 14 +- cmd/kubelet/app/options/options.go | 4 +- cmd/kubelet/app/server.go | 4 +- docs/admin/kubelet.md | 4 +- pkg/master/master.go | 28 ++-- pkg/master/tunneler.go | 146 +++++------------ pkg/master/tunneler_test.go | 20 +-- pkg/util/ssh.go | 247 ++++++++++++++++++++--------- pkg/util/ssh_test.go | 85 ++++++++++ 9 files changed, 331 insertions(+), 221 deletions(-) diff --git a/cmd/kube-apiserver/app/server.go b/cmd/kube-apiserver/app/server.go index 8e72b113af2..f041af03e59 100644 --- a/cmd/kube-apiserver/app/server.go +++ b/cmd/kube-apiserver/app/server.go @@ -23,6 +23,7 @@ import ( "crypto/tls" "fmt" "net" + "net/url" "os" "strconv" "strings" @@ -211,9 +212,18 @@ func Run(s *options.APIServer) error { installSSH = instances.AddSSHKeyToAllInstances } } - + if s.KubeletConfig.Port == 0 { + glog.Fatalf("Must enable kubelet port if proxy ssh-tunneling is specified.") + } // Set up the tunneler - tunneler = master.NewSSHTunneler(s.SSHUser, s.SSHKeyfile, installSSH) + // TODO(cjcullen): If we want this to handle per-kubelet ports or other + // kubelet listen-addresses, we need to plumb through options. + healthCheckPath := &url.URL{ + Scheme: "https", + Host: net.JoinHostPort("127.0.0.1", strconv.FormatUint(uint64(s.KubeletConfig.Port), 10)), + Path: "healthz", + } + tunneler = master.NewSSHTunneler(s.SSHUser, s.SSHKeyfile, healthCheckPath, installSSH) // Use the tunneler's dialer to connect to the kubelet s.KubeletConfig.Dial = tunneler.Dial diff --git a/cmd/kubelet/app/options/options.go b/cmd/kubelet/app/options/options.go index 58e4729e280..5c76945c36c 100644 --- a/cmd/kubelet/app/options/options.go +++ b/cmd/kubelet/app/options/options.go @@ -114,7 +114,7 @@ func NewKubeletServer() *KubeletServer { RktStage1Image: "", RootDirectory: defaultRootDir, SerializeImagePulls: true, - StreamingConnectionIdleTimeout: unversioned.Duration{5 * time.Minute}, + StreamingConnectionIdleTimeout: unversioned.Duration{4 * time.Hour}, SyncFrequency: unversioned.Duration{1 * time.Minute}, SystemContainer: "", ReconcileCIDR: true, @@ -174,7 +174,7 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&s.ClusterDomain, "cluster-domain", s.ClusterDomain, "Domain for this cluster. If set, kubelet will configure all containers to search this domain in addition to the host's search domains") fs.StringVar(&s.MasterServiceNamespace, "master-service-namespace", s.MasterServiceNamespace, "The namespace from which the kubernetes master services should be injected into pods") fs.StringVar(&s.ClusterDNS, "cluster-dns", s.ClusterDNS, "IP address for a cluster DNS server. If set, kubelet will configure all containers to use this for DNS resolution in addition to the host's DNS servers") - fs.DurationVar(&s.StreamingConnectionIdleTimeout.Duration, "streaming-connection-idle-timeout", s.StreamingConnectionIdleTimeout.Duration, "Maximum time a streaming connection can be idle before the connection is automatically closed. Example: '5m'") + fs.DurationVar(&s.StreamingConnectionIdleTimeout.Duration, "streaming-connection-idle-timeout", s.StreamingConnectionIdleTimeout.Duration, "Maximum time a streaming connection can be idle before the connection is automatically closed. 0 indicates no timeout. Example: '5m'") fs.DurationVar(&s.NodeStatusUpdateFrequency.Duration, "node-status-update-frequency", s.NodeStatusUpdateFrequency.Duration, "Specifies how often kubelet posts node status to master. Note: be cautious when changing the constant, it must work with nodeMonitorGracePeriod in nodecontroller. Default: 10s") bindableNodeLabels := util.ConfigurationMap(s.NodeLabels) fs.Var(&bindableNodeLabels, "node-labels", " Labels to add when registering the node in the cluster. Labels must are key=value pairs seperated by ','.") diff --git a/cmd/kubelet/app/server.go b/cmd/kubelet/app/server.go index 523cc315919..13ab9f75a7d 100644 --- a/cmd/kubelet/app/server.go +++ b/cmd/kubelet/app/server.go @@ -596,10 +596,10 @@ func RunKubelet(kcfg *KubeletConfig) error { if _, err := k.RunOnce(podCfg.Updates()); err != nil { return fmt.Errorf("runonce failed: %v", err) } - glog.Infof("Started kubelet as runonce") + glog.Info("Started kubelet as runonce") } else { startKubelet(k, podCfg, kcfg) - glog.Infof("Started kubelet") + glog.Info("Started kubelet") } return nil } diff --git a/docs/admin/kubelet.md b/docs/admin/kubelet.md index 9d51184eac7..d4b0f509eb0 100644 --- a/docs/admin/kubelet.md +++ b/docs/admin/kubelet.md @@ -137,7 +137,7 @@ kubelet --root-dir="/var/lib/kubelet": Directory path for managing kubelet files (volume mounts,etc). --runonce[=false]: If true, exit after spawning pods from local manifests or remote urls. Exclusive with --api-servers, and --enable-server --serialize-image-pulls[=true]: Pull images one at a time. We recommend *not* changing the default value on nodes that run docker daemon with version < 1.9 or an Aufs storage backend. Issue #10959 has more details. [default=true] - --streaming-connection-idle-timeout=5m0s: Maximum time a streaming connection can be idle before the connection is automatically closed. Example: '5m' + --streaming-connection-idle-timeout=4h0m0s: Maximum time a streaming connection can be idle before the connection is automatically closed. 0 indicates no timeout. Example: '5m' --sync-frequency=1m0s: Max period between synchronizing running containers and config --system-container="": Optional resource-only container in which to place all non-kernel processes that are not already in a container. Empty for no container. Rolling back the flag requires a reboot. (Default: ""). --system-reserved=: A set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G) pairs that describe resources reserved for non-kubernetes components. Currently only cpu and memory are supported. See http://releases.k8s.io/HEAD/docs/user-guide/compute-resources.html for more detail. [default=none] @@ -146,7 +146,7 @@ kubelet --volume-plugin-dir="/usr/libexec/kubernetes/kubelet-plugins/volume/exec/": The full path of the directory in which to search for additional third party volume plugins ``` -###### Auto generated by spf13/cobra on 21-Jan-2016 +###### Auto generated by spf13/cobra on 29-Jan-2016 diff --git a/pkg/master/master.go b/pkg/master/master.go index df7db628f53..a0acc6944ae 100644 --- a/pkg/master/master.go +++ b/pkg/master/master.go @@ -161,20 +161,6 @@ func New(c *Config) *Master { func (m *Master) InstallAPIs(c *Config) { apiGroupsInfo := []genericapiserver.APIGroupInfo{} - // Run the tunnel. - healthzChecks := []healthz.HealthzChecker{} - if m.tunneler != nil { - m.tunneler.Run(m.getNodeAddresses) - healthzChecks = append(healthzChecks, healthz.NamedCheck("SSH Tunnel Check", m.IsTunnelSyncHealthy)) - prometheus.NewGaugeFunc(prometheus.GaugeOpts{ - Name: "apiserver_proxy_tunnel_sync_latency_secs", - Help: "The time since the last successful synchronization of the SSH tunnels for proxy requests.", - }, func() float64 { return float64(m.tunneler.SecondsSinceSync()) }) - } - - // TODO(nikhiljindal): Refactor generic parts of support services (like /versions) to genericapiserver. - apiserver.InstallSupport(m.MuxHelper, m.RootWebService, c.EnableProfiling, healthzChecks...) - // Install v1 unless disabled. if !m.ApiGroupVersionOverrides["api/v1"].Disable { // Install v1 API. @@ -192,6 +178,20 @@ func (m *Master) InstallAPIs(c *Config) { apiGroupsInfo = append(apiGroupsInfo, apiGroupInfo) } + // Run the tunneler. + healthzChecks := []healthz.HealthzChecker{} + if m.tunneler != nil { + m.tunneler.Run(m.getNodeAddresses) + healthzChecks = append(healthzChecks, healthz.NamedCheck("SSH Tunnel Check", m.IsTunnelSyncHealthy)) + prometheus.NewGaugeFunc(prometheus.GaugeOpts{ + Name: "apiserver_proxy_tunnel_sync_latency_secs", + Help: "The time since the last successful synchronization of the SSH tunnels for proxy requests.", + }, func() float64 { return float64(m.tunneler.SecondsSinceSync()) }) + } + + // TODO(nikhiljindal): Refactor generic parts of support services (like /versions) to genericapiserver. + apiserver.InstallSupport(m.MuxHelper, m.RootWebService, c.EnableProfiling, healthzChecks...) + // Install root web services m.HandlerContainer.Add(m.RootWebService) diff --git a/pkg/master/tunneler.go b/pkg/master/tunneler.go index 2cef89d2093..9cb04b34c20 100644 --- a/pkg/master/tunneler.go +++ b/pkg/master/tunneler.go @@ -18,10 +18,9 @@ package master import ( "io/ioutil" - "math/rand" "net" + "net/url" "os" - "sync" "sync/atomic" "time" @@ -43,12 +42,12 @@ type Tunneler interface { } type SSHTunneler struct { - SSHUser string - SSHKeyfile string - InstallSSHKey InstallSSHKey + SSHUser string + SSHKeyfile string + InstallSSHKey InstallSSHKey + HealthCheckURL *url.URL tunnels *util.SSHTunnelList - tunnelsLock sync.Mutex lastSync int64 // Seconds since Epoch lastSyncMetric prometheus.GaugeFunc clock util.Clock @@ -57,13 +56,13 @@ type SSHTunneler struct { stopChan chan struct{} } -func NewSSHTunneler(sshUser string, sshKeyfile string, installSSHKey InstallSSHKey) Tunneler { +func NewSSHTunneler(sshUser, sshKeyfile string, healthCheckURL *url.URL, installSSHKey InstallSSHKey) Tunneler { return &SSHTunneler{ - SSHUser: sshUser, - SSHKeyfile: sshKeyfile, - InstallSSHKey: installSSHKey, - - clock: util.RealClock{}, + SSHUser: sshUser, + SSHKeyfile: sshKeyfile, + InstallSSHKey: installSSHKey, + HealthCheckURL: healthCheckURL, + clock: util.RealClock{}, } } @@ -93,14 +92,17 @@ func (c *SSHTunneler) Run(getAddresses AddressFunc) { glog.Errorf("Error detecting if key exists: %v", err) } else if !exists { glog.Infof("Key doesn't exist, attempting to create") - err := c.generateSSHKey(c.SSHUser, c.SSHKeyfile, publicKeyFile) - if err != nil { + if err := generateSSHKey(c.SSHKeyfile, publicKeyFile); err != nil { glog.Errorf("Failed to create key pair: %v", err) } } - c.tunnels = &util.SSHTunnelList{} - c.setupSecureProxy(c.SSHUser, c.SSHKeyfile, publicKeyFile) + + c.tunnels = util.NewSSHTunnelList(c.SSHUser, c.SSHKeyfile, c.HealthCheckURL, c.stopChan) + // Sync loop to ensure that the SSH key has been installed. + c.installSSHKeySyncLoop(c.SSHUser, publicKeyFile) + // Sync tunnelList w/ nodes. c.lastSync = c.clock.Now().Unix() + c.nodesSyncLoop() } // Stop gracefully shuts down the tunneler @@ -112,23 +114,7 @@ func (c *SSHTunneler) Stop() { } func (c *SSHTunneler) Dial(net, addr string) (net.Conn, error) { - // Only lock while picking a tunnel. - tunnel, err := func() (util.SSHTunnelEntry, error) { - c.tunnelsLock.Lock() - defer c.tunnelsLock.Unlock() - return c.tunnels.PickRandomTunnel() - }() - if err != nil { - return nil, err - } - - start := time.Now() - id := rand.Int63() // So you can match begins/ends in the log. - glog.V(3).Infof("[%x: %v] Dialing...", id, tunnel.Address) - defer func() { - glog.V(3).Infof("[%x: %v] Dialed in %v.", id, tunnel.Address, time.Now().Sub(start)) - }() - return tunnel.Tunnel.Dial(net, addr) + return c.tunnels.Dial(net, addr) } func (c *SSHTunneler) SecondsSinceSync() int64 { @@ -137,61 +123,7 @@ func (c *SSHTunneler) SecondsSinceSync() int64 { return now - then } -func (c *SSHTunneler) needToReplaceTunnels(addrs []string) bool { - c.tunnelsLock.Lock() - defer c.tunnelsLock.Unlock() - if c.tunnels == nil || c.tunnels.Len() != len(addrs) { - return true - } - // TODO (cjcullen): This doesn't need to be n^2 - for ix := range addrs { - if !c.tunnels.Has(addrs[ix]) { - return true - } - } - return false -} - -func (c *SSHTunneler) replaceTunnels(user, keyfile string, newAddrs []string) error { - glog.Infof("replacing tunnels. New addrs: %v", newAddrs) - tunnels := util.MakeSSHTunnels(user, keyfile, newAddrs) - if err := tunnels.Open(); err != nil { - return err - } - c.tunnelsLock.Lock() - defer c.tunnelsLock.Unlock() - if c.tunnels != nil { - c.tunnels.Close() - } - c.tunnels = tunnels - atomic.StoreInt64(&c.lastSync, c.clock.Now().Unix()) - return nil -} - -func (c *SSHTunneler) loadTunnels(user, keyfile string) error { - addrs, err := c.getAddresses() - if err != nil { - return err - } - if !c.needToReplaceTunnels(addrs) { - return nil - } - // TODO: This is going to unnecessarily close connections to unchanged nodes. - // See comment about using Watch above. - glog.Info("found different nodes. Need to replace tunnels") - return c.replaceTunnels(user, keyfile, addrs) -} - -func (c *SSHTunneler) refreshTunnels(user, keyfile string) error { - addrs, err := c.getAddresses() - if err != nil { - return err - } - return c.replaceTunnels(user, keyfile, addrs) -} - -func (c *SSHTunneler) setupSecureProxy(user, privateKeyfile, publicKeyfile string) { - // Sync loop to ensure that the SSH key has been installed. +func (c *SSHTunneler) installSSHKeySyncLoop(user, publicKeyfile string) { go util.Until(func() { if c.InstallSSHKey == nil { glog.Error("Won't attempt to install ssh key: InstallSSHKey function is nil") @@ -211,30 +143,24 @@ func (c *SSHTunneler) setupSecureProxy(user, privateKeyfile, publicKeyfile strin glog.Errorf("Failed to install ssh key: %v", err) } }, 5*time.Minute, c.stopChan) - // Sync loop for tunnels - // TODO: switch this to watch. - go util.Until(func() { - if err := c.loadTunnels(user, privateKeyfile); err != nil { - glog.Errorf("Failed to load SSH Tunnels: %v", err) - } - if c.tunnels != nil && c.tunnels.Len() != 0 { - // Sleep for 10 seconds if we have some tunnels. - // TODO (cjcullen): tunnels can lag behind actually existing nodes. - time.Sleep(9 * time.Second) - } - }, 1*time.Second, c.stopChan) - // Refresh loop for tunnels - // TODO: could make this more controller-ish - go util.Until(func() { - time.Sleep(5 * time.Minute) - if err := c.refreshTunnels(user, privateKeyfile); err != nil { - glog.Errorf("Failed to refresh SSH Tunnels: %v", err) - } - }, 0*time.Second, c.stopChan) } -func (c *SSHTunneler) generateSSHKey(user, privateKeyfile, publicKeyfile string) error { - // TODO: user is not used. Consider removing it as an input to the function. +// nodesSyncLoop lists nodes ever 15 seconds, calling Update() on the TunnelList +// each time (Update() is a noop if no changes are necessary). +func (c *SSHTunneler) nodesSyncLoop() { + // TODO (cjcullen) make this watch. + go util.Until(func() { + addrs, err := c.getAddresses() + glog.Infof("Calling update w/ addrs: %v", addrs) + if err != nil { + glog.Errorf("Failed to getAddresses: %v", err) + } + c.tunnels.Update(addrs) + atomic.StoreInt64(&c.lastSync, c.clock.Now().Unix()) + }, 15*time.Second, c.stopChan) +} + +func generateSSHKey(privateKeyfile, publicKeyfile string) error { private, public, err := util.GenerateKey(2048) if err != nil { return err diff --git a/pkg/master/tunneler_test.go b/pkg/master/tunneler_test.go index 24822f2e06e..b08a1df343b 100644 --- a/pkg/master/tunneler_test.go +++ b/pkg/master/tunneler_test.go @@ -66,19 +66,6 @@ func TestSecondsSinceSync(t *testing.T) { assert.Equal(int64(-2678400), tunneler.SecondsSinceSync()) } -// TestRefreshTunnels verifies that the function errors when no addresses -// are associated with nodes -func TestRefreshTunnels(t *testing.T) { - tunneler := &SSHTunneler{} - tunneler.getAddresses = func() ([]string, error) { return []string{}, nil } - assert := assert.New(t) - - // Fail case (no addresses associated with nodes) - assert.Error(tunneler.refreshTunnels("test", "/somepath/undefined")) - - // TODO: pass case without needing actual connections? -} - // TestIsTunnelSyncHealthy verifies that the 600 second lag test // is honored. func TestIsTunnelSyncHealthy(t *testing.T) { @@ -108,7 +95,6 @@ func generateTempFilePath(prefix string) string { // TestGenerateSSHKey verifies that SSH key generation does indeed // generate keys even with keys already exist. func TestGenerateSSHKey(t *testing.T) { - tunneler := &SSHTunneler{} assert := assert.New(t) privateKey := generateTempFilePath("private") @@ -119,17 +105,17 @@ func TestGenerateSSHKey(t *testing.T) { os.Remove(publicKey) // Pass case: Sunny day case - err := tunneler.generateSSHKey("unused", privateKey, publicKey) + err := generateSSHKey(privateKey, publicKey) assert.NoError(err, "generateSSHKey should not have retuend an error: %s", err) // Pass case: PrivateKey exists test case os.Remove(publicKey) - err = tunneler.generateSSHKey("unused", privateKey, publicKey) + err = generateSSHKey(privateKey, publicKey) assert.NoError(err, "generateSSHKey should not have retuend an error: %s", err) // Pass case: PublicKey exists test case os.Remove(privateKey) - err = tunneler.generateSSHKey("unused", privateKey, publicKey) + err = generateSSHKey(privateKey, publicKey) assert.NoError(err, "generateSSHKey should not have retuend an error: %s", err) // Make sure we have no test keys laying around diff --git a/pkg/util/ssh.go b/pkg/util/ssh.go index 64ced17b674..04a06afb3e7 100644 --- a/pkg/util/ssh.go +++ b/pkg/util/ssh.go @@ -20,6 +20,7 @@ import ( "bytes" "crypto/rand" "crypto/rsa" + "crypto/tls" "crypto/x509" "encoding/pem" "errors" @@ -28,12 +29,17 @@ import ( "io/ioutil" mathrand "math/rand" "net" + "net/http" + "net/url" "os" + "sync" "time" "github.com/golang/glog" "github.com/prometheus/client_golang/prometheus" "golang.org/x/crypto/ssh" + + utilnet "k8s.io/kubernetes/pkg/util/net" "k8s.io/kubernetes/pkg/util/runtime" ) @@ -108,9 +114,8 @@ func (s *SSHTunnel) Open() error { tunnelOpenCounter.Inc() if err != nil { tunnelOpenFailCounter.Inc() - return err } - return nil + return err } func (s *SSHTunnel) Dial(network, address string) (net.Conn, error) { @@ -240,95 +245,193 @@ func ParsePublicKeyFromFile(keyFile string) (*rsa.PublicKey, error) { return rsaKey, nil } -// Should be thread safe. -type SSHTunnelEntry struct { +type tunnel interface { + Open() error + Close() error + Dial(network, address string) (net.Conn, error) +} + +type sshTunnelEntry struct { Address string - Tunnel *SSHTunnel + Tunnel tunnel +} + +type sshTunnelCreator interface { + NewSSHTunnel(user, keyFile, healthCheckURL string) (tunnel, error) +} + +type realTunnelCreator struct{} + +func (*realTunnelCreator) NewSSHTunnel(user, keyFile, healthCheckURL string) (tunnel, error) { + return NewSSHTunnel(user, keyFile, healthCheckURL) } -// Not thread safe! type SSHTunnelList struct { - entries []SSHTunnelEntry + entries []sshTunnelEntry + adding map[string]bool + tunnelCreator sshTunnelCreator + tunnelsLock sync.Mutex + + user string + keyfile string + healthCheckURL *url.URL } -func MakeSSHTunnels(user, keyfile string, addresses []string) *SSHTunnelList { - tunnels := []SSHTunnelEntry{} - for ix := range addresses { - addr := addresses[ix] - tunnel, err := NewSSHTunnel(user, keyfile, addr) - if err != nil { - glog.Errorf("Failed to create tunnel for %q: %v", addr, err) - continue - } - tunnels = append(tunnels, SSHTunnelEntry{addr, tunnel}) +func NewSSHTunnelList(user, keyfile string, healthCheckURL *url.URL, stopChan chan struct{}) *SSHTunnelList { + l := &SSHTunnelList{ + adding: make(map[string]bool), + tunnelCreator: &realTunnelCreator{}, + user: user, + keyfile: keyfile, + healthCheckURL: healthCheckURL, } - return &SSHTunnelList{tunnels} + healthCheckPoll := 1 * time.Minute + go Until(func() { + l.tunnelsLock.Lock() + defer l.tunnelsLock.Unlock() + // Healthcheck each tunnel every minute + numTunnels := len(l.entries) + for i, entry := range l.entries { + // Stagger healthchecks evenly across duration of healthCheckPoll. + delay := healthCheckPoll * time.Duration(i) / time.Duration(numTunnels) + l.delayedHealthCheck(entry, delay) + } + }, healthCheckPoll, stopChan) + return l } -// Open attempts to open all tunnels in the list, and removes any tunnels that -// failed to open. -func (l *SSHTunnelList) Open() error { - var openTunnels []SSHTunnelEntry - for ix := range l.entries { - if err := l.entries[ix].Tunnel.Open(); err != nil { - glog.Errorf("Failed to open tunnel %v: %v", l.entries[ix], err) - } else { - openTunnels = append(openTunnels, l.entries[ix]) +func (l *SSHTunnelList) delayedHealthCheck(e sshTunnelEntry, delay time.Duration) { + go func() { + defer runtime.HandleCrash() + time.Sleep(delay) + if err := l.healthCheck(e); err != nil { + glog.Errorf("Healthcheck failed for tunnel to %q: %v", e.Address, err) + glog.Infof("Attempting once to re-establish tunnel to %q", e.Address) + l.removeAndReAdd(e) + } + }() +} + +func (l *SSHTunnelList) healthCheck(e sshTunnelEntry) error { + // GET the healthcheck path using the provided tunnel's dial function. + transport := utilnet.SetTransportDefaults(&http.Transport{ + Dial: e.Tunnel.Dial, + // TODO(cjcullen): Plumb real TLS options through. + TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, + }) + client := &http.Client{Transport: transport} + _, err := client.Get(l.healthCheckURL.String()) + return err +} + +func (l *SSHTunnelList) removeAndReAdd(e sshTunnelEntry) { + // Find the entry to replace. + l.tunnelsLock.Lock() + defer l.tunnelsLock.Unlock() + for i, entry := range l.entries { + if entry.Tunnel == e.Tunnel { + l.entries = append(l.entries[:i], l.entries[i+1:]...) + l.adding[e.Address] = true + go l.createAndAddTunnel(e.Address) + return } } - l.entries = openTunnels +} + +func (l *SSHTunnelList) Dial(net, addr string) (net.Conn, error) { + start := time.Now() + id := mathrand.Int63() // So you can match begins/ends in the log. + glog.Infof("[%x: %v] Dialing...", id, addr) + defer func() { + glog.Infof("[%x: %v] Dialed in %v.", id, addr, time.Now().Sub(start)) + }() + tunnel, err := l.pickRandomTunnel() + if err != nil { + return nil, err + } + return tunnel.Dial(net, addr) +} + +func (l *SSHTunnelList) pickRandomTunnel() (tunnel, error) { + l.tunnelsLock.Lock() + defer l.tunnelsLock.Unlock() if len(l.entries) == 0 { - return errors.New("Failed to open any tunnels.") + return nil, fmt.Errorf("No SSH tunnels currently open. Were the targets able to accept an ssh-key for user %q?", l.user) } - return nil + n := mathrand.Intn(len(l.entries)) + return l.entries[n].Tunnel, nil } -// Close asynchronously closes all tunnels in the list after waiting for 1 -// minute. Tunnels will still be open upon this function's return, but should -// no longer be used. -func (l *SSHTunnelList) Close() { - for ix := range l.entries { - entry := l.entries[ix] - go func() { - defer runtime.HandleCrash() - time.Sleep(1 * time.Minute) - if err := entry.Tunnel.Close(); err != nil { - glog.Errorf("Failed to close tunnel %v: %v", entry, err) +// Update reconciles the list's entries with the specified addresses. Existing +// tunnels that are not in addresses are removed from entries and closed in a +// background goroutine. New tunnels specified in addresses are opened in a +// background goroutine and then added to entries. +func (l *SSHTunnelList) Update(addrs []string) { + haveAddrsMap := make(map[string]bool) + wantAddrsMap := make(map[string]bool) + func() { + l.tunnelsLock.Lock() + defer l.tunnelsLock.Unlock() + // Build a map of what we currently have. + for i := range l.entries { + haveAddrsMap[l.entries[i].Address] = true + } + // Determine any necessary additions. + for i := range addrs { + // Add tunnel if it is not in l.entries or l.adding + if _, ok := haveAddrsMap[addrs[i]]; !ok { + if _, ok := l.adding[addrs[i]]; !ok { + l.adding[addrs[i]] = true + addr := addrs[i] + go func() { + defer runtime.HandleCrash() + // Actually adding tunnel to list will block until lock + // is released after deletions. + l.createAndAddTunnel(addr) + }() + } } - }() - } -} - -/* this will make sense if we move the lock into SSHTunnelList. -func (l *SSHTunnelList) Dial(network, addr string) (net.Conn, error) { - if len(l.entries) == 0 { - return nil, fmt.Errorf("empty tunnel list.") - } - n := mathrand.Intn(len(l.entries)) - return l.entries[n].Tunnel.Dial(network, addr) -} -*/ - -// Returns a random tunnel, xor an error if there are none. -func (l *SSHTunnelList) PickRandomTunnel() (SSHTunnelEntry, error) { - if len(l.entries) == 0 { - return SSHTunnelEntry{}, fmt.Errorf("empty tunnel list.") - } - n := mathrand.Intn(len(l.entries)) - return l.entries[n], nil -} - -func (l *SSHTunnelList) Has(addr string) bool { - for ix := range l.entries { - if l.entries[ix].Address == addr { - return true + wantAddrsMap[addrs[i]] = true } - } - return false + // Determine any necessary deletions. + var newEntries []sshTunnelEntry + for i := range l.entries { + if _, ok := wantAddrsMap[l.entries[i].Address]; !ok { + tunnelEntry := l.entries[i] + glog.Infof("Removing tunnel to deleted node at %q", tunnelEntry.Address) + go func() { + defer runtime.HandleCrash() + if err := tunnelEntry.Tunnel.Close(); err != nil { + glog.Errorf("Failed to close tunnel to %q: %v", tunnelEntry.Address, err) + } + }() + } else { + newEntries = append(newEntries, l.entries[i]) + } + } + l.entries = newEntries + }() } -func (l *SSHTunnelList) Len() int { - return len(l.entries) +func (l *SSHTunnelList) createAndAddTunnel(addr string) { + glog.Infof("Trying to add tunnel to %q", addr) + tunnel, err := l.tunnelCreator.NewSSHTunnel(l.user, l.keyfile, addr) + if err != nil { + glog.Errorf("Failed to create tunnel for %q: %v", addr, err) + return + } + if err := tunnel.Open(); err != nil { + glog.Errorf("Failed to open tunnel to %q: %v", addr, err) + l.tunnelsLock.Lock() + delete(l.adding, addr) + l.tunnelsLock.Unlock() + return + } + l.tunnelsLock.Lock() + l.entries = append(l.entries, sshTunnelEntry{addr, tunnel}) + delete(l.adding, addr) + l.tunnelsLock.Unlock() + glog.Infof("Successfully added tunnel for %q", addr) } func EncodePrivateKey(private *rsa.PrivateKey) []byte { diff --git a/pkg/util/ssh_test.go b/pkg/util/ssh_test.go index 74dc8a82b6d..072cfff6f1a 100644 --- a/pkg/util/ssh_test.go +++ b/pkg/util/ssh_test.go @@ -24,6 +24,9 @@ import ( "reflect" "strings" "testing" + "time" + + "k8s.io/kubernetes/pkg/util/wait" "github.com/golang/glog" "golang.org/x/crypto/ssh" @@ -163,6 +166,88 @@ func TestSSHTunnel(t *testing.T) { } } +type fakeTunnel struct{} + +func (*fakeTunnel) Open() error { + return nil +} + +func (*fakeTunnel) Close() error { + return nil +} + +func (*fakeTunnel) Dial(network, address string) (net.Conn, error) { + return nil, nil +} + +type fakeTunnelCreator struct{} + +func (*fakeTunnelCreator) NewSSHTunnel(string, string, string) (tunnel, error) { + return &fakeTunnel{}, nil +} + +func TestSSHTunnelListUpdate(t *testing.T) { + // Start with an empty tunnel list. + l := &SSHTunnelList{ + adding: make(map[string]bool), + tunnelCreator: &fakeTunnelCreator{}, + } + + // Start with 2 tunnels. + addressStrings := []string{"1.2.3.4", "5.6.7.8"} + l.Update(addressStrings) + checkTunnelsCorrect(t, l, addressStrings) + + // Add another tunnel. + addressStrings = append(addressStrings, "9.10.11.12") + l.Update(addressStrings) + checkTunnelsCorrect(t, l, addressStrings) + + // Go down to a single tunnel. + addressStrings = []string{"1.2.3.4"} + l.Update(addressStrings) + checkTunnelsCorrect(t, l, addressStrings) + + // Replace w/ all new tunnels. + addressStrings = []string{"21.22.23.24", "25.26.27.28"} + l.Update(addressStrings) + checkTunnelsCorrect(t, l, addressStrings) + + // Call update with the same tunnels. + l.Update(addressStrings) + checkTunnelsCorrect(t, l, addressStrings) +} + +func checkTunnelsCorrect(t *testing.T, tunnelList *SSHTunnelList, addresses []string) { + if err := wait.Poll(100*time.Millisecond, 2*time.Second, func() (bool, error) { + return hasCorrectTunnels(tunnelList, addresses), nil + }); err != nil { + t.Errorf("Error waiting for tunnels to reach expected state: %v. Expected %v, had %v", err, addresses, tunnelList) + } +} + +func hasCorrectTunnels(tunnelList *SSHTunnelList, addresses []string) bool { + tunnelList.tunnelsLock.Lock() + defer tunnelList.tunnelsLock.Unlock() + wantMap := make(map[string]bool) + for _, addr := range addresses { + wantMap[addr] = true + } + haveMap := make(map[string]bool) + for _, entry := range tunnelList.entries { + if wantMap[entry.Address] == false { + return false + } + haveMap[entry.Address] = true + } + for _, addr := range addresses { + if haveMap[addr] == false { + return false + } + } + return true +} + type mockSSHDialer struct { network string addr string From 180bed7b5c65ac4ea5fb120b0ea24d107ed5c26d Mon Sep 17 00:00:00 2001 From: Paul Morie Date: Tue, 2 Feb 2016 15:39:33 -0500 Subject: [PATCH 065/328] Fix a couple typos --- pkg/volume/volume.go | 2 +- third_party/golang/expansion/expand.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/volume/volume.go b/pkg/volume/volume.go index 9a851c32cd1..6a7c039b4bf 100644 --- a/pkg/volume/volume.go +++ b/pkg/volume/volume.go @@ -81,7 +81,7 @@ type Builder interface { // 'fsGroup' so that it can be accessed by the pod. This may // be called more than once, so implementations must be // idempotent. - SetUpAt(dir string, sGroup *int64) error + SetUpAt(dir string, fsGroup *int64) error // GetAttributes returns the attributes of the builder. GetAttributes() Attributes } diff --git a/third_party/golang/expansion/expand.go b/third_party/golang/expansion/expand.go index ccec3e9ecaf..6bf0ea8ce09 100644 --- a/third_party/golang/expansion/expand.go +++ b/third_party/golang/expansion/expand.go @@ -10,7 +10,7 @@ const ( referenceCloser = ')' ) -// syntaxWrap returns the input string wrapped the expansion syntax. +// syntaxWrap returns the input string wrapped by the expansion syntax. func syntaxWrap(input string) string { return string(operator) + string(referenceOpener) + input + string(referenceCloser) } From 7ed83ad4f94b94a80d89eded18eaffd5cdd5d63b Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Mon, 1 Feb 2016 17:34:47 -0800 Subject: [PATCH 066/328] Make kube-proxy default to iptables (regression) This was accidentally introduced as part of the component config changes. --- cmd/kube-proxy/app/options/options.go | 1 - cmd/kube-proxy/app/server.go | 11 +++++++++-- docs/admin/kube-proxy.md | 4 ++-- pkg/apis/componentconfig/types.go | 4 ++-- pkg/kubemark/hollow_proxy.go | 2 +- test/e2e/kubeproxy.go | 11 +++++++++++ 6 files changed, 25 insertions(+), 8 deletions(-) diff --git a/cmd/kube-proxy/app/options/options.go b/cmd/kube-proxy/app/options/options.go index dff4bdc78b2..12bfa195ec1 100644 --- a/cmd/kube-proxy/app/options/options.go +++ b/cmd/kube-proxy/app/options/options.go @@ -57,7 +57,6 @@ func NewProxyConfig() *ProxyServerConfig { ResourceContainer: "/kube-proxy", IPTablesSyncPeriod: unversioned.Duration{30 * time.Second}, UDPIdleTimeout: unversioned.Duration{250 * time.Millisecond}, - Mode: componentconfig.ProxyModeUserspace, ConntrackMax: 256 * 1024, // 4x default (64k) ConntrackTCPEstablishedTimeout: unversioned.Duration{Duration: 24 * time.Hour}, // 1 day (1/5 default) }, diff --git a/cmd/kube-proxy/app/server.go b/cmd/kube-proxy/app/server.go index 4941908cf74..427aa7f33fd 100644 --- a/cmd/kube-proxy/app/server.go +++ b/cmd/kube-proxy/app/server.go @@ -20,6 +20,7 @@ package app import ( "errors" + "fmt" "net" "net/http" _ "net/http/pprof" @@ -58,6 +59,7 @@ type ProxyServer struct { Broadcaster record.EventBroadcaster Recorder record.EventRecorder Conntracker Conntracker // if nil, ignored + ProxyMode string } const ( @@ -83,6 +85,7 @@ func NewProxyServer( broadcaster record.EventBroadcaster, recorder record.EventRecorder, conntracker Conntracker, + proxyMode string, ) (*ProxyServer, error) { return &ProxyServer{ Client: client, @@ -92,6 +95,7 @@ func NewProxyServer( Broadcaster: broadcaster, Recorder: recorder, Conntracker: conntracker, + ProxyMode: proxyMode, }, nil } @@ -248,7 +252,7 @@ func NewProxyServerDefault(config *options.ProxyServerConfig) (*ProxyServer, err conntracker := realConntracker{} - return NewProxyServer(client, config, iptInterface, proxier, eventBroadcaster, recorder, conntracker) + return NewProxyServer(client, config, iptInterface, proxier, eventBroadcaster, recorder, conntracker, proxyMode) } // Run runs the specified ProxyServer. This should never exit (unless CleanupAndExit is set). @@ -265,8 +269,11 @@ func (s *ProxyServer) Run() error { s.Broadcaster.StartRecordingToSink(s.Client.Events("")) - // Start up Healthz service if requested + // Start up a webserver if requested if s.Config.HealthzPort > 0 { + http.HandleFunc("/proxyMode", func(w http.ResponseWriter, r *http.Request) { + fmt.Fprintf(w, "%s", s.ProxyMode) + }) go util.Until(func() { err := http.ListenAndServe(s.Config.HealthzBindAddress+":"+strconv.Itoa(s.Config.HealthzPort), nil) if err != nil { diff --git a/docs/admin/kube-proxy.md b/docs/admin/kube-proxy.md index 7033392651c..f9319633584 100644 --- a/docs/admin/kube-proxy.md +++ b/docs/admin/kube-proxy.md @@ -71,12 +71,12 @@ kube-proxy --masquerade-all[=false]: If using the pure iptables proxy, SNAT everything --master="": The address of the Kubernetes API server (overrides any value in kubeconfig) --oom-score-adj=-999: The oom-score-adj value for kube-proxy process. Values must be within the range [-1000, 1000] - --proxy-mode=userspace: Which proxy mode to use: 'userspace' (older) or 'iptables' (faster). If blank, look at the Node object on the Kubernetes API and respect the 'net.experimental.kubernetes.io/proxy-mode' annotation if provided. Otherwise use the best-available proxy (currently iptables). If the iptables proxy is selected, regardless of how, but the system's kernel or iptables versions are insufficient, this always falls back to the userspace proxy. + --proxy-mode=: Which proxy mode to use: 'userspace' (older) or 'iptables' (faster). If blank, look at the Node object on the Kubernetes API and respect the 'net.experimental.kubernetes.io/proxy-mode' annotation if provided. Otherwise use the best-available proxy (currently iptables). If the iptables proxy is selected, regardless of how, but the system's kernel or iptables versions are insufficient, this always falls back to the userspace proxy. --proxy-port-range=: Range of host ports (beginPort-endPort, inclusive) that may be consumed in order to proxy service traffic. If unspecified (0-0) then ports will be randomly chosen. --udp-timeout=250ms: How long an idle UDP connection will be kept open (e.g. '250ms', '2s'). Must be greater than 0. Only applicable for proxy-mode=userspace ``` -###### Auto generated by spf13/cobra on 27-Jan-2016 +###### Auto generated by spf13/cobra on 1-Feb-2016 diff --git a/pkg/apis/componentconfig/types.go b/pkg/apis/componentconfig/types.go index af6417a8893..1717a7c0ddd 100644 --- a/pkg/apis/componentconfig/types.go +++ b/pkg/apis/componentconfig/types.go @@ -63,9 +63,9 @@ type KubeProxyConfiguration struct { } // Currently two modes of proxying are available: 'userspace' (older, stable) or 'iptables' -// (experimental). If blank, look at the Node object on the Kubernetes API and respect the +// (newer, faster). If blank, look at the Node object on the Kubernetes API and respect the // 'net.experimental.kubernetes.io/proxy-mode' annotation if provided. Otherwise use the -// best-available proxy (currently userspace, but may change in future versions). If the +// best-available proxy (currently iptables, but may change in future versions). If the // iptables proxy is selected, regardless of how, but the system's kernel or iptables // versions are insufficient, this always falls back to the userspace proxy. type ProxyMode string diff --git a/pkg/kubemark/hollow_proxy.go b/pkg/kubemark/hollow_proxy.go index e1bc84bf81f..7a3920eefb7 100644 --- a/pkg/kubemark/hollow_proxy.go +++ b/pkg/kubemark/hollow_proxy.go @@ -75,7 +75,7 @@ func NewHollowProxyOrDie( endpointsConfig.Channel("api"), ) - hollowProxy, err := proxyapp.NewProxyServer(client, config, iptInterface, &FakeProxier{}, broadcaster, recorder, nil) + hollowProxy, err := proxyapp.NewProxyServer(client, config, iptInterface, &FakeProxier{}, broadcaster, recorder, nil, "fake") if err != nil { glog.Fatalf("Error while creating ProxyServer: %v\n", err) } diff --git a/test/e2e/kubeproxy.go b/test/e2e/kubeproxy.go index 9407715b0d7..35997bdcc55 100644 --- a/test/e2e/kubeproxy.go +++ b/test/e2e/kubeproxy.go @@ -197,6 +197,10 @@ func (config *KubeProxyTestConfig) hitNodePort(epCount int) { config.dialFromNode("udp", node2_IP, nodeUdpPort, tries, epCount) By("dialing(http) node1 --> node2:nodeHttpPort") config.dialFromNode("http", node2_IP, nodeHttpPort, tries, epCount) + + By("checking kube-proxy URLs") + config.getSelfURL("/healthz", "ok") + config.getSelfURL("/proxyMode", "iptables") // the default } func (config *KubeProxyTestConfig) hitEndpoints() { @@ -252,6 +256,13 @@ func (config *KubeProxyTestConfig) dialFromNode(protocol, targetIP string, targe Expect(strconv.Atoi(strings.TrimSpace(stdout))).To(BeNumerically("==", expectedCount)) } +func (config *KubeProxyTestConfig) getSelfURL(path string, expected string) { + cmd := fmt.Sprintf("curl -s --connect-timeout 1 http://localhost:10249%s", path) + By(fmt.Sprintf("Getting kube-proxy self URL %s", path)) + stdout := RunHostCmdOrDie(config.f.Namespace.Name, config.hostTestContainerPod.Name, cmd) + Expect(strings.Contains(stdout, expected)).To(BeTrue()) +} + func (config *KubeProxyTestConfig) createNetShellPodSpec(podName string, node string) *api.Pod { pod := &api.Pod{ TypeMeta: unversioned.TypeMeta{ From a6d96a04d05f546b16b4199bbc8aeda6102aedad Mon Sep 17 00:00:00 2001 From: Chao Xu Date: Sun, 31 Jan 2016 15:56:55 -0800 Subject: [PATCH 067/328] make kubelet.HandlePodsDeletion aware of api.Pod --- pkg/kubelet/container/runtime.go | 8 ++++++ pkg/kubelet/kubelet.go | 42 ++++++++++++++++++-------------- pkg/kubelet/kubelet_test.go | 2 +- 3 files changed, 33 insertions(+), 19 deletions(-) diff --git a/pkg/kubelet/container/runtime.go b/pkg/kubelet/container/runtime.go index 4f3dabadbbd..2ad1eba50cc 100644 --- a/pkg/kubelet/container/runtime.go +++ b/pkg/kubelet/container/runtime.go @@ -141,6 +141,14 @@ type Pod struct { Containers []*Container } +// PodPair contains both runtime#Pod and api#Pod +type PodPair struct { + // APIPod is the api.Pod + APIPod *api.Pod + // RunningPod is the pod defined defined in pkg/kubelet/container/runtime#Pod + RunningPod *Pod +} + // ContainerID is a type that identifies a container. type ContainerID struct { // The type of the container runtime. e.g. 'docker', 'rkt'. diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index f7ca16a3b7c..e8d4c1d6f39 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -450,7 +450,7 @@ func NewMainKubelet( klet.podWorkers = newPodWorkers(klet.syncPod, recorder, klet.workQueue, klet.resyncInterval, backOffPeriod, klet.podCache) klet.backOff = util.NewBackOff(backOffPeriod, MaxContainerBackOff) - klet.podKillingCh = make(chan *kubecontainer.Pod, podKillingChannelCapacity) + klet.podKillingCh = make(chan *kubecontainer.PodPair, podKillingChannelCapacity) klet.sourcesSeen = sets.NewString() return klet, nil } @@ -632,7 +632,7 @@ type Kubelet struct { backOff *util.Backoff // Channel for sending pods to kill. - podKillingCh chan *kubecontainer.Pod + podKillingCh chan *kubecontainer.PodPair // The configuration file used as the base to generate the container's // DNS resolver configuration file. This can be used in conjunction with @@ -1961,13 +1961,16 @@ func (kl *Kubelet) removeOrphanedPodStatuses(pods []*api.Pod, mirrorPods []*api. kl.statusManager.RemoveOrphanedStatuses(podUIDs) } -func (kl *Kubelet) deletePod(uid types.UID) error { +func (kl *Kubelet) deletePod(pod *api.Pod) error { + if pod == nil { + return fmt.Errorf("deletePod does not allow nil pod") + } if !kl.allSourcesReady() { // If the sources aren't ready, skip deletion, as we may accidentally delete pods // for sources that haven't reported yet. return fmt.Errorf("skipping delete because sources aren't ready yet") } - kl.podWorkers.ForgetWorker(uid) + kl.podWorkers.ForgetWorker(pod.UID) // Runtime cache may not have been updated to with the pod, but it's okay // because the periodic cleanup routine will attempt to delete again later. @@ -1975,12 +1978,13 @@ func (kl *Kubelet) deletePod(uid types.UID) error { if err != nil { return fmt.Errorf("error listing containers: %v", err) } - pod := kubecontainer.Pods(runningPods).FindPod("", uid) - if pod.IsEmpty() { + runningPod := kubecontainer.Pods(runningPods).FindPod("", pod.UID) + if runningPod.IsEmpty() { return fmt.Errorf("pod not found") } + podPair := kubecontainer.PodPair{pod, &runningPod} - kl.podKillingCh <- &pod + kl.podKillingCh <- &podPair // TODO: delete the mirror pod here? // We leave the volume/directory cleanup to the periodic cleanup routine. @@ -2023,7 +2027,7 @@ func (kl *Kubelet) HandlePodCleanups() error { } for _, pod := range runningPods { if _, found := desiredPods[pod.ID]; !found { - kl.podKillingCh <- pod + kl.podKillingCh <- &kubecontainer.PodPair{nil, pod} } } @@ -2082,25 +2086,27 @@ func (kl *Kubelet) podKiller() { defer close(resultCh) for { select { - case pod, ok := <-kl.podKillingCh: + case podPair, ok := <-kl.podKillingCh: + runningPod := podPair.RunningPod + apiPod := podPair.APIPod if !ok { return } - if killing.Has(string(pod.ID)) { + if killing.Has(string(runningPod.ID)) { // The pod is already being killed. break } - killing.Insert(string(pod.ID)) - go func(pod *kubecontainer.Pod, ch chan types.UID) { + killing.Insert(string(runningPod.ID)) + go func(apiPod *api.Pod, runningPod *kubecontainer.Pod, ch chan types.UID) { defer func() { - ch <- pod.ID + ch <- runningPod.ID }() - glog.V(2).Infof("Killing unwanted pod %q", pod.Name) - err := kl.killPod(nil, pod, nil) + glog.V(2).Infof("Killing unwanted pod %q", runningPod.Name) + err := kl.killPod(apiPod, runningPod, nil) if err != nil { - glog.Errorf("Failed killing the pod %q: %v", pod.Name, err) + glog.Errorf("Failed killing the pod %q: %v", runningPod.Name, err) } - }(pod, resultCh) + }(apiPod, runningPod, resultCh) case podID := <-resultCh: killing.Delete(string(podID)) @@ -2388,7 +2394,7 @@ func (kl *Kubelet) HandlePodDeletions(pods []*api.Pod) { } // Deletion is allowed to fail because the periodic cleanup routine // will trigger deletion again. - if err := kl.deletePod(pod.UID); err != nil { + if err := kl.deletePod(pod); err != nil { glog.V(2).Infof("Failed to delete pod %q, err: %v", format.Pod(pod), err) } kl.probeManager.RemovePod(pod) diff --git a/pkg/kubelet/kubelet_test.go b/pkg/kubelet/kubelet_test.go index 6a753d03482..7e64ba86f1b 100644 --- a/pkg/kubelet/kubelet_test.go +++ b/pkg/kubelet/kubelet_test.go @@ -176,7 +176,7 @@ func newTestKubelet(t *testing.T) *TestKubelet { fakeClock := &util.FakeClock{Time: time.Now()} kubelet.backOff = util.NewBackOff(time.Second, time.Minute) kubelet.backOff.Clock = fakeClock - kubelet.podKillingCh = make(chan *kubecontainer.Pod, 20) + kubelet.podKillingCh = make(chan *kubecontainer.PodPair, 20) kubelet.resyncInterval = 10 * time.Second kubelet.reservation = kubetypes.Reservation{ Kubernetes: api.ResourceList{ From 2d436ff0808d39bb6b8539a13fd4e602cfaade42 Mon Sep 17 00:00:00 2001 From: Solly Ross Date: Thu, 14 Jan 2016 15:45:08 -0500 Subject: [PATCH 068/328] Scheduler predicate for capping node volume count For certain volume types (e.g. AWS EBS or GCE PD), a limitted number of such volumes can be attached to a given node. This commit introduces a predicate with allows cluster admins to cap the maximum number of volumes matching a particular type attached to a given node. The volume type is configurable by passing a pair of filter functions, and the maximum number of such volumes is configurable to allow node admins to reserve a certain number of volumes for system use. By default, the predicate is exposed as MaxEBSVolumeCount and MaxGCEPDVolumeCount (for AWS ElasticBlocKStore and GCE PersistentDisk volumes, respectively), each of which can be configured using the `KUBE_MAX_PD_VOLS` environment variable. Fixes #7835 --- docs/devel/scheduler_algorithm.md | 2 + .../algorithm/predicates/predicates.go | 135 ++++++++++ .../algorithm/predicates/predicates_test.go | 243 ++++++++++++++++++ .../algorithmprovider/defaults/defaults.go | 47 ++++ 4 files changed, 427 insertions(+) diff --git a/docs/devel/scheduler_algorithm.md b/docs/devel/scheduler_algorithm.md index 00a812a55c9..786666caae4 100755 --- a/docs/devel/scheduler_algorithm.md +++ b/docs/devel/scheduler_algorithm.md @@ -47,6 +47,8 @@ The purpose of filtering the nodes is to filter out the nodes that do not meet c - `PodFitsHost`: Filter out all nodes except the one specified in the PodSpec's NodeName field. - `PodSelectorMatches`: Check if the labels of the node match the labels specified in the Pod's `nodeSelector` field ([Here](../user-guide/node-selection/) is an example of how to use `nodeSelector` field). - `CheckNodeLabelPresence`: Check if all the specified labels exist on a node or not, regardless of the value. +- `MaxEBSVolumeCount`: Ensure that the number of attached ElasticBlockStore volumes does not exceed a maximum value (by default, 39, since Amazon recommends a maximum of 40 with one of those 40 reserved for the root volume -- see [Amazon's documentation](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/volume_limits.html#linux-specific-volume-limits)). The maximum value can be controlled by setting the `KUBE_MAX_PD_VOLS` environment variable. +- `MaxGCEPDVolumeCount`: Ensure that the number of attached GCE PersistentDisk volumes does not exceed a maximum value (by default, 16, which is the maximum GCE allows -- see [GCE's documentation](https://cloud.google.com/compute/docs/disks/persistent-disks#limits_for_predefined_machine_types)). The maximum value can be controlled by setting the `KUBE_MAX_PD_VOLS` environment variable. The details of the above predicates can be found in [plugin/pkg/scheduler/algorithm/predicates/predicates.go](http://releases.k8s.io/HEAD/plugin/pkg/scheduler/algorithm/predicates/predicates.go). All predicates mentioned above can be used in combination to perform a sophisticated filtering policy. Kubernetes uses some, but not all, of these predicates by default. You can see which ones are used by default in [plugin/pkg/scheduler/algorithmprovider/defaults/defaults.go](http://releases.k8s.io/HEAD/plugin/pkg/scheduler/algorithmprovider/defaults/defaults.go). diff --git a/plugin/pkg/scheduler/algorithm/predicates/predicates.go b/plugin/pkg/scheduler/algorithm/predicates/predicates.go index f45c248ba61..4b3aedca8ed 100644 --- a/plugin/pkg/scheduler/algorithm/predicates/predicates.go +++ b/plugin/pkg/scheduler/algorithm/predicates/predicates.go @@ -145,6 +145,141 @@ func NoDiskConflict(pod *api.Pod, existingPods []*api.Pod, node string) (bool, e return true, nil } +type MaxPDVolumeCountChecker struct { + filter VolumeFilter + maxVolumes int + pvInfo PersistentVolumeInfo + pvcInfo PersistentVolumeClaimInfo +} + +// VolumeFilter contains information on how to filter PD Volumes when checking PD Volume caps +type VolumeFilter struct { + // Filter normal volumes + FilterVolume func(vol *api.Volume) (id string, relevant bool) + FilterPersistentVolume func(pv *api.PersistentVolume) (id string, relevant bool) +} + +// NewMaxPDVolumeCountPredicate creates a predicate which evaluates whether a pod can fit based on the +// number of volumes which match a filter that it requests, and those that are already present. The +// maximum number is configurable to accommodate different systems. +// +// The predicate looks for both volumes used directly, as well as PVC volumes that are backed by relevant volume +// types, counts the number of unique volumes, and rejects the new pod if it would place the total count over +// the maximum. +func NewMaxPDVolumeCountPredicate(filter VolumeFilter, maxVolumes int, pvInfo PersistentVolumeInfo, pvcInfo PersistentVolumeClaimInfo) algorithm.FitPredicate { + c := &MaxPDVolumeCountChecker{ + filter: filter, + maxVolumes: maxVolumes, + pvInfo: pvInfo, + pvcInfo: pvcInfo, + } + + return c.predicate +} + +func (c *MaxPDVolumeCountChecker) filterVolumes(volumes []api.Volume, namespace string, filteredVolumes map[string]bool) error { + for _, vol := range volumes { + if id, ok := c.filter.FilterVolume(&vol); ok { + filteredVolumes[id] = true + } else if vol.PersistentVolumeClaim != nil { + pvcName := vol.PersistentVolumeClaim.ClaimName + if pvcName == "" { + return fmt.Errorf("PersistentVolumeClaim had no name: %q", pvcName) + } + pvc, err := c.pvcInfo.GetPersistentVolumeClaimInfo(namespace, pvcName) + if err != nil { + return err + } + + pvName := pvc.Spec.VolumeName + if pvName == "" { + return fmt.Errorf("PersistentVolumeClaim is not bound: %q", pvcName) + } + + pv, err := c.pvInfo.GetPersistentVolumeInfo(pvName) + if err != nil { + return err + } + + if id, ok := c.filter.FilterPersistentVolume(pv); ok { + filteredVolumes[id] = true + } + } + } + + return nil +} + +func (c *MaxPDVolumeCountChecker) predicate(pod *api.Pod, existingPods []*api.Pod, node string) (bool, error) { + newVolumes := make(map[string]bool) + if err := c.filterVolumes(pod.Spec.Volumes, pod.Namespace, newVolumes); err != nil { + return false, err + } + + // quick return + if len(newVolumes) == 0 { + return true, nil + } + + // count unique volumes + existingVolumes := make(map[string]bool) + for _, existingPod := range existingPods { + if err := c.filterVolumes(existingPod.Spec.Volumes, existingPod.Namespace, existingVolumes); err != nil { + return false, err + } + } + numExistingVolumes := len(existingVolumes) + + // filter out already-mounted volumes + for k := range existingVolumes { + if _, ok := newVolumes[k]; ok { + delete(newVolumes, k) + } + } + + numNewVolumes := len(newVolumes) + + if numExistingVolumes+numNewVolumes > c.maxVolumes { + return false, nil + } + + return true, nil +} + +// EBSVolumeFilter is a VolumeFilter for filtering AWS ElasticBlockStore Volumes +var EBSVolumeFilter VolumeFilter = VolumeFilter{ + FilterVolume: func(vol *api.Volume) (string, bool) { + if vol.AWSElasticBlockStore != nil { + return vol.AWSElasticBlockStore.VolumeID, true + } + return "", false + }, + + FilterPersistentVolume: func(pv *api.PersistentVolume) (string, bool) { + if pv.Spec.AWSElasticBlockStore != nil { + return pv.Spec.AWSElasticBlockStore.VolumeID, true + } + return "", false + }, +} + +// GCEPDVolumeFilter is a VolumeFilter for filtering GCE PersistentDisk Volumes +var GCEPDVolumeFilter VolumeFilter = VolumeFilter{ + FilterVolume: func(vol *api.Volume) (string, bool) { + if vol.GCEPersistentDisk != nil { + return vol.GCEPersistentDisk.PDName, true + } + return "", false + }, + + FilterPersistentVolume: func(pv *api.PersistentVolume) (string, bool) { + if pv.Spec.GCEPersistentDisk != nil { + return pv.Spec.GCEPersistentDisk.PDName, true + } + return "", false + }, +} + type VolumeZoneChecker struct { nodeInfo NodeInfo pvInfo PersistentVolumeInfo diff --git a/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go b/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go index 5dc1a148cee..0ce09a1a941 100644 --- a/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go +++ b/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go @@ -44,6 +44,28 @@ func (nodes FakeNodeListInfo) GetNodeInfo(nodeName string) (*api.Node, error) { return nil, fmt.Errorf("Unable to find node: %s", nodeName) } +type FakePersistentVolumeClaimInfo []api.PersistentVolumeClaim + +func (pvcs FakePersistentVolumeClaimInfo) GetPersistentVolumeClaimInfo(namespace string, pvcID string) (*api.PersistentVolumeClaim, error) { + for _, pvc := range pvcs { + if pvc.Name == pvcID && pvc.Namespace == namespace { + return &pvc, nil + } + } + return nil, fmt.Errorf("Unable to find persistent volume claim: %s/%s", namespace, pvcID) +} + +type FakePersistentVolumeInfo []api.PersistentVolume + +func (pvs FakePersistentVolumeInfo) GetPersistentVolumeInfo(pvID string) (*api.PersistentVolume, error) { + for _, pv := range pvs { + if pv.Name == pvID { + return &pv, nil + } + } + return nil, fmt.Errorf("Unable to find persistent volume: %s", pvID) +} + func makeResources(milliCPU int64, memory int64, pods int64) api.NodeResources { return api.NodeResources{ Capacity: api.ResourceList{ @@ -771,3 +793,224 @@ func TestServiceAffinity(t *testing.T) { } } } + +func TestEBSVolumeCountConflicts(t *testing.T) { + oneVolPod := &api.Pod{ + Spec: api.PodSpec{ + Volumes: []api.Volume{ + { + VolumeSource: api.VolumeSource{ + AWSElasticBlockStore: &api.AWSElasticBlockStoreVolumeSource{VolumeID: "ovp"}, + }, + }, + }, + }, + } + ebsPVCPod := &api.Pod{ + Spec: api.PodSpec{ + Volumes: []api.Volume{ + { + VolumeSource: api.VolumeSource{ + PersistentVolumeClaim: &api.PersistentVolumeClaimVolumeSource{ + ClaimName: "someEBSVol", + }, + }, + }, + }, + }, + } + splitPVCPod := &api.Pod{ + Spec: api.PodSpec{ + Volumes: []api.Volume{ + { + VolumeSource: api.VolumeSource{ + PersistentVolumeClaim: &api.PersistentVolumeClaimVolumeSource{ + ClaimName: "someNonEBSVol", + }, + }, + }, + { + VolumeSource: api.VolumeSource{ + PersistentVolumeClaim: &api.PersistentVolumeClaimVolumeSource{ + ClaimName: "someEBSVol", + }, + }, + }, + }, + }, + } + twoVolPod := &api.Pod{ + Spec: api.PodSpec{ + Volumes: []api.Volume{ + { + VolumeSource: api.VolumeSource{ + AWSElasticBlockStore: &api.AWSElasticBlockStoreVolumeSource{VolumeID: "tvp1"}, + }, + }, + { + VolumeSource: api.VolumeSource{ + AWSElasticBlockStore: &api.AWSElasticBlockStoreVolumeSource{VolumeID: "tvp2"}, + }, + }, + }, + }, + } + splitVolsPod := &api.Pod{ + Spec: api.PodSpec{ + Volumes: []api.Volume{ + { + VolumeSource: api.VolumeSource{ + HostPath: &api.HostPathVolumeSource{}, + }, + }, + { + VolumeSource: api.VolumeSource{ + AWSElasticBlockStore: &api.AWSElasticBlockStoreVolumeSource{VolumeID: "svp"}, + }, + }, + }, + }, + } + nonApplicablePod := &api.Pod{ + Spec: api.PodSpec{ + Volumes: []api.Volume{ + { + VolumeSource: api.VolumeSource{ + HostPath: &api.HostPathVolumeSource{}, + }, + }, + }, + }, + } + emptyPod := &api.Pod{ + Spec: api.PodSpec{}, + } + + tests := []struct { + newPod *api.Pod + existingPods []*api.Pod + maxVols int + fits bool + test string + }{ + { + newPod: oneVolPod, + existingPods: []*api.Pod{twoVolPod, oneVolPod}, + maxVols: 4, + fits: true, + test: "fits when node capacity >= new pod's EBS volumes", + }, + { + newPod: twoVolPod, + existingPods: []*api.Pod{oneVolPod}, + maxVols: 2, + fits: false, + test: "doesn't fit when node capacity < new pod's EBS volumes", + }, + { + newPod: splitVolsPod, + existingPods: []*api.Pod{twoVolPod}, + maxVols: 3, + fits: true, + test: "new pod's count ignores non-EBS volumes", + }, + { + newPod: twoVolPod, + existingPods: []*api.Pod{splitVolsPod, nonApplicablePod, emptyPod}, + maxVols: 3, + fits: true, + test: "existing pods' counts ignore non-EBS volumes", + }, + { + newPod: ebsPVCPod, + existingPods: []*api.Pod{splitVolsPod, nonApplicablePod, emptyPod}, + maxVols: 3, + fits: true, + test: "new pod's count considers PVCs backed by EBS volumes", + }, + { + newPod: splitPVCPod, + existingPods: []*api.Pod{splitVolsPod, oneVolPod}, + maxVols: 3, + fits: true, + test: "new pod's count ignores PVCs not backed by EBS volumes", + }, + { + newPod: twoVolPod, + existingPods: []*api.Pod{oneVolPod, ebsPVCPod}, + maxVols: 3, + fits: false, + test: "existing pods' counts considers PVCs backed by EBS volumes", + }, + { + newPod: twoVolPod, + existingPods: []*api.Pod{oneVolPod, twoVolPod, ebsPVCPod}, + maxVols: 4, + fits: true, + test: "already-mounted EBS volumes are always ok to allow", + }, + { + newPod: splitVolsPod, + existingPods: []*api.Pod{oneVolPod, oneVolPod, ebsPVCPod}, + maxVols: 3, + fits: true, + test: "the same EBS volumes are not counted multiple times", + }, + } + + pvInfo := FakePersistentVolumeInfo{ + { + ObjectMeta: api.ObjectMeta{Name: "someEBSVol"}, + Spec: api.PersistentVolumeSpec{ + PersistentVolumeSource: api.PersistentVolumeSource{ + AWSElasticBlockStore: &api.AWSElasticBlockStoreVolumeSource{}, + }, + }, + }, + { + ObjectMeta: api.ObjectMeta{Name: "someNonEBSVol"}, + Spec: api.PersistentVolumeSpec{ + PersistentVolumeSource: api.PersistentVolumeSource{}, + }, + }, + } + + pvcInfo := FakePersistentVolumeClaimInfo{ + { + ObjectMeta: api.ObjectMeta{Name: "someEBSVol"}, + Spec: api.PersistentVolumeClaimSpec{VolumeName: "someEBSVol"}, + }, + { + ObjectMeta: api.ObjectMeta{Name: "someNonEBSVol"}, + Spec: api.PersistentVolumeClaimSpec{VolumeName: "someNonEBSVol"}, + }, + } + + filter := VolumeFilter{ + FilterVolume: func(vol *api.Volume) (string, bool) { + if vol.AWSElasticBlockStore != nil { + return vol.AWSElasticBlockStore.VolumeID, true + } + return "", false + }, + + FilterPersistentVolume: func(pv *api.PersistentVolume) (string, bool) { + if pv.Spec.AWSElasticBlockStore != nil { + return pv.Spec.AWSElasticBlockStore.VolumeID, true + } + return "", false + }, + } + + for _, test := range tests { + pred := NewMaxPDVolumeCountPredicate(filter, test.maxVols, pvInfo, pvcInfo) + fits, err := pred(test.newPod, test.existingPods, "some-node") + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + if fits != test.fits { + t.Errorf("%s: expected %v, got %v", test.test, test.fits, fits) + } + } +} diff --git a/plugin/pkg/scheduler/algorithmprovider/defaults/defaults.go b/plugin/pkg/scheduler/algorithmprovider/defaults/defaults.go index 7704dd4e260..5a347b2a50c 100644 --- a/plugin/pkg/scheduler/algorithmprovider/defaults/defaults.go +++ b/plugin/pkg/scheduler/algorithmprovider/defaults/defaults.go @@ -18,14 +18,41 @@ limitations under the License. package defaults import ( + "os" + "strconv" + "k8s.io/kubernetes/pkg/util/sets" "k8s.io/kubernetes/plugin/pkg/scheduler" "k8s.io/kubernetes/plugin/pkg/scheduler/algorithm" "k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/predicates" "k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities" "k8s.io/kubernetes/plugin/pkg/scheduler/factory" + + "github.com/golang/glog" ) +// Amazon reccomends having no more that 40 volumes attached to an instance, +// and at least one of those is for the system root volume. +const DefaultMaxEBSVolumes = 39 + +// GCE instances can have up to 16 PD volumes attached. +const DefaultMaxGCEPDVolumes = 16 + +// getMaxVols checks the max PD volumes environment variable, otherwise returning a default value +func getMaxVols(defaultVal int) int { + if rawMaxVols := os.Getenv("KUBE_MAX_PD_VOLS"); rawMaxVols != "" { + if parsedMaxVols, err := strconv.Atoi(rawMaxVols); err != nil { + glog.Errorf("Unable to parse maxiumum PD volumes value, using default of %v: %v", defaultVal, err) + } else if parsedMaxVols <= 0 { + glog.Errorf("Maximum PD volumes must be a positive value, using default of %v", defaultVal) + } else { + return parsedMaxVols + } + } + + return defaultVal +} + func init() { factory.RegisterAlgorithmProvider(factory.DefaultProvider, defaultPredicates(), defaultPriorities()) // EqualPriority is a prioritizer function that gives an equal weight of one to all nodes @@ -80,6 +107,26 @@ func defaultPredicates() sets.String { ), // Fit is determined by the presence of the Host parameter and a string match factory.RegisterFitPredicate("HostName", predicates.PodFitsHost), + + // Fit is determined by whether or not there would be too many AWS EBS volumes attached to the node + factory.RegisterFitPredicateFactory( + "MaxEBSVolumeCount", + func(args factory.PluginFactoryArgs) algorithm.FitPredicate { + // TODO: allow for generically parameterized scheduler predicates, because this is a bit ugly + maxVols := getMaxVols(DefaultMaxEBSVolumes) + return predicates.NewMaxPDVolumeCountPredicate(predicates.EBSVolumeFilter, maxVols, args.PVInfo, args.PVCInfo) + }, + ), + + // Fit is determined by whether or not there would be too many GCE PD volumes attached to the node + factory.RegisterFitPredicateFactory( + "MaxGCEPDVolumeCount", + func(args factory.PluginFactoryArgs) algorithm.FitPredicate { + // TODO: allow for generically parameterized scheduler predicates, because this is a bit ugly + maxVols := getMaxVols(DefaultMaxGCEPDVolumes) + return predicates.NewMaxPDVolumeCountPredicate(predicates.GCEPDVolumeFilter, maxVols, args.PVInfo, args.PVCInfo) + }, + ), ) } From 044b69cbdaa1e2bc15cf31b2290db821be1084e0 Mon Sep 17 00:00:00 2001 From: Mike Danese Date: Tue, 2 Feb 2016 13:31:49 -0800 Subject: [PATCH 069/328] componentconfig: fix proxy mode set func --- pkg/apis/componentconfig/helpers.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/apis/componentconfig/helpers.go b/pkg/apis/componentconfig/helpers.go index 43e77931cae..edd9c797593 100644 --- a/pkg/apis/componentconfig/helpers.go +++ b/pkg/apis/componentconfig/helpers.go @@ -54,8 +54,7 @@ func (v IPVar) Type() string { } func (m *ProxyMode) Set(s string) error { - nm := ProxyMode(s) - m = &nm + *m = ProxyMode(s) return nil } From f3de95ff41a7d852db73e69e0bfc4cfcd5efe8db Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Tue, 2 Feb 2016 14:19:16 -0800 Subject: [PATCH 070/328] test nits and a TODO for iptables tests --- pkg/proxy/iptables/proxier_test.go | 73 +++++++++++++++--------------- 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/pkg/proxy/iptables/proxier_test.go b/pkg/proxy/iptables/proxier_test.go index 3db6cb53140..2d3a9c85826 100644 --- a/pkg/proxy/iptables/proxier_test.go +++ b/pkg/proxy/iptables/proxier_test.go @@ -36,7 +36,6 @@ func checkAllLines(t *testing.T, table utiliptables.Table, save []byte, expected } func TestReadLinesFromByteBuffer(t *testing.T) { - testFn := func(byteArray []byte, expected []string) { index := 0 readIndex := 0 @@ -68,7 +67,7 @@ func TestReadLinesFromByteBuffer(t *testing.T) { testFn(byteArray1, expected1) } -func TestgetChainLines(t *testing.T) { +func TestGetChainLines(t *testing.T) { iptables_save := `# Generated by iptables-save v1.4.7 on Wed Oct 29 14:56:01 2014 *nat :PREROUTING ACCEPT [2136997:197881818] @@ -85,7 +84,7 @@ func TestgetChainLines(t *testing.T) { checkAllLines(t, utiliptables.TableNAT, []byte(iptables_save), expected) } -func TestgetChainLinesMultipleTables(t *testing.T) { +func TestGetChainLinesMultipleTables(t *testing.T) { iptables_save := `# Generated by iptables-save v1.4.21 on Fri Aug 7 14:47:37 2015 *nat :PREROUTING ACCEPT [2:138] @@ -97,12 +96,12 @@ func TestgetChainLinesMultipleTables(t *testing.T) { :KUBE-NODEPORT-HOST - [0:0] :KUBE-PORTALS-CONTAINER - [0:0] :KUBE-PORTALS-HOST - [0:0] - :KUBE-SVC-Dgkr8H9s4LQ2mn-Py5U - [0:0] - :KUBE-SVC-PknUqKuv-LNZiCKRqGm - [0:0] - :KUBE-SVC-RWEx6uDf8yWGww1OQ8E - [0:0] - :KUBE-SVC-UvIpe7oTYVlacW1-G4C - [0:0] - :KUBE-SVC-g_TrwxBdTXDbEtecmNo - [0:0] - :KUBE-SVC-gvTMDzeC8lcXUan15iP - [0:0] + :KUBE-SVC-1111111111111111 - [0:0] + :KUBE-SVC-2222222222222222 - [0:0] + :KUBE-SVC-3333333333333333 - [0:0] + :KUBE-SVC-4444444444444444 - [0:0] + :KUBE-SVC-5555555555555555 - [0:0] + :KUBE-SVC-6666666666666666 - [0:0] -A PREROUTING -m comment --comment "handle ClusterIPs; NOTE: this must be before the NodePort rules" -j KUBE-PORTALS-CONTAINER -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER -A PREROUTING -m addrtype --dst-type LOCAL -m comment --comment "handle service NodePorts; NOTE: this must be the last rule in the chain" -j KUBE-NODEPORT-CONTAINER @@ -111,18 +110,18 @@ func TestgetChainLinesMultipleTables(t *testing.T) { -A OUTPUT -m addrtype --dst-type LOCAL -m comment --comment "handle service NodePorts; NOTE: this must be the last rule in the chain" -j KUBE-NODEPORT-HOST -A POSTROUTING -s 10.246.1.0/24 ! -o cbr0 -j MASQUERADE -A POSTROUTING -s 10.0.2.15/32 -d 10.0.2.15/32 -m comment --comment "handle pod connecting to self" -j MASQUERADE - -A KUBE-PORTALS-CONTAINER -d 10.247.0.1/32 -p tcp -m comment --comment "portal for default/kubernetes:" -m state --state NEW -m tcp --dport 443 -j KUBE-SVC-g_TrwxBdTXDbEtecmNo - -A KUBE-PORTALS-CONTAINER -d 10.247.0.10/32 -p udp -m comment --comment "portal for kube-system/kube-dns:dns" -m state --state NEW -m udp --dport 53 -j KUBE-SVC-gvTMDzeC8lcXUan15iP - -A KUBE-PORTALS-CONTAINER -d 10.247.0.10/32 -p tcp -m comment --comment "portal for kube-system/kube-dns:dns-tcp" -m state --state NEW -m tcp --dport 53 -j KUBE-SVC-PknUqKuv-LNZiCKRqGm - -A KUBE-PORTALS-HOST -d 10.247.0.1/32 -p tcp -m comment --comment "portal for default/kubernetes:" -m state --state NEW -m tcp --dport 443 -j KUBE-SVC-g_TrwxBdTXDbEtecmNo - -A KUBE-PORTALS-HOST -d 10.247.0.10/32 -p udp -m comment --comment "portal for kube-system/kube-dns:dns" -m state --state NEW -m udp --dport 53 -j KUBE-SVC-gvTMDzeC8lcXUan15iP - -A KUBE-PORTALS-HOST -d 10.247.0.10/32 -p tcp -m comment --comment "portal for kube-system/kube-dns:dns-tcp" -m state --state NEW -m tcp --dport 53 -j KUBE-SVC-PknUqKuv-LNZiCKRqGm - -A KUBE-SVC-Dgkr8H9s4LQ2mn-Py5U -p udp -m comment --comment "kube-system/kube-dns:dns" -m recent --set --name KUBE-SVC-Dgkr8H9s4LQ2mn-Py5U --mask 255.255.255.255 --rsource -j DNAT --to-destination 10.246.1.2:53 - -A KUBE-SVC-PknUqKuv-LNZiCKRqGm -m comment --comment "kube-system/kube-dns:dns-tcp" -j KUBE-SVC-RWEx6uDf8yWGww1OQ8E - -A KUBE-SVC-RWEx6uDf8yWGww1OQ8E -p tcp -m comment --comment "kube-system/kube-dns:dns-tcp" -m recent --set --name KUBE-SVC-RWEx6uDf8yWGww1OQ8E --mask 255.255.255.255 --rsource -j DNAT --to-destination 10.246.1.2:53 - -A KUBE-SVC-UvIpe7oTYVlacW1-G4C -p tcp -m comment --comment "default/kubernetes:" -m recent --set --name KUBE-SVC-UvIpe7oTYVlacW1-G4C --mask 255.255.255.255 --rsource -j DNAT --to-destination 10.245.1.2:443 - -A KUBE-SVC-g_TrwxBdTXDbEtecmNo -m comment --comment "default/kubernetes:" -j KUBE-SVC-UvIpe7oTYVlacW1-G4C - -A KUBE-SVC-gvTMDzeC8lcXUan15iP -m comment --comment "kube-system/kube-dns:dns" -j KUBE-SVC-Dgkr8H9s4LQ2mn-Py5U + -A KUBE-PORTALS-CONTAINER -d 10.247.0.1/32 -p tcp -m comment --comment "portal for default/kubernetes:" -m state --state NEW -m tcp --dport 443 -j KUBE-SVC-5555555555555555 + -A KUBE-PORTALS-CONTAINER -d 10.247.0.10/32 -p udp -m comment --comment "portal for kube-system/kube-dns:dns" -m state --state NEW -m udp --dport 53 -j KUBE-SVC-6666666666666666 + -A KUBE-PORTALS-CONTAINER -d 10.247.0.10/32 -p tcp -m comment --comment "portal for kube-system/kube-dns:dns-tcp" -m state --state NEW -m tcp --dport 53 -j KUBE-SVC-2222222222222222 + -A KUBE-PORTALS-HOST -d 10.247.0.1/32 -p tcp -m comment --comment "portal for default/kubernetes:" -m state --state NEW -m tcp --dport 443 -j KUBE-SVC-5555555555555555 + -A KUBE-PORTALS-HOST -d 10.247.0.10/32 -p udp -m comment --comment "portal for kube-system/kube-dns:dns" -m state --state NEW -m udp --dport 53 -j KUBE-SVC-6666666666666666 + -A KUBE-PORTALS-HOST -d 10.247.0.10/32 -p tcp -m comment --comment "portal for kube-system/kube-dns:dns-tcp" -m state --state NEW -m tcp --dport 53 -j KUBE-SVC-2222222222222222 + -A KUBE-SVC-1111111111111111 -p udp -m comment --comment "kube-system/kube-dns:dns" -m recent --set --name KUBE-SVC-1111111111111111 --mask 255.255.255.255 --rsource -j DNAT --to-destination 10.246.1.2:53 + -A KUBE-SVC-2222222222222222 -m comment --comment "kube-system/kube-dns:dns-tcp" -j KUBE-SVC-3333333333333333 + -A KUBE-SVC-3333333333333333 -p tcp -m comment --comment "kube-system/kube-dns:dns-tcp" -m recent --set --name KUBE-SVC-3333333333333333 --mask 255.255.255.255 --rsource -j DNAT --to-destination 10.246.1.2:53 + -A KUBE-SVC-4444444444444444 -p tcp -m comment --comment "default/kubernetes:" -m recent --set --name KUBE-SVC-4444444444444444 --mask 255.255.255.255 --rsource -j DNAT --to-destination 10.245.1.2:443 + -A KUBE-SVC-5555555555555555 -m comment --comment "default/kubernetes:" -j KUBE-SVC-4444444444444444 + -A KUBE-SVC-6666666666666666 -m comment --comment "kube-system/kube-dns:dns" -j KUBE-SVC-1111111111111111 COMMIT # Completed on Fri Aug 7 14:47:37 2015 # Generated by iptables-save v1.4.21 on Fri Aug 7 14:47:37 2015 @@ -138,21 +137,23 @@ func TestgetChainLinesMultipleTables(t *testing.T) { COMMIT ` expected := map[utiliptables.Chain]string{ - utiliptables.ChainPrerouting: ":PREROUTING ACCEPT [2:138]", - utiliptables.Chain("INPUT"): ":INPUT ACCEPT [0:0]", - utiliptables.Chain("OUTPUT"): ":OUTPUT ACCEPT [0:0]", - utiliptables.ChainPostrouting: ":POSTROUTING ACCEPT [0:0]", - utiliptables.Chain("DOCKER"): ":DOCKER - [0:0]", - utiliptables.Chain("KUBE-NODEPORT-CONTAINER"): ":KUBE-NODEPORT-CONTAINER - [0:0]", - utiliptables.Chain("KUBE-NODEPORT-HOST"): ":KUBE-NODEPORT-HOST - [0:0]", - utiliptables.Chain("KUBE-PORTALS-CONTAINER"): ":KUBE-PORTALS-CONTAINER - [0:0]", - utiliptables.Chain("KUBE-PORTALS-HOST"): ":KUBE-PORTALS-HOST - [0:0]", - utiliptables.Chain("KUBE-SVC-Dgkr8H9s4LQ2mn-Py5U"): ":KUBE-SVC-Dgkr8H9s4LQ2mn-Py5U - [0:0]", - utiliptables.Chain("KUBE-SVC-PknUqKuv-LNZiCKRqGm"): ":KUBE-SVC-PknUqKuv-LNZiCKRqGm - [0:0]", - utiliptables.Chain("KUBE-SVC-RWEx6uDf8yWGww1OQ8E"): ":KUBE-SVC-RWEx6uDf8yWGww1OQ8E - [0:0]", - utiliptables.Chain("KUBE-SVC-UvIpe7oTYVlacW1-G4C"): ":KUBE-SVC-UvIpe7oTYVlacW1-G4C - [0:0]", - utiliptables.Chain("KUBE-SVC-g_TrwxBdTXDbEtecmNo"): ":KUBE-SVC-g_TrwxBdTXDbEtecmNo - [0:0]", - utiliptables.Chain("KUBE-SVC-gvTMDzeC8lcXUan15iP"): ":KUBE-SVC-gvTMDzeC8lcXUan15iP - [0:0]", + utiliptables.ChainPrerouting: ":PREROUTING ACCEPT [2:138]", + utiliptables.Chain("INPUT"): ":INPUT ACCEPT [0:0]", + utiliptables.Chain("OUTPUT"): ":OUTPUT ACCEPT [0:0]", + utiliptables.ChainPostrouting: ":POSTROUTING ACCEPT [0:0]", + utiliptables.Chain("DOCKER"): ":DOCKER - [0:0]", + utiliptables.Chain("KUBE-NODEPORT-CONTAINER"): ":KUBE-NODEPORT-CONTAINER - [0:0]", + utiliptables.Chain("KUBE-NODEPORT-HOST"): ":KUBE-NODEPORT-HOST - [0:0]", + utiliptables.Chain("KUBE-PORTALS-CONTAINER"): ":KUBE-PORTALS-CONTAINER - [0:0]", + utiliptables.Chain("KUBE-PORTALS-HOST"): ":KUBE-PORTALS-HOST - [0:0]", + utiliptables.Chain("KUBE-SVC-1111111111111111"): ":KUBE-SVC-1111111111111111 - [0:0]", + utiliptables.Chain("KUBE-SVC-2222222222222222"): ":KUBE-SVC-2222222222222222 - [0:0]", + utiliptables.Chain("KUBE-SVC-3333333333333333"): ":KUBE-SVC-3333333333333333 - [0:0]", + utiliptables.Chain("KUBE-SVC-4444444444444444"): ":KUBE-SVC-4444444444444444 - [0:0]", + utiliptables.Chain("KUBE-SVC-5555555555555555"): ":KUBE-SVC-5555555555555555 - [0:0]", + utiliptables.Chain("KUBE-SVC-6666666666666666"): ":KUBE-SVC-6666666666666666 - [0:0]", } checkAllLines(t, utiliptables.TableNAT, []byte(iptables_save), expected) } + +// TODO(thockin): add a test for syncProxyRules() or break it down further and test the pieces. From 442c75045ab0d9558d185b83e906f6123b25781b Mon Sep 17 00:00:00 2001 From: Janet Kuo Date: Tue, 19 Jan 2016 14:50:03 -0800 Subject: [PATCH 071/328] Add kubectl rollout undo --- .generated_docs | 2 + contrib/completions/bash/kubectl | 47 ++++++ docs/man/man1/kubectl-rollout-undo.1 | 142 ++++++++++++++++++ docs/man/man1/kubectl-rollout.1 | 16 +- docs/user-guide/kubectl/kubectl.md | 2 +- docs/user-guide/kubectl/kubectl_rollout.md | 10 +- .../kubectl/kubectl_rollout_pause.md | 2 +- .../kubectl/kubectl_rollout_resume.md | 2 +- .../kubectl/kubectl_rollout_undo.md | 93 ++++++++++++ hack/test-cmd.sh | 30 ++++ hack/testdata/deployment-revision2.yaml | 20 +++ hack/verify-flags/known-flags.txt | 1 + .../deployment/deployment_controller.go | 8 +- pkg/kubectl/cmd/rollout/rollout.go | 7 +- pkg/kubectl/cmd/rollout/rollout_undo.go | 111 ++++++++++++++ pkg/kubectl/cmd/util/factory.go | 10 ++ pkg/kubectl/rollback.go | 118 +++++++++++++++ pkg/util/deployment/deployment.go | 5 + test/e2e/deployment.go | 8 +- 19 files changed, 618 insertions(+), 16 deletions(-) create mode 100644 docs/man/man1/kubectl-rollout-undo.1 create mode 100644 docs/user-guide/kubectl/kubectl_rollout_undo.md create mode 100644 hack/testdata/deployment-revision2.yaml create mode 100644 pkg/kubectl/cmd/rollout/rollout_undo.go create mode 100644 pkg/kubectl/rollback.go diff --git a/.generated_docs b/.generated_docs index 94898c0a4da..8d5233ff08a 100644 --- a/.generated_docs +++ b/.generated_docs @@ -46,6 +46,7 @@ docs/man/man1/kubectl-rolling-update.1 docs/man/man1/kubectl-rollout-history.1 docs/man/man1/kubectl-rollout-pause.1 docs/man/man1/kubectl-rollout-resume.1 +docs/man/man1/kubectl-rollout-undo.1 docs/man/man1/kubectl-rollout.1 docs/man/man1/kubectl-run.1 docs/man/man1/kubectl-scale.1 @@ -96,6 +97,7 @@ docs/user-guide/kubectl/kubectl_rollout.md docs/user-guide/kubectl/kubectl_rollout_history.md docs/user-guide/kubectl/kubectl_rollout_pause.md docs/user-guide/kubectl/kubectl_rollout_resume.md +docs/user-guide/kubectl/kubectl_rollout_undo.md docs/user-guide/kubectl/kubectl_run.md docs/user-guide/kubectl/kubectl_scale.md docs/user-guide/kubectl/kubectl_uncordon.md diff --git a/contrib/completions/bash/kubectl b/contrib/completions/bash/kubectl index 03af9e59d88..b0d2329d84a 100644 --- a/contrib/completions/bash/kubectl +++ b/contrib/completions/bash/kubectl @@ -1792,6 +1792,52 @@ _kubectl_rollout_resume() must_have_one_noun=() } +_kubectl_rollout_undo() +{ + last_command="kubectl_rollout_undo" + commands=() + + flags=() + two_word_flags=() + flags_with_completion=() + flags_completion=() + + flags+=("--filename=") + flags_with_completion+=("--filename") + flags_completion+=("__handle_filename_extension_flag json|yaml|yml") + two_word_flags+=("-f") + flags_with_completion+=("-f") + flags_completion+=("__handle_filename_extension_flag json|yaml|yml") + flags+=("--to-revision=") + flags+=("--alsologtostderr") + flags+=("--api-version=") + flags+=("--certificate-authority=") + flags+=("--client-certificate=") + flags+=("--client-key=") + flags+=("--cluster=") + flags+=("--context=") + flags+=("--insecure-skip-tls-verify") + flags+=("--kubeconfig=") + flags+=("--log-backtrace-at=") + flags+=("--log-dir=") + flags+=("--log-flush-frequency=") + flags+=("--logtostderr") + flags+=("--match-server-version") + flags+=("--namespace=") + flags+=("--password=") + flags+=("--server=") + two_word_flags+=("-s") + flags+=("--stderrthreshold=") + flags+=("--token=") + flags+=("--user=") + flags+=("--username=") + flags+=("--v=") + flags+=("--vmodule=") + + must_have_one_flag=() + must_have_one_noun=() +} + _kubectl_rollout() { last_command="kubectl_rollout" @@ -1799,6 +1845,7 @@ _kubectl_rollout() commands+=("history") commands+=("pause") commands+=("resume") + commands+=("undo") flags=() two_word_flags=() diff --git a/docs/man/man1/kubectl-rollout-undo.1 b/docs/man/man1/kubectl-rollout-undo.1 new file mode 100644 index 00000000000..c976f355dd9 --- /dev/null +++ b/docs/man/man1/kubectl-rollout-undo.1 @@ -0,0 +1,142 @@ +.TH "KUBERNETES" "1" " kubernetes User Manuals" "Eric Paris" "Jan 2015" "" + + +.SH NAME +.PP +kubectl rollout undo \- undoes a previous rollout + + +.SH SYNOPSIS +.PP +\fBkubectl rollout undo\fP [OPTIONS] + + +.SH DESCRIPTION +.PP +undo rolls back to a previous rollout. + + +.SH OPTIONS +.PP +\fB\-f\fP, \fB\-\-filename\fP=[] + Filename, directory, or URL to a file identifying the resource to get from a server. + +.PP +\fB\-\-to\-revision\fP=0 + The revision to rollback to. Default to 0 (last revision). + + +.SH OPTIONS INHERITED FROM PARENT COMMANDS +.PP +\fB\-\-alsologtostderr\fP=false + log to standard error as well as files + +.PP +\fB\-\-api\-version\fP="" + The API version to use when talking to the server + +.PP +\fB\-\-certificate\-authority\fP="" + Path to a cert. file for the certificate authority. + +.PP +\fB\-\-client\-certificate\fP="" + Path to a client certificate file for TLS. + +.PP +\fB\-\-client\-key\fP="" + Path to a client key file for TLS. + +.PP +\fB\-\-cluster\fP="" + The name of the kubeconfig cluster to use + +.PP +\fB\-\-context\fP="" + The name of the kubeconfig context to use + +.PP +\fB\-\-insecure\-skip\-tls\-verify\fP=false + If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure. + +.PP +\fB\-\-kubeconfig\fP="" + Path to the kubeconfig file to use for CLI requests. + +.PP +\fB\-\-log\-backtrace\-at\fP=:0 + when logging hits line file:N, emit a stack trace + +.PP +\fB\-\-log\-dir\fP="" + If non\-empty, write log files in this directory + +.PP +\fB\-\-log\-flush\-frequency\fP=5s + Maximum number of seconds between log flushes + +.PP +\fB\-\-logtostderr\fP=true + log to standard error instead of files + +.PP +\fB\-\-match\-server\-version\fP=false + Require server version to match client version + +.PP +\fB\-\-namespace\fP="" + If present, the namespace scope for this CLI request. + +.PP +\fB\-\-password\fP="" + Password for basic authentication to the API server. + +.PP +\fB\-s\fP, \fB\-\-server\fP="" + The address and port of the Kubernetes API server + +.PP +\fB\-\-stderrthreshold\fP=2 + logs at or above this threshold go to stderr + +.PP +\fB\-\-token\fP="" + Bearer token for authentication to the API server. + +.PP +\fB\-\-user\fP="" + The name of the kubeconfig user to use + +.PP +\fB\-\-username\fP="" + Username for basic authentication to the API server. + +.PP +\fB\-\-v\fP=0 + log level for V logs + +.PP +\fB\-\-vmodule\fP= + comma\-separated list of pattern=N settings for file\-filtered logging + + +.SH EXAMPLE +.PP +.RS + +.nf +# Rollback to the previous deployment +$ kubectl rollout undo deployment/abc + +.fi +.RE + + +.SH SEE ALSO +.PP +\fBkubectl\-rollout(1)\fP, + + +.SH HISTORY +.PP +January 2015, Originally compiled by Eric Paris (eparis at redhat dot com) based on the kubernetes source material, but hopefully they have been automatically generated since! diff --git a/docs/man/man1/kubectl-rollout.1 b/docs/man/man1/kubectl-rollout.1 index 8015cd445a6..d0a73e89b0e 100644 --- a/docs/man/man1/kubectl-rollout.1 +++ b/docs/man/man1/kubectl-rollout.1 @@ -13,7 +13,7 @@ kubectl rollout \- rollout manages a deployment .SH DESCRIPTION .PP -rollout manages a deployment using subcommands +rollout manages a deployment using subcommands like "kubectl rollout undo deployment/abc" .SH OPTIONS INHERITED FROM PARENT COMMANDS @@ -110,9 +110,21 @@ rollout manages a deployment using subcommands comma\-separated list of pattern=N settings for file\-filtered logging +.SH EXAMPLE +.PP +.RS + +.nf +# Rollback to the previous deployment +$ kubectl rollout undo deployment/abc + +.fi +.RE + + .SH SEE ALSO .PP -\fBkubectl(1)\fP, \fBkubectl\-rollout\-history(1)\fP, \fBkubectl\-rollout\-pause(1)\fP, \fBkubectl\-rollout\-resume(1)\fP, +\fBkubectl(1)\fP, \fBkubectl\-rollout\-history(1)\fP, \fBkubectl\-rollout\-pause(1)\fP, \fBkubectl\-rollout\-resume(1)\fP, \fBkubectl\-rollout\-undo(1)\fP, .SH HISTORY diff --git a/docs/user-guide/kubectl/kubectl.md b/docs/user-guide/kubectl/kubectl.md index e8e56d75574..15201d24ff6 100644 --- a/docs/user-guide/kubectl/kubectl.md +++ b/docs/user-guide/kubectl/kubectl.md @@ -109,7 +109,7 @@ kubectl * [kubectl uncordon](kubectl_uncordon.md) - Mark node as schedulable * [kubectl version](kubectl_version.md) - Print the client and server version information. -###### Auto generated by spf13/cobra on 20-Jan-2016 +###### Auto generated by spf13/cobra on 19-Jan-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_rollout.md b/docs/user-guide/kubectl/kubectl_rollout.md index 767d9dc0f11..327d5f67a13 100644 --- a/docs/user-guide/kubectl/kubectl_rollout.md +++ b/docs/user-guide/kubectl/kubectl_rollout.md @@ -34,12 +34,19 @@ rollout manages a deployment ### Synopsis -rollout manages a deployment using subcommands +rollout manages a deployment using subcommands like "kubectl rollout undo deployment/abc" ``` kubectl rollout SUBCOMMAND ``` +### Examples + +``` +# Rollback to the previous deployment +$ kubectl rollout undo deployment/abc +``` + ### Options inherited from parent commands ``` @@ -74,6 +81,7 @@ kubectl rollout SUBCOMMAND * [kubectl rollout history](kubectl_rollout_history.md) - view rollout history * [kubectl rollout pause](kubectl_rollout_pause.md) - Mark the provided resource as paused * [kubectl rollout resume](kubectl_rollout_resume.md) - Resume a paused resource +* [kubectl rollout undo](kubectl_rollout_undo.md) - undoes a previous rollout ###### Auto generated by spf13/cobra on 2-Feb-2016 diff --git a/docs/user-guide/kubectl/kubectl_rollout_pause.md b/docs/user-guide/kubectl/kubectl_rollout_pause.md index 2f42c8993db..1a79dc5378f 100644 --- a/docs/user-guide/kubectl/kubectl_rollout_pause.md +++ b/docs/user-guide/kubectl/kubectl_rollout_pause.md @@ -91,7 +91,7 @@ $ kubectl rollout pause deployment/nginx * [kubectl rollout](kubectl_rollout.md) - rollout manages a deployment -###### Auto generated by spf13/cobra on 25-Jan-2016 +###### Auto generated by spf13/cobra on 2-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_rollout_pause.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_rollout_resume.md b/docs/user-guide/kubectl/kubectl_rollout_resume.md index 0b616043198..f5fd45277e9 100644 --- a/docs/user-guide/kubectl/kubectl_rollout_resume.md +++ b/docs/user-guide/kubectl/kubectl_rollout_resume.md @@ -89,7 +89,7 @@ $ kubectl rollout resume deployment/nginx * [kubectl rollout](kubectl_rollout.md) - rollout manages a deployment -###### Auto generated by spf13/cobra on 25-Jan-2016 +###### Auto generated by spf13/cobra on 2-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_rollout_resume.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_rollout_undo.md b/docs/user-guide/kubectl/kubectl_rollout_undo.md new file mode 100644 index 00000000000..659177bf81a --- /dev/null +++ b/docs/user-guide/kubectl/kubectl_rollout_undo.md @@ -0,0 +1,93 @@ + + + + +WARNING +WARNING +WARNING +WARNING +WARNING + +

PLEASE NOTE: This document applies to the HEAD of the source tree

+ +If you are using a released version of Kubernetes, you should +refer to the docs that go with that version. + +Documentation for other releases can be found at +[releases.k8s.io](http://releases.k8s.io). + +-- + + + + + +## kubectl rollout undo + +undoes a previous rollout + +### Synopsis + + +undo rolls back to a previous rollout. + +``` +kubectl rollout undo (TYPE NAME | TYPE/NAME) [flags] +``` + +### Examples + +``` +# Rollback to the previous deployment +$ kubectl rollout undo deployment/abc +``` + +### Options + +``` + -f, --filename=[]: Filename, directory, or URL to a file identifying the resource to get from a server. + --to-revision=0: The revision to rollback to. Default to 0 (last revision). +``` + +### Options inherited from parent commands + +``` + --alsologtostderr[=false]: log to standard error as well as files + --api-version="": The API version to use when talking to the server + --certificate-authority="": Path to a cert. file for the certificate authority. + --client-certificate="": Path to a client certificate file for TLS. + --client-key="": Path to a client key file for TLS. + --cluster="": The name of the kubeconfig cluster to use + --context="": The name of the kubeconfig context to use + --insecure-skip-tls-verify[=false]: If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure. + --kubeconfig="": Path to the kubeconfig file to use for CLI requests. + --log-backtrace-at=:0: when logging hits line file:N, emit a stack trace + --log-dir="": If non-empty, write log files in this directory + --log-flush-frequency=5s: Maximum number of seconds between log flushes + --logtostderr[=true]: log to standard error instead of files + --match-server-version[=false]: Require server version to match client version + --namespace="": If present, the namespace scope for this CLI request. + --password="": Password for basic authentication to the API server. + -s, --server="": The address and port of the Kubernetes API server + --stderrthreshold=2: logs at or above this threshold go to stderr + --token="": Bearer token for authentication to the API server. + --user="": The name of the kubeconfig user to use + --username="": Username for basic authentication to the API server. + --v=0: log level for V logs + --vmodule=: comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [kubectl rollout](kubectl_rollout.md) - rollout manages a deployment + +###### Auto generated by spf13/cobra on 29-Jan-2016 + + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_rollout_undo.md?pixel)]() + diff --git a/hack/test-cmd.sh b/hack/test-cmd.sh index 513086d9b69..770d57e832e 100755 --- a/hack/test-cmd.sh +++ b/hack/test-cmd.sh @@ -242,6 +242,7 @@ runTests() { deployment_replicas=".spec.replicas" secret_data=".data" secret_type=".type" + deployment_image_field="(index .spec.template.spec.containers 0).image" # Passing no arguments to create is an error ! kubectl create @@ -1081,6 +1082,35 @@ __EOF__ kubectl delete deployment nginx-deployment "${kube_flags[@]}" kubectl delete rc -l deployment.kubernetes.io/podTemplateHash "${kube_flags[@]}" + ### Rollback a deployment + # Pre-condition: no deployment exists + kube::test::get_object_assert deployment "{{range.items}}{{$id_field}}:{{end}}" '' + # Command + # Create a deployment (revision 1) + kubectl create -f examples/extensions/deployment.yaml "${kube_flags[@]}" + kube::test::get_object_assert deployment "{{range.items}}{{$id_field}}:{{end}}" 'nginx-deployment:' + kube::test::get_object_assert deployment "{{range.items}}{{$deployment_image_field}}:{{end}}" 'nginx:' + # Rollback to revision 1 - should be no-op + kubectl rollout undo deployment nginx-deployment --to-revision=1 "${kube_flags[@]}" + kube::test::get_object_assert deployment "{{range.items}}{{$deployment_image_field}}:{{end}}" 'nginx:' + # Update the deployment (revision 2) + kubectl apply -f hack/testdata/deployment-revision2.yaml "${kube_flags[@]}" + kube::test::get_object_assert deployment "{{range.items}}{{$deployment_image_field}}:{{end}}" 'nginx:latest:' + # Rollback to revision 1 + kubectl rollout undo deployment nginx-deployment --to-revision=1 "${kube_flags[@]}" + sleep 1 + kube::test::get_object_assert deployment "{{range.items}}{{$deployment_image_field}}:{{end}}" 'nginx:' + # Rollback to revision 1000000 - should be no-op + kubectl rollout undo deployment nginx-deployment --to-revision=1000000 "${kube_flags[@]}" + kube::test::get_object_assert deployment "{{range.items}}{{$deployment_image_field}}:{{end}}" 'nginx:' + # Rollback to last revision + kubectl rollout undo deployment nginx-deployment "${kube_flags[@]}" + sleep 1 + kube::test::get_object_assert deployment "{{range.items}}{{$deployment_image_field}}:{{end}}" 'nginx:latest:' + # Clean up + kubectl delete deployment nginx-deployment "${kube_flags[@]}" + kubectl delete rc -l deployment.kubernetes.io/podTemplateHash "${kube_flags[@]}" + ###################### # ConfigMap # ###################### diff --git a/hack/testdata/deployment-revision2.yaml b/hack/testdata/deployment-revision2.yaml new file mode 100644 index 00000000000..833f79e4f88 --- /dev/null +++ b/hack/testdata/deployment-revision2.yaml @@ -0,0 +1,20 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: nginx-deployment + labels: + name: nginx-deployment +spec: + replicas: 3 + selector: + name: nginx + template: + metadata: + labels: + name: nginx + spec: + containers: + - name: nginx + image: nginx:latest + ports: + - containerPort: 80 diff --git a/hack/verify-flags/known-flags.txt b/hack/verify-flags/known-flags.txt index d30e43f3b9f..c31c808c6bf 100644 --- a/hack/verify-flags/known-flags.txt +++ b/hack/verify-flags/known-flags.txt @@ -347,6 +347,7 @@ tcp-services terminated-pod-gc-threshold tls-cert-file tls-private-key-file +to-version token-auth-file ttl-secs type-src diff --git a/pkg/controller/deployment/deployment_controller.go b/pkg/controller/deployment/deployment_controller.go index 7b2a776a4e2..f94759ee4f6 100644 --- a/pkg/controller/deployment/deployment_controller.go +++ b/pkg/controller/deployment/deployment_controller.go @@ -446,7 +446,7 @@ func (dc *DeploymentController) rollback(deployment *extensions.Deployment, toRe if *toRevision == 0 { if *toRevision = lastRevision(allRCs); *toRevision == 0 { // If we still can't find the last revision, gives up rollback - dc.emitRollbackWarningEvent(deployment, "DeploymentRollbackRevisionNotFound", "Unable to find last revision.") + dc.emitRollbackWarningEvent(deployment, deploymentutil.RollbackRevisionNotFound, "Unable to find last revision.") // Gives up rollback return dc.updateDeploymentAndClearRollbackTo(deployment) } @@ -468,7 +468,7 @@ func (dc *DeploymentController) rollback(deployment *extensions.Deployment, toRe return deployment, err } } - dc.emitRollbackWarningEvent(deployment, "DeploymentRollbackRevisionNotFound", "Unable to find the revision to rollback to.") + dc.emitRollbackWarningEvent(deployment, deploymentutil.RollbackRevisionNotFound, "Unable to find the revision to rollback to.") // Gives up rollback return dc.updateDeploymentAndClearRollbackTo(deployment) } @@ -478,7 +478,7 @@ func (dc *DeploymentController) emitRollbackWarningEvent(deployment *extensions. } func (dc *DeploymentController) emitRollbackNormalEvent(deployment *extensions.Deployment, message string) { - dc.eventRecorder.Eventf(deployment, api.EventTypeNormal, "DeploymentRollback", message) + dc.eventRecorder.Eventf(deployment, api.EventTypeNormal, deploymentutil.RollbackDone, message) } // updateDeploymentAndClearRollbackTo sets .spec.rollbackTo to nil and update the input deployment @@ -966,7 +966,7 @@ func (dc *DeploymentController) rollbackToTemplate(deployment *extensions.Deploy performedRollback = true } else { glog.V(4).Infof("Rolling back to a revision that contains the same template as current deployment %s, skipping rollback...", deployment.Name) - dc.emitRollbackWarningEvent(deployment, "DeploymentRollbackTemplateUnchanged", fmt.Sprintf("The rollback revision contains the same template as current deployment %q", deployment.Name)) + dc.emitRollbackWarningEvent(deployment, deploymentutil.RollbackTemplateUnchanged, fmt.Sprintf("The rollback revision contains the same template as current deployment %q", deployment.Name)) } d, err = dc.updateDeploymentAndClearRollbackTo(deployment) return diff --git a/pkg/kubectl/cmd/rollout/rollout.go b/pkg/kubectl/cmd/rollout/rollout.go index fbfc631a81b..8fbb53595cf 100644 --- a/pkg/kubectl/cmd/rollout/rollout.go +++ b/pkg/kubectl/cmd/rollout/rollout.go @@ -24,8 +24,9 @@ import ( ) const ( - rollout_long = `rollout manages a deployment using subcommands` - rollout_example = `` + rollout_long = `rollout manages a deployment using subcommands like "kubectl rollout undo deployment/abc"` + rollout_example = `# Rollback to the previous deployment +$ kubectl rollout undo deployment/abc` rollout_valid_resources = `Valid resource types include: * deployments ` @@ -43,9 +44,11 @@ func NewCmdRollout(f *cmdutil.Factory, out io.Writer) *cobra.Command { }, } + // subcommands cmd.AddCommand(NewCmdRolloutHistory(f, out)) cmd.AddCommand(NewCmdRolloutPause(f, out)) cmd.AddCommand(NewCmdRolloutResume(f, out)) + cmd.AddCommand(NewCmdRolloutUndo(f, out)) return cmd } diff --git a/pkg/kubectl/cmd/rollout/rollout_undo.go b/pkg/kubectl/cmd/rollout/rollout_undo.go new file mode 100644 index 00000000000..ccaf429ee76 --- /dev/null +++ b/pkg/kubectl/cmd/rollout/rollout_undo.go @@ -0,0 +1,111 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +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 rollout + +import ( + "fmt" + "io" + + "k8s.io/kubernetes/pkg/api/meta" + "k8s.io/kubernetes/pkg/kubectl" + cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" + "k8s.io/kubernetes/pkg/kubectl/resource" + "k8s.io/kubernetes/pkg/runtime" + + "github.com/spf13/cobra" +) + +// UndoOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of +// referencing the cmd.Flags() +type UndoOptions struct { + Rollbacker kubectl.Rollbacker + Mapper meta.RESTMapper + Typer runtime.ObjectTyper + Info *resource.Info + ToRevision int64 + Out io.Writer + Filenames []string +} + +const ( + undo_long = `undo rolls back to a previous rollout.` + undo_example = `# Rollback to the previous deployment +$ kubectl rollout undo deployment/abc` +) + +func NewCmdRolloutUndo(f *cmdutil.Factory, out io.Writer) *cobra.Command { + options := &UndoOptions{} + + cmd := &cobra.Command{ + Use: "undo (TYPE NAME | TYPE/NAME) [flags]", + Short: "undoes a previous rollout", + Long: undo_long, + Example: undo_example, + Run: func(cmd *cobra.Command, args []string) { + cmdutil.CheckErr(options.CompleteUndo(f, cmd, out, args)) + cmdutil.CheckErr(options.RunUndo()) + }, + } + + cmd.Flags().Int64("to-revision", 0, "The revision to rollback to. Default to 0 (last revision).") + usage := "Filename, directory, or URL to a file identifying the resource to get from a server." + kubectl.AddJsonFilenameFlag(cmd, &options.Filenames, usage) + return cmd +} + +func (o *UndoOptions) CompleteUndo(f *cmdutil.Factory, cmd *cobra.Command, out io.Writer, args []string) error { + if len(args) == 0 && len(o.Filenames) == 0 { + return cmdutil.UsageError(cmd, "Required resource not specified.") + } + + o.ToRevision = cmdutil.GetFlagInt64(cmd, "to-revision") + o.Mapper, o.Typer = f.Object() + o.Out = out + + cmdNamespace, enforceNamespace, err := f.DefaultNamespace() + if err != nil { + return err + } + + infos, err := resource.NewBuilder(o.Mapper, o.Typer, resource.ClientMapperFunc(f.ClientForMapping), f.Decoder(true)). + NamespaceParam(cmdNamespace).DefaultNamespace(). + FilenameParam(enforceNamespace, o.Filenames...). + ResourceTypeOrNameArgs(true, args...). + Latest(). + Flatten(). + Do(). + Infos() + if err != nil { + return err + } + + if len(infos) != 1 { + return fmt.Errorf("rollout undo is only supported on individual resources - %d resources were found", len(infos)) + } + o.Info = infos[0] + o.Rollbacker, err = f.Rollbacker(o.Info.ResourceMapping()) + return err +} + +func (o *UndoOptions) RunUndo() error { + result, err := o.Rollbacker.Rollback(o.Info.Namespace, o.Info.Name, nil, o.ToRevision, o.Info.Object) + if err != nil { + return err + } + cmdutil.PrintSuccess(o.Mapper, false, o.Out, o.Info.Mapping.Resource, o.Info.Name, result) + return nil +} diff --git a/pkg/kubectl/cmd/util/factory.go b/pkg/kubectl/cmd/util/factory.go index eea080f5378..2c7e55d6207 100644 --- a/pkg/kubectl/cmd/util/factory.go +++ b/pkg/kubectl/cmd/util/factory.go @@ -88,6 +88,8 @@ type Factory struct { Reaper func(mapping *meta.RESTMapping) (kubectl.Reaper, error) // Returns a HistoryViewer for viewing change history HistoryViewer func(mapping *meta.RESTMapping) (kubectl.HistoryViewer, error) + // Returns a Rollbacker for changing the rollback version of the specified RESTMapping type or an error + Rollbacker func(mapping *meta.RESTMapping) (kubectl.Rollbacker, error) // PodSelectorForObject returns the pod selector associated with the provided object PodSelectorForObject func(object runtime.Object) (string, error) // PortsForObject returns the ports associated with the provided object @@ -373,6 +375,14 @@ func NewFactory(optionalClientConfig clientcmd.ClientConfig) *Factory { } return kubectl.HistoryViewerFor(mapping.GroupVersionKind.GroupKind(), clientset) }, + Rollbacker: func(mapping *meta.RESTMapping) (kubectl.Rollbacker, error) { + mappingVersion := mapping.GroupVersionKind.GroupVersion() + client, err := clients.ClientForVersion(&mappingVersion) + if err != nil { + return nil, err + } + return kubectl.RollbackerFor(mapping.GroupVersionKind.GroupKind(), client) + }, Validator: func(validate bool, cacheDir string) (validation.Schema, error) { if validate { client, err := clients.ClientForVersion(nil) diff --git a/pkg/kubectl/rollback.go b/pkg/kubectl/rollback.go new file mode 100644 index 00000000000..9f53b25af6f --- /dev/null +++ b/pkg/kubectl/rollback.go @@ -0,0 +1,118 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +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 kubectl + +import ( + "fmt" + "os" + "os/signal" + "syscall" + + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/unversioned" + "k8s.io/kubernetes/pkg/apis/extensions" + client "k8s.io/kubernetes/pkg/client/unversioned" + "k8s.io/kubernetes/pkg/runtime" + deploymentutil "k8s.io/kubernetes/pkg/util/deployment" + "k8s.io/kubernetes/pkg/watch" +) + +// Rollbacker provides an interface for resources that can be rolled back. +type Rollbacker interface { + Rollback(namespace, name string, updatedAnnotations map[string]string, toRevision int64, obj runtime.Object) (string, error) +} + +func RollbackerFor(kind unversioned.GroupKind, c client.Interface) (Rollbacker, error) { + switch kind { + case extensions.Kind("Deployment"): + return &DeploymentRollbacker{c}, nil + } + return nil, fmt.Errorf("no rollbacker has been implemented for %q", kind) +} + +type DeploymentRollbacker struct { + c client.Interface +} + +func (r *DeploymentRollbacker) Rollback(namespace, name string, updatedAnnotations map[string]string, toRevision int64, obj runtime.Object) (string, error) { + deploymentRollback := &extensions.DeploymentRollback{ + Name: name, + UpdatedAnnotations: updatedAnnotations, + RollbackTo: extensions.RollbackConfig{ + Revision: toRevision, + }, + } + result := "" + + // Get current events + events, err := r.c.Events(namespace).List(api.ListOptions{}) + if err != nil { + return result, err + } + // Do the rollback + if err := r.c.Extensions().Deployments(namespace).Rollback(deploymentRollback); err != nil { + return result, err + } + // Watch for the changes of events + watch, err := r.c.Events(namespace).Watch(api.ListOptions{Watch: true, ResourceVersion: events.ResourceVersion}) + if err != nil { + return result, err + } + result = watchRollbackEvent(watch) + return result, err +} + +// watchRollbackEvent watches for rollback events and returns rollback result +func watchRollbackEvent(w watch.Interface) string { + signals := make(chan os.Signal, 1) + signal.Notify(signals, os.Interrupt, os.Kill, syscall.SIGTERM) + for { + select { + case event, ok := <-w.ResultChan(): + if !ok { + return "" + } + obj, ok := event.Object.(*api.Event) + if !ok { + w.Stop() + return "" + } + isRollback, result := isRollbackEvent(obj) + if isRollback { + w.Stop() + return result + } + case <-signals: + w.Stop() + } + } +} + +// isRollbackEvent checks if the input event is about rollback, and returns true and +// related result string back if it is. +func isRollbackEvent(e *api.Event) (bool, string) { + rollbackEventReasons := []string{deploymentutil.RollbackRevisionNotFound, deploymentutil.RollbackTemplateUnchanged, deploymentutil.RollbackDone} + for _, reason := range rollbackEventReasons { + if e.Reason == reason { + if reason == deploymentutil.RollbackDone { + return true, "rolled back" + } + return true, fmt.Sprintf("skipped rollback (%s: %s)", e.Reason, e.Message) + } + } + return false, "" +} diff --git a/pkg/util/deployment/deployment.go b/pkg/util/deployment/deployment.go index cc7b874772f..58f12aac294 100644 --- a/pkg/util/deployment/deployment.go +++ b/pkg/util/deployment/deployment.go @@ -32,6 +32,11 @@ import ( const ( // The revision annotation of a deployment's replication controllers which records its rollout sequence RevisionAnnotation = "deployment.kubernetes.io/revision" + + // Here are the possible rollback event reasons + RollbackRevisionNotFound = "DeploymentRollbackRevisionNotFound" + RollbackTemplateUnchanged = "DeploymentRollbackTemplateUnchanged" + RollbackDone = "DeploymentRollback" ) // GetOldRCs returns the old RCs targeted by the given Deployment; get PodList and RCList from client interface. diff --git a/test/e2e/deployment.go b/test/e2e/deployment.go index 1dc155875ff..2087f486789 100644 --- a/test/e2e/deployment.go +++ b/test/e2e/deployment.go @@ -770,7 +770,7 @@ func testRollbackDeploymentRCNoRevision(f *Framework) { waitForEvents(unversionedClient, ns, deployment, 2) events, err := c.Events(ns).Search(deployment) Expect(err).NotTo(HaveOccurred()) - Expect(events.Items[1].Reason).Should(Equal("DeploymentRollbackRevisionNotFound")) + Expect(events.Items[1].Reason).Should(Equal(deploymentutil.RollbackRevisionNotFound)) // Check if it's still revision 1 checkDeploymentRevision(c, ns, deploymentName, "1", deploymentImageName, deploymentImage) @@ -804,7 +804,7 @@ func testRollbackDeploymentRCNoRevision(f *Framework) { waitForEvents(unversionedClient, ns, deployment, 5) events, err = c.Events(ns).Search(deployment) Expect(err).NotTo(HaveOccurred()) - Expect(events.Items[4].Reason).Should(Equal("DeploymentRollback")) + Expect(events.Items[4].Reason).Should(Equal(deploymentutil.RollbackDone)) // Check if it's updated to revision 3 correctly checkDeploymentRevision(c, ns, deploymentName, "3", deploymentImageName, deploymentImage) @@ -821,7 +821,7 @@ func testRollbackDeploymentRCNoRevision(f *Framework) { waitForEvents(unversionedClient, ns, deployment, 7) events, err = c.Events(ns).Search(deployment) Expect(err).NotTo(HaveOccurred()) - Expect(events.Items[6].Reason).Should(Equal("DeploymentRollbackRevisionNotFound")) + Expect(events.Items[6].Reason).Should(Equal(deploymentutil.RollbackRevisionNotFound)) // Check if it's still revision 3 checkDeploymentRevision(c, ns, deploymentName, "3", deploymentImageName, deploymentImage) @@ -838,7 +838,7 @@ func testRollbackDeploymentRCNoRevision(f *Framework) { waitForEvents(unversionedClient, ns, deployment, 8) events, err = c.Events(ns).Search(deployment) Expect(err).NotTo(HaveOccurred()) - Expect(events.Items[7].Reason).Should(Equal("DeploymentRollbackTemplateUnchanged")) + Expect(events.Items[7].Reason).Should(Equal(deploymentutil.RollbackTemplateUnchanged)) // Check if it's still revision 3 checkDeploymentRevision(c, ns, deploymentName, "3", deploymentImageName, deploymentImage) From d55853dc07c65bc5a48bcdf34d3d0c54639b7fcc Mon Sep 17 00:00:00 2001 From: Minhan Xia Date: Tue, 2 Feb 2016 14:39:38 -0800 Subject: [PATCH 072/328] Revert "remove cluster logging e2e test from flaky suite" --- test/e2e/es_cluster_logging.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/e2e/es_cluster_logging.go b/test/e2e/es_cluster_logging.go index 1e9efa40927..93775bada5a 100644 --- a/test/e2e/es_cluster_logging.go +++ b/test/e2e/es_cluster_logging.go @@ -30,7 +30,8 @@ import ( . "github.com/onsi/gomega" ) -var _ = Describe("Cluster level logging using Elasticsearch", func() { +// Flaky issue #17873 +var _ = Describe("Cluster level logging using Elasticsearch [Flaky]", func() { f := NewFramework("es-logging") BeforeEach(func() { From 41b12a18d9c1771f0e256910ed31b05fb2f48975 Mon Sep 17 00:00:00 2001 From: Random-Liu Date: Tue, 26 Jan 2016 17:12:12 -0800 Subject: [PATCH 073/328] Remove GetAPIPodStatus usage --- pkg/kubelet/kubelet.go | 16 +++---- pkg/kubelet/kubelet_test.go | 73 ++----------------------------- pkg/kubelet/lifecycle/handlers.go | 9 ++-- pkg/kubelet/runonce.go | 57 ++++++++++-------------- pkg/kubelet/runonce_test.go | 17 +++++++ 5 files changed, 55 insertions(+), 117 deletions(-) diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index f7ca16a3b7c..7fefa68ebc6 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -1616,10 +1616,7 @@ func (kl *Kubelet) syncPod(pod *api.Pod, mirrorPod *api.Pod, podStatus *kubecont } } - apiPodStatus, err := kl.generatePodStatus(pod, podStatus) - if err != nil { - return err - } + apiPodStatus := kl.generatePodStatus(pod, podStatus) // Record the time it takes for the pod to become running. existingStatus, ok := kl.statusManager.GetPodStatus(pod.UID) if !ok || existingStatus.Phase == api.PodPending && apiPodStatus.Phase == api.PodRunning && @@ -1795,11 +1792,12 @@ func (kl *Kubelet) cleanupBandwidthLimits(allPods []*api.Pod) error { } status, found := kl.statusManager.GetPodStatus(pod.UID) if !found { - statusPtr, err := kl.containerRuntime.GetAPIPodStatus(pod) + // TODO(random-liu): Cleanup status get functions. (issue #20477) + s, err := kl.containerRuntime.GetPodStatus(pod.UID, pod.Name, pod.Namespace) if err != nil { return err } - status = *statusPtr + status = kl.generatePodStatus(pod, s) } if status.Phase == api.PodRunning { possibleCIDRs.Insert(fmt.Sprintf("%s/32", status.PodIP)) @@ -3088,7 +3086,7 @@ func (kl *Kubelet) getRuntimePodStatus(pod *api.Pod) (*kubecontainer.PodStatus, return kl.containerRuntime.GetPodStatus(pod.UID, pod.Name, pod.Namespace) } -func (kl *Kubelet) generatePodStatus(pod *api.Pod, podStatus *kubecontainer.PodStatus) (api.PodStatus, error) { +func (kl *Kubelet) generatePodStatus(pod *api.Pod, podStatus *kubecontainer.PodStatus) api.PodStatus { glog.V(3).Infof("Generating status for %q", format.Pod(pod)) // TODO: Consider include the container information. if kl.pastActiveDeadline(pod) { @@ -3097,7 +3095,7 @@ func (kl *Kubelet) generatePodStatus(pod *api.Pod, podStatus *kubecontainer.PodS return api.PodStatus{ Phase: api.PodFailed, Reason: reason, - Message: "Pod was active on the node longer than specified deadline"}, nil + Message: "Pod was active on the node longer than specified deadline"} } s := kl.convertStatusToAPIStatus(pod, podStatus) @@ -3120,7 +3118,7 @@ func (kl *Kubelet) generatePodStatus(pod *api.Pod, podStatus *kubecontainer.PodS } } - return *s, nil + return *s } // TODO(random-liu): Move this to some better place. diff --git a/pkg/kubelet/kubelet_test.go b/pkg/kubelet/kubelet_test.go index 6a753d03482..8a5c11d6d82 100644 --- a/pkg/kubelet/kubelet_test.go +++ b/pkg/kubelet/kubelet_test.go @@ -4118,13 +4118,13 @@ func TestDoesNotDeletePodDirsIfContainerIsRunning(t *testing.T) { } func TestCleanupBandwidthLimits(t *testing.T) { + // TODO(random-liu): We removed the test case for pod status not cached here. We should add a higher + // layer status getter function and test that function instead. tests := []struct { status *api.PodStatus pods []*api.Pod inputCIDRs []string expectResetCIDRs []string - cacheStatus bool - expectedCalls []string name string }{ { @@ -4149,35 +4149,8 @@ func TestCleanupBandwidthLimits(t *testing.T) { }, inputCIDRs: []string{"1.2.3.4/32", "2.3.4.5/32", "5.6.7.8/32"}, expectResetCIDRs: []string{"2.3.4.5/32", "5.6.7.8/32"}, - expectedCalls: []string{"GetAPIPodStatus"}, name: "pod running", }, - { - status: &api.PodStatus{ - PodIP: "1.2.3.4", - Phase: api.PodRunning, - }, - pods: []*api.Pod{ - { - ObjectMeta: api.ObjectMeta{ - Name: "foo", - Annotations: map[string]string{ - "kubernetes.io/ingress-bandwidth": "10M", - }, - }, - }, - { - ObjectMeta: api.ObjectMeta{ - Name: "bar", - }, - }, - }, - inputCIDRs: []string{"1.2.3.4/32", "2.3.4.5/32", "5.6.7.8/32"}, - expectResetCIDRs: []string{"2.3.4.5/32", "5.6.7.8/32"}, - expectedCalls: []string{}, - cacheStatus: true, - name: "pod running with cache", - }, { status: &api.PodStatus{ PodIP: "1.2.3.4", @@ -4200,7 +4173,6 @@ func TestCleanupBandwidthLimits(t *testing.T) { }, inputCIDRs: []string{"1.2.3.4/32", "2.3.4.5/32", "5.6.7.8/32"}, expectResetCIDRs: []string{"1.2.3.4/32", "2.3.4.5/32", "5.6.7.8/32"}, - expectedCalls: []string{"GetAPIPodStatus"}, name: "pod not running", }, { @@ -4208,32 +4180,6 @@ func TestCleanupBandwidthLimits(t *testing.T) { PodIP: "1.2.3.4", Phase: api.PodFailed, }, - pods: []*api.Pod{ - { - ObjectMeta: api.ObjectMeta{ - Name: "foo", - Annotations: map[string]string{ - "kubernetes.io/ingress-bandwidth": "10M", - }, - }, - }, - { - ObjectMeta: api.ObjectMeta{ - Name: "bar", - }, - }, - }, - inputCIDRs: []string{"1.2.3.4/32", "2.3.4.5/32", "5.6.7.8/32"}, - expectResetCIDRs: []string{"1.2.3.4/32", "2.3.4.5/32", "5.6.7.8/32"}, - expectedCalls: []string{}, - cacheStatus: true, - name: "pod not running with cache", - }, - { - status: &api.PodStatus{ - PodIP: "1.2.3.4", - Phase: api.PodRunning, - }, pods: []*api.Pod{ { ObjectMeta: api.ObjectMeta{ @@ -4258,12 +4204,9 @@ func TestCleanupBandwidthLimits(t *testing.T) { testKube := newTestKubelet(t) testKube.kubelet.shaper = shaper - testKube.fakeRuntime.APIPodStatus = *test.status - if test.cacheStatus { - for _, pod := range test.pods { - testKube.kubelet.statusManager.SetPodStatus(pod, *test.status) - } + for _, pod := range test.pods { + testKube.kubelet.statusManager.SetPodStatus(pod, *test.status) } err := testKube.kubelet.cleanupBandwidthLimits(test.pods) @@ -4273,14 +4216,6 @@ func TestCleanupBandwidthLimits(t *testing.T) { if !reflect.DeepEqual(shaper.ResetCIDRs, test.expectResetCIDRs) { t.Errorf("[%s]\nexpected: %v, saw: %v", test.name, test.expectResetCIDRs, shaper.ResetCIDRs) } - - if test.cacheStatus { - if len(testKube.fakeRuntime.CalledFunctions) != 0 { - t.Errorf("unexpected function calls: %v", testKube.fakeRuntime.CalledFunctions) - } - } else if !reflect.DeepEqual(testKube.fakeRuntime.CalledFunctions, test.expectedCalls) { - t.Errorf("[%s], expected %v, saw %v", test.name, test.expectedCalls, testKube.fakeRuntime.CalledFunctions) - } } } diff --git a/pkg/kubelet/lifecycle/handlers.go b/pkg/kubelet/lifecycle/handlers.go index a25b388f434..de7a765264a 100644 --- a/pkg/kubelet/lifecycle/handlers.go +++ b/pkg/kubelet/lifecycle/handlers.go @@ -25,6 +25,7 @@ import ( "k8s.io/kubernetes/pkg/api" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" + "k8s.io/kubernetes/pkg/types" "k8s.io/kubernetes/pkg/util/intstr" ) @@ -35,7 +36,7 @@ type HandlerRunner struct { } type podStatusProvider interface { - GetAPIPodStatus(pod *api.Pod) (*api.PodStatus, error) + GetPodStatus(uid types.UID, name, namespace string) (*kubecontainer.PodStatus, error) } func NewHandlerRunner(httpGetter kubetypes.HttpGetter, commandRunner kubecontainer.ContainerCommandRunner, containerManager podStatusProvider) kubecontainer.HandlerRunner { @@ -86,15 +87,15 @@ func resolvePort(portReference intstr.IntOrString, container *api.Container) (in func (hr *HandlerRunner) runHTTPHandler(pod *api.Pod, container *api.Container, handler *api.Handler) error { host := handler.HTTPGet.Host if len(host) == 0 { - status, err := hr.containerManager.GetAPIPodStatus(pod) + status, err := hr.containerManager.GetPodStatus(pod.UID, pod.Name, pod.Namespace) if err != nil { glog.Errorf("Unable to get pod info, event handlers may be invalid.") return err } - if status.PodIP == "" { + if status.IP == "" { return fmt.Errorf("failed to find networking container: %v", status) } - host = status.PodIP + host = status.IP } var port int if handler.HTTPGet.Port.Type == intstr.String && len(handler.HTTPGet.Port.StrVal) == 0 { diff --git a/pkg/kubelet/runonce.go b/pkg/kubelet/runonce.go index d1088e31061..c959dee3b2b 100644 --- a/pkg/kubelet/runonce.go +++ b/pkg/kubelet/runonce.go @@ -23,7 +23,7 @@ import ( "github.com/golang/glog" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/kubelet/container" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/kubelet/util/format" ) @@ -89,10 +89,10 @@ func (kl *Kubelet) runOnce(pods []*api.Pod, retryDelay time.Duration) (results [ results = append(results, res) if res.Err != nil { // TODO(proppy): report which containers failed the pod. - glog.Infof("failed to start pod %q: %v", res.Pod.Name, res.Err) - failedPods = append(failedPods, res.Pod.Name) + glog.Infof("failed to start pod %q: %v", format.Pod(res.Pod), res.Err) + failedPods = append(failedPods, format.Pod(res.Pod)) } else { - glog.Infof("started pod %q", res.Pod.Name) + glog.Infof("started pod %q", format.Pod(res.Pod)) } } if len(failedPods) > 0 { @@ -107,25 +107,17 @@ func (kl *Kubelet) runPod(pod *api.Pod, retryDelay time.Duration) error { delay := retryDelay retry := 0 for { - pods, err := kl.containerRuntime.GetPods(false) - if err != nil { - return fmt.Errorf("failed to get kubelet pods: %v", err) - } - p := container.Pods(pods).FindPodByID(pod.UID) - running, err := kl.isPodRunning(pod, p) - if err != nil { - return fmt.Errorf("failed to check pod status: %v", err) - } - if running { - glog.Infof("pod %q containers running", pod.Name) - return nil - } - glog.Infof("pod %q containers not running: syncing", pod.Name) - status, err := kl.containerRuntime.GetPodStatus(pod.UID, pod.Name, pod.Namespace) if err != nil { - glog.Errorf("Unable to get status for pod %q: %v", pod.Name, err) + return fmt.Errorf("Unable to get status for pod %q: %v", format.Pod(pod), err) } + + if kl.isPodRunning(pod, status) { + glog.Infof("pod %q containers running", format.Pod(pod)) + return nil + } + glog.Infof("pod %q containers not running: syncing", format.Pod(pod)) + glog.Infof("Creating a mirror pod for static pod %q", format.Pod(pod)) if err := kl.podManager.CreateMirrorPod(pod); err != nil { glog.Errorf("Failed creating a mirror pod %q: %v", format.Pod(pod), err) @@ -133,13 +125,13 @@ func (kl *Kubelet) runPod(pod *api.Pod, retryDelay time.Duration) error { mirrorPod, _ := kl.podManager.GetMirrorPodByPod(pod) if err = kl.syncPod(pod, mirrorPod, status, kubetypes.SyncPodUpdate); err != nil { - return fmt.Errorf("error syncing pod: %v", err) + return fmt.Errorf("error syncing pod %q: %v", format.Pod(pod), err) } if retry >= runOnceMaxRetries { - return fmt.Errorf("timeout error: pod %q containers not running after %d retries", pod.Name, runOnceMaxRetries) + return fmt.Errorf("timeout error: pod %q containers not running after %d retries", format.Pod(pod), runOnceMaxRetries) } // TODO(proppy): health checking would be better than waiting + checking the state at the next iteration. - glog.Infof("pod %q containers synced, waiting for %v", pod.Name, delay) + glog.Infof("pod %q containers synced, waiting for %v", format.Pod(pod), delay) time.Sleep(delay) retry++ delay *= runOnceRetryDelayBackoff @@ -147,18 +139,13 @@ func (kl *Kubelet) runPod(pod *api.Pod, retryDelay time.Duration) error { } // isPodRunning returns true if all containers of a manifest are running. -func (kl *Kubelet) isPodRunning(pod *api.Pod, runningPod container.Pod) (bool, error) { - // TODO(random-liu): Change this to new pod status - status, err := kl.containerRuntime.GetAPIPodStatus(pod) - if err != nil { - glog.Infof("Failed to get the status of pod %q: %v", format.Pod(pod), err) - return false, err - } - for _, st := range status.ContainerStatuses { - if st.State.Running == nil { - glog.Infof("Container %q not running: %#v", st.Name, st.State) - return false, nil +func (kl *Kubelet) isPodRunning(pod *api.Pod, status *kubecontainer.PodStatus) bool { + for _, c := range pod.Spec.Containers { + cs := status.FindContainerStatusByName(c.Name) + if cs == nil || cs.State != kubecontainer.ContainerStateRunning { + glog.Infof("Container %q for pod %q not running", c.Name, format.Pod(pod)) + return false } } - return true, nil + return true } diff --git a/pkg/kubelet/runonce_test.go b/pkg/kubelet/runonce_test.go index df7edb71dc8..95ac9d0be3a 100644 --- a/pkg/kubelet/runonce_test.go +++ b/pkg/kubelet/runonce_test.go @@ -31,6 +31,7 @@ import ( "k8s.io/kubernetes/pkg/kubelet/network" kubepod "k8s.io/kubernetes/pkg/kubelet/pod" "k8s.io/kubernetes/pkg/kubelet/status" + "k8s.io/kubernetes/pkg/util" utiltesting "k8s.io/kubernetes/pkg/util/testing" ) @@ -67,6 +68,8 @@ func TestRunOnce(t *testing.T) { volumeManager: newVolumeManager(), diskSpaceManager: diskSpaceManager, containerRuntime: fakeRuntime, + reasonCache: NewReasonCache(), + clock: util.RealClock{}, } kb.containerManager = cm.NewStubContainerManager() @@ -90,6 +93,20 @@ func TestRunOnce(t *testing.T) { }, } podManager.SetPods(pods) + // The original test here is totally meaningless, because fakeruntime will always return an empty podStatus. While + // the originial logic of isPodRunning happens to return true when podstatus is empty, so the test can always pass. + // Now the logic in isPodRunning is changed, to let the test pass, we set the podstatus directly in fake runtime. + // This is also a meaningless test, because the isPodRunning will also always return true after setting this. However, + // because runonce is never used in kubernetes now, we should deprioritize the cleanup work. + // TODO(random-liu) Fix the test, make it meaningful. + fakeRuntime.PodStatus = kubecontainer.PodStatus{ + ContainerStatuses: []*kubecontainer.ContainerStatus{ + { + Name: "bar", + State: kubecontainer.ContainerStateRunning, + }, + }, + } results, err := kb.runOnce(pods, time.Millisecond) if err != nil { t.Errorf("unexpected error: %v", err) From 7b4cdb6f8f2a1ffed921966130a63af1494596ed Mon Sep 17 00:00:00 2001 From: Random-Liu Date: Tue, 26 Jan 2016 17:46:15 -0800 Subject: [PATCH 074/328] Remove GetAPIPodStatus from runtime interface --- pkg/kubelet/container/fake_runtime.go | 9 - pkg/kubelet/container/runtime.go | 5 - pkg/kubelet/container/runtime_mock.go | 5 - pkg/kubelet/dockertools/fake_docker_client.go | 4 +- pkg/kubelet/dockertools/manager.go | 14 +- pkg/kubelet/dockertools/manager_test.go | 364 ++---------------- pkg/kubelet/kubelet_test.go | 2 + pkg/kubelet/rkt/rkt.go | 10 - 8 files changed, 41 insertions(+), 372 deletions(-) diff --git a/pkg/kubelet/container/fake_runtime.go b/pkg/kubelet/container/fake_runtime.go index 8a64dc959cc..3602a01405b 100644 --- a/pkg/kubelet/container/fake_runtime.go +++ b/pkg/kubelet/container/fake_runtime.go @@ -236,15 +236,6 @@ func (f *FakeRuntime) KillContainerInPod(container api.Container, pod *api.Pod) return f.Err } -func (f *FakeRuntime) GetAPIPodStatus(*api.Pod) (*api.PodStatus, error) { - f.Lock() - defer f.Unlock() - - f.CalledFunctions = append(f.CalledFunctions, "GetAPIPodStatus") - status := f.APIPodStatus - return &status, f.Err -} - func (f *FakeRuntime) GetPodStatus(uid types.UID, name, namespace string) (*PodStatus, error) { f.Lock() defer f.Unlock() diff --git a/pkg/kubelet/container/runtime.go b/pkg/kubelet/container/runtime.go index 4f3dabadbbd..5afa916df24 100644 --- a/pkg/kubelet/container/runtime.go +++ b/pkg/kubelet/container/runtime.go @@ -69,11 +69,6 @@ type Runtime interface { // KillPod kills all the containers of a pod. Pod may be nil, running pod must not be. // TODO(random-liu): Return PodSyncResult in KillPod. KillPod(pod *api.Pod, runningPod Pod) error - // GetAPIPodStatus retrieves the api.PodStatus of the pod, including the information of - // all containers in the pod. Clients of this interface assume the - // containers' statuses in a pod always have a deterministic ordering - // (e.g., sorted by name). - GetAPIPodStatus(*api.Pod) (*api.PodStatus, error) // GetPodStatus retrieves the status of the pod, including the // information of all containers in the pod that are visble in Runtime. GetPodStatus(uid types.UID, name, namespace string) (*PodStatus, error) diff --git a/pkg/kubelet/container/runtime_mock.go b/pkg/kubelet/container/runtime_mock.go index fd8eaec88eb..a4843ccca0d 100644 --- a/pkg/kubelet/container/runtime_mock.go +++ b/pkg/kubelet/container/runtime_mock.go @@ -77,11 +77,6 @@ func (r *Mock) KillContainerInPod(container api.Container, pod *api.Pod) error { return args.Error(0) } -func (r *Mock) GetAPIPodStatus(pod *api.Pod) (*api.PodStatus, error) { - args := r.Called(pod) - return args.Get(0).(*api.PodStatus), args.Error(1) -} - func (r *Mock) GetPodStatus(uid types.UID, name, namespace string) (*PodStatus, error) { args := r.Called(uid, name, namespace) return args.Get(0).(*PodStatus), args.Error(1) diff --git a/pkg/kubelet/dockertools/fake_docker_client.go b/pkg/kubelet/dockertools/fake_docker_client.go index f73eebffdee..2b7364ed9cb 100644 --- a/pkg/kubelet/dockertools/fake_docker_client.go +++ b/pkg/kubelet/dockertools/fake_docker_client.go @@ -250,7 +250,7 @@ func (f *FakeDockerClient) CreateContainer(c docker.CreateContainerOptions) (*do // Docker likes to add a '/', so copy that behavior. name := "/" + c.Name f.Created = append(f.Created, name) - // The newest container should be in front, because we assume so in GetAPIPodStatus() + // The newest container should be in front, because we assume so in GetPodStatus() f.ContainerList = append([]docker.APIContainers{ {ID: name, Names: []string{name}, Image: c.Config.Image, Labels: c.Config.Labels}, }, f.ContainerList...) @@ -300,7 +300,7 @@ func (f *FakeDockerClient) StopContainer(id string, timeout uint) error { var newList []docker.APIContainers for _, container := range f.ContainerList { if container.ID == id { - // The newest exited container should be in front. Because we assume so in GetAPIPodStatus() + // The newest exited container should be in front. Because we assume so in GetPodStatus() f.ExitedContainerList = append([]docker.APIContainers{container}, f.ExitedContainerList...) continue } diff --git a/pkg/kubelet/dockertools/manager.go b/pkg/kubelet/dockertools/manager.go index d4130f028f9..7235f89a0fc 100644 --- a/pkg/kubelet/dockertools/manager.go +++ b/pkg/kubelet/dockertools/manager.go @@ -104,8 +104,7 @@ type DockerManager struct { // means that some entries may be recycled before a pod has been // deleted. reasonCache reasonInfoCache - // TODO(yifan): Record the pull failure so we can eliminate the image checking - // in GetAPIPodStatus()? + // TODO(yifan): Record the pull failure so we can eliminate the image checking? // Lower level docker image puller. dockerPuller DockerPuller @@ -419,17 +418,6 @@ func (dm *DockerManager) inspectContainer(id string, podName, podNamespace strin return &status, "", nil } -// GetAPIPodStatus returns docker related status for all containers in the pod -// spec. -func (dm *DockerManager) GetAPIPodStatus(pod *api.Pod) (*api.PodStatus, error) { - // Get the pod status. - podStatus, err := dm.GetPodStatus(pod.UID, pod.Name, pod.Namespace) - if err != nil { - return nil, err - } - return dm.ConvertPodStatusToAPIPodStatus(pod, podStatus) -} - func (dm *DockerManager) ConvertPodStatusToAPIPodStatus(pod *api.Pod, podStatus *kubecontainer.PodStatus) (*api.PodStatus, error) { var apiPodStatus api.PodStatus uid := pod.UID diff --git a/pkg/kubelet/dockertools/manager_test.go b/pkg/kubelet/dockertools/manager_test.go index a360e978455..6c11aa66919 100644 --- a/pkg/kubelet/dockertools/manager_test.go +++ b/pkg/kubelet/dockertools/manager_test.go @@ -31,10 +31,8 @@ import ( docker "github.com/fsouza/go-dockerclient" cadvisorapi "github.com/google/cadvisor/info/v1" - "github.com/stretchr/testify/assert" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" - "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/client/record" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/network" @@ -557,7 +555,6 @@ func runSyncPod(t *testing.T, dm *DockerManager, fakeDocker *FakeDockerClient, p if backOff == nil { backOff = util.NewBackOff(time.Second, time.Minute) } - //TODO(random-liu): Add test for PodSyncResult result := dm.SyncPod(pod, *apiPodStatus, podStatus, []api.Secret{}, backOff) err = result.Error() if err != nil && !expectErr { @@ -890,65 +887,6 @@ func TestSyncPodsDoesNothing(t *testing.T) { }) } -func TestSyncPodWithPullPolicy(t *testing.T) { - dm, fakeDocker := newTestDockerManager() - puller := dm.dockerPuller.(*FakeDockerPuller) - puller.HasImages = []string{"existing_one", "want:latest"} - dm.podInfraContainerImage = "pod_infra_image" - - pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ - UID: "12345678", - Name: "foo", - Namespace: "new", - }, - Spec: api.PodSpec{ - Containers: []api.Container{ - {Name: "bar", Image: "pull_always_image", ImagePullPolicy: api.PullAlways}, - {Name: "bar2", Image: "pull_if_not_present_image", ImagePullPolicy: api.PullIfNotPresent}, - {Name: "bar3", Image: "existing_one", ImagePullPolicy: api.PullIfNotPresent}, - {Name: "bar4", Image: "want:latest", ImagePullPolicy: api.PullIfNotPresent}, - {Name: "bar5", Image: "pull_never_image", ImagePullPolicy: api.PullNever}, - }, - }, - } - - expectedStatusMap := map[string]api.ContainerState{ - "bar": {Running: &api.ContainerStateRunning{unversioned.Now()}}, - "bar2": {Running: &api.ContainerStateRunning{unversioned.Now()}}, - "bar3": {Running: &api.ContainerStateRunning{unversioned.Now()}}, - "bar4": {Running: &api.ContainerStateRunning{unversioned.Now()}}, - "bar5": {Waiting: &api.ContainerStateWaiting{Reason: kubecontainer.ErrImageNeverPull.Error(), - Message: "Container image \"pull_never_image\" is not present with pull policy of Never"}}, - } - - runSyncPod(t, dm, fakeDocker, pod, nil, true) - statuses, err := dm.GetAPIPodStatus(pod) - if err != nil { - t.Errorf("unable to get pod status") - } - for _, c := range pod.Spec.Containers { - if containerStatus, ok := api.GetContainerStatus(statuses.ContainerStatuses, c.Name); ok { - // copy the StartedAt time, to make the structs match - if containerStatus.State.Running != nil && expectedStatusMap[c.Name].Running != nil { - expectedStatusMap[c.Name].Running.StartedAt = containerStatus.State.Running.StartedAt - } - assert.Equal(t, expectedStatusMap[c.Name], containerStatus.State, "for container %s", c.Name) - } - } - - fakeDocker.Lock() - defer fakeDocker.Unlock() - - pulledImageSorted := puller.ImagesPulled[:] - sort.Strings(pulledImageSorted) - assert.Equal(t, []string{"pod_infra_image", "pull_always_image", "pull_if_not_present_image"}, pulledImageSorted) - - if len(fakeDocker.Created) != 5 { - t.Errorf("Unexpected containers created %v", fakeDocker.Created) - } -} - func TestSyncPodWithRestartPolicy(t *testing.T) { dm, fakeDocker := newTestDockerManager() containers := []api.Container{ @@ -1053,112 +991,6 @@ func TestSyncPodWithRestartPolicy(t *testing.T) { } } -func TestGetAPIPodStatusWithLastTermination(t *testing.T) { - dm, fakeDocker := newTestDockerManager() - containers := []api.Container{ - {Name: "succeeded"}, - {Name: "failed"}, - } - - pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ - UID: "12345678", - Name: "foo", - Namespace: "new", - }, - Spec: api.PodSpec{ - Containers: containers, - }, - } - - dockerContainers := []*docker.Container{ - { - ID: "9876", - Name: "/k8s_POD." + strconv.FormatUint(generatePodInfraContainerHash(pod), 16) + "_foo_new_12345678_0", - State: docker.State{ - StartedAt: time.Now(), - FinishedAt: time.Now(), - Running: true, - }, - }, - { - ID: "1234", - Name: "/k8s_succeeded." + strconv.FormatUint(kubecontainer.HashContainer(&containers[0]), 16) + "_foo_new_12345678_0", - State: docker.State{ - ExitCode: 0, - StartedAt: time.Now(), - FinishedAt: time.Now(), - }, - }, - { - ID: "5678", - Name: "/k8s_failed." + strconv.FormatUint(kubecontainer.HashContainer(&containers[1]), 16) + "_foo_new_12345678_0", - State: docker.State{ - ExitCode: 42, - StartedAt: time.Now(), - FinishedAt: time.Now(), - }, - }, - } - - tests := []struct { - policy api.RestartPolicy - created []string - stopped []string - lastTerminations []string - }{ - { - api.RestartPolicyAlways, - []string{"succeeded", "failed"}, - []string{}, - []string{"docker://1234", "docker://5678"}, - }, - { - api.RestartPolicyOnFailure, - []string{"failed"}, - []string{}, - []string{"docker://5678"}, - }, - { - api.RestartPolicyNever, - []string{}, - []string{"9876"}, - []string{}, - }, - } - - for i, tt := range tests { - fakeDocker.SetFakeContainers(dockerContainers) - fakeDocker.ClearCalls() - pod.Spec.RestartPolicy = tt.policy - runSyncPod(t, dm, fakeDocker, pod, nil, false) - - // Check if we can retrieve the pod status. - status, err := dm.GetAPIPodStatus(pod) - if err != nil { - t.Fatalf("unexpected error %v", err) - } - terminatedContainers := []string{} - for _, cs := range status.ContainerStatuses { - if cs.LastTerminationState.Terminated != nil { - terminatedContainers = append(terminatedContainers, cs.LastTerminationState.Terminated.ContainerID) - } - } - sort.StringSlice(terminatedContainers).Sort() - sort.StringSlice(tt.lastTerminations).Sort() - if !reflect.DeepEqual(terminatedContainers, tt.lastTerminations) { - t.Errorf("Expected(sorted): %#v, Actual(sorted): %#v", tt.lastTerminations, terminatedContainers) - } - - if err := fakeDocker.AssertCreated(tt.created); err != nil { - t.Errorf("%d: %v", i, err) - } - if err := fakeDocker.AssertStopped(tt.stopped); err != nil { - t.Errorf("%d: %v", i, err) - } - } -} - func TestSyncPodBackoff(t *testing.T) { var fakeClock = &util.FakeClock{Time: time.Now()} startTime := fakeClock.Now() @@ -1248,101 +1080,10 @@ func TestSyncPodBackoff(t *testing.T) { } } } -func TestGetPodCreationFailureReason(t *testing.T) { - dm, fakeDocker := newTestDockerManager() - // Inject the creation failure error to docker. - failureReason := "RunContainerError" - fakeDocker.Errors = map[string]error{ - "create": fmt.Errorf("%s", failureReason), - } - - pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ - UID: "12345678", - Name: "foo", - Namespace: "new", - }, - Spec: api.PodSpec{ - Containers: []api.Container{{Name: "bar"}}, - }, - } - - // Pretend that the pod infra container has already been created, so that - // we can run the user containers. - fakeDocker.SetFakeRunningContainers([]*docker.Container{{ - ID: "9876", - Name: "/k8s_POD." + strconv.FormatUint(generatePodInfraContainerHash(pod), 16) + "_foo_new_12345678_0", - }}) - - runSyncPod(t, dm, fakeDocker, pod, nil, true) - // Check if we can retrieve the pod status. - status, err := dm.GetAPIPodStatus(pod) - if err != nil { - t.Fatalf("unexpected error %v", err) - } - - if len(status.ContainerStatuses) < 1 { - t.Errorf("expected 1 container status, got %d", len(status.ContainerStatuses)) - } else { - state := status.ContainerStatuses[0].State - if state.Waiting == nil { - t.Errorf("expected waiting state, got %#v", state) - } else if state.Waiting.Reason != failureReason { - t.Errorf("expected reason %q, got %q", failureReason, state.Waiting.Reason) - } - } -} - -func TestGetPodPullImageFailureReason(t *testing.T) { - dm, fakeDocker := newTestDockerManager() - // Initialize the FakeDockerPuller so that it'd try to pull non-existent - // images. - puller := dm.dockerPuller.(*FakeDockerPuller) - puller.HasImages = []string{} - // Inject the pull image failure error. - failureReason := kubecontainer.ErrImagePull.Error() - puller.ErrorsToInject = []error{fmt.Errorf("%s", failureReason)} - - pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ - UID: "12345678", - Name: "foo", - Namespace: "new", - }, - Spec: api.PodSpec{ - Containers: []api.Container{{Name: "bar", Image: "realImage", ImagePullPolicy: api.PullAlways}}, - }, - } - // Pretend that the pod infra container has already been created, so that - // we can run the user containers. - fakeDocker.SetFakeRunningContainers([]*docker.Container{{ - ID: "9876", - Name: "/k8s_POD." + strconv.FormatUint(generatePodInfraContainerHash(pod), 16) + "_foo_new_12345678_0", - }}) - runSyncPod(t, dm, fakeDocker, pod, nil, true) - // Check if we can retrieve the pod status. - status, err := dm.GetAPIPodStatus(pod) - if err != nil { - t.Fatalf("unexpected error %v", err) - } - - if len(status.ContainerStatuses) < 1 { - t.Errorf("expected 1 container status, got %d", len(status.ContainerStatuses)) - } else { - state := status.ContainerStatuses[0].State - if state.Waiting == nil { - t.Errorf("expected waiting state, got %#v", state) - } else if state.Waiting.Reason != failureReason { - t.Errorf("expected reason %q, got %q", failureReason, state.Waiting.Reason) - } - } -} func TestGetRestartCount(t *testing.T) { dm, fakeDocker := newTestDockerManager() - containers := []api.Container{ - {Name: "bar"}, - } + containerName := "bar" pod := api.Pod{ ObjectMeta: api.ObjectMeta{ UID: "12345678", @@ -1350,67 +1091,83 @@ func TestGetRestartCount(t *testing.T) { Namespace: "new", }, Spec: api.PodSpec{ - Containers: containers, + Containers: []api.Container{ + {Name: containerName}, + }, RestartPolicy: "Always", }, + Status: api.PodStatus{ + ContainerStatuses: []api.ContainerStatus{ + { + Name: containerName, + RestartCount: 3, + }, + }, + }, } // Helper function for verifying the restart count. - verifyRestartCount := func(pod *api.Pod, expectedCount int) api.PodStatus { + verifyRestartCount := func(pod *api.Pod, expectedCount int) { runSyncPod(t, dm, fakeDocker, pod, nil, false) - status, err := dm.GetAPIPodStatus(pod) + status, err := dm.GetPodStatus(pod.UID, pod.Name, pod.Namespace) if err != nil { t.Fatalf("Unexpected error %v", err) } - restartCount := status.ContainerStatuses[0].RestartCount + cs := status.FindContainerStatusByName(containerName) + if cs == nil { + t.Fatal("Can't find status for container %q", containerName) + } + restartCount := cs.RestartCount if restartCount != expectedCount { t.Errorf("expected %d restart count, got %d", expectedCount, restartCount) } - return *status } killOneContainer := func(pod *api.Pod) { - status, err := dm.GetAPIPodStatus(pod) + status, err := dm.GetPodStatus(pod.UID, pod.Name, pod.Namespace) if err != nil { t.Fatalf("Unexpected error %v", err) } - containerID := kubecontainer.ParseContainerID(status.ContainerStatuses[0].ContainerID) - dm.KillContainerInPod(containerID, &pod.Spec.Containers[0], pod, "test container restart count.") + cs := status.FindContainerStatusByName(containerName) + if cs == nil { + t.Fatal("Can't find status for container %q", containerName) + } + dm.KillContainerInPod(cs.ID, &pod.Spec.Containers[0], pod, "test container restart count.") } // Container "bar" starts the first time. // TODO: container lists are expected to be sorted reversely by time. // We should fix FakeDockerClient to sort the list before returning. // (randome-liu) Just partially sorted now. - pod.Status = verifyRestartCount(&pod, 0) + verifyRestartCount(&pod, 0) killOneContainer(&pod) // Poor container "bar" has been killed, and should be restarted with restart count 1 - pod.Status = verifyRestartCount(&pod, 1) + verifyRestartCount(&pod, 1) killOneContainer(&pod) // Poor container "bar" has been killed again, and should be restarted with restart count 2 - pod.Status = verifyRestartCount(&pod, 2) + verifyRestartCount(&pod, 2) killOneContainer(&pod) // Poor container "bar" has been killed again ang again, and should be restarted with restart count 3 - pod.Status = verifyRestartCount(&pod, 3) + verifyRestartCount(&pod, 3) // The oldest container has been garbage collected exitedContainers := fakeDocker.ExitedContainerList fakeDocker.ExitedContainerList = exitedContainers[:len(exitedContainers)-1] - pod.Status = verifyRestartCount(&pod, 3) + verifyRestartCount(&pod, 3) // The last two oldest containers have been garbage collected fakeDocker.ExitedContainerList = exitedContainers[:len(exitedContainers)-2] - pod.Status = verifyRestartCount(&pod, 3) + verifyRestartCount(&pod, 3) - // All exited containers have been garbage collected + // All exited containers have been garbage collected, restart count should be got from old api pod status fakeDocker.ExitedContainerList = []docker.APIContainers{} - pod.Status = verifyRestartCount(&pod, 3) + verifyRestartCount(&pod, 3) killOneContainer(&pod) // Poor container "bar" has been killed again ang again and again, and should be restarted with restart count 4 - pod.Status = verifyRestartCount(&pod, 4) + verifyRestartCount(&pod, 4) } func TestGetTerminationMessagePath(t *testing.T) { @@ -1681,57 +1438,6 @@ func TestSyncPodWithHostNetwork(t *testing.T) { } } -func TestGetAPIPodStatusSortedContainers(t *testing.T) { - dm, fakeDocker := newTestDockerManager() - specContainerList := []api.Container{} - expectedOrder := []string{} - - numContainers := 10 - podName := "foo" - podNs := "test" - podUID := "uid1" - fakeConfig := &docker.Config{ - Image: "some:latest", - } - - dockerContainers := []*docker.Container{} - for i := 0; i < numContainers; i++ { - id := fmt.Sprintf("%v", i) - containerName := fmt.Sprintf("%vcontainer", id) - expectedOrder = append(expectedOrder, containerName) - dockerContainers = append(dockerContainers, &docker.Container{ - ID: id, - Name: fmt.Sprintf("/k8s_%v_%v_%v_%v_42", containerName, podName, podNs, podUID), - Config: fakeConfig, - Image: fmt.Sprintf("%vimageid", id), - }) - specContainerList = append(specContainerList, api.Container{Name: containerName}) - } - fakeDocker.SetFakeRunningContainers(dockerContainers) - fakeDocker.ClearCalls() - pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ - UID: types.UID(podUID), - Name: podName, - Namespace: podNs, - }, - Spec: api.PodSpec{ - Containers: specContainerList, - }, - } - for i := 0; i < 5; i++ { - status, err := dm.GetAPIPodStatus(pod) - if err != nil { - t.Fatalf("unexpected error %v", err) - } - for i, c := range status.ContainerStatuses { - if expectedOrder[i] != c.Name { - t.Fatalf("Container status not sorted, expected %v at index %d, but found %v", expectedOrder[i], i, c.Name) - } - } - } -} - func TestVerifyNonRoot(t *testing.T) { dm, fakeDocker := newTestDockerManager() @@ -1893,3 +1599,5 @@ func TestGetIPCMode(t *testing.T) { t.Errorf("expected host ipc mode for pod but got %v", ipcMode) } } + +// TODO(random-liu): Add unit test for returned PodSyncResult (issue #20478) diff --git a/pkg/kubelet/kubelet_test.go b/pkg/kubelet/kubelet_test.go index 8a5c11d6d82..ac3bb8e84db 100644 --- a/pkg/kubelet/kubelet_test.go +++ b/pkg/kubelet/kubelet_test.go @@ -4348,3 +4348,5 @@ func TestGetPodsToSync(t *testing.T) { t.Errorf("expected %d pods to sync, got %d", 3, len(podsToSync)) } } + +// TODO(random-liu): Add unit test for convertStatusToAPIStatus (issue #20478) diff --git a/pkg/kubelet/rkt/rkt.go b/pkg/kubelet/rkt/rkt.go index fa9f6004722..98d3fd070ea 100644 --- a/pkg/kubelet/rkt/rkt.go +++ b/pkg/kubelet/rkt/rkt.go @@ -1009,16 +1009,6 @@ func (r *Runtime) KillPod(pod *api.Pod, runningPod kubecontainer.Pod) error { return nil } -// GetAPIPodStatus returns the status of the given pod. -func (r *Runtime) GetAPIPodStatus(pod *api.Pod) (*api.PodStatus, error) { - // Get the pod status. - podStatus, err := r.GetPodStatus(pod.UID, pod.Name, pod.Namespace) - if err != nil { - return nil, err - } - return r.ConvertPodStatusToAPIPodStatus(pod, podStatus) -} - func (r *Runtime) Type() string { return RktType } From 2aa28c65538393ecacf56ffb126361fca457a588 Mon Sep 17 00:00:00 2001 From: nikhiljindal Date: Tue, 2 Feb 2016 13:03:49 -0800 Subject: [PATCH 075/328] Adding test for apiserver example --- examples/apiserver/README.md | 6 + .../apiserver/{server.go => apiserver.go} | 8 +- examples/apiserver/apiserver_test.go | 104 ++++++++++++++++++ examples/apiserver/server/main.go | 25 +++++ pkg/genericapiserver/genericapiserver.go | 3 + pkg/genericapiserver/genericapiserver_test.go | 1 + 6 files changed, 145 insertions(+), 2 deletions(-) rename examples/apiserver/{server.go => apiserver.go} (94%) create mode 100644 examples/apiserver/apiserver_test.go create mode 100644 examples/apiserver/server/main.go diff --git a/examples/apiserver/README.md b/examples/apiserver/README.md index 522544984f8..d493f7fbdea 100644 --- a/examples/apiserver/README.md +++ b/examples/apiserver/README.md @@ -39,6 +39,12 @@ API objects. Some relevant issues: This code here is to examplify what it takes to write your own API server. +To start this example api server, run: + +``` +$ go run examples/apiserver/server/main.go +``` + [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/examples/apiserver/README.md?pixel)]() diff --git a/examples/apiserver/server.go b/examples/apiserver/apiserver.go similarity index 94% rename from examples/apiserver/server.go rename to examples/apiserver/apiserver.go index cd565e43a3c..9a61528f75f 100644 --- a/examples/apiserver/server.go +++ b/examples/apiserver/apiserver.go @@ -14,12 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package apiserver import ( "github.com/golang/glog" "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testdata/apis/testgroup/v1" testgroupetcd "k8s.io/kubernetes/examples/apiserver/rest" + "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/rest" "k8s.io/kubernetes/pkg/apimachinery" "k8s.io/kubernetes/pkg/apimachinery/registered" @@ -44,11 +45,12 @@ func newStorageDestinations(groupName string, groupMeta *apimachinery.GroupMeta) return &storageDestinations, nil } -func main() { +func Run() { config := genericapiserver.Config{ EnableIndex: true, APIPrefix: "/api", APIGroupPrefix: "/apis", + Serializer: api.Codecs, } s := genericapiserver.New(&config) @@ -70,6 +72,8 @@ func main() { VersionedResourcesStorageMap: map[string]map[string]rest.Storage{ groupVersion.Version: restStorageMap, }, + Scheme: api.Scheme, + NegotiatedSerializer: api.Codecs, } if err := s.InstallAPIGroups([]genericapiserver.APIGroupInfo{apiGroupInfo}); err != nil { glog.Fatalf("Error in installing API: %v", err) diff --git a/examples/apiserver/apiserver_test.go b/examples/apiserver/apiserver_test.go new file mode 100644 index 00000000000..134e356987e --- /dev/null +++ b/examples/apiserver/apiserver_test.go @@ -0,0 +1,104 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +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 apiserver + +import ( + "encoding/json" + "fmt" + "io/ioutil" + "net/http" + "testing" + "time" + + "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testdata/apis/testgroup/v1" + + "github.com/stretchr/testify/assert" + "k8s.io/kubernetes/pkg/api/unversioned" +) + +var serverIP = "http://localhost:8080" + +var groupVersion = v1.SchemeGroupVersion + +func TestRun(t *testing.T) { + go Run() + if err := waitForApiserverUp(); err != nil { + t.Fatalf("%v", err) + } + testAPIGroup(t) + testAPIResourceList(t) +} + +func waitForApiserverUp() error { + for start := time.Now(); time.Since(start) < time.Minute; time.Sleep(5 * time.Second) { + _, err := http.Get(serverIP) + if err == nil { + return nil + } + } + return fmt.Errorf("waiting for apiserver timed out") +} + +func readResponse(serverURL string) ([]byte, error) { + response, err := http.Get(serverURL) + if err != nil { + return nil, fmt.Errorf("Error in fetching %s: %v", serverURL, err) + } + defer response.Body.Close() + contents, err := ioutil.ReadAll(response.Body) + if err != nil { + return nil, fmt.Errorf("Error reading response from %s: %v", serverURL, err) + } + return contents, nil +} + +func testAPIGroup(t *testing.T) { + serverURL := serverIP + "/apis/testgroup" + contents, err := readResponse(serverURL) + if err != nil { + t.Fatalf("%v", err) + } + var apiGroup unversioned.APIGroup + err = json.Unmarshal(contents, &apiGroup) + if err != nil { + t.Fatalf("Error in unmarshalling response from server %s: %v", serverURL, err) + } + assert.Equal(t, apiGroup.APIVersion, groupVersion.Version) + assert.Equal(t, apiGroup.Name, groupVersion.Group) + assert.Equal(t, 1, len(apiGroup.Versions)) + assert.Equal(t, apiGroup.Versions[0].GroupVersion, groupVersion.String()) + assert.Equal(t, apiGroup.Versions[0].Version, groupVersion.Version) + assert.Equal(t, apiGroup.Versions[0], apiGroup.PreferredVersion) +} + +func testAPIResourceList(t *testing.T) { + serverURL := serverIP + "/apis/testgroup/v1" + contents, err := readResponse(serverURL) + if err != nil { + t.Fatalf("%v", err) + } + var apiResourceList unversioned.APIResourceList + err = json.Unmarshal(contents, &apiResourceList) + if err != nil { + t.Fatalf("Error in unmarshalling response from server %s: %v", serverURL, err) + } + assert.Equal(t, apiResourceList.APIVersion, groupVersion.Version) + assert.Equal(t, apiResourceList.GroupVersion, groupVersion.String()) + assert.Equal(t, 1, len(apiResourceList.APIResources)) + assert.Equal(t, apiResourceList.APIResources[0].Name, "testtypes") + assert.True(t, apiResourceList.APIResources[0].Namespaced) +} diff --git a/examples/apiserver/server/main.go b/examples/apiserver/server/main.go new file mode 100644 index 00000000000..19961442fc5 --- /dev/null +++ b/examples/apiserver/server/main.go @@ -0,0 +1,25 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +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 main + +import ( + "k8s.io/kubernetes/examples/apiserver" +) + +func main() { + apiserver.Run() +} diff --git a/pkg/genericapiserver/genericapiserver.go b/pkg/genericapiserver/genericapiserver.go index 538094b2153..d80893b49c7 100644 --- a/pkg/genericapiserver/genericapiserver.go +++ b/pkg/genericapiserver/genericapiserver.go @@ -379,6 +379,9 @@ func setDefaults(c *Config) { // auth, then the caller should create a handler for those endpoints, which delegates the // any unhandled paths to "Handler". func New(c *Config) *GenericAPIServer { + if c.Serializer == nil { + glog.Fatalf("Genericapiserver.New() called with config.Serializer == nil") + } setDefaults(c) s := &GenericAPIServer{ diff --git a/pkg/genericapiserver/genericapiserver_test.go b/pkg/genericapiserver/genericapiserver_test.go index be22c99e342..e21ddcc95a4 100644 --- a/pkg/genericapiserver/genericapiserver_test.go +++ b/pkg/genericapiserver/genericapiserver_test.go @@ -54,6 +54,7 @@ func TestNew(t *testing.T) { config.ProxyDialer = func(network, addr string) (net.Conn, error) { return nil, nil } config.ProxyTLSClientConfig = &tls.Config{} + config.Serializer = api.Codecs s := New(&config) From d6c422547e4cd8bd681a414903b9e10bf52b9be8 Mon Sep 17 00:00:00 2001 From: Joe Finney Date: Tue, 2 Feb 2016 16:05:41 -0800 Subject: [PATCH 076/328] Add AWS Jenkins jobs to source control. --- hack/jenkins/job-configs/global.yaml | 1 + hack/jenkins/job-configs/kubernetes-e2e.yaml | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/hack/jenkins/job-configs/global.yaml b/hack/jenkins/job-configs/global.yaml index 6a04d685291..8e363916344 100644 --- a/hack/jenkins/job-configs/global.yaml +++ b/hack/jenkins/job-configs/global.yaml @@ -62,3 +62,4 @@ - defaults: name: global emails: '$DEFAULT_RECIPIENTS' + cron-string: 'H/30 * * * *' diff --git a/hack/jenkins/job-configs/kubernetes-e2e.yaml b/hack/jenkins/job-configs/kubernetes-e2e.yaml index 37c31b13fe2..950628061c5 100644 --- a/hack/jenkins/job-configs/kubernetes-e2e.yaml +++ b/hack/jenkins/job-configs/kubernetes-e2e.yaml @@ -20,7 +20,7 @@ - reverse: jobs: '{trigger-job}' result: success - - timed: 'H/30 * * * *' + - timed: '{cron-string}' wrappers: - ansicolor: colormap: xterm @@ -191,3 +191,21 @@ test-owner: 'ihmccreery' jobs: - 'kubernetes-e2e-{suffix}' + +- project: + name: kubernetes-aws + test-owner: 'bburns' + emails: 'bburns@google.com' + cron-string: '@daily' + trigger-job: '' + suffix: + - 'aws': + description: 'Run e2e tests on AWS using the latest successful Kubernetes build.' + timeout: 240 + branch: 'master' + - 'aws-release-1.1': + description: 'Run e2e tests on AWS using the latest successful 1.1 Kubernetes build.' + timeout: 240 + branch: 'release-1.1' + jobs: + - 'kubernetes-e2e-{suffix}' From 66f5cd259d40873d7d4a43b6a0e3ef713c1fb17e Mon Sep 17 00:00:00 2001 From: Chao Xu Date: Tue, 2 Feb 2016 14:06:58 -0800 Subject: [PATCH 077/328] automatically generate the clientset --- .../client-gen/generators/client-generator.go | 3 + .../generators/fake/fake-client-generator.go | 30 ++++++ .../fake/generator-fake-for-clientset.go | 97 +++++++++++++++++++ .../generators/generator-for-clientset.go | 40 +++----- .../generators/normalization/normalization.go | 31 ++++++ pkg/client/testing/fake/clientset.go | 12 --- .../testing/fake/clientset_generated.go | 34 +++++++ 7 files changed, 208 insertions(+), 39 deletions(-) create mode 100644 cmd/libs/go2idl/client-gen/generators/fake/generator-fake-for-clientset.go create mode 100644 cmd/libs/go2idl/client-gen/generators/normalization/normalization.go create mode 100644 pkg/client/testing/fake/clientset_generated.go diff --git a/cmd/libs/go2idl/client-gen/generators/client-generator.go b/cmd/libs/go2idl/client-gen/generators/client-generator.go index a94e591dfe0..edaea3da166 100644 --- a/cmd/libs/go2idl/client-gen/generators/client-generator.go +++ b/cmd/libs/go2idl/client-gen/generators/client-generator.go @@ -193,6 +193,9 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat var packageList []generator.Package packageList = append(packageList, packageForClientset(customArgs, arguments.OutputPackagePath, boilerplate)) + if customArgs.FakeClient { + packageList = append(packageList, fake.PackageForClientset(arguments.OutputPackagePath, customArgs.GroupVersions, boilerplate)) + } // If --clientset-only=true, we don't regenerate the individual typed clients. if customArgs.ClientsetOnly { diff --git a/cmd/libs/go2idl/client-gen/generators/fake/fake-client-generator.go b/cmd/libs/go2idl/client-gen/generators/fake/fake-client-generator.go index 1a95eb86bbc..b71081877fa 100644 --- a/cmd/libs/go2idl/client-gen/generators/fake/fake-client-generator.go +++ b/cmd/libs/go2idl/client-gen/generators/fake/fake-client-generator.go @@ -22,6 +22,7 @@ import ( "k8s.io/kubernetes/cmd/libs/go2idl/generator" "k8s.io/kubernetes/cmd/libs/go2idl/types" + "k8s.io/kubernetes/pkg/api/unversioned" ) func PackageForGroup(group string, version string, typeList []*types.Type, packageBasePath string, srcTreePath string, boilerplate []byte) generator.Package { @@ -73,3 +74,32 @@ func PackageForGroup(group string, version string, typeList []*types.Type, packa }, } } + +func PackageForClientset(typedClientBasePath string, groupVersions []unversioned.GroupVersion, boilerplate []byte) generator.Package { + return &generator.DefaultPackage{ + // TODO: we'll generate fake clientset for different release in the future. + // Package name and path are hard coded for now. + PackageName: "fake", + PackagePath: "k8s.io/kubernetes/pkg/client/testing/fake", + HeaderText: boilerplate, + PackageDocumentation: []byte( + `// This package has the automatically generated fake clientset. +`), + // GeneratorFunc returns a list of generators. Each generator generates a + // single file. + GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { + generators = []generator.Generator{ + &genClientset{ + DefaultGen: generator.DefaultGen{ + OptionalName: "clientset_generated", + }, + groupVersions: groupVersions, + typedClientPath: typedClientBasePath, + outputPackage: "fake", + imports: generator.NewImportTracker(), + }, + } + return generators + }, + } +} diff --git a/cmd/libs/go2idl/client-gen/generators/fake/generator-fake-for-clientset.go b/cmd/libs/go2idl/client-gen/generators/fake/generator-fake-for-clientset.go new file mode 100644 index 00000000000..94e453a042d --- /dev/null +++ b/cmd/libs/go2idl/client-gen/generators/fake/generator-fake-for-clientset.go @@ -0,0 +1,97 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +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 fake + +import ( + "fmt" + "io" + "path/filepath" + + "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/generators/normalization" + "k8s.io/kubernetes/cmd/libs/go2idl/generator" + "k8s.io/kubernetes/cmd/libs/go2idl/namer" + "k8s.io/kubernetes/cmd/libs/go2idl/types" + "k8s.io/kubernetes/pkg/api/unversioned" +) + +// genClientset generates a package for a clientset. +type genClientset struct { + generator.DefaultGen + groupVersions []unversioned.GroupVersion + typedClientPath string + outputPackage string + imports *generator.ImportTracker + clientsetGenerated bool +} + +var _ generator.Generator = &genClientset{} + +func (g *genClientset) Namers(c *generator.Context) namer.NameSystems { + return namer.NameSystems{ + "raw": namer.NewRawNamer(g.outputPackage, g.imports), + } +} + +// We only want to call GenerateType() once. +func (g *genClientset) Filter(c *generator.Context, t *types.Type) bool { + ret := !g.clientsetGenerated + g.clientsetGenerated = true + return ret +} + +func (g *genClientset) Imports(c *generator.Context) (imports []string) { + imports = append(imports, g.imports.ImportLines()...) + for _, gv := range g.groupVersions { + group := normalization.Group(gv.Group) + version := normalization.Version(gv.Version) + typedClientPath := filepath.Join(g.typedClientPath, group, version) + imports = append(imports, fmt.Sprintf("%s_%s \"%s\"", group, version, typedClientPath)) + fakeTypedClientPath := filepath.Join(typedClientPath, "fake") + imports = append(imports, fmt.Sprintf("%s_%s_fake \"%s\"", group, version, fakeTypedClientPath)) + } + return +} + +func (g *genClientset) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error { + // TODO: We actually don't need any type information to generate the clientset, + // perhaps we can adapt the go2ild framework to this kind of usage. + sw := generator.NewSnippetWriter(w, c, "$", "$") + + type arg struct { + Group string + PackageName string + } + allGroups := []arg{} + for _, gv := range g.groupVersions { + group := normalization.Group(gv.Group) + version := normalization.Version(gv.Version) + allGroups = append(allGroups, arg{namer.IC(group), group + "_" + version}) + } + + for _, g := range allGroups { + sw.Do(clientsetInterfaceImplTemplate, g) + } + + return sw.Error() +} + +var clientsetInterfaceImplTemplate = ` +// $.Group$ retrieves the $.Group$Client +func (c *Clientset) $.Group$() $.PackageName$.$.Group$Interface { + return &$.PackageName$_fake.Fake$.Group${&c.Fake} +} +` diff --git a/cmd/libs/go2idl/client-gen/generators/generator-for-clientset.go b/cmd/libs/go2idl/client-gen/generators/generator-for-clientset.go index 8641570f199..6be068d3bf8 100644 --- a/cmd/libs/go2idl/client-gen/generators/generator-for-clientset.go +++ b/cmd/libs/go2idl/client-gen/generators/generator-for-clientset.go @@ -21,6 +21,7 @@ import ( "io" "path/filepath" + "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/generators/normalization" "k8s.io/kubernetes/cmd/libs/go2idl/generator" "k8s.io/kubernetes/cmd/libs/go2idl/namer" "k8s.io/kubernetes/cmd/libs/go2idl/types" @@ -30,10 +31,11 @@ import ( // genClientset generates a package for a clientset. type genClientset struct { generator.DefaultGen - groupVersions []unversioned.GroupVersion - typedClientPath string - outputPackage string - imports *generator.ImportTracker + groupVersions []unversioned.GroupVersion + typedClientPath string + outputPackage string + imports *generator.ImportTracker + clientsetGenerated bool } var _ generator.Generator = &genClientset{} @@ -44,35 +46,19 @@ func (g *genClientset) Namers(c *generator.Context) namer.NameSystems { } } -var generate_clientset = true - // We only want to call GenerateType() once. func (g *genClientset) Filter(c *generator.Context, t *types.Type) bool { - ret := generate_clientset - generate_clientset = false + ret := !g.clientsetGenerated + g.clientsetGenerated = true return ret } -func normalizeGroup(group string) string { - if group == "api" { - return "legacy" - } - return group -} - -func normalizeVersion(version string) string { - if version == "" { - return "unversioned" - } - return version -} - func (g *genClientset) Imports(c *generator.Context) (imports []string) { + imports = append(imports, g.imports.ImportLines()...) for _, gv := range g.groupVersions { - group := normalizeGroup(gv.Group) - version := normalizeVersion(gv.Version) + group := normalization.Group(gv.Group) + version := normalization.Version(gv.Version) typedClientPath := filepath.Join(g.typedClientPath, group, version) - imports = append(imports, g.imports.ImportLines()...) imports = append(imports, fmt.Sprintf("%s_%s \"%s\"", group, version, typedClientPath)) } return @@ -91,8 +77,8 @@ func (g *genClientset) GenerateType(c *generator.Context, t *types.Type, w io.Wr allGroups := []arg{} for _, gv := range g.groupVersions { - group := normalizeGroup(gv.Group) - version := normalizeVersion(gv.Version) + group := normalization.Group(gv.Group) + version := normalization.Version(gv.Version) allGroups = append(allGroups, arg{namer.IC(group), group + "_" + version}) } diff --git a/cmd/libs/go2idl/client-gen/generators/normalization/normalization.go b/cmd/libs/go2idl/client-gen/generators/normalization/normalization.go new file mode 100644 index 00000000000..686407208a2 --- /dev/null +++ b/cmd/libs/go2idl/client-gen/generators/normalization/normalization.go @@ -0,0 +1,31 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +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 normalization + +func Group(group string) string { + if group == "api" { + return "legacy" + } + return group +} + +func Version(version string) string { + if version == "" { + return "unversioned" + } + return version +} diff --git a/pkg/client/testing/fake/clientset.go b/pkg/client/testing/fake/clientset.go index b2b3a37b888..db509c25178 100644 --- a/pkg/client/testing/fake/clientset.go +++ b/pkg/client/testing/fake/clientset.go @@ -20,10 +20,6 @@ import ( "k8s.io/kubernetes/pkg/api" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" "k8s.io/kubernetes/pkg/client/testing/core" - extensions_unversioned "k8s.io/kubernetes/pkg/client/typed/generated/extensions/unversioned" - extensions_unversioned_fake "k8s.io/kubernetes/pkg/client/typed/generated/extensions/unversioned/fake" - legacy_unversioned "k8s.io/kubernetes/pkg/client/typed/generated/legacy/unversioned" - legacy_unversioned_fake "k8s.io/kubernetes/pkg/client/typed/generated/legacy/unversioned/fake" "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/runtime" "k8s.io/kubernetes/pkg/watch" @@ -55,14 +51,6 @@ type Clientset struct { var _ clientset.Interface = &Clientset{} -func (c *Clientset) Legacy() legacy_unversioned.LegacyInterface { - return &legacy_unversioned_fake.FakeLegacy{&c.Fake} -} - -func (c *Clientset) Extensions() extensions_unversioned.ExtensionsInterface { - return &extensions_unversioned_fake.FakeExtensions{&c.Fake} -} - func (c *Clientset) Discovery() unversioned.DiscoveryInterface { return &FakeDiscovery{&c.Fake} } diff --git a/pkg/client/testing/fake/clientset_generated.go b/pkg/client/testing/fake/clientset_generated.go new file mode 100644 index 00000000000..e3e73bdd9d8 --- /dev/null +++ b/pkg/client/testing/fake/clientset_generated.go @@ -0,0 +1,34 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +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 fake + +import ( + extensions_unversioned "k8s.io/kubernetes/pkg/client/typed/generated/extensions/unversioned" + extensions_unversioned_fake "k8s.io/kubernetes/pkg/client/typed/generated/extensions/unversioned/fake" + legacy_unversioned "k8s.io/kubernetes/pkg/client/typed/generated/legacy/unversioned" + legacy_unversioned_fake "k8s.io/kubernetes/pkg/client/typed/generated/legacy/unversioned/fake" +) + +// Legacy retrieves the LegacyClient +func (c *Clientset) Legacy() legacy_unversioned.LegacyInterface { + return &legacy_unversioned_fake.FakeLegacy{&c.Fake} +} + +// Extensions retrieves the ExtensionsClient +func (c *Clientset) Extensions() extensions_unversioned.ExtensionsInterface { + return &extensions_unversioned_fake.FakeExtensions{&c.Fake} +} From c734fca715a40ec916f8a6192f8ddb793700216f Mon Sep 17 00:00:00 2001 From: Kirill Kolyshkin Date: Tue, 2 Feb 2016 18:25:56 -0800 Subject: [PATCH 078/328] centos_manual_config.md: fix etcd client port As per https://github.com/coreos/etcd/blob/master/Documentation/configuration.md > The official etcd ports are 2379 for client requests, and 2380 for peer > communication. Some legacy code and documentation still references > ports 4001 and 7001, but all new etcd use and discussion should > adopt the assigned ports. Indeed, etcd-2.1.1-2.el7.x86_64 as comes in centos 7 "extras" repo is configured to listen to clients at port 2379, not 4001. --- docs/getting-started-guides/centos/centos_manual_config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting-started-guides/centos/centos_manual_config.md b/docs/getting-started-guides/centos/centos_manual_config.md index 8a0a575ffce..1a946c056cf 100644 --- a/docs/getting-started-guides/centos/centos_manual_config.md +++ b/docs/getting-started-guides/centos/centos_manual_config.md @@ -88,7 +88,7 @@ echo "192.168.121.9 centos-master ```sh # Comma separated list of nodes in the etcd cluster -KUBE_ETCD_SERVERS="--etcd-servers=http://centos-master:4001" +KUBE_ETCD_SERVERS="--etcd-servers=http://centos-master:2379" # logging to stderr means we get it in the systemd journal KUBE_LOGTOSTDERR="--logtostderr=true" From c4a1ab42e3023eaabca7492878f8c6cc908d8090 Mon Sep 17 00:00:00 2001 From: mqliang Date: Sun, 31 Jan 2016 21:59:58 +0800 Subject: [PATCH 079/328] Move MinReadySeconds out of RollingUpdateDeployment --- docs/user-guide/deployments.md | 2 +- pkg/apis/extensions/types.generated.go | 1094 ++++++++--------- pkg/apis/extensions/types.go | 10 +- pkg/apis/extensions/v1beta1/conversion.go | 4 +- .../v1beta1/conversion_generated.go | 4 +- .../extensions/v1beta1/deep_copy_generated.go | 2 +- .../extensions/v1beta1/types.generated.go | 1060 ++++++++-------- pkg/apis/extensions/v1beta1/types.go | 10 +- .../v1beta1/types_swagger_doc_generated.go | 8 +- pkg/apis/extensions/validation/validation.go | 2 +- .../deployment/deployment_controller.go | 7 +- pkg/kubectl/describe.go | 3 +- test/e2e/deployment.go | 6 +- 13 files changed, 1105 insertions(+), 1107 deletions(-) diff --git a/docs/user-guide/deployments.md b/docs/user-guide/deployments.md index 18782011a8b..d3f4dbac22c 100644 --- a/docs/user-guide/deployments.md +++ b/docs/user-guide/deployments.md @@ -399,7 +399,7 @@ at any time during the update is at most 130% of desired pods. ##### Min Ready Seconds -`.spec.strategy.rollingUpdate.minReadySeconds` is an optional field that specifies the +`.spec.minReadySeconds` is an optional field that specifies the minimum number of seconds for which a newly created pod should be ready without any of its containers crashing, for it to be considered available. This defaults to 0 (the pod will be considered available as soon as it is ready). diff --git a/pkg/apis/extensions/types.generated.go b/pkg/apis/extensions/types.generated.go index 3b86b8ca347..725e9cb4ff3 100644 --- a/pkg/apis/extensions/types.generated.go +++ b/pkg/apis/extensions/types.generated.go @@ -5426,19 +5426,20 @@ func (x *DeploymentSpec) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep453 := !z.EncBinary() yy2arr453 := z.EncBasicHandle().StructToArray - var yyq453 [8]bool + var yyq453 [9]bool _, _, _ = yysep453, yyq453, yy2arr453 const yyr453 bool = false yyq453[0] = x.Replicas != 0 yyq453[1] = len(x.Selector) != 0 yyq453[3] = true - yyq453[4] = x.RevisionHistoryLimit != nil - yyq453[5] = x.UniqueLabelKey != "" - yyq453[6] = x.Paused != false - yyq453[7] = x.RollbackTo != nil + yyq453[4] = x.MinReadySeconds != 0 + yyq453[5] = x.RevisionHistoryLimit != nil + yyq453[6] = x.UniqueLabelKey != "" + yyq453[7] = x.Paused != false + yyq453[8] = x.RollbackTo != nil var yynn453 int if yyr453 || yy2arr453 { - r.EncodeArrayStart(8) + r.EncodeArrayStart(9) } else { yynn453 = 1 for _, b := range yyq453 { @@ -5538,60 +5539,60 @@ func (x *DeploymentSpec) CodecEncodeSelf(e *codec1978.Encoder) { if yyr453 || yy2arr453 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq453[4] { - if x.RevisionHistoryLimit == nil { - r.EncodeNil() + yym467 := z.EncBinary() + _ = yym467 + if false { } else { - yy467 := *x.RevisionHistoryLimit - yym468 := z.EncBinary() - _ = yym468 - if false { - } else { - r.EncodeInt(int64(yy467)) - } + r.EncodeInt(int64(x.MinReadySeconds)) } } else { - r.EncodeNil() + r.EncodeInt(0) } } else { if yyq453[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("revisionHistoryLimit")) + r.EncodeString(codecSelferC_UTF81234, string("minReadySeconds")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.RevisionHistoryLimit == nil { - r.EncodeNil() + yym468 := z.EncBinary() + _ = yym468 + if false { } else { - yy469 := *x.RevisionHistoryLimit - yym470 := z.EncBinary() - _ = yym470 - if false { - } else { - r.EncodeInt(int64(yy469)) - } + r.EncodeInt(int64(x.MinReadySeconds)) } } } if yyr453 || yy2arr453 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq453[5] { - yym472 := z.EncBinary() - _ = yym472 - if false { + if x.RevisionHistoryLimit == nil { + r.EncodeNil() } else { - r.EncodeString(codecSelferC_UTF81234, string(x.UniqueLabelKey)) + yy470 := *x.RevisionHistoryLimit + yym471 := z.EncBinary() + _ = yym471 + if false { + } else { + r.EncodeInt(int64(yy470)) + } } } else { - r.EncodeString(codecSelferC_UTF81234, "") + r.EncodeNil() } } else { if yyq453[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("uniqueLabelKey")) + r.EncodeString(codecSelferC_UTF81234, string("revisionHistoryLimit")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym473 := z.EncBinary() - _ = yym473 - if false { + if x.RevisionHistoryLimit == nil { + r.EncodeNil() } else { - r.EncodeString(codecSelferC_UTF81234, string(x.UniqueLabelKey)) + yy472 := *x.RevisionHistoryLimit + yym473 := z.EncBinary() + _ = yym473 + if false { + } else { + r.EncodeInt(int64(yy472)) + } } } } @@ -5601,6 +5602,31 @@ func (x *DeploymentSpec) CodecEncodeSelf(e *codec1978.Encoder) { yym475 := z.EncBinary() _ = yym475 if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.UniqueLabelKey)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq453[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("uniqueLabelKey")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym476 := z.EncBinary() + _ = yym476 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.UniqueLabelKey)) + } + } + } + if yyr453 || yy2arr453 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq453[7] { + yym478 := z.EncBinary() + _ = yym478 + if false { } else { r.EncodeBool(bool(x.Paused)) } @@ -5608,12 +5634,12 @@ func (x *DeploymentSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq453[6] { + if yyq453[7] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("paused")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym476 := z.EncBinary() - _ = yym476 + yym479 := z.EncBinary() + _ = yym479 if false { } else { r.EncodeBool(bool(x.Paused)) @@ -5622,7 +5648,7 @@ func (x *DeploymentSpec) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr453 || yy2arr453 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq453[7] { + if yyq453[8] { if x.RollbackTo == nil { r.EncodeNil() } else { @@ -5632,7 +5658,7 @@ func (x *DeploymentSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq453[7] { + if yyq453[8] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("rollbackTo")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -5656,25 +5682,25 @@ func (x *DeploymentSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym478 := z.DecBinary() - _ = yym478 + yym481 := z.DecBinary() + _ = yym481 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct479 := r.ContainerType() - if yyct479 == codecSelferValueTypeMap1234 { - yyl479 := r.ReadMapStart() - if yyl479 == 0 { + yyct482 := r.ContainerType() + if yyct482 == codecSelferValueTypeMap1234 { + yyl482 := r.ReadMapStart() + if yyl482 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl479, d) + x.codecDecodeSelfFromMap(yyl482, d) } - } else if yyct479 == codecSelferValueTypeArray1234 { - yyl479 := r.ReadArrayStart() - if yyl479 == 0 { + } else if yyct482 == codecSelferValueTypeArray1234 { + yyl482 := r.ReadArrayStart() + if yyl482 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl479, d) + x.codecDecodeSelfFromArray(yyl482, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -5686,12 +5712,12 @@ func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys480Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys480Slc - var yyhl480 bool = l >= 0 - for yyj480 := 0; ; yyj480++ { - if yyhl480 { - if yyj480 >= l { + var yys483Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys483Slc + var yyhl483 bool = l >= 0 + for yyj483 := 0; ; yyj483++ { + if yyhl483 { + if yyj483 >= l { break } } else { @@ -5700,10 +5726,10 @@ func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys480Slc = r.DecodeBytes(yys480Slc, true, true) - yys480 := string(yys480Slc) + yys483Slc = r.DecodeBytes(yys483Slc, true, true) + yys483 := string(yys483Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys480 { + switch yys483 { case "replicas": if r.TryDecodeAsNil() { x.Replicas = 0 @@ -5714,27 +5740,33 @@ func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Selector = nil } else { - yyv482 := &x.Selector - yym483 := z.DecBinary() - _ = yym483 + yyv485 := &x.Selector + yym486 := z.DecBinary() + _ = yym486 if false { } else { - z.F.DecMapStringStringX(yyv482, false, d) + z.F.DecMapStringStringX(yyv485, false, d) } } case "template": if r.TryDecodeAsNil() { x.Template = pkg2_api.PodTemplateSpec{} } else { - yyv484 := &x.Template - yyv484.CodecDecodeSelf(d) + yyv487 := &x.Template + yyv487.CodecDecodeSelf(d) } case "strategy": if r.TryDecodeAsNil() { x.Strategy = DeploymentStrategy{} } else { - yyv485 := &x.Strategy - yyv485.CodecDecodeSelf(d) + yyv488 := &x.Strategy + yyv488.CodecDecodeSelf(d) + } + case "minReadySeconds": + if r.TryDecodeAsNil() { + x.MinReadySeconds = 0 + } else { + x.MinReadySeconds = int(r.DecodeInt(codecSelferBitsize1234)) } case "revisionHistoryLimit": if r.TryDecodeAsNil() { @@ -5745,8 +5777,8 @@ func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.RevisionHistoryLimit == nil { x.RevisionHistoryLimit = new(int) } - yym487 := z.DecBinary() - _ = yym487 + yym491 := z.DecBinary() + _ = yym491 if false { } else { *((*int)(x.RevisionHistoryLimit)) = int(r.DecodeInt(codecSelferBitsize1234)) @@ -5776,9 +5808,9 @@ func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.RollbackTo.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys480) - } // end switch yys480 - } // end for yyj480 + z.DecStructFieldNotFound(-1, yys483) + } // end switch yys483 + } // end for yyj483 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -5786,16 +5818,16 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj491 int - var yyb491 bool - var yyhl491 bool = l >= 0 - yyj491++ - if yyhl491 { - yyb491 = yyj491 > l + var yyj495 int + var yyb495 bool + var yyhl495 bool = l >= 0 + yyj495++ + if yyhl495 { + yyb495 = yyj495 > l } else { - yyb491 = r.CheckBreak() + yyb495 = r.CheckBreak() } - if yyb491 { + if yyb495 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5805,13 +5837,13 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Replicas = int(r.DecodeInt(codecSelferBitsize1234)) } - yyj491++ - if yyhl491 { - yyb491 = yyj491 > l + yyj495++ + if yyhl495 { + yyb495 = yyj495 > l } else { - yyb491 = r.CheckBreak() + yyb495 = r.CheckBreak() } - if yyb491 { + if yyb495 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5819,21 +5851,21 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Selector = nil } else { - yyv493 := &x.Selector - yym494 := z.DecBinary() - _ = yym494 + yyv497 := &x.Selector + yym498 := z.DecBinary() + _ = yym498 if false { } else { - z.F.DecMapStringStringX(yyv493, false, d) + z.F.DecMapStringStringX(yyv497, false, d) } } - yyj491++ - if yyhl491 { - yyb491 = yyj491 > l + yyj495++ + if yyhl495 { + yyb495 = yyj495 > l } else { - yyb491 = r.CheckBreak() + yyb495 = r.CheckBreak() } - if yyb491 { + if yyb495 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5841,16 +5873,16 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Template = pkg2_api.PodTemplateSpec{} } else { - yyv495 := &x.Template - yyv495.CodecDecodeSelf(d) + yyv499 := &x.Template + yyv499.CodecDecodeSelf(d) } - yyj491++ - if yyhl491 { - yyb491 = yyj491 > l + yyj495++ + if yyhl495 { + yyb495 = yyj495 > l } else { - yyb491 = r.CheckBreak() + yyb495 = r.CheckBreak() } - if yyb491 { + if yyb495 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5858,16 +5890,32 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Strategy = DeploymentStrategy{} } else { - yyv496 := &x.Strategy - yyv496.CodecDecodeSelf(d) + yyv500 := &x.Strategy + yyv500.CodecDecodeSelf(d) } - yyj491++ - if yyhl491 { - yyb491 = yyj491 > l + yyj495++ + if yyhl495 { + yyb495 = yyj495 > l } else { - yyb491 = r.CheckBreak() + yyb495 = r.CheckBreak() } - if yyb491 { + if yyb495 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.MinReadySeconds = 0 + } else { + x.MinReadySeconds = int(r.DecodeInt(codecSelferBitsize1234)) + } + yyj495++ + if yyhl495 { + yyb495 = yyj495 > l + } else { + yyb495 = r.CheckBreak() + } + if yyb495 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5880,20 +5928,20 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.RevisionHistoryLimit == nil { x.RevisionHistoryLimit = new(int) } - yym498 := z.DecBinary() - _ = yym498 + yym503 := z.DecBinary() + _ = yym503 if false { } else { *((*int)(x.RevisionHistoryLimit)) = int(r.DecodeInt(codecSelferBitsize1234)) } } - yyj491++ - if yyhl491 { - yyb491 = yyj491 > l + yyj495++ + if yyhl495 { + yyb495 = yyj495 > l } else { - yyb491 = r.CheckBreak() + yyb495 = r.CheckBreak() } - if yyb491 { + if yyb495 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5903,13 +5951,13 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.UniqueLabelKey = string(r.DecodeString()) } - yyj491++ - if yyhl491 { - yyb491 = yyj491 > l + yyj495++ + if yyhl495 { + yyb495 = yyj495 > l } else { - yyb491 = r.CheckBreak() + yyb495 = r.CheckBreak() } - if yyb491 { + if yyb495 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5919,13 +5967,13 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Paused = bool(r.DecodeBool()) } - yyj491++ - if yyhl491 { - yyb491 = yyj491 > l + yyj495++ + if yyhl495 { + yyb495 = yyj495 > l } else { - yyb491 = r.CheckBreak() + yyb495 = r.CheckBreak() } - if yyb491 { + if yyb495 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5941,17 +5989,17 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.RollbackTo.CodecDecodeSelf(d) } for { - yyj491++ - if yyhl491 { - yyb491 = yyj491 > l + yyj495++ + if yyhl495 { + yyb495 = yyj495 > l } else { - yyb491 = r.CheckBreak() + yyb495 = r.CheckBreak() } - if yyb491 { + if yyb495 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj491-1, "") + z.DecStructFieldNotFound(yyj495-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -5963,37 +6011,37 @@ func (x *DeploymentRollback) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym502 := z.EncBinary() - _ = yym502 + yym507 := z.EncBinary() + _ = yym507 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep503 := !z.EncBinary() - yy2arr503 := z.EncBasicHandle().StructToArray - var yyq503 [5]bool - _, _, _ = yysep503, yyq503, yy2arr503 - const yyr503 bool = false - yyq503[0] = x.Kind != "" - yyq503[1] = x.APIVersion != "" - yyq503[3] = len(x.UpdatedAnnotations) != 0 - var yynn503 int - if yyr503 || yy2arr503 { + yysep508 := !z.EncBinary() + yy2arr508 := z.EncBasicHandle().StructToArray + var yyq508 [5]bool + _, _, _ = yysep508, yyq508, yy2arr508 + const yyr508 bool = false + yyq508[0] = x.Kind != "" + yyq508[1] = x.APIVersion != "" + yyq508[3] = len(x.UpdatedAnnotations) != 0 + var yynn508 int + if yyr508 || yy2arr508 { r.EncodeArrayStart(5) } else { - yynn503 = 2 - for _, b := range yyq503 { + yynn508 = 2 + for _, b := range yyq508 { if b { - yynn503++ + yynn508++ } } - r.EncodeMapStart(yynn503) - yynn503 = 0 + r.EncodeMapStart(yynn508) + yynn508 = 0 } - if yyr503 || yy2arr503 { + if yyr508 || yy2arr508 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq503[0] { - yym505 := z.EncBinary() - _ = yym505 + if yyq508[0] { + yym510 := z.EncBinary() + _ = yym510 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -6002,23 +6050,23 @@ func (x *DeploymentRollback) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq503[0] { + if yyq508[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym506 := z.EncBinary() - _ = yym506 + yym511 := z.EncBinary() + _ = yym511 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr503 || yy2arr503 { + if yyr508 || yy2arr508 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq503[1] { - yym508 := z.EncBinary() - _ = yym508 + if yyq508[1] { + yym513 := z.EncBinary() + _ = yym513 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -6027,22 +6075,22 @@ func (x *DeploymentRollback) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq503[1] { + if yyq508[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym509 := z.EncBinary() - _ = yym509 + yym514 := z.EncBinary() + _ = yym514 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr503 || yy2arr503 { + if yyr508 || yy2arr508 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym511 := z.EncBinary() - _ = yym511 + yym516 := z.EncBinary() + _ = yym516 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -6051,21 +6099,21 @@ func (x *DeploymentRollback) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym512 := z.EncBinary() - _ = yym512 + yym517 := z.EncBinary() + _ = yym517 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } - if yyr503 || yy2arr503 { + if yyr508 || yy2arr508 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq503[3] { + if yyq508[3] { if x.UpdatedAnnotations == nil { r.EncodeNil() } else { - yym514 := z.EncBinary() - _ = yym514 + yym519 := z.EncBinary() + _ = yym519 if false { } else { z.F.EncMapStringStringV(x.UpdatedAnnotations, false, e) @@ -6075,15 +6123,15 @@ func (x *DeploymentRollback) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq503[3] { + if yyq508[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("updatedAnnotations")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.UpdatedAnnotations == nil { r.EncodeNil() } else { - yym515 := z.EncBinary() - _ = yym515 + yym520 := z.EncBinary() + _ = yym520 if false { } else { z.F.EncMapStringStringV(x.UpdatedAnnotations, false, e) @@ -6091,18 +6139,18 @@ func (x *DeploymentRollback) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr503 || yy2arr503 { + if yyr508 || yy2arr508 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy517 := &x.RollbackTo - yy517.CodecEncodeSelf(e) + yy522 := &x.RollbackTo + yy522.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("rollbackTo")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy518 := &x.RollbackTo - yy518.CodecEncodeSelf(e) + yy523 := &x.RollbackTo + yy523.CodecEncodeSelf(e) } - if yyr503 || yy2arr503 { + if yyr508 || yy2arr508 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -6115,25 +6163,25 @@ func (x *DeploymentRollback) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym519 := z.DecBinary() - _ = yym519 + yym524 := z.DecBinary() + _ = yym524 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct520 := r.ContainerType() - if yyct520 == codecSelferValueTypeMap1234 { - yyl520 := r.ReadMapStart() - if yyl520 == 0 { + yyct525 := r.ContainerType() + if yyct525 == codecSelferValueTypeMap1234 { + yyl525 := r.ReadMapStart() + if yyl525 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl520, d) + x.codecDecodeSelfFromMap(yyl525, d) } - } else if yyct520 == codecSelferValueTypeArray1234 { - yyl520 := r.ReadArrayStart() - if yyl520 == 0 { + } else if yyct525 == codecSelferValueTypeArray1234 { + yyl525 := r.ReadArrayStart() + if yyl525 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl520, d) + x.codecDecodeSelfFromArray(yyl525, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -6145,12 +6193,12 @@ func (x *DeploymentRollback) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys521Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys521Slc - var yyhl521 bool = l >= 0 - for yyj521 := 0; ; yyj521++ { - if yyhl521 { - if yyj521 >= l { + var yys526Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys526Slc + var yyhl526 bool = l >= 0 + for yyj526 := 0; ; yyj526++ { + if yyhl526 { + if yyj526 >= l { break } } else { @@ -6159,10 +6207,10 @@ func (x *DeploymentRollback) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys521Slc = r.DecodeBytes(yys521Slc, true, true) - yys521 := string(yys521Slc) + yys526Slc = r.DecodeBytes(yys526Slc, true, true) + yys526 := string(yys526Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys521 { + switch yys526 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -6185,25 +6233,25 @@ func (x *DeploymentRollback) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.UpdatedAnnotations = nil } else { - yyv525 := &x.UpdatedAnnotations - yym526 := z.DecBinary() - _ = yym526 + yyv530 := &x.UpdatedAnnotations + yym531 := z.DecBinary() + _ = yym531 if false { } else { - z.F.DecMapStringStringX(yyv525, false, d) + z.F.DecMapStringStringX(yyv530, false, d) } } case "rollbackTo": if r.TryDecodeAsNil() { x.RollbackTo = RollbackConfig{} } else { - yyv527 := &x.RollbackTo - yyv527.CodecDecodeSelf(d) + yyv532 := &x.RollbackTo + yyv532.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys521) - } // end switch yys521 - } // end for yyj521 + z.DecStructFieldNotFound(-1, yys526) + } // end switch yys526 + } // end for yyj526 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -6211,16 +6259,16 @@ func (x *DeploymentRollback) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj528 int - var yyb528 bool - var yyhl528 bool = l >= 0 - yyj528++ - if yyhl528 { - yyb528 = yyj528 > l + var yyj533 int + var yyb533 bool + var yyhl533 bool = l >= 0 + yyj533++ + if yyhl533 { + yyb533 = yyj533 > l } else { - yyb528 = r.CheckBreak() + yyb533 = r.CheckBreak() } - if yyb528 { + if yyb533 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6230,13 +6278,13 @@ func (x *DeploymentRollback) codecDecodeSelfFromArray(l int, d *codec1978.Decode } else { x.Kind = string(r.DecodeString()) } - yyj528++ - if yyhl528 { - yyb528 = yyj528 > l + yyj533++ + if yyhl533 { + yyb533 = yyj533 > l } else { - yyb528 = r.CheckBreak() + yyb533 = r.CheckBreak() } - if yyb528 { + if yyb533 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6246,13 +6294,13 @@ func (x *DeploymentRollback) codecDecodeSelfFromArray(l int, d *codec1978.Decode } else { x.APIVersion = string(r.DecodeString()) } - yyj528++ - if yyhl528 { - yyb528 = yyj528 > l + yyj533++ + if yyhl533 { + yyb533 = yyj533 > l } else { - yyb528 = r.CheckBreak() + yyb533 = r.CheckBreak() } - if yyb528 { + if yyb533 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6262,13 +6310,13 @@ func (x *DeploymentRollback) codecDecodeSelfFromArray(l int, d *codec1978.Decode } else { x.Name = string(r.DecodeString()) } - yyj528++ - if yyhl528 { - yyb528 = yyj528 > l + yyj533++ + if yyhl533 { + yyb533 = yyj533 > l } else { - yyb528 = r.CheckBreak() + yyb533 = r.CheckBreak() } - if yyb528 { + if yyb533 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6276,21 +6324,21 @@ func (x *DeploymentRollback) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.UpdatedAnnotations = nil } else { - yyv532 := &x.UpdatedAnnotations - yym533 := z.DecBinary() - _ = yym533 + yyv537 := &x.UpdatedAnnotations + yym538 := z.DecBinary() + _ = yym538 if false { } else { - z.F.DecMapStringStringX(yyv532, false, d) + z.F.DecMapStringStringX(yyv537, false, d) } } - yyj528++ - if yyhl528 { - yyb528 = yyj528 > l + yyj533++ + if yyhl533 { + yyb533 = yyj533 > l } else { - yyb528 = r.CheckBreak() + yyb533 = r.CheckBreak() } - if yyb528 { + if yyb533 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6298,21 +6346,21 @@ func (x *DeploymentRollback) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.RollbackTo = RollbackConfig{} } else { - yyv534 := &x.RollbackTo - yyv534.CodecDecodeSelf(d) + yyv539 := &x.RollbackTo + yyv539.CodecDecodeSelf(d) } for { - yyj528++ - if yyhl528 { - yyb528 = yyj528 > l + yyj533++ + if yyhl533 { + yyb533 = yyj533 > l } else { - yyb528 = r.CheckBreak() + yyb533 = r.CheckBreak() } - if yyb528 { + if yyb533 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj528-1, "") + z.DecStructFieldNotFound(yyj533-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -6324,35 +6372,35 @@ func (x *RollbackConfig) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym535 := z.EncBinary() - _ = yym535 + yym540 := z.EncBinary() + _ = yym540 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep536 := !z.EncBinary() - yy2arr536 := z.EncBasicHandle().StructToArray - var yyq536 [1]bool - _, _, _ = yysep536, yyq536, yy2arr536 - const yyr536 bool = false - yyq536[0] = x.Revision != 0 - var yynn536 int - if yyr536 || yy2arr536 { + yysep541 := !z.EncBinary() + yy2arr541 := z.EncBasicHandle().StructToArray + var yyq541 [1]bool + _, _, _ = yysep541, yyq541, yy2arr541 + const yyr541 bool = false + yyq541[0] = x.Revision != 0 + var yynn541 int + if yyr541 || yy2arr541 { r.EncodeArrayStart(1) } else { - yynn536 = 0 - for _, b := range yyq536 { + yynn541 = 0 + for _, b := range yyq541 { if b { - yynn536++ + yynn541++ } } - r.EncodeMapStart(yynn536) - yynn536 = 0 + r.EncodeMapStart(yynn541) + yynn541 = 0 } - if yyr536 || yy2arr536 { + if yyr541 || yy2arr541 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq536[0] { - yym538 := z.EncBinary() - _ = yym538 + if yyq541[0] { + yym543 := z.EncBinary() + _ = yym543 if false { } else { r.EncodeInt(int64(x.Revision)) @@ -6361,19 +6409,19 @@ func (x *RollbackConfig) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq536[0] { + if yyq541[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("revision")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym539 := z.EncBinary() - _ = yym539 + yym544 := z.EncBinary() + _ = yym544 if false { } else { r.EncodeInt(int64(x.Revision)) } } } - if yyr536 || yy2arr536 { + if yyr541 || yy2arr541 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -6386,25 +6434,25 @@ func (x *RollbackConfig) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym540 := z.DecBinary() - _ = yym540 + yym545 := z.DecBinary() + _ = yym545 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct541 := r.ContainerType() - if yyct541 == codecSelferValueTypeMap1234 { - yyl541 := r.ReadMapStart() - if yyl541 == 0 { + yyct546 := r.ContainerType() + if yyct546 == codecSelferValueTypeMap1234 { + yyl546 := r.ReadMapStart() + if yyl546 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl541, d) + x.codecDecodeSelfFromMap(yyl546, d) } - } else if yyct541 == codecSelferValueTypeArray1234 { - yyl541 := r.ReadArrayStart() - if yyl541 == 0 { + } else if yyct546 == codecSelferValueTypeArray1234 { + yyl546 := r.ReadArrayStart() + if yyl546 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl541, d) + x.codecDecodeSelfFromArray(yyl546, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -6416,12 +6464,12 @@ func (x *RollbackConfig) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys542Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys542Slc - var yyhl542 bool = l >= 0 - for yyj542 := 0; ; yyj542++ { - if yyhl542 { - if yyj542 >= l { + var yys547Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys547Slc + var yyhl547 bool = l >= 0 + for yyj547 := 0; ; yyj547++ { + if yyhl547 { + if yyj547 >= l { break } } else { @@ -6430,10 +6478,10 @@ func (x *RollbackConfig) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys542Slc = r.DecodeBytes(yys542Slc, true, true) - yys542 := string(yys542Slc) + yys547Slc = r.DecodeBytes(yys547Slc, true, true) + yys547 := string(yys547Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys542 { + switch yys547 { case "revision": if r.TryDecodeAsNil() { x.Revision = 0 @@ -6441,9 +6489,9 @@ func (x *RollbackConfig) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Revision = int64(r.DecodeInt(64)) } default: - z.DecStructFieldNotFound(-1, yys542) - } // end switch yys542 - } // end for yyj542 + z.DecStructFieldNotFound(-1, yys547) + } // end switch yys547 + } // end for yyj547 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -6451,16 +6499,16 @@ func (x *RollbackConfig) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj544 int - var yyb544 bool - var yyhl544 bool = l >= 0 - yyj544++ - if yyhl544 { - yyb544 = yyj544 > l + var yyj549 int + var yyb549 bool + var yyhl549 bool = l >= 0 + yyj549++ + if yyhl549 { + yyb549 = yyj549 > l } else { - yyb544 = r.CheckBreak() + yyb549 = r.CheckBreak() } - if yyb544 { + if yyb549 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6471,17 +6519,17 @@ func (x *RollbackConfig) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Revision = int64(r.DecodeInt(64)) } for { - yyj544++ - if yyhl544 { - yyb544 = yyj544 > l + yyj549++ + if yyhl549 { + yyb549 = yyj549 > l } else { - yyb544 = r.CheckBreak() + yyb549 = r.CheckBreak() } - if yyb544 { + if yyb549 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj544-1, "") + z.DecStructFieldNotFound(yyj549-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -6493,49 +6541,49 @@ func (x *DeploymentStrategy) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym546 := z.EncBinary() - _ = yym546 + yym551 := z.EncBinary() + _ = yym551 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep547 := !z.EncBinary() - yy2arr547 := z.EncBasicHandle().StructToArray - var yyq547 [2]bool - _, _, _ = yysep547, yyq547, yy2arr547 - const yyr547 bool = false - yyq547[0] = x.Type != "" - yyq547[1] = x.RollingUpdate != nil - var yynn547 int - if yyr547 || yy2arr547 { + yysep552 := !z.EncBinary() + yy2arr552 := z.EncBasicHandle().StructToArray + var yyq552 [2]bool + _, _, _ = yysep552, yyq552, yy2arr552 + const yyr552 bool = false + yyq552[0] = x.Type != "" + yyq552[1] = x.RollingUpdate != nil + var yynn552 int + if yyr552 || yy2arr552 { r.EncodeArrayStart(2) } else { - yynn547 = 0 - for _, b := range yyq547 { + yynn552 = 0 + for _, b := range yyq552 { if b { - yynn547++ + yynn552++ } } - r.EncodeMapStart(yynn547) - yynn547 = 0 + r.EncodeMapStart(yynn552) + yynn552 = 0 } - if yyr547 || yy2arr547 { + if yyr552 || yy2arr552 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq547[0] { + if yyq552[0] { x.Type.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq547[0] { + if yyq552[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("type")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } } - if yyr547 || yy2arr547 { + if yyr552 || yy2arr552 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq547[1] { + if yyq552[1] { if x.RollingUpdate == nil { r.EncodeNil() } else { @@ -6545,7 +6593,7 @@ func (x *DeploymentStrategy) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq547[1] { + if yyq552[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("rollingUpdate")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -6556,7 +6604,7 @@ func (x *DeploymentStrategy) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr547 || yy2arr547 { + if yyr552 || yy2arr552 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -6569,25 +6617,25 @@ func (x *DeploymentStrategy) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym550 := z.DecBinary() - _ = yym550 + yym555 := z.DecBinary() + _ = yym555 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct551 := r.ContainerType() - if yyct551 == codecSelferValueTypeMap1234 { - yyl551 := r.ReadMapStart() - if yyl551 == 0 { + yyct556 := r.ContainerType() + if yyct556 == codecSelferValueTypeMap1234 { + yyl556 := r.ReadMapStart() + if yyl556 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl551, d) + x.codecDecodeSelfFromMap(yyl556, d) } - } else if yyct551 == codecSelferValueTypeArray1234 { - yyl551 := r.ReadArrayStart() - if yyl551 == 0 { + } else if yyct556 == codecSelferValueTypeArray1234 { + yyl556 := r.ReadArrayStart() + if yyl556 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl551, d) + x.codecDecodeSelfFromArray(yyl556, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -6599,12 +6647,12 @@ func (x *DeploymentStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys552Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys552Slc - var yyhl552 bool = l >= 0 - for yyj552 := 0; ; yyj552++ { - if yyhl552 { - if yyj552 >= l { + var yys557Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys557Slc + var yyhl557 bool = l >= 0 + for yyj557 := 0; ; yyj557++ { + if yyhl557 { + if yyj557 >= l { break } } else { @@ -6613,10 +6661,10 @@ func (x *DeploymentStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys552Slc = r.DecodeBytes(yys552Slc, true, true) - yys552 := string(yys552Slc) + yys557Slc = r.DecodeBytes(yys557Slc, true, true) + yys557 := string(yys557Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys552 { + switch yys557 { case "type": if r.TryDecodeAsNil() { x.Type = "" @@ -6635,9 +6683,9 @@ func (x *DeploymentStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) x.RollingUpdate.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys552) - } // end switch yys552 - } // end for yyj552 + z.DecStructFieldNotFound(-1, yys557) + } // end switch yys557 + } // end for yyj557 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -6645,16 +6693,16 @@ func (x *DeploymentStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj555 int - var yyb555 bool - var yyhl555 bool = l >= 0 - yyj555++ - if yyhl555 { - yyb555 = yyj555 > l + var yyj560 int + var yyb560 bool + var yyhl560 bool = l >= 0 + yyj560++ + if yyhl560 { + yyb560 = yyj560 > l } else { - yyb555 = r.CheckBreak() + yyb560 = r.CheckBreak() } - if yyb555 { + if yyb560 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6664,13 +6712,13 @@ func (x *DeploymentStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decode } else { x.Type = DeploymentStrategyType(r.DecodeString()) } - yyj555++ - if yyhl555 { - yyb555 = yyj555 > l + yyj560++ + if yyhl560 { + yyb560 = yyj560 > l } else { - yyb555 = r.CheckBreak() + yyb560 = r.CheckBreak() } - if yyb555 { + if yyb560 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6686,17 +6734,17 @@ func (x *DeploymentStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decode x.RollingUpdate.CodecDecodeSelf(d) } for { - yyj555++ - if yyhl555 { - yyb555 = yyj555 > l + yyj560++ + if yyhl560 { + yyb560 = yyj560 > l } else { - yyb555 = r.CheckBreak() + yyb560 = r.CheckBreak() } - if yyb555 { + if yyb560 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj555-1, "") + z.DecStructFieldNotFound(yyj560-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -6705,8 +6753,8 @@ func (x DeploymentStrategyType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym558 := z.EncBinary() - _ = yym558 + yym563 := z.EncBinary() + _ = yym563 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -6718,8 +6766,8 @@ func (x *DeploymentStrategyType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym559 := z.DecBinary() - _ = yym559 + yym564 := z.DecBinary() + _ = yym564 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -6734,69 +6782,35 @@ func (x *RollingUpdateDeployment) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym560 := z.EncBinary() - _ = yym560 + yym565 := z.EncBinary() + _ = yym565 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep561 := !z.EncBinary() - yy2arr561 := z.EncBasicHandle().StructToArray - var yyq561 [3]bool - _, _, _ = yysep561, yyq561, yy2arr561 - const yyr561 bool = false - yyq561[0] = true - yyq561[1] = true - yyq561[2] = x.MinReadySeconds != 0 - var yynn561 int - if yyr561 || yy2arr561 { - r.EncodeArrayStart(3) + yysep566 := !z.EncBinary() + yy2arr566 := z.EncBasicHandle().StructToArray + var yyq566 [2]bool + _, _, _ = yysep566, yyq566, yy2arr566 + const yyr566 bool = false + yyq566[0] = true + yyq566[1] = true + var yynn566 int + if yyr566 || yy2arr566 { + r.EncodeArrayStart(2) } else { - yynn561 = 0 - for _, b := range yyq561 { + yynn566 = 0 + for _, b := range yyq566 { if b { - yynn561++ + yynn566++ } } - r.EncodeMapStart(yynn561) - yynn561 = 0 + r.EncodeMapStart(yynn566) + yynn566 = 0 } - if yyr561 || yy2arr561 { + if yyr566 || yy2arr566 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq561[0] { - yy563 := &x.MaxUnavailable - yym564 := z.EncBinary() - _ = yym564 - if false { - } else if z.HasExtensions() && z.EncExt(yy563) { - } else if !yym564 && z.IsJSONHandle() { - z.EncJSONMarshal(yy563) - } else { - z.EncFallback(yy563) - } - } else { - r.EncodeNil() - } - } else { - if yyq561[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("maxUnavailable")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy565 := &x.MaxUnavailable - yym566 := z.EncBinary() - _ = yym566 - if false { - } else if z.HasExtensions() && z.EncExt(yy565) { - } else if !yym566 && z.IsJSONHandle() { - z.EncJSONMarshal(yy565) - } else { - z.EncFallback(yy565) - } - } - } - if yyr561 || yy2arr561 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq561[1] { - yy568 := &x.MaxSurge + if yyq566[0] { + yy568 := &x.MaxUnavailable yym569 := z.EncBinary() _ = yym569 if false { @@ -6810,11 +6824,11 @@ func (x *RollingUpdateDeployment) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq561[1] { + if yyq566[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("maxSurge")) + r.EncodeString(codecSelferC_UTF81234, string("maxUnavailable")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy570 := &x.MaxSurge + yy570 := &x.MaxUnavailable yym571 := z.EncBinary() _ = yym571 if false { @@ -6826,32 +6840,40 @@ func (x *RollingUpdateDeployment) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr561 || yy2arr561 { + if yyr566 || yy2arr566 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq561[2] { - yym573 := z.EncBinary() - _ = yym573 - if false { - } else { - r.EncodeInt(int64(x.MinReadySeconds)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq561[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("minReadySeconds")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) + if yyq566[1] { + yy573 := &x.MaxSurge yym574 := z.EncBinary() _ = yym574 if false { + } else if z.HasExtensions() && z.EncExt(yy573) { + } else if !yym574 && z.IsJSONHandle() { + z.EncJSONMarshal(yy573) } else { - r.EncodeInt(int64(x.MinReadySeconds)) + z.EncFallback(yy573) + } + } else { + r.EncodeNil() + } + } else { + if yyq566[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("maxSurge")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy575 := &x.MaxSurge + yym576 := z.EncBinary() + _ = yym576 + if false { + } else if z.HasExtensions() && z.EncExt(yy575) { + } else if !yym576 && z.IsJSONHandle() { + z.EncJSONMarshal(yy575) + } else { + z.EncFallback(yy575) } } } - if yyr561 || yy2arr561 { + if yyr566 || yy2arr566 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -6864,25 +6886,25 @@ func (x *RollingUpdateDeployment) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym575 := z.DecBinary() - _ = yym575 + yym577 := z.DecBinary() + _ = yym577 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct576 := r.ContainerType() - if yyct576 == codecSelferValueTypeMap1234 { - yyl576 := r.ReadMapStart() - if yyl576 == 0 { + yyct578 := r.ContainerType() + if yyct578 == codecSelferValueTypeMap1234 { + yyl578 := r.ReadMapStart() + if yyl578 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl576, d) + x.codecDecodeSelfFromMap(yyl578, d) } - } else if yyct576 == codecSelferValueTypeArray1234 { - yyl576 := r.ReadArrayStart() - if yyl576 == 0 { + } else if yyct578 == codecSelferValueTypeArray1234 { + yyl578 := r.ReadArrayStart() + if yyl578 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl576, d) + x.codecDecodeSelfFromArray(yyl578, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -6894,12 +6916,12 @@ func (x *RollingUpdateDeployment) codecDecodeSelfFromMap(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys577Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys577Slc - var yyhl577 bool = l >= 0 - for yyj577 := 0; ; yyj577++ { - if yyhl577 { - if yyj577 >= l { + var yys579Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys579Slc + var yyhl579 bool = l >= 0 + for yyj579 := 0; ; yyj579++ { + if yyhl579 { + if yyj579 >= l { break } } else { @@ -6908,30 +6930,15 @@ func (x *RollingUpdateDeployment) codecDecodeSelfFromMap(l int, d *codec1978.Dec } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys577Slc = r.DecodeBytes(yys577Slc, true, true) - yys577 := string(yys577Slc) + yys579Slc = r.DecodeBytes(yys579Slc, true, true) + yys579 := string(yys579Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys577 { + switch yys579 { case "maxUnavailable": if r.TryDecodeAsNil() { x.MaxUnavailable = pkg6_intstr.IntOrString{} } else { - yyv578 := &x.MaxUnavailable - yym579 := z.DecBinary() - _ = yym579 - if false { - } else if z.HasExtensions() && z.DecExt(yyv578) { - } else if !yym579 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv578) - } else { - z.DecFallback(yyv578, false) - } - } - case "maxSurge": - if r.TryDecodeAsNil() { - x.MaxSurge = pkg6_intstr.IntOrString{} - } else { - yyv580 := &x.MaxSurge + yyv580 := &x.MaxUnavailable yym581 := z.DecBinary() _ = yym581 if false { @@ -6942,16 +6949,25 @@ func (x *RollingUpdateDeployment) codecDecodeSelfFromMap(l int, d *codec1978.Dec z.DecFallback(yyv580, false) } } - case "minReadySeconds": + case "maxSurge": if r.TryDecodeAsNil() { - x.MinReadySeconds = 0 + x.MaxSurge = pkg6_intstr.IntOrString{} } else { - x.MinReadySeconds = int(r.DecodeInt(codecSelferBitsize1234)) + yyv582 := &x.MaxSurge + yym583 := z.DecBinary() + _ = yym583 + if false { + } else if z.HasExtensions() && z.DecExt(yyv582) { + } else if !yym583 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv582) + } else { + z.DecFallback(yyv582, false) + } } default: - z.DecStructFieldNotFound(-1, yys577) - } // end switch yys577 - } // end for yyj577 + z.DecStructFieldNotFound(-1, yys579) + } // end switch yys579 + } // end for yyj579 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -6959,16 +6975,16 @@ func (x *RollingUpdateDeployment) codecDecodeSelfFromArray(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj583 int - var yyb583 bool - var yyhl583 bool = l >= 0 - yyj583++ - if yyhl583 { - yyb583 = yyj583 > l + var yyj584 int + var yyb584 bool + var yyhl584 bool = l >= 0 + yyj584++ + if yyhl584 { + yyb584 = yyj584 > l } else { - yyb583 = r.CheckBreak() + yyb584 = r.CheckBreak() } - if yyb583 { + if yyb584 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6976,24 +6992,24 @@ func (x *RollingUpdateDeployment) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.MaxUnavailable = pkg6_intstr.IntOrString{} } else { - yyv584 := &x.MaxUnavailable - yym585 := z.DecBinary() - _ = yym585 + yyv585 := &x.MaxUnavailable + yym586 := z.DecBinary() + _ = yym586 if false { - } else if z.HasExtensions() && z.DecExt(yyv584) { - } else if !yym585 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv584) + } else if z.HasExtensions() && z.DecExt(yyv585) { + } else if !yym586 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv585) } else { - z.DecFallback(yyv584, false) + z.DecFallback(yyv585, false) } } - yyj583++ - if yyhl583 { - yyb583 = yyj583 > l + yyj584++ + if yyhl584 { + yyb584 = yyj584 > l } else { - yyb583 = r.CheckBreak() + yyb584 = r.CheckBreak() } - if yyb583 { + if yyb584 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7001,45 +7017,29 @@ func (x *RollingUpdateDeployment) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.MaxSurge = pkg6_intstr.IntOrString{} } else { - yyv586 := &x.MaxSurge - yym587 := z.DecBinary() - _ = yym587 + yyv587 := &x.MaxSurge + yym588 := z.DecBinary() + _ = yym588 if false { - } else if z.HasExtensions() && z.DecExt(yyv586) { - } else if !yym587 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv586) + } else if z.HasExtensions() && z.DecExt(yyv587) { + } else if !yym588 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv587) } else { - z.DecFallback(yyv586, false) + z.DecFallback(yyv587, false) } } - yyj583++ - if yyhl583 { - yyb583 = yyj583 > l - } else { - yyb583 = r.CheckBreak() - } - if yyb583 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.MinReadySeconds = 0 - } else { - x.MinReadySeconds = int(r.DecodeInt(codecSelferBitsize1234)) - } for { - yyj583++ - if yyhl583 { - yyb583 = yyj583 > l + yyj584++ + if yyhl584 { + yyb584 = yyj584 > l } else { - yyb583 = r.CheckBreak() + yyb584 = r.CheckBreak() } - if yyb583 { + if yyb584 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj583-1, "") + z.DecStructFieldNotFound(yyj584-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17492,7 +17492,7 @@ func (x codecSelfer1234) decSliceDeployment(v *[]Deployment, d *codec1978.Decode yyrg1441 := len(yyv1441) > 0 yyv21441 := yyv1441 - yyrl1441, yyrt1441 = z.DecInferLen(yyl1441, z.DecBasicHandle().MaxInitLen, 632) + yyrl1441, yyrt1441 = z.DecInferLen(yyl1441, z.DecBasicHandle().MaxInitLen, 640) if yyrt1441 { if yyrl1441 <= cap(yyv1441) { yyv1441 = yyv1441[:yyrl1441] diff --git a/pkg/apis/extensions/types.go b/pkg/apis/extensions/types.go index 142d8e52f69..91e4d1b73be 100644 --- a/pkg/apis/extensions/types.go +++ b/pkg/apis/extensions/types.go @@ -243,6 +243,11 @@ type DeploymentSpec struct { // The deployment strategy to use to replace existing pods with new ones. Strategy DeploymentStrategy `json:"strategy,omitempty"` + // Minimum number of seconds for which a newly created pod should be ready + // without any of its container crashing, for it to be considered available. + // Defaults to 0 (pod will be considered available as soon as it is ready) + MinReadySeconds int `json:"minReadySeconds,omitempty"` + // The number of old ReplicationControllers to retain to allow rollback. // This is a pointer to distinguish between explicit zero and not specified. RevisionHistoryLimit *int `json:"revisionHistoryLimit,omitempty"` @@ -335,11 +340,6 @@ type RollingUpdateDeployment struct { // new RC can be scaled up further, ensuring that total number of pods running // at any time during the update is atmost 130% of original pods. MaxSurge intstr.IntOrString `json:"maxSurge,omitempty"` - - // Minimum number of seconds for which a newly created pod should be ready - // without any of its container crashing, for it to be considered available. - // Defaults to 0 (pod will be considered available as soon as it is ready) - MinReadySeconds int `json:"minReadySeconds,omitempty"` } type DeploymentStatus struct { diff --git a/pkg/apis/extensions/v1beta1/conversion.go b/pkg/apis/extensions/v1beta1/conversion.go index 330e34e911c..3ed3f446ba6 100644 --- a/pkg/apis/extensions/v1beta1/conversion.go +++ b/pkg/apis/extensions/v1beta1/conversion.go @@ -266,6 +266,7 @@ func Convert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec(in *extensions. } out.UniqueLabelKey = new(string) *out.UniqueLabelKey = in.UniqueLabelKey + out.MinReadySeconds = int32(in.MinReadySeconds) out.Paused = in.Paused if in.RollbackTo != nil { out.RollbackTo = new(RollbackConfig) @@ -304,6 +305,7 @@ func Convert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec(in *DeploymentS if in.UniqueLabelKey != nil { out.UniqueLabelKey = *in.UniqueLabelKey } + out.MinReadySeconds = int(in.MinReadySeconds) out.Paused = in.Paused if in.RollbackTo != nil { out.RollbackTo = new(extensions.RollbackConfig) @@ -362,7 +364,6 @@ func Convert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployme if err := s.Convert(&in.MaxSurge, out.MaxSurge, 0); err != nil { return err } - out.MinReadySeconds = int32(in.MinReadySeconds) return nil } @@ -376,7 +377,6 @@ func Convert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployme if err := s.Convert(in.MaxSurge, &out.MaxSurge, 0); err != nil { return err } - out.MinReadySeconds = int(in.MinReadySeconds) return nil } diff --git a/pkg/apis/extensions/v1beta1/conversion_generated.go b/pkg/apis/extensions/v1beta1/conversion_generated.go index 29afdcf664d..fd6c399ce45 100644 --- a/pkg/apis/extensions/v1beta1/conversion_generated.go +++ b/pkg/apis/extensions/v1beta1/conversion_generated.go @@ -2727,6 +2727,7 @@ func autoConvert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec(in *extensi if err := Convert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy(&in.Strategy, &out.Strategy, s); err != nil { return err } + out.MinReadySeconds = int32(in.MinReadySeconds) if in.RevisionHistoryLimit != nil { out.RevisionHistoryLimit = new(int32) *out.RevisionHistoryLimit = int32(*in.RevisionHistoryLimit) @@ -3430,7 +3431,6 @@ func autoConvert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDepl if err := s.Convert(&in.MaxSurge, &out.MaxSurge, 0); err != nil { return err } - out.MinReadySeconds = int32(in.MinReadySeconds) return nil } @@ -3902,6 +3902,7 @@ func autoConvert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec(in *Deploym if err := s.Convert(&in.Strategy, &out.Strategy, 0); err != nil { return err } + out.MinReadySeconds = int(in.MinReadySeconds) if in.RevisionHistoryLimit != nil { out.RevisionHistoryLimit = new(int) *out.RevisionHistoryLimit = int(*in.RevisionHistoryLimit) @@ -4608,7 +4609,6 @@ func autoConvert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDepl } // in.MaxUnavailable has no peer in out // in.MaxSurge has no peer in out - out.MinReadySeconds = int(in.MinReadySeconds) return nil } diff --git a/pkg/apis/extensions/v1beta1/deep_copy_generated.go b/pkg/apis/extensions/v1beta1/deep_copy_generated.go index 695908cd109..78e5b68a5f9 100644 --- a/pkg/apis/extensions/v1beta1/deep_copy_generated.go +++ b/pkg/apis/extensions/v1beta1/deep_copy_generated.go @@ -1167,6 +1167,7 @@ func deepCopy_v1beta1_DeploymentSpec(in DeploymentSpec, out *DeploymentSpec, c * if err := deepCopy_v1beta1_DeploymentStrategy(in.Strategy, &out.Strategy, c); err != nil { return err } + out.MinReadySeconds = in.MinReadySeconds if in.RevisionHistoryLimit != nil { out.RevisionHistoryLimit = new(int32) *out.RevisionHistoryLimit = *in.RevisionHistoryLimit @@ -1696,7 +1697,6 @@ func deepCopy_v1beta1_RollingUpdateDeployment(in RollingUpdateDeployment, out *R } else { out.MaxSurge = nil } - out.MinReadySeconds = in.MinReadySeconds return nil } diff --git a/pkg/apis/extensions/v1beta1/types.generated.go b/pkg/apis/extensions/v1beta1/types.generated.go index 4417dd0c90c..6c3a0f6765b 100644 --- a/pkg/apis/extensions/v1beta1/types.generated.go +++ b/pkg/apis/extensions/v1beta1/types.generated.go @@ -5426,19 +5426,20 @@ func (x *DeploymentSpec) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep453 := !z.EncBinary() yy2arr453 := z.EncBasicHandle().StructToArray - var yyq453 [8]bool + var yyq453 [9]bool _, _, _ = yysep453, yyq453, yy2arr453 const yyr453 bool = false yyq453[0] = x.Replicas != nil yyq453[1] = len(x.Selector) != 0 yyq453[3] = true - yyq453[4] = x.RevisionHistoryLimit != nil - yyq453[5] = x.UniqueLabelKey != nil - yyq453[6] = x.Paused != false - yyq453[7] = x.RollbackTo != nil + yyq453[4] = x.MinReadySeconds != 0 + yyq453[5] = x.RevisionHistoryLimit != nil + yyq453[6] = x.UniqueLabelKey != nil + yyq453[7] = x.Paused != false + yyq453[8] = x.RollbackTo != nil var yynn453 int if yyr453 || yy2arr453 { - r.EncodeArrayStart(8) + r.EncodeArrayStart(9) } else { yynn453 = 1 for _, b := range yyq453 { @@ -5548,50 +5549,40 @@ func (x *DeploymentSpec) CodecEncodeSelf(e *codec1978.Encoder) { if yyr453 || yy2arr453 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq453[4] { - if x.RevisionHistoryLimit == nil { - r.EncodeNil() + yym469 := z.EncBinary() + _ = yym469 + if false { } else { - yy469 := *x.RevisionHistoryLimit - yym470 := z.EncBinary() - _ = yym470 - if false { - } else { - r.EncodeInt(int64(yy469)) - } + r.EncodeInt(int64(x.MinReadySeconds)) } } else { - r.EncodeNil() + r.EncodeInt(0) } } else { if yyq453[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("revisionHistoryLimit")) + r.EncodeString(codecSelferC_UTF81234, string("minReadySeconds")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.RevisionHistoryLimit == nil { - r.EncodeNil() + yym470 := z.EncBinary() + _ = yym470 + if false { } else { - yy471 := *x.RevisionHistoryLimit - yym472 := z.EncBinary() - _ = yym472 - if false { - } else { - r.EncodeInt(int64(yy471)) - } + r.EncodeInt(int64(x.MinReadySeconds)) } } } if yyr453 || yy2arr453 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq453[5] { - if x.UniqueLabelKey == nil { + if x.RevisionHistoryLimit == nil { r.EncodeNil() } else { - yy474 := *x.UniqueLabelKey - yym475 := z.EncBinary() - _ = yym475 + yy472 := *x.RevisionHistoryLimit + yym473 := z.EncBinary() + _ = yym473 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(yy474)) + r.EncodeInt(int64(yy472)) } } } else { @@ -5600,17 +5591,17 @@ func (x *DeploymentSpec) CodecEncodeSelf(e *codec1978.Encoder) { } else { if yyq453[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("uniqueLabelKey")) + r.EncodeString(codecSelferC_UTF81234, string("revisionHistoryLimit")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.UniqueLabelKey == nil { + if x.RevisionHistoryLimit == nil { r.EncodeNil() } else { - yy476 := *x.UniqueLabelKey - yym477 := z.EncBinary() - _ = yym477 + yy474 := *x.RevisionHistoryLimit + yym475 := z.EncBinary() + _ = yym475 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(yy476)) + r.EncodeInt(int64(yy474)) } } } @@ -5618,8 +5609,43 @@ func (x *DeploymentSpec) CodecEncodeSelf(e *codec1978.Encoder) { if yyr453 || yy2arr453 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq453[6] { - yym479 := z.EncBinary() - _ = yym479 + if x.UniqueLabelKey == nil { + r.EncodeNil() + } else { + yy477 := *x.UniqueLabelKey + yym478 := z.EncBinary() + _ = yym478 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(yy477)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq453[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("uniqueLabelKey")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.UniqueLabelKey == nil { + r.EncodeNil() + } else { + yy479 := *x.UniqueLabelKey + yym480 := z.EncBinary() + _ = yym480 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(yy479)) + } + } + } + } + if yyr453 || yy2arr453 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq453[7] { + yym482 := z.EncBinary() + _ = yym482 if false { } else { r.EncodeBool(bool(x.Paused)) @@ -5628,12 +5654,12 @@ func (x *DeploymentSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq453[6] { + if yyq453[7] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("paused")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym480 := z.EncBinary() - _ = yym480 + yym483 := z.EncBinary() + _ = yym483 if false { } else { r.EncodeBool(bool(x.Paused)) @@ -5642,7 +5668,7 @@ func (x *DeploymentSpec) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr453 || yy2arr453 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq453[7] { + if yyq453[8] { if x.RollbackTo == nil { r.EncodeNil() } else { @@ -5652,7 +5678,7 @@ func (x *DeploymentSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq453[7] { + if yyq453[8] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("rollbackTo")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -5676,25 +5702,25 @@ func (x *DeploymentSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym482 := z.DecBinary() - _ = yym482 + yym485 := z.DecBinary() + _ = yym485 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct483 := r.ContainerType() - if yyct483 == codecSelferValueTypeMap1234 { - yyl483 := r.ReadMapStart() - if yyl483 == 0 { + yyct486 := r.ContainerType() + if yyct486 == codecSelferValueTypeMap1234 { + yyl486 := r.ReadMapStart() + if yyl486 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl483, d) + x.codecDecodeSelfFromMap(yyl486, d) } - } else if yyct483 == codecSelferValueTypeArray1234 { - yyl483 := r.ReadArrayStart() - if yyl483 == 0 { + } else if yyct486 == codecSelferValueTypeArray1234 { + yyl486 := r.ReadArrayStart() + if yyl486 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl483, d) + x.codecDecodeSelfFromArray(yyl486, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -5706,12 +5732,12 @@ func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys484Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys484Slc - var yyhl484 bool = l >= 0 - for yyj484 := 0; ; yyj484++ { - if yyhl484 { - if yyj484 >= l { + var yys487Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys487Slc + var yyhl487 bool = l >= 0 + for yyj487 := 0; ; yyj487++ { + if yyhl487 { + if yyj487 >= l { break } } else { @@ -5720,10 +5746,10 @@ func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys484Slc = r.DecodeBytes(yys484Slc, true, true) - yys484 := string(yys484Slc) + yys487Slc = r.DecodeBytes(yys487Slc, true, true) + yys487 := string(yys487Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys484 { + switch yys487 { case "replicas": if r.TryDecodeAsNil() { if x.Replicas != nil { @@ -5733,8 +5759,8 @@ func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.Replicas == nil { x.Replicas = new(int32) } - yym486 := z.DecBinary() - _ = yym486 + yym489 := z.DecBinary() + _ = yym489 if false { } else { *((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) @@ -5744,27 +5770,33 @@ func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Selector = nil } else { - yyv487 := &x.Selector - yym488 := z.DecBinary() - _ = yym488 + yyv490 := &x.Selector + yym491 := z.DecBinary() + _ = yym491 if false { } else { - z.F.DecMapStringStringX(yyv487, false, d) + z.F.DecMapStringStringX(yyv490, false, d) } } case "template": if r.TryDecodeAsNil() { x.Template = pkg2_v1.PodTemplateSpec{} } else { - yyv489 := &x.Template - yyv489.CodecDecodeSelf(d) + yyv492 := &x.Template + yyv492.CodecDecodeSelf(d) } case "strategy": if r.TryDecodeAsNil() { x.Strategy = DeploymentStrategy{} } else { - yyv490 := &x.Strategy - yyv490.CodecDecodeSelf(d) + yyv493 := &x.Strategy + yyv493.CodecDecodeSelf(d) + } + case "minReadySeconds": + if r.TryDecodeAsNil() { + x.MinReadySeconds = 0 + } else { + x.MinReadySeconds = int32(r.DecodeInt(32)) } case "revisionHistoryLimit": if r.TryDecodeAsNil() { @@ -5775,8 +5807,8 @@ func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.RevisionHistoryLimit == nil { x.RevisionHistoryLimit = new(int32) } - yym492 := z.DecBinary() - _ = yym492 + yym496 := z.DecBinary() + _ = yym496 if false { } else { *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32)) @@ -5791,8 +5823,8 @@ func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.UniqueLabelKey == nil { x.UniqueLabelKey = new(string) } - yym494 := z.DecBinary() - _ = yym494 + yym498 := z.DecBinary() + _ = yym498 if false { } else { *((*string)(x.UniqueLabelKey)) = r.DecodeString() @@ -5816,9 +5848,9 @@ func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.RollbackTo.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys484) - } // end switch yys484 - } // end for yyj484 + z.DecStructFieldNotFound(-1, yys487) + } // end switch yys487 + } // end for yyj487 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -5826,16 +5858,16 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj497 int - var yyb497 bool - var yyhl497 bool = l >= 0 - yyj497++ - if yyhl497 { - yyb497 = yyj497 > l + var yyj501 int + var yyb501 bool + var yyhl501 bool = l >= 0 + yyj501++ + if yyhl501 { + yyb501 = yyj501 > l } else { - yyb497 = r.CheckBreak() + yyb501 = r.CheckBreak() } - if yyb497 { + if yyb501 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5848,20 +5880,20 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.Replicas == nil { x.Replicas = new(int32) } - yym499 := z.DecBinary() - _ = yym499 + yym503 := z.DecBinary() + _ = yym503 if false { } else { *((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) } } - yyj497++ - if yyhl497 { - yyb497 = yyj497 > l + yyj501++ + if yyhl501 { + yyb501 = yyj501 > l } else { - yyb497 = r.CheckBreak() + yyb501 = r.CheckBreak() } - if yyb497 { + if yyb501 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5869,21 +5901,21 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Selector = nil } else { - yyv500 := &x.Selector - yym501 := z.DecBinary() - _ = yym501 + yyv504 := &x.Selector + yym505 := z.DecBinary() + _ = yym505 if false { } else { - z.F.DecMapStringStringX(yyv500, false, d) + z.F.DecMapStringStringX(yyv504, false, d) } } - yyj497++ - if yyhl497 { - yyb497 = yyj497 > l + yyj501++ + if yyhl501 { + yyb501 = yyj501 > l } else { - yyb497 = r.CheckBreak() + yyb501 = r.CheckBreak() } - if yyb497 { + if yyb501 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5891,16 +5923,16 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Template = pkg2_v1.PodTemplateSpec{} } else { - yyv502 := &x.Template - yyv502.CodecDecodeSelf(d) + yyv506 := &x.Template + yyv506.CodecDecodeSelf(d) } - yyj497++ - if yyhl497 { - yyb497 = yyj497 > l + yyj501++ + if yyhl501 { + yyb501 = yyj501 > l } else { - yyb497 = r.CheckBreak() + yyb501 = r.CheckBreak() } - if yyb497 { + if yyb501 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5908,16 +5940,32 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Strategy = DeploymentStrategy{} } else { - yyv503 := &x.Strategy - yyv503.CodecDecodeSelf(d) + yyv507 := &x.Strategy + yyv507.CodecDecodeSelf(d) } - yyj497++ - if yyhl497 { - yyb497 = yyj497 > l + yyj501++ + if yyhl501 { + yyb501 = yyj501 > l } else { - yyb497 = r.CheckBreak() + yyb501 = r.CheckBreak() } - if yyb497 { + if yyb501 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.MinReadySeconds = 0 + } else { + x.MinReadySeconds = int32(r.DecodeInt(32)) + } + yyj501++ + if yyhl501 { + yyb501 = yyj501 > l + } else { + yyb501 = r.CheckBreak() + } + if yyb501 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5930,20 +5978,20 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.RevisionHistoryLimit == nil { x.RevisionHistoryLimit = new(int32) } - yym505 := z.DecBinary() - _ = yym505 + yym510 := z.DecBinary() + _ = yym510 if false { } else { *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32)) } } - yyj497++ - if yyhl497 { - yyb497 = yyj497 > l + yyj501++ + if yyhl501 { + yyb501 = yyj501 > l } else { - yyb497 = r.CheckBreak() + yyb501 = r.CheckBreak() } - if yyb497 { + if yyb501 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5956,20 +6004,20 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.UniqueLabelKey == nil { x.UniqueLabelKey = new(string) } - yym507 := z.DecBinary() - _ = yym507 + yym512 := z.DecBinary() + _ = yym512 if false { } else { *((*string)(x.UniqueLabelKey)) = r.DecodeString() } } - yyj497++ - if yyhl497 { - yyb497 = yyj497 > l + yyj501++ + if yyhl501 { + yyb501 = yyj501 > l } else { - yyb497 = r.CheckBreak() + yyb501 = r.CheckBreak() } - if yyb497 { + if yyb501 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5979,13 +6027,13 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Paused = bool(r.DecodeBool()) } - yyj497++ - if yyhl497 { - yyb497 = yyj497 > l + yyj501++ + if yyhl501 { + yyb501 = yyj501 > l } else { - yyb497 = r.CheckBreak() + yyb501 = r.CheckBreak() } - if yyb497 { + if yyb501 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6001,17 +6049,17 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.RollbackTo.CodecDecodeSelf(d) } for { - yyj497++ - if yyhl497 { - yyb497 = yyj497 > l + yyj501++ + if yyhl501 { + yyb501 = yyj501 > l } else { - yyb497 = r.CheckBreak() + yyb501 = r.CheckBreak() } - if yyb497 { + if yyb501 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj497-1, "") + z.DecStructFieldNotFound(yyj501-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -6023,37 +6071,37 @@ func (x *DeploymentRollback) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym510 := z.EncBinary() - _ = yym510 + yym515 := z.EncBinary() + _ = yym515 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep511 := !z.EncBinary() - yy2arr511 := z.EncBasicHandle().StructToArray - var yyq511 [5]bool - _, _, _ = yysep511, yyq511, yy2arr511 - const yyr511 bool = false - yyq511[0] = x.Kind != "" - yyq511[1] = x.APIVersion != "" - yyq511[3] = len(x.UpdatedAnnotations) != 0 - var yynn511 int - if yyr511 || yy2arr511 { + yysep516 := !z.EncBinary() + yy2arr516 := z.EncBasicHandle().StructToArray + var yyq516 [5]bool + _, _, _ = yysep516, yyq516, yy2arr516 + const yyr516 bool = false + yyq516[0] = x.Kind != "" + yyq516[1] = x.APIVersion != "" + yyq516[3] = len(x.UpdatedAnnotations) != 0 + var yynn516 int + if yyr516 || yy2arr516 { r.EncodeArrayStart(5) } else { - yynn511 = 2 - for _, b := range yyq511 { + yynn516 = 2 + for _, b := range yyq516 { if b { - yynn511++ + yynn516++ } } - r.EncodeMapStart(yynn511) - yynn511 = 0 + r.EncodeMapStart(yynn516) + yynn516 = 0 } - if yyr511 || yy2arr511 { + if yyr516 || yy2arr516 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq511[0] { - yym513 := z.EncBinary() - _ = yym513 + if yyq516[0] { + yym518 := z.EncBinary() + _ = yym518 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -6062,23 +6110,23 @@ func (x *DeploymentRollback) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq511[0] { + if yyq516[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym514 := z.EncBinary() - _ = yym514 + yym519 := z.EncBinary() + _ = yym519 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr511 || yy2arr511 { + if yyr516 || yy2arr516 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq511[1] { - yym516 := z.EncBinary() - _ = yym516 + if yyq516[1] { + yym521 := z.EncBinary() + _ = yym521 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -6087,22 +6135,22 @@ func (x *DeploymentRollback) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq511[1] { + if yyq516[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym517 := z.EncBinary() - _ = yym517 + yym522 := z.EncBinary() + _ = yym522 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr511 || yy2arr511 { + if yyr516 || yy2arr516 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym519 := z.EncBinary() - _ = yym519 + yym524 := z.EncBinary() + _ = yym524 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -6111,21 +6159,21 @@ func (x *DeploymentRollback) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym520 := z.EncBinary() - _ = yym520 + yym525 := z.EncBinary() + _ = yym525 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } - if yyr511 || yy2arr511 { + if yyr516 || yy2arr516 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq511[3] { + if yyq516[3] { if x.UpdatedAnnotations == nil { r.EncodeNil() } else { - yym522 := z.EncBinary() - _ = yym522 + yym527 := z.EncBinary() + _ = yym527 if false { } else { z.F.EncMapStringStringV(x.UpdatedAnnotations, false, e) @@ -6135,15 +6183,15 @@ func (x *DeploymentRollback) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq511[3] { + if yyq516[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("updatedAnnotations")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.UpdatedAnnotations == nil { r.EncodeNil() } else { - yym523 := z.EncBinary() - _ = yym523 + yym528 := z.EncBinary() + _ = yym528 if false { } else { z.F.EncMapStringStringV(x.UpdatedAnnotations, false, e) @@ -6151,18 +6199,18 @@ func (x *DeploymentRollback) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr511 || yy2arr511 { + if yyr516 || yy2arr516 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy525 := &x.RollbackTo - yy525.CodecEncodeSelf(e) + yy530 := &x.RollbackTo + yy530.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("rollbackTo")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy526 := &x.RollbackTo - yy526.CodecEncodeSelf(e) + yy531 := &x.RollbackTo + yy531.CodecEncodeSelf(e) } - if yyr511 || yy2arr511 { + if yyr516 || yy2arr516 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -6175,25 +6223,25 @@ func (x *DeploymentRollback) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym527 := z.DecBinary() - _ = yym527 + yym532 := z.DecBinary() + _ = yym532 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct528 := r.ContainerType() - if yyct528 == codecSelferValueTypeMap1234 { - yyl528 := r.ReadMapStart() - if yyl528 == 0 { + yyct533 := r.ContainerType() + if yyct533 == codecSelferValueTypeMap1234 { + yyl533 := r.ReadMapStart() + if yyl533 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl528, d) + x.codecDecodeSelfFromMap(yyl533, d) } - } else if yyct528 == codecSelferValueTypeArray1234 { - yyl528 := r.ReadArrayStart() - if yyl528 == 0 { + } else if yyct533 == codecSelferValueTypeArray1234 { + yyl533 := r.ReadArrayStart() + if yyl533 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl528, d) + x.codecDecodeSelfFromArray(yyl533, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -6205,12 +6253,12 @@ func (x *DeploymentRollback) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys529Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys529Slc - var yyhl529 bool = l >= 0 - for yyj529 := 0; ; yyj529++ { - if yyhl529 { - if yyj529 >= l { + var yys534Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys534Slc + var yyhl534 bool = l >= 0 + for yyj534 := 0; ; yyj534++ { + if yyhl534 { + if yyj534 >= l { break } } else { @@ -6219,10 +6267,10 @@ func (x *DeploymentRollback) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys529Slc = r.DecodeBytes(yys529Slc, true, true) - yys529 := string(yys529Slc) + yys534Slc = r.DecodeBytes(yys534Slc, true, true) + yys534 := string(yys534Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys529 { + switch yys534 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -6245,25 +6293,25 @@ func (x *DeploymentRollback) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.UpdatedAnnotations = nil } else { - yyv533 := &x.UpdatedAnnotations - yym534 := z.DecBinary() - _ = yym534 + yyv538 := &x.UpdatedAnnotations + yym539 := z.DecBinary() + _ = yym539 if false { } else { - z.F.DecMapStringStringX(yyv533, false, d) + z.F.DecMapStringStringX(yyv538, false, d) } } case "rollbackTo": if r.TryDecodeAsNil() { x.RollbackTo = RollbackConfig{} } else { - yyv535 := &x.RollbackTo - yyv535.CodecDecodeSelf(d) + yyv540 := &x.RollbackTo + yyv540.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys529) - } // end switch yys529 - } // end for yyj529 + z.DecStructFieldNotFound(-1, yys534) + } // end switch yys534 + } // end for yyj534 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -6271,16 +6319,16 @@ func (x *DeploymentRollback) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj536 int - var yyb536 bool - var yyhl536 bool = l >= 0 - yyj536++ - if yyhl536 { - yyb536 = yyj536 > l + var yyj541 int + var yyb541 bool + var yyhl541 bool = l >= 0 + yyj541++ + if yyhl541 { + yyb541 = yyj541 > l } else { - yyb536 = r.CheckBreak() + yyb541 = r.CheckBreak() } - if yyb536 { + if yyb541 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6290,13 +6338,13 @@ func (x *DeploymentRollback) codecDecodeSelfFromArray(l int, d *codec1978.Decode } else { x.Kind = string(r.DecodeString()) } - yyj536++ - if yyhl536 { - yyb536 = yyj536 > l + yyj541++ + if yyhl541 { + yyb541 = yyj541 > l } else { - yyb536 = r.CheckBreak() + yyb541 = r.CheckBreak() } - if yyb536 { + if yyb541 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6306,13 +6354,13 @@ func (x *DeploymentRollback) codecDecodeSelfFromArray(l int, d *codec1978.Decode } else { x.APIVersion = string(r.DecodeString()) } - yyj536++ - if yyhl536 { - yyb536 = yyj536 > l + yyj541++ + if yyhl541 { + yyb541 = yyj541 > l } else { - yyb536 = r.CheckBreak() + yyb541 = r.CheckBreak() } - if yyb536 { + if yyb541 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6322,13 +6370,13 @@ func (x *DeploymentRollback) codecDecodeSelfFromArray(l int, d *codec1978.Decode } else { x.Name = string(r.DecodeString()) } - yyj536++ - if yyhl536 { - yyb536 = yyj536 > l + yyj541++ + if yyhl541 { + yyb541 = yyj541 > l } else { - yyb536 = r.CheckBreak() + yyb541 = r.CheckBreak() } - if yyb536 { + if yyb541 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6336,21 +6384,21 @@ func (x *DeploymentRollback) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.UpdatedAnnotations = nil } else { - yyv540 := &x.UpdatedAnnotations - yym541 := z.DecBinary() - _ = yym541 + yyv545 := &x.UpdatedAnnotations + yym546 := z.DecBinary() + _ = yym546 if false { } else { - z.F.DecMapStringStringX(yyv540, false, d) + z.F.DecMapStringStringX(yyv545, false, d) } } - yyj536++ - if yyhl536 { - yyb536 = yyj536 > l + yyj541++ + if yyhl541 { + yyb541 = yyj541 > l } else { - yyb536 = r.CheckBreak() + yyb541 = r.CheckBreak() } - if yyb536 { + if yyb541 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6358,21 +6406,21 @@ func (x *DeploymentRollback) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.RollbackTo = RollbackConfig{} } else { - yyv542 := &x.RollbackTo - yyv542.CodecDecodeSelf(d) + yyv547 := &x.RollbackTo + yyv547.CodecDecodeSelf(d) } for { - yyj536++ - if yyhl536 { - yyb536 = yyj536 > l + yyj541++ + if yyhl541 { + yyb541 = yyj541 > l } else { - yyb536 = r.CheckBreak() + yyb541 = r.CheckBreak() } - if yyb536 { + if yyb541 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj536-1, "") + z.DecStructFieldNotFound(yyj541-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -6384,35 +6432,35 @@ func (x *RollbackConfig) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym543 := z.EncBinary() - _ = yym543 + yym548 := z.EncBinary() + _ = yym548 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep544 := !z.EncBinary() - yy2arr544 := z.EncBasicHandle().StructToArray - var yyq544 [1]bool - _, _, _ = yysep544, yyq544, yy2arr544 - const yyr544 bool = false - yyq544[0] = x.Revision != 0 - var yynn544 int - if yyr544 || yy2arr544 { + yysep549 := !z.EncBinary() + yy2arr549 := z.EncBasicHandle().StructToArray + var yyq549 [1]bool + _, _, _ = yysep549, yyq549, yy2arr549 + const yyr549 bool = false + yyq549[0] = x.Revision != 0 + var yynn549 int + if yyr549 || yy2arr549 { r.EncodeArrayStart(1) } else { - yynn544 = 0 - for _, b := range yyq544 { + yynn549 = 0 + for _, b := range yyq549 { if b { - yynn544++ + yynn549++ } } - r.EncodeMapStart(yynn544) - yynn544 = 0 + r.EncodeMapStart(yynn549) + yynn549 = 0 } - if yyr544 || yy2arr544 { + if yyr549 || yy2arr549 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq544[0] { - yym546 := z.EncBinary() - _ = yym546 + if yyq549[0] { + yym551 := z.EncBinary() + _ = yym551 if false { } else { r.EncodeInt(int64(x.Revision)) @@ -6421,19 +6469,19 @@ func (x *RollbackConfig) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq544[0] { + if yyq549[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("revision")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym547 := z.EncBinary() - _ = yym547 + yym552 := z.EncBinary() + _ = yym552 if false { } else { r.EncodeInt(int64(x.Revision)) } } } - if yyr544 || yy2arr544 { + if yyr549 || yy2arr549 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -6446,25 +6494,25 @@ func (x *RollbackConfig) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym548 := z.DecBinary() - _ = yym548 + yym553 := z.DecBinary() + _ = yym553 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct549 := r.ContainerType() - if yyct549 == codecSelferValueTypeMap1234 { - yyl549 := r.ReadMapStart() - if yyl549 == 0 { + yyct554 := r.ContainerType() + if yyct554 == codecSelferValueTypeMap1234 { + yyl554 := r.ReadMapStart() + if yyl554 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl549, d) + x.codecDecodeSelfFromMap(yyl554, d) } - } else if yyct549 == codecSelferValueTypeArray1234 { - yyl549 := r.ReadArrayStart() - if yyl549 == 0 { + } else if yyct554 == codecSelferValueTypeArray1234 { + yyl554 := r.ReadArrayStart() + if yyl554 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl549, d) + x.codecDecodeSelfFromArray(yyl554, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -6476,12 +6524,12 @@ func (x *RollbackConfig) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys550Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys550Slc - var yyhl550 bool = l >= 0 - for yyj550 := 0; ; yyj550++ { - if yyhl550 { - if yyj550 >= l { + var yys555Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys555Slc + var yyhl555 bool = l >= 0 + for yyj555 := 0; ; yyj555++ { + if yyhl555 { + if yyj555 >= l { break } } else { @@ -6490,10 +6538,10 @@ func (x *RollbackConfig) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys550Slc = r.DecodeBytes(yys550Slc, true, true) - yys550 := string(yys550Slc) + yys555Slc = r.DecodeBytes(yys555Slc, true, true) + yys555 := string(yys555Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys550 { + switch yys555 { case "revision": if r.TryDecodeAsNil() { x.Revision = 0 @@ -6501,9 +6549,9 @@ func (x *RollbackConfig) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Revision = int64(r.DecodeInt(64)) } default: - z.DecStructFieldNotFound(-1, yys550) - } // end switch yys550 - } // end for yyj550 + z.DecStructFieldNotFound(-1, yys555) + } // end switch yys555 + } // end for yyj555 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -6511,16 +6559,16 @@ func (x *RollbackConfig) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj552 int - var yyb552 bool - var yyhl552 bool = l >= 0 - yyj552++ - if yyhl552 { - yyb552 = yyj552 > l + var yyj557 int + var yyb557 bool + var yyhl557 bool = l >= 0 + yyj557++ + if yyhl557 { + yyb557 = yyj557 > l } else { - yyb552 = r.CheckBreak() + yyb557 = r.CheckBreak() } - if yyb552 { + if yyb557 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6531,17 +6579,17 @@ func (x *RollbackConfig) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Revision = int64(r.DecodeInt(64)) } for { - yyj552++ - if yyhl552 { - yyb552 = yyj552 > l + yyj557++ + if yyhl557 { + yyb557 = yyj557 > l } else { - yyb552 = r.CheckBreak() + yyb557 = r.CheckBreak() } - if yyb552 { + if yyb557 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj552-1, "") + z.DecStructFieldNotFound(yyj557-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -6553,49 +6601,49 @@ func (x *DeploymentStrategy) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym554 := z.EncBinary() - _ = yym554 + yym559 := z.EncBinary() + _ = yym559 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep555 := !z.EncBinary() - yy2arr555 := z.EncBasicHandle().StructToArray - var yyq555 [2]bool - _, _, _ = yysep555, yyq555, yy2arr555 - const yyr555 bool = false - yyq555[0] = x.Type != "" - yyq555[1] = x.RollingUpdate != nil - var yynn555 int - if yyr555 || yy2arr555 { + yysep560 := !z.EncBinary() + yy2arr560 := z.EncBasicHandle().StructToArray + var yyq560 [2]bool + _, _, _ = yysep560, yyq560, yy2arr560 + const yyr560 bool = false + yyq560[0] = x.Type != "" + yyq560[1] = x.RollingUpdate != nil + var yynn560 int + if yyr560 || yy2arr560 { r.EncodeArrayStart(2) } else { - yynn555 = 0 - for _, b := range yyq555 { + yynn560 = 0 + for _, b := range yyq560 { if b { - yynn555++ + yynn560++ } } - r.EncodeMapStart(yynn555) - yynn555 = 0 + r.EncodeMapStart(yynn560) + yynn560 = 0 } - if yyr555 || yy2arr555 { + if yyr560 || yy2arr560 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq555[0] { + if yyq560[0] { x.Type.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq555[0] { + if yyq560[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("type")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } } - if yyr555 || yy2arr555 { + if yyr560 || yy2arr560 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq555[1] { + if yyq560[1] { if x.RollingUpdate == nil { r.EncodeNil() } else { @@ -6605,7 +6653,7 @@ func (x *DeploymentStrategy) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq555[1] { + if yyq560[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("rollingUpdate")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -6616,7 +6664,7 @@ func (x *DeploymentStrategy) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr555 || yy2arr555 { + if yyr560 || yy2arr560 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -6629,25 +6677,25 @@ func (x *DeploymentStrategy) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym558 := z.DecBinary() - _ = yym558 + yym563 := z.DecBinary() + _ = yym563 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct559 := r.ContainerType() - if yyct559 == codecSelferValueTypeMap1234 { - yyl559 := r.ReadMapStart() - if yyl559 == 0 { + yyct564 := r.ContainerType() + if yyct564 == codecSelferValueTypeMap1234 { + yyl564 := r.ReadMapStart() + if yyl564 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl559, d) + x.codecDecodeSelfFromMap(yyl564, d) } - } else if yyct559 == codecSelferValueTypeArray1234 { - yyl559 := r.ReadArrayStart() - if yyl559 == 0 { + } else if yyct564 == codecSelferValueTypeArray1234 { + yyl564 := r.ReadArrayStart() + if yyl564 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl559, d) + x.codecDecodeSelfFromArray(yyl564, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -6659,12 +6707,12 @@ func (x *DeploymentStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys560Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys560Slc - var yyhl560 bool = l >= 0 - for yyj560 := 0; ; yyj560++ { - if yyhl560 { - if yyj560 >= l { + var yys565Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys565Slc + var yyhl565 bool = l >= 0 + for yyj565 := 0; ; yyj565++ { + if yyhl565 { + if yyj565 >= l { break } } else { @@ -6673,10 +6721,10 @@ func (x *DeploymentStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys560Slc = r.DecodeBytes(yys560Slc, true, true) - yys560 := string(yys560Slc) + yys565Slc = r.DecodeBytes(yys565Slc, true, true) + yys565 := string(yys565Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys560 { + switch yys565 { case "type": if r.TryDecodeAsNil() { x.Type = "" @@ -6695,9 +6743,9 @@ func (x *DeploymentStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) x.RollingUpdate.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys560) - } // end switch yys560 - } // end for yyj560 + z.DecStructFieldNotFound(-1, yys565) + } // end switch yys565 + } // end for yyj565 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -6705,16 +6753,16 @@ func (x *DeploymentStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj563 int - var yyb563 bool - var yyhl563 bool = l >= 0 - yyj563++ - if yyhl563 { - yyb563 = yyj563 > l + var yyj568 int + var yyb568 bool + var yyhl568 bool = l >= 0 + yyj568++ + if yyhl568 { + yyb568 = yyj568 > l } else { - yyb563 = r.CheckBreak() + yyb568 = r.CheckBreak() } - if yyb563 { + if yyb568 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6724,13 +6772,13 @@ func (x *DeploymentStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decode } else { x.Type = DeploymentStrategyType(r.DecodeString()) } - yyj563++ - if yyhl563 { - yyb563 = yyj563 > l + yyj568++ + if yyhl568 { + yyb568 = yyj568 > l } else { - yyb563 = r.CheckBreak() + yyb568 = r.CheckBreak() } - if yyb563 { + if yyb568 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6746,17 +6794,17 @@ func (x *DeploymentStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decode x.RollingUpdate.CodecDecodeSelf(d) } for { - yyj563++ - if yyhl563 { - yyb563 = yyj563 > l + yyj568++ + if yyhl568 { + yyb568 = yyj568 > l } else { - yyb563 = r.CheckBreak() + yyb568 = r.CheckBreak() } - if yyb563 { + if yyb568 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj563-1, "") + z.DecStructFieldNotFound(yyj568-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -6765,8 +6813,8 @@ func (x DeploymentStrategyType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym566 := z.EncBinary() - _ = yym566 + yym571 := z.EncBinary() + _ = yym571 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -6778,8 +6826,8 @@ func (x *DeploymentStrategyType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym567 := z.DecBinary() - _ = yym567 + yym572 := z.DecBinary() + _ = yym572 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -6794,43 +6842,42 @@ func (x *RollingUpdateDeployment) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym568 := z.EncBinary() - _ = yym568 + yym573 := z.EncBinary() + _ = yym573 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep569 := !z.EncBinary() - yy2arr569 := z.EncBasicHandle().StructToArray - var yyq569 [3]bool - _, _, _ = yysep569, yyq569, yy2arr569 - const yyr569 bool = false - yyq569[0] = x.MaxUnavailable != nil - yyq569[1] = x.MaxSurge != nil - yyq569[2] = x.MinReadySeconds != 0 - var yynn569 int - if yyr569 || yy2arr569 { - r.EncodeArrayStart(3) + yysep574 := !z.EncBinary() + yy2arr574 := z.EncBasicHandle().StructToArray + var yyq574 [2]bool + _, _, _ = yysep574, yyq574, yy2arr574 + const yyr574 bool = false + yyq574[0] = x.MaxUnavailable != nil + yyq574[1] = x.MaxSurge != nil + var yynn574 int + if yyr574 || yy2arr574 { + r.EncodeArrayStart(2) } else { - yynn569 = 0 - for _, b := range yyq569 { + yynn574 = 0 + for _, b := range yyq574 { if b { - yynn569++ + yynn574++ } } - r.EncodeMapStart(yynn569) - yynn569 = 0 + r.EncodeMapStart(yynn574) + yynn574 = 0 } - if yyr569 || yy2arr569 { + if yyr574 || yy2arr574 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq569[0] { + if yyq574[0] { if x.MaxUnavailable == nil { r.EncodeNil() } else { - yym571 := z.EncBinary() - _ = yym571 + yym576 := z.EncBinary() + _ = yym576 if false { } else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) { - } else if !yym571 && z.IsJSONHandle() { + } else if !yym576 && z.IsJSONHandle() { z.EncJSONMarshal(x.MaxUnavailable) } else { z.EncFallback(x.MaxUnavailable) @@ -6840,18 +6887,18 @@ func (x *RollingUpdateDeployment) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq569[0] { + if yyq574[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("maxUnavailable")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.MaxUnavailable == nil { r.EncodeNil() } else { - yym572 := z.EncBinary() - _ = yym572 + yym577 := z.EncBinary() + _ = yym577 if false { } else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) { - } else if !yym572 && z.IsJSONHandle() { + } else if !yym577 && z.IsJSONHandle() { z.EncJSONMarshal(x.MaxUnavailable) } else { z.EncFallback(x.MaxUnavailable) @@ -6859,17 +6906,17 @@ func (x *RollingUpdateDeployment) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr569 || yy2arr569 { + if yyr574 || yy2arr574 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq569[1] { + if yyq574[1] { if x.MaxSurge == nil { r.EncodeNil() } else { - yym574 := z.EncBinary() - _ = yym574 + yym579 := z.EncBinary() + _ = yym579 if false { } else if z.HasExtensions() && z.EncExt(x.MaxSurge) { - } else if !yym574 && z.IsJSONHandle() { + } else if !yym579 && z.IsJSONHandle() { z.EncJSONMarshal(x.MaxSurge) } else { z.EncFallback(x.MaxSurge) @@ -6879,18 +6926,18 @@ func (x *RollingUpdateDeployment) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq569[1] { + if yyq574[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("maxSurge")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.MaxSurge == nil { r.EncodeNil() } else { - yym575 := z.EncBinary() - _ = yym575 + yym580 := z.EncBinary() + _ = yym580 if false { } else if z.HasExtensions() && z.EncExt(x.MaxSurge) { - } else if !yym575 && z.IsJSONHandle() { + } else if !yym580 && z.IsJSONHandle() { z.EncJSONMarshal(x.MaxSurge) } else { z.EncFallback(x.MaxSurge) @@ -6898,32 +6945,7 @@ func (x *RollingUpdateDeployment) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr569 || yy2arr569 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq569[2] { - yym577 := z.EncBinary() - _ = yym577 - if false { - } else { - r.EncodeInt(int64(x.MinReadySeconds)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq569[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("minReadySeconds")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym578 := z.EncBinary() - _ = yym578 - if false { - } else { - r.EncodeInt(int64(x.MinReadySeconds)) - } - } - } - if yyr569 || yy2arr569 { + if yyr574 || yy2arr574 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -6936,25 +6958,25 @@ func (x *RollingUpdateDeployment) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym579 := z.DecBinary() - _ = yym579 + yym581 := z.DecBinary() + _ = yym581 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct580 := r.ContainerType() - if yyct580 == codecSelferValueTypeMap1234 { - yyl580 := r.ReadMapStart() - if yyl580 == 0 { + yyct582 := r.ContainerType() + if yyct582 == codecSelferValueTypeMap1234 { + yyl582 := r.ReadMapStart() + if yyl582 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl580, d) + x.codecDecodeSelfFromMap(yyl582, d) } - } else if yyct580 == codecSelferValueTypeArray1234 { - yyl580 := r.ReadArrayStart() - if yyl580 == 0 { + } else if yyct582 == codecSelferValueTypeArray1234 { + yyl582 := r.ReadArrayStart() + if yyl582 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl580, d) + x.codecDecodeSelfFromArray(yyl582, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -6966,12 +6988,12 @@ func (x *RollingUpdateDeployment) codecDecodeSelfFromMap(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys581Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys581Slc - var yyhl581 bool = l >= 0 - for yyj581 := 0; ; yyj581++ { - if yyhl581 { - if yyj581 >= l { + var yys583Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys583Slc + var yyhl583 bool = l >= 0 + for yyj583 := 0; ; yyj583++ { + if yyhl583 { + if yyj583 >= l { break } } else { @@ -6980,10 +7002,10 @@ func (x *RollingUpdateDeployment) codecDecodeSelfFromMap(l int, d *codec1978.Dec } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys581Slc = r.DecodeBytes(yys581Slc, true, true) - yys581 := string(yys581Slc) + yys583Slc = r.DecodeBytes(yys583Slc, true, true) + yys583 := string(yys583Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys581 { + switch yys583 { case "maxUnavailable": if r.TryDecodeAsNil() { if x.MaxUnavailable != nil { @@ -6993,11 +7015,11 @@ func (x *RollingUpdateDeployment) codecDecodeSelfFromMap(l int, d *codec1978.Dec if x.MaxUnavailable == nil { x.MaxUnavailable = new(pkg6_intstr.IntOrString) } - yym583 := z.DecBinary() - _ = yym583 + yym585 := z.DecBinary() + _ = yym585 if false { } else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) { - } else if !yym583 && z.IsJSONHandle() { + } else if !yym585 && z.IsJSONHandle() { z.DecJSONUnmarshal(x.MaxUnavailable) } else { z.DecFallback(x.MaxUnavailable, false) @@ -7012,26 +7034,20 @@ func (x *RollingUpdateDeployment) codecDecodeSelfFromMap(l int, d *codec1978.Dec if x.MaxSurge == nil { x.MaxSurge = new(pkg6_intstr.IntOrString) } - yym585 := z.DecBinary() - _ = yym585 + yym587 := z.DecBinary() + _ = yym587 if false { } else if z.HasExtensions() && z.DecExt(x.MaxSurge) { - } else if !yym585 && z.IsJSONHandle() { + } else if !yym587 && z.IsJSONHandle() { z.DecJSONUnmarshal(x.MaxSurge) } else { z.DecFallback(x.MaxSurge, false) } } - case "minReadySeconds": - if r.TryDecodeAsNil() { - x.MinReadySeconds = 0 - } else { - x.MinReadySeconds = int32(r.DecodeInt(32)) - } default: - z.DecStructFieldNotFound(-1, yys581) - } // end switch yys581 - } // end for yyj581 + z.DecStructFieldNotFound(-1, yys583) + } // end switch yys583 + } // end for yyj583 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -7039,16 +7055,16 @@ func (x *RollingUpdateDeployment) codecDecodeSelfFromArray(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj587 int - var yyb587 bool - var yyhl587 bool = l >= 0 - yyj587++ - if yyhl587 { - yyb587 = yyj587 > l + var yyj588 int + var yyb588 bool + var yyhl588 bool = l >= 0 + yyj588++ + if yyhl588 { + yyb588 = yyj588 > l } else { - yyb587 = r.CheckBreak() + yyb588 = r.CheckBreak() } - if yyb587 { + if yyb588 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7061,23 +7077,23 @@ func (x *RollingUpdateDeployment) codecDecodeSelfFromArray(l int, d *codec1978.D if x.MaxUnavailable == nil { x.MaxUnavailable = new(pkg6_intstr.IntOrString) } - yym589 := z.DecBinary() - _ = yym589 + yym590 := z.DecBinary() + _ = yym590 if false { } else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) { - } else if !yym589 && z.IsJSONHandle() { + } else if !yym590 && z.IsJSONHandle() { z.DecJSONUnmarshal(x.MaxUnavailable) } else { z.DecFallback(x.MaxUnavailable, false) } } - yyj587++ - if yyhl587 { - yyb587 = yyj587 > l + yyj588++ + if yyhl588 { + yyb588 = yyj588 > l } else { - yyb587 = r.CheckBreak() + yyb588 = r.CheckBreak() } - if yyb587 { + if yyb588 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7090,44 +7106,28 @@ func (x *RollingUpdateDeployment) codecDecodeSelfFromArray(l int, d *codec1978.D if x.MaxSurge == nil { x.MaxSurge = new(pkg6_intstr.IntOrString) } - yym591 := z.DecBinary() - _ = yym591 + yym592 := z.DecBinary() + _ = yym592 if false { } else if z.HasExtensions() && z.DecExt(x.MaxSurge) { - } else if !yym591 && z.IsJSONHandle() { + } else if !yym592 && z.IsJSONHandle() { z.DecJSONUnmarshal(x.MaxSurge) } else { z.DecFallback(x.MaxSurge, false) } } - yyj587++ - if yyhl587 { - yyb587 = yyj587 > l - } else { - yyb587 = r.CheckBreak() - } - if yyb587 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.MinReadySeconds = 0 - } else { - x.MinReadySeconds = int32(r.DecodeInt(32)) - } for { - yyj587++ - if yyhl587 { - yyb587 = yyj587 > l + yyj588++ + if yyhl588 { + yyb588 = yyj588 > l } else { - yyb587 = r.CheckBreak() + yyb588 = r.CheckBreak() } - if yyb587 { + if yyb588 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj587-1, "") + z.DecStructFieldNotFound(yyj588-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -18447,7 +18447,7 @@ func (x codecSelfer1234) decSliceDeployment(v *[]Deployment, d *codec1978.Decode yyrg1522 := len(yyv1522) > 0 yyv21522 := yyv1522 - yyrl1522, yyrt1522 = z.DecInferLen(yyl1522, z.DecBasicHandle().MaxInitLen, 632) + yyrl1522, yyrt1522 = z.DecInferLen(yyl1522, z.DecBasicHandle().MaxInitLen, 640) if yyrt1522 { if yyrl1522 <= cap(yyv1522) { yyv1522 = yyv1522[:yyrl1522] diff --git a/pkg/apis/extensions/v1beta1/types.go b/pkg/apis/extensions/v1beta1/types.go index 0e1eec913e0..9a50c73978d 100644 --- a/pkg/apis/extensions/v1beta1/types.go +++ b/pkg/apis/extensions/v1beta1/types.go @@ -228,6 +228,11 @@ type DeploymentSpec struct { // The deployment strategy to use to replace existing pods with new ones. Strategy DeploymentStrategy `json:"strategy,omitempty"` + // Minimum number of seconds for which a newly created pod should be ready + // without any of its container crashing, for it to be considered available. + // Defaults to 0 (pod will be considered available as soon as it is ready) + MinReadySeconds int32 `json:"minReadySeconds,omitempty"` + // The number of old ReplicationControllers to retain to allow rollback. // This is a pointer to distinguish between explicit zero and not specified. RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` @@ -322,11 +327,6 @@ type RollingUpdateDeployment struct { // new RC can be scaled up further, ensuring that total number of pods running // at any time during the update is atmost 130% of desired pods. MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` - - // Minimum number of seconds for which a newly created pod should be ready - // without any of its container crashing, for it to be considered available. - // Defaults to 0 (pod will be considered available as soon as it is ready) - MinReadySeconds int32 `json:"minReadySeconds,omitempty"` } // DeploymentStatus is the most recently observed status of the Deployment. diff --git a/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go b/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go index 4687f64101c..831f7781197 100644 --- a/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go +++ b/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go @@ -184,6 +184,7 @@ var map_DeploymentSpec = map[string]string{ "selector": "Label selector for pods. Existing ReplicationControllers whose pods are selected by this will be the ones affected by this deployment.", "template": "Template describes the pods that will be created.", "strategy": "The deployment strategy to use to replace existing pods with new ones.", + "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", "revisionHistoryLimit": "The number of old ReplicationControllers to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified.", "uniqueLabelKey": "Key of the selector that is added to existing RCs (and label key that is added to its pods) to prevent the existing RCs to select new pods (and old pods being selected by new RC). Users can set this to an empty string to indicate that the system should not add any selector and label. If unspecified, system uses DefaultDeploymentUniqueLabelKey(\"deployment.kubernetes.io/podTemplateHash\"). Value of this key is hash of DeploymentSpec.PodTemplateSpec. No label is added if this is set to empty string.", "paused": "Indicates that the deployment is paused and will not be processed by the deployment controller.", @@ -532,10 +533,9 @@ func (RollingUpdateDaemonSet) SwaggerDoc() map[string]string { } var map_RollingUpdateDeployment = map[string]string{ - "": "Spec to control the desired behavior of rolling update.", - "maxUnavailable": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding up. This can not be 0 if MaxSurge is 0. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", - "maxSurge": "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. By default, a value of 1 is used. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.", - "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", + "": "Spec to control the desired behavior of rolling update.", + "maxUnavailable": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding up. This can not be 0 if MaxSurge is 0. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", + "maxSurge": "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. By default, a value of 1 is used. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.", } func (RollingUpdateDeployment) SwaggerDoc() map[string]string { diff --git a/pkg/apis/extensions/validation/validation.go b/pkg/apis/extensions/validation/validation.go index 5ef47b9012b..b49466f5856 100644 --- a/pkg/apis/extensions/validation/validation.go +++ b/pkg/apis/extensions/validation/validation.go @@ -290,7 +290,6 @@ func ValidateRollingUpdateDeployment(rollingUpdate *extensions.RollingUpdateDepl } // Validate that MaxUnavailable is not more than 100%. allErrs = append(allErrs, IsNotMoreThan100Percent(rollingUpdate.MaxUnavailable, fldPath.Child("maxUnavailable"))...) - allErrs = append(allErrs, apivalidation.ValidateNonnegativeField(int64(rollingUpdate.MinReadySeconds), fldPath.Child("minReadySeconds"))...) return allErrs } @@ -322,6 +321,7 @@ func ValidateDeploymentSpec(spec *extensions.DeploymentSpec, fldPath *field.Path allErrs = append(allErrs, apivalidation.ValidateNonnegativeField(int64(spec.Replicas), fldPath.Child("replicas"))...) allErrs = append(allErrs, apivalidation.ValidatePodTemplateSpecForRC(&spec.Template, spec.Selector, spec.Replicas, fldPath.Child("template"))...) allErrs = append(allErrs, ValidateDeploymentStrategy(&spec.Strategy, fldPath.Child("strategy"))...) + allErrs = append(allErrs, apivalidation.ValidateNonnegativeField(int64(spec.MinReadySeconds), fldPath.Child("minReadySeconds"))...) if spec.RevisionHistoryLimit != nil { // zero is a valid RevisionHistoryLimit allErrs = append(allErrs, apivalidation.ValidateNonnegativeField(int64(*spec.RevisionHistoryLimit), fldPath.Child("revisionHistoryLimit"))...) diff --git a/pkg/controller/deployment/deployment_controller.go b/pkg/controller/deployment/deployment_controller.go index 7b2a776a4e2..c2d2679603a 100644 --- a/pkg/controller/deployment/deployment_controller.go +++ b/pkg/controller/deployment/deployment_controller.go @@ -799,7 +799,7 @@ func (dc *DeploymentController) reconcileOldRCs(allRCs []*api.ReplicationControl } // Check if we can scale down. minAvailable := deployment.Spec.Replicas - maxUnavailable - minReadySeconds := deployment.Spec.Strategy.RollingUpdate.MinReadySeconds + minReadySeconds := deployment.Spec.MinReadySeconds // Check the expectations of deployment before counting available pods dKey, err := controller.KeyFunc(&deployment) if err != nil { @@ -923,10 +923,7 @@ func (dc *DeploymentController) updateDeploymentStatus(allRCs []*api.Replication func (dc *DeploymentController) calculateStatus(allRCs []*api.ReplicationController, newRC *api.ReplicationController, deployment extensions.Deployment) (totalReplicas, updatedReplicas, availableReplicas, unavailableReplicas int, err error) { totalReplicas = deploymentutil.GetReplicaCountForRCs(allRCs) updatedReplicas = deploymentutil.GetReplicaCountForRCs([]*api.ReplicationController{newRC}) - minReadySeconds := 0 - if deployment.Spec.Strategy.Type == extensions.RollingUpdateDeploymentStrategyType { - minReadySeconds = deployment.Spec.Strategy.RollingUpdate.MinReadySeconds - } + minReadySeconds := deployment.Spec.MinReadySeconds availableReplicas, err = deploymentutil.GetAvailablePodsForRCs(dc.client, allRCs, minReadySeconds) if err != nil { err = fmt.Errorf("failed to count available pods: %v", err) diff --git a/pkg/kubectl/describe.go b/pkg/kubectl/describe.go index 7984b1dccac..4525264a534 100644 --- a/pkg/kubectl/describe.go +++ b/pkg/kubectl/describe.go @@ -1604,9 +1604,10 @@ func (dd *DeploymentDescriber) Describe(namespace, name string) (string, error) fmt.Fprintf(out, "Selector:\t%s\n", labels.FormatLabels(d.Spec.Selector)) fmt.Fprintf(out, "Replicas:\t%d updated | %d total | %d available | %d unavailable\n", d.Status.UpdatedReplicas, d.Spec.Replicas, d.Status.AvailableReplicas, d.Status.UnavailableReplicas) fmt.Fprintf(out, "StrategyType:\t%s\n", d.Spec.Strategy.Type) + fmt.Fprintf(out, "MinReadySeconds:\t%s\n", d.Spec.MinReadySeconds) if d.Spec.Strategy.RollingUpdate != nil { ru := d.Spec.Strategy.RollingUpdate - fmt.Fprintf(out, "RollingUpdateStrategy:\t%s max unavailable, %s max surge, %d min ready seconds\n", ru.MaxUnavailable.String(), ru.MaxSurge.String(), ru.MinReadySeconds) + fmt.Fprintf(out, "RollingUpdateStrategy:\t%s max unavailable, %s max surge\n", ru.MaxUnavailable.String(), ru.MaxSurge.String()) } oldRCs, _, err := deploymentutil.GetOldRCs(*d, dd) if err == nil { diff --git a/test/e2e/deployment.go b/test/e2e/deployment.go index 1dc155875ff..3fa4627e251 100644 --- a/test/e2e/deployment.go +++ b/test/e2e/deployment.go @@ -471,10 +471,10 @@ func testRolloverDeployment(f *Framework) { deploymentStrategyType := extensions.RollingUpdateDeploymentStrategyType Logf("Creating deployment %s", deploymentName) newDeployment := newDeployment(deploymentName, deploymentReplicas, deploymentPodLabels, deploymentImageName, deploymentImage, deploymentStrategyType, nil) + newDeployment.Spec.MinReadySeconds = deploymentMinReadySeconds newDeployment.Spec.Strategy.RollingUpdate = &extensions.RollingUpdateDeployment{ - MaxUnavailable: intstr.FromInt(1), - MaxSurge: intstr.FromInt(1), - MinReadySeconds: deploymentMinReadySeconds, + MaxUnavailable: intstr.FromInt(1), + MaxSurge: intstr.FromInt(1), } _, err = c.Extensions().Deployments(ns).Create(newDeployment) Expect(err).NotTo(HaveOccurred()) From 8e615df0005d56292714ae74fe0369580aa21a04 Mon Sep 17 00:00:00 2001 From: mqliang Date: Wed, 3 Feb 2016 11:03:31 +0800 Subject: [PATCH 080/328] fix the HasSynced() bug for Informer --- pkg/client/cache/delta_fifo.go | 27 +++++++++++++ pkg/client/cache/delta_fifo_test.go | 56 ++++++++++++++++++++++++++ pkg/client/cache/fifo.go | 30 ++++++++++++++ pkg/client/cache/fifo_test.go | 56 ++++++++++++++++++++++++++ pkg/controller/framework/controller.go | 7 +--- 5 files changed, 170 insertions(+), 6 deletions(-) diff --git a/pkg/client/cache/delta_fifo.go b/pkg/client/cache/delta_fifo.go index fcf2c313717..e7cc1aad19e 100644 --- a/pkg/client/cache/delta_fifo.go +++ b/pkg/client/cache/delta_fifo.go @@ -100,6 +100,12 @@ type DeltaFIFO struct { items map[string]Deltas queue []string + // populated is true if the first batch of items inserted by Replace() has been populated + // or Delete/Add/Update was called first. + populated bool + // initialPopulationCount is the number of items inserted by the first call of Replace() + initialPopulationCount int + // keyFunc is used to make the key used for queued item // insertion and retrieval, and should be deterministic. keyFunc KeyFunc @@ -141,11 +147,20 @@ func (f *DeltaFIFO) KeyOf(obj interface{}) (string, error) { return f.keyFunc(obj) } +// Return true if an Add/Update/Delete/AddIfNotPresent are called first, +// or an Update called first but the first batch of items inserted by Replace() has been popped +func (f *DeltaFIFO) HasSynced() bool { + f.lock.Lock() + defer f.lock.Unlock() + return f.populated && f.initialPopulationCount == 0 +} + // Add inserts an item, and puts it in the queue. The item is only enqueued // if it doesn't already exist in the set. func (f *DeltaFIFO) Add(obj interface{}) error { f.lock.Lock() defer f.lock.Unlock() + f.populated = true return f.queueActionLocked(Added, obj) } @@ -153,6 +168,7 @@ func (f *DeltaFIFO) Add(obj interface{}) error { func (f *DeltaFIFO) Update(obj interface{}) error { f.lock.Lock() defer f.lock.Unlock() + f.populated = true return f.queueActionLocked(Updated, obj) } @@ -166,6 +182,7 @@ func (f *DeltaFIFO) Delete(obj interface{}) error { } f.lock.Lock() defer f.lock.Unlock() + f.populated = true if f.knownObjects == nil { if _, exists := f.items[id]; !exists { // Presumably, this was deleted when a relist happened. @@ -203,6 +220,7 @@ func (f *DeltaFIFO) AddIfNotPresent(obj interface{}) error { } f.lock.Lock() defer f.lock.Unlock() + f.populated = true if _, exists := f.items[id]; exists { return nil } @@ -354,6 +372,9 @@ func (f *DeltaFIFO) Pop() interface{} { id := f.queue[0] f.queue = f.queue[1:] item, ok := f.items[id] + if f.initialPopulationCount > 0 { + f.initialPopulationCount-- + } if !ok { // Item may have been deleted subsequently. continue @@ -373,6 +394,12 @@ func (f *DeltaFIFO) Replace(list []interface{}, resourceVersion string) error { f.lock.Lock() defer f.lock.Unlock() keys := make(sets.String, len(list)) + + if !f.populated { + f.populated = true + f.initialPopulationCount = len(list) + } + for _, item := range list { key, err := f.KeyOf(item) if err != nil { diff --git a/pkg/client/cache/delta_fifo_test.go b/pkg/client/cache/delta_fifo_test.go index 6adec860571..8efd982b5a4 100644 --- a/pkg/client/cache/delta_fifo_test.go +++ b/pkg/client/cache/delta_fifo_test.go @@ -327,3 +327,59 @@ func TestDeltaFIFO_KeyOf(t *testing.T) { } } } + +func TestDeltaFIFO_HasSynced(t *testing.T) { + tests := []struct { + actions []func(f *DeltaFIFO) + expectedSynced bool + }{ + { + actions: []func(f *DeltaFIFO){}, + expectedSynced: false, + }, + { + actions: []func(f *DeltaFIFO){ + func(f *DeltaFIFO) { f.Add(mkFifoObj("a", 1)) }, + }, + expectedSynced: true, + }, + { + actions: []func(f *DeltaFIFO){ + func(f *DeltaFIFO) { f.Replace([]interface{}{}, "0") }, + }, + expectedSynced: true, + }, + { + actions: []func(f *DeltaFIFO){ + func(f *DeltaFIFO) { f.Replace([]interface{}{mkFifoObj("a", 1), mkFifoObj("b", 2)}, "0") }, + }, + expectedSynced: false, + }, + { + actions: []func(f *DeltaFIFO){ + func(f *DeltaFIFO) { f.Replace([]interface{}{mkFifoObj("a", 1), mkFifoObj("b", 2)}, "0") }, + func(f *DeltaFIFO) { f.Pop() }, + }, + expectedSynced: false, + }, + { + actions: []func(f *DeltaFIFO){ + func(f *DeltaFIFO) { f.Replace([]interface{}{mkFifoObj("a", 1), mkFifoObj("b", 2)}, "0") }, + func(f *DeltaFIFO) { f.Pop() }, + func(f *DeltaFIFO) { f.Pop() }, + }, + expectedSynced: true, + }, + } + + for i, test := range tests { + f := NewDeltaFIFO(testFifoObjectKeyFunc, nil, nil) + + for _, action := range test.actions { + action(f) + } + if e, a := test.expectedSynced, f.HasSynced(); a != e { + t.Errorf("test case %v failed, expected: %v , got %v", i, e, a) + } + } +} diff --git a/pkg/client/cache/fifo.go b/pkg/client/cache/fifo.go index b56687ee0fd..d4076a326d8 100644 --- a/pkg/client/cache/fifo.go +++ b/pkg/client/cache/fifo.go @@ -32,6 +32,9 @@ type Queue interface { // as nothing else (presumably more recent) // has since been added. AddIfNotPresent(interface{}) error + + // Return true if the first batch of items has been popped + HasSynced() bool } // FIFO receives adds and updates from a Reflector, and puts them in a queue for @@ -52,6 +55,13 @@ type FIFO struct { // We depend on the property that items in the set are in the queue and vice versa. items map[string]interface{} queue []string + + // populated is true if the first batch of items inserted by Replace() has been populated + // or Delete/Add/Update was called first. + populated bool + // initialPopulationCount is the number of items inserted by the first call of Replace() + initialPopulationCount int + // keyFunc is used to make the key used for queued item insertion and retrieval, and // should be deterministic. keyFunc KeyFunc @@ -61,6 +71,14 @@ var ( _ = Queue(&FIFO{}) // FIFO is a Queue ) +// Return true if an Add/Update/Delete/AddIfNotPresent are called first, +// or an Update called first but the first batch of items inserted by Replace() has been popped +func (f *FIFO) HasSynced() bool { + f.lock.Lock() + defer f.lock.Unlock() + return f.populated && f.initialPopulationCount == 0 +} + // Add inserts an item, and puts it in the queue. The item is only enqueued // if it doesn't already exist in the set. func (f *FIFO) Add(obj interface{}) error { @@ -70,6 +88,7 @@ func (f *FIFO) Add(obj interface{}) error { } f.lock.Lock() defer f.lock.Unlock() + f.populated = true if _, exists := f.items[id]; !exists { f.queue = append(f.queue, id) } @@ -91,6 +110,7 @@ func (f *FIFO) AddIfNotPresent(obj interface{}) error { } f.lock.Lock() defer f.lock.Unlock() + f.populated = true if _, exists := f.items[id]; exists { return nil } @@ -116,6 +136,7 @@ func (f *FIFO) Delete(obj interface{}) error { } f.lock.Lock() defer f.lock.Unlock() + f.populated = true delete(f.items, id) return err } @@ -174,6 +195,9 @@ func (f *FIFO) Pop() interface{} { } id := f.queue[0] f.queue = f.queue[1:] + if f.initialPopulationCount > 0 { + f.initialPopulationCount-- + } item, ok := f.items[id] if !ok { // Item may have been deleted subsequently. @@ -200,6 +224,12 @@ func (f *FIFO) Replace(list []interface{}, resourceVersion string) error { f.lock.Lock() defer f.lock.Unlock() + + if !f.populated { + f.populated = true + f.initialPopulationCount = len(items) + } + f.items = items f.queue = f.queue[:0] for id := range items { diff --git a/pkg/client/cache/fifo_test.go b/pkg/client/cache/fifo_test.go index bf99b5aa152..974fa6d3b73 100644 --- a/pkg/client/cache/fifo_test.go +++ b/pkg/client/cache/fifo_test.go @@ -177,3 +177,59 @@ func TestFIFO_addIfNotPresent(t *testing.T) { } } } + +func TestFIFO_HasSynced(t *testing.T) { + tests := []struct { + actions []func(f *FIFO) + expectedSynced bool + }{ + { + actions: []func(f *FIFO){}, + expectedSynced: false, + }, + { + actions: []func(f *FIFO){ + func(f *FIFO) { f.Add(mkFifoObj("a", 1)) }, + }, + expectedSynced: true, + }, + { + actions: []func(f *FIFO){ + func(f *FIFO) { f.Replace([]interface{}{}, "0") }, + }, + expectedSynced: true, + }, + { + actions: []func(f *FIFO){ + func(f *FIFO) { f.Replace([]interface{}{mkFifoObj("a", 1), mkFifoObj("b", 2)}, "0") }, + }, + expectedSynced: false, + }, + { + actions: []func(f *FIFO){ + func(f *FIFO) { f.Replace([]interface{}{mkFifoObj("a", 1), mkFifoObj("b", 2)}, "0") }, + func(f *FIFO) { f.Pop() }, + }, + expectedSynced: false, + }, + { + actions: []func(f *FIFO){ + func(f *FIFO) { f.Replace([]interface{}{mkFifoObj("a", 1), mkFifoObj("b", 2)}, "0") }, + func(f *FIFO) { f.Pop() }, + func(f *FIFO) { f.Pop() }, + }, + expectedSynced: true, + }, + } + + for i, test := range tests { + f := NewFIFO(testFifoObjectKeyFunc) + + for _, action := range test.actions { + action(f) + } + if e, a := test.expectedSynced, f.HasSynced(); a != e { + t.Errorf("test case %v failed, expected: %v , got %v", i, e, a) + } + } +} diff --git a/pkg/controller/framework/controller.go b/pkg/controller/framework/controller.go index ca182343aa4..c789119e87e 100644 --- a/pkg/controller/framework/controller.go +++ b/pkg/controller/framework/controller.go @@ -98,12 +98,7 @@ func (c *Controller) Run(stopCh <-chan struct{}) { // Returns true once this controller has completed an initial resource listing func (c *Controller) HasSynced() bool { - c.reflectorMutex.RLock() - defer c.reflectorMutex.RUnlock() - if c.reflector == nil { - return false - } - return c.reflector.LastSyncResourceVersion() != "" + return c.config.Queue.HasSynced() } // Requeue adds the provided object back into the queue if it does not already exist. From fe7887f1ecefbd14b878e28a4a7ace650b325074 Mon Sep 17 00:00:00 2001 From: Chao Xu Date: Thu, 28 Jan 2016 22:34:08 -0800 Subject: [PATCH 081/328] replace the client with clientset in controllers --- cmd/integration/integration.go | 4 +- .../app/controllermanager.go | 22 +-- .../controllermanager/controllermanager.go | 24 +-- .../mesos/pkg/service/endpoints_controller.go | 16 +- .../unversioned/deployment_expansion.go | 1 + .../unversioned/generated_expansion.go | 2 - .../extensions/unversioned/scale_expansion.go | 65 ++++++++ .../legacy/unversioned/event_expansion.go | 1 + .../legacy/unversioned/namespace_expansion.go | 1 + .../legacy/unversioned/pod_expansion.go | 1 + .../legacy/unversioned/service_expansion.go | 1 + .../endpoint/endpoints_controller.go | 16 +- .../endpoint/endpoints_controller_test.go | 25 +-- pkg/controller/gc/gc_controller.go | 12 +- pkg/controller/gc/gc_controller_test.go | 4 +- .../namespace/namespace_controller.go | 101 ++++++------ .../namespace/namespace_controller_test.go | 19 +-- pkg/controller/node/nodecontroller.go | 44 +++--- pkg/controller/node/nodecontroller_test.go | 55 ++++--- pkg/controller/podautoscaler/horizontal.go | 9 +- .../podautoscaler/horizontal_test.go | 22 +-- .../podautoscaler/metrics/metrics_client.go | 12 +- .../metrics/metrics_client_test.go | 11 +- .../resource_quota_controller.go | 28 ++-- .../resource_quota_controller_test.go | 7 +- pkg/controller/route/routecontroller.go | 8 +- pkg/controller/service/servicecontroller.go | 19 +-- .../service/servicecontroller_test.go | 6 +- .../serviceaccounts_controller.go | 15 +- .../serviceaccounts_controller_test.go | 3 +- pkg/controller/serviceaccount/tokengetter.go | 12 +- .../serviceaccount/tokens_controller.go | 27 ++-- .../serviceaccount/tokens_controller_test.go | 147 +++++++++--------- pkg/serviceaccount/jwt_test.go | 12 +- test/integration/service_account_test.go | 10 +- 35 files changed, 430 insertions(+), 332 deletions(-) create mode 100644 pkg/client/typed/generated/extensions/unversioned/scale_expansion.go diff --git a/cmd/integration/integration.go b/cmd/integration/integration.go index 443d2f744ad..954fcc86fe0 100644 --- a/cmd/integration/integration.go +++ b/cmd/integration/integration.go @@ -187,14 +187,14 @@ func startComponents(firstManifestURL, secondManifestURL string) (string, string scheduler.New(schedulerConfig).Run() // ensure the service endpoints are sync'd several times within the window that the integration tests wait - go endpointcontroller.NewEndpointController(cl, controller.NoResyncPeriodFunc). + go endpointcontroller.NewEndpointController(clientset, controller.NoResyncPeriodFunc). Run(3, util.NeverStop) // TODO: Write an integration test for the replication controllers watch. go replicationcontroller.NewReplicationManager(clientset, controller.NoResyncPeriodFunc, replicationcontroller.BurstReplicas). Run(3, util.NeverStop) - nodeController := nodecontroller.NewNodeController(nil, cl, 5*time.Minute, util.NewFakeRateLimiter(), util.NewFakeRateLimiter(), + nodeController := nodecontroller.NewNodeController(nil, clientset, 5*time.Minute, util.NewFakeRateLimiter(), util.NewFakeRateLimiter(), 40*time.Second, 60*time.Second, 5*time.Second, nil, false) nodeController.Run(5 * time.Second) cadvisorInterface := new(cadvisor.Fake) diff --git a/cmd/kube-controller-manager/app/controllermanager.go b/cmd/kube-controller-manager/app/controllermanager.go index 3b56eddd2a2..b7208cdc6e7 100644 --- a/cmd/kube-controller-manager/app/controllermanager.go +++ b/cmd/kube-controller-manager/app/controllermanager.go @@ -173,7 +173,7 @@ func Run(s *options.CMServer) error { } func StartControllers(s *options.CMServer, kubeClient *client.Client, kubeconfig *client.Config, stop <-chan struct{}) error { - go endpointcontroller.NewEndpointController(client.NewOrDie(client.AddUserAgent(kubeconfig, "endpoint-controller")), ResyncPeriod(s)). + go endpointcontroller.NewEndpointController(clientset.NewForConfigOrDie(client.AddUserAgent(kubeconfig, "endpoint-controller")), ResyncPeriod(s)). Run(s.ConcurrentEndpointSyncs, util.NeverStop) go replicationcontroller.NewReplicationManager( @@ -183,7 +183,7 @@ func StartControllers(s *options.CMServer, kubeClient *client.Client, kubeconfig ).Run(s.ConcurrentRCSyncs, util.NeverStop) if s.TerminatedPodGCThreshold > 0 { - go gc.New(client.NewOrDie(client.AddUserAgent(kubeconfig, "garbage-collector")), ResyncPeriod(s), s.TerminatedPodGCThreshold). + go gc.New(clientset.NewForConfigOrDie(client.AddUserAgent(kubeconfig, "garbage-collector")), ResyncPeriod(s), s.TerminatedPodGCThreshold). Run(util.NeverStop) } @@ -192,13 +192,13 @@ func StartControllers(s *options.CMServer, kubeClient *client.Client, kubeconfig glog.Fatalf("Cloud provider could not be initialized: %v", err) } - nodeController := nodecontroller.NewNodeController(cloud, client.NewOrDie(client.AddUserAgent(kubeconfig, "node-controller")), + nodeController := nodecontroller.NewNodeController(cloud, clientset.NewForConfigOrDie(client.AddUserAgent(kubeconfig, "node-controller")), s.PodEvictionTimeout, util.NewTokenBucketRateLimiter(s.DeletingPodsQps, s.DeletingPodsBurst), util.NewTokenBucketRateLimiter(s.DeletingPodsQps, s.DeletingPodsBurst), s.NodeMonitorGracePeriod, s.NodeStartupGracePeriod, s.NodeMonitorPeriod, &s.ClusterCIDR, s.AllocateNodeCIDRs) nodeController.Run(s.NodeSyncPeriod) - serviceController := servicecontroller.New(cloud, client.NewOrDie(client.AddUserAgent(kubeconfig, "service-controller")), s.ClusterName) + serviceController := servicecontroller.New(cloud, clientset.NewForConfigOrDie(client.AddUserAgent(kubeconfig, "service-controller")), s.ClusterName) if err := serviceController.Run(s.ServiceSyncPeriod, s.NodeSyncPeriod); err != nil { glog.Errorf("Failed to start service controller: %v", err) } @@ -209,7 +209,7 @@ func StartControllers(s *options.CMServer, kubeClient *client.Client, kubeconfig } else if routes, ok := cloud.Routes(); !ok { glog.Warning("allocate-node-cidrs is set, but cloud provider does not support routes. Will not manage routes.") } else { - routeController := routecontroller.New(routes, client.NewOrDie(client.AddUserAgent(kubeconfig, "route-controller")), s.ClusterName, &s.ClusterCIDR) + routeController := routecontroller.New(routes, clientset.NewForConfigOrDie(client.AddUserAgent(kubeconfig, "route-controller")), s.ClusterName, &s.ClusterCIDR) routeController.Run(s.NodeSyncPeriod) } } else { @@ -217,7 +217,7 @@ func StartControllers(s *options.CMServer, kubeClient *client.Client, kubeconfig } go resourcequotacontroller.NewResourceQuotaController( - client.NewOrDie(client.AddUserAgent(kubeconfig, "resourcequota-controller")), + clientset.NewForConfigOrDie(client.AddUserAgent(kubeconfig, "resourcequota-controller")), controller.StaticResyncPeriodFunc(s.ResourceQuotaSyncPeriod)).Run(s.ConcurrentResourceQuotaSyncs, util.NeverStop) // If apiserver is not running we should wait for some time and fail only then. This is particularly @@ -240,7 +240,7 @@ func StartControllers(s *options.CMServer, kubeClient *client.Client, kubeconfig glog.Fatalf("Failed to get supported resources from server: %v", err) } - namespacecontroller.NewNamespaceController(client.NewOrDie(client.AddUserAgent(kubeconfig, "namespace-controller")), versions, s.NamespaceSyncPeriod).Run() + namespacecontroller.NewNamespaceController(clientset.NewForConfigOrDie(client.AddUserAgent(kubeconfig, "namespace-controller")), versions, s.NamespaceSyncPeriod).Run() groupVersion := "extensions/v1beta1" resources, found := resourceMap[groupVersion] @@ -249,7 +249,7 @@ func StartControllers(s *options.CMServer, kubeClient *client.Client, kubeconfig glog.Infof("Starting %s apis", groupVersion) if containsResource(resources, "horizontalpodautoscalers") { glog.Infof("Starting horizontal pod controller.") - hpaClient := client.NewOrDie(client.AddUserAgent(kubeconfig, "horizontal-pod-autoscaler")) + hpaClient := clientset.NewForConfigOrDie(client.AddUserAgent(kubeconfig, "horizontal-pod-autoscaler")) metricsClient := metrics.NewHeapsterMetricsClient( hpaClient, metrics.DefaultHeapsterNamespace, @@ -257,7 +257,7 @@ func StartControllers(s *options.CMServer, kubeClient *client.Client, kubeconfig metrics.DefaultHeapsterService, metrics.DefaultHeapsterPort, ) - podautoscaler.NewHorizontalController(hpaClient, hpaClient, hpaClient, metricsClient). + podautoscaler.NewHorizontalController(hpaClient.Legacy(), hpaClient.Extensions(), hpaClient, metricsClient). Run(s.HorizontalPodAutoscalerSyncPeriod) } @@ -323,7 +323,7 @@ func StartControllers(s *options.CMServer, kubeClient *client.Client, kubeconfig glog.Errorf("Error reading key for service account token controller: %v", err) } else { serviceaccountcontroller.NewTokensController( - client.NewOrDie(client.AddUserAgent(kubeconfig, "tokens-controller")), + clientset.NewForConfigOrDie(client.AddUserAgent(kubeconfig, "tokens-controller")), serviceaccountcontroller.TokensControllerOptions{ TokenGenerator: serviceaccount.JWTTokenGenerator(privateKey), RootCA: rootCA, @@ -333,7 +333,7 @@ func StartControllers(s *options.CMServer, kubeClient *client.Client, kubeconfig } serviceaccountcontroller.NewServiceAccountsController( - client.NewOrDie(client.AddUserAgent(kubeconfig, "service-account-controller")), + clientset.NewForConfigOrDie(client.AddUserAgent(kubeconfig, "service-account-controller")), serviceaccountcontroller.DefaultServiceAccountsControllerOptions(), ).Run() diff --git a/contrib/mesos/pkg/controllermanager/controllermanager.go b/contrib/mesos/pkg/controllermanager/controllermanager.go index dd6664d9676..7d8e9a364c3 100644 --- a/contrib/mesos/pkg/controllermanager/controllermanager.go +++ b/contrib/mesos/pkg/controllermanager/controllermanager.go @@ -127,14 +127,14 @@ func (s *CMServer) Run(_ []string) error { glog.Fatal(server.ListenAndServe()) }() - endpoints := s.createEndpointController(client.NewOrDie(client.AddUserAgent(kubeconfig, "endpoint-controller"))) + endpoints := s.createEndpointController(clientset.NewForConfigOrDie(client.AddUserAgent(kubeconfig, "endpoint-controller"))) go endpoints.Run(s.ConcurrentEndpointSyncs, util.NeverStop) go replicationcontroller.NewReplicationManager(clientset.NewForConfigOrDie(client.AddUserAgent(kubeconfig, "replication-controller")), s.resyncPeriod, replicationcontroller.BurstReplicas). Run(s.ConcurrentRCSyncs, util.NeverStop) if s.TerminatedPodGCThreshold > 0 { - go gc.New(client.NewOrDie(client.AddUserAgent(kubeconfig, "garbage-collector")), s.resyncPeriod, s.TerminatedPodGCThreshold). + go gc.New(clientset.NewForConfigOrDie(client.AddUserAgent(kubeconfig, "garbage-collector")), s.resyncPeriod, s.TerminatedPodGCThreshold). Run(util.NeverStop) } @@ -147,7 +147,7 @@ func (s *CMServer) Run(_ []string) error { glog.Fatalf("Cloud provider could not be initialized: %v", err) } - nodeController := nodecontroller.NewNodeController(cloud, client.NewOrDie(client.AddUserAgent(kubeconfig, "node-controller")), + nodeController := nodecontroller.NewNodeController(cloud, clientset.NewForConfigOrDie(client.AddUserAgent(kubeconfig, "node-controller")), s.PodEvictionTimeout, util.NewTokenBucketRateLimiter(s.DeletingPodsQps, s.DeletingPodsBurst), util.NewTokenBucketRateLimiter(s.DeletingPodsQps, s.DeletingPodsBurst), s.NodeMonitorGracePeriod, s.NodeStartupGracePeriod, s.NodeMonitorPeriod, (*net.IPNet)(&s.ClusterCIDR), s.AllocateNodeCIDRs) @@ -158,7 +158,7 @@ func (s *CMServer) Run(_ []string) error { glog.Fatalf("Failed to start node status update controller: %v", err) } - serviceController := servicecontroller.New(cloud, client.NewOrDie(client.AddUserAgent(kubeconfig, "service-controller")), s.ClusterName) + serviceController := servicecontroller.New(cloud, clientset.NewForConfigOrDie(client.AddUserAgent(kubeconfig, "service-controller")), s.ClusterName) if err := serviceController.Run(s.ServiceSyncPeriod, s.NodeSyncPeriod); err != nil { glog.Errorf("Failed to start service controller: %v", err) } @@ -168,12 +168,12 @@ func (s *CMServer) Run(_ []string) error { if !ok { glog.Fatal("Cloud provider must support routes if allocate-node-cidrs is set") } - routeController := routecontroller.New(routes, client.NewOrDie(client.AddUserAgent(kubeconfig, "route-controller")), s.ClusterName, (*net.IPNet)(&s.ClusterCIDR)) + routeController := routecontroller.New(routes, clientset.NewForConfigOrDie(client.AddUserAgent(kubeconfig, "route-controller")), s.ClusterName, (*net.IPNet)(&s.ClusterCIDR)) routeController.Run(s.NodeSyncPeriod) } go resourcequotacontroller.NewResourceQuotaController( - client.NewOrDie(client.AddUserAgent(kubeconfig, "resource-quota-controller")), controller.StaticResyncPeriodFunc(s.ResourceQuotaSyncPeriod)).Run(s.ConcurrentResourceQuotaSyncs, util.NeverStop) + clientset.NewForConfigOrDie(client.AddUserAgent(kubeconfig, "resource-quota-controller")), controller.StaticResyncPeriodFunc(s.ResourceQuotaSyncPeriod)).Run(s.ConcurrentResourceQuotaSyncs, util.NeverStop) // If apiserver is not running we should wait for some time and fail only then. This is particularly // important when we start apiserver and controller manager at the same time. @@ -195,7 +195,7 @@ func (s *CMServer) Run(_ []string) error { glog.Fatalf("Failed to get supported resources from server: %v", err) } - namespaceController := namespacecontroller.NewNamespaceController(client.NewOrDie(client.AddUserAgent(kubeconfig, "namespace-controller")), &unversioned.APIVersions{}, s.NamespaceSyncPeriod) + namespaceController := namespacecontroller.NewNamespaceController(clientset.NewForConfigOrDie(client.AddUserAgent(kubeconfig, "namespace-controller")), &unversioned.APIVersions{}, s.NamespaceSyncPeriod) namespaceController.Run() groupVersion := "extensions/v1beta1" @@ -205,7 +205,7 @@ func (s *CMServer) Run(_ []string) error { glog.Infof("Starting %s apis", groupVersion) if containsResource(resources, "horizontalpodautoscalers") { glog.Infof("Starting horizontal pod controller.") - hpaClient := client.NewOrDie(client.AddUserAgent(kubeconfig, "horizontal-pod-autoscaler")) + hpaClient := clientset.NewForConfigOrDie(client.AddUserAgent(kubeconfig, "horizontal-pod-autoscaler")) metricsClient := metrics.NewHeapsterMetricsClient( hpaClient, metrics.DefaultHeapsterNamespace, @@ -213,7 +213,7 @@ func (s *CMServer) Run(_ []string) error { metrics.DefaultHeapsterService, metrics.DefaultHeapsterPort, ) - podautoscaler.NewHorizontalController(hpaClient, hpaClient, hpaClient, metricsClient). + podautoscaler.NewHorizontalController(hpaClient.Legacy(), hpaClient.Extensions(), hpaClient, metricsClient). Run(s.HorizontalPodAutoscalerSyncPeriod) } @@ -279,7 +279,7 @@ func (s *CMServer) Run(_ []string) error { glog.Errorf("Error reading key for service account token controller: %v", err) } else { serviceaccountcontroller.NewTokensController( - client.NewOrDie(client.AddUserAgent(kubeconfig, "tokens-controller")), + clientset.NewForConfigOrDie(client.AddUserAgent(kubeconfig, "tokens-controller")), serviceaccountcontroller.TokensControllerOptions{ TokenGenerator: serviceaccount.JWTTokenGenerator(privateKey), RootCA: rootCA, @@ -289,14 +289,14 @@ func (s *CMServer) Run(_ []string) error { } serviceaccountcontroller.NewServiceAccountsController( - client.NewOrDie(client.AddUserAgent(kubeconfig, "service-account-controller")), + clientset.NewForConfigOrDie(client.AddUserAgent(kubeconfig, "service-account-controller")), serviceaccountcontroller.DefaultServiceAccountsControllerOptions(), ).Run() select {} } -func (s *CMServer) createEndpointController(client *client.Client) kmendpoint.EndpointController { +func (s *CMServer) createEndpointController(client *clientset.Clientset) kmendpoint.EndpointController { if s.UseHostPortEndpoints { glog.V(2).Infof("Creating hostIP:hostPort endpoint controller") return kmendpoint.NewEndpointController(client) diff --git a/contrib/mesos/pkg/service/endpoints_controller.go b/contrib/mesos/pkg/service/endpoints_controller.go index 3ad1e0c28bc..c6be0321bd6 100644 --- a/contrib/mesos/pkg/service/endpoints_controller.go +++ b/contrib/mesos/pkg/service/endpoints_controller.go @@ -27,7 +27,7 @@ import ( "k8s.io/kubernetes/pkg/api/endpoints" "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/client/cache" - client "k8s.io/kubernetes/pkg/client/unversioned" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" kservice "k8s.io/kubernetes/pkg/controller/endpoint" "k8s.io/kubernetes/pkg/controller/framework" "k8s.io/kubernetes/pkg/labels" @@ -51,7 +51,7 @@ type EndpointController interface { } // NewEndpointController returns a new *EndpointController. -func NewEndpointController(client *client.Client) *endpointController { +func NewEndpointController(client *clientset.Clientset) *endpointController { e := &endpointController{ client: client, queue: workqueue.New(), @@ -59,10 +59,10 @@ func NewEndpointController(client *client.Client) *endpointController { e.serviceStore.Store, e.serviceController = framework.NewInformer( &cache.ListWatch{ ListFunc: func(options api.ListOptions) (runtime.Object, error) { - return e.client.Services(api.NamespaceAll).List(options) + return e.client.Legacy().Services(api.NamespaceAll).List(options) }, WatchFunc: func(options api.ListOptions) (watch.Interface, error) { - return e.client.Services(api.NamespaceAll).Watch(options) + return e.client.Legacy().Services(api.NamespaceAll).Watch(options) }, }, &api.Service{}, @@ -79,10 +79,10 @@ func NewEndpointController(client *client.Client) *endpointController { e.podStore.Store, e.podController = framework.NewInformer( &cache.ListWatch{ ListFunc: func(options api.ListOptions) (runtime.Object, error) { - return e.client.Pods(api.NamespaceAll).List(options) + return e.client.Legacy().Pods(api.NamespaceAll).List(options) }, WatchFunc: func(options api.ListOptions) (watch.Interface, error) { - return e.client.Pods(api.NamespaceAll).Watch(options) + return e.client.Legacy().Pods(api.NamespaceAll).Watch(options) }, }, &api.Pod{}, @@ -98,7 +98,7 @@ func NewEndpointController(client *client.Client) *endpointController { // EndpointController manages selector-based service endpoints. type endpointController struct { - client *client.Client + client *clientset.Clientset serviceStore cache.StoreToServiceLister podStore cache.StoreToPodLister @@ -264,7 +264,7 @@ func (e *endpointController) syncService(key string) { // Don't retry, as the key isn't going to magically become understandable. return } - err = e.client.Endpoints(namespace).Delete(name) + err = e.client.Endpoints(namespace).Delete(name, nil) if err != nil && !errors.IsNotFound(err) { glog.Errorf("Error deleting endpoint %q: %v", key, err) e.queue.Add(key) // Retry diff --git a/pkg/client/typed/generated/extensions/unversioned/deployment_expansion.go b/pkg/client/typed/generated/extensions/unversioned/deployment_expansion.go index 70037bcf9b2..9969aecc93f 100644 --- a/pkg/client/typed/generated/extensions/unversioned/deployment_expansion.go +++ b/pkg/client/typed/generated/extensions/unversioned/deployment_expansion.go @@ -18,6 +18,7 @@ package unversioned import "k8s.io/kubernetes/pkg/apis/extensions" +// The DeploymentExpansion interface allows manually adding extra methods to the DeploymentInterface. type DeploymentExpansion interface { Rollback(*extensions.DeploymentRollback) error } diff --git a/pkg/client/typed/generated/extensions/unversioned/generated_expansion.go b/pkg/client/typed/generated/extensions/unversioned/generated_expansion.go index 3ddd7d80f1f..0690e0c8c33 100644 --- a/pkg/client/typed/generated/extensions/unversioned/generated_expansion.go +++ b/pkg/client/typed/generated/extensions/unversioned/generated_expansion.go @@ -24,8 +24,6 @@ type IngressExpansion interface{} type JobExpansion interface{} -type ScaleExpansion interface{} - type ThirdPartyResourceExpansion interface{} type ReplicaSetExpansion interface{} diff --git a/pkg/client/typed/generated/extensions/unversioned/scale_expansion.go b/pkg/client/typed/generated/extensions/unversioned/scale_expansion.go new file mode 100644 index 00000000000..3606a5f7b9c --- /dev/null +++ b/pkg/client/typed/generated/extensions/unversioned/scale_expansion.go @@ -0,0 +1,65 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +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 unversioned + +import ( + "k8s.io/kubernetes/pkg/api/meta" + "k8s.io/kubernetes/pkg/api/unversioned" + "k8s.io/kubernetes/pkg/apis/extensions" +) + +// The ScaleExpansion interface allows manually adding extra methods to the ScaleInterface. +type ScaleExpansion interface { + Get(kind string, name string) (*extensions.Scale, error) + Update(kind string, scale *extensions.Scale) (*extensions.Scale, error) +} + +// Get takes the reference to scale subresource and returns the subresource or error, if one occurs. +func (c *scales) Get(kind string, name string) (result *extensions.Scale, err error) { + result = &extensions.Scale{} + + // TODO this method needs to take a proper unambiguous kind + fullyQualifiedKind := unversioned.GroupVersionKind{Kind: kind} + resource, _ := meta.KindToResource(fullyQualifiedKind, false) + + err = c.client.Get(). + Namespace(c.ns). + Resource(resource.Resource). + Name(name). + SubResource("scale"). + Do(). + Into(result) + return +} + +func (c *scales) Update(kind string, scale *extensions.Scale) (result *extensions.Scale, err error) { + result = &extensions.Scale{} + + // TODO this method needs to take a proper unambiguous kind + fullyQualifiedKind := unversioned.GroupVersionKind{Kind: kind} + resource, _ := meta.KindToResource(fullyQualifiedKind, false) + + err = c.client.Put(). + Namespace(scale.Namespace). + Resource(resource.Resource). + Name(scale.Name). + SubResource("scale"). + Body(scale). + Do(). + Into(result) + return +} diff --git a/pkg/client/typed/generated/legacy/unversioned/event_expansion.go b/pkg/client/typed/generated/legacy/unversioned/event_expansion.go index c4e6eb860d2..abdf89aa1c4 100644 --- a/pkg/client/typed/generated/legacy/unversioned/event_expansion.go +++ b/pkg/client/typed/generated/legacy/unversioned/event_expansion.go @@ -24,6 +24,7 @@ import ( "k8s.io/kubernetes/pkg/runtime" ) +// The EventExpansion interface allows manually adding extra methods to the EventInterface. type EventExpansion interface { // CreateWithEventNamespace is the same as a Create, except that it sends the request to the event.Namespace. CreateWithEventNamespace(event *api.Event) (*api.Event, error) diff --git a/pkg/client/typed/generated/legacy/unversioned/namespace_expansion.go b/pkg/client/typed/generated/legacy/unversioned/namespace_expansion.go index 75f3ccfca9e..8f47aec484f 100644 --- a/pkg/client/typed/generated/legacy/unversioned/namespace_expansion.go +++ b/pkg/client/typed/generated/legacy/unversioned/namespace_expansion.go @@ -18,6 +18,7 @@ package unversioned import "k8s.io/kubernetes/pkg/api" +// The NamespaceExpansion interface allows manually adding extra methods to the NamespaceInterface. type NamespaceExpansion interface { Finalize(item *api.Namespace) (*api.Namespace, error) } diff --git a/pkg/client/typed/generated/legacy/unversioned/pod_expansion.go b/pkg/client/typed/generated/legacy/unversioned/pod_expansion.go index e14b83882f8..0a46431d588 100644 --- a/pkg/client/typed/generated/legacy/unversioned/pod_expansion.go +++ b/pkg/client/typed/generated/legacy/unversioned/pod_expansion.go @@ -21,6 +21,7 @@ import ( unversioned "k8s.io/kubernetes/pkg/client/unversioned" ) +// The PodExpansion interface allows manually adding extra methods to the PodInterface. type PodExpansion interface { Bind(binding *api.Binding) error GetLogs(name string, opts *api.PodLogOptions) *unversioned.Request diff --git a/pkg/client/typed/generated/legacy/unversioned/service_expansion.go b/pkg/client/typed/generated/legacy/unversioned/service_expansion.go index bdf50da457b..b9fb6af8621 100644 --- a/pkg/client/typed/generated/legacy/unversioned/service_expansion.go +++ b/pkg/client/typed/generated/legacy/unversioned/service_expansion.go @@ -21,6 +21,7 @@ import ( "k8s.io/kubernetes/pkg/util/net" ) +// The ServiceExpansion interface allows manually adding extra methods to the ServiceInterface. type ServiceExpansion interface { ProxyGet(scheme, name, port, path string, params map[string]string) unversioned.ResponseWrapper } diff --git a/pkg/controller/endpoint/endpoints_controller.go b/pkg/controller/endpoint/endpoints_controller.go index 5e2bda0169e..0fe8f1e14a0 100644 --- a/pkg/controller/endpoint/endpoints_controller.go +++ b/pkg/controller/endpoint/endpoints_controller.go @@ -27,7 +27,7 @@ import ( "k8s.io/kubernetes/pkg/api/errors" podutil "k8s.io/kubernetes/pkg/api/pod" "k8s.io/kubernetes/pkg/client/cache" - client "k8s.io/kubernetes/pkg/client/unversioned" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/framework" "k8s.io/kubernetes/pkg/labels" @@ -53,7 +53,7 @@ var ( ) // NewEndpointController returns a new *EndpointController. -func NewEndpointController(client *client.Client, resyncPeriod controller.ResyncPeriodFunc) *EndpointController { +func NewEndpointController(client *clientset.Clientset, resyncPeriod controller.ResyncPeriodFunc) *EndpointController { e := &EndpointController{ client: client, queue: workqueue.New(), @@ -62,10 +62,10 @@ func NewEndpointController(client *client.Client, resyncPeriod controller.Resync e.serviceStore.Store, e.serviceController = framework.NewInformer( &cache.ListWatch{ ListFunc: func(options api.ListOptions) (runtime.Object, error) { - return e.client.Services(api.NamespaceAll).List(options) + return e.client.Legacy().Services(api.NamespaceAll).List(options) }, WatchFunc: func(options api.ListOptions) (watch.Interface, error) { - return e.client.Services(api.NamespaceAll).Watch(options) + return e.client.Legacy().Services(api.NamespaceAll).Watch(options) }, }, &api.Service{}, @@ -83,10 +83,10 @@ func NewEndpointController(client *client.Client, resyncPeriod controller.Resync e.podStore.Store, e.podController = framework.NewInformer( &cache.ListWatch{ ListFunc: func(options api.ListOptions) (runtime.Object, error) { - return e.client.Pods(api.NamespaceAll).List(options) + return e.client.Legacy().Pods(api.NamespaceAll).List(options) }, WatchFunc: func(options api.ListOptions) (watch.Interface, error) { - return e.client.Pods(api.NamespaceAll).Watch(options) + return e.client.Legacy().Pods(api.NamespaceAll).Watch(options) }, }, &api.Pod{}, @@ -103,7 +103,7 @@ func NewEndpointController(client *client.Client, resyncPeriod controller.Resync // EndpointController manages selector-based service endpoints. type EndpointController struct { - client *client.Client + client *clientset.Clientset serviceStore cache.StoreToServiceLister podStore cache.StoreToPodLister @@ -268,7 +268,7 @@ func (e *EndpointController) syncService(key string) { // Don't retry, as the key isn't going to magically become understandable. return } - err = e.client.Endpoints(namespace).Delete(name) + err = e.client.Endpoints(namespace).Delete(name, nil) if err != nil && !errors.IsNotFound(err) { glog.Errorf("Error deleting endpoint %q: %v", key, err) e.queue.Add(key) // Retry diff --git a/pkg/controller/endpoint/endpoints_controller_test.go b/pkg/controller/endpoint/endpoints_controller_test.go index 2e23a8060b4..b23998a1827 100644 --- a/pkg/controller/endpoint/endpoints_controller_test.go +++ b/pkg/controller/endpoint/endpoints_controller_test.go @@ -28,6 +28,7 @@ import ( "k8s.io/kubernetes/pkg/api/unversioned" _ "k8s.io/kubernetes/pkg/apimachinery/registered" "k8s.io/kubernetes/pkg/client/cache" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/runtime" @@ -104,7 +105,7 @@ func TestSyncEndpointsItemsPreserveNoSelector(t *testing.T) { }}) // TODO: Uncomment when fix #19254 // defer testServer.Close() - client := client.NewOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) + client := clientset.NewForConfigOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) endpoints := NewEndpointController(client, controller.NoResyncPeriodFunc) endpoints.serviceStore.Store.Add(&api.Service{ ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: ns}, @@ -137,7 +138,7 @@ func TestCheckLeftoverEndpoints(t *testing.T) { }}) // TODO: Uncomment when fix #19254 // defer testServer.Close() - client := client.NewOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) + client := clientset.NewForConfigOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) endpoints := NewEndpointController(client, controller.NoResyncPeriodFunc) endpoints.checkLeftoverEndpoints() @@ -166,7 +167,7 @@ func TestSyncEndpointsProtocolTCP(t *testing.T) { }}) // TODO: Uncomment when fix #19254 // defer testServer.Close() - client := client.NewOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) + client := clientset.NewForConfigOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) endpoints := NewEndpointController(client, controller.NoResyncPeriodFunc) addPods(endpoints.podStore.Store, ns, 1, 1, 0) endpoints.serviceStore.Store.Add(&api.Service{ @@ -208,7 +209,7 @@ func TestSyncEndpointsProtocolUDP(t *testing.T) { }}) // TODO: Uncomment when fix #19254 // defer testServer.Close() - client := client.NewOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) + client := clientset.NewForConfigOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) endpoints := NewEndpointController(client, controller.NoResyncPeriodFunc) addPods(endpoints.podStore.Store, ns, 1, 1, 0) endpoints.serviceStore.Store.Add(&api.Service{ @@ -247,7 +248,7 @@ func TestSyncEndpointsItemsEmptySelectorSelectsAll(t *testing.T) { }}) // TODO: Uncomment when fix #19254 // defer testServer.Close() - client := client.NewOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) + client := clientset.NewForConfigOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) endpoints := NewEndpointController(client, controller.NoResyncPeriodFunc) addPods(endpoints.podStore.Store, ns, 1, 1, 0) endpoints.serviceStore.Store.Add(&api.Service{ @@ -285,7 +286,7 @@ func TestSyncEndpointsItemsEmptySelectorSelectsAllNotReady(t *testing.T) { }}) // TODO: Uncomment when fix #19254 // defer testServer.Close() - client := client.NewOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) + client := clientset.NewForConfigOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) endpoints := NewEndpointController(client, controller.NoResyncPeriodFunc) addPods(endpoints.podStore.Store, ns, 0, 1, 1) endpoints.serviceStore.Store.Add(&api.Service{ @@ -323,7 +324,7 @@ func TestSyncEndpointsItemsEmptySelectorSelectsAllMixed(t *testing.T) { }}) // TODO: Uncomment when fix #19254 // defer testServer.Close() - client := client.NewOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) + client := clientset.NewForConfigOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) endpoints := NewEndpointController(client, controller.NoResyncPeriodFunc) addPods(endpoints.podStore.Store, ns, 1, 1, 1) endpoints.serviceStore.Store.Add(&api.Service{ @@ -365,7 +366,7 @@ func TestSyncEndpointsItemsPreexisting(t *testing.T) { }}) // TODO: Uncomment when fix #19254 // defer testServer.Close() - client := client.NewOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) + client := clientset.NewForConfigOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) endpoints := NewEndpointController(client, controller.NoResyncPeriodFunc) addPods(endpoints.podStore.Store, ns, 1, 1, 0) endpoints.serviceStore.Store.Add(&api.Service{ @@ -406,7 +407,7 @@ func TestSyncEndpointsItemsPreexistingIdentical(t *testing.T) { }}) // TODO: Uncomment when fix #19254 // defer testServer.Close() - client := client.NewOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) + client := clientset.NewForConfigOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) endpoints := NewEndpointController(client, controller.NoResyncPeriodFunc) addPods(endpoints.podStore.Store, api.NamespaceDefault, 1, 1, 0) endpoints.serviceStore.Store.Add(&api.Service{ @@ -426,7 +427,7 @@ func TestSyncEndpointsItems(t *testing.T) { serverResponse{http.StatusOK, &api.Endpoints{}}) // TODO: Uncomment when fix #19254 // defer testServer.Close() - client := client.NewOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) + client := clientset.NewForConfigOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) endpoints := NewEndpointController(client, controller.NoResyncPeriodFunc) addPods(endpoints.podStore.Store, ns, 3, 2, 0) addPods(endpoints.podStore.Store, "blah", 5, 2, 0) // make sure these aren't found! @@ -469,7 +470,7 @@ func TestSyncEndpointsItemsWithLabels(t *testing.T) { serverResponse{http.StatusOK, &api.Endpoints{}}) // TODO: Uncomment when fix #19254 // defer testServer.Close() - client := client.NewOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) + client := clientset.NewForConfigOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) endpoints := NewEndpointController(client, controller.NoResyncPeriodFunc) addPods(endpoints.podStore.Store, ns, 3, 2, 0) serviceLabels := map[string]string{"foo": "bar"} @@ -530,7 +531,7 @@ func TestSyncEndpointsItemsPreexistingLabelsChange(t *testing.T) { }}) // TODO: Uncomment when fix #19254 // defer testServer.Close() - client := client.NewOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) + client := clientset.NewForConfigOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) endpoints := NewEndpointController(client, controller.NoResyncPeriodFunc) addPods(endpoints.podStore.Store, ns, 1, 1, 0) serviceLabels := map[string]string{"baz": "blah"} diff --git a/pkg/controller/gc/gc_controller.go b/pkg/controller/gc/gc_controller.go index b7ff87aeddb..8a7a77adfda 100644 --- a/pkg/controller/gc/gc_controller.go +++ b/pkg/controller/gc/gc_controller.go @@ -23,7 +23,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" - client "k8s.io/kubernetes/pkg/client/unversioned" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/framework" "k8s.io/kubernetes/pkg/fields" @@ -41,19 +41,19 @@ const ( ) type GCController struct { - kubeClient client.Interface + kubeClient clientset.Interface podStore cache.StoreToPodLister podStoreSyncer *framework.Controller deletePod func(namespace, name string) error threshold int } -func New(kubeClient client.Interface, resyncPeriod controller.ResyncPeriodFunc, threshold int) *GCController { +func New(kubeClient clientset.Interface, resyncPeriod controller.ResyncPeriodFunc, threshold int) *GCController { gcc := &GCController{ kubeClient: kubeClient, threshold: threshold, deletePod: func(namespace, name string) error { - return kubeClient.Pods(namespace).Delete(name, api.NewDeleteOptions(0)) + return kubeClient.Legacy().Pods(namespace).Delete(name, api.NewDeleteOptions(0)) }, } @@ -63,11 +63,11 @@ func New(kubeClient client.Interface, resyncPeriod controller.ResyncPeriodFunc, &cache.ListWatch{ ListFunc: func(options api.ListOptions) (runtime.Object, error) { options.FieldSelector = terminatedSelector - return gcc.kubeClient.Pods(api.NamespaceAll).List(options) + return gcc.kubeClient.Legacy().Pods(api.NamespaceAll).List(options) }, WatchFunc: func(options api.ListOptions) (watch.Interface, error) { options.FieldSelector = terminatedSelector - return gcc.kubeClient.Pods(api.NamespaceAll).Watch(options) + return gcc.kubeClient.Legacy().Pods(api.NamespaceAll).Watch(options) }, }, &api.Pod{}, diff --git a/pkg/controller/gc/gc_controller_test.go b/pkg/controller/gc/gc_controller_test.go index 037a6c892b2..1e42e07bf84 100644 --- a/pkg/controller/gc/gc_controller_test.go +++ b/pkg/controller/gc/gc_controller_test.go @@ -23,7 +23,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/unversioned" - "k8s.io/kubernetes/pkg/client/unversioned/testclient" + "k8s.io/kubernetes/pkg/client/testing/fake" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/util/sets" ) @@ -66,7 +66,7 @@ func TestGC(t *testing.T) { } for i, test := range testCases { - client := testclient.NewSimpleFake() + client := fake.NewSimpleClientset() gcc := New(client, controller.NoResyncPeriodFunc, test.threshold) deletedPodNames := make([]string, 0) var lock sync.Mutex diff --git a/pkg/controller/namespace/namespace_controller.go b/pkg/controller/namespace/namespace_controller.go index c7ad7c58249..bd59507358a 100644 --- a/pkg/controller/namespace/namespace_controller.go +++ b/pkg/controller/namespace/namespace_controller.go @@ -24,7 +24,8 @@ import ( "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/client/cache" - client "k8s.io/kubernetes/pkg/client/unversioned" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + extensions_unversioned "k8s.io/kubernetes/pkg/client/typed/generated/extensions/unversioned" "k8s.io/kubernetes/pkg/controller/framework" "k8s.io/kubernetes/pkg/runtime" utilruntime "k8s.io/kubernetes/pkg/util/runtime" @@ -41,15 +42,15 @@ type NamespaceController struct { } // NewNamespaceController creates a new NamespaceController -func NewNamespaceController(kubeClient client.Interface, versions *unversioned.APIVersions, resyncPeriod time.Duration) *NamespaceController { +func NewNamespaceController(kubeClient clientset.Interface, versions *unversioned.APIVersions, resyncPeriod time.Duration) *NamespaceController { var controller *framework.Controller _, controller = framework.NewInformer( &cache.ListWatch{ ListFunc: func(options api.ListOptions) (runtime.Object, error) { - return kubeClient.Namespaces().List(options) + return kubeClient.Legacy().Namespaces().List(options) }, WatchFunc: func(options api.ListOptions) (watch.Interface, error) { - return kubeClient.Namespaces().Watch(options) + return kubeClient.Legacy().Namespaces().Watch(options) }, }, &api.Namespace{}, @@ -125,7 +126,7 @@ func finalized(namespace *api.Namespace) bool { } // finalize will finalize the namespace for kubernetes -func finalizeNamespaceFunc(kubeClient client.Interface, namespace *api.Namespace) (*api.Namespace, error) { +func finalizeNamespaceFunc(kubeClient clientset.Interface, namespace *api.Namespace) (*api.Namespace, error) { namespaceFinalize := api.Namespace{} namespaceFinalize.ObjectMeta = namespace.ObjectMeta namespaceFinalize.Spec = namespace.Spec @@ -139,7 +140,7 @@ func finalizeNamespaceFunc(kubeClient client.Interface, namespace *api.Namespace for _, value := range finalizerSet.List() { namespaceFinalize.Spec.Finalizers = append(namespaceFinalize.Spec.Finalizers, api.FinalizerName(value)) } - namespace, err := kubeClient.Namespaces().Finalize(&namespaceFinalize) + namespace, err := kubeClient.Legacy().Namespaces().Finalize(&namespaceFinalize) if err != nil { // it was removed already, so life is good if errors.IsNotFound(err) { @@ -160,7 +161,7 @@ func (e *contentRemainingError) Error() string { // deleteAllContent will delete all content known to the system in a namespace. It returns an estimate // of the time remaining before the remaining resources are deleted. If estimate > 0 not all resources // are guaranteed to be gone. -func deleteAllContent(kubeClient client.Interface, versions *unversioned.APIVersions, namespace string, before unversioned.Time) (estimate int64, err error) { +func deleteAllContent(kubeClient clientset.Interface, versions *unversioned.APIVersions, namespace string, before unversioned.Time) (estimate int64, err error) { err = deleteServiceAccounts(kubeClient, namespace) if err != nil { return estimate, err @@ -238,11 +239,11 @@ func deleteAllContent(kubeClient client.Interface, versions *unversioned.APIVers } // updateNamespaceFunc is a function that makes an update to a namespace -type updateNamespaceFunc func(kubeClient client.Interface, namespace *api.Namespace) (*api.Namespace, error) +type updateNamespaceFunc func(kubeClient clientset.Interface, namespace *api.Namespace) (*api.Namespace, error) // retryOnConflictError retries the specified fn if there was a conflict error // TODO RetryOnConflict should be a generic concept in client code -func retryOnConflictError(kubeClient client.Interface, namespace *api.Namespace, fn updateNamespaceFunc) (result *api.Namespace, err error) { +func retryOnConflictError(kubeClient clientset.Interface, namespace *api.Namespace, fn updateNamespaceFunc) (result *api.Namespace, err error) { latestNamespace := namespace for { result, err = fn(kubeClient, latestNamespace) @@ -252,7 +253,7 @@ func retryOnConflictError(kubeClient client.Interface, namespace *api.Namespace, if !errors.IsConflict(err) { return nil, err } - latestNamespace, err = kubeClient.Namespaces().Get(latestNamespace.Name) + latestNamespace, err = kubeClient.Legacy().Namespaces().Get(latestNamespace.Name) if err != nil { return nil, err } @@ -261,7 +262,7 @@ func retryOnConflictError(kubeClient client.Interface, namespace *api.Namespace, } // updateNamespaceStatusFunc will verify that the status of the namespace is correct -func updateNamespaceStatusFunc(kubeClient client.Interface, namespace *api.Namespace) (*api.Namespace, error) { +func updateNamespaceStatusFunc(kubeClient clientset.Interface, namespace *api.Namespace) (*api.Namespace, error) { if namespace.DeletionTimestamp.IsZero() || namespace.Status.Phase == api.NamespaceTerminating { return namespace, nil } @@ -269,11 +270,11 @@ func updateNamespaceStatusFunc(kubeClient client.Interface, namespace *api.Names newNamespace.ObjectMeta = namespace.ObjectMeta newNamespace.Status = namespace.Status newNamespace.Status.Phase = api.NamespaceTerminating - return kubeClient.Namespaces().Status(&newNamespace) + return kubeClient.Legacy().Namespaces().UpdateStatus(&newNamespace) } // syncNamespace orchestrates deletion of a Namespace and its associated content. -func syncNamespace(kubeClient client.Interface, versions *unversioned.APIVersions, namespace *api.Namespace) error { +func syncNamespace(kubeClient clientset.Interface, versions *unversioned.APIVersions, namespace *api.Namespace) error { if namespace.DeletionTimestamp == nil { return nil } @@ -281,7 +282,7 @@ func syncNamespace(kubeClient client.Interface, versions *unversioned.APIVersion // multiple controllers may edit a namespace during termination // first get the latest state of the namespace before proceeding // if the namespace was deleted already, don't do anything - namespace, err := kubeClient.Namespaces().Get(namespace.Name) + namespace, err := kubeClient.Legacy().Namespaces().Get(namespace.Name) if err != nil { if errors.IsNotFound(err) { return nil @@ -303,7 +304,7 @@ func syncNamespace(kubeClient client.Interface, versions *unversioned.APIVersion // if the namespace is already finalized, delete it if finalized(namespace) { - err = kubeClient.Namespaces().Delete(namespace.Name) + err = kubeClient.Legacy().Namespaces().Delete(namespace.Name, nil) if err != nil && !errors.IsNotFound(err) { return err } @@ -327,7 +328,7 @@ func syncNamespace(kubeClient client.Interface, versions *unversioned.APIVersion // now check if all finalizers have reported that we delete now if finalized(result) { - err = kubeClient.Namespaces().Delete(namespace.Name) + err = kubeClient.Legacy().Namespaces().Delete(namespace.Name, nil) if err != nil && !errors.IsNotFound(err) { return err } @@ -336,13 +337,13 @@ func syncNamespace(kubeClient client.Interface, versions *unversioned.APIVersion return nil } -func deleteLimitRanges(kubeClient client.Interface, ns string) error { - items, err := kubeClient.LimitRanges(ns).List(api.ListOptions{}) +func deleteLimitRanges(kubeClient clientset.Interface, ns string) error { + items, err := kubeClient.Legacy().LimitRanges(ns).List(api.ListOptions{}) if err != nil { return err } for i := range items.Items { - err := kubeClient.LimitRanges(ns).Delete(items.Items[i].Name) + err := kubeClient.Legacy().LimitRanges(ns).Delete(items.Items[i].Name, nil) if err != nil && !errors.IsNotFound(err) { return err } @@ -350,13 +351,13 @@ func deleteLimitRanges(kubeClient client.Interface, ns string) error { return nil } -func deleteResourceQuotas(kubeClient client.Interface, ns string) error { - resourceQuotas, err := kubeClient.ResourceQuotas(ns).List(api.ListOptions{}) +func deleteResourceQuotas(kubeClient clientset.Interface, ns string) error { + resourceQuotas, err := kubeClient.Legacy().ResourceQuotas(ns).List(api.ListOptions{}) if err != nil { return err } for i := range resourceQuotas.Items { - err := kubeClient.ResourceQuotas(ns).Delete(resourceQuotas.Items[i].Name) + err := kubeClient.Legacy().ResourceQuotas(ns).Delete(resourceQuotas.Items[i].Name, nil) if err != nil && !errors.IsNotFound(err) { return err } @@ -364,13 +365,13 @@ func deleteResourceQuotas(kubeClient client.Interface, ns string) error { return nil } -func deleteServiceAccounts(kubeClient client.Interface, ns string) error { - items, err := kubeClient.ServiceAccounts(ns).List(api.ListOptions{}) +func deleteServiceAccounts(kubeClient clientset.Interface, ns string) error { + items, err := kubeClient.Legacy().ServiceAccounts(ns).List(api.ListOptions{}) if err != nil { return err } for i := range items.Items { - err := kubeClient.ServiceAccounts(ns).Delete(items.Items[i].Name) + err := kubeClient.Legacy().ServiceAccounts(ns).Delete(items.Items[i].Name, nil) if err != nil && !errors.IsNotFound(err) { return err } @@ -378,13 +379,13 @@ func deleteServiceAccounts(kubeClient client.Interface, ns string) error { return nil } -func deleteServices(kubeClient client.Interface, ns string) error { - items, err := kubeClient.Services(ns).List(api.ListOptions{}) +func deleteServices(kubeClient clientset.Interface, ns string) error { + items, err := kubeClient.Legacy().Services(ns).List(api.ListOptions{}) if err != nil { return err } for i := range items.Items { - err := kubeClient.Services(ns).Delete(items.Items[i].Name) + err := kubeClient.Legacy().Services(ns).Delete(items.Items[i].Name, nil) if err != nil && !errors.IsNotFound(err) { return err } @@ -392,13 +393,13 @@ func deleteServices(kubeClient client.Interface, ns string) error { return nil } -func deleteReplicationControllers(kubeClient client.Interface, ns string) error { - items, err := kubeClient.ReplicationControllers(ns).List(api.ListOptions{}) +func deleteReplicationControllers(kubeClient clientset.Interface, ns string) error { + items, err := kubeClient.Legacy().ReplicationControllers(ns).List(api.ListOptions{}) if err != nil { return err } for i := range items.Items { - err := kubeClient.ReplicationControllers(ns).Delete(items.Items[i].Name) + err := kubeClient.Legacy().ReplicationControllers(ns).Delete(items.Items[i].Name, nil) if err != nil && !errors.IsNotFound(err) { return err } @@ -406,8 +407,8 @@ func deleteReplicationControllers(kubeClient client.Interface, ns string) error return nil } -func deletePods(kubeClient client.Interface, ns string, before unversioned.Time) (int64, error) { - items, err := kubeClient.Pods(ns).List(api.ListOptions{}) +func deletePods(kubeClient clientset.Interface, ns string, before unversioned.Time) (int64, error) { + items, err := kubeClient.Legacy().Pods(ns).List(api.ListOptions{}) if err != nil { return 0, err } @@ -424,7 +425,7 @@ func deletePods(kubeClient client.Interface, ns string, before unversioned.Time) estimate = grace } } - err := kubeClient.Pods(ns).Delete(items.Items[i].Name, deleteOptions) + err := kubeClient.Legacy().Pods(ns).Delete(items.Items[i].Name, deleteOptions) if err != nil && !errors.IsNotFound(err) { return 0, err } @@ -435,17 +436,17 @@ func deletePods(kubeClient client.Interface, ns string, before unversioned.Time) return estimate, nil } -func deleteEvents(kubeClient client.Interface, ns string) error { - return kubeClient.Events(ns).DeleteCollection(nil, api.ListOptions{}) +func deleteEvents(kubeClient clientset.Interface, ns string) error { + return kubeClient.Legacy().Events(ns).DeleteCollection(nil, api.ListOptions{}) } -func deleteSecrets(kubeClient client.Interface, ns string) error { - items, err := kubeClient.Secrets(ns).List(api.ListOptions{}) +func deleteSecrets(kubeClient clientset.Interface, ns string) error { + items, err := kubeClient.Legacy().Secrets(ns).List(api.ListOptions{}) if err != nil { return err } for i := range items.Items { - err := kubeClient.Secrets(ns).Delete(items.Items[i].Name) + err := kubeClient.Legacy().Secrets(ns).Delete(items.Items[i].Name, nil) if err != nil && !errors.IsNotFound(err) { return err } @@ -453,13 +454,13 @@ func deleteSecrets(kubeClient client.Interface, ns string) error { return nil } -func deletePersistentVolumeClaims(kubeClient client.Interface, ns string) error { - items, err := kubeClient.PersistentVolumeClaims(ns).List(api.ListOptions{}) +func deletePersistentVolumeClaims(kubeClient clientset.Interface, ns string) error { + items, err := kubeClient.Legacy().PersistentVolumeClaims(ns).List(api.ListOptions{}) if err != nil { return err } for i := range items.Items { - err := kubeClient.PersistentVolumeClaims(ns).Delete(items.Items[i].Name) + err := kubeClient.Legacy().PersistentVolumeClaims(ns).Delete(items.Items[i].Name, nil) if err != nil && !errors.IsNotFound(err) { return err } @@ -467,7 +468,7 @@ func deletePersistentVolumeClaims(kubeClient client.Interface, ns string) error return nil } -func deleteHorizontalPodAutoscalers(expClient client.ExtensionsInterface, ns string) error { +func deleteHorizontalPodAutoscalers(expClient extensions_unversioned.ExtensionsInterface, ns string) error { items, err := expClient.HorizontalPodAutoscalers(ns).List(api.ListOptions{}) if err != nil { return err @@ -481,13 +482,13 @@ func deleteHorizontalPodAutoscalers(expClient client.ExtensionsInterface, ns str return nil } -func deleteDaemonSets(expClient client.ExtensionsInterface, ns string) error { +func deleteDaemonSets(expClient extensions_unversioned.ExtensionsInterface, ns string) error { items, err := expClient.DaemonSets(ns).List(api.ListOptions{}) if err != nil { return err } for i := range items.Items { - err := expClient.DaemonSets(ns).Delete(items.Items[i].Name) + err := expClient.DaemonSets(ns).Delete(items.Items[i].Name, nil) if err != nil && !errors.IsNotFound(err) { return err } @@ -495,7 +496,7 @@ func deleteDaemonSets(expClient client.ExtensionsInterface, ns string) error { return nil } -func deleteJobs(expClient client.ExtensionsInterface, ns string) error { +func deleteJobs(expClient extensions_unversioned.ExtensionsInterface, ns string) error { items, err := expClient.Jobs(ns).List(api.ListOptions{}) if err != nil { return err @@ -509,7 +510,7 @@ func deleteJobs(expClient client.ExtensionsInterface, ns string) error { return nil } -func deleteDeployments(expClient client.ExtensionsInterface, ns string) error { +func deleteDeployments(expClient extensions_unversioned.ExtensionsInterface, ns string) error { items, err := expClient.Deployments(ns).List(api.ListOptions{}) if err != nil { return err @@ -523,13 +524,13 @@ func deleteDeployments(expClient client.ExtensionsInterface, ns string) error { return nil } -func deleteIngress(expClient client.ExtensionsInterface, ns string) error { - items, err := expClient.Ingress(ns).List(api.ListOptions{}) +func deleteIngress(expClient extensions_unversioned.ExtensionsInterface, ns string) error { + items, err := expClient.Ingresses(ns).List(api.ListOptions{}) if err != nil { return err } for i := range items.Items { - err := expClient.Ingress(ns).Delete(items.Items[i].Name, nil) + err := expClient.Ingresses(ns).Delete(items.Items[i].Name, nil) if err != nil && !errors.IsNotFound(err) { return err } diff --git a/pkg/controller/namespace/namespace_controller_test.go b/pkg/controller/namespace/namespace_controller_test.go index 597ed9df275..369275caa99 100644 --- a/pkg/controller/namespace/namespace_controller_test.go +++ b/pkg/controller/namespace/namespace_controller_test.go @@ -25,8 +25,9 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/unversioned" - client "k8s.io/kubernetes/pkg/client/unversioned" - "k8s.io/kubernetes/pkg/client/unversioned/testclient" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + "k8s.io/kubernetes/pkg/client/testing/core" + "k8s.io/kubernetes/pkg/client/testing/fake" "k8s.io/kubernetes/pkg/util/sets" ) @@ -46,7 +47,7 @@ func TestFinalized(t *testing.T) { } func TestFinalizeNamespaceFunc(t *testing.T) { - mockClient := &testclient.Fake{} + mockClient := &fake.Clientset{} testNamespace := &api.Namespace{ ObjectMeta: api.ObjectMeta{ Name: "test", @@ -64,7 +65,7 @@ func TestFinalizeNamespaceFunc(t *testing.T) { if !actions[0].Matches("create", "namespaces") || actions[0].GetSubresource() != "finalize" { t.Errorf("Expected finalize-namespace action %v", actions[0]) } - finalizers := actions[0].(testclient.CreateAction).GetObject().(*api.Namespace).Spec.Finalizers + finalizers := actions[0].(core.CreateAction).GetObject().(*api.Namespace).Spec.Finalizers if len(finalizers) != 1 { t.Errorf("There should be a single finalizer remaining") } @@ -144,7 +145,7 @@ func testSyncNamespaceThatIsTerminating(t *testing.T, versions *unversioned.APIV } for scenario, testInput := range scenarios { - mockClient := testclient.NewSimpleFake(testInput.testNamespace) + mockClient := fake.NewSimpleClientset(testInput.testNamespace) if containsVersion(versions, "extensions/v1beta1") { resources := []unversioned.APIResource{} for _, resource := range []string{"daemonsets", "deployments", "jobs", "horizontalpodautoscalers", "ingresses"} { @@ -175,9 +176,9 @@ func testSyncNamespaceThatIsTerminating(t *testing.T, versions *unversioned.APIV } func TestRetryOnConflictError(t *testing.T) { - mockClient := &testclient.Fake{} + mockClient := &fake.Clientset{} numTries := 0 - retryOnce := func(kubeClient client.Interface, namespace *api.Namespace) (*api.Namespace, error) { + retryOnce := func(kubeClient clientset.Interface, namespace *api.Namespace) (*api.Namespace, error) { numTries++ if numTries <= 1 { return namespace, errors.NewConflict(api.Resource("namespaces"), namespace.Name, fmt.Errorf("ERROR!")) @@ -203,7 +204,7 @@ func TestSyncNamespaceThatIsTerminatingV1Beta1(t *testing.T) { } func TestSyncNamespaceThatIsActive(t *testing.T) { - mockClient := &testclient.Fake{} + mockClient := &fake.Clientset{} testNamespace := &api.Namespace{ ObjectMeta: api.ObjectMeta{ Name: "test", @@ -226,7 +227,7 @@ func TestSyncNamespaceThatIsActive(t *testing.T) { } func TestRunStop(t *testing.T) { - mockClient := &testclient.Fake{} + mockClient := &fake.Clientset{} nsController := NewNamespaceController(mockClient, &unversioned.APIVersions{}, 1*time.Second) diff --git a/pkg/controller/node/nodecontroller.go b/pkg/controller/node/nodecontroller.go index 74fe5b188b7..44a297945e7 100644 --- a/pkg/controller/node/nodecontroller.go +++ b/pkg/controller/node/nodecontroller.go @@ -28,7 +28,9 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/client/cache" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" "k8s.io/kubernetes/pkg/client/record" + unversioned_legacy "k8s.io/kubernetes/pkg/client/typed/generated/legacy/unversioned" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/cloudprovider" "k8s.io/kubernetes/pkg/controller" @@ -67,7 +69,7 @@ type NodeController struct { clusterCIDR *net.IPNet deletingPodsRateLimiter util.RateLimiter knownNodeSet sets.String - kubeClient client.Interface + kubeClient clientset.Interface // Method for easy mocking in unittest. lookupIP func(host string) ([]net.IP, error) // Value used if sync_nodes_status=False. NodeController will not proactively @@ -122,7 +124,7 @@ type NodeController struct { // NewNodeController returns a new node controller to sync instances from cloudprovider. func NewNodeController( cloud cloudprovider.Interface, - kubeClient client.Interface, + kubeClient clientset.Interface, podEvictionTimeout time.Duration, deletionEvictionLimiter util.RateLimiter, terminationEvictionLimiter util.RateLimiter, @@ -136,7 +138,7 @@ func NewNodeController( eventBroadcaster.StartLogging(glog.Infof) if kubeClient != nil { glog.Infof("Sending events to api server.") - eventBroadcaster.StartRecordingToSink(kubeClient.Events("")) + eventBroadcaster.StartRecordingToSink(&unversioned_legacy.EventSinkImpl{kubeClient.Legacy().Events("")}) } else { glog.Infof("No api server defined - no events will be sent to API server.") } @@ -169,10 +171,10 @@ func NewNodeController( nc.podStore.Store, nc.podController = framework.NewInformer( &cache.ListWatch{ ListFunc: func(options api.ListOptions) (runtime.Object, error) { - return nc.kubeClient.Pods(api.NamespaceAll).List(options) + return nc.kubeClient.Legacy().Pods(api.NamespaceAll).List(options) }, WatchFunc: func(options api.ListOptions) (watch.Interface, error) { - return nc.kubeClient.Pods(api.NamespaceAll).Watch(options) + return nc.kubeClient.Legacy().Pods(api.NamespaceAll).Watch(options) }, }, &api.Pod{}, @@ -185,10 +187,10 @@ func NewNodeController( nc.nodeStore.Store, nc.nodeController = framework.NewInformer( &cache.ListWatch{ ListFunc: func(options api.ListOptions) (runtime.Object, error) { - return nc.kubeClient.Nodes().List(options) + return nc.kubeClient.Legacy().Nodes().List(options) }, WatchFunc: func(options api.ListOptions) (watch.Interface, error) { - return nc.kubeClient.Nodes().Watch(options) + return nc.kubeClient.Legacy().Nodes().Watch(options) }, }, &api.Node{}, @@ -363,9 +365,9 @@ func (nc *NodeController) maybeDeleteTerminatingPod(obj interface{}) { } } -func forcefullyDeletePod(c client.Interface, pod *api.Pod) { +func forcefullyDeletePod(c clientset.Interface, pod *api.Pod) { var zero int64 - err := c.Pods(pod.Namespace).Delete(pod.Name, &api.DeleteOptions{GracePeriodSeconds: &zero}) + err := c.Legacy().Pods(pod.Namespace).Delete(pod.Name, &api.DeleteOptions{GracePeriodSeconds: &zero}) if err != nil { utilruntime.HandleError(err) } @@ -375,7 +377,7 @@ func forcefullyDeletePod(c client.Interface, pod *api.Pod) { // post "NodeReady==ConditionUnknown". It also evicts all pods if node is not ready or // not reachable for a long period of time. func (nc *NodeController) monitorNodeStatus() error { - nodes, err := nc.kubeClient.Nodes().List(api.ListOptions{}) + nodes, err := nc.kubeClient.Legacy().Nodes().List(api.ListOptions{}) if err != nil { return err } @@ -419,7 +421,7 @@ func (nc *NodeController) monitorNodeStatus() error { break } name := node.Name - node, err = nc.kubeClient.Nodes().Get(name) + node, err = nc.kubeClient.Legacy().Nodes().Get(name) if err != nil { glog.Errorf("Failed while getting a Node to retry updating NodeStatus. Probably Node %s was deleted.", name) break @@ -485,7 +487,7 @@ func (nc *NodeController) monitorNodeStatus() error { continue } - if err := nc.kubeClient.Nodes().Delete(node.Name); err != nil { + if err := nc.kubeClient.Legacy().Nodes().Delete(node.Name, nil); err != nil { glog.Errorf("Unable to delete node %s: %v", node.Name, err) continue } @@ -518,7 +520,7 @@ func (nc *NodeController) reconcileNodeCIDRs(nodes *api.NodeList) { } glog.V(4).Infof("Assigning node %s CIDR %s", node.Name, podCIDR) node.Spec.PodCIDR = podCIDR - if _, err := nc.kubeClient.Nodes().Update(&node); err != nil { + if _, err := nc.kubeClient.Legacy().Nodes().Update(&node); err != nil { nc.recordNodeStatusChange(&node, "CIDRAssignmentFailed") } } @@ -696,7 +698,7 @@ func (nc *NodeController) tryUpdateNodeStatus(node *api.Node) (time.Duration, ap } if !api.Semantic.DeepEqual(nc.getCondition(&node.Status, api.NodeReady), &lastReadyCondition) { - if _, err = nc.kubeClient.Nodes().UpdateStatus(node); err != nil { + if _, err = nc.kubeClient.Legacy().Nodes().UpdateStatus(node); err != nil { glog.Errorf("Error updating node %s: %v", node.Name, err) return gracePeriod, lastReadyCondition, readyCondition, err } else { @@ -718,7 +720,7 @@ func (nc *NodeController) tryUpdateNodeStatus(node *api.Node) (time.Duration, ap func (nc *NodeController) hasPods(nodeName string) (bool, error) { selector := fields.OneTermEqualSelector(client.PodHost, nodeName) options := api.ListOptions{FieldSelector: selector} - pods, err := nc.kubeClient.Pods(api.NamespaceAll).List(options) + pods, err := nc.kubeClient.Legacy().Pods(api.NamespaceAll).List(options) if err != nil { return false, err } @@ -753,7 +755,7 @@ func (nc *NodeController) deletePods(nodeName string) (bool, error) { remaining := false selector := fields.OneTermEqualSelector(client.PodHost, nodeName) options := api.ListOptions{FieldSelector: selector} - pods, err := nc.kubeClient.Pods(api.NamespaceAll).List(options) + pods, err := nc.kubeClient.Legacy().Pods(api.NamespaceAll).List(options) if err != nil { return remaining, err } @@ -779,7 +781,7 @@ func (nc *NodeController) deletePods(nodeName string) (bool, error) { glog.V(2).Infof("Starting deletion of pod %v", pod.Name) nc.recorder.Eventf(&pod, api.EventTypeNormal, "NodeControllerEviction", "Marking for deletion Pod %s from Node %s", pod.Name, nodeName) - if err := nc.kubeClient.Pods(pod.Namespace).Delete(pod.Name, nil); err != nil { + if err := nc.kubeClient.Legacy().Pods(pod.Namespace).Delete(pod.Name, nil); err != nil { return false, err } remaining = true @@ -792,7 +794,7 @@ func (nc *NodeController) deletePods(nodeName string) (bool, error) { func (nc *NodeController) markAllPodsNotReady(nodeName string) error { glog.V(2).Infof("Update ready status of pods on node [%v]", nodeName) opts := api.ListOptions{FieldSelector: fields.OneTermEqualSelector(client.PodHost, nodeName)} - pods, err := nc.kubeClient.Pods(api.NamespaceAll).List(opts) + pods, err := nc.kubeClient.Legacy().Pods(api.NamespaceAll).List(opts) if err != nil { return err } @@ -808,7 +810,7 @@ func (nc *NodeController) markAllPodsNotReady(nodeName string) error { if cond.Type == api.PodReady { pod.Status.Conditions[i].Status = api.ConditionFalse glog.V(2).Infof("Updating ready status of pod %v to false", pod.Name) - pod, err := nc.kubeClient.Pods(pod.Namespace).UpdateStatus(&pod) + pod, err := nc.kubeClient.Legacy().Pods(pod.Namespace).UpdateStatus(&pod) if err != nil { glog.Warningf("Failed to updated status for pod %q: %v", format.Pod(pod), err) errMsg = append(errMsg, fmt.Sprintf("%v", err)) @@ -834,7 +836,7 @@ func (nc *NodeController) terminatePods(nodeName string, since time.Time) (bool, selector := fields.OneTermEqualSelector(client.PodHost, nodeName) options := api.ListOptions{FieldSelector: selector} - pods, err := nc.kubeClient.Pods(api.NamespaceAll).List(options) + pods, err := nc.kubeClient.Legacy().Pods(api.NamespaceAll).List(options) if err != nil { return false, nextAttempt, err } @@ -863,7 +865,7 @@ func (nc *NodeController) terminatePods(nodeName string, since time.Time) (bool, remaining = 0 glog.V(2).Infof("Removing pod %v after %s grace period", pod.Name, grace) nc.recordNodeEvent(nodeName, api.EventTypeNormal, "TerminatingEvictedPod", fmt.Sprintf("Pod %s has exceeded the grace period for deletion after being evicted from Node %q and is being force killed", pod.Name, nodeName)) - if err := nc.kubeClient.Pods(pod.Namespace).Delete(pod.Name, api.NewDeleteOptions(0)); err != nil { + if err := nc.kubeClient.Legacy().Pods(pod.Namespace).Delete(pod.Name, api.NewDeleteOptions(0)); err != nil { glog.Errorf("Error completing deletion of pod %s: %v", pod.Name, err) complete = false } diff --git a/pkg/controller/node/nodecontroller_test.go b/pkg/controller/node/nodecontroller_test.go index 644230d3c82..9c6cfc2c7a7 100644 --- a/pkg/controller/node/nodecontroller_test.go +++ b/pkg/controller/node/nodecontroller_test.go @@ -28,8 +28,8 @@ import ( "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/cache" - client "k8s.io/kubernetes/pkg/client/unversioned" - "k8s.io/kubernetes/pkg/client/unversioned/testclient" + "k8s.io/kubernetes/pkg/client/testing/fake" + unversioned_legacy "k8s.io/kubernetes/pkg/client/typed/generated/legacy/unversioned" "k8s.io/kubernetes/pkg/util" "k8s.io/kubernetes/pkg/watch" ) @@ -45,7 +45,7 @@ const ( // PodsInterface and PodInterface to test list & delet pods, which is implemented in // the embedded client.Fake field. type FakeNodeHandler struct { - *testclient.Fake + *fake.Clientset // Input: Hooks determine if request is valid or not CreateHook func(*FakeNodeHandler, *api.Node) bool @@ -62,8 +62,17 @@ type FakeNodeHandler struct { createLock sync.Mutex } -func (c *FakeNodeHandler) Nodes() client.NodeInterface { - return c +type FakeLegacyHandler struct { + unversioned_legacy.LegacyInterface + n *FakeNodeHandler +} + +func (c *FakeNodeHandler) Legacy() unversioned_legacy.LegacyInterface { + return &FakeLegacyHandler{c.Clientset.Legacy(), c} +} + +func (m *FakeLegacyHandler) Nodes() unversioned_legacy.NodeInterface { + return m.n } func (m *FakeNodeHandler) Create(node *api.Node) (*api.Node, error) { @@ -115,12 +124,16 @@ func (m *FakeNodeHandler) List(opts api.ListOptions) (*api.NodeList, error) { return nodeList, nil } -func (m *FakeNodeHandler) Delete(id string) error { +func (m *FakeNodeHandler) Delete(id string, opt *api.DeleteOptions) error { m.DeletedNodes = append(m.DeletedNodes, newNode(id)) m.RequestCount++ return nil } +func (m *FakeNodeHandler) DeleteCollection(opt *api.DeleteOptions, listOpts api.ListOptions) error { + return nil +} + func (m *FakeNodeHandler) Update(node *api.Node) (*api.Node, error) { nodeCopy := *node m.UpdatedNodes = append(m.UpdatedNodes, &nodeCopy) @@ -162,7 +175,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { }, }, }, - Fake: testclient.NewSimpleFake(&api.PodList{Items: []api.Pod{*newPod("pod0", "node0")}}), + Clientset: fake.NewSimpleClientset(&api.PodList{Items: []api.Pod{*newPod("pod0", "node0")}}), }, daemonSets: nil, timeToPass: 0, @@ -191,7 +204,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { }, }, }, - Fake: testclient.NewSimpleFake(&api.PodList{Items: []api.Pod{*newPod("pod0", "node0")}}), + Clientset: fake.NewSimpleClientset(&api.PodList{Items: []api.Pod{*newPod("pod0", "node0")}}), }, daemonSets: nil, timeToPass: evictionTimeout, @@ -230,7 +243,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { }, }, }, - Fake: testclient.NewSimpleFake( + Clientset: fake.NewSimpleClientset( &api.PodList{ Items: []api.Pod{ { @@ -296,7 +309,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { }, }, }, - Fake: testclient.NewSimpleFake(&api.PodList{Items: []api.Pod{*newPod("pod0", "node0")}}), + Clientset: fake.NewSimpleClientset(&api.PodList{Items: []api.Pod{*newPod("pod0", "node0")}}), }, daemonSets: nil, timeToPass: time.Hour, @@ -335,7 +348,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { }, }, }, - Fake: testclient.NewSimpleFake(&api.PodList{Items: []api.Pod{*newPod("pod0", "node0")}}), + Clientset: fake.NewSimpleClientset(&api.PodList{Items: []api.Pod{*newPod("pod0", "node0")}}), }, daemonSets: nil, timeToPass: evictionTimeout - testNodeMonitorGracePeriod, @@ -374,7 +387,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { }, }, }, - Fake: testclient.NewSimpleFake(&api.PodList{Items: []api.Pod{*newPod("pod0", "node0")}}), + Clientset: fake.NewSimpleClientset(&api.PodList{Items: []api.Pod{*newPod("pod0", "node0")}}), }, daemonSets: nil, timeToPass: 60 * time.Minute, @@ -460,7 +473,7 @@ func TestMonitorNodeStatusUpdateStatus(t *testing.T) { }, }, }, - Fake: testclient.NewSimpleFake(&api.PodList{Items: []api.Pod{*newPod("pod0", "node0")}}), + Clientset: fake.NewSimpleClientset(&api.PodList{Items: []api.Pod{*newPod("pod0", "node0")}}), }, expectedRequestCount: 2, // List+Update expectedNodes: []*api.Node{ @@ -504,7 +517,7 @@ func TestMonitorNodeStatusUpdateStatus(t *testing.T) { }, }, }, - Fake: testclient.NewSimpleFake(&api.PodList{Items: []api.Pod{*newPod("pod0", "node0")}}), + Clientset: fake.NewSimpleClientset(&api.PodList{Items: []api.Pod{*newPod("pod0", "node0")}}), }, expectedRequestCount: 1, // List expectedNodes: nil, @@ -546,7 +559,7 @@ func TestMonitorNodeStatusUpdateStatus(t *testing.T) { }, }, }, - Fake: testclient.NewSimpleFake(&api.PodList{Items: []api.Pod{*newPod("pod0", "node0")}}), + Clientset: fake.NewSimpleClientset(&api.PodList{Items: []api.Pod{*newPod("pod0", "node0")}}), }, expectedRequestCount: 3, // (List+)List+Update timeToPass: time.Hour, @@ -638,7 +651,7 @@ func TestMonitorNodeStatusUpdateStatus(t *testing.T) { }, }, }, - Fake: testclient.NewSimpleFake(&api.PodList{Items: []api.Pod{*newPod("pod0", "node0")}}), + Clientset: fake.NewSimpleClientset(&api.PodList{Items: []api.Pod{*newPod("pod0", "node0")}}), }, expectedRequestCount: 1, // List expectedNodes: nil, @@ -691,7 +704,7 @@ func TestMonitorNodeStatusMarkPodsNotReady(t *testing.T) { }, }, }, - Fake: testclient.NewSimpleFake(&api.PodList{Items: []api.Pod{*newPod("pod0", "node0")}}), + Clientset: fake.NewSimpleClientset(&api.PodList{Items: []api.Pod{*newPod("pod0", "node0")}}), }, expectedPodStatusUpdate: false, }, @@ -725,7 +738,7 @@ func TestMonitorNodeStatusMarkPodsNotReady(t *testing.T) { }, }, }, - Fake: testclient.NewSimpleFake(&api.PodList{Items: []api.Pod{*newPod("pod0", "node0")}}), + Clientset: fake.NewSimpleClientset(&api.PodList{Items: []api.Pod{*newPod("pod0", "node0")}}), }, expectedPodStatusUpdate: false, }, @@ -766,7 +779,7 @@ func TestMonitorNodeStatusMarkPodsNotReady(t *testing.T) { }, }, }, - Fake: testclient.NewSimpleFake(&api.PodList{Items: []api.Pod{*newPod("pod0", "node0")}}), + Clientset: fake.NewSimpleClientset(&api.PodList{Items: []api.Pod{*newPod("pod0", "node0")}}), }, timeToPass: 1 * time.Minute, newNodeStatus: api.NodeStatus{ @@ -875,7 +888,7 @@ func TestNodeDeletion(t *testing.T) { }, }, }, - Fake: testclient.NewSimpleFake(&api.PodList{Items: []api.Pod{*newPod("pod0", "node0"), *newPod("pod1", "node1")}}), + Clientset: fake.NewSimpleClientset(&api.PodList{Items: []api.Pod{*newPod("pod0", "node0"), *newPod("pod1", "node1")}}), } nodeController := NewNodeController(nil, fakeNodeHandler, 5*time.Minute, util.NewFakeRateLimiter(), util.NewFakeRateLimiter(), @@ -884,7 +897,7 @@ func TestNodeDeletion(t *testing.T) { if err := nodeController.monitorNodeStatus(); err != nil { t.Errorf("unexpected error: %v", err) } - fakeNodeHandler.Delete("node1") + fakeNodeHandler.Delete("node1", nil) if err := nodeController.monitorNodeStatus(); err != nil { t.Errorf("unexpected error: %v", err) } diff --git a/pkg/controller/podautoscaler/horizontal.go b/pkg/controller/podautoscaler/horizontal.go index 4220f6158fc..305ec073013 100644 --- a/pkg/controller/podautoscaler/horizontal.go +++ b/pkg/controller/podautoscaler/horizontal.go @@ -26,7 +26,8 @@ import ( "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/record" - client "k8s.io/kubernetes/pkg/client/unversioned" + unversioned_extensions "k8s.io/kubernetes/pkg/client/typed/generated/extensions/unversioned" + unversioned_legacy "k8s.io/kubernetes/pkg/client/typed/generated/legacy/unversioned" "k8s.io/kubernetes/pkg/controller/podautoscaler/metrics" "k8s.io/kubernetes/pkg/util" ) @@ -38,8 +39,8 @@ const ( ) type HorizontalController struct { - scaleNamespacer client.ScaleNamespacer - hpaNamespacer client.HorizontalPodAutoscalersNamespacer + scaleNamespacer unversioned_extensions.ScalesGetter + hpaNamespacer unversioned_extensions.HorizontalPodAutoscalersGetter metricsClient metrics.MetricsClient eventRecorder record.EventRecorder @@ -48,7 +49,7 @@ type HorizontalController struct { var downscaleForbiddenWindow = 5 * time.Minute var upscaleForbiddenWindow = 3 * time.Minute -func NewHorizontalController(evtNamespacer client.EventNamespacer, scaleNamespacer client.ScaleNamespacer, hpaNamespacer client.HorizontalPodAutoscalersNamespacer, metricsClient metrics.MetricsClient) *HorizontalController { +func NewHorizontalController(evtNamespacer unversioned_legacy.EventsGetter, scaleNamespacer unversioned_extensions.ScalesGetter, hpaNamespacer unversioned_extensions.HorizontalPodAutoscalersGetter, metricsClient metrics.MetricsClient) *HorizontalController { broadcaster := record.NewBroadcaster() broadcaster.StartRecordingToSink(evtNamespacer.Events("")) recorder := broadcaster.NewRecorder(api.EventSource{Component: "horizontal-pod-autoscaler"}) diff --git a/pkg/controller/podautoscaler/horizontal_test.go b/pkg/controller/podautoscaler/horizontal_test.go index bd0bd63b691..377d8d24ea7 100644 --- a/pkg/controller/podautoscaler/horizontal_test.go +++ b/pkg/controller/podautoscaler/horizontal_test.go @@ -27,6 +27,8 @@ import ( "k8s.io/kubernetes/pkg/api/resource" _ "k8s.io/kubernetes/pkg/apimachinery/registered" "k8s.io/kubernetes/pkg/apis/extensions" + "k8s.io/kubernetes/pkg/client/testing/core" + "k8s.io/kubernetes/pkg/client/testing/fake" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/client/unversioned/testclient" "k8s.io/kubernetes/pkg/controller/podautoscaler/metrics" @@ -67,7 +69,7 @@ type testCase struct { verifyEvents bool } -func (tc *testCase) prepareTestClient(t *testing.T) *testclient.Fake { +func (tc *testCase) prepareTestClient(t *testing.T) *fake.Clientset { namespace := "test-namespace" hpaName := "test-hpa" rcName := "test-rc" @@ -76,8 +78,8 @@ func (tc *testCase) prepareTestClient(t *testing.T) *testclient.Fake { tc.scaleUpdated = false tc.eventCreated = false - fakeClient := &testclient.Fake{} - fakeClient.AddReactor("list", "horizontalpodautoscalers", func(action testclient.Action) (handled bool, ret runtime.Object, err error) { + fakeClient := &fake.Clientset{} + fakeClient.AddReactor("list", "horizontalpodautoscalers", func(action core.Action) (handled bool, ret runtime.Object, err error) { obj := &extensions.HorizontalPodAutoscalerList{ Items: []extensions.HorizontalPodAutoscaler{ { @@ -104,7 +106,7 @@ func (tc *testCase) prepareTestClient(t *testing.T) *testclient.Fake { return true, obj, nil }) - fakeClient.AddReactor("get", "replicationController", func(action testclient.Action) (handled bool, ret runtime.Object, err error) { + fakeClient.AddReactor("get", "replicationController", func(action core.Action) (handled bool, ret runtime.Object, err error) { obj := &extensions.Scale{ ObjectMeta: api.ObjectMeta{ Name: rcName, @@ -121,7 +123,7 @@ func (tc *testCase) prepareTestClient(t *testing.T) *testclient.Fake { return true, obj, nil }) - fakeClient.AddReactor("list", "pods", func(action testclient.Action) (handled bool, ret runtime.Object, err error) { + fakeClient.AddReactor("list", "pods", func(action core.Action) (handled bool, ret runtime.Object, err error) { obj := &api.PodList{} for i := 0; i < len(tc.reportedCPURequests); i++ { podName := fmt.Sprintf("%s-%d", podNamePrefix, i) @@ -153,7 +155,7 @@ func (tc *testCase) prepareTestClient(t *testing.T) *testclient.Fake { return true, obj, nil }) - fakeClient.AddProxyReactor("services", func(action testclient.Action) (handled bool, ret client.ResponseWrapper, err error) { + fakeClient.AddProxyReactor("services", func(action core.Action) (handled bool, ret client.ResponseWrapper, err error) { timestamp := time.Now() metrics := heapster.MetricResultList{} for _, level := range tc.reportedLevels { @@ -167,7 +169,7 @@ func (tc *testCase) prepareTestClient(t *testing.T) *testclient.Fake { return true, newFakeResponseWrapper(heapsterRawMemResponse), nil }) - fakeClient.AddReactor("update", "replicationController", func(action testclient.Action) (handled bool, ret runtime.Object, err error) { + fakeClient.AddReactor("update", "replicationController", func(action core.Action) (handled bool, ret runtime.Object, err error) { obj := action.(testclient.UpdateAction).GetObject().(*extensions.Scale) replicas := action.(testclient.UpdateAction).GetObject().(*extensions.Scale).Spec.Replicas assert.Equal(t, tc.desiredReplicas, replicas) @@ -175,7 +177,7 @@ func (tc *testCase) prepareTestClient(t *testing.T) *testclient.Fake { return true, obj, nil }) - fakeClient.AddReactor("update", "horizontalpodautoscalers", func(action testclient.Action) (handled bool, ret runtime.Object, err error) { + fakeClient.AddReactor("update", "horizontalpodautoscalers", func(action core.Action) (handled bool, ret runtime.Object, err error) { obj := action.(testclient.UpdateAction).GetObject().(*extensions.HorizontalPodAutoscaler) assert.Equal(t, namespace, obj.Namespace) assert.Equal(t, hpaName, obj.Name) @@ -183,7 +185,7 @@ func (tc *testCase) prepareTestClient(t *testing.T) *testclient.Fake { return true, obj, nil }) - fakeClient.AddReactor("*", "events", func(action testclient.Action) (handled bool, ret runtime.Object, err error) { + fakeClient.AddReactor("*", "events", func(action core.Action) (handled bool, ret runtime.Object, err error) { obj := action.(testclient.CreateAction).GetObject().(*api.Event) if tc.verifyEvents { assert.Equal(t, "SuccessfulRescale", obj.Reason) @@ -206,7 +208,7 @@ func (tc *testCase) verifyResults(t *testing.T) { func (tc *testCase) runTest(t *testing.T) { testClient := tc.prepareTestClient(t) metricsClient := metrics.NewHeapsterMetricsClient(testClient, metrics.DefaultHeapsterNamespace, metrics.DefaultHeapsterScheme, metrics.DefaultHeapsterService, metrics.DefaultHeapsterPort) - hpaController := NewHorizontalController(testClient, testClient.Extensions(), testClient.Extensions(), metricsClient) + hpaController := NewHorizontalController(testClient.Legacy(), testClient.Extensions(), testClient.Extensions(), metricsClient) err := hpaController.reconcileAutoscalers() assert.Equal(t, nil, err) if tc.verifyEvents { diff --git a/pkg/controller/podautoscaler/metrics/metrics_client.go b/pkg/controller/podautoscaler/metrics/metrics_client.go index a6f15342d6c..a579fae02a5 100644 --- a/pkg/controller/podautoscaler/metrics/metrics_client.go +++ b/pkg/controller/podautoscaler/metrics/metrics_client.go @@ -24,7 +24,7 @@ import ( "github.com/golang/glog" "k8s.io/kubernetes/pkg/api" - client "k8s.io/kubernetes/pkg/client/unversioned" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" "k8s.io/kubernetes/pkg/labels" heapster "k8s.io/heapster/api/v1/types" @@ -66,7 +66,7 @@ type metricDefinition struct { // HeapsterMetricsClient is Heapster-based implementation of MetricsClient type HeapsterMetricsClient struct { - client client.Interface + client clientset.Interface heapsterNamespace string heapsterScheme string heapsterService string @@ -90,7 +90,7 @@ func getHeapsterCustomMetricDefinition(metricName string) metricDefinition { } // NewHeapsterMetricsClient returns a new instance of Heapster-based implementation of MetricsClient interface. -func NewHeapsterMetricsClient(client client.Interface, namespace, scheme, service, port string) *HeapsterMetricsClient { +func NewHeapsterMetricsClient(client clientset.Interface, namespace, scheme, service, port string) *HeapsterMetricsClient { return &HeapsterMetricsClient{ client: client, heapsterNamespace: namespace, @@ -113,7 +113,7 @@ func (h *HeapsterMetricsClient) GetCpuConsumptionAndRequestInMillis(namespace st avgRequest int64, timestamp time.Time, err error) { labelSelector := labels.SelectorFromSet(labels.Set(selector)) - podList, err := h.client.Pods(namespace). + podList, err := h.client.Legacy().Pods(namespace). List(api.ListOptions{LabelSelector: labelSelector}) if err != nil { @@ -152,7 +152,7 @@ func (h *HeapsterMetricsClient) GetCustomMetric(customMetricName string, namespa metricSpec := getHeapsterCustomMetricDefinition(customMetricName) labelSelector := labels.SelectorFromSet(labels.Set(selector)) - podList, err := h.client.Pods(namespace).List(api.ListOptions{LabelSelector: labelSelector}) + podList, err := h.client.Legacy().Pods(namespace).List(api.ListOptions{LabelSelector: labelSelector}) if err != nil { return nil, time.Time{}, fmt.Errorf("failed to get pod list: %v", err) @@ -179,7 +179,7 @@ func (h *HeapsterMetricsClient) getForPods(metricSpec metricDefinition, namespac strings.Join(podNames, ","), metricSpec.name) - resultRaw, err := h.client.Services(h.heapsterNamespace). + resultRaw, err := h.client.Legacy().Services(h.heapsterNamespace). ProxyGet(h.heapsterScheme, h.heapsterService, h.heapsterPort, metricPath, map[string]string{"start": startTime.Format(time.RFC3339)}). DoRaw() diff --git a/pkg/controller/podautoscaler/metrics/metrics_client_test.go b/pkg/controller/podautoscaler/metrics/metrics_client_test.go index c87201c0d7a..438f10bddd2 100644 --- a/pkg/controller/podautoscaler/metrics/metrics_client_test.go +++ b/pkg/controller/podautoscaler/metrics/metrics_client_test.go @@ -26,8 +26,9 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" _ "k8s.io/kubernetes/pkg/apimachinery/registered" + "k8s.io/kubernetes/pkg/client/testing/core" + "k8s.io/kubernetes/pkg/client/testing/fake" client "k8s.io/kubernetes/pkg/client/unversioned" - "k8s.io/kubernetes/pkg/client/unversioned/testclient" "k8s.io/kubernetes/pkg/runtime" heapster "k8s.io/heapster/api/v1/types" @@ -70,16 +71,16 @@ type testCase struct { selector map[string]string } -func (tc *testCase) prepareTestClient(t *testing.T) *testclient.Fake { +func (tc *testCase) prepareTestClient(t *testing.T) *fake.Clientset { namespace := "test-namespace" tc.namespace = namespace podNamePrefix := "test-pod" selector := map[string]string{"name": podNamePrefix} tc.selector = selector - fakeClient := &testclient.Fake{} + fakeClient := &fake.Clientset{} - fakeClient.AddReactor("list", "pods", func(action testclient.Action) (handled bool, ret runtime.Object, err error) { + fakeClient.AddReactor("list", "pods", func(action core.Action) (handled bool, ret runtime.Object, err error) { obj := &api.PodList{} for i := 0; i < tc.replicas; i++ { podName := fmt.Sprintf("%s-%d", podNamePrefix, i) @@ -109,7 +110,7 @@ func (tc *testCase) prepareTestClient(t *testing.T) *testclient.Fake { return true, obj, nil }) - fakeClient.AddProxyReactor("services", func(action testclient.Action) (handled bool, ret client.ResponseWrapper, err error) { + fakeClient.AddProxyReactor("services", func(action core.Action) (handled bool, ret client.ResponseWrapper, err error) { metrics := heapster.MetricResultList{} var latestTimestamp time.Time for _, reportedMetricPoints := range tc.reportedMetricsPoints { diff --git a/pkg/controller/resourcequota/resource_quota_controller.go b/pkg/controller/resourcequota/resource_quota_controller.go index 6dbfa464455..0e16dc0d532 100644 --- a/pkg/controller/resourcequota/resource_quota_controller.go +++ b/pkg/controller/resourcequota/resource_quota_controller.go @@ -24,7 +24,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/client/cache" - client "k8s.io/kubernetes/pkg/client/unversioned" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/framework" "k8s.io/kubernetes/pkg/runtime" @@ -37,7 +37,7 @@ import ( // ResourceQuotaController is responsible for tracking quota usage status in the system type ResourceQuotaController struct { // Must have authority to list all resources in the system, and update quota status - kubeClient client.Interface + kubeClient clientset.Interface // An index of resource quota objects by namespace rqIndexer cache.Indexer // Watches changes to all resource quota @@ -55,7 +55,7 @@ type ResourceQuotaController struct { } // NewResourceQuotaController creates a new ResourceQuotaController -func NewResourceQuotaController(kubeClient client.Interface, resyncPeriod controller.ResyncPeriodFunc) *ResourceQuotaController { +func NewResourceQuotaController(kubeClient clientset.Interface, resyncPeriod controller.ResyncPeriodFunc) *ResourceQuotaController { rq := &ResourceQuotaController{ kubeClient: kubeClient, @@ -66,10 +66,10 @@ func NewResourceQuotaController(kubeClient client.Interface, resyncPeriod contro rq.rqIndexer, rq.rqController = framework.NewIndexerInformer( &cache.ListWatch{ ListFunc: func(options api.ListOptions) (runtime.Object, error) { - return rq.kubeClient.ResourceQuotas(api.NamespaceAll).List(options) + return rq.kubeClient.Legacy().ResourceQuotas(api.NamespaceAll).List(options) }, WatchFunc: func(options api.ListOptions) (watch.Interface, error) { - return rq.kubeClient.ResourceQuotas(api.NamespaceAll).Watch(options) + return rq.kubeClient.Legacy().ResourceQuotas(api.NamespaceAll).Watch(options) }, }, &api.ResourceQuota{}, @@ -106,10 +106,10 @@ func NewResourceQuotaController(kubeClient client.Interface, resyncPeriod contro rq.podStore.Store, rq.podController = framework.NewInformer( &cache.ListWatch{ ListFunc: func(options api.ListOptions) (runtime.Object, error) { - return rq.kubeClient.Pods(api.NamespaceAll).List(options) + return rq.kubeClient.Legacy().Pods(api.NamespaceAll).List(options) }, WatchFunc: func(options api.ListOptions) (watch.Interface, error) { - return rq.kubeClient.Pods(api.NamespaceAll).Watch(options) + return rq.kubeClient.Legacy().Pods(api.NamespaceAll).Watch(options) }, }, &api.Pod{}, @@ -265,7 +265,7 @@ func (rq *ResourceQuotaController) syncResourceQuota(quota api.ResourceQuota) (e pods := &api.PodList{} if set[api.ResourcePods] || set[api.ResourceMemory] || set[api.ResourceCPU] { - pods, err = rq.kubeClient.Pods(usage.Namespace).List(api.ListOptions{}) + pods, err = rq.kubeClient.Legacy().Pods(usage.Namespace).List(api.ListOptions{}) if err != nil { return err } @@ -288,31 +288,31 @@ func (rq *ResourceQuotaController) syncResourceQuota(quota api.ResourceQuota) (e case api.ResourcePods: value = resource.NewQuantity(int64(len(filteredPods)), resource.DecimalSI) case api.ResourceServices: - items, err := rq.kubeClient.Services(usage.Namespace).List(api.ListOptions{}) + items, err := rq.kubeClient.Legacy().Services(usage.Namespace).List(api.ListOptions{}) if err != nil { return err } value = resource.NewQuantity(int64(len(items.Items)), resource.DecimalSI) case api.ResourceReplicationControllers: - items, err := rq.kubeClient.ReplicationControllers(usage.Namespace).List(api.ListOptions{}) + items, err := rq.kubeClient.Legacy().ReplicationControllers(usage.Namespace).List(api.ListOptions{}) if err != nil { return err } value = resource.NewQuantity(int64(len(items.Items)), resource.DecimalSI) case api.ResourceQuotas: - items, err := rq.kubeClient.ResourceQuotas(usage.Namespace).List(api.ListOptions{}) + items, err := rq.kubeClient.Legacy().ResourceQuotas(usage.Namespace).List(api.ListOptions{}) if err != nil { return err } value = resource.NewQuantity(int64(len(items.Items)), resource.DecimalSI) case api.ResourceSecrets: - items, err := rq.kubeClient.Secrets(usage.Namespace).List(api.ListOptions{}) + items, err := rq.kubeClient.Legacy().Secrets(usage.Namespace).List(api.ListOptions{}) if err != nil { return err } value = resource.NewQuantity(int64(len(items.Items)), resource.DecimalSI) case api.ResourcePersistentVolumeClaims: - items, err := rq.kubeClient.PersistentVolumeClaims(usage.Namespace).List(api.ListOptions{}) + items, err := rq.kubeClient.Legacy().PersistentVolumeClaims(usage.Namespace).List(api.ListOptions{}) if err != nil { return err } @@ -334,7 +334,7 @@ func (rq *ResourceQuotaController) syncResourceQuota(quota api.ResourceQuota) (e // update the usage only if it changed if dirty { - _, err = rq.kubeClient.ResourceQuotas(usage.Namespace).UpdateStatus(&usage) + _, err = rq.kubeClient.Legacy().ResourceQuotas(usage.Namespace).UpdateStatus(&usage) return err } return nil diff --git a/pkg/controller/resourcequota/resource_quota_controller_test.go b/pkg/controller/resourcequota/resource_quota_controller_test.go index 42443c1d797..726c8245081 100644 --- a/pkg/controller/resourcequota/resource_quota_controller_test.go +++ b/pkg/controller/resourcequota/resource_quota_controller_test.go @@ -23,6 +23,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" + "k8s.io/kubernetes/pkg/client/testing/fake" "k8s.io/kubernetes/pkg/client/unversioned/testclient" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/util/sets" @@ -173,7 +174,7 @@ func TestSyncResourceQuota(t *testing.T) { }, } - kubeClient := testclient.NewSimpleFake(&podList, "a) + kubeClient := fake.NewSimpleClientset(&podList, "a) ResourceQuotaController := NewResourceQuotaController(kubeClient, controller.StaticResyncPeriodFunc(time.Second)) err := ResourceQuotaController.syncResourceQuota(quota) @@ -230,7 +231,7 @@ func TestSyncResourceQuotaSpecChange(t *testing.T) { }, } - kubeClient := testclient.NewSimpleFake("a) + kubeClient := fake.NewSimpleClientset("a) ResourceQuotaController := NewResourceQuotaController(kubeClient, controller.StaticResyncPeriodFunc(time.Second)) err := ResourceQuotaController.syncResourceQuota(quota) @@ -277,7 +278,7 @@ func TestSyncResourceQuotaNoChange(t *testing.T) { }, } - kubeClient := testclient.NewSimpleFake(&api.PodList{}, "a) + kubeClient := fake.NewSimpleClientset(&api.PodList{}, "a) ResourceQuotaController := NewResourceQuotaController(kubeClient, controller.StaticResyncPeriodFunc(time.Second)) err := ResourceQuotaController.syncResourceQuota(quota) diff --git a/pkg/controller/route/routecontroller.go b/pkg/controller/route/routecontroller.go index a54decba46f..3811a7dab23 100644 --- a/pkg/controller/route/routecontroller.go +++ b/pkg/controller/route/routecontroller.go @@ -23,19 +23,19 @@ import ( "github.com/golang/glog" "k8s.io/kubernetes/pkg/api" - client "k8s.io/kubernetes/pkg/client/unversioned" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" "k8s.io/kubernetes/pkg/cloudprovider" "k8s.io/kubernetes/pkg/util" ) type RouteController struct { routes cloudprovider.Routes - kubeClient client.Interface + kubeClient clientset.Interface clusterName string clusterCIDR *net.IPNet } -func New(routes cloudprovider.Routes, kubeClient client.Interface, clusterName string, clusterCIDR *net.IPNet) *RouteController { +func New(routes cloudprovider.Routes, kubeClient clientset.Interface, clusterName string, clusterCIDR *net.IPNet) *RouteController { return &RouteController{ routes: routes, kubeClient: kubeClient, @@ -59,7 +59,7 @@ func (rc *RouteController) reconcileNodeRoutes() error { } // TODO (cjcullen): use pkg/controller/framework.NewInformer to watch this // and reduce the number of lists needed. - nodeList, err := rc.kubeClient.Nodes().List(api.ListOptions{}) + nodeList, err := rc.kubeClient.Legacy().Nodes().List(api.ListOptions{}) if err != nil { return fmt.Errorf("error listing nodes: %v", err) } diff --git a/pkg/controller/service/servicecontroller.go b/pkg/controller/service/servicecontroller.go index 4cc83a549ab..0e64547d9c3 100644 --- a/pkg/controller/service/servicecontroller.go +++ b/pkg/controller/service/servicecontroller.go @@ -27,8 +27,9 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/client/cache" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" "k8s.io/kubernetes/pkg/client/record" - client "k8s.io/kubernetes/pkg/client/unversioned" + unversioned_legacy "k8s.io/kubernetes/pkg/client/typed/generated/legacy/unversioned" "k8s.io/kubernetes/pkg/cloudprovider" "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/types" @@ -67,7 +68,7 @@ type serviceCache struct { type ServiceController struct { cloud cloudprovider.Interface - kubeClient client.Interface + kubeClient clientset.Interface clusterName string balancer cloudprovider.LoadBalancer zone cloudprovider.Zone @@ -79,9 +80,9 @@ type ServiceController struct { // New returns a new service controller to keep cloud provider service resources // (like load balancers) in sync with the registry. -func New(cloud cloudprovider.Interface, kubeClient client.Interface, clusterName string) *ServiceController { +func New(cloud cloudprovider.Interface, kubeClient clientset.Interface, clusterName string) *ServiceController { broadcaster := record.NewBroadcaster() - broadcaster.StartRecordingToSink(kubeClient.Events("")) + broadcaster.StartRecordingToSink(&unversioned_legacy.EventSinkImpl{kubeClient.Legacy().Events("")}) recorder := broadcaster.NewRecorder(api.EventSource{Component: "service-controller"}) return &ServiceController{ @@ -115,8 +116,8 @@ func (s *ServiceController) Run(serviceSyncPeriod, nodeSyncPeriod time.Duration) // We have to make this check beecause the ListWatch that we use in // WatchServices requires Client functions that aren't in the interface // for some reason. - if _, ok := s.kubeClient.(*client.Client); !ok { - return fmt.Errorf("ServiceController only works with real Client objects, but was passed something else satisfying the client Interface.") + if _, ok := s.kubeClient.(*clientset.Clientset); !ok { + return fmt.Errorf("ServiceController only works with real Client objects, but was passed something else satisfying the clientset.Interface.") } // Get the currently existing set of services and then all future creates @@ -133,13 +134,13 @@ func (s *ServiceController) Run(serviceSyncPeriod, nodeSyncPeriod time.Duration) }), s.cache, ) - lw := cache.NewListWatchFromClient(s.kubeClient.(*client.Client), "services", api.NamespaceAll, fields.Everything()) + lw := cache.NewListWatchFromClient(s.kubeClient.(*clientset.Clientset).LegacyClient, "services", api.NamespaceAll, fields.Everything()) cache.NewReflector(lw, &api.Service{}, serviceQueue, serviceSyncPeriod).Run() for i := 0; i < workerGoroutines; i++ { go s.watchServices(serviceQueue) } - nodeLW := cache.NewListWatchFromClient(s.kubeClient.(*client.Client), "nodes", api.NamespaceAll, fields.Everything()) + nodeLW := cache.NewListWatchFromClient(s.kubeClient.(*clientset.Clientset).LegacyClient, "nodes", api.NamespaceAll, fields.Everything()) cache.NewReflector(nodeLW, &api.Node{}, s.nodeLister.Store, 0).Run() go s.nodeSyncLoop(nodeSyncPeriod) return nil @@ -343,7 +344,7 @@ func (s *ServiceController) createLoadBalancerIfNeeded(namespacedName types.Name func (s *ServiceController) persistUpdate(service *api.Service) error { var err error for i := 0; i < clientRetryCount; i++ { - _, err = s.kubeClient.Services(service.Namespace).UpdateStatus(service) + _, err = s.kubeClient.Legacy().Services(service.Namespace).UpdateStatus(service) if err == nil { return nil } diff --git a/pkg/controller/service/servicecontroller_test.go b/pkg/controller/service/servicecontroller_test.go index 72ae9eb3dc4..26b0fa7b601 100644 --- a/pkg/controller/service/servicecontroller_test.go +++ b/pkg/controller/service/servicecontroller_test.go @@ -21,7 +21,7 @@ import ( "testing" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/unversioned/testclient" + "k8s.io/kubernetes/pkg/client/testing/fake" fakecloud "k8s.io/kubernetes/pkg/cloudprovider/providers/fake" "k8s.io/kubernetes/pkg/types" ) @@ -90,7 +90,7 @@ func TestCreateExternalLoadBalancer(t *testing.T) { for _, item := range table { cloud := &fakecloud.FakeCloud{} cloud.Region = region - client := &testclient.Fake{} + client := &fake.Clientset{} controller := New(cloud, client, "test-cluster") controller.init() cloud.Calls = nil // ignore any cloud calls made in init() @@ -210,7 +210,7 @@ func TestUpdateNodesInExternalLoadBalancer(t *testing.T) { cloud := &fakecloud.FakeCloud{} cloud.Region = region - client := &testclient.Fake{} + client := &fake.Clientset{} controller := New(cloud, client, "test-cluster2") controller.init() cloud.Calls = nil // ignore any cloud calls made in init() diff --git a/pkg/controller/serviceaccount/serviceaccounts_controller.go b/pkg/controller/serviceaccount/serviceaccounts_controller.go index c3a355c2aad..32da0d86a6f 100644 --- a/pkg/controller/serviceaccount/serviceaccounts_controller.go +++ b/pkg/controller/serviceaccount/serviceaccounts_controller.go @@ -25,6 +25,7 @@ import ( apierrs "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/meta" "k8s.io/kubernetes/pkg/client/cache" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/controller/framework" "k8s.io/kubernetes/pkg/fields" @@ -66,7 +67,7 @@ func DefaultServiceAccountsControllerOptions() ServiceAccountsControllerOptions } // NewServiceAccountsController returns a new *ServiceAccountsController. -func NewServiceAccountsController(cl client.Interface, options ServiceAccountsControllerOptions) *ServiceAccountsController { +func NewServiceAccountsController(cl clientset.Interface, options ServiceAccountsControllerOptions) *ServiceAccountsController { e := &ServiceAccountsController{ client: cl, serviceAccountsToEnsure: options.ServiceAccounts, @@ -81,11 +82,11 @@ func NewServiceAccountsController(cl client.Interface, options ServiceAccountsCo &cache.ListWatch{ ListFunc: func(options api.ListOptions) (runtime.Object, error) { options.FieldSelector = accountSelector - return e.client.ServiceAccounts(api.NamespaceAll).List(options) + return e.client.Legacy().ServiceAccounts(api.NamespaceAll).List(options) }, WatchFunc: func(options api.ListOptions) (watch.Interface, error) { options.FieldSelector = accountSelector - return e.client.ServiceAccounts(api.NamespaceAll).Watch(options) + return e.client.Legacy().ServiceAccounts(api.NamespaceAll).Watch(options) }, }, &api.ServiceAccount{}, @@ -99,10 +100,10 @@ func NewServiceAccountsController(cl client.Interface, options ServiceAccountsCo e.namespaces, e.namespaceController = framework.NewIndexerInformer( &cache.ListWatch{ ListFunc: func(options api.ListOptions) (runtime.Object, error) { - return e.client.Namespaces().List(options) + return e.client.Legacy().Namespaces().List(options) }, WatchFunc: func(options api.ListOptions) (watch.Interface, error) { - return e.client.Namespaces().Watch(options) + return e.client.Legacy().Namespaces().Watch(options) }, }, &api.Namespace{}, @@ -121,7 +122,7 @@ func NewServiceAccountsController(cl client.Interface, options ServiceAccountsCo type ServiceAccountsController struct { stopChan chan struct{} - client client.Interface + client clientset.Interface serviceAccountsToEnsure []api.ServiceAccount serviceAccounts cache.Indexer @@ -216,7 +217,7 @@ func (e *ServiceAccountsController) createServiceAccountIfNeeded(sa api.ServiceA // createDefaultServiceAccount creates a default ServiceAccount in the specified namespace func (e *ServiceAccountsController) createServiceAccount(sa api.ServiceAccount, namespace string) { sa.Namespace = namespace - if _, err := e.client.ServiceAccounts(namespace).Create(&sa); err != nil && !apierrs.IsAlreadyExists(err) { + if _, err := e.client.Legacy().ServiceAccounts(namespace).Create(&sa); err != nil && !apierrs.IsAlreadyExists(err) { glog.Error(err) } } diff --git a/pkg/controller/serviceaccount/serviceaccounts_controller_test.go b/pkg/controller/serviceaccount/serviceaccounts_controller_test.go index f569e811a52..7294eddc664 100644 --- a/pkg/controller/serviceaccount/serviceaccounts_controller_test.go +++ b/pkg/controller/serviceaccount/serviceaccounts_controller_test.go @@ -20,6 +20,7 @@ import ( "testing" "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/client/testing/fake" "k8s.io/kubernetes/pkg/client/unversioned/testclient" "k8s.io/kubernetes/pkg/util/sets" ) @@ -149,7 +150,7 @@ func TestServiceAccountCreation(t *testing.T) { } for k, tc := range testcases { - client := testclient.NewSimpleFake(defaultServiceAccount, managedServiceAccount) + client := fake.NewSimpleClientset(defaultServiceAccount, managedServiceAccount) options := DefaultServiceAccountsControllerOptions() options.ServiceAccounts = []api.ServiceAccount{ {ObjectMeta: api.ObjectMeta{Name: defaultName}}, diff --git a/pkg/controller/serviceaccount/tokengetter.go b/pkg/controller/serviceaccount/tokengetter.go index 3dfdc415f55..a4748de977f 100644 --- a/pkg/controller/serviceaccount/tokengetter.go +++ b/pkg/controller/serviceaccount/tokengetter.go @@ -18,7 +18,7 @@ package serviceaccount import ( "k8s.io/kubernetes/pkg/api" - client "k8s.io/kubernetes/pkg/client/unversioned" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" "k8s.io/kubernetes/pkg/registry/generic" "k8s.io/kubernetes/pkg/registry/secret" secretetcd "k8s.io/kubernetes/pkg/registry/secret/etcd" @@ -28,23 +28,23 @@ import ( "k8s.io/kubernetes/pkg/storage" ) -// clientGetter implements ServiceAccountTokenGetter using a client.Interface +// clientGetter implements ServiceAccountTokenGetter using a clientset.Interface type clientGetter struct { - client client.Interface + client clientset.Interface } // NewGetterFromClient returns a ServiceAccountTokenGetter that // uses the specified client to retrieve service accounts and secrets. // The client should NOT authenticate using a service account token // the returned getter will be used to retrieve, or recursion will result. -func NewGetterFromClient(c client.Interface) serviceaccount.ServiceAccountTokenGetter { +func NewGetterFromClient(c clientset.Interface) serviceaccount.ServiceAccountTokenGetter { return clientGetter{c} } func (c clientGetter) GetServiceAccount(namespace, name string) (*api.ServiceAccount, error) { - return c.client.ServiceAccounts(namespace).Get(name) + return c.client.Legacy().ServiceAccounts(namespace).Get(name) } func (c clientGetter) GetSecret(namespace, name string) (*api.Secret, error) { - return c.client.Secrets(namespace).Get(name) + return c.client.Legacy().Secrets(namespace).Get(name) } // registryGetter implements ServiceAccountTokenGetter using a service account and secret registry diff --git a/pkg/controller/serviceaccount/tokens_controller.go b/pkg/controller/serviceaccount/tokens_controller.go index e64c9522bd8..82bccd4aa73 100644 --- a/pkg/controller/serviceaccount/tokens_controller.go +++ b/pkg/controller/serviceaccount/tokens_controller.go @@ -25,6 +25,7 @@ import ( "k8s.io/kubernetes/pkg/api" apierrors "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/client/cache" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/controller/framework" "k8s.io/kubernetes/pkg/fields" @@ -61,7 +62,7 @@ type TokensControllerOptions struct { } // NewTokensController returns a new *TokensController. -func NewTokensController(cl client.Interface, options TokensControllerOptions) *TokensController { +func NewTokensController(cl clientset.Interface, options TokensControllerOptions) *TokensController { e := &TokensController{ client: cl, token: options.TokenGenerator, @@ -71,10 +72,10 @@ func NewTokensController(cl client.Interface, options TokensControllerOptions) * e.serviceAccounts, e.serviceAccountController = framework.NewIndexerInformer( &cache.ListWatch{ ListFunc: func(options api.ListOptions) (runtime.Object, error) { - return e.client.ServiceAccounts(api.NamespaceAll).List(options) + return e.client.Legacy().ServiceAccounts(api.NamespaceAll).List(options) }, WatchFunc: func(options api.ListOptions) (watch.Interface, error) { - return e.client.ServiceAccounts(api.NamespaceAll).Watch(options) + return e.client.Legacy().ServiceAccounts(api.NamespaceAll).Watch(options) }, }, &api.ServiceAccount{}, @@ -92,11 +93,11 @@ func NewTokensController(cl client.Interface, options TokensControllerOptions) * &cache.ListWatch{ ListFunc: func(options api.ListOptions) (runtime.Object, error) { options.FieldSelector = tokenSelector - return e.client.Secrets(api.NamespaceAll).List(options) + return e.client.Legacy().Secrets(api.NamespaceAll).List(options) }, WatchFunc: func(options api.ListOptions) (watch.Interface, error) { options.FieldSelector = tokenSelector - return e.client.Secrets(api.NamespaceAll).Watch(options) + return e.client.Legacy().Secrets(api.NamespaceAll).Watch(options) }, }, &api.Secret{}, @@ -119,7 +120,7 @@ func NewTokensController(cl client.Interface, options TokensControllerOptions) * type TokensController struct { stopChan chan struct{} - client client.Interface + client clientset.Interface token serviceaccount.TokenGenerator rootCA []byte @@ -291,7 +292,7 @@ func (e *TokensController) createSecretIfNeeded(serviceAccount *api.ServiceAccou func (e *TokensController) createSecret(serviceAccount *api.ServiceAccount) error { // We don't want to update the cache's copy of the service account // so add the secret to a freshly retrieved copy of the service account - serviceAccounts := e.client.ServiceAccounts(serviceAccount.Namespace) + serviceAccounts := e.client.Legacy().ServiceAccounts(serviceAccount.Namespace) liveServiceAccount, err := serviceAccounts.Get(serviceAccount.Name) if err != nil { return err @@ -329,7 +330,7 @@ func (e *TokensController) createSecret(serviceAccount *api.ServiceAccount) erro } // Save the secret - if _, err := e.client.Secrets(serviceAccount.Namespace).Create(secret); err != nil { + if _, err := e.client.Legacy().Secrets(serviceAccount.Namespace).Create(secret); err != nil { return err } @@ -339,7 +340,7 @@ func (e *TokensController) createSecret(serviceAccount *api.ServiceAccount) erro if err != nil { // we weren't able to use the token, try to clean it up. glog.V(2).Infof("Deleting secret %s/%s because reference couldn't be added (%v)", secret.Namespace, secret.Name, err) - if err := e.client.Secrets(secret.Namespace).Delete(secret.Name); err != nil { + if err := e.client.Legacy().Secrets(secret.Namespace).Delete(secret.Name, nil); err != nil { glog.Error(err) // if we fail, just log it } } @@ -389,7 +390,7 @@ func (e *TokensController) generateTokenIfNeeded(serviceAccount *api.ServiceAcco secret.Annotations[api.ServiceAccountUIDKey] = string(serviceAccount.UID) // Save the secret - if _, err := e.client.Secrets(secret.Namespace).Update(secret); err != nil { + if _, err := e.client.Legacy().Secrets(secret.Namespace).Update(secret); err != nil { return err } return nil @@ -397,7 +398,7 @@ func (e *TokensController) generateTokenIfNeeded(serviceAccount *api.ServiceAcco // deleteSecret deletes the given secret func (e *TokensController) deleteSecret(secret *api.Secret) error { - return e.client.Secrets(secret.Namespace).Delete(secret.Name) + return e.client.Legacy().Secrets(secret.Namespace).Delete(secret.Name, nil) } // removeSecretReferenceIfNeeded updates the given ServiceAccount to remove a reference to the given secretName if needed. @@ -410,7 +411,7 @@ func (e *TokensController) removeSecretReferenceIfNeeded(serviceAccount *api.Ser // We don't want to update the cache's copy of the service account // so remove the secret from a freshly retrieved copy of the service account - serviceAccounts := e.client.ServiceAccounts(serviceAccount.Namespace) + serviceAccounts := e.client.Legacy().ServiceAccounts(serviceAccount.Namespace) serviceAccount, err := serviceAccounts.Get(serviceAccount.Name) if err != nil { return err @@ -460,7 +461,7 @@ func (e *TokensController) getServiceAccount(secret *api.Secret, fetchOnCacheMis } if fetchOnCacheMiss { - serviceAccount, err := e.client.ServiceAccounts(secret.Namespace).Get(name) + serviceAccount, err := e.client.Legacy().ServiceAccounts(secret.Namespace).Get(name) if apierrors.IsNotFound(err) { return nil, nil } diff --git a/pkg/controller/serviceaccount/tokens_controller_test.go b/pkg/controller/serviceaccount/tokens_controller_test.go index 2cfbc39373a..e39e752d1c2 100644 --- a/pkg/controller/serviceaccount/tokens_controller_test.go +++ b/pkg/controller/serviceaccount/tokens_controller_test.go @@ -21,7 +21,8 @@ import ( "testing" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/unversioned/testclient" + "k8s.io/kubernetes/pkg/client/testing/core" + "k8s.io/kubernetes/pkg/client/testing/fake" "k8s.io/kubernetes/pkg/runtime" utilrand "k8s.io/kubernetes/pkg/util/rand" ) @@ -179,16 +180,16 @@ func TestTokenCreation(t *testing.T) { UpdatedSecret *api.Secret DeletedSecret *api.Secret - ExpectedActions []testclient.Action + ExpectedActions []core.Action }{ "new serviceaccount with no secrets": { ClientObjects: []runtime.Object{serviceAccount(emptySecretReferences()), createdTokenSecret()}, AddedServiceAccount: serviceAccount(emptySecretReferences()), - ExpectedActions: []testclient.Action{ - testclient.NewGetAction("serviceaccounts", api.NamespaceDefault, "default"), - testclient.NewCreateAction("secrets", api.NamespaceDefault, createdTokenSecret()), - testclient.NewUpdateAction("serviceaccounts", api.NamespaceDefault, serviceAccount(addTokenSecretReference(emptySecretReferences()))), + ExpectedActions: []core.Action{ + core.NewGetAction("serviceaccounts", api.NamespaceDefault, "default"), + core.NewCreateAction("secrets", api.NamespaceDefault, createdTokenSecret()), + core.NewUpdateAction("serviceaccounts", api.NamespaceDefault, serviceAccount(addTokenSecretReference(emptySecretReferences()))), }, }, "new serviceaccount with no secrets with unsynced secret store": { @@ -197,20 +198,20 @@ func TestTokenCreation(t *testing.T) { SecretsSyncPending: true, AddedServiceAccount: serviceAccount(emptySecretReferences()), - ExpectedActions: []testclient.Action{ - testclient.NewGetAction("serviceaccounts", api.NamespaceDefault, "default"), - testclient.NewCreateAction("secrets", api.NamespaceDefault, createdTokenSecret()), - testclient.NewUpdateAction("serviceaccounts", api.NamespaceDefault, serviceAccount(addTokenSecretReference(emptySecretReferences()))), + ExpectedActions: []core.Action{ + core.NewGetAction("serviceaccounts", api.NamespaceDefault, "default"), + core.NewCreateAction("secrets", api.NamespaceDefault, createdTokenSecret()), + core.NewUpdateAction("serviceaccounts", api.NamespaceDefault, serviceAccount(addTokenSecretReference(emptySecretReferences()))), }, }, "new serviceaccount with missing secrets": { ClientObjects: []runtime.Object{serviceAccount(missingSecretReferences()), createdTokenSecret()}, AddedServiceAccount: serviceAccount(missingSecretReferences()), - ExpectedActions: []testclient.Action{ - testclient.NewGetAction("serviceaccounts", api.NamespaceDefault, "default"), - testclient.NewCreateAction("secrets", api.NamespaceDefault, createdTokenSecret()), - testclient.NewUpdateAction("serviceaccounts", api.NamespaceDefault, serviceAccount(addTokenSecretReference(missingSecretReferences()))), + ExpectedActions: []core.Action{ + core.NewGetAction("serviceaccounts", api.NamespaceDefault, "default"), + core.NewCreateAction("secrets", api.NamespaceDefault, createdTokenSecret()), + core.NewUpdateAction("serviceaccounts", api.NamespaceDefault, serviceAccount(addTokenSecretReference(missingSecretReferences()))), }, }, "new serviceaccount with missing secrets with unsynced secret store": { @@ -219,16 +220,16 @@ func TestTokenCreation(t *testing.T) { SecretsSyncPending: true, AddedServiceAccount: serviceAccount(missingSecretReferences()), - ExpectedActions: []testclient.Action{}, + ExpectedActions: []core.Action{}, }, "new serviceaccount with non-token secrets": { ClientObjects: []runtime.Object{serviceAccount(regularSecretReferences()), createdTokenSecret(), opaqueSecret()}, AddedServiceAccount: serviceAccount(regularSecretReferences()), - ExpectedActions: []testclient.Action{ - testclient.NewGetAction("serviceaccounts", api.NamespaceDefault, "default"), - testclient.NewCreateAction("secrets", api.NamespaceDefault, createdTokenSecret()), - testclient.NewUpdateAction("serviceaccounts", api.NamespaceDefault, serviceAccount(addTokenSecretReference(regularSecretReferences()))), + ExpectedActions: []core.Action{ + core.NewGetAction("serviceaccounts", api.NamespaceDefault, "default"), + core.NewCreateAction("secrets", api.NamespaceDefault, createdTokenSecret()), + core.NewUpdateAction("serviceaccounts", api.NamespaceDefault, serviceAccount(addTokenSecretReference(regularSecretReferences()))), }, }, "new serviceaccount with token secrets": { @@ -236,14 +237,14 @@ func TestTokenCreation(t *testing.T) { ExistingSecrets: []*api.Secret{serviceAccountTokenSecret()}, AddedServiceAccount: serviceAccount(tokenSecretReferences()), - ExpectedActions: []testclient.Action{}, + ExpectedActions: []core.Action{}, }, "new serviceaccount with no secrets with resource conflict": { ClientObjects: []runtime.Object{updatedServiceAccount(emptySecretReferences()), createdTokenSecret()}, AddedServiceAccount: serviceAccount(emptySecretReferences()), - ExpectedActions: []testclient.Action{ - testclient.NewGetAction("serviceaccounts", api.NamespaceDefault, "default"), + ExpectedActions: []core.Action{ + core.NewGetAction("serviceaccounts", api.NamespaceDefault, "default"), }, }, @@ -251,10 +252,10 @@ func TestTokenCreation(t *testing.T) { ClientObjects: []runtime.Object{serviceAccount(emptySecretReferences()), createdTokenSecret()}, UpdatedServiceAccount: serviceAccount(emptySecretReferences()), - ExpectedActions: []testclient.Action{ - testclient.NewGetAction("serviceaccounts", api.NamespaceDefault, "default"), - testclient.NewCreateAction("secrets", api.NamespaceDefault, createdTokenSecret()), - testclient.NewUpdateAction("serviceaccounts", api.NamespaceDefault, serviceAccount(addTokenSecretReference(emptySecretReferences()))), + ExpectedActions: []core.Action{ + core.NewGetAction("serviceaccounts", api.NamespaceDefault, "default"), + core.NewCreateAction("secrets", api.NamespaceDefault, createdTokenSecret()), + core.NewUpdateAction("serviceaccounts", api.NamespaceDefault, serviceAccount(addTokenSecretReference(emptySecretReferences()))), }, }, "updated serviceaccount with no secrets with unsynced secret store": { @@ -263,20 +264,20 @@ func TestTokenCreation(t *testing.T) { SecretsSyncPending: true, UpdatedServiceAccount: serviceAccount(emptySecretReferences()), - ExpectedActions: []testclient.Action{ - testclient.NewGetAction("serviceaccounts", api.NamespaceDefault, "default"), - testclient.NewCreateAction("secrets", api.NamespaceDefault, createdTokenSecret()), - testclient.NewUpdateAction("serviceaccounts", api.NamespaceDefault, serviceAccount(addTokenSecretReference(emptySecretReferences()))), + ExpectedActions: []core.Action{ + core.NewGetAction("serviceaccounts", api.NamespaceDefault, "default"), + core.NewCreateAction("secrets", api.NamespaceDefault, createdTokenSecret()), + core.NewUpdateAction("serviceaccounts", api.NamespaceDefault, serviceAccount(addTokenSecretReference(emptySecretReferences()))), }, }, "updated serviceaccount with missing secrets": { ClientObjects: []runtime.Object{serviceAccount(missingSecretReferences()), createdTokenSecret()}, UpdatedServiceAccount: serviceAccount(missingSecretReferences()), - ExpectedActions: []testclient.Action{ - testclient.NewGetAction("serviceaccounts", api.NamespaceDefault, "default"), - testclient.NewCreateAction("secrets", api.NamespaceDefault, createdTokenSecret()), - testclient.NewUpdateAction("serviceaccounts", api.NamespaceDefault, serviceAccount(addTokenSecretReference(missingSecretReferences()))), + ExpectedActions: []core.Action{ + core.NewGetAction("serviceaccounts", api.NamespaceDefault, "default"), + core.NewCreateAction("secrets", api.NamespaceDefault, createdTokenSecret()), + core.NewUpdateAction("serviceaccounts", api.NamespaceDefault, serviceAccount(addTokenSecretReference(missingSecretReferences()))), }, }, "updated serviceaccount with missing secrets with unsynced secret store": { @@ -285,54 +286,54 @@ func TestTokenCreation(t *testing.T) { SecretsSyncPending: true, UpdatedServiceAccount: serviceAccount(missingSecretReferences()), - ExpectedActions: []testclient.Action{}, + ExpectedActions: []core.Action{}, }, "updated serviceaccount with non-token secrets": { ClientObjects: []runtime.Object{serviceAccount(regularSecretReferences()), createdTokenSecret(), opaqueSecret()}, UpdatedServiceAccount: serviceAccount(regularSecretReferences()), - ExpectedActions: []testclient.Action{ - testclient.NewGetAction("serviceaccounts", api.NamespaceDefault, "default"), - testclient.NewCreateAction("secrets", api.NamespaceDefault, createdTokenSecret()), - testclient.NewUpdateAction("serviceaccounts", api.NamespaceDefault, serviceAccount(addTokenSecretReference(regularSecretReferences()))), + ExpectedActions: []core.Action{ + core.NewGetAction("serviceaccounts", api.NamespaceDefault, "default"), + core.NewCreateAction("secrets", api.NamespaceDefault, createdTokenSecret()), + core.NewUpdateAction("serviceaccounts", api.NamespaceDefault, serviceAccount(addTokenSecretReference(regularSecretReferences()))), }, }, "updated serviceaccount with token secrets": { ExistingSecrets: []*api.Secret{serviceAccountTokenSecret()}, UpdatedServiceAccount: serviceAccount(tokenSecretReferences()), - ExpectedActions: []testclient.Action{}, + ExpectedActions: []core.Action{}, }, "updated serviceaccount with no secrets with resource conflict": { ClientObjects: []runtime.Object{updatedServiceAccount(emptySecretReferences()), createdTokenSecret()}, UpdatedServiceAccount: serviceAccount(emptySecretReferences()), - ExpectedActions: []testclient.Action{ - testclient.NewGetAction("serviceaccounts", api.NamespaceDefault, "default"), + ExpectedActions: []core.Action{ + core.NewGetAction("serviceaccounts", api.NamespaceDefault, "default"), }, }, "deleted serviceaccount with no secrets": { DeletedServiceAccount: serviceAccount(emptySecretReferences()), - ExpectedActions: []testclient.Action{}, + ExpectedActions: []core.Action{}, }, "deleted serviceaccount with missing secrets": { DeletedServiceAccount: serviceAccount(missingSecretReferences()), - ExpectedActions: []testclient.Action{}, + ExpectedActions: []core.Action{}, }, "deleted serviceaccount with non-token secrets": { ClientObjects: []runtime.Object{opaqueSecret()}, DeletedServiceAccount: serviceAccount(regularSecretReferences()), - ExpectedActions: []testclient.Action{}, + ExpectedActions: []core.Action{}, }, "deleted serviceaccount with token secrets": { ClientObjects: []runtime.Object{serviceAccountTokenSecret()}, ExistingSecrets: []*api.Secret{serviceAccountTokenSecret()}, DeletedServiceAccount: serviceAccount(tokenSecretReferences()), - ExpectedActions: []testclient.Action{ - testclient.NewDeleteAction("secrets", api.NamespaceDefault, "token-secret-1"), + ExpectedActions: []core.Action{ + core.NewDeleteAction("secrets", api.NamespaceDefault, "token-secret-1"), }, }, @@ -340,24 +341,24 @@ func TestTokenCreation(t *testing.T) { ClientObjects: []runtime.Object{serviceAccountTokenSecret()}, AddedSecret: serviceAccountTokenSecret(), - ExpectedActions: []testclient.Action{ - testclient.NewGetAction("serviceaccounts", api.NamespaceDefault, "default"), - testclient.NewDeleteAction("secrets", api.NamespaceDefault, "token-secret-1"), + ExpectedActions: []core.Action{ + core.NewGetAction("serviceaccounts", api.NamespaceDefault, "default"), + core.NewDeleteAction("secrets", api.NamespaceDefault, "token-secret-1"), }, }, "added secret with serviceaccount": { ExistingServiceAccount: serviceAccount(tokenSecretReferences()), AddedSecret: serviceAccountTokenSecret(), - ExpectedActions: []testclient.Action{}, + ExpectedActions: []core.Action{}, }, "added token secret without token data": { ClientObjects: []runtime.Object{serviceAccountTokenSecretWithoutTokenData()}, ExistingServiceAccount: serviceAccount(tokenSecretReferences()), AddedSecret: serviceAccountTokenSecretWithoutTokenData(), - ExpectedActions: []testclient.Action{ - testclient.NewUpdateAction("secrets", api.NamespaceDefault, serviceAccountTokenSecret()), + ExpectedActions: []core.Action{ + core.NewUpdateAction("secrets", api.NamespaceDefault, serviceAccountTokenSecret()), }, }, "added token secret without ca data": { @@ -365,8 +366,8 @@ func TestTokenCreation(t *testing.T) { ExistingServiceAccount: serviceAccount(tokenSecretReferences()), AddedSecret: serviceAccountTokenSecretWithoutCAData(), - ExpectedActions: []testclient.Action{ - testclient.NewUpdateAction("secrets", api.NamespaceDefault, serviceAccountTokenSecret()), + ExpectedActions: []core.Action{ + core.NewUpdateAction("secrets", api.NamespaceDefault, serviceAccountTokenSecret()), }, }, "added token secret with mismatched ca data": { @@ -374,8 +375,8 @@ func TestTokenCreation(t *testing.T) { ExistingServiceAccount: serviceAccount(tokenSecretReferences()), AddedSecret: serviceAccountTokenSecretWithCAData([]byte("mismatched")), - ExpectedActions: []testclient.Action{ - testclient.NewUpdateAction("secrets", api.NamespaceDefault, serviceAccountTokenSecret()), + ExpectedActions: []core.Action{ + core.NewUpdateAction("secrets", api.NamespaceDefault, serviceAccountTokenSecret()), }, }, @@ -383,24 +384,24 @@ func TestTokenCreation(t *testing.T) { ClientObjects: []runtime.Object{serviceAccountTokenSecret()}, UpdatedSecret: serviceAccountTokenSecret(), - ExpectedActions: []testclient.Action{ - testclient.NewGetAction("serviceaccounts", api.NamespaceDefault, "default"), - testclient.NewDeleteAction("secrets", api.NamespaceDefault, "token-secret-1"), + ExpectedActions: []core.Action{ + core.NewGetAction("serviceaccounts", api.NamespaceDefault, "default"), + core.NewDeleteAction("secrets", api.NamespaceDefault, "token-secret-1"), }, }, "updated secret with serviceaccount": { ExistingServiceAccount: serviceAccount(tokenSecretReferences()), UpdatedSecret: serviceAccountTokenSecret(), - ExpectedActions: []testclient.Action{}, + ExpectedActions: []core.Action{}, }, "updated token secret without token data": { ClientObjects: []runtime.Object{serviceAccountTokenSecretWithoutTokenData()}, ExistingServiceAccount: serviceAccount(tokenSecretReferences()), UpdatedSecret: serviceAccountTokenSecretWithoutTokenData(), - ExpectedActions: []testclient.Action{ - testclient.NewUpdateAction("secrets", api.NamespaceDefault, serviceAccountTokenSecret()), + ExpectedActions: []core.Action{ + core.NewUpdateAction("secrets", api.NamespaceDefault, serviceAccountTokenSecret()), }, }, "updated token secret without ca data": { @@ -408,8 +409,8 @@ func TestTokenCreation(t *testing.T) { ExistingServiceAccount: serviceAccount(tokenSecretReferences()), UpdatedSecret: serviceAccountTokenSecretWithoutCAData(), - ExpectedActions: []testclient.Action{ - testclient.NewUpdateAction("secrets", api.NamespaceDefault, serviceAccountTokenSecret()), + ExpectedActions: []core.Action{ + core.NewUpdateAction("secrets", api.NamespaceDefault, serviceAccountTokenSecret()), }, }, "updated token secret with mismatched ca data": { @@ -417,30 +418,30 @@ func TestTokenCreation(t *testing.T) { ExistingServiceAccount: serviceAccount(tokenSecretReferences()), UpdatedSecret: serviceAccountTokenSecretWithCAData([]byte("mismatched")), - ExpectedActions: []testclient.Action{ - testclient.NewUpdateAction("secrets", api.NamespaceDefault, serviceAccountTokenSecret()), + ExpectedActions: []core.Action{ + core.NewUpdateAction("secrets", api.NamespaceDefault, serviceAccountTokenSecret()), }, }, "deleted secret without serviceaccount": { DeletedSecret: serviceAccountTokenSecret(), - ExpectedActions: []testclient.Action{}, + ExpectedActions: []core.Action{}, }, "deleted secret with serviceaccount with reference": { ClientObjects: []runtime.Object{serviceAccount(tokenSecretReferences())}, ExistingServiceAccount: serviceAccount(tokenSecretReferences()), DeletedSecret: serviceAccountTokenSecret(), - ExpectedActions: []testclient.Action{ - testclient.NewGetAction("serviceaccounts", api.NamespaceDefault, "default"), - testclient.NewUpdateAction("serviceaccounts", api.NamespaceDefault, serviceAccount(emptySecretReferences())), + ExpectedActions: []core.Action{ + core.NewGetAction("serviceaccounts", api.NamespaceDefault, "default"), + core.NewUpdateAction("serviceaccounts", api.NamespaceDefault, serviceAccount(emptySecretReferences())), }, }, "deleted secret with serviceaccount without reference": { ExistingServiceAccount: serviceAccount(emptySecretReferences()), DeletedSecret: serviceAccountTokenSecret(), - ExpectedActions: []testclient.Action{}, + ExpectedActions: []core.Action{}, }, } @@ -451,7 +452,7 @@ func TestTokenCreation(t *testing.T) { generator := &testGenerator{Token: "ABC"} - client := testclient.NewSimpleFake(tc.ClientObjects...) + client := fake.NewSimpleClientset(tc.ClientObjects...) controller := NewTokensController(client, TokensControllerOptions{TokenGenerator: generator, RootCA: []byte("CA Data")}) diff --git a/pkg/serviceaccount/jwt_test.go b/pkg/serviceaccount/jwt_test.go index cf888a47581..1a5bbee5615 100644 --- a/pkg/serviceaccount/jwt_test.go +++ b/pkg/serviceaccount/jwt_test.go @@ -26,8 +26,8 @@ import ( "github.com/dgrijalva/jwt-go" "k8s.io/kubernetes/pkg/api" - client "k8s.io/kubernetes/pkg/client/unversioned" - "k8s.io/kubernetes/pkg/client/unversioned/testclient" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + "k8s.io/kubernetes/pkg/client/testing/fake" serviceaccountcontroller "k8s.io/kubernetes/pkg/controller/serviceaccount" "k8s.io/kubernetes/pkg/serviceaccount" ) @@ -159,7 +159,7 @@ func TestTokenGenerateAndValidate(t *testing.T) { } testCases := map[string]struct { - Client client.Interface + Client clientset.Interface Keys []*rsa.PublicKey ExpectedErr bool @@ -199,7 +199,7 @@ func TestTokenGenerateAndValidate(t *testing.T) { ExpectedGroups: []string{"system:serviceaccounts", "system:serviceaccounts:test"}, }, "valid lookup": { - Client: testclient.NewSimpleFake(serviceAccount, secret), + Client: fake.NewSimpleClientset(serviceAccount, secret), Keys: []*rsa.PublicKey{getPublicKey(publicKey)}, ExpectedErr: false, ExpectedOK: true, @@ -208,13 +208,13 @@ func TestTokenGenerateAndValidate(t *testing.T) { ExpectedGroups: []string{"system:serviceaccounts", "system:serviceaccounts:test"}, }, "invalid secret lookup": { - Client: testclient.NewSimpleFake(serviceAccount), + Client: fake.NewSimpleClientset(serviceAccount), Keys: []*rsa.PublicKey{getPublicKey(publicKey)}, ExpectedErr: true, ExpectedOK: false, }, "invalid serviceaccount lookup": { - Client: testclient.NewSimpleFake(secret), + Client: fake.NewSimpleClientset(secret), Keys: []*rsa.PublicKey{getPublicKey(publicKey)}, ExpectedErr: true, ExpectedOK: false, diff --git a/test/integration/service_account_test.go b/test/integration/service_account_test.go index 278b9be300e..54150d45f9a 100644 --- a/test/integration/service_account_test.go +++ b/test/integration/service_account_test.go @@ -38,6 +38,7 @@ import ( "k8s.io/kubernetes/pkg/auth/authenticator/bearertoken" "k8s.io/kubernetes/pkg/auth/authorizer" "k8s.io/kubernetes/pkg/auth/user" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" client "k8s.io/kubernetes/pkg/client/unversioned" serviceaccountcontroller "k8s.io/kubernetes/pkg/controller/serviceaccount" "k8s.io/kubernetes/pkg/master" @@ -347,8 +348,9 @@ func startServiceAccountTestServer(t *testing.T) (*client.Client, client.Config, // Anonymous client config clientConfig := client.Config{Host: apiServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}} // Root client + // TODO: remove rootClient after we refactor pkg/admission to use the clientset. rootClient := client.NewOrDie(&client.Config{Host: apiServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}, BearerToken: rootToken}) - + rootClientset := clientset.FromUnversionedClient(rootClient) // Set up two authenticators: // 1. A token authenticator that maps the rootToken to the "root" user // 2. A ServiceAccountToken authenticator that validates ServiceAccount tokens @@ -359,7 +361,7 @@ func startServiceAccountTestServer(t *testing.T) (*client.Client, client.Config, return nil, false, nil }) serviceAccountKey, _ := rsa.GenerateKey(rand.Reader, 2048) - serviceAccountTokenGetter := serviceaccountcontroller.NewGetterFromClient(rootClient) + serviceAccountTokenGetter := serviceaccountcontroller.NewGetterFromClient(rootClientset) serviceAccountTokenAuth := serviceaccount.JWTTokenAuthenticator([]*rsa.PublicKey{&serviceAccountKey.PublicKey}, true, serviceAccountTokenGetter) authenticator := union.New( bearertoken.New(rootTokenAuth), @@ -411,9 +413,9 @@ func startServiceAccountTestServer(t *testing.T) (*client.Client, client.Config, m = master.New(masterConfig) // Start the service account and service account token controllers - tokenController := serviceaccountcontroller.NewTokensController(rootClient, serviceaccountcontroller.TokensControllerOptions{TokenGenerator: serviceaccount.JWTTokenGenerator(serviceAccountKey)}) + tokenController := serviceaccountcontroller.NewTokensController(rootClientset, serviceaccountcontroller.TokensControllerOptions{TokenGenerator: serviceaccount.JWTTokenGenerator(serviceAccountKey)}) tokenController.Run() - serviceAccountController := serviceaccountcontroller.NewServiceAccountsController(rootClient, serviceaccountcontroller.DefaultServiceAccountsControllerOptions()) + serviceAccountController := serviceaccountcontroller.NewServiceAccountsController(rootClientset, serviceaccountcontroller.DefaultServiceAccountsControllerOptions()) serviceAccountController.Run() // Start the admission plugin reflectors serviceAccountAdmission.Run() From cddd7b56a4ae301c6cbd8b5089b7400392b7b17a Mon Sep 17 00:00:00 2001 From: Chao Xu Date: Mon, 1 Feb 2016 14:30:47 -0800 Subject: [PATCH 082/328] replace client with clientset in kubelet and other places --- cmd/integration/integration.go | 4 +- cmd/kube-apiserver/app/server.go | 5 +- cmd/kubelet/app/server.go | 18 +-- cmd/kubemark/hollow-node.go | 4 +- .../generators/generator-for-clientset.go | 7 +- .../test_release_1_1/clientset.go | 7 +- .../controllermanager/controllermanager.go | 2 +- contrib/mesos/pkg/executor/apis.go | 6 +- contrib/mesos/pkg/executor/executor.go | 5 +- contrib/mesos/pkg/executor/node.go | 4 +- contrib/mesos/pkg/executor/registry.go | 11 +- contrib/mesos/pkg/executor/service/service.go | 13 +- contrib/mesos/pkg/node/node.go | 9 +- contrib/mesos/pkg/node/registrator.go | 7 +- contrib/mesos/pkg/node/statusupdater.go | 9 +- .../components/controller/controller.go | 9 +- .../components/framework/framework.go | 18 +-- .../components/podreconciler/podreconciler.go | 9 +- .../pkg/scheduler/components/scheduler.go | 5 +- .../scheduler/integration/integration_test.go | 3 +- .../mesos/pkg/scheduler/service/publish.go | 4 +- .../mesos/pkg/scheduler/service/service.go | 12 +- pkg/admission/chain.go | 6 +- pkg/admission/plugins.go | 8 +- pkg/api/types.go | 2 + .../release_1_1/clientset.go | 9 +- .../generated/legacy/unversioned/configmap.go | 135 ++++++++++++++++ .../legacy/unversioned/fake/fake_configmap.go | 102 ++++++++++++ .../unversioned/fake/fake_legacy_client.go | 4 + .../legacy/unversioned/generated_expansion.go | 2 + .../legacy/unversioned/legacy_client.go | 5 + pkg/kubelet/config/apiserver.go | 5 +- pkg/kubelet/kubelet.go | 33 ++-- pkg/kubelet/kubelet_test.go | 26 +-- pkg/kubelet/network/cni/cni_test.go | 9 +- pkg/kubelet/network/plugins.go | 5 +- pkg/kubelet/network/testing.go | 8 +- pkg/kubelet/networks.go | 4 +- pkg/kubelet/pod/mirror_client.go | 10 +- pkg/kubelet/prober/testing.go | 4 +- pkg/kubelet/prober/worker_test.go | 4 +- pkg/kubelet/status/manager.go | 13 +- pkg/kubelet/status/manager_test.go | 148 +++++++++--------- pkg/kubelet/volumes.go | 2 +- pkg/kubemark/hollow_kubelet.go | 4 +- plugin/pkg/admission/admit/admission.go | 5 +- .../admission/alwayspullimages/admission.go | 5 +- plugin/pkg/admission/deny/admission.go | 5 +- plugin/pkg/admission/exec/admission.go | 15 +- plugin/pkg/admission/exec/admission_test.go | 6 +- .../admission/initialresources/admission.go | 5 +- plugin/pkg/admission/limitranger/admission.go | 13 +- .../admission/limitranger/admission_test.go | 4 +- .../namespace/autoprovision/admission.go | 17 +- .../namespace/autoprovision/admission_test.go | 13 +- .../admission/namespace/exists/admission.go | 15 +- .../namespace/lifecycle/admission.go | 15 +- .../namespace/lifecycle/admission_test.go | 8 +- .../persistentvolume/label/admission.go | 5 +- .../pkg/admission/resourcequota/admission.go | 23 +-- .../admission/resourcequota/admission_test.go | 26 +-- .../securitycontext/scdeny/admission.go | 9 +- .../pkg/admission/serviceaccount/admission.go | 18 ++- .../serviceaccount/admission_test.go | 6 +- test/integration/service_account_test.go | 69 ++++---- 65 files changed, 643 insertions(+), 358 deletions(-) create mode 100644 pkg/client/typed/generated/legacy/unversioned/configmap.go create mode 100644 pkg/client/typed/generated/legacy/unversioned/fake/fake_configmap.go diff --git a/cmd/integration/integration.go b/cmd/integration/integration.go index 954fcc86fe0..de32c5d4e98 100644 --- a/cmd/integration/integration.go +++ b/cmd/integration/integration.go @@ -205,7 +205,7 @@ func startComponents(firstManifestURL, secondManifestURL string) (string, string glog.Infof("Using %s as root dir for kubelet #1", testRootDir) cm := cm.NewStubContainerManager() kcfg := kubeletapp.SimpleKubelet( - cl, + clientset, fakeDocker1, "localhost", testRootDir, @@ -237,7 +237,7 @@ func startComponents(firstManifestURL, secondManifestURL string) (string, string glog.Infof("Using %s as root dir for kubelet #2", testRootDir) kcfg = kubeletapp.SimpleKubelet( - cl, + clientset, fakeDocker2, "127.0.0.1", testRootDir, diff --git a/cmd/kube-apiserver/app/server.go b/cmd/kube-apiserver/app/server.go index 71cdf66cca4..9189e52b324 100644 --- a/cmd/kube-apiserver/app/server.go +++ b/cmd/kube-apiserver/app/server.go @@ -41,6 +41,7 @@ import ( "k8s.io/kubernetes/pkg/apiserver" "k8s.io/kubernetes/pkg/apiserver/authenticator" "k8s.io/kubernetes/pkg/capabilities" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/cloudprovider" serviceaccountcontroller "k8s.io/kubernetes/pkg/controller/serviceaccount" @@ -244,9 +245,9 @@ func Run(s *options.APIServer) error { clientConfig.GroupVersion = &gv } - client, err := client.New(clientConfig) + client, err := clientset.NewForConfig(clientConfig) if err != nil { - glog.Fatalf("Invalid server address: %v", err) + glog.Errorf("Failed to create clientset: %v", err) } legacyV1Group, err := registered.Group(api.GroupName) diff --git a/cmd/kubelet/app/server.go b/cmd/kubelet/app/server.go index 523cc315919..2c6bec407eb 100644 --- a/cmd/kubelet/app/server.go +++ b/cmd/kubelet/app/server.go @@ -40,6 +40,7 @@ import ( "k8s.io/kubernetes/pkg/client/chaosclient" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" "k8s.io/kubernetes/pkg/client/record" + unversioned_legacy "k8s.io/kubernetes/pkg/client/typed/generated/legacy/unversioned" client "k8s.io/kubernetes/pkg/client/unversioned" clientauth "k8s.io/kubernetes/pkg/client/unversioned/auth" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" @@ -266,13 +267,13 @@ func Run(s *options.KubeletServer, kcfg *KubeletConfig) error { clientConfig, err := CreateAPIServerClientConfig(s) if err == nil { - kcfg.KubeClient, err = client.New(clientConfig) + kcfg.KubeClient, err = clientset.NewForConfig(clientConfig) // make a separate client for events eventClientConfig := *clientConfig eventClientConfig.QPS = s.EventRecordQPS eventClientConfig.Burst = s.EventBurst - kcfg.EventClient, err = client.New(&eventClientConfig) + kcfg.EventClient, err = clientset.NewForConfig(&eventClientConfig) } if err != nil && len(s.APIServerList) > 0 { glog.Warningf("No API client: %v", err) @@ -452,7 +453,7 @@ func addChaosToClientConfig(s *options.KubeletServer, config *client.Config) { // SimpleRunKubelet is a simple way to start a Kubelet talking to dockerEndpoint, using an API Client. // Under the hood it calls RunKubelet (below) -func SimpleKubelet(client *client.Client, +func SimpleKubelet(client *clientset.Clientset, dockerClient dockertools.DockerInterface, hostname, rootDir, manifestURL, address string, port uint, @@ -563,7 +564,7 @@ func RunKubelet(kcfg *KubeletConfig) error { eventBroadcaster.StartLogging(glog.V(3).Infof) if kcfg.EventClient != nil { glog.V(4).Infof("Sending events to api server.") - eventBroadcaster.StartRecordingToSink(kcfg.EventClient.Events("")) + eventBroadcaster.StartRecordingToSink(&unversioned_legacy.EventSinkImpl{kcfg.EventClient.Events("")}) } else { glog.Warning("No api server defined - no events will be sent to API server.") } @@ -666,7 +667,7 @@ type KubeletConfig struct { DockerExecHandler dockertools.ExecHandler EnableDebuggingHandlers bool EnableServer bool - EventClient *client.Client + EventClient *clientset.Clientset EventBurst int EventRecordQPS float32 FileCheckFrequency time.Duration @@ -677,7 +678,7 @@ type KubeletConfig struct { HostIPCSources []string HTTPCheckFrequency time.Duration ImageGCPolicy kubelet.ImageGCPolicy - KubeClient *client.Client + KubeClient *clientset.Clientset ManifestURL string ManifestURLHeader http.Header MasterServiceNamespace string @@ -733,12 +734,10 @@ func CreateAndInitKubelet(kc *KubeletConfig) (k KubeletBootstrap, pc *config.Pod // TODO: KubeletConfig.KubeClient should be a client interface, but client interface misses certain methods // used by kubelet. Since NewMainKubelet expects a client interface, we need to make sure we are not passing // a nil pointer to it when what we really want is a nil interface. - var kubeClient client.Interface - var c clientset.Interface + var kubeClient clientset.Interface if kc.KubeClient != nil { kubeClient = kc.KubeClient // TODO: remove this when we've refactored kubelet to only use clientset. - c = clientset.FromUnversionedClient(kc.KubeClient) } gcPolicy := kubecontainer.ContainerGCPolicy{ @@ -760,7 +759,6 @@ func CreateAndInitKubelet(kc *KubeletConfig) (k KubeletBootstrap, pc *config.Pod kc.NodeName, kc.DockerClient, kubeClient, - c, kc.RootDirectory, kc.PodInfraContainerImage, kc.SyncFrequency, diff --git a/cmd/kubemark/hollow-node.go b/cmd/kubemark/hollow-node.go index 08f062dde54..e5bd5f122c1 100644 --- a/cmd/kubemark/hollow-node.go +++ b/cmd/kubemark/hollow-node.go @@ -23,6 +23,7 @@ import ( docker "github.com/fsouza/go-dockerclient" "k8s.io/kubernetes/pkg/api" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" "k8s.io/kubernetes/pkg/client/record" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" @@ -88,6 +89,7 @@ func main() { // create a client to communicate with API server. cl, err := createClientFromFile(config.KubeconfigPath) + clientset := clientset.FromUnversionedClient(cl) if err != nil { glog.Fatal("Failed to create a Client. Exiting.") } @@ -102,7 +104,7 @@ func main() { hollowKubelet := kubemark.NewHollowKubelet( config.NodeName, - cl, + clientset, cadvisorInterface, fakeDockerClient, config.KubeletPort, diff --git a/cmd/libs/go2idl/client-gen/generators/generator-for-clientset.go b/cmd/libs/go2idl/client-gen/generators/generator-for-clientset.go index 8641570f199..b672b138ac2 100644 --- a/cmd/libs/go2idl/client-gen/generators/generator-for-clientset.go +++ b/cmd/libs/go2idl/client-gen/generators/generator-for-clientset.go @@ -74,6 +74,7 @@ func (g *genClientset) Imports(c *generator.Context) (imports []string) { typedClientPath := filepath.Join(g.typedClientPath, group, version) imports = append(imports, g.imports.ImportLines()...) imports = append(imports, fmt.Sprintf("%s_%s \"%s\"", group, version, typedClientPath)) + imports = append(imports, "github.com/golang/glog") } return } @@ -158,14 +159,14 @@ func NewForConfig(c *$.Config|raw$) (*Clientset, error) { var err error $range .allGroups$ clientset.$.Group$Client, err =$.PackageName$.NewForConfig(c) if err!=nil { - return nil, err + return &clientset, err } $end$ clientset.DiscoveryClient, err = $.NewDiscoveryClientForConfig|raw$(c) if err!=nil { - return nil, err + glog.Errorf("failed to create the DiscoveryClient: %v", err) } - return &clientset, nil + return &clientset, err } ` diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_release_1_1/clientset.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_release_1_1/clientset.go index 91e8faab34d..2297ae855e6 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_release_1_1/clientset.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_release_1_1/clientset.go @@ -17,6 +17,7 @@ limitations under the License. package test_release_1_1 import ( + "github.com/golang/glog" testgroup_unversioned "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/testgroup/unversioned" unversioned "k8s.io/kubernetes/pkg/client/unversioned" ) @@ -49,14 +50,14 @@ func NewForConfig(c *unversioned.Config) (*Clientset, error) { var err error clientset.TestgroupClient, err = testgroup_unversioned.NewForConfig(c) if err != nil { - return nil, err + return &clientset, err } clientset.DiscoveryClient, err = unversioned.NewDiscoveryClientForConfig(c) if err != nil { - return nil, err + glog.Errorf("failed to create the DiscoveryClient: %v", err) } - return &clientset, nil + return &clientset, err } // NewForConfigOrDie creates a new Clientset for the given config and diff --git a/contrib/mesos/pkg/controllermanager/controllermanager.go b/contrib/mesos/pkg/controllermanager/controllermanager.go index 7d8e9a364c3..9f4d8486fc5 100644 --- a/contrib/mesos/pkg/controllermanager/controllermanager.go +++ b/contrib/mesos/pkg/controllermanager/controllermanager.go @@ -153,7 +153,7 @@ func (s *CMServer) Run(_ []string) error { s.NodeMonitorGracePeriod, s.NodeStartupGracePeriod, s.NodeMonitorPeriod, (*net.IPNet)(&s.ClusterCIDR), s.AllocateNodeCIDRs) nodeController.Run(s.NodeSyncPeriod) - nodeStatusUpdaterController := node.NewStatusUpdater(client.NewOrDie(client.AddUserAgent(kubeconfig, "node-status-controller")), s.NodeMonitorPeriod, time.Now) + nodeStatusUpdaterController := node.NewStatusUpdater(clientset.NewForConfigOrDie(client.AddUserAgent(kubeconfig, "node-status-controller")), s.NodeMonitorPeriod, time.Now) if err := nodeStatusUpdaterController.Run(util.NeverStop); err != nil { glog.Fatalf("Failed to start node status update controller: %v", err) } diff --git a/contrib/mesos/pkg/executor/apis.go b/contrib/mesos/pkg/executor/apis.go index b0672c8b2fc..ab4add7edd4 100644 --- a/contrib/mesos/pkg/executor/apis.go +++ b/contrib/mesos/pkg/executor/apis.go @@ -19,7 +19,7 @@ package executor import ( "k8s.io/kubernetes/contrib/mesos/pkg/node" "k8s.io/kubernetes/pkg/api" - client "k8s.io/kubernetes/pkg/client/unversioned" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" ) type kubeAPI interface { @@ -33,11 +33,11 @@ type nodeAPI interface { // clientAPIWrapper implements kubeAPI and node API, which serve to isolate external dependencies // such that they're easier to mock in unit test. type clientAPIWrapper struct { - client *client.Client + client *clientset.Clientset } func (cw *clientAPIWrapper) killPod(ns, name string) error { - return cw.client.Pods(ns).Delete(name, api.NewDeleteOptions(0)) + return cw.client.Legacy().Pods(ns).Delete(name, api.NewDeleteOptions(0)) } func (cw *clientAPIWrapper) createOrUpdate(hostname string, slaveAttrLabels, annotations map[string]string) (*api.Node, error) { diff --git a/contrib/mesos/pkg/executor/executor.go b/contrib/mesos/pkg/executor/executor.go index 0976324b0c3..7af5108133b 100644 --- a/contrib/mesos/pkg/executor/executor.go +++ b/contrib/mesos/pkg/executor/executor.go @@ -26,6 +26,8 @@ import ( "sync/atomic" "time" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + "github.com/fsouza/go-dockerclient" "github.com/gogo/protobuf/proto" log "github.com/golang/glog" @@ -40,7 +42,6 @@ import ( "k8s.io/kubernetes/contrib/mesos/pkg/scheduler/meta" "k8s.io/kubernetes/pkg/api" apierrors "k8s.io/kubernetes/pkg/api/errors" - client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/dockertools" kruntime "k8s.io/kubernetes/pkg/runtime" @@ -112,7 +113,7 @@ type Executor struct { } type Config struct { - APIClient *client.Client + APIClient *clientset.Clientset Docker dockertools.DockerInterface ShutdownAlert func() SuicideTimeout time.Duration diff --git a/contrib/mesos/pkg/executor/node.go b/contrib/mesos/pkg/executor/node.go index ac0c8590277..54685042408 100644 --- a/contrib/mesos/pkg/executor/node.go +++ b/contrib/mesos/pkg/executor/node.go @@ -16,9 +16,7 @@ limitations under the License. package executor -import ( - mesos "github.com/mesos/mesos-go/mesosproto" -) +import mesos "github.com/mesos/mesos-go/mesosproto" type NodeInfo struct { Cores int diff --git a/contrib/mesos/pkg/executor/registry.go b/contrib/mesos/pkg/executor/registry.go index d81f41e272a..c79c20427a3 100644 --- a/contrib/mesos/pkg/executor/registry.go +++ b/contrib/mesos/pkg/executor/registry.go @@ -21,10 +21,11 @@ import ( "errors" "sync" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + "k8s.io/kubernetes/contrib/mesos/pkg/executor/messages" "k8s.io/kubernetes/contrib/mesos/pkg/scheduler/meta" "k8s.io/kubernetes/pkg/api" - client "k8s.io/kubernetes/pkg/client/unversioned" log "github.com/golang/glog" ) @@ -69,7 +70,7 @@ type ( } registryImpl struct { - client *client.Client + client *clientset.Clientset updates chan *PodEvent m sync.RWMutex boundTasks map[string]*api.Pod @@ -108,7 +109,7 @@ func (rp *PodEvent) FormatShort() string { return "task '" + rp.taskID + "' pod '" + rp.pod.Namespace + "/" + rp.pod.Name + "'" } -func NewRegistry(client *client.Client) Registry { +func NewRegistry(client *clientset.Clientset) Registry { r := ®istryImpl{ client: client, updates: make(chan *PodEvent, updatesBacklogSize), @@ -305,7 +306,7 @@ func (r registryImpl) bind(taskID string, pod *api.Pod) error { log.Infof("Binding task %v pod '%v/%v' to '%v' with annotations %+v...", taskID, pod.Namespace, pod.Name, binding.Target.Name, binding.Annotations) ctx := api.WithNamespace(api.NewContext(), binding.Namespace) - err := r.client.Post().Namespace(api.NamespaceValue(ctx)).Resource("bindings").Body(binding).Do().Error() + err := r.client.LegacyClient.Post().Namespace(api.NamespaceValue(ctx)).Resource("bindings").Body(binding).Do().Error() if err != nil { log.Warningf("failed to bind task %v pod %v/%v: %v", taskID, pod.Namespace, pod.Name, err) return errCreateBindingFailed @@ -320,7 +321,7 @@ func (r registryImpl) bind(taskID string, pod *api.Pod) error { patch.Metadata.Annotations = pod.Annotations patchJson, _ := json.Marshal(patch) log.V(4).Infof("Patching annotations %v of task %v pod %v/%v: %v", pod.Annotations, taskID, pod.Namespace, pod.Name, string(patchJson)) - err := r.client.Patch(api.MergePatchType).RequestURI(pod.SelfLink).Body(patchJson).Do().Error() + err := r.client.LegacyClient.Patch(api.MergePatchType).RequestURI(pod.SelfLink).Body(patchJson).Do().Error() if err != nil { log.Errorf("Error updating annotations of ready-to-launch task %v pod %v/%v: %v", taskID, pod.Namespace, pod.Name, err) return errAnnotationUpdateFailure diff --git a/contrib/mesos/pkg/executor/service/service.go b/contrib/mesos/pkg/executor/service/service.go index 430c0f757ee..1172a38a70d 100644 --- a/contrib/mesos/pkg/executor/service/service.go +++ b/contrib/mesos/pkg/executor/service/service.go @@ -33,6 +33,7 @@ import ( "k8s.io/kubernetes/contrib/mesos/pkg/hyperkube" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/kubelet" @@ -74,7 +75,7 @@ func (s *KubeletExecutorServer) runExecutor( nodeInfos chan<- executor.NodeInfo, kubeletFinished <-chan struct{}, staticPodsConfigPath string, - apiclient *client.Client, + apiclient *clientset.Clientset, registry executor.Registry, ) (<-chan struct{}, error) { exec := executor.New(executor.Config{ @@ -116,7 +117,7 @@ func (s *KubeletExecutorServer) runKubelet( nodeInfos <-chan executor.NodeInfo, kubeletDone chan<- struct{}, staticPodsConfigPath string, - apiclient *client.Client, + apiclient *clientset.Clientset, podLW *cache.ListWatch, registry executor.Registry, executorDone <-chan struct{}, @@ -163,7 +164,7 @@ func (s *KubeletExecutorServer) runKubelet( // make a separate client for events eventClientConfig.QPS = s.EventRecordQPS eventClientConfig.Burst = s.EventBurst - kcfg.EventClient, err = client.New(eventClientConfig) + kcfg.EventClient, err = clientset.NewForConfig(eventClientConfig) if err != nil { return err } @@ -229,10 +230,10 @@ func (s *KubeletExecutorServer) Run(hks hyperkube.Interface, _ []string) error { } // create apiserver client - var apiclient *client.Client + var apiclient *clientset.Clientset clientConfig, err := kubeletapp.CreateAPIServerClientConfig(s.KubeletServer) if err == nil { - apiclient, err = client.New(clientConfig) + apiclient, err = clientset.NewForConfig(clientConfig) } if err != nil { // required for k8sm since we need to send api.Binding information back to the apiserver @@ -240,7 +241,7 @@ func (s *KubeletExecutorServer) Run(hks hyperkube.Interface, _ []string) error { } var ( - pw = cache.NewListWatchFromClient(apiclient, "pods", api.NamespaceAll, + pw = cache.NewListWatchFromClient(apiclient.LegacyClient, "pods", api.NamespaceAll, fields.OneTermEqualSelector(client.PodHost, s.HostnameOverride), ) reg = executor.NewRegistry(apiclient) diff --git a/contrib/mesos/pkg/node/node.go b/contrib/mesos/pkg/node/node.go index ea182ee2962..e838a8d4792 100644 --- a/contrib/mesos/pkg/node/node.go +++ b/contrib/mesos/pkg/node/node.go @@ -23,12 +23,13 @@ import ( "strings" "time" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + log "github.com/golang/glog" mesos "github.com/mesos/mesos-go/mesosproto" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/unversioned" - client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/util/validation" ) @@ -41,7 +42,7 @@ const ( // Create creates a new node api object with the given hostname, // slave attribute labels and annotations func Create( - client *client.Client, + client *clientset.Clientset, hostName string, slaveAttrLabels, annotations map[string]string, @@ -87,7 +88,7 @@ func Create( // The updated node merges the given slave attribute labels // and annotations with the found api object. func Update( - client *client.Client, + client *clientset.Clientset, hostname string, slaveAttrLabels, annotations map[string]string, @@ -122,7 +123,7 @@ func Update( // CreateOrUpdate creates a node api object or updates an existing one func CreateOrUpdate( - client *client.Client, + client *clientset.Clientset, hostname string, slaveAttrLabels, annotations map[string]string, diff --git a/contrib/mesos/pkg/node/registrator.go b/contrib/mesos/pkg/node/registrator.go index 1bdb1daf9f9..be80ad39975 100644 --- a/contrib/mesos/pkg/node/registrator.go +++ b/contrib/mesos/pkg/node/registrator.go @@ -20,12 +20,13 @@ import ( "fmt" "time" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + log "github.com/golang/glog" "k8s.io/kubernetes/contrib/mesos/pkg/queue" "k8s.io/kubernetes/contrib/mesos/pkg/runtime" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" - client "k8s.io/kubernetes/pkg/client/unversioned" ) type Registrator interface { @@ -62,11 +63,11 @@ type LookupFunc func(hostName string) *api.Node type clientRegistrator struct { lookupNode LookupFunc - client *client.Client + client *clientset.Clientset queue *queue.HistoricalFIFO } -func NewRegistrator(client *client.Client, lookupNode LookupFunc) *clientRegistrator { +func NewRegistrator(client *clientset.Clientset, lookupNode LookupFunc) *clientRegistrator { return &clientRegistrator{ lookupNode: lookupNode, client: client, diff --git a/contrib/mesos/pkg/node/statusupdater.go b/contrib/mesos/pkg/node/statusupdater.go index 4f69656a0f7..f90de945cb6 100644 --- a/contrib/mesos/pkg/node/statusupdater.go +++ b/contrib/mesos/pkg/node/statusupdater.go @@ -20,6 +20,8 @@ import ( "fmt" "time" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + log "github.com/golang/glog" "k8s.io/kubernetes/cmd/kubelet/app/options" "k8s.io/kubernetes/contrib/mesos/pkg/runtime" @@ -27,7 +29,6 @@ import ( "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/client/cache" - client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/cloudprovider/providers/mesos" "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/util/sets" @@ -40,13 +41,13 @@ const ( ) type StatusUpdater struct { - client *client.Client + client *clientset.Clientset relistPeriod time.Duration heartBeatPeriod time.Duration nowFunc func() time.Time } -func NewStatusUpdater(client *client.Client, relistPeriod time.Duration, nowFunc func() time.Time) *StatusUpdater { +func NewStatusUpdater(client *clientset.Clientset, relistPeriod time.Duration, nowFunc func() time.Time) *StatusUpdater { kubecfg := options.NewKubeletServer() // only create to get the config, this is without side-effects return &StatusUpdater{ client: client, @@ -58,7 +59,7 @@ func NewStatusUpdater(client *client.Client, relistPeriod time.Duration, nowFunc func (u *StatusUpdater) Run(terminate <-chan struct{}) error { nodeStore := cache.NewStore(cache.MetaNamespaceKeyFunc) - nodeLW := cache.NewListWatchFromClient(u.client, "nodes", api.NamespaceAll, fields.Everything()) + nodeLW := cache.NewListWatchFromClient(u.client.LegacyClient, "nodes", api.NamespaceAll, fields.Everything()) cache.NewReflector(nodeLW, &api.Node{}, nodeStore, u.relistPeriod).Run() monitor := func() { diff --git a/contrib/mesos/pkg/scheduler/components/controller/controller.go b/contrib/mesos/pkg/scheduler/components/controller/controller.go index c2e1ee04c21..a995fce3117 100644 --- a/contrib/mesos/pkg/scheduler/components/controller/controller.go +++ b/contrib/mesos/pkg/scheduler/components/controller/controller.go @@ -19,13 +19,14 @@ package controller import ( "time" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + log "github.com/golang/glog" "k8s.io/kubernetes/contrib/mesos/pkg/runtime" "k8s.io/kubernetes/contrib/mesos/pkg/scheduler/components/algorithm" "k8s.io/kubernetes/contrib/mesos/pkg/scheduler/components/binder" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/record" - client "k8s.io/kubernetes/pkg/client/unversioned" ) const ( @@ -45,11 +46,11 @@ type controller struct { nextPod func() *api.Pod error func(*api.Pod, error) recorder record.EventRecorder - client *client.Client + client *clientset.Clientset started chan<- struct{} // startup latch } -func New(client *client.Client, algorithm algorithm.SchedulerAlgorithm, +func New(client *clientset.Clientset, algorithm algorithm.SchedulerAlgorithm, recorder record.EventRecorder, nextPod func() *api.Pod, error func(pod *api.Pod, schedulingErr error), binder binder.Binder, started chan<- struct{}) Controller { return &controller{ @@ -78,7 +79,7 @@ func (s *controller) scheduleOne() { // the scheduler has to take care of this: if pod.Spec.NodeName != "" && pod.DeletionTimestamp != nil { log.V(3).Infof("deleting pre-scheduled, not yet running pod: %s/%s", pod.Namespace, pod.Name) - s.client.Pods(pod.Namespace).Delete(pod.Name, api.NewDeleteOptions(0)) + s.client.Legacy().Pods(pod.Namespace).Delete(pod.Name, api.NewDeleteOptions(0)) return } diff --git a/contrib/mesos/pkg/scheduler/components/framework/framework.go b/contrib/mesos/pkg/scheduler/components/framework/framework.go index 1498b8f7892..b8966e66659 100644 --- a/contrib/mesos/pkg/scheduler/components/framework/framework.go +++ b/contrib/mesos/pkg/scheduler/components/framework/framework.go @@ -45,7 +45,7 @@ import ( "k8s.io/kubernetes/contrib/mesos/pkg/scheduler/podtask" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" - client "k8s.io/kubernetes/pkg/client/unversioned" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" "k8s.io/kubernetes/pkg/kubelet/container" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/util/sets" @@ -69,7 +69,7 @@ type framework struct { // Config related, write-once sched scheduler.Scheduler schedulerConfig *schedcfg.Config - client *client.Client + client *clientset.Clientset failoverTimeout float64 // in seconds reconcileInterval int64 nodeRegistrator node.Registrator @@ -98,7 +98,7 @@ type framework struct { type Config struct { SchedulerConfig schedcfg.Config ExecutorId *mesos.ExecutorID - Client *client.Client + Client *clientset.Clientset StoreFrameworkId frameworkid.StoreFunc FailoverTimeout float64 ReconcileInterval int64 @@ -526,7 +526,7 @@ func (k *framework) reconcileTerminalTask(driver bindings.SchedulerDriver, taskS // TODO(jdef) for case #2 don't delete the pod, just update it's status to Failed pod := &task.Pod log.Warningf("deleting rogue pod %v/%v for lost task %v", pod.Namespace, pod.Name, task.ID) - if err := k.client.Pods(pod.Namespace).Delete(pod.Name, api.NewDeleteOptions(0)); err != nil && !errors.IsNotFound(err) { + if err := k.client.Legacy().Pods(pod.Namespace).Delete(pod.Name, api.NewDeleteOptions(0)); err != nil && !errors.IsNotFound(err) { log.Errorf("failed to delete pod %v/%v for terminal task %v: %v", pod.Namespace, pod.Name, task.ID, err) } } else if taskStatus.GetReason() == mesos.TaskStatus_REASON_EXECUTOR_TERMINATED || taskStatus.GetReason() == mesos.TaskStatus_REASON_EXECUTOR_UNREGISTERED { @@ -578,7 +578,7 @@ func (k *framework) reconcileNonTerminalTask(driver bindings.SchedulerDriver, ta // possible rogue pod exists at this point because we can't identify it; should kill the task log.Errorf("possible rogue pod; illegal api.PodStatusResult, unable to parse full pod name from: '%v' for task %v: %v", podStatus.Name, taskId, err) - } else if pod, err := k.client.Pods(namespace).Get(name); err == nil { + } else if pod, err := k.client.Legacy().Pods(namespace).Get(name); err == nil { if t, ok, err := podtask.RecoverFrom(*pod); ok { log.Infof("recovered task %v from metadata in pod %v/%v", taskId, namespace, name) _, err := k.sched.Tasks().Register(t) @@ -593,7 +593,7 @@ func (k *framework) reconcileNonTerminalTask(driver bindings.SchedulerDriver, ta } else if err != nil { //should kill the pod and the task log.Errorf("killing pod, failed to recover task from pod %v/%v: %v", namespace, name, err) - if err := k.client.Pods(namespace).Delete(name, nil); err != nil { + if err := k.client.Legacy().Pods(namespace).Delete(name, nil); err != nil { log.Errorf("failed to delete pod %v/%v: %v", namespace, name, err) } } else { @@ -683,7 +683,7 @@ func (k *framework) makeTaskRegistryReconciler() taskreconciler.Action { // tasks identified by annotations in the Kubernetes pod registry. func (k *framework) makePodRegistryReconciler() taskreconciler.Action { return taskreconciler.Action(func(drv bindings.SchedulerDriver, cancel <-chan struct{}) <-chan error { - podList, err := k.client.Pods(api.NamespaceAll).List(api.ListOptions{}) + podList, err := k.client.Legacy().Pods(api.NamespaceAll).List(api.ListOptions{}) if err != nil { return proc.ErrorChanf("failed to reconcile pod registry: %v", err) } @@ -759,7 +759,7 @@ func (k *framework) explicitlyReconcileTasks(driver bindings.SchedulerDriver, ta } func (ks *framework) recoverTasks() error { - podList, err := ks.client.Pods(api.NamespaceAll).List(api.ListOptions{}) + podList, err := ks.client.Legacy().Pods(api.NamespaceAll).List(api.ListOptions{}) if err != nil { log.V(1).Infof("failed to recover pod registry, madness may ensue: %v", err) return err @@ -778,7 +778,7 @@ func (ks *framework) recoverTasks() error { } if t, ok, err := podtask.RecoverFrom(pod); err != nil { log.Errorf("failed to recover task from pod, will attempt to delete '%v/%v': %v", pod.Namespace, pod.Name, err) - err := ks.client.Pods(pod.Namespace).Delete(pod.Name, nil) + err := ks.client.Legacy().Pods(pod.Namespace).Delete(pod.Name, nil) //TODO(jdef) check for temporary or not-found errors if err != nil { log.Errorf("failed to delete pod '%v/%v': %v", pod.Namespace, pod.Name, err) diff --git a/contrib/mesos/pkg/scheduler/components/podreconciler/podreconciler.go b/contrib/mesos/pkg/scheduler/components/podreconciler/podreconciler.go index f9bc2269428..0a5c29fb745 100644 --- a/contrib/mesos/pkg/scheduler/components/podreconciler/podreconciler.go +++ b/contrib/mesos/pkg/scheduler/components/podreconciler/podreconciler.go @@ -19,6 +19,8 @@ package podreconciler import ( "time" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + log "github.com/golang/glog" "k8s.io/kubernetes/contrib/mesos/pkg/scheduler" "k8s.io/kubernetes/contrib/mesos/pkg/scheduler/components/deleter" @@ -27,7 +29,6 @@ import ( "k8s.io/kubernetes/contrib/mesos/pkg/scheduler/queuer" "k8s.io/kubernetes/pkg/api" apierrors "k8s.io/kubernetes/pkg/api/errors" - client "k8s.io/kubernetes/pkg/client/unversioned" ) // PodReconciler reconciles a pod with the apiserver @@ -37,12 +38,12 @@ type PodReconciler interface { type podReconciler struct { sched scheduler.Scheduler - client *client.Client + client *clientset.Clientset qr queuer.Queuer deleter deleter.Deleter } -func New(sched scheduler.Scheduler, client *client.Client, qr queuer.Queuer, deleter deleter.Deleter) PodReconciler { +func New(sched scheduler.Scheduler, client *clientset.Clientset, qr queuer.Queuer, deleter deleter.Deleter) PodReconciler { return &podReconciler{ sched: sched, client: client, @@ -65,7 +66,7 @@ func New(sched scheduler.Scheduler, client *client.Client, qr queuer.Queuer, del func (s *podReconciler) Reconcile(t *podtask.T) { log.V(1).Infof("reconcile pod %v, assigned to slave %q", t.Pod.Name, t.Spec.AssignedSlave) ctx := api.WithNamespace(api.NewDefaultContext(), t.Pod.Namespace) - pod, err := s.client.Pods(api.NamespaceValue(ctx)).Get(t.Pod.Name) + pod, err := s.client.Legacy().Pods(api.NamespaceValue(ctx)).Get(t.Pod.Name) if err != nil { if apierrors.IsNotFound(err) { // attempt to delete diff --git a/contrib/mesos/pkg/scheduler/components/scheduler.go b/contrib/mesos/pkg/scheduler/components/scheduler.go index bbf3247e859..bafe3d21d69 100644 --- a/contrib/mesos/pkg/scheduler/components/scheduler.go +++ b/contrib/mesos/pkg/scheduler/components/scheduler.go @@ -20,6 +20,8 @@ import ( "net/http" "sync" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + mesos "github.com/mesos/mesos-go/mesosproto" "k8s.io/kubernetes/contrib/mesos/pkg/backoff" "k8s.io/kubernetes/contrib/mesos/pkg/offers" @@ -41,7 +43,6 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/record" - client "k8s.io/kubernetes/pkg/client/unversioned" ) // sched implements the Scheduler interface. @@ -59,7 +60,7 @@ func New( c *config.Config, fw framework.Framework, ps podschedulers.PodScheduler, - client *client.Client, + client *clientset.Clientset, recorder record.EventRecorder, terminate <-chan struct{}, mux *http.ServeMux, diff --git a/contrib/mesos/pkg/scheduler/integration/integration_test.go b/contrib/mesos/pkg/scheduler/integration/integration_test.go index 20828148025..bc5c965ffe6 100644 --- a/contrib/mesos/pkg/scheduler/integration/integration_test.go +++ b/contrib/mesos/pkg/scheduler/integration/integration_test.go @@ -48,6 +48,7 @@ import ( "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/client/cache" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/runtime" "k8s.io/kubernetes/pkg/util" @@ -488,7 +489,7 @@ func newLifecycleTest(t *testing.T) lifecycleTest { ei.Data = []byte{0, 1, 2} // create framework - client := client.NewOrDie(&client.Config{ + client := clientset.NewForConfigOrDie(&client.Config{ Host: apiServer.server.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}, }) diff --git a/contrib/mesos/pkg/scheduler/service/publish.go b/contrib/mesos/pkg/scheduler/service/publish.go index 4ea53e1bdd1..b681d919f33 100644 --- a/contrib/mesos/pkg/scheduler/service/publish.go +++ b/contrib/mesos/pkg/scheduler/service/publish.go @@ -59,7 +59,7 @@ func (m *SchedulerServer) newServiceWriter(stop <-chan struct{}) func() { // doesn't already exist. func (m *SchedulerServer) createSchedulerServiceIfNeeded(serviceName string, servicePort int) error { ctx := api.NewDefaultContext() - if _, err := m.client.Services(api.NamespaceValue(ctx)).Get(serviceName); err == nil { + if _, err := m.client.Legacy().Services(api.NamespaceValue(ctx)).Get(serviceName); err == nil { // The service already exists. return nil } @@ -79,7 +79,7 @@ func (m *SchedulerServer) createSchedulerServiceIfNeeded(serviceName string, ser if m.serviceAddress != nil { svc.Spec.ClusterIP = m.serviceAddress.String() } - _, err := m.client.Services(api.NamespaceValue(ctx)).Create(svc) + _, err := m.client.Legacy().Services(api.NamespaceValue(ctx)).Create(svc) if err != nil && errors.IsAlreadyExists(err) { err = nil } diff --git a/contrib/mesos/pkg/scheduler/service/service.go b/contrib/mesos/pkg/scheduler/service/service.go index 1ceb05cc975..6d8f23ec2a4 100644 --- a/contrib/mesos/pkg/scheduler/service/service.go +++ b/contrib/mesos/pkg/scheduler/service/service.go @@ -34,6 +34,8 @@ import ( "sync" "time" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + etcd "github.com/coreos/etcd/client" "github.com/gogo/protobuf/proto" log "github.com/golang/glog" @@ -173,7 +175,7 @@ type SchedulerServer struct { conntrackTCPTimeoutEstablished int executable string // path to the binary running this service - client *client.Client + client *clientset.Clientset driver bindings.SchedulerDriver driverMutex sync.RWMutex mux *http.ServeMux @@ -521,7 +523,7 @@ func (s *SchedulerServer) prepareStaticPods() (data []byte, staticPodCPUs, stati // TODO(jdef): hacked from kubelet/server/server.go // TODO(k8s): replace this with clientcmd -func (s *SchedulerServer) createAPIServerClient() (*client.Client, error) { +func (s *SchedulerServer) createAPIServerClient() (*clientset.Clientset, error) { authInfo, err := clientauth.LoadFromFile(s.authPath) if err != nil { log.Warningf("Could not load kubernetes auth path: %v. Continuing with defaults.", err) @@ -542,7 +544,7 @@ func (s *SchedulerServer) createAPIServerClient() (*client.Client, error) { log.Infof("Multiple api servers specified. Picking first one") } clientConfig.Host = s.apiServerList[0] - c, err := client.New(&clientConfig) + c, err := clientset.NewForConfig(&clientConfig) if err != nil { return nil, err } @@ -722,7 +724,7 @@ func (s *SchedulerServer) bootstrap(hks hyperkube.Interface, sc *schedcfg.Config if err != nil { log.Fatalf("Cannot create client to watch nodes: %v", err) } - nodeLW := cache.NewListWatchFromClient(nodesClient, "nodes", api.NamespaceAll, fields.Everything()) + nodeLW := cache.NewListWatchFromClient(nodesClient.LegacyClient, "nodes", api.NamespaceAll, fields.Everything()) nodeStore, nodeCtl := controllerfw.NewInformer(nodeLW, &api.Node{}, s.nodeRelistPeriod, &controllerfw.ResourceEventHandlerFuncs{ DeleteFunc: func(obj interface{}) { node := obj.(*api.Node) @@ -796,7 +798,7 @@ func (s *SchedulerServer) bootstrap(hks hyperkube.Interface, sc *schedcfg.Config broadcaster.StartRecordingToSink(client.Events("")) // create scheduler core with all components arranged around it - lw := cache.NewListWatchFromClient(client, "pods", api.NamespaceAll, fields.Everything()) + lw := cache.NewListWatchFromClient(client.LegacyClient, "pods", api.NamespaceAll, fields.Everything()) sched := components.New( sc, framework, diff --git a/pkg/admission/chain.go b/pkg/admission/chain.go index 6fc33a5a90b..90262b01647 100644 --- a/pkg/admission/chain.go +++ b/pkg/admission/chain.go @@ -16,16 +16,14 @@ limitations under the License. package admission -import ( - client "k8s.io/kubernetes/pkg/client/unversioned" -) +import clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" // chainAdmissionHandler is an instance of admission.Interface that performs admission control using a chain of admission handlers type chainAdmissionHandler []Interface // NewFromPlugins returns an admission.Interface that will enforce admission control decisions of all // the given plugins. -func NewFromPlugins(client client.Interface, pluginNames []string, configFilePath string) Interface { +func NewFromPlugins(client clientset.Interface, pluginNames []string, configFilePath string) Interface { plugins := []Interface{} for _, pluginName := range pluginNames { plugin := InitPlugin(pluginName, client, configFilePath) diff --git a/pkg/admission/plugins.go b/pkg/admission/plugins.go index b63e468950f..9c4fba36184 100644 --- a/pkg/admission/plugins.go +++ b/pkg/admission/plugins.go @@ -23,14 +23,14 @@ import ( "sync" "github.com/golang/glog" - client "k8s.io/kubernetes/pkg/client/unversioned" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" ) // Factory is a function that returns an Interface for admission decisions. // The config parameter provides an io.Reader handler to the factory in // order to load specific configurations. If no configuration is provided // the parameter is nil. -type Factory func(client client.Interface, config io.Reader) (Interface, error) +type Factory func(client clientset.Interface, config io.Reader) (Interface, error) // All registered admission options. var ( @@ -67,7 +67,7 @@ func RegisterPlugin(name string, plugin Factory) { // known. The error is returned only when the named provider was known but failed // to initialize. The config parameter specifies the io.Reader handler of the // configuration file for the cloud provider, or nil for no configuration. -func GetPlugin(name string, client client.Interface, config io.Reader) (Interface, error) { +func GetPlugin(name string, client clientset.Interface, config io.Reader) (Interface, error) { pluginsMutex.Lock() defer pluginsMutex.Unlock() f, found := plugins[name] @@ -78,7 +78,7 @@ func GetPlugin(name string, client client.Interface, config io.Reader) (Interfac } // InitPlugin creates an instance of the named interface. -func InitPlugin(name string, client client.Interface, configFilePath string) Interface { +func InitPlugin(name string, client clientset.Interface, configFilePath string) Interface { var ( config *os.File err error diff --git a/pkg/api/types.go b/pkg/api/types.go index ea28e9a96a0..6c37c93aebf 100644 --- a/pkg/api/types.go +++ b/pkg/api/types.go @@ -2150,6 +2150,8 @@ type SecretList struct { Items []Secret `json:"items"` } +// +genclient=true + // ConfigMap holds configuration data for components or applications to consume. type ConfigMap struct { unversioned.TypeMeta `json:",inline"` diff --git a/pkg/client/clientset_generated/release_1_1/clientset.go b/pkg/client/clientset_generated/release_1_1/clientset.go index 88a5cb632ad..ec9bae28be3 100644 --- a/pkg/client/clientset_generated/release_1_1/clientset.go +++ b/pkg/client/clientset_generated/release_1_1/clientset.go @@ -17,6 +17,7 @@ limitations under the License. package release_1_1 import ( + "github.com/golang/glog" extensions_unversioned "k8s.io/kubernetes/pkg/client/typed/generated/extensions/unversioned" legacy_unversioned "k8s.io/kubernetes/pkg/client/typed/generated/legacy/unversioned" unversioned "k8s.io/kubernetes/pkg/client/unversioned" @@ -57,18 +58,18 @@ func NewForConfig(c *unversioned.Config) (*Clientset, error) { var err error clientset.LegacyClient, err = legacy_unversioned.NewForConfig(c) if err != nil { - return nil, err + return &clientset, err } clientset.ExtensionsClient, err = extensions_unversioned.NewForConfig(c) if err != nil { - return nil, err + return &clientset, err } clientset.DiscoveryClient, err = unversioned.NewDiscoveryClientForConfig(c) if err != nil { - return nil, err + glog.Errorf("failed to create the DiscoveryClient: %v", err) } - return &clientset, nil + return &clientset, err } // NewForConfigOrDie creates a new Clientset for the given config and diff --git a/pkg/client/typed/generated/legacy/unversioned/configmap.go b/pkg/client/typed/generated/legacy/unversioned/configmap.go new file mode 100644 index 00000000000..c895cb76c3d --- /dev/null +++ b/pkg/client/typed/generated/legacy/unversioned/configmap.go @@ -0,0 +1,135 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +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 unversioned + +import ( + api "k8s.io/kubernetes/pkg/api" + watch "k8s.io/kubernetes/pkg/watch" +) + +// ConfigMapsGetter has a method to return a ConfigMapInterface. +// A group's client should implement this interface. +type ConfigMapsGetter interface { + ConfigMaps(namespace string) ConfigMapInterface +} + +// ConfigMapInterface has methods to work with ConfigMap resources. +type ConfigMapInterface interface { + Create(*api.ConfigMap) (*api.ConfigMap, error) + Update(*api.ConfigMap) (*api.ConfigMap, error) + Delete(name string, options *api.DeleteOptions) error + DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Get(name string) (*api.ConfigMap, error) + List(opts api.ListOptions) (*api.ConfigMapList, error) + Watch(opts api.ListOptions) (watch.Interface, error) + ConfigMapExpansion +} + +// configMaps implements ConfigMapInterface +type configMaps struct { + client *LegacyClient + ns string +} + +// newConfigMaps returns a ConfigMaps +func newConfigMaps(c *LegacyClient, namespace string) *configMaps { + return &configMaps{ + client: c, + ns: namespace, + } +} + +// Create takes the representation of a configMap and creates it. Returns the server's representation of the configMap, and an error, if there is any. +func (c *configMaps) Create(configMap *api.ConfigMap) (result *api.ConfigMap, err error) { + result = &api.ConfigMap{} + err = c.client.Post(). + Namespace(c.ns). + Resource("configmaps"). + Body(configMap). + Do(). + Into(result) + return +} + +// Update takes the representation of a configMap and updates it. Returns the server's representation of the configMap, and an error, if there is any. +func (c *configMaps) Update(configMap *api.ConfigMap) (result *api.ConfigMap, err error) { + result = &api.ConfigMap{} + err = c.client.Put(). + Namespace(c.ns). + Resource("configmaps"). + Name(configMap.Name). + Body(configMap). + Do(). + Into(result) + return +} + +// Delete takes name of the configMap and deletes it. Returns an error if one occurs. +func (c *configMaps) Delete(name string, options *api.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("configmaps"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *configMaps) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("configmaps"). + VersionedParams(&listOptions, api.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Get takes name of the configMap, and returns the corresponding configMap object, and an error if there is any. +func (c *configMaps) Get(name string) (result *api.ConfigMap, err error) { + result = &api.ConfigMap{} + err = c.client.Get(). + Namespace(c.ns). + Resource("configmaps"). + Name(name). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ConfigMaps that match those selectors. +func (c *configMaps) List(opts api.ListOptions) (result *api.ConfigMapList, err error) { + result = &api.ConfigMapList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("configmaps"). + VersionedParams(&opts, api.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested configMaps. +func (c *configMaps) Watch(opts api.ListOptions) (watch.Interface, error) { + return c.client.Get(). + Prefix("watch"). + Namespace(c.ns). + Resource("configmaps"). + VersionedParams(&opts, api.ParameterCodec). + Watch() +} diff --git a/pkg/client/typed/generated/legacy/unversioned/fake/fake_configmap.go b/pkg/client/typed/generated/legacy/unversioned/fake/fake_configmap.go new file mode 100644 index 00000000000..17906624dd6 --- /dev/null +++ b/pkg/client/typed/generated/legacy/unversioned/fake/fake_configmap.go @@ -0,0 +1,102 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +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 fake + +import ( + api "k8s.io/kubernetes/pkg/api" + core "k8s.io/kubernetes/pkg/client/testing/core" + labels "k8s.io/kubernetes/pkg/labels" + watch "k8s.io/kubernetes/pkg/watch" +) + +// FakeConfigMaps implements ConfigMapInterface +type FakeConfigMaps struct { + Fake *FakeLegacy + ns string +} + +func (c *FakeConfigMaps) Create(configMap *api.ConfigMap) (result *api.ConfigMap, err error) { + obj, err := c.Fake. + Invokes(core.NewCreateAction("configmaps", c.ns, configMap), &api.ConfigMap{}) + + if obj == nil { + return nil, err + } + return obj.(*api.ConfigMap), err +} + +func (c *FakeConfigMaps) Update(configMap *api.ConfigMap) (result *api.ConfigMap, err error) { + obj, err := c.Fake. + Invokes(core.NewUpdateAction("configmaps", c.ns, configMap), &api.ConfigMap{}) + + if obj == nil { + return nil, err + } + return obj.(*api.ConfigMap), err +} + +func (c *FakeConfigMaps) Delete(name string, options *api.DeleteOptions) error { + _, err := c.Fake. + Invokes(core.NewDeleteAction("configmaps", c.ns, name), &api.ConfigMap{}) + + return err +} + +func (c *FakeConfigMaps) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { + action := core.NewDeleteCollectionAction("events", c.ns, listOptions) + + _, err := c.Fake.Invokes(action, &api.ConfigMapList{}) + return err +} + +func (c *FakeConfigMaps) Get(name string) (result *api.ConfigMap, err error) { + obj, err := c.Fake. + Invokes(core.NewGetAction("configmaps", c.ns, name), &api.ConfigMap{}) + + if obj == nil { + return nil, err + } + return obj.(*api.ConfigMap), err +} + +func (c *FakeConfigMaps) List(opts api.ListOptions) (result *api.ConfigMapList, err error) { + obj, err := c.Fake. + Invokes(core.NewListAction("configmaps", c.ns, opts), &api.ConfigMapList{}) + + if obj == nil { + return nil, err + } + + label := opts.LabelSelector + if label == nil { + label = labels.Everything() + } + list := &api.ConfigMapList{} + for _, item := range obj.(*api.ConfigMapList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested configMaps. +func (c *FakeConfigMaps) Watch(opts api.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(core.NewWatchAction("configmaps", c.ns, opts)) + +} diff --git a/pkg/client/typed/generated/legacy/unversioned/fake/fake_legacy_client.go b/pkg/client/typed/generated/legacy/unversioned/fake/fake_legacy_client.go index 8ce7699cfff..4a351c5f2cf 100644 --- a/pkg/client/typed/generated/legacy/unversioned/fake/fake_legacy_client.go +++ b/pkg/client/typed/generated/legacy/unversioned/fake/fake_legacy_client.go @@ -29,6 +29,10 @@ func (c *FakeLegacy) ComponentStatuses() unversioned.ComponentStatusInterface { return &FakeComponentStatuses{c} } +func (c *FakeLegacy) ConfigMaps(namespace string) unversioned.ConfigMapInterface { + return &FakeConfigMaps{c, namespace} +} + func (c *FakeLegacy) Endpoints(namespace string) unversioned.EndpointsInterface { return &FakeEndpoints{c, namespace} } diff --git a/pkg/client/typed/generated/legacy/unversioned/generated_expansion.go b/pkg/client/typed/generated/legacy/unversioned/generated_expansion.go index 16b0a571495..eeb51962e8b 100644 --- a/pkg/client/typed/generated/legacy/unversioned/generated_expansion.go +++ b/pkg/client/typed/generated/legacy/unversioned/generated_expansion.go @@ -37,3 +37,5 @@ type ResourceQuotaExpansion interface{} type SecretExpansion interface{} type ServiceAccountExpansion interface{} + +type ConfigMapExpansion interface{} diff --git a/pkg/client/typed/generated/legacy/unversioned/legacy_client.go b/pkg/client/typed/generated/legacy/unversioned/legacy_client.go index 9dda0517ed4..a9f26c8f222 100644 --- a/pkg/client/typed/generated/legacy/unversioned/legacy_client.go +++ b/pkg/client/typed/generated/legacy/unversioned/legacy_client.go @@ -24,6 +24,7 @@ import ( type LegacyInterface interface { ComponentStatusesGetter + ConfigMapsGetter EndpointsGetter EventsGetter LimitRangesGetter @@ -49,6 +50,10 @@ func (c *LegacyClient) ComponentStatuses() ComponentStatusInterface { return newComponentStatuses(c) } +func (c *LegacyClient) ConfigMaps(namespace string) ConfigMapInterface { + return newConfigMaps(c, namespace) +} + func (c *LegacyClient) Endpoints(namespace string) EndpointsInterface { return newEndpoints(c, namespace) } diff --git a/pkg/kubelet/config/apiserver.go b/pkg/kubelet/config/apiserver.go index fa01dca3035..6722b64c59d 100644 --- a/pkg/kubelet/config/apiserver.go +++ b/pkg/kubelet/config/apiserver.go @@ -20,14 +20,15 @@ package config import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/fields" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" ) // NewSourceApiserver creates a config source that watches and pulls from the apiserver. -func NewSourceApiserver(c *client.Client, nodeName string, updates chan<- interface{}) { - lw := cache.NewListWatchFromClient(c, "pods", api.NamespaceAll, fields.OneTermEqualSelector(client.PodHost, nodeName)) +func NewSourceApiserver(c *clientset.Clientset, nodeName string, updates chan<- interface{}) { + lw := cache.NewListWatchFromClient(c.LegacyClient, "pods", api.NamespaceAll, fields.OneTermEqualSelector(client.PodHost, nodeName)) newSourceApiserverFromLW(lw, updates) } diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index 9207a476c7c..616833d48fd 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -148,8 +148,7 @@ func NewMainKubelet( hostname string, nodeName string, dockerClient dockertools.DockerInterface, - kubeClient client.Interface, - clientset clientset.Interface, + kubeClient clientset.Interface, rootDirectory string, podInfraContainerImage string, resyncInterval time.Duration, @@ -220,10 +219,10 @@ func NewMainKubelet( // than an interface. There is no way to construct a list+watcher using resource name. listWatch := &cache.ListWatch{ ListFunc: func(options api.ListOptions) (runtime.Object, error) { - return kubeClient.Services(api.NamespaceAll).List(options) + return kubeClient.Legacy().Services(api.NamespaceAll).List(options) }, WatchFunc: func(options api.ListOptions) (watch.Interface, error) { - return kubeClient.Services(api.NamespaceAll).Watch(options) + return kubeClient.Legacy().Services(api.NamespaceAll).Watch(options) }, } cache.NewReflector(listWatch, &api.Service{}, serviceStore, 0).Run() @@ -238,11 +237,11 @@ func NewMainKubelet( listWatch := &cache.ListWatch{ ListFunc: func(options api.ListOptions) (runtime.Object, error) { options.FieldSelector = fieldSelector - return kubeClient.Nodes().List(options) + return kubeClient.Legacy().Nodes().List(options) }, WatchFunc: func(options api.ListOptions) (watch.Interface, error) { options.FieldSelector = fieldSelector - return kubeClient.Nodes().Watch(options) + return kubeClient.Legacy().Nodes().Watch(options) }, } cache.NewReflector(listWatch, &api.Node{}, nodeStore, 0).Run() @@ -275,7 +274,6 @@ func NewMainKubelet( nodeName: nodeName, dockerClient: dockerClient, kubeClient: kubeClient, - clientset: clientset, rootDirectory: rootDirectory, resyncInterval: resyncInterval, containerRefManager: containerRefManager, @@ -469,8 +467,7 @@ type Kubelet struct { nodeName string dockerClient dockertools.DockerInterface runtimeCache kubecontainer.RuntimeCache - kubeClient client.Interface - clientset clientset.Interface + kubeClient clientset.Interface rootDirectory string podWorkers PodWorkers @@ -1055,12 +1052,12 @@ func (kl *Kubelet) registerWithApiserver() { continue } glog.V(2).Infof("Attempting to register node %s", node.Name) - if _, err := kl.kubeClient.Nodes().Create(node); err != nil { + if _, err := kl.kubeClient.Legacy().Nodes().Create(node); err != nil { if !apierrors.IsAlreadyExists(err) { glog.V(2).Infof("Unable to register %s with the apiserver: %v", node.Name, err) continue } - currentNode, err := kl.kubeClient.Nodes().Get(kl.nodeName) + currentNode, err := kl.kubeClient.Legacy().Nodes().Get(kl.nodeName) if err != nil { glog.Errorf("error getting node %q: %v", kl.nodeName, err) continue @@ -1078,7 +1075,7 @@ func (kl *Kubelet) registerWithApiserver() { "Previously %q had externalID %q; now it is %q; will delete and recreate.", kl.nodeName, node.Spec.ExternalID, currentNode.Spec.ExternalID, ) - if err := kl.kubeClient.Nodes().Delete(node.Name); err != nil { + if err := kl.kubeClient.Legacy().Nodes().Delete(node.Name, nil); err != nil { glog.Errorf("Unable to delete old node: %v", err) } else { glog.Errorf("Deleted old node object %q", kl.nodeName) @@ -1410,7 +1407,7 @@ func (kl *Kubelet) makeEnvironmentVariables(pod *api.Pod, container *api.Contain key := envVar.ValueFrom.ConfigMapKeyRef.Key configMap, ok := configMaps[name] if !ok { - configMap, err = kl.kubeClient.ConfigMaps(pod.Namespace).Get(name) + configMap, err = kl.kubeClient.Legacy().ConfigMaps(pod.Namespace).Get(name) if err != nil { return result, err } @@ -1424,7 +1421,7 @@ func (kl *Kubelet) makeEnvironmentVariables(pod *api.Pod, container *api.Contain key := envVar.ValueFrom.SecretKeyRef.Key secret, ok := secrets[name] if !ok { - secret, err = kl.kubeClient.Secrets(pod.Namespace).Get(name) + secret, err = kl.kubeClient.Legacy().Secrets(pod.Namespace).Get(name) if err != nil { return result, err } @@ -1718,7 +1715,7 @@ func (kl *Kubelet) getPullSecretsForPod(pod *api.Pod) ([]api.Secret, error) { pullSecrets := []api.Secret{} for _, secretRef := range pod.Spec.ImagePullSecrets { - secret, err := kl.kubeClient.Secrets(pod.Namespace).Get(secretRef.Name) + secret, err := kl.kubeClient.Legacy().Secrets(pod.Namespace).Get(secretRef.Name) if err != nil { glog.Warningf("Unable to retrieve pull secret %s/%s for %s/%s due to %v. The image pull may not succeed.", pod.Namespace, secretRef.Name, pod.Namespace, pod.Name, err) continue @@ -2971,7 +2968,7 @@ func (kl *Kubelet) isContainerRuntimeVersionCompatible() error { // tryUpdateNodeStatus tries to update node status to master. If ReconcileCBR0 // is set, this function will also confirm that cbr0 is configured correctly. func (kl *Kubelet) tryUpdateNodeStatus() error { - node, err := kl.kubeClient.Nodes().Get(kl.nodeName) + node, err := kl.kubeClient.Legacy().Nodes().Get(kl.nodeName) if err != nil { return fmt.Errorf("error getting node %q: %v", kl.nodeName, err) } @@ -2986,7 +2983,7 @@ func (kl *Kubelet) tryUpdateNodeStatus() error { if node.Spec.PodCIDR != flannelPodCIDR { node.Spec.PodCIDR = flannelPodCIDR glog.Infof("Updating podcidr to %v", node.Spec.PodCIDR) - if updatedNode, err := kl.kubeClient.Nodes().Update(node); err != nil { + if updatedNode, err := kl.kubeClient.Legacy().Nodes().Update(node); err != nil { glog.Warningf("Failed to update podCIDR: %v", err) } else { // Update the node resourceVersion so the status update doesn't fail. @@ -3001,7 +2998,7 @@ func (kl *Kubelet) tryUpdateNodeStatus() error { return err } // Update the current status on the API server - _, err = kl.kubeClient.Nodes().UpdateStatus(node) + _, err = kl.kubeClient.Legacy().Nodes().UpdateStatus(node) return err } diff --git a/pkg/kubelet/kubelet_test.go b/pkg/kubelet/kubelet_test.go index df5eaf94c0e..6d9333c13f4 100644 --- a/pkg/kubelet/kubelet_test.go +++ b/pkg/kubelet/kubelet_test.go @@ -40,6 +40,8 @@ import ( "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/capabilities" "k8s.io/kubernetes/pkg/client/record" + "k8s.io/kubernetes/pkg/client/testing/core" + "k8s.io/kubernetes/pkg/client/testing/fake" "k8s.io/kubernetes/pkg/client/unversioned/testclient" "k8s.io/kubernetes/pkg/kubelet/cadvisor" "k8s.io/kubernetes/pkg/kubelet/cm" @@ -87,7 +89,7 @@ type TestKubelet struct { kubelet *Kubelet fakeRuntime *kubecontainer.FakeRuntime fakeCadvisor *cadvisor.Mock - fakeKubeClient *testclient.Fake + fakeKubeClient *fake.Clientset fakeMirrorClient *kubepod.FakeMirrorClient fakeClock *util.FakeClock } @@ -108,7 +110,7 @@ func newTestKubelet(t *testing.T) *TestKubelet { }, } fakeRecorder := &record.FakeRecorder{} - fakeKubeClient := &testclient.Fake{} + fakeKubeClient := &fake.Clientset{} kubelet := &Kubelet{} kubelet.kubeClient = fakeKubeClient kubelet.os = kubecontainer.FakeOS{} @@ -2540,7 +2542,7 @@ func TestUpdateNewNodeStatus(t *testing.T) { fakeRuntime.RuntimeType = "docker" fakeRuntime.VersionInfo = "1.5.0" kubeClient := testKubelet.fakeKubeClient - kubeClient.ReactionChain = testclient.NewSimpleFake(&api.NodeList{Items: []api.Node{ + kubeClient.ReactionChain = fake.NewSimpleClientset(&api.NodeList{Items: []api.Node{ {ObjectMeta: api.ObjectMeta{Name: testKubeletHostname}}, }}).ReactionChain machineInfo := &cadvisorapi.MachineInfo{ @@ -2663,7 +2665,7 @@ func TestUpdateNewNodeOutOfDiskStatusWithTransitionFrequency(t *testing.T) { testKubelet := newTestKubelet(t) kubelet := testKubelet.kubelet kubeClient := testKubelet.fakeKubeClient - kubeClient.ReactionChain = testclient.NewSimpleFake(&api.NodeList{Items: []api.Node{ + kubeClient.ReactionChain = fake.NewSimpleClientset(&api.NodeList{Items: []api.Node{ {ObjectMeta: api.ObjectMeta{Name: testKubeletHostname}}, }}).ReactionChain machineInfo := &cadvisorapi.MachineInfo{ @@ -2742,7 +2744,7 @@ func TestDockerRuntimeVersion(t *testing.T) { fakeRuntime.VersionInfo = "1.10.0-rc1-fc24" fakeRuntime.APIVersionInfo = "1.22" kubeClient := testKubelet.fakeKubeClient - kubeClient.ReactionChain = testclient.NewSimpleFake(&api.NodeList{Items: []api.Node{ + kubeClient.ReactionChain = fake.NewSimpleClientset(&api.NodeList{Items: []api.Node{ { ObjectMeta: api.ObjectMeta{Name: testKubeletHostname}, Spec: api.NodeSpec{}, @@ -2926,7 +2928,7 @@ func TestUpdateExistingNodeStatus(t *testing.T) { fakeRuntime.RuntimeType = "docker" fakeRuntime.VersionInfo = "1.5.0" kubeClient := testKubelet.fakeKubeClient - kubeClient.ReactionChain = testclient.NewSimpleFake(&api.NodeList{Items: []api.Node{ + kubeClient.ReactionChain = fake.NewSimpleClientset(&api.NodeList{Items: []api.Node{ { ObjectMeta: api.ObjectMeta{Name: testKubeletHostname}, Spec: api.NodeSpec{}, @@ -3085,7 +3087,7 @@ func TestUpdateExistingNodeOutOfDiskStatusWithTransitionFrequency(t *testing.T) kubelet := testKubelet.kubelet clock := testKubelet.fakeClock kubeClient := testKubelet.fakeKubeClient - kubeClient.ReactionChain = testclient.NewSimpleFake(&api.NodeList{Items: []api.Node{ + kubeClient.ReactionChain = fake.NewSimpleClientset(&api.NodeList{Items: []api.Node{ { ObjectMeta: api.ObjectMeta{Name: testKubeletHostname}, Spec: api.NodeSpec{}, @@ -3239,7 +3241,7 @@ func TestUpdateNodeStatusWithoutContainerRuntime(t *testing.T) { fakeRuntime := testKubelet.fakeRuntime fakeRuntime.RuntimeType = "docker" fakeRuntime.VersionInfo = "1.5.0" - kubeClient.ReactionChain = testclient.NewSimpleFake(&api.NodeList{Items: []api.Node{ + kubeClient.ReactionChain = fake.NewSimpleClientset(&api.NodeList{Items: []api.Node{ {ObjectMeta: api.ObjectMeta{Name: testKubeletHostname}}, }}).ReactionChain mockCadvisor := testKubelet.fakeCadvisor @@ -3363,7 +3365,7 @@ func TestUpdateNodeStatusError(t *testing.T) { testKubelet := newTestKubelet(t) kubelet := testKubelet.kubelet // No matching node for the kubelet - testKubelet.fakeKubeClient.ReactionChain = testclient.NewSimpleFake(&api.NodeList{Items: []api.Node{}}).ReactionChain + testKubelet.fakeKubeClient.ReactionChain = fake.NewSimpleClientset(&api.NodeList{Items: []api.Node{}}).ReactionChain if err := kubelet.updateNodeStatus(); err == nil { t.Errorf("unexpected non error: %v", err) @@ -3727,20 +3729,20 @@ func TestRegisterExistingNodeWithApiserver(t *testing.T) { testKubelet := newTestKubelet(t) kubelet := testKubelet.kubelet kubeClient := testKubelet.fakeKubeClient - kubeClient.AddReactor("create", "nodes", func(action testclient.Action) (bool, runtime.Object, error) { + kubeClient.AddReactor("create", "nodes", func(action core.Action) (bool, runtime.Object, error) { // Return an error on create. return true, &api.Node{}, &apierrors.StatusError{ ErrStatus: unversioned.Status{Reason: unversioned.StatusReasonAlreadyExists}, } }) - kubeClient.AddReactor("get", "nodes", func(action testclient.Action) (bool, runtime.Object, error) { + kubeClient.AddReactor("get", "nodes", func(action core.Action) (bool, runtime.Object, error) { // Return an existing (matching) node on get. return true, &api.Node{ ObjectMeta: api.ObjectMeta{Name: testKubeletHostname}, Spec: api.NodeSpec{ExternalID: testKubeletHostname}, }, nil }) - kubeClient.AddReactor("*", "*", func(action testclient.Action) (bool, runtime.Object, error) { + kubeClient.AddReactor("*", "*", func(action core.Action) (bool, runtime.Object, error) { return true, nil, fmt.Errorf("no reaction implemented for %s", action) }) machineInfo := &cadvisorapi.MachineInfo{ diff --git a/pkg/kubelet/network/cni/cni_test.go b/pkg/kubelet/network/cni/cni_test.go index 7287abdb669..38e78573216 100644 --- a/pkg/kubelet/network/cni/cni_test.go +++ b/pkg/kubelet/network/cni/cni_test.go @@ -28,12 +28,13 @@ import ( "testing" "text/template" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + docker "github.com/fsouza/go-dockerclient" cadvisorapi "github.com/google/cadvisor/info/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/record" - client "k8s.io/kubernetes/pkg/client/unversioned" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/dockertools" "k8s.io/kubernetes/pkg/kubelet/network" @@ -111,10 +112,10 @@ func tearDownPlugin(tmpDir string) { } type fakeNetworkHost struct { - kubeClient client.Interface + kubeClient clientset.Interface } -func NewFakeHost(kubeClient client.Interface) *fakeNetworkHost { +func NewFakeHost(kubeClient clientset.Interface) *fakeNetworkHost { host := &fakeNetworkHost{kubeClient: kubeClient} return host } @@ -123,7 +124,7 @@ func (fnh *fakeNetworkHost) GetPodByName(name, namespace string) (*api.Pod, bool return nil, false } -func (fnh *fakeNetworkHost) GetKubeClient() client.Interface { +func (fnh *fakeNetworkHost) GetKubeClient() clientset.Interface { return nil } diff --git a/pkg/kubelet/network/plugins.go b/pkg/kubelet/network/plugins.go index 162de06ceaa..80678924532 100644 --- a/pkg/kubelet/network/plugins.go +++ b/pkg/kubelet/network/plugins.go @@ -21,10 +21,11 @@ import ( "net" "strings" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + "github.com/golang/glog" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/unversioned" - client "k8s.io/kubernetes/pkg/client/unversioned" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" utilerrors "k8s.io/kubernetes/pkg/util/errors" "k8s.io/kubernetes/pkg/util/validation" @@ -72,7 +73,7 @@ type Host interface { GetPodByName(namespace, name string) (*api.Pod, bool) // GetKubeClient returns a client interface - GetKubeClient() client.Interface + GetKubeClient() clientset.Interface // GetContainerRuntime returns the container runtime that implements the containers (e.g. docker/rkt) GetRuntime() kubecontainer.Runtime diff --git a/pkg/kubelet/network/testing.go b/pkg/kubelet/network/testing.go index 6b82534e38b..a6612345023 100644 --- a/pkg/kubelet/network/testing.go +++ b/pkg/kubelet/network/testing.go @@ -21,15 +21,15 @@ package network import ( "k8s.io/kubernetes/pkg/api" - client "k8s.io/kubernetes/pkg/client/unversioned" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" ) type fakeNetworkHost struct { - kubeClient client.Interface + kubeClient clientset.Interface } -func NewFakeHost(kubeClient client.Interface) *fakeNetworkHost { +func NewFakeHost(kubeClient clientset.Interface) *fakeNetworkHost { host := &fakeNetworkHost{kubeClient: kubeClient} return host } @@ -38,7 +38,7 @@ func (fnh *fakeNetworkHost) GetPodByName(name, namespace string) (*api.Pod, bool return nil, false } -func (fnh *fakeNetworkHost) GetKubeClient() client.Interface { +func (fnh *fakeNetworkHost) GetKubeClient() clientset.Interface { return nil } diff --git a/pkg/kubelet/networks.go b/pkg/kubelet/networks.go index 5ec7a00fe7d..af58a3dc7de 100644 --- a/pkg/kubelet/networks.go +++ b/pkg/kubelet/networks.go @@ -18,7 +18,7 @@ package kubelet import ( "k8s.io/kubernetes/pkg/api" - client "k8s.io/kubernetes/pkg/client/unversioned" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" ) @@ -32,7 +32,7 @@ func (nh *networkHost) GetPodByName(name, namespace string) (*api.Pod, bool) { return nh.kubelet.GetPodByName(name, namespace) } -func (nh *networkHost) GetKubeClient() client.Interface { +func (nh *networkHost) GetKubeClient() clientset.Interface { return nh.kubelet.kubeClient } diff --git a/pkg/kubelet/pod/mirror_client.go b/pkg/kubelet/pod/mirror_client.go index 3eeee0794f1..4027e0e4e4b 100644 --- a/pkg/kubelet/pod/mirror_client.go +++ b/pkg/kubelet/pod/mirror_client.go @@ -20,7 +20,7 @@ import ( "github.com/golang/glog" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" - client "k8s.io/kubernetes/pkg/client/unversioned" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" ) @@ -34,10 +34,10 @@ type MirrorClient interface { type basicMirrorClient struct { // mirror pods are stored in the kubelet directly because they need to be // in sync with the internal pods. - apiserverClient client.Interface + apiserverClient clientset.Interface } -func NewBasicMirrorClient(apiserverClient client.Interface) MirrorClient { +func NewBasicMirrorClient(apiserverClient clientset.Interface) MirrorClient { return &basicMirrorClient{apiserverClient: apiserverClient} } @@ -55,7 +55,7 @@ func (mc *basicMirrorClient) CreateMirrorPod(pod *api.Pod) error { } hash := getPodHash(pod) copyPod.Annotations[kubetypes.ConfigMirrorAnnotationKey] = hash - apiPod, err := mc.apiserverClient.Pods(copyPod.Namespace).Create(©Pod) + apiPod, err := mc.apiserverClient.Legacy().Pods(copyPod.Namespace).Create(©Pod) if err != nil && errors.IsAlreadyExists(err) { // Check if the existing pod is the same as the pod we want to create. if h, ok := apiPod.Annotations[kubetypes.ConfigMirrorAnnotationKey]; ok && h == hash { @@ -76,7 +76,7 @@ func (mc *basicMirrorClient) DeleteMirrorPod(podFullName string) error { return err } glog.V(4).Infof("Deleting a mirror pod %q", podFullName) - if err := mc.apiserverClient.Pods(namespace).Delete(name, api.NewDeleteOptions(0)); err != nil && !errors.IsNotFound(err) { + if err := mc.apiserverClient.Legacy().Pods(namespace).Delete(name, api.NewDeleteOptions(0)); err != nil && !errors.IsNotFound(err) { glog.Errorf("Failed deleting a mirror pod %q: %v", podFullName, err) } return nil diff --git a/pkg/kubelet/prober/testing.go b/pkg/kubelet/prober/testing.go index 9ea4541cbc3..9ddb808903a 100644 --- a/pkg/kubelet/prober/testing.go +++ b/pkg/kubelet/prober/testing.go @@ -23,7 +23,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/unversioned/testclient" + "k8s.io/kubernetes/pkg/client/testing/fake" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" kubepod "k8s.io/kubernetes/pkg/kubelet/pod" "k8s.io/kubernetes/pkg/kubelet/prober/results" @@ -97,7 +97,7 @@ func newTestManager() *manager { refManager := kubecontainer.NewRefManager() refManager.SetRef(testContainerID, &api.ObjectReference{}) // Suppress prober warnings. m := NewManager( - status.NewManager(&testclient.Fake{}, kubepod.NewBasicPodManager(nil)), + status.NewManager(&fake.Clientset{}, kubepod.NewBasicPodManager(nil)), results.NewManager(), nil, // runner refManager, diff --git a/pkg/kubelet/prober/worker_test.go b/pkg/kubelet/prober/worker_test.go index 1dd1dc3cff0..3b828e151de 100644 --- a/pkg/kubelet/prober/worker_test.go +++ b/pkg/kubelet/prober/worker_test.go @@ -24,7 +24,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/unversioned/testclient" + "k8s.io/kubernetes/pkg/client/testing/fake" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" kubepod "k8s.io/kubernetes/pkg/kubelet/pod" "k8s.io/kubernetes/pkg/kubelet/prober/results" @@ -118,7 +118,7 @@ func TestDoProbe(t *testing.T) { } // Clean up. - m.statusManager = status.NewManager(&testclient.Fake{}, kubepod.NewBasicPodManager(nil)) + m.statusManager = status.NewManager(&fake.Clientset{}, kubepod.NewBasicPodManager(nil)) resultsManager(m, probeType).Remove(testContainerID) } } diff --git a/pkg/kubelet/status/manager.go b/pkg/kubelet/status/manager.go index 3cb3084ea6a..edc85a38c9b 100644 --- a/pkg/kubelet/status/manager.go +++ b/pkg/kubelet/status/manager.go @@ -21,11 +21,12 @@ import ( "sync" "time" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + "github.com/golang/glog" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/unversioned" - client "k8s.io/kubernetes/pkg/client/unversioned" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" kubepod "k8s.io/kubernetes/pkg/kubelet/pod" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" @@ -53,7 +54,7 @@ type podStatusSyncRequest struct { // Updates pod statuses in apiserver. Writes only when new status has changed. // All methods are thread-safe. type manager struct { - kubeClient client.Interface + kubeClient clientset.Interface podManager kubepod.Manager // Map from pod UID to sync status of the corresponding pod. podStatuses map[types.UID]versionedPodStatus @@ -93,7 +94,7 @@ type Manager interface { const syncPeriod = 10 * time.Second -func NewManager(kubeClient client.Interface, podManager kubepod.Manager) Manager { +func NewManager(kubeClient clientset.Interface, podManager kubepod.Manager) Manager { return &manager{ kubeClient: kubeClient, podManager: podManager, @@ -346,7 +347,7 @@ func (m *manager) syncBatch() { // syncPod syncs the given status with the API server. The caller must not hold the lock. func (m *manager) syncPod(uid types.UID, status versionedPodStatus) { // TODO: make me easier to express from client code - pod, err := m.kubeClient.Pods(status.podNamespace).Get(status.podName) + pod, err := m.kubeClient.Legacy().Pods(status.podNamespace).Get(status.podName) if errors.IsNotFound(err) { glog.V(3).Infof("Pod %q (%s) does not exist on the server", status.podName, uid) // If the Pod is deleted the status will be cleared in @@ -366,7 +367,7 @@ func (m *manager) syncPod(uid types.UID, status versionedPodStatus) { } pod.Status = status.status // TODO: handle conflict as a retry, make that easier too. - pod, err = m.kubeClient.Pods(pod.Namespace).UpdateStatus(pod) + pod, err = m.kubeClient.Legacy().Pods(pod.Namespace).UpdateStatus(pod) if err == nil { glog.V(3).Infof("Status for pod %q updated successfully: %+v", format.Pod(pod), status) m.apiStatusVersions[pod.UID] = status.version @@ -381,7 +382,7 @@ func (m *manager) syncPod(uid types.UID, status versionedPodStatus) { glog.V(3).Infof("Pod %q is terminated, but some containers are still running", format.Pod(pod)) return } - if err := m.kubeClient.Pods(pod.Namespace).Delete(pod.Name, api.NewDeleteOptions(0)); err == nil { + if err := m.kubeClient.Legacy().Pods(pod.Namespace).Delete(pod.Name, api.NewDeleteOptions(0)); err == nil { glog.V(3).Infof("Pod %q fully terminated and removed from etcd", format.Pod(pod)) m.deletePodStatus(uid) return diff --git a/pkg/kubelet/status/manager_test.go b/pkg/kubelet/status/manager_test.go index 73fb5d43d83..df3eb880fdb 100644 --- a/pkg/kubelet/status/manager_test.go +++ b/pkg/kubelet/status/manager_test.go @@ -23,13 +23,15 @@ import ( "testing" "time" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + "k8s.io/kubernetes/pkg/client/testing/core" + "k8s.io/kubernetes/pkg/client/testing/fake" + "github.com/stretchr/testify/assert" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/unversioned" - client "k8s.io/kubernetes/pkg/client/unversioned" - "k8s.io/kubernetes/pkg/client/unversioned/testclient" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" kubepod "k8s.io/kubernetes/pkg/kubelet/pod" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" @@ -65,7 +67,7 @@ func (m *manager) testSyncBatch() { m.syncBatch() } -func newTestManager(kubeClient client.Interface) *manager { +func newTestManager(kubeClient clientset.Interface) *manager { podManager := kubepod.NewBasicPodManager(kubepod.NewFakeMirrorClient()) podManager.AddPod(getTestPod()) return NewManager(kubeClient, podManager).(*manager) @@ -81,8 +83,8 @@ func getRandomPodStatus() api.PodStatus { } } -func verifyActions(t *testing.T, kubeClient client.Interface, expectedActions []testclient.Action) { - actions := kubeClient.(*testclient.Fake).Actions() +func verifyActions(t *testing.T, kubeClient clientset.Interface, expectedActions []core.Action) { + actions := kubeClient.(*fake.Clientset).Actions() if len(actions) != len(expectedActions) { t.Fatalf("unexpected actions, got: %+v expected: %+v", actions, expectedActions) return @@ -119,7 +121,7 @@ func verifyUpdates(t *testing.T, manager *manager, expectedUpdates int) { } func TestNewStatus(t *testing.T) { - syncer := newTestManager(&testclient.Fake{}) + syncer := newTestManager(&fake.Clientset{}) testPod := getTestPod() syncer.SetPodStatus(testPod, getRandomPodStatus()) verifyUpdates(t, syncer, 1) @@ -131,7 +133,7 @@ func TestNewStatus(t *testing.T) { } func TestNewStatusPreservesPodStartTime(t *testing.T) { - syncer := newTestManager(&testclient.Fake{}) + syncer := newTestManager(&fake.Clientset{}) pod := &api.Pod{ ObjectMeta: api.ObjectMeta{ UID: "12345678", @@ -163,7 +165,7 @@ func getReadyPodStatus() api.PodStatus { } func TestNewStatusSetsReadyTransitionTime(t *testing.T) { - syncer := newTestManager(&testclient.Fake{}) + syncer := newTestManager(&fake.Clientset{}) podStatus := getReadyPodStatus() pod := &api.Pod{ ObjectMeta: api.ObjectMeta{ @@ -183,7 +185,7 @@ func TestNewStatusSetsReadyTransitionTime(t *testing.T) { } func TestChangedStatus(t *testing.T) { - syncer := newTestManager(&testclient.Fake{}) + syncer := newTestManager(&fake.Clientset{}) testPod := getTestPod() syncer.SetPodStatus(testPod, getRandomPodStatus()) syncer.SetPodStatus(testPod, getRandomPodStatus()) @@ -191,7 +193,7 @@ func TestChangedStatus(t *testing.T) { } func TestChangedStatusKeepsStartTime(t *testing.T) { - syncer := newTestManager(&testclient.Fake{}) + syncer := newTestManager(&fake.Clientset{}) testPod := getTestPod() now := unversioned.Now() firstStatus := getRandomPodStatus() @@ -209,7 +211,7 @@ func TestChangedStatusKeepsStartTime(t *testing.T) { } func TestChangedStatusUpdatesLastTransitionTime(t *testing.T) { - syncer := newTestManager(&testclient.Fake{}) + syncer := newTestManager(&fake.Clientset{}) podStatus := getReadyPodStatus() pod := &api.Pod{ ObjectMeta: api.ObjectMeta{ @@ -239,7 +241,7 @@ func TestChangedStatusUpdatesLastTransitionTime(t *testing.T) { } func TestUnchangedStatus(t *testing.T) { - syncer := newTestManager(&testclient.Fake{}) + syncer := newTestManager(&fake.Clientset{}) testPod := getTestPod() podStatus := getRandomPodStatus() syncer.SetPodStatus(testPod, podStatus) @@ -248,7 +250,7 @@ func TestUnchangedStatus(t *testing.T) { } func TestUnchangedStatusPreservesLastTransitionTime(t *testing.T) { - syncer := newTestManager(&testclient.Fake{}) + syncer := newTestManager(&fake.Clientset{}) podStatus := getReadyPodStatus() pod := &api.Pod{ ObjectMeta: api.ObjectMeta{ @@ -278,61 +280,61 @@ func TestUnchangedStatusPreservesLastTransitionTime(t *testing.T) { } func TestSyncBatchIgnoresNotFound(t *testing.T) { - client := testclient.Fake{} + client := fake.Clientset{} syncer := newTestManager(&client) - client.AddReactor("get", "pods", func(action testclient.Action) (bool, runtime.Object, error) { + client.AddReactor("get", "pods", func(action core.Action) (bool, runtime.Object, error) { return true, nil, errors.NewNotFound(api.Resource("pods"), "test-pod") }) syncer.SetPodStatus(getTestPod(), getRandomPodStatus()) syncer.testSyncBatch() - verifyActions(t, syncer.kubeClient, []testclient.Action{ - testclient.GetActionImpl{ActionImpl: testclient.ActionImpl{Verb: "get", Resource: "pods"}}, + verifyActions(t, syncer.kubeClient, []core.Action{ + core.GetActionImpl{ActionImpl: core.ActionImpl{Verb: "get", Resource: "pods"}}, }) } func TestSyncBatch(t *testing.T) { - syncer := newTestManager(&testclient.Fake{}) + syncer := newTestManager(&fake.Clientset{}) testPod := getTestPod() - syncer.kubeClient = testclient.NewSimpleFake(testPod) + syncer.kubeClient = fake.NewSimpleClientset(testPod) syncer.SetPodStatus(testPod, getRandomPodStatus()) syncer.testSyncBatch() - verifyActions(t, syncer.kubeClient, []testclient.Action{ - testclient.GetActionImpl{ActionImpl: testclient.ActionImpl{Verb: "get", Resource: "pods"}}, - testclient.UpdateActionImpl{ActionImpl: testclient.ActionImpl{Verb: "update", Resource: "pods", Subresource: "status"}}, + verifyActions(t, syncer.kubeClient, []core.Action{ + core.GetActionImpl{ActionImpl: core.ActionImpl{Verb: "get", Resource: "pods"}}, + core.UpdateActionImpl{ActionImpl: core.ActionImpl{Verb: "update", Resource: "pods", Subresource: "status"}}, }, ) } func TestSyncBatchChecksMismatchedUID(t *testing.T) { - syncer := newTestManager(&testclient.Fake{}) + syncer := newTestManager(&fake.Clientset{}) pod := getTestPod() pod.UID = "first" syncer.podManager.AddPod(pod) differentPod := getTestPod() differentPod.UID = "second" syncer.podManager.AddPod(differentPod) - syncer.kubeClient = testclient.NewSimpleFake(pod) + syncer.kubeClient = fake.NewSimpleClientset(pod) syncer.SetPodStatus(differentPod, getRandomPodStatus()) syncer.testSyncBatch() - verifyActions(t, syncer.kubeClient, []testclient.Action{ - testclient.GetActionImpl{ActionImpl: testclient.ActionImpl{Verb: "get", Resource: "pods"}}, + verifyActions(t, syncer.kubeClient, []core.Action{ + core.GetActionImpl{ActionImpl: core.ActionImpl{Verb: "get", Resource: "pods"}}, }) } func TestSyncBatchNoDeadlock(t *testing.T) { - client := &testclient.Fake{} + client := &fake.Clientset{} m := newTestManager(client) pod := getTestPod() // Setup fake client. var ret api.Pod var err error - client.AddReactor("*", "pods", func(action testclient.Action) (bool, runtime.Object, error) { + client.AddReactor("*", "pods", func(action core.Action) (bool, runtime.Object, error) { switch action := action.(type) { - case testclient.GetAction: + case core.GetAction: assert.Equal(t, pod.Name, action.GetName(), "Unexpeted GetAction: %+v", action) - case testclient.UpdateAction: + case core.UpdateAction: assert.Equal(t, pod.Name, action.GetObject().(*api.Pod).Name, "Unexpeted UpdateAction: %+v", action) default: assert.Fail(t, "Unexpected Action: %+v", action) @@ -342,15 +344,15 @@ func TestSyncBatchNoDeadlock(t *testing.T) { pod.Status.ContainerStatuses = []api.ContainerStatus{{State: api.ContainerState{Running: &api.ContainerStateRunning{}}}} - getAction := testclient.GetActionImpl{ActionImpl: testclient.ActionImpl{Verb: "get", Resource: "pods"}} - updateAction := testclient.UpdateActionImpl{ActionImpl: testclient.ActionImpl{Verb: "update", Resource: "pods", Subresource: "status"}} + getAction := core.GetActionImpl{ActionImpl: core.ActionImpl{Verb: "get", Resource: "pods"}} + updateAction := core.UpdateActionImpl{ActionImpl: core.ActionImpl{Verb: "update", Resource: "pods", Subresource: "status"}} // Pod not found. ret = *pod err = errors.NewNotFound(api.Resource("pods"), pod.Name) m.SetPodStatus(pod, getRandomPodStatus()) m.testSyncBatch() - verifyActions(t, client, []testclient.Action{getAction}) + verifyActions(t, client, []core.Action{getAction}) client.ClearActions() // Pod was recreated. @@ -358,21 +360,21 @@ func TestSyncBatchNoDeadlock(t *testing.T) { err = nil m.SetPodStatus(pod, getRandomPodStatus()) m.testSyncBatch() - verifyActions(t, client, []testclient.Action{getAction}) + verifyActions(t, client, []core.Action{getAction}) client.ClearActions() // Pod not deleted (success case). ret = *pod m.SetPodStatus(pod, getRandomPodStatus()) m.testSyncBatch() - verifyActions(t, client, []testclient.Action{getAction, updateAction}) + verifyActions(t, client, []core.Action{getAction, updateAction}) client.ClearActions() // Pod is terminated, but still running. pod.DeletionTimestamp = new(unversioned.Time) m.SetPodStatus(pod, getRandomPodStatus()) m.testSyncBatch() - verifyActions(t, client, []testclient.Action{getAction, updateAction}) + verifyActions(t, client, []core.Action{getAction, updateAction}) client.ClearActions() // Pod is terminated successfully. @@ -380,20 +382,20 @@ func TestSyncBatchNoDeadlock(t *testing.T) { pod.Status.ContainerStatuses[0].State.Terminated = &api.ContainerStateTerminated{} m.SetPodStatus(pod, getRandomPodStatus()) m.testSyncBatch() - verifyActions(t, client, []testclient.Action{getAction, updateAction}) + verifyActions(t, client, []core.Action{getAction, updateAction}) client.ClearActions() // Error case. err = fmt.Errorf("intentional test error") m.SetPodStatus(pod, getRandomPodStatus()) m.testSyncBatch() - verifyActions(t, client, []testclient.Action{getAction}) + verifyActions(t, client, []core.Action{getAction}) client.ClearActions() } func TestStaleUpdates(t *testing.T) { pod := getTestPod() - client := testclient.NewSimpleFake(pod) + client := fake.NewSimpleClientset(pod) m := newTestManager(client) status := api.PodStatus{Message: "initial status"} @@ -406,16 +408,16 @@ func TestStaleUpdates(t *testing.T) { t.Logf("First sync pushes latest status.") m.testSyncBatch() - verifyActions(t, m.kubeClient, []testclient.Action{ - testclient.GetActionImpl{ActionImpl: testclient.ActionImpl{Verb: "get", Resource: "pods"}}, - testclient.UpdateActionImpl{ActionImpl: testclient.ActionImpl{Verb: "update", Resource: "pods", Subresource: "status"}}, + verifyActions(t, m.kubeClient, []core.Action{ + core.GetActionImpl{ActionImpl: core.ActionImpl{Verb: "get", Resource: "pods"}}, + core.UpdateActionImpl{ActionImpl: core.ActionImpl{Verb: "update", Resource: "pods", Subresource: "status"}}, }) client.ClearActions() for i := 0; i < 2; i++ { t.Logf("Next 2 syncs should be ignored (%d).", i) m.testSyncBatch() - verifyActions(t, m.kubeClient, []testclient.Action{}) + verifyActions(t, m.kubeClient, []core.Action{}) } t.Log("Unchanged status should not send an update.") @@ -427,9 +429,9 @@ func TestStaleUpdates(t *testing.T) { m.SetPodStatus(pod, status) m.testSyncBatch() - verifyActions(t, m.kubeClient, []testclient.Action{ - testclient.GetActionImpl{ActionImpl: testclient.ActionImpl{Verb: "get", Resource: "pods"}}, - testclient.UpdateActionImpl{ActionImpl: testclient.ActionImpl{Verb: "update", Resource: "pods", Subresource: "status"}}, + verifyActions(t, m.kubeClient, []core.Action{ + core.GetActionImpl{ActionImpl: core.ActionImpl{Verb: "get", Resource: "pods"}}, + core.UpdateActionImpl{ActionImpl: core.ActionImpl{Verb: "update", Resource: "pods", Subresource: "status"}}, }) // Nothing stuck in the pipe. @@ -477,7 +479,7 @@ func TestStaticPodStatus(t *testing.T) { kubetypes.ConfigSourceAnnotationKey: "api", kubetypes.ConfigMirrorAnnotationKey: "mirror", } - client := testclient.NewSimpleFake(mirrorPod) + client := fake.NewSimpleClientset(mirrorPod) m := newTestManager(client) m.podManager.AddPod(staticPod) m.podManager.AddPod(mirrorPod) @@ -497,11 +499,11 @@ func TestStaticPodStatus(t *testing.T) { assert.True(t, isStatusEqual(&status, &retrievedStatus), "Expected: %+v, Got: %+v", status, retrievedStatus) // Should translate mirrorPod / staticPod UID. m.testSyncBatch() - verifyActions(t, m.kubeClient, []testclient.Action{ - testclient.GetActionImpl{ActionImpl: testclient.ActionImpl{Verb: "get", Resource: "pods"}}, - testclient.UpdateActionImpl{ActionImpl: testclient.ActionImpl{Verb: "update", Resource: "pods", Subresource: "status"}}, + verifyActions(t, m.kubeClient, []core.Action{ + core.GetActionImpl{ActionImpl: core.ActionImpl{Verb: "get", Resource: "pods"}}, + core.UpdateActionImpl{ActionImpl: core.ActionImpl{Verb: "update", Resource: "pods", Subresource: "status"}}, }) - updateAction := client.Actions()[1].(testclient.UpdateActionImpl) + updateAction := client.Actions()[1].(core.UpdateActionImpl) updatedPod := updateAction.Object.(*api.Pod) assert.Equal(t, mirrorPod.UID, updatedPod.UID, "Expected mirrorPod (%q), but got %q", mirrorPod.UID, updatedPod.UID) assert.True(t, isStatusEqual(&status, &updatedPod.Status), "Expected: %+v, Got: %+v", status, updatedPod.Status) @@ -509,7 +511,7 @@ func TestStaticPodStatus(t *testing.T) { // No changes. m.testSyncBatch() - verifyActions(t, m.kubeClient, []testclient.Action{}) + verifyActions(t, m.kubeClient, []core.Action{}) // Mirror pod identity changes. m.podManager.DeletePod(mirrorPod) @@ -518,11 +520,11 @@ func TestStaticPodStatus(t *testing.T) { m.podManager.AddPod(mirrorPod) // Expect update to new mirrorPod. m.testSyncBatch() - verifyActions(t, m.kubeClient, []testclient.Action{ - testclient.GetActionImpl{ActionImpl: testclient.ActionImpl{Verb: "get", Resource: "pods"}}, - testclient.UpdateActionImpl{ActionImpl: testclient.ActionImpl{Verb: "update", Resource: "pods", Subresource: "status"}}, + verifyActions(t, m.kubeClient, []core.Action{ + core.GetActionImpl{ActionImpl: core.ActionImpl{Verb: "get", Resource: "pods"}}, + core.UpdateActionImpl{ActionImpl: core.ActionImpl{Verb: "update", Resource: "pods", Subresource: "status"}}, }) - updateAction = client.Actions()[1].(testclient.UpdateActionImpl) + updateAction = client.Actions()[1].(core.UpdateActionImpl) updatedPod = updateAction.Object.(*api.Pod) assert.Equal(t, mirrorPod.UID, updatedPod.UID, "Expected mirrorPod (%q), but got %q", mirrorPod.UID, updatedPod.UID) assert.True(t, isStatusEqual(&status, &updatedPod.Status), "Expected: %+v, Got: %+v", status, updatedPod.Status) @@ -575,7 +577,7 @@ func TestSetContainerReadiness(t *testing.T) { } } - m := newTestManager(&testclient.Fake{}) + m := newTestManager(&fake.Clientset{}) t.Log("Setting readiness before status should fail.") m.SetContainerReadiness(pod, cID1, true) @@ -616,7 +618,7 @@ func TestSetContainerReadiness(t *testing.T) { } func TestSyncBatchCleanupVersions(t *testing.T) { - m := newTestManager(&testclient.Fake{}) + m := newTestManager(&fake.Clientset{}) testPod := getTestPod() mirrorPod := getTestPod() mirrorPod.UID = "mirror-uid" @@ -657,7 +659,7 @@ func TestSyncBatchCleanupVersions(t *testing.T) { func TestReconcilePodStatus(t *testing.T) { testPod := getTestPod() - client := testclient.NewSimpleFake(testPod) + client := fake.NewSimpleClientset(testPod) syncer := newTestManager(client) syncer.SetPodStatus(testPod, getRandomPodStatus()) // Call syncBatch directly to test reconcile @@ -677,7 +679,7 @@ func TestReconcilePodStatus(t *testing.T) { } client.ClearActions() syncer.syncBatch() - verifyActions(t, client, []testclient.Action{}) + verifyActions(t, client, []core.Action{}) // If the pod status is the same, only the timestamp is in Rfc3339 format (lower precision without nanosecond), // a reconciliation is not needed, syncBatch should do nothing. @@ -691,7 +693,7 @@ func TestReconcilePodStatus(t *testing.T) { } client.ClearActions() syncer.syncBatch() - verifyActions(t, client, []testclient.Action{}) + verifyActions(t, client, []core.Action{}) // If the pod status is different, a reconciliation is needed, syncBatch should trigger an update testPod.Status = getRandomPodStatus() @@ -701,9 +703,9 @@ func TestReconcilePodStatus(t *testing.T) { } client.ClearActions() syncer.syncBatch() - verifyActions(t, client, []testclient.Action{ - testclient.GetActionImpl{ActionImpl: testclient.ActionImpl{Verb: "get", Resource: "pods"}}, - testclient.UpdateActionImpl{ActionImpl: testclient.ActionImpl{Verb: "update", Resource: "pods", Subresource: "status"}}, + verifyActions(t, client, []core.Action{ + core.GetActionImpl{ActionImpl: core.ActionImpl{Verb: "get", Resource: "pods"}}, + core.UpdateActionImpl{ActionImpl: core.ActionImpl{Verb: "update", Resource: "pods", Subresource: "status"}}, }) } @@ -719,7 +721,7 @@ func TestDeletePods(t *testing.T) { pod := getTestPod() // Set the deletion timestamp. pod.DeletionTimestamp = new(unversioned.Time) - client := testclient.NewSimpleFake(pod) + client := fake.NewSimpleClientset(pod) m := newTestManager(client) m.podManager.AddPod(pod) @@ -730,10 +732,10 @@ func TestDeletePods(t *testing.T) { m.testSyncBatch() // Expect to see an delete action. - verifyActions(t, m.kubeClient, []testclient.Action{ - testclient.GetActionImpl{ActionImpl: testclient.ActionImpl{Verb: "get", Resource: "pods"}}, - testclient.UpdateActionImpl{ActionImpl: testclient.ActionImpl{Verb: "update", Resource: "pods", Subresource: "status"}}, - testclient.DeleteActionImpl{ActionImpl: testclient.ActionImpl{Verb: "delete", Resource: "pods"}}, + verifyActions(t, m.kubeClient, []core.Action{ + core.GetActionImpl{ActionImpl: core.ActionImpl{Verb: "get", Resource: "pods"}}, + core.UpdateActionImpl{ActionImpl: core.ActionImpl{Verb: "update", Resource: "pods", Subresource: "status"}}, + core.DeleteActionImpl{ActionImpl: core.ActionImpl{Verb: "delete", Resource: "pods"}}, }) } @@ -748,7 +750,7 @@ func TestDoNotDeleteMirrorPods(t *testing.T) { } // Set the deletion timestamp. mirrorPod.DeletionTimestamp = new(unversioned.Time) - client := testclient.NewSimpleFake(mirrorPod) + client := fake.NewSimpleClientset(mirrorPod) m := newTestManager(client) m.podManager.AddPod(staticPod) m.podManager.AddPod(mirrorPod) @@ -764,8 +766,8 @@ func TestDoNotDeleteMirrorPods(t *testing.T) { m.testSyncBatch() // Expect not to see an delete action. - verifyActions(t, m.kubeClient, []testclient.Action{ - testclient.GetActionImpl{ActionImpl: testclient.ActionImpl{Verb: "get", Resource: "pods"}}, - testclient.UpdateActionImpl{ActionImpl: testclient.ActionImpl{Verb: "update", Resource: "pods", Subresource: "status"}}, + verifyActions(t, m.kubeClient, []core.Action{ + core.GetActionImpl{ActionImpl: core.ActionImpl{Verb: "get", Resource: "pods"}}, + core.UpdateActionImpl{ActionImpl: core.ActionImpl{Verb: "update", Resource: "pods", Subresource: "status"}}, }) } diff --git a/pkg/kubelet/volumes.go b/pkg/kubelet/volumes.go index 2e395786996..c19854fbef7 100644 --- a/pkg/kubelet/volumes.go +++ b/pkg/kubelet/volumes.go @@ -55,7 +55,7 @@ func (vh *volumeHost) GetPodPluginDir(podUID types.UID, pluginName string) strin } func (vh *volumeHost) GetKubeClient() clientset.Interface { - return vh.kubelet.clientset + return vh.kubelet.kubeClient } func (vh *volumeHost) NewWrapperBuilder(volName string, spec volume.Spec, pod *api.Pod, opts volume.VolumeOptions) (volume.Builder, error) { diff --git a/pkg/kubemark/hollow_kubelet.go b/pkg/kubemark/hollow_kubelet.go index 21aa44a39ed..23c97301d00 100644 --- a/pkg/kubemark/hollow_kubelet.go +++ b/pkg/kubemark/hollow_kubelet.go @@ -21,7 +21,7 @@ import ( kubeletapp "k8s.io/kubernetes/cmd/kubelet/app" "k8s.io/kubernetes/pkg/api" - client "k8s.io/kubernetes/pkg/client/unversioned" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" "k8s.io/kubernetes/pkg/kubelet/cadvisor" "k8s.io/kubernetes/pkg/kubelet/cm" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" @@ -38,7 +38,7 @@ type HollowKubelet struct { func NewHollowKubelet( nodeName string, - client *client.Client, + client *clientset.Clientset, cadvisorInterface cadvisor.Interface, dockerClient dockertools.DockerInterface, kubeletPort, kubeletReadOnlyPort int, diff --git a/plugin/pkg/admission/admit/admission.go b/plugin/pkg/admission/admit/admission.go index 2df4e834899..3f74f1d4b2c 100644 --- a/plugin/pkg/admission/admit/admission.go +++ b/plugin/pkg/admission/admit/admission.go @@ -19,12 +19,13 @@ package admit import ( "io" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + "k8s.io/kubernetes/pkg/admission" - client "k8s.io/kubernetes/pkg/client/unversioned" ) func init() { - admission.RegisterPlugin("AlwaysAdmit", func(client client.Interface, config io.Reader) (admission.Interface, error) { + admission.RegisterPlugin("AlwaysAdmit", func(client clientset.Interface, config io.Reader) (admission.Interface, error) { return NewAlwaysAdmit(), nil }) } diff --git a/plugin/pkg/admission/alwayspullimages/admission.go b/plugin/pkg/admission/alwayspullimages/admission.go index 7702b155d31..9111162e6bd 100644 --- a/plugin/pkg/admission/alwayspullimages/admission.go +++ b/plugin/pkg/admission/alwayspullimages/admission.go @@ -27,14 +27,15 @@ package alwayspullimages import ( "io" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" apierrors "k8s.io/kubernetes/pkg/api/errors" - client "k8s.io/kubernetes/pkg/client/unversioned" ) func init() { - admission.RegisterPlugin("AlwaysPullImages", func(client client.Interface, config io.Reader) (admission.Interface, error) { + admission.RegisterPlugin("AlwaysPullImages", func(client clientset.Interface, config io.Reader) (admission.Interface, error) { return NewAlwaysPullImages(), nil }) } diff --git a/plugin/pkg/admission/deny/admission.go b/plugin/pkg/admission/deny/admission.go index 8dc70d7751e..e91f7065b5d 100644 --- a/plugin/pkg/admission/deny/admission.go +++ b/plugin/pkg/admission/deny/admission.go @@ -20,12 +20,13 @@ import ( "errors" "io" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + "k8s.io/kubernetes/pkg/admission" - client "k8s.io/kubernetes/pkg/client/unversioned" ) func init() { - admission.RegisterPlugin("AlwaysDeny", func(client client.Interface, config io.Reader) (admission.Interface, error) { + admission.RegisterPlugin("AlwaysDeny", func(client clientset.Interface, config io.Reader) (admission.Interface, error) { return NewAlwaysDeny(), nil }) } diff --git a/plugin/pkg/admission/exec/admission.go b/plugin/pkg/admission/exec/admission.go index 358dc37a397..d9f514dbffa 100644 --- a/plugin/pkg/admission/exec/admission.go +++ b/plugin/pkg/admission/exec/admission.go @@ -20,21 +20,22 @@ import ( "fmt" "io" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/rest" - client "k8s.io/kubernetes/pkg/client/unversioned" ) func init() { - admission.RegisterPlugin("DenyEscalatingExec", func(client client.Interface, config io.Reader) (admission.Interface, error) { + admission.RegisterPlugin("DenyEscalatingExec", func(client clientset.Interface, config io.Reader) (admission.Interface, error) { return NewDenyEscalatingExec(client), nil }) // This is for legacy support of the DenyExecOnPrivileged admission controller. Most // of the time DenyEscalatingExec should be preferred. - admission.RegisterPlugin("DenyExecOnPrivileged", func(client client.Interface, config io.Reader) (admission.Interface, error) { + admission.RegisterPlugin("DenyExecOnPrivileged", func(client clientset.Interface, config io.Reader) (admission.Interface, error) { return NewDenyExecOnPrivileged(client), nil }) } @@ -43,7 +44,7 @@ func init() { // a pod using host based configurations. type denyExec struct { *admission.Handler - client client.Interface + client clientset.Interface // these flags control which items will be checked to deny exec/attach hostIPC bool @@ -53,7 +54,7 @@ type denyExec struct { // NewDenyEscalatingExec creates a new admission controller that denies an exec operation on a pod // using host based configurations. -func NewDenyEscalatingExec(client client.Interface) admission.Interface { +func NewDenyEscalatingExec(client clientset.Interface) admission.Interface { return &denyExec{ Handler: admission.NewHandler(admission.Connect), client: client, @@ -66,7 +67,7 @@ func NewDenyEscalatingExec(client client.Interface) admission.Interface { // NewDenyExecOnPrivileged creates a new admission controller that is only checking the privileged // option. This is for legacy support of the DenyExecOnPrivileged admission controller. Most // of the time NewDenyEscalatingExec should be preferred. -func NewDenyExecOnPrivileged(client client.Interface) admission.Interface { +func NewDenyExecOnPrivileged(client clientset.Interface) admission.Interface { return &denyExec{ Handler: admission.NewHandler(admission.Connect), client: client, @@ -85,7 +86,7 @@ func (d *denyExec) Admit(a admission.Attributes) (err error) { if connectRequest.ResourcePath != "pods/exec" && connectRequest.ResourcePath != "pods/attach" { return nil } - pod, err := d.client.Pods(a.GetNamespace()).Get(connectRequest.Name) + pod, err := d.client.Legacy().Pods(a.GetNamespace()).Get(connectRequest.Name) if err != nil { return admission.NewForbidden(a, err) } diff --git a/plugin/pkg/admission/exec/admission_test.go b/plugin/pkg/admission/exec/admission_test.go index 389eb3faac4..ec9eb5b261b 100644 --- a/plugin/pkg/admission/exec/admission_test.go +++ b/plugin/pkg/admission/exec/admission_test.go @@ -22,6 +22,8 @@ import ( "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/rest" + "k8s.io/kubernetes/pkg/client/testing/core" + "k8s.io/kubernetes/pkg/client/testing/fake" "k8s.io/kubernetes/pkg/client/unversioned/testclient" "k8s.io/kubernetes/pkg/runtime" ) @@ -87,8 +89,8 @@ func TestAdmission(t *testing.T) { } func testAdmission(t *testing.T, pod *api.Pod, handler *denyExec, shouldAccept bool) { - mockClient := &testclient.Fake{} - mockClient.AddReactor("get", "pods", func(action testclient.Action) (bool, runtime.Object, error) { + mockClient := &fake.Clientset{} + mockClient.AddReactor("get", "pods", func(action core.Action) (bool, runtime.Object, error) { if action.(testclient.GetAction).GetName() == pod.Name { return true, pod, nil } diff --git a/plugin/pkg/admission/initialresources/admission.go b/plugin/pkg/admission/initialresources/admission.go index 3099c5a29e5..cfd43ba3cc9 100644 --- a/plugin/pkg/admission/initialresources/admission.go +++ b/plugin/pkg/admission/initialresources/admission.go @@ -23,12 +23,13 @@ import ( "strings" "time" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + "github.com/golang/glog" "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" apierrors "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/resource" - client "k8s.io/kubernetes/pkg/client/unversioned" ) var ( @@ -46,7 +47,7 @@ const ( // WARNING: this feature is experimental and will definitely change. func init() { - admission.RegisterPlugin("InitialResources", func(client client.Interface, config io.Reader) (admission.Interface, error) { + admission.RegisterPlugin("InitialResources", func(client clientset.Interface, config io.Reader) (admission.Interface, error) { s, err := newDataSource(*source) if err != nil { return nil, err diff --git a/plugin/pkg/admission/limitranger/admission.go b/plugin/pkg/admission/limitranger/admission.go index 775d75cf0e0..ebaa4c1c21c 100644 --- a/plugin/pkg/admission/limitranger/admission.go +++ b/plugin/pkg/admission/limitranger/admission.go @@ -22,12 +22,13 @@ import ( "sort" "strings" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/meta" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/client/cache" - client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/runtime" utilerrors "k8s.io/kubernetes/pkg/util/errors" "k8s.io/kubernetes/pkg/watch" @@ -38,7 +39,7 @@ const ( ) func init() { - admission.RegisterPlugin("LimitRanger", func(client client.Interface, config io.Reader) (admission.Interface, error) { + admission.RegisterPlugin("LimitRanger", func(client clientset.Interface, config io.Reader) (admission.Interface, error) { return NewLimitRanger(client, Limit), nil }) } @@ -46,7 +47,7 @@ func init() { // limitRanger enforces usage limits on a per resource basis in the namespace type limitRanger struct { *admission.Handler - client client.Interface + client clientset.Interface limitFunc LimitFunc indexer cache.Indexer } @@ -94,13 +95,13 @@ func (l *limitRanger) Admit(a admission.Attributes) (err error) { } // NewLimitRanger returns an object that enforces limits based on the supplied limit function -func NewLimitRanger(client client.Interface, limitFunc LimitFunc) admission.Interface { +func NewLimitRanger(client clientset.Interface, limitFunc LimitFunc) admission.Interface { lw := &cache.ListWatch{ ListFunc: func(options api.ListOptions) (runtime.Object, error) { - return client.LimitRanges(api.NamespaceAll).List(options) + return client.Legacy().LimitRanges(api.NamespaceAll).List(options) }, WatchFunc: func(options api.ListOptions) (watch.Interface, error) { - return client.LimitRanges(api.NamespaceAll).Watch(options) + return client.Legacy().LimitRanges(api.NamespaceAll).Watch(options) }, } indexer, reflector := cache.NewNamespaceKeyedIndexerAndReflector(lw, &api.LimitRange{}, 0) diff --git a/plugin/pkg/admission/limitranger/admission_test.go b/plugin/pkg/admission/limitranger/admission_test.go index 28b33305ada..f777410460e 100644 --- a/plugin/pkg/admission/limitranger/admission_test.go +++ b/plugin/pkg/admission/limitranger/admission_test.go @@ -24,7 +24,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/client/cache" - "k8s.io/kubernetes/pkg/client/unversioned/testclient" + "k8s.io/kubernetes/pkg/client/testing/fake" ) func getResourceList(cpu, memory string) api.ResourceList { @@ -429,7 +429,7 @@ func TestPodLimitFuncApplyDefault(t *testing.T) { } func TestLimitRangerIgnoresSubresource(t *testing.T) { - client := testclient.NewSimpleFake() + client := fake.NewSimpleClientset() indexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{"namespace": cache.MetaNamespaceIndexFunc}) handler := &limitRanger{ Handler: admission.NewHandler(admission.Create, admission.Update), diff --git a/plugin/pkg/admission/namespace/autoprovision/admission.go b/plugin/pkg/admission/namespace/autoprovision/admission.go index df79f37735d..779b4baae4f 100644 --- a/plugin/pkg/admission/namespace/autoprovision/admission.go +++ b/plugin/pkg/admission/namespace/autoprovision/admission.go @@ -19,17 +19,18 @@ package autoprovision import ( "io" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/client/cache" - client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/runtime" "k8s.io/kubernetes/pkg/watch" ) func init() { - admission.RegisterPlugin("NamespaceAutoProvision", func(client client.Interface, config io.Reader) (admission.Interface, error) { + admission.RegisterPlugin("NamespaceAutoProvision", func(client clientset.Interface, config io.Reader) (admission.Interface, error) { return NewProvision(client), nil }) } @@ -39,7 +40,7 @@ func init() { // It is useful in deployments that do not want to restrict creation of a namespace prior to its usage. type provision struct { *admission.Handler - client client.Interface + client clientset.Interface store cache.Store } @@ -65,7 +66,7 @@ func (p *provision) Admit(a admission.Attributes) (err error) { if exists { return nil } - _, err = p.client.Namespaces().Create(namespace) + _, err = p.client.Legacy().Namespaces().Create(namespace) if err != nil && !errors.IsAlreadyExists(err) { return admission.NewForbidden(a, err) } @@ -73,15 +74,15 @@ func (p *provision) Admit(a admission.Attributes) (err error) { } // NewProvision creates a new namespace provision admission control handler -func NewProvision(c client.Interface) admission.Interface { +func NewProvision(c clientset.Interface) admission.Interface { store := cache.NewStore(cache.MetaNamespaceKeyFunc) reflector := cache.NewReflector( &cache.ListWatch{ ListFunc: func(options api.ListOptions) (runtime.Object, error) { - return c.Namespaces().List(options) + return c.Legacy().Namespaces().List(options) }, WatchFunc: func(options api.ListOptions) (watch.Interface, error) { - return c.Namespaces().Watch(options) + return c.Legacy().Namespaces().Watch(options) }, }, &api.Namespace{}, @@ -92,7 +93,7 @@ func NewProvision(c client.Interface) admission.Interface { return createProvision(c, store) } -func createProvision(c client.Interface, store cache.Store) admission.Interface { +func createProvision(c clientset.Interface, store cache.Store) admission.Interface { return &provision{ Handler: admission.NewHandler(admission.Create), client: c, diff --git a/plugin/pkg/admission/namespace/autoprovision/admission_test.go b/plugin/pkg/admission/namespace/autoprovision/admission_test.go index 5fbaabe84ce..37d90695d0d 100644 --- a/plugin/pkg/admission/namespace/autoprovision/admission_test.go +++ b/plugin/pkg/admission/namespace/autoprovision/admission_test.go @@ -23,14 +23,15 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/client/cache" - "k8s.io/kubernetes/pkg/client/unversioned/testclient" + "k8s.io/kubernetes/pkg/client/testing/core" + "k8s.io/kubernetes/pkg/client/testing/fake" "k8s.io/kubernetes/pkg/runtime" ) // TestAdmission verifies a namespace is created on create requests for namespace managed resources func TestAdmission(t *testing.T) { namespace := "test" - mockClient := &testclient.Fake{} + mockClient := &fake.Clientset{} handler := &provision{ client: mockClient, store: cache.NewStore(cache.MetaNamespaceKeyFunc), @@ -58,7 +59,7 @@ func TestAdmission(t *testing.T) { // TestAdmissionNamespaceExists verifies that no client call is made when a namespace already exists func TestAdmissionNamespaceExists(t *testing.T) { namespace := "test" - mockClient := &testclient.Fake{} + mockClient := &fake.Clientset{} store := cache.NewStore(cache.MetaNamespaceKeyFunc) store.Add(&api.Namespace{ ObjectMeta: api.ObjectMeta{Name: namespace}, @@ -86,7 +87,7 @@ func TestAdmissionNamespaceExists(t *testing.T) { // TestIgnoreAdmission validates that a request is ignored if its not a create func TestIgnoreAdmission(t *testing.T) { namespace := "test" - mockClient := &testclient.Fake{} + mockClient := &fake.Clientset{} handler := admission.NewChainHandler(createProvision(mockClient, nil)) pod := api.Pod{ ObjectMeta: api.ObjectMeta{Name: "123", Namespace: namespace}, @@ -107,8 +108,8 @@ func TestIgnoreAdmission(t *testing.T) { // TestAdmissionNamespaceExistsUnknownToHandler func TestAdmissionNamespaceExistsUnknownToHandler(t *testing.T) { namespace := "test" - mockClient := &testclient.Fake{} - mockClient.AddReactor("create", "namespaces", func(action testclient.Action) (bool, runtime.Object, error) { + mockClient := &fake.Clientset{} + mockClient.AddReactor("create", "namespaces", func(action core.Action) (bool, runtime.Object, error) { return true, nil, errors.NewAlreadyExists(api.Resource("namespaces"), namespace) }) diff --git a/plugin/pkg/admission/namespace/exists/admission.go b/plugin/pkg/admission/namespace/exists/admission.go index 2f3ffe5f280..183461e8edb 100644 --- a/plugin/pkg/admission/namespace/exists/admission.go +++ b/plugin/pkg/admission/namespace/exists/admission.go @@ -20,17 +20,18 @@ import ( "io" "time" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/client/cache" - client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/runtime" "k8s.io/kubernetes/pkg/watch" ) func init() { - admission.RegisterPlugin("NamespaceExists", func(client client.Interface, config io.Reader) (admission.Interface, error) { + admission.RegisterPlugin("NamespaceExists", func(client clientset.Interface, config io.Reader) (admission.Interface, error) { return NewExists(client), nil }) } @@ -40,7 +41,7 @@ func init() { // It is useful in deployments that want to enforce pre-declaration of a Namespace resource. type exists struct { *admission.Handler - client client.Interface + client clientset.Interface store cache.Store } @@ -68,7 +69,7 @@ func (e *exists) Admit(a admission.Attributes) (err error) { } // in case of latency in our caches, make a call direct to storage to verify that it truly exists or not - _, err = e.client.Namespaces().Get(a.GetNamespace()) + _, err = e.client.Legacy().Namespaces().Get(a.GetNamespace()) if err != nil { if errors.IsNotFound(err) { return err @@ -80,15 +81,15 @@ func (e *exists) Admit(a admission.Attributes) (err error) { } // NewExists creates a new namespace exists admission control handler -func NewExists(c client.Interface) admission.Interface { +func NewExists(c clientset.Interface) admission.Interface { store := cache.NewStore(cache.MetaNamespaceKeyFunc) reflector := cache.NewReflector( &cache.ListWatch{ ListFunc: func(options api.ListOptions) (runtime.Object, error) { - return c.Namespaces().List(options) + return c.Legacy().Namespaces().List(options) }, WatchFunc: func(options api.ListOptions) (watch.Interface, error) { - return c.Namespaces().Watch(options) + return c.Legacy().Namespaces().Watch(options) }, }, &api.Namespace{}, diff --git a/plugin/pkg/admission/namespace/lifecycle/admission.go b/plugin/pkg/admission/namespace/lifecycle/admission.go index 514d35f46d2..add7c5aead1 100644 --- a/plugin/pkg/admission/namespace/lifecycle/admission.go +++ b/plugin/pkg/admission/namespace/lifecycle/admission.go @@ -21,18 +21,19 @@ import ( "io" "time" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/client/cache" - client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/runtime" "k8s.io/kubernetes/pkg/util/sets" "k8s.io/kubernetes/pkg/watch" ) func init() { - admission.RegisterPlugin("NamespaceLifecycle", func(client client.Interface, config io.Reader) (admission.Interface, error) { + admission.RegisterPlugin("NamespaceLifecycle", func(client clientset.Interface, config io.Reader) (admission.Interface, error) { return NewLifecycle(client), nil }) } @@ -41,7 +42,7 @@ func init() { // It enforces life-cycle constraints around a Namespace depending on its Phase type lifecycle struct { *admission.Handler - client client.Interface + client clientset.Interface store cache.Store immortalNamespaces sets.String } @@ -72,7 +73,7 @@ func (l *lifecycle) Admit(a admission.Attributes) (err error) { // refuse to operate on non-existent namespaces if !exists { // in case of latency in our caches, make a call direct to storage to verify that it truly exists or not - namespaceObj, err = l.client.Namespaces().Get(a.GetNamespace()) + namespaceObj, err = l.client.Legacy().Namespaces().Get(a.GetNamespace()) if err != nil { if errors.IsNotFound(err) { return err @@ -96,15 +97,15 @@ func (l *lifecycle) Admit(a admission.Attributes) (err error) { } // NewLifecycle creates a new namespace lifecycle admission control handler -func NewLifecycle(c client.Interface) admission.Interface { +func NewLifecycle(c clientset.Interface) admission.Interface { store := cache.NewStore(cache.MetaNamespaceKeyFunc) reflector := cache.NewReflector( &cache.ListWatch{ ListFunc: func(options api.ListOptions) (runtime.Object, error) { - return c.Namespaces().List(options) + return c.Legacy().Namespaces().List(options) }, WatchFunc: func(options api.ListOptions) (watch.Interface, error) { - return c.Namespaces().Watch(options) + return c.Legacy().Namespaces().Watch(options) }, }, &api.Namespace{}, diff --git a/plugin/pkg/admission/namespace/lifecycle/admission_test.go b/plugin/pkg/admission/namespace/lifecycle/admission_test.go index 56edee51a53..524694516a9 100644 --- a/plugin/pkg/admission/namespace/lifecycle/admission_test.go +++ b/plugin/pkg/admission/namespace/lifecycle/admission_test.go @@ -24,6 +24,8 @@ import ( "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" + "k8s.io/kubernetes/pkg/client/testing/core" + "k8s.io/kubernetes/pkg/client/testing/fake" "k8s.io/kubernetes/pkg/client/unversioned/testclient" "k8s.io/kubernetes/pkg/runtime" ) @@ -43,8 +45,8 @@ func TestAdmission(t *testing.T) { store := cache.NewStore(cache.MetaNamespaceKeyFunc) store.Add(namespaceObj) - mockClient := testclient.NewSimpleFake() - mockClient.PrependReactor("get", "namespaces", func(action testclient.Action) (bool, runtime.Object, error) { + mockClient := fake.NewSimpleClientset() + mockClient.PrependReactor("get", "namespaces", func(action core.Action) (bool, runtime.Object, error) { namespaceLock.RLock() defer namespaceLock.RUnlock() if getAction, ok := action.(testclient.GetAction); ok && getAction.GetName() == namespaceObj.Name { @@ -52,7 +54,7 @@ func TestAdmission(t *testing.T) { } return true, nil, fmt.Errorf("No result for action %v", action) }) - mockClient.PrependReactor("list", "namespaces", func(action testclient.Action) (bool, runtime.Object, error) { + mockClient.PrependReactor("list", "namespaces", func(action core.Action) (bool, runtime.Object, error) { namespaceLock.RLock() defer namespaceLock.RUnlock() return true, &api.NamespaceList{Items: []api.Namespace{*namespaceObj}}, nil diff --git a/plugin/pkg/admission/persistentvolume/label/admission.go b/plugin/pkg/admission/persistentvolume/label/admission.go index de1b9240236..9561bbfc25c 100644 --- a/plugin/pkg/admission/persistentvolume/label/admission.go +++ b/plugin/pkg/admission/persistentvolume/label/admission.go @@ -21,16 +21,17 @@ import ( "io" "sync" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" - client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/cloudprovider" "k8s.io/kubernetes/pkg/cloudprovider/providers/aws" "k8s.io/kubernetes/pkg/cloudprovider/providers/gce" ) func init() { - admission.RegisterPlugin("PersistentVolumeLabel", func(client client.Interface, config io.Reader) (admission.Interface, error) { + admission.RegisterPlugin("PersistentVolumeLabel", func(client clientset.Interface, config io.Reader) (admission.Interface, error) { persistentVolumeLabelAdmission := NewPersistentVolumeLabel() return persistentVolumeLabelAdmission, nil }) diff --git a/plugin/pkg/admission/resourcequota/admission.go b/plugin/pkg/admission/resourcequota/admission.go index 736819544e8..2062bb7766a 100644 --- a/plugin/pkg/admission/resourcequota/admission.go +++ b/plugin/pkg/admission/resourcequota/admission.go @@ -22,12 +22,13 @@ import ( "math/rand" "time" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/client/cache" - client "k8s.io/kubernetes/pkg/client/unversioned" resourcequotacontroller "k8s.io/kubernetes/pkg/controller/resourcequota" "k8s.io/kubernetes/pkg/runtime" utilerrors "k8s.io/kubernetes/pkg/util/errors" @@ -35,25 +36,25 @@ import ( ) func init() { - admission.RegisterPlugin("ResourceQuota", func(client client.Interface, config io.Reader) (admission.Interface, error) { + admission.RegisterPlugin("ResourceQuota", func(client clientset.Interface, config io.Reader) (admission.Interface, error) { return NewResourceQuota(client), nil }) } type quota struct { *admission.Handler - client client.Interface + client clientset.Interface indexer cache.Indexer } // NewResourceQuota creates a new resource quota admission control handler -func NewResourceQuota(client client.Interface) admission.Interface { +func NewResourceQuota(client clientset.Interface) admission.Interface { lw := &cache.ListWatch{ ListFunc: func(options api.ListOptions) (runtime.Object, error) { - return client.ResourceQuotas(api.NamespaceAll).List(options) + return client.Legacy().ResourceQuotas(api.NamespaceAll).List(options) }, WatchFunc: func(options api.ListOptions) (watch.Interface, error) { - return client.ResourceQuotas(api.NamespaceAll).Watch(options) + return client.Legacy().ResourceQuotas(api.NamespaceAll).Watch(options) }, } indexer, reflector := cache.NewNamespaceKeyedIndexerAndReflector(lw, &api.ResourceQuota{}, 0) @@ -61,7 +62,7 @@ func NewResourceQuota(client client.Interface) admission.Interface { return createResourceQuota(client, indexer) } -func createResourceQuota(client client.Interface, indexer cache.Indexer) admission.Interface { +func createResourceQuota(client clientset.Interface, indexer cache.Indexer) admission.Interface { return "a{ Handler: admission.NewHandler(admission.Create, admission.Update), client: client, @@ -142,7 +143,7 @@ func (q *quota) Admit(a admission.Attributes) (err error) { Annotations: quota.Annotations}, } usage.Status = *status - _, err = q.client.ResourceQuotas(usage.Namespace).UpdateStatus(&usage) + _, err = q.client.Legacy().ResourceQuotas(usage.Namespace).UpdateStatus(&usage) if err == nil { break } @@ -153,7 +154,7 @@ func (q *quota) Admit(a admission.Attributes) (err error) { } time.Sleep(interval) // manually get the latest quota - quota, err = q.client.ResourceQuotas(usage.Namespace).Get(quota.Name) + quota, err = q.client.Legacy().ResourceQuotas(usage.Namespace).Get(quota.Name) if err != nil { return admission.NewForbidden(a, err) } @@ -166,7 +167,7 @@ func (q *quota) Admit(a admission.Attributes) (err error) { // IncrementUsage updates the supplied ResourceQuotaStatus object based on the incoming operation // Return true if the usage must be recorded prior to admitting the new resource // Return an error if the operation should not pass admission control -func IncrementUsage(a admission.Attributes, status *api.ResourceQuotaStatus, client client.Interface) (bool, error) { +func IncrementUsage(a admission.Attributes, status *api.ResourceQuotaStatus, client clientset.Interface) (bool, error) { // on update, the only resource that can modify the value of a quota is pods // so if your not a pod, we exit quickly if a.GetOperation() == admission.Update && a.GetResource() != api.Resource("pods") { @@ -227,7 +228,7 @@ func IncrementUsage(a admission.Attributes, status *api.ResourceQuotaStatus, cli // if this operation is an update, we need to find the delta usage from the previous state if a.GetOperation() == admission.Update { - oldPod, err := client.Pods(a.GetNamespace()).Get(pod.Name) + oldPod, err := client.Legacy().Pods(a.GetNamespace()).Get(pod.Name) if err != nil { return false, err } diff --git a/plugin/pkg/admission/resourcequota/admission_test.go b/plugin/pkg/admission/resourcequota/admission_test.go index 71938211b2c..f831f37bcaa 100644 --- a/plugin/pkg/admission/resourcequota/admission_test.go +++ b/plugin/pkg/admission/resourcequota/admission_test.go @@ -25,7 +25,7 @@ import ( "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/client/cache" - "k8s.io/kubernetes/pkg/client/unversioned/testclient" + "k8s.io/kubernetes/pkg/client/testing/fake" resourcequotacontroller "k8s.io/kubernetes/pkg/controller/resourcequota" "k8s.io/kubernetes/pkg/runtime" ) @@ -65,7 +65,7 @@ func validPod(name string, numContainers int, resources api.ResourceRequirements func TestAdmissionIgnoresDelete(t *testing.T) { namespace := "default" - handler := createResourceQuota(&testclient.Fake{}, nil) + handler := createResourceQuota(&fake.Clientset{}, nil) err := handler.Admit(admission.NewAttributesRecord(nil, api.Kind("Pod"), namespace, "name", api.Resource("pods"), "", admission.Delete, nil)) if err != nil { t.Errorf("ResourceQuota should admit all deletes: %v", err) @@ -74,7 +74,7 @@ func TestAdmissionIgnoresDelete(t *testing.T) { func TestAdmissionIgnoresSubresources(t *testing.T) { indexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{"namespace": cache.MetaNamespaceIndexFunc}) - handler := createResourceQuota(&testclient.Fake{}, indexer) + handler := createResourceQuota(&fake.Clientset{}, indexer) quota := &api.ResourceQuota{} quota.Name = "quota" @@ -173,7 +173,7 @@ func TestIncrementUsagePodResources(t *testing.T) { } for _, item := range testCases { podList := &api.PodList{Items: []api.Pod{*item.existing}} - client := testclient.NewSimpleFake(podList) + client := fake.NewSimpleClientset(podList) status := &api.ResourceQuotaStatus{ Hard: api.ResourceList{}, Used: api.ResourceList{}, @@ -207,7 +207,7 @@ func TestIncrementUsagePodResources(t *testing.T) { func TestIncrementUsagePods(t *testing.T) { pod := validPod("123", 1, getResourceRequirements(getResourceList("100m", "1Gi"), getResourceList("", ""))) podList := &api.PodList{Items: []api.Pod{*pod}} - client := testclient.NewSimpleFake(podList) + client := fake.NewSimpleClientset(podList) status := &api.ResourceQuotaStatus{ Hard: api.ResourceList{}, Used: api.ResourceList{}, @@ -231,7 +231,7 @@ func TestIncrementUsagePods(t *testing.T) { func TestExceedUsagePods(t *testing.T) { pod := validPod("123", 1, getResourceRequirements(getResourceList("100m", "1Gi"), getResourceList("", ""))) podList := &api.PodList{Items: []api.Pod{*pod}} - client := testclient.NewSimpleFake(podList) + client := fake.NewSimpleClientset(podList) status := &api.ResourceQuotaStatus{ Hard: api.ResourceList{}, Used: api.ResourceList{}, @@ -247,7 +247,7 @@ func TestExceedUsagePods(t *testing.T) { func TestIncrementUsageServices(t *testing.T) { namespace := "default" - client := testclient.NewSimpleFake(&api.ServiceList{ + client := fake.NewSimpleClientset(&api.ServiceList{ Items: []api.Service{ { ObjectMeta: api.ObjectMeta{Name: "123", Namespace: namespace}, @@ -276,7 +276,7 @@ func TestIncrementUsageServices(t *testing.T) { func TestExceedUsageServices(t *testing.T) { namespace := "default" - client := testclient.NewSimpleFake(&api.ServiceList{ + client := fake.NewSimpleClientset(&api.ServiceList{ Items: []api.Service{ { ObjectMeta: api.ObjectMeta{Name: "123", Namespace: namespace}, @@ -298,7 +298,7 @@ func TestExceedUsageServices(t *testing.T) { func TestIncrementUsageReplicationControllers(t *testing.T) { namespace := "default" - client := testclient.NewSimpleFake(&api.ReplicationControllerList{ + client := fake.NewSimpleClientset(&api.ReplicationControllerList{ Items: []api.ReplicationController{ { ObjectMeta: api.ObjectMeta{Name: "123", Namespace: namespace}, @@ -327,7 +327,7 @@ func TestIncrementUsageReplicationControllers(t *testing.T) { func TestExceedUsageReplicationControllers(t *testing.T) { namespace := "default" - client := testclient.NewSimpleFake(&api.ReplicationControllerList{ + client := fake.NewSimpleClientset(&api.ReplicationControllerList{ Items: []api.ReplicationController{ { ObjectMeta: api.ObjectMeta{Name: "123", Namespace: namespace}, @@ -349,7 +349,7 @@ func TestExceedUsageReplicationControllers(t *testing.T) { func TestExceedUsageSecrets(t *testing.T) { namespace := "default" - client := testclient.NewSimpleFake(&api.SecretList{ + client := fake.NewSimpleClientset(&api.SecretList{ Items: []api.Secret{ { ObjectMeta: api.ObjectMeta{Name: "123", Namespace: namespace}, @@ -371,7 +371,7 @@ func TestExceedUsageSecrets(t *testing.T) { func TestExceedUsagePersistentVolumeClaims(t *testing.T) { namespace := "default" - client := testclient.NewSimpleFake(&api.PersistentVolumeClaimList{ + client := fake.NewSimpleClientset(&api.PersistentVolumeClaimList{ Items: []api.PersistentVolumeClaim{ { ObjectMeta: api.ObjectMeta{Name: "123", Namespace: namespace}, @@ -426,7 +426,7 @@ func TestIncrementUsageOnUpdateIgnoresNonPodResources(t *testing.T) { } for _, testCase := range testCase { - client := testclient.NewSimpleFake() + client := fake.NewSimpleClientset() status := &api.ResourceQuotaStatus{ Hard: api.ResourceList{}, Used: api.ResourceList{}, diff --git a/plugin/pkg/admission/securitycontext/scdeny/admission.go b/plugin/pkg/admission/securitycontext/scdeny/admission.go index 44b83b2f115..d60348b6742 100644 --- a/plugin/pkg/admission/securitycontext/scdeny/admission.go +++ b/plugin/pkg/admission/securitycontext/scdeny/admission.go @@ -20,14 +20,15 @@ import ( "fmt" "io" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" apierrors "k8s.io/kubernetes/pkg/api/errors" - client "k8s.io/kubernetes/pkg/client/unversioned" ) func init() { - admission.RegisterPlugin("SecurityContextDeny", func(client client.Interface, config io.Reader) (admission.Interface, error) { + admission.RegisterPlugin("SecurityContextDeny", func(client clientset.Interface, config io.Reader) (admission.Interface, error) { return NewSecurityContextDeny(client), nil }) } @@ -35,11 +36,11 @@ func init() { // plugin contains the client used by the SecurityContextDeny admission controller type plugin struct { *admission.Handler - client client.Interface + client clientset.Interface } // NewSecurityContextDeny creates a new instance of the SecurityContextDeny admission controller -func NewSecurityContextDeny(client client.Interface) admission.Interface { +func NewSecurityContextDeny(client clientset.Interface) admission.Interface { return &plugin{ Handler: admission.NewHandler(admission.Create, admission.Update), client: client, diff --git a/plugin/pkg/admission/serviceaccount/admission.go b/plugin/pkg/admission/serviceaccount/admission.go index 554769dda40..47a3e11b886 100644 --- a/plugin/pkg/admission/serviceaccount/admission.go +++ b/plugin/pkg/admission/serviceaccount/admission.go @@ -23,6 +23,8 @@ import ( "strconv" "time" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" @@ -51,7 +53,7 @@ const DefaultAPITokenMountPath = "/var/run/secrets/kubernetes.io/serviceaccount" const PluginName = "ServiceAccount" func init() { - admission.RegisterPlugin(PluginName, func(client client.Interface, config io.Reader) (admission.Interface, error) { + admission.RegisterPlugin(PluginName, func(client clientset.Interface, config io.Reader) (admission.Interface, error) { serviceAccountAdmission := NewServiceAccount(client) serviceAccountAdmission.Run() return serviceAccountAdmission, nil @@ -70,7 +72,7 @@ type serviceAccount struct { // MountServiceAccountToken creates Volume and VolumeMounts for the first referenced ServiceAccountToken for the pod's service account MountServiceAccountToken bool - client client.Interface + client clientset.Interface serviceAccounts cache.Indexer secrets cache.Indexer @@ -86,14 +88,14 @@ type serviceAccount struct { // 3. If LimitSecretReferences is true, it rejects the pod if the pod references Secret objects which the pod's ServiceAccount does not reference // 4. If the pod does not contain any ImagePullSecrets, the ImagePullSecrets of the service account are added. // 5. If MountServiceAccountToken is true, it adds a VolumeMount with the pod's ServiceAccount's api token secret to containers -func NewServiceAccount(cl client.Interface) *serviceAccount { +func NewServiceAccount(cl clientset.Interface) *serviceAccount { serviceAccountsIndexer, serviceAccountsReflector := cache.NewNamespaceKeyedIndexerAndReflector( &cache.ListWatch{ ListFunc: func(options api.ListOptions) (runtime.Object, error) { - return cl.ServiceAccounts(api.NamespaceAll).List(options) + return cl.Legacy().ServiceAccounts(api.NamespaceAll).List(options) }, WatchFunc: func(options api.ListOptions) (watch.Interface, error) { - return cl.ServiceAccounts(api.NamespaceAll).Watch(options) + return cl.Legacy().ServiceAccounts(api.NamespaceAll).Watch(options) }, }, &api.ServiceAccount{}, @@ -105,11 +107,11 @@ func NewServiceAccount(cl client.Interface) *serviceAccount { &cache.ListWatch{ ListFunc: func(options api.ListOptions) (runtime.Object, error) { options.FieldSelector = tokenSelector - return cl.Secrets(api.NamespaceAll).List(options) + return cl.Legacy().Secrets(api.NamespaceAll).List(options) }, WatchFunc: func(options api.ListOptions) (watch.Interface, error) { options.FieldSelector = tokenSelector - return cl.Secrets(api.NamespaceAll).Watch(options) + return cl.Legacy().Secrets(api.NamespaceAll).Watch(options) }, }, &api.Secret{}, @@ -251,7 +253,7 @@ func (s *serviceAccount) getServiceAccount(namespace string, name string) (*api. if i != 0 { time.Sleep(retryInterval) } - serviceAccount, err := s.client.ServiceAccounts(namespace).Get(name) + serviceAccount, err := s.client.Legacy().ServiceAccounts(namespace).Get(name) if err == nil { return serviceAccount, nil } diff --git a/plugin/pkg/admission/serviceaccount/admission_test.go b/plugin/pkg/admission/serviceaccount/admission_test.go index 750d555e66a..59b42cf0100 100644 --- a/plugin/pkg/admission/serviceaccount/admission_test.go +++ b/plugin/pkg/admission/serviceaccount/admission_test.go @@ -22,7 +22,7 @@ import ( "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/unversioned/testclient" + "k8s.io/kubernetes/pkg/client/testing/fake" kubelet "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/types" ) @@ -176,7 +176,7 @@ func TestFetchesUncachedServiceAccount(t *testing.T) { ns := "myns" // Build a test client that the admission plugin can use to look up the service account missing from its cache - client := testclient.NewSimpleFake(&api.ServiceAccount{ + client := fake.NewSimpleClientset(&api.ServiceAccount{ ObjectMeta: api.ObjectMeta{ Name: DefaultServiceAccountName, Namespace: ns, @@ -201,7 +201,7 @@ func TestDeniesInvalidServiceAccount(t *testing.T) { ns := "myns" // Build a test client that the admission plugin can use to look up the service account missing from its cache - client := testclient.NewSimpleFake() + client := fake.NewSimpleClientset() admit := NewServiceAccount(client) diff --git a/test/integration/service_account_test.go b/test/integration/service_account_test.go index 54150d45f9a..7f93ef21fc1 100644 --- a/test/integration/service_account_test.go +++ b/test/integration/service_account_test.go @@ -69,7 +69,7 @@ func TestServiceAccountAutoCreate(t *testing.T) { ns := "test-service-account-creation" // Create namespace - _, err := c.Namespaces().Create(&api.Namespace{ObjectMeta: api.ObjectMeta{Name: ns}}) + _, err := c.Legacy().Namespaces().Create(&api.Namespace{ObjectMeta: api.ObjectMeta{Name: ns}}) if err != nil { t.Fatalf("could not create namespace: %v", err) } @@ -81,7 +81,7 @@ func TestServiceAccountAutoCreate(t *testing.T) { } // Delete service account - err = c.ServiceAccounts(ns).Delete(defaultUser.Name) + err = c.Legacy().ServiceAccounts(ns).Delete(defaultUser.Name, nil) if err != nil { t.Fatalf("Could not delete default serviceaccount: %v", err) } @@ -104,13 +104,13 @@ func TestServiceAccountTokenAutoCreate(t *testing.T) { name := "my-service-account" // Create namespace - _, err := c.Namespaces().Create(&api.Namespace{ObjectMeta: api.ObjectMeta{Name: ns}}) + _, err := c.Legacy().Namespaces().Create(&api.Namespace{ObjectMeta: api.ObjectMeta{Name: ns}}) if err != nil { t.Fatalf("could not create namespace: %v", err) } // Create service account - serviceAccount, err := c.ServiceAccounts(ns).Create(&api.ServiceAccount{ObjectMeta: api.ObjectMeta{Name: name}}) + serviceAccount, err := c.Legacy().ServiceAccounts(ns).Create(&api.ServiceAccount{ObjectMeta: api.ObjectMeta{Name: name}}) if err != nil { t.Fatalf("Service Account not created: %v", err) } @@ -122,7 +122,7 @@ func TestServiceAccountTokenAutoCreate(t *testing.T) { } // Delete token - err = c.Secrets(ns).Delete(token1Name) + err = c.Legacy().Secrets(ns).Delete(token1Name, nil) if err != nil { t.Fatalf("Could not delete token: %v", err) } @@ -140,12 +140,12 @@ func TestServiceAccountTokenAutoCreate(t *testing.T) { } // Trigger creation of a new referenced token - serviceAccount, err = c.ServiceAccounts(ns).Get(name) + serviceAccount, err = c.Legacy().ServiceAccounts(ns).Get(name) if err != nil { t.Fatal(err) } serviceAccount.Secrets = []api.ObjectReference{} - _, err = c.ServiceAccounts(ns).Update(serviceAccount) + _, err = c.Legacy().ServiceAccounts(ns).Update(serviceAccount) if err != nil { t.Fatal(err) } @@ -163,7 +163,7 @@ func TestServiceAccountTokenAutoCreate(t *testing.T) { } // Delete service account - err = c.ServiceAccounts(ns).Delete(name) + err = c.Legacy().ServiceAccounts(ns).Delete(name, nil) if err != nil { t.Fatal(err) } @@ -172,7 +172,7 @@ func TestServiceAccountTokenAutoCreate(t *testing.T) { tokensToCleanup := sets.NewString(token1Name, token2Name, token3Name) err = wait.Poll(time.Second, 10*time.Second, func() (bool, error) { // Get all secrets in the namespace - secrets, err := c.Secrets(ns).List(api.ListOptions{}) + secrets, err := c.Legacy().Secrets(ns).List(api.ListOptions{}) // Retrieval errors should fail if err != nil { return false, err @@ -198,7 +198,7 @@ func TestServiceAccountTokenAutoMount(t *testing.T) { ns := "auto-mount-ns" // Create "my" namespace - _, err := c.Namespaces().Create(&api.Namespace{ObjectMeta: api.ObjectMeta{Name: ns}}) + _, err := c.Legacy().Namespaces().Create(&api.Namespace{ObjectMeta: api.ObjectMeta{Name: ns}}) if err != nil && !errors.IsAlreadyExists(err) { t.Fatalf("could not create namespace: %v", err) } @@ -250,7 +250,7 @@ func TestServiceAccountTokenAutoMount(t *testing.T) { } expectedContainer2VolumeMounts := protoPod.Spec.Containers[1].VolumeMounts - createdPod, err := c.Pods(ns).Create(&protoPod) + createdPod, err := c.Legacy().Pods(ns).Create(&protoPod) if err != nil { t.Fatal(err) } @@ -276,19 +276,19 @@ func TestServiceAccountTokenAuthentication(t *testing.T) { otherns := "other-ns" // Create "my" namespace - _, err := c.Namespaces().Create(&api.Namespace{ObjectMeta: api.ObjectMeta{Name: myns}}) + _, err := c.Legacy().Namespaces().Create(&api.Namespace{ObjectMeta: api.ObjectMeta{Name: myns}}) if err != nil && !errors.IsAlreadyExists(err) { t.Fatalf("could not create namespace: %v", err) } // Create "other" namespace - _, err = c.Namespaces().Create(&api.Namespace{ObjectMeta: api.ObjectMeta{Name: otherns}}) + _, err = c.Legacy().Namespaces().Create(&api.Namespace{ObjectMeta: api.ObjectMeta{Name: otherns}}) if err != nil && !errors.IsAlreadyExists(err) { t.Fatalf("could not create namespace: %v", err) } // Create "ro" user in myns - _, err = c.ServiceAccounts(myns).Create(&api.ServiceAccount{ObjectMeta: api.ObjectMeta{Name: readOnlyServiceAccountName}}) + _, err = c.Legacy().ServiceAccounts(myns).Create(&api.ServiceAccount{ObjectMeta: api.ObjectMeta{Name: readOnlyServiceAccountName}}) if err != nil { t.Fatalf("Service Account not created: %v", err) } @@ -298,17 +298,17 @@ func TestServiceAccountTokenAuthentication(t *testing.T) { } roClientConfig := config roClientConfig.BearerToken = roToken - roClient := client.NewOrDie(&roClientConfig) + roClient := clientset.NewForConfigOrDie(&roClientConfig) doServiceAccountAPIRequests(t, roClient, myns, true, true, false) doServiceAccountAPIRequests(t, roClient, otherns, true, false, false) - err = c.Secrets(myns).Delete(roTokenName) + err = c.Legacy().Secrets(myns).Delete(roTokenName, nil) if err != nil { t.Fatalf("could not delete token: %v", err) } doServiceAccountAPIRequests(t, roClient, myns, false, false, false) // Create "rw" user in myns - _, err = c.ServiceAccounts(myns).Create(&api.ServiceAccount{ObjectMeta: api.ObjectMeta{Name: readWriteServiceAccountName}}) + _, err = c.Legacy().ServiceAccounts(myns).Create(&api.ServiceAccount{ObjectMeta: api.ObjectMeta{Name: readWriteServiceAccountName}}) if err != nil { t.Fatalf("Service Account not created: %v", err) } @@ -318,7 +318,7 @@ func TestServiceAccountTokenAuthentication(t *testing.T) { } rwClientConfig := config rwClientConfig.BearerToken = rwToken - rwClient := client.NewOrDie(&rwClientConfig) + rwClient := clientset.NewForConfigOrDie(&rwClientConfig) doServiceAccountAPIRequests(t, rwClient, myns, true, true, true) doServiceAccountAPIRequests(t, rwClient, otherns, true, false, false) @@ -329,13 +329,13 @@ func TestServiceAccountTokenAuthentication(t *testing.T) { } defaultClientConfig := config defaultClientConfig.BearerToken = defaultToken - defaultClient := client.NewOrDie(&defaultClientConfig) + defaultClient := clientset.NewForConfigOrDie(&defaultClientConfig) doServiceAccountAPIRequests(t, defaultClient, myns, true, false, false) } // startServiceAccountTestServer returns a started server // It is the responsibility of the caller to ensure the returned stopFunc is called -func startServiceAccountTestServer(t *testing.T) (*client.Client, client.Config, func()) { +func startServiceAccountTestServer(t *testing.T) (*clientset.Clientset, client.Config, func()) { deleteAllEtcdKeys() @@ -349,8 +349,7 @@ func startServiceAccountTestServer(t *testing.T) (*client.Client, client.Config, clientConfig := client.Config{Host: apiServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}} // Root client // TODO: remove rootClient after we refactor pkg/admission to use the clientset. - rootClient := client.NewOrDie(&client.Config{Host: apiServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}, BearerToken: rootToken}) - rootClientset := clientset.FromUnversionedClient(rootClient) + rootClientset := clientset.NewForConfigOrDie(&client.Config{Host: apiServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}, BearerToken: rootToken}) // Set up two authenticators: // 1. A token authenticator that maps the rootToken to the "root" user // 2. A ServiceAccountToken authenticator that validates ServiceAccount tokens @@ -401,7 +400,7 @@ func startServiceAccountTestServer(t *testing.T) (*client.Client, client.Config, }) // Set up admission plugin to auto-assign serviceaccounts to pods - serviceAccountAdmission := serviceaccountadmission.NewServiceAccount(rootClient) + serviceAccountAdmission := serviceaccountadmission.NewServiceAccount(rootClientset) masterConfig := framework.NewMasterConfig() masterConfig.EnableIndex = true @@ -428,18 +427,18 @@ func startServiceAccountTestServer(t *testing.T) (*client.Client, client.Config, // apiServer.Close() } - return rootClient, clientConfig, stop + return rootClientset, clientConfig, stop } -func getServiceAccount(c *client.Client, ns string, name string, shouldWait bool) (*api.ServiceAccount, error) { +func getServiceAccount(c *clientset.Clientset, ns string, name string, shouldWait bool) (*api.ServiceAccount, error) { if !shouldWait { - return c.ServiceAccounts(ns).Get(name) + return c.Legacy().ServiceAccounts(ns).Get(name) } var user *api.ServiceAccount var err error err = wait.Poll(time.Second, 10*time.Second, func() (bool, error) { - user, err = c.ServiceAccounts(ns).Get(name) + user, err = c.Legacy().ServiceAccounts(ns).Get(name) if errors.IsNotFound(err) { return false, nil } @@ -451,12 +450,12 @@ func getServiceAccount(c *client.Client, ns string, name string, shouldWait bool return user, err } -func getReferencedServiceAccountToken(c *client.Client, ns string, name string, shouldWait bool) (string, string, error) { +func getReferencedServiceAccountToken(c *clientset.Clientset, ns string, name string, shouldWait bool) (string, string, error) { tokenName := "" token := "" findToken := func() (bool, error) { - user, err := c.ServiceAccounts(ns).Get(name) + user, err := c.Legacy().ServiceAccounts(ns).Get(name) if errors.IsNotFound(err) { return false, nil } @@ -465,7 +464,7 @@ func getReferencedServiceAccountToken(c *client.Client, ns string, name string, } for _, ref := range user.Secrets { - secret, err := c.Secrets(ns).Get(ref.Name) + secret, err := c.Legacy().Secrets(ns).Get(ref.Name) if errors.IsNotFound(err) { continue } @@ -507,7 +506,7 @@ func getReferencedServiceAccountToken(c *client.Client, ns string, name string, type testOperation func() error -func doServiceAccountAPIRequests(t *testing.T, c *client.Client, ns string, authenticated bool, canRead bool, canWrite bool) { +func doServiceAccountAPIRequests(t *testing.T, c *clientset.Clientset, ns string, authenticated bool, canRead bool, canWrite bool) { testSecret := &api.Secret{ ObjectMeta: api.ObjectMeta{Name: "testSecret"}, Data: map[string][]byte{"test": []byte("data")}, @@ -515,17 +514,17 @@ func doServiceAccountAPIRequests(t *testing.T, c *client.Client, ns string, auth readOps := []testOperation{ func() error { - _, err := c.Secrets(ns).List(api.ListOptions{}) + _, err := c.Legacy().Secrets(ns).List(api.ListOptions{}) return err }, func() error { - _, err := c.Pods(ns).List(api.ListOptions{}) + _, err := c.Legacy().Pods(ns).List(api.ListOptions{}) return err }, } writeOps := []testOperation{ - func() error { _, err := c.Secrets(ns).Create(testSecret); return err }, - func() error { return c.Secrets(ns).Delete(testSecret.Name) }, + func() error { _, err := c.Legacy().Secrets(ns).Create(testSecret); return err }, + func() error { return c.Legacy().Secrets(ns).Delete(testSecret.Name, nil) }, } for _, op := range readOps { From fd5cbdf73f8feca90b49efc4f64024dc930f1d93 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Fri, 29 Jan 2016 14:56:37 -0800 Subject: [PATCH 083/328] Rename a couple things for obviousness --- test/e2e/cluster_upgrade.go | 2 +- test/e2e/rc.go | 2 +- test/e2e/service.go | 24 ++++++++++++------------ test/e2e/util.go | 12 +++++++----- 4 files changed, 21 insertions(+), 19 deletions(-) diff --git a/test/e2e/cluster_upgrade.go b/test/e2e/cluster_upgrade.go index 7338ff8baf3..27aff06490c 100644 --- a/test/e2e/cluster_upgrade.go +++ b/test/e2e/cluster_upgrade.go @@ -162,7 +162,7 @@ var _ = Describe("Upgrade [Feature:Upgrade]", func() { }) f := NewFramework("cluster-upgrade") - var w *ServerTest + var w *ServiceTestFixture BeforeEach(func() { By("Setting up the service, RC, and pods") w = NewServerTest(f.Client, f.Namespace.Name, svcName) diff --git a/test/e2e/rc.go b/test/e2e/rc.go index 0797e7f8e2b..4e408c144ea 100644 --- a/test/e2e/rc.go +++ b/test/e2e/rc.go @@ -112,7 +112,7 @@ func ServeImageOrFail(f *Framework, test string, image string) { By("Trying to dial each unique pod") retryTimeout := 2 * time.Minute retryInterval := 5 * time.Second - err = wait.Poll(retryInterval, retryTimeout, podResponseChecker{f.Client, f.Namespace.Name, label, name, true, pods}.checkAllResponses) + err = wait.Poll(retryInterval, retryTimeout, podProxyResponseChecker{f.Client, f.Namespace.Name, label, name, true, pods}.checkAllResponses) if err != nil { Failf("Did not get expected responses within the timeout period of %.2f seconds.", retryTimeout.Seconds()) } diff --git a/test/e2e/service.go b/test/e2e/service.go index db60705247f..d63e80da319 100644 --- a/test/e2e/service.go +++ b/test/e2e/service.go @@ -1503,7 +1503,7 @@ func httpGetNoConnectionPool(url string) (*http.Response, error) { } // Simple helper class to avoid too much boilerplate in tests -type ServerTest struct { +type ServiceTestFixture struct { ServiceName string Namespace string Client *client.Client @@ -1517,8 +1517,8 @@ type ServerTest struct { image string } -func NewServerTest(client *client.Client, namespace string, serviceName string) *ServerTest { - t := &ServerTest{} +func NewServerTest(client *client.Client, namespace string, serviceName string) *ServiceTestFixture { + t := &ServiceTestFixture{} t.Client = client t.Namespace = namespace t.ServiceName = serviceName @@ -1536,8 +1536,8 @@ func NewServerTest(client *client.Client, namespace string, serviceName string) return t } -func NewNetcatTest(client *client.Client, namespace string, serviceName string) *ServerTest { - t := &ServerTest{} +func NewNetcatTest(client *client.Client, namespace string, serviceName string) *ServiceTestFixture { + t := &ServiceTestFixture{} t.Client = client t.Namespace = namespace t.ServiceName = serviceName @@ -1556,7 +1556,7 @@ func NewNetcatTest(client *client.Client, namespace string, serviceName string) } // Build default config for a service (which can then be changed) -func (t *ServerTest) BuildServiceSpec() *api.Service { +func (t *ServiceTestFixture) BuildServiceSpec() *api.Service { service := &api.Service{ ObjectMeta: api.ObjectMeta{ Name: t.ServiceName, @@ -1575,7 +1575,7 @@ func (t *ServerTest) BuildServiceSpec() *api.Service { // CreateWebserverRC creates rc-backed pods with the well-known webserver // configuration and records it for cleanup. -func (t *ServerTest) CreateWebserverRC(replicas int) *api.ReplicationController { +func (t *ServiceTestFixture) CreateWebserverRC(replicas int) *api.ReplicationController { rcSpec := rcByNamePort(t.name, replicas, t.image, 80, api.ProtocolTCP, t.Labels) rcAct, err := t.createRC(rcSpec) if err != nil { @@ -1589,7 +1589,7 @@ func (t *ServerTest) CreateWebserverRC(replicas int) *api.ReplicationController // CreateNetcatRC creates rc-backed pods with a netcat listener // configuration and records it for cleanup. -func (t *ServerTest) CreateNetcatRC(replicas int) *api.ReplicationController { +func (t *ServiceTestFixture) CreateNetcatRC(replicas int) *api.ReplicationController { rcSpec := rcByNamePort(t.name, replicas, t.image, 80, api.ProtocolUDP, t.Labels) rcSpec.Spec.Template.Spec.Containers[0].Command = []string{"/bin/bash"} rcSpec.Spec.Template.Spec.Containers[0].Args = []string{"-c", "echo SUCCESS | nc -q 0 -u -l 0.0.0.0 80"} @@ -1604,7 +1604,7 @@ func (t *ServerTest) CreateNetcatRC(replicas int) *api.ReplicationController { } // createRC creates a replication controller and records it for cleanup. -func (t *ServerTest) createRC(rc *api.ReplicationController) (*api.ReplicationController, error) { +func (t *ServiceTestFixture) createRC(rc *api.ReplicationController) (*api.ReplicationController, error) { rc, err := t.Client.ReplicationControllers(t.Namespace).Create(rc) if err == nil { t.rcs[rc.Name] = true @@ -1613,7 +1613,7 @@ func (t *ServerTest) createRC(rc *api.ReplicationController) (*api.ReplicationCo } // Create a service, and record it for cleanup -func (t *ServerTest) CreateService(service *api.Service) (*api.Service, error) { +func (t *ServiceTestFixture) CreateService(service *api.Service) (*api.Service, error) { result, err := t.Client.Services(t.Namespace).Create(service) if err == nil { t.services[service.Name] = true @@ -1622,7 +1622,7 @@ func (t *ServerTest) CreateService(service *api.Service) (*api.Service, error) { } // Delete a service, and remove it from the cleanup list -func (t *ServerTest) DeleteService(serviceName string) error { +func (t *ServiceTestFixture) DeleteService(serviceName string) error { err := t.Client.Services(t.Namespace).Delete(serviceName) if err == nil { delete(t.services, serviceName) @@ -1630,7 +1630,7 @@ func (t *ServerTest) DeleteService(serviceName string) error { return err } -func (t *ServerTest) Cleanup() []error { +func (t *ServiceTestFixture) Cleanup() []error { var errs []error for rcName := range t.rcs { By("stopping RC " + rcName + " in namespace " + t.Namespace) diff --git a/test/e2e/util.go b/test/e2e/util.go index 65c8de9db47..ee5a4852495 100644 --- a/test/e2e/util.go +++ b/test/e2e/util.go @@ -946,8 +946,9 @@ func waitForEndpoint(c *client.Client, ns, name string) error { return fmt.Errorf("Failed to get entpoints for %s/%s", ns, name) } -// Context for checking pods responses by issuing GETs to them and verifying if the answer with pod name. -type podResponseChecker struct { +// Context for checking pods responses by issuing GETs to them (via the API +// proxy) and verifying that they answer with ther own pod name. +type podProxyResponseChecker struct { c *client.Client ns string label labels.Selector @@ -956,8 +957,9 @@ type podResponseChecker struct { pods *api.PodList } -// checkAllResponses issues GETs to all pods in the context and verify they reply with pod name. -func (r podResponseChecker) checkAllResponses() (done bool, err error) { +// checkAllResponses issues GETs to all pods in the context and verify they +// reply with their own pod name. +func (r podProxyResponseChecker) checkAllResponses() (done bool, err error) { successes := 0 options := api.ListOptions{LabelSelector: r.label} currentPods, err := r.c.Pods(r.ns).List(options) @@ -1042,7 +1044,7 @@ func serverVersionGTE(v semver.Version, c client.ServerVersionInterface) (bool, func podsResponding(c *client.Client, ns, name string, wantName bool, pods *api.PodList) error { By("trying to dial each unique pod") label := labels.SelectorFromSet(labels.Set(map[string]string{"name": name})) - return wait.PollImmediate(poll, podRespondingTimeout, podResponseChecker{c, ns, label, name, wantName, pods}.checkAllResponses) + return wait.PollImmediate(poll, podRespondingTimeout, podProxyResponseChecker{c, ns, label, name, wantName, pods}.checkAllResponses) } func serviceResponding(c *client.Client, ns, name string) error { From bb460c04ddb25245906e80ec5e42ee5675782c92 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Sat, 30 Jan 2016 13:15:34 -0800 Subject: [PATCH 084/328] netexec: Add / and /echo handlers, bump to 1.4 Add some logs, allow simple "cmd" arg for shell. --- test/e2e/kubelet_etc_hosts.go | 5 +- test/e2e/kubeproxy.go | 2 +- test/e2e/privileged.go | 5 +- test/e2e/testing-manifests/netexecrc.yaml | 2 +- test/images/netexec/Makefile | 2 +- test/images/netexec/netexec.go | 56 ++++++++++++++++++++--- test/images/netexec/pod.yaml | 4 +- 7 files changed, 62 insertions(+), 14 deletions(-) diff --git a/test/e2e/kubelet_etc_hosts.go b/test/e2e/kubelet_etc_hosts.go index 25909512a6b..15502daeb41 100644 --- a/test/e2e/kubelet_etc_hosts.go +++ b/test/e2e/kubelet_etc_hosts.go @@ -18,16 +18,17 @@ package e2e import ( "fmt" + "strings" + . "github.com/onsi/ginkgo" api "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/apimachinery/registered" client "k8s.io/kubernetes/pkg/client/unversioned" - "strings" ) const ( - kubeletEtcHostsImageName = "gcr.io/google_containers/netexec:1.0" + kubeletEtcHostsImageName = "gcr.io/google_containers/netexec:1.4" kubeletEtcHostsPodName = "test-pod" kubeletEtcHostsHostNetworkPodName = "test-host-network-pod" etcHostsPartialContent = "# Kubernetes-managed hosts file." diff --git a/test/e2e/kubeproxy.go b/test/e2e/kubeproxy.go index 9407715b0d7..abdb3452d40 100644 --- a/test/e2e/kubeproxy.go +++ b/test/e2e/kubeproxy.go @@ -46,7 +46,7 @@ const ( nodeHttpPort = 32080 nodeUdpPort = 32081 loadBalancerHttpPort = 100 - netexecImageName = "gcr.io/google_containers/netexec:1.0" + netexecImageName = "gcr.io/google_containers/netexec:1.4" testPodName = "test-container-pod" hostTestPodName = "host-test-container-pod" nodePortServiceName = "node-port-service" diff --git a/test/e2e/privileged.go b/test/e2e/privileged.go index 41090b82fc4..4a40ee63eac 100644 --- a/test/e2e/privileged.go +++ b/test/e2e/privileged.go @@ -19,13 +19,14 @@ package e2e import ( "encoding/json" "fmt" + "net/url" + . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/apimachinery/registered" client "k8s.io/kubernetes/pkg/client/unversioned" - "net/url" ) const ( @@ -36,7 +37,7 @@ const ( notPrivilegedHttpPort = 9090 notPrivilegedUdpPort = 9091 notPrivilegedContainerName = "not-privileged-container" - privilegedContainerImage = "gcr.io/google_containers/netexec:1.1" + privilegedContainerImage = "gcr.io/google_containers/netexec:1.4" privilegedCommand = "ip link add dummy1 type dummy" ) diff --git a/test/e2e/testing-manifests/netexecrc.yaml b/test/e2e/testing-manifests/netexecrc.yaml index ecdcff159fc..c2aa34ca1fa 100644 --- a/test/e2e/testing-manifests/netexecrc.yaml +++ b/test/e2e/testing-manifests/netexecrc.yaml @@ -12,7 +12,7 @@ spec: spec: containers: - name: netexec - image: gcr.io/google_containers/netexec:1.0 + image: gcr.io/google_containers/netexec:1.4 ports: - containerPort: 8080 # This is to force these pods to land on different hosts. diff --git a/test/images/netexec/Makefile b/test/images/netexec/Makefile index 605375dc63a..e94ba47e4ce 100644 --- a/test/images/netexec/Makefile +++ b/test/images/netexec/Makefile @@ -1,6 +1,6 @@ .PHONY: all netexec image push clean -TAG = 1.3.1 +TAG = 1.4 PREFIX = gcr.io/google_containers diff --git a/test/images/netexec/netexec.go b/test/images/netexec/netexec.go index 62e8b59f6cb..d761b3b147f 100644 --- a/test/images/netexec/netexec.go +++ b/test/images/netexec/netexec.go @@ -56,15 +56,45 @@ func main() { } func startHTTPServer(httpPort int) { - http.HandleFunc("/shutdown", shutdownHandler) - http.HandleFunc("/hostName", hostNameHandler) + http.HandleFunc("/", rootHandler) + http.HandleFunc("/echo", echoHandler) + http.HandleFunc("/exit", exitHandler) + http.HandleFunc("/hostname", hostnameHandler) http.HandleFunc("/shell", shellHandler) http.HandleFunc("/upload", uploadHandler) http.HandleFunc("/dial", dialHandler) + // older handlers + http.HandleFunc("/hostName", hostNameHandler) + http.HandleFunc("/shutdown", shutdownHandler) log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", httpPort), nil)) } +func rootHandler(w http.ResponseWriter, r *http.Request) { + log.Printf("GET /") + fmt.Fprintf(w, "NOW: %v", time.Now()) +} + +func echoHandler(w http.ResponseWriter, r *http.Request) { + log.Printf("GET /echo?msg=%s", r.FormValue("msg")) + fmt.Fprintf(w, "%s", r.FormValue("msg")) +} + +func exitHandler(w http.ResponseWriter, r *http.Request) { + log.Printf("GET /exit?code=%s", r.FormValue("code")) + code, err := strconv.Atoi(r.FormValue("code")) + if err == nil || r.FormValue("code") == "" { + os.Exit(code) + } + fmt.Fprintf(w, "argument 'code' must be an integer [0-127] or empty, got %q", r.FormValue("code")) +} + +func hostnameHandler(w http.ResponseWriter, r *http.Request) { + log.Printf("GET /hostname") + fmt.Fprintf(w, getHostName()) +} + func shutdownHandler(w http.ResponseWriter, r *http.Request) { + log.Printf("GET /shutdown") os.Exit(0) } @@ -80,6 +110,7 @@ func dialHandler(w http.ResponseWriter, r *http.Request) { request := values.Query().Get("request") // hostName protocol := values.Query().Get("protocol") tryParam := values.Query().Get("tries") + log.Printf("GET /dial?host=%s&protocol=%s&port=%s&request=%s&tries=%s", host, protocol, port, request, tryParam) tries := 1 if len(tryParam) > 0 { tries, err = strconv.Atoi(tryParam) @@ -192,9 +223,12 @@ func dialUDP(request string, remoteAddress *net.UDPAddr) (string, error) { } func shellHandler(w http.ResponseWriter, r *http.Request) { - log.Println(r.FormValue("shellCommand")) - log.Printf("%s %s %s\n", shellPath, "-c", r.FormValue("shellCommand")) - cmdOut, err := exec.Command(shellPath, "-c", r.FormValue("shellCommand")).CombinedOutput() + cmd := r.FormValue("shellCommand") + if cmd == "" { + cmd = r.FormValue("cmd") + } + log.Printf("GET /shell?cmd=%s", cmd) + cmdOut, err := exec.Command(shellPath, "-c", cmd).CombinedOutput() output := map[string]string{} if len(cmdOut) > 0 { output["output"] = string(cmdOut) @@ -212,6 +246,7 @@ func shellHandler(w http.ResponseWriter, r *http.Request) { } func uploadHandler(w http.ResponseWriter, r *http.Request) { + log.Printf("GET /upload") result := map[string]string{} file, _, err := r.FormFile("file") if err != nil { @@ -287,10 +322,19 @@ func startUDPServer(udpPort int) { n, clientAddress, err := serverConn.ReadFromUDP(buf) assertNoError(err) receivedText := strings.TrimSpace(string(buf[0:n])) - if receivedText == "hostName" { + if receivedText == "hostName" || receivedText == "hostname" { log.Println("Sending udp hostName response") _, err = serverConn.WriteToUDP([]byte(getHostName()), clientAddress) assertNoError(err) + } else if strings.HasPrefix(receivedText, "echo ") { + parts := strings.SplitN(receivedText, " ", 2) + resp := "" + if len(parts) == 2 { + resp = parts[1] + } + log.Println("Echoing %q") + _, err = serverConn.WriteToUDP([]byte(resp), clientAddress) + assertNoError(err) } else if len(receivedText) > 0 { log.Println("Unknown udp command received. ", receivedText) } diff --git a/test/images/netexec/pod.yaml b/test/images/netexec/pod.yaml index eb2273d40f2..f53bfd4d99c 100644 --- a/test/images/netexec/pod.yaml +++ b/test/images/netexec/pod.yaml @@ -7,7 +7,9 @@ metadata: spec: containers: - name: netexec - image: gcr.io/google_containers/netexec:1.3.1 + image: gcr.io/google_containers/netexec:1.4 ports: - containerPort: 8080 + protocol: TCP - containerPort: 8081 + protocol: UDP From d907da25b2c8323bcb9a2a4dc7d09c0a06792667 Mon Sep 17 00:00:00 2001 From: Abhishek Shah Date: Tue, 2 Feb 2016 22:03:14 -0800 Subject: [PATCH 085/328] Updated kubeproxy test to test hitting 127.0.0.1:nodeport from node itself --- test/e2e/kubeproxy.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/e2e/kubeproxy.go b/test/e2e/kubeproxy.go index 9407715b0d7..3d22f3ba6aa 100644 --- a/test/e2e/kubeproxy.go +++ b/test/e2e/kubeproxy.go @@ -185,12 +185,10 @@ func (config *KubeProxyTestConfig) hitNodePort(epCount int) { By("dialing(http) endpoint container --> node1:nodeHttpPort") config.dialFromEndpointContainer("http", node1_IP, nodeHttpPort, tries, epCount) - // TODO: doesn't work because masquerading is not done - By("TODO: Test disabled. dialing(udp) node --> 127.0.0.1:nodeUdpPort") - //config.dialFromNode("udp", "127.0.0.1", nodeUdpPort, tries, epCount) - // TODO: doesn't work because masquerading is not done - By("Test disabled. dialing(http) node --> 127.0.0.1:nodeHttpPort") - //config.dialFromNode("http", "127.0.0.1", nodeHttpPort, tries, epCount) + By("dialing(udp) node --> 127.0.0.1:nodeUdpPort") + config.dialFromNode("udp", "127.0.0.1", nodeUdpPort, tries, epCount) + By("dialing(http) node --> 127.0.0.1:nodeHttpPort") + config.dialFromNode("http", "127.0.0.1", nodeHttpPort, tries, epCount) node2_IP := config.externalAddrs[1] By("dialing(udp) node1 --> node2:nodeUdpPort") From b7782e73b648c8d866287ff5cc19a6efd1164170 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Fri, 29 Jan 2016 20:35:32 -0800 Subject: [PATCH 086/328] Service e2e cleanup Make a new jig that is based on the netexec container. Change the LB tests to use this new jig and leave TODOs for other tests. Add UDP testing to the main mutability test. Flatten the "identical names" test into the mutability test - it is now the only load-balancer test (speedup). Create LBs in parallel. --- test/e2e/cluster_upgrade.go | 54 ++ test/e2e/service.go | 1224 ++++++++++++++++++++--------------- test/e2e/util.go | 6 +- 3 files changed, 744 insertions(+), 540 deletions(-) diff --git a/test/e2e/cluster_upgrade.go b/test/e2e/cluster_upgrade.go index 27aff06490c..3c1bc14f208 100644 --- a/test/e2e/cluster_upgrade.go +++ b/test/e2e/cluster_upgrade.go @@ -610,3 +610,57 @@ func migRollingUpdatePoll(id string, nt time.Duration) error { Logf("MIG rolling update complete after %v", time.Since(start)) return nil } + +func testLoadBalancerReachable(ingress api.LoadBalancerIngress, port int) bool { + return testLoadBalancerReachableInTime(ingress, port, loadBalancerLagTimeout) +} + +func testLoadBalancerReachableInTime(ingress api.LoadBalancerIngress, port int, timeout time.Duration) bool { + ip := ingress.IP + if ip == "" { + ip = ingress.Hostname + } + + return testReachableInTime(conditionFuncDecorator(ip, port, testReachableHTTP, "/", "test-webserver"), timeout) + +} + +func conditionFuncDecorator(ip string, port int, fn func(string, int, string, string) (bool, error), request string, expect string) wait.ConditionFunc { + return func() (bool, error) { + return fn(ip, port, request, expect) + } +} + +func testReachableInTime(testFunc wait.ConditionFunc, timeout time.Duration) bool { + By(fmt.Sprintf("Waiting up to %v", timeout)) + err := wait.PollImmediate(poll, timeout, testFunc) + if err != nil { + Expect(err).NotTo(HaveOccurred(), "Error waiting") + return false + } + return true +} + +func waitForLoadBalancerIngress(c *client.Client, serviceName, namespace string) (*api.Service, error) { + // TODO: once support ticket 21807001 is resolved, reduce this timeout + // back to something reasonable + const timeout = 20 * time.Minute + var service *api.Service + By(fmt.Sprintf("waiting up to %v for service %s in namespace %s to have a LoadBalancer ingress point", timeout, serviceName, namespace)) + i := 1 + for start := time.Now(); time.Since(start) < timeout; time.Sleep(3 * time.Second) { + service, err := c.Services(namespace).Get(serviceName) + if err != nil { + Logf("Get service failed, ignoring for 5s: %v", err) + continue + } + if len(service.Status.LoadBalancer.Ingress) > 0 { + return service, nil + } + if i%5 == 0 { + Logf("Waiting for service %s in namespace %s to have a LoadBalancer ingress point (%v)", serviceName, namespace, time.Since(start)) + } + i++ + } + return service, fmt.Errorf("service %s in namespace %s doesn't have a LoadBalancer ingress point after %.2f seconds", serviceName, namespace, timeout.Seconds()) +} diff --git a/test/e2e/service.go b/test/e2e/service.go index d63e80da319..7ebf3d3f96b 100644 --- a/test/e2e/service.go +++ b/test/e2e/service.go @@ -32,6 +32,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" client "k8s.io/kubernetes/pkg/client/unversioned" + "k8s.io/kubernetes/pkg/labels" "k8s.io/kubernetes/pkg/types" "k8s.io/kubernetes/pkg/util" "k8s.io/kubernetes/pkg/util/intstr" @@ -44,6 +45,13 @@ import ( // notice a Service update, such as type=NodePort. const kubeProxyLagTimeout = 45 * time.Second +// Maximum time a load balancer is allowed to not respond after creation. +const loadBalancerLagTimeout = 2 * time.Minute + +// How long to wait for a load balancer to be created/modified. +//TODO: once support ticket 21807001 is resolved, reduce this timeout back to something reasonable +const loadBalancerCreateTimeout = 20 * time.Minute + // This should match whatever the default/configured range is var ServiceNodePortRange = utilnet.PortRange{Base: 30000, Size: 2768} @@ -81,6 +89,7 @@ var _ = Describe("Services", func() { }) It("should serve a basic endpoint from pods [Conformance]", func() { + // TODO: use the ServiceTestJig here serviceName := "endpoint-test2" ns := f.Namespace.Name labels := map[string]string{ @@ -140,6 +149,7 @@ var _ = Describe("Services", func() { }) It("should serve multiport endpoints from pods [Conformance]", func() { + // TODO: use the ServiceTestJig here // repacking functionality is intentionally not tested here - it's better to test it in an integration test. serviceName := "multi-endpoint-test" ns := f.Namespace.Name @@ -223,6 +233,7 @@ var _ = Describe("Services", func() { }) It("should be able to up and down services", func() { + // TODO: use the ServiceTestJig here // this test uses NodeSSHHosts that does not work if a Node only reports LegacyHostIP SkipUnlessProviderIs(providersWithSSH...) ns := f.Namespace.Name @@ -265,6 +276,7 @@ var _ = Describe("Services", func() { }) It("should work after restarting kube-proxy [Disruptive]", func() { + // TODO: use the ServiceTestJig here SkipUnlessProviderIs("gce", "gke") ns := f.Namespace.Name @@ -316,6 +328,7 @@ var _ = Describe("Services", func() { }) It("should work after restarting apiserver [Disruptive]", func() { + // TODO: use the ServiceTestJig here // TODO: restartApiserver doesn't work in GKE - fix it and reenable this test. SkipUnlessProviderIs("gce") @@ -360,52 +373,24 @@ var _ = Describe("Services", func() { // configured with a default deny firewall to validate that the // proxy whitelists NodePort traffic. It("should be able to create a functioning NodePort service", func() { - serviceName := "nodeportservice-test" + serviceName := "nodeport-test" ns := f.Namespace.Name - t := NewServerTest(c, ns, serviceName) - defer func() { - defer GinkgoRecover() - errs := t.Cleanup() - if len(errs) != 0 { - Failf("errors in cleanup: %v", errs) - } - }() - - service := t.BuildServiceSpec() - service.Spec.Type = api.ServiceTypeNodePort + jig := NewServiceTestJig(c, serviceName) + nodeIP := pickNodeIP(jig.Client) // for later By("creating service " + serviceName + " with type=NodePort in namespace " + ns) - result, err := c.Services(ns).Create(service) - Expect(err).NotTo(HaveOccurred()) - defer func(ns, serviceName string) { // clean up when we're done - By("deleting service " + serviceName + " in namespace " + ns) - err := c.Services(ns).Delete(serviceName) - Expect(err).NotTo(HaveOccurred()) - }(ns, serviceName) - - if len(result.Spec.Ports) != 1 { - Failf("got unexpected number (%d) of Ports for NodePort service: %v", len(result.Spec.Ports), result) - } - - nodePort := result.Spec.Ports[0].NodePort - if nodePort == 0 { - Failf("got unexpected nodePort (%d) on Ports[0] for NodePort service: %v", nodePort, result) - } - if !ServiceNodePortRange.Contains(nodePort) { - Failf("got unexpected (out-of-range) port for NodePort service: %v", result) - } + service := jig.CreateTCPServiceOrFail(ns, func(svc *api.Service) { + svc.Spec.Type = api.ServiceTypeNodePort + }) + jig.SanityCheckService(service, api.ServiceTypeNodePort) + nodePort := service.Spec.Ports[0].NodePort By("creating pod to be part of service " + serviceName) - t.CreateWebserverRC(1) + jig.RunOrFail(ns, nil) By("hitting the pod through the service's NodePort") - ip := pickNodeIP(c) - // Loop for kubeProxyLagTimeout, because different kube-proxies might take - // different times to notice the new Service and open up the node port. - if err := wait.PollImmediate(poll, kubeProxyLagTimeout, func() (bool, error) { return testReachable(ip, nodePort) }); err != nil { - Failf("Could not reach nodePort service through node-ip %v:%v in %v", ip, nodePort, kubeProxyLagTimeout) - } + jig.TestReachableHTTP(nodeIP, nodePort, kubeProxyLagTimeout) By("verifying the node port is locked") hostExec := LaunchHostExecPod(f.Client, f.Namespace.Name, "hostexec") @@ -414,202 +399,274 @@ var _ = Describe("Services", func() { cmd := fmt.Sprintf(`for i in $(seq 1 300); do if ss -ant46 'sport = :%d' | grep ^LISTEN; then exit 0; fi; sleep 1; done; exit 1`, nodePort) stdout, err := RunHostCmd(hostExec.Namespace, hostExec.Name, cmd) if err != nil { - Failf("expected node port (%d) to be in use, stdout: %v", nodePort, stdout) + Failf("expected node port %d to be in use, stdout: %v", nodePort, stdout) } }) - It("should be able to change the type and nodeport settings of a service", func() { + It("should be able to change the type and ports of a service", func() { // requires cloud load-balancer support SkipUnlessProviderIs("gce", "gke", "aws") - serviceName := "mutability-service-test" + // This test is more monolithic than we'd like because LB turnup can be + // very slow, so we lumped all the tests into one LB lifecycle. - t := NewServerTest(f.Client, f.Namespace.Name, serviceName) - defer func() { - defer GinkgoRecover() - errs := t.Cleanup() - if len(errs) != 0 { - Failf("errors in cleanup: %v", errs) - } - }() + serviceName := "mutability-test" + ns1 := f.Namespace.Name // LB1 in ns1 on TCP + Logf("namespace for TCP test: %s", ns1) - service := t.BuildServiceSpec() - - By("creating service " + serviceName + " with type unspecified in namespace " + t.Namespace) - service, err := t.CreateService(service) + By("creating a second namespace") + namespacePtr, err := createTestingNS("services", c, nil) Expect(err).NotTo(HaveOccurred()) + ns2 := namespacePtr.Name // LB2 in ns2 on UDP + Logf("namespace for UDP test: %s", ns2) + extraNamespaces = append(extraNamespaces, ns2) - if service.Spec.Type != api.ServiceTypeClusterIP { - Failf("got unexpected Spec.Type for default service: %v", service) - } - if len(service.Spec.Ports) != 1 { - Failf("got unexpected len(Spec.Ports) for default service: %v", service) - } - port := service.Spec.Ports[0] - if port.NodePort != 0 { - Failf("got unexpected Spec.Ports[0].nodePort for default service: %v", service) - } - if len(service.Status.LoadBalancer.Ingress) != 0 { - Failf("got unexpected len(Status.LoadBalancer.Ingress) for default service: %v", service) - } + jig := NewServiceTestJig(c, serviceName) + nodeIP := pickNodeIP(jig.Client) // for later - By("creating pod to be part of service " + t.ServiceName) - t.CreateWebserverRC(1) + // Test TCP and UDP Services. Services with the same name in different + // namespaces should get different node ports and load balancers. - By("changing service " + serviceName + " to type=NodePort") - service, err = updateService(f.Client, f.Namespace.Name, serviceName, func(s *api.Service) { + By("creating a TCP service " + serviceName + " with type=ClusterIP in namespace " + ns1) + tcpService := jig.CreateTCPServiceOrFail(ns1, nil) + jig.SanityCheckService(tcpService, api.ServiceTypeClusterIP) + + By("creating a UDP service " + serviceName + " with type=ClusterIP in namespace " + ns2) + udpService := jig.CreateUDPServiceOrFail(ns2, nil) + jig.SanityCheckService(udpService, api.ServiceTypeClusterIP) + + By("verifying that TCP and UDP use the same port") + if tcpService.Spec.Ports[0].Port != udpService.Spec.Ports[0].Port { + Failf("expected to use the same port for TCP and UDP") + } + svcPort := tcpService.Spec.Ports[0].Port + Logf("service port (TCP and UDP): %d", svcPort) + + By("creating a pod to be part of the TCP service " + serviceName) + jig.RunOrFail(ns1, nil) + + By("creating a pod to be part of the UDP service " + serviceName) + jig.RunOrFail(ns2, nil) + + // Change the services to NodePort. + + By("changing the TCP service " + serviceName + " to type=NodePort") + tcpService = jig.UpdateServiceOrFail(ns1, tcpService.Name, func(s *api.Service) { s.Spec.Type = api.ServiceTypeNodePort }) - Expect(err).NotTo(HaveOccurred()) + jig.SanityCheckService(tcpService, api.ServiceTypeNodePort) + tcpNodePort := tcpService.Spec.Ports[0].NodePort + Logf("TCP node port: %d", tcpNodePort) - if service.Spec.Type != api.ServiceTypeNodePort { - Failf("got unexpected Spec.Type for NodePort service: %v", service) - } - if len(service.Spec.Ports) != 1 { - Failf("got unexpected len(Spec.Ports) for NodePort service: %v", service) - } - port = service.Spec.Ports[0] - if port.NodePort == 0 { - Failf("got unexpected Spec.Ports[0].nodePort for NodePort service: %v", service) - } - if !ServiceNodePortRange.Contains(port.NodePort) { - Failf("got unexpected (out-of-range) port for NodePort service: %v", service) - } - if len(service.Status.LoadBalancer.Ingress) != 0 { - Failf("got unexpected len(Status.LoadBalancer.Ingress) for NodePort service: %v", service) + By("changing the UDP service " + serviceName + " to type=NodePort") + udpService = jig.UpdateServiceOrFail(ns2, udpService.Name, func(s *api.Service) { + s.Spec.Type = api.ServiceTypeNodePort + }) + jig.SanityCheckService(udpService, api.ServiceTypeNodePort) + udpNodePort := udpService.Spec.Ports[0].NodePort + Logf("UDP node port: %d", udpNodePort) + + By("hitting the TCP service's NodePort") + jig.TestReachableHTTP(nodeIP, tcpNodePort, kubeProxyLagTimeout) + + By("hitting the UDP service's NodePort") + jig.TestReachableUDP(nodeIP, udpNodePort, kubeProxyLagTimeout) + + // Change the services to LoadBalancer. + + requestedIP := "" + if providerIs("gce", "gke") { + By("creating a static load balancer IP") + rand.Seed(time.Now().UTC().UnixNano()) + staticIPName := fmt.Sprintf("e2e-external-lb-test-%d", rand.Intn(65535)) + requestedIP, err = createGCEStaticIP(staticIPName) + Expect(err).NotTo(HaveOccurred()) + defer func() { + // Release GCE static IP - this is not kube-managed and will not be automatically released. + deleteGCEStaticIP(staticIPName) + }() + Logf("Allocated static load balancer IP: %s", requestedIP) } - By("hitting the pod through the service's NodePort") - ip := pickNodeIP(f.Client) - nodePort1 := port.NodePort // Save for later! - - // Loop for kubeProxyLagTimeout, because different kube-proxies might take - // different times to notice the new Service and open up the node port. - if err := wait.PollImmediate(poll, kubeProxyLagTimeout, func() (bool, error) { return testReachable(ip, nodePort1) }); err != nil { - Failf("Could not reach nodePort service through node-ip %v:%v in %v", ip, nodePort1, kubeProxyLagTimeout) - } - - By("changing service " + serviceName + " to type=LoadBalancer") - service, err = updateService(f.Client, f.Namespace.Name, serviceName, func(s *api.Service) { + By("changing the TCP service " + serviceName + " to type=LoadBalancer") + tcpService = jig.UpdateServiceOrFail(ns1, tcpService.Name, func(s *api.Service) { + s.Spec.LoadBalancerIP = requestedIP // will be "" if not applicable s.Spec.Type = api.ServiceTypeLoadBalancer }) - Expect(err).NotTo(HaveOccurred()) - // Wait for the load balancer to be created asynchronously - service, err = waitForLoadBalancerIngress(f.Client, serviceName, f.Namespace.Name) - Expect(err).NotTo(HaveOccurred()) - - if service.Spec.Type != api.ServiceTypeLoadBalancer { - Failf("got unexpected Spec.Type for LoadBalancer service: %v", service) - } - if len(service.Spec.Ports) != 1 { - Failf("got unexpected len(Spec.Ports) for LoadBalancer service: %v", service) - } - port = service.Spec.Ports[0] - if port.NodePort != nodePort1 { - Failf("got unexpected Spec.Ports[0].nodePort for LoadBalancer service: %v", service) - } - if len(service.Status.LoadBalancer.Ingress) != 1 { - Failf("got unexpected len(Status.LoadBalancer.Ingress) for LoadBalancer service: %v", service) - } - ingress1 := service.Status.LoadBalancer.Ingress[0] - if ingress1.IP == "" && ingress1.Hostname == "" { - Failf("got unexpected Status.LoadBalancer.Ingress[0] for LoadBalancer service: %v", service) - } - - By("hitting the pod through the service's NodePort") - ip = pickNodeIP(f.Client) - - // Loop for kubeProxyLagTimeout, because different kube-proxies might take - // different times to notice the new Service and open up the node port. - if err := wait.PollImmediate(poll, kubeProxyLagTimeout, func() (bool, error) { return testReachable(ip, nodePort1) }); err != nil { - Failf("Could not reach nodePort service through node-ip %v:%v in %v", ip, nodePort1, kubeProxyLagTimeout) - } - - By("hitting the pod through the service's LoadBalancer") - testLoadBalancerReachable(ingress1, 80) - - By("changing service " + serviceName + ": update NodePort") - nodePort2 := 0 - for i := 1; i < ServiceNodePortRange.Size; i++ { - offs1 := nodePort1 - ServiceNodePortRange.Base - offs2 := (offs1 + i) % ServiceNodePortRange.Size - nodePort2 = ServiceNodePortRange.Base + offs2 - service, err = updateService(f.Client, f.Namespace.Name, serviceName, func(s *api.Service) { - s.Spec.Ports[0].NodePort = nodePort2 - }) - if err != nil && strings.Contains(err.Error(), "provided port is already allocated") { - Logf("nodePort %d is busy, will retry", nodePort2) - continue - } - // Otherwise err was nil or err was a real error - break - } - Expect(err).NotTo(HaveOccurred()) - - if service.Spec.Type != api.ServiceTypeLoadBalancer { - Failf("got unexpected Spec.Type for updated-LoadBalancer service: %v", service) - } - if len(service.Spec.Ports) != 1 { - Failf("got unexpected len(Spec.Ports) for updated-LoadBalancer service: %v", service) - } - port = service.Spec.Ports[0] - if port.NodePort != nodePort2 { - Failf("got unexpected Spec.Ports[0].nodePort for LoadBalancer service: %v", service) - } - if len(service.Status.LoadBalancer.Ingress) != 1 { - Failf("got unexpected len(Status.LoadBalancer.Ingress) for LoadBalancer service: %v", service) - } - - By("hitting the pod through the service's updated NodePort") - - // Loop for kubeProxyLagTimeout, because different kube-proxies might take - // different times to notice the new Service and open up the node port. - if err := wait.PollImmediate(poll, kubeProxyLagTimeout, func() (bool, error) { return testReachable(ip, nodePort2) }); err != nil { - Failf("Could not reach nodePort service through node-ip %v:%v in %v", ip, nodePort2, kubeProxyLagTimeout) - } - - By("checking the old NodePort is closed") - testNotReachable(ip, nodePort1) - - servicePort := 80 - By("hitting the pod through the service's LoadBalancer") - i := 1 - for start := time.Now(); time.Since(start) < podStartTimeout; time.Sleep(3 * time.Second) { - service, err = waitForLoadBalancerIngress(f.Client, serviceName, f.Namespace.Name) - Expect(err).NotTo(HaveOccurred()) - - ingress2 := service.Status.LoadBalancer.Ingress[0] - if testLoadBalancerReachable(ingress2, servicePort) { - break - } - - if i%5 == 0 { - Logf("Waiting for load-balancer changes (%v elapsed, will retry)", time.Since(start)) - } - i++ - } - - By("updating service's port " + serviceName + " and reaching it at the same IP") - service, err = updateService(f.Client, f.Namespace.Name, serviceName, func(s *api.Service) { - s.Spec.Ports[0].Port = 19482 // chosen arbitrarily to not conflict with port 80 + By("changing the UDP service " + serviceName + " to type=LoadBalancer") + udpService = jig.UpdateServiceOrFail(ns2, udpService.Name, func(s *api.Service) { + s.Spec.Type = api.ServiceTypeLoadBalancer }) - Expect(err).NotTo(HaveOccurred()) - port = service.Spec.Ports[0] - if !testLoadBalancerReachable(service.Status.LoadBalancer.Ingress[0], port.Port) { - Failf("Failed to reach load balancer at original ingress after updating its port: %+v", service) + + By("waiting for the TCP service " + serviceName + " to have a load balancer") + // Wait for the load balancer to be created asynchronously + tcpService = jig.WaitForLoadBalancerOrFail(ns1, tcpService.Name) + jig.SanityCheckService(tcpService, api.ServiceTypeLoadBalancer) + if tcpService.Spec.Ports[0].NodePort != tcpNodePort { + Failf("TCP Spec.Ports[0].NodePort changed (%d -> %d) when not expected", tcpNodePort, tcpService.Spec.Ports[0].NodePort) + } + if requestedIP != "" && getIngressPoint(&tcpService.Status.LoadBalancer.Ingress[0]) != requestedIP { + Failf("unexpected TCP Status.LoadBalancer.Ingress (expected %s, got %s)", requestedIP, getIngressPoint(&tcpService.Status.LoadBalancer.Ingress[0])) + } + tcpIngressIP := getIngressPoint(&tcpService.Status.LoadBalancer.Ingress[0]) + Logf("TCP load balancer: %s", tcpIngressIP) + + By("waiting for the UDP service " + serviceName + " to have a load balancer") + // 2nd one should be faster since they ran in parallel. + udpService = jig.WaitForLoadBalancerOrFail(ns2, udpService.Name) + jig.SanityCheckService(udpService, api.ServiceTypeLoadBalancer) + if udpService.Spec.Ports[0].NodePort != udpNodePort { + Failf("UDP Spec.Ports[0].NodePort changed (%d -> %d) when not expected", udpNodePort, udpService.Spec.Ports[0].NodePort) + } + udpIngressIP := getIngressPoint(&udpService.Status.LoadBalancer.Ingress[0]) + Logf("UDP load balancer: %s", tcpIngressIP) + + By("verifying that TCP and UDP use different load balancers") + if tcpIngressIP == udpIngressIP { + Failf("Load balancers are not different: %s", getIngressPoint(&tcpService.Status.LoadBalancer.Ingress[0])) } - removeExternalLoadBalancer(f, service) + By("hitting the TCP service's NodePort") + jig.TestReachableHTTP(nodeIP, tcpNodePort, kubeProxyLagTimeout) - By("checking the NodePort is closed") - ip = pickNodeIP(f.Client) - testNotReachable(ip, nodePort2) - By("checking the LoadBalancer is closed") - testLoadBalancerNotReachable(ingress1, port.Port) + By("hitting the UDP service's NodePort") + jig.TestReachableUDP(nodeIP, udpNodePort, kubeProxyLagTimeout) + + By("hitting the TCP service's LoadBalancer") + jig.TestReachableHTTP(tcpIngressIP, svcPort, loadBalancerLagTimeout) + + By("hitting the UDP service's LoadBalancer") + jig.TestReachableUDP(udpIngressIP, svcPort, loadBalancerLagTimeout) + + // Change the services' node ports. + + By("changing the TCP service's " + serviceName + " NodePort") + tcpService = jig.ChangeServiceNodePortOrFail(ns1, tcpService.Name, tcpNodePort) + jig.SanityCheckService(tcpService, api.ServiceTypeLoadBalancer) + tcpNodePortOld := tcpNodePort + tcpNodePort = tcpService.Spec.Ports[0].NodePort + if tcpNodePort == tcpNodePortOld { + Failf("TCP Spec.Ports[0].NodePort (%d) did not change", tcpNodePort) + } + if getIngressPoint(&tcpService.Status.LoadBalancer.Ingress[0]) != tcpIngressIP { + Failf("TCP Status.LoadBalancer.Ingress changed (%s -> %s) when not expected", tcpIngressIP, getIngressPoint(&tcpService.Status.LoadBalancer.Ingress[0])) + } + Logf("TCP node port: %d", tcpNodePort) + + By("changing the UDP service's " + serviceName + " NodePort") + udpService = jig.ChangeServiceNodePortOrFail(ns2, udpService.Name, udpNodePort) + jig.SanityCheckService(udpService, api.ServiceTypeLoadBalancer) + udpNodePortOld := udpNodePort + udpNodePort = udpService.Spec.Ports[0].NodePort + if udpNodePort == udpNodePortOld { + Failf("UDP Spec.Ports[0].NodePort (%d) did not change", udpNodePort) + } + if getIngressPoint(&udpService.Status.LoadBalancer.Ingress[0]) != udpIngressIP { + Failf("UDP Status.LoadBalancer.Ingress changed (%s -> %s) when not expected", udpIngressIP, getIngressPoint(&udpService.Status.LoadBalancer.Ingress[0])) + } + Logf("UDP node port: %d", udpNodePort) + + By("hitting the TCP service's new NodePort") + jig.TestReachableHTTP(nodeIP, tcpNodePort, kubeProxyLagTimeout) + + By("hitting the UDP service's new NodePort") + jig.TestReachableUDP(nodeIP, udpNodePort, kubeProxyLagTimeout) + + By("checking the old TCP NodePort is closed") + jig.TestNotReachableHTTP(nodeIP, tcpNodePortOld, kubeProxyLagTimeout) + + By("checking the old UDP NodePort is closed") + jig.TestNotReachableUDP(nodeIP, udpNodePortOld, kubeProxyLagTimeout) + + By("hitting the TCP service's LoadBalancer") + jig.TestReachableHTTP(tcpIngressIP, svcPort, loadBalancerLagTimeout) + + By("hitting the UDP service's LoadBalancer") + jig.TestReachableUDP(udpIngressIP, svcPort, loadBalancerLagTimeout) + + // Change the services' main ports. + + By("changing the TCP service's port") + tcpService = jig.UpdateServiceOrFail(ns1, tcpService.Name, func(s *api.Service) { + s.Spec.Ports[0].Port++ + }) + jig.SanityCheckService(tcpService, api.ServiceTypeLoadBalancer) + svcPortOld := svcPort + svcPort = tcpService.Spec.Ports[0].Port + if svcPort == svcPortOld { + Failf("TCP Spec.Ports[0].Port (%d) did not change", svcPort) + } + if tcpService.Spec.Ports[0].NodePort != tcpNodePort { + Failf("TCP Spec.Ports[0].NodePort (%d) changed", tcpService.Spec.Ports[0].NodePort) + } + if getIngressPoint(&tcpService.Status.LoadBalancer.Ingress[0]) != tcpIngressIP { + Failf("TCP Status.LoadBalancer.Ingress changed (%s -> %s) when not expected", tcpIngressIP, getIngressPoint(&tcpService.Status.LoadBalancer.Ingress[0])) + } + Logf("service port (TCP and UDP): %d", svcPort) + + By("changing the UDP service's port") + udpService = jig.UpdateServiceOrFail(ns2, udpService.Name, func(s *api.Service) { + s.Spec.Ports[0].Port++ + }) + jig.SanityCheckService(udpService, api.ServiceTypeLoadBalancer) + if udpService.Spec.Ports[0].Port != svcPort { + Failf("UDP Spec.Ports[0].Port (%d) did not change", udpService.Spec.Ports[0].Port) + } + if udpService.Spec.Ports[0].NodePort != udpNodePort { + Failf("UDP Spec.Ports[0].NodePort (%d) changed", udpService.Spec.Ports[0].NodePort) + } + if getIngressPoint(&udpService.Status.LoadBalancer.Ingress[0]) != udpIngressIP { + Failf("UDP Status.LoadBalancer.Ingress changed (%s -> %s) when not expected", udpIngressIP, getIngressPoint(&udpService.Status.LoadBalancer.Ingress[0])) + } + + By("hitting the TCP service's NodePort") + jig.TestReachableHTTP(nodeIP, tcpNodePort, kubeProxyLagTimeout) + + By("hitting the UDP service's NodePort") + jig.TestReachableUDP(nodeIP, udpNodePort, kubeProxyLagTimeout) + + By("hitting the TCP service's LoadBalancer") + jig.TestReachableHTTP(tcpIngressIP, svcPort, loadBalancerCreateTimeout) // this may actually recreate the LB + + By("hitting the UDP service's LoadBalancer") + jig.TestReachableUDP(udpIngressIP, svcPort, loadBalancerCreateTimeout) // this may actually recreate the LB) + + // Change the services back to ClusterIP. + + By("changing TCP service " + serviceName + " back to type=ClusterIP") + tcpService = jig.UpdateServiceOrFail(ns1, tcpService.Name, func(s *api.Service) { + s.Spec.Type = api.ServiceTypeClusterIP + s.Spec.Ports[0].NodePort = 0 + }) + // Wait for the load balancer to be destroyed asynchronously + tcpService = jig.WaitForLoadBalancerDestroyOrFail(ns1, tcpService.Name, tcpIngressIP, svcPort) + jig.SanityCheckService(tcpService, api.ServiceTypeClusterIP) + + By("changing UDP service " + serviceName + " back to type=ClusterIP") + udpService = jig.UpdateServiceOrFail(ns2, udpService.Name, func(s *api.Service) { + s.Spec.Type = api.ServiceTypeClusterIP + s.Spec.Ports[0].NodePort = 0 + }) + // Wait for the load balancer to be destroyed asynchronously + udpService = jig.WaitForLoadBalancerDestroyOrFail(ns2, udpService.Name, udpIngressIP, svcPort) + jig.SanityCheckService(udpService, api.ServiceTypeClusterIP) + + By("checking the TCP NodePort is closed") + jig.TestNotReachableHTTP(nodeIP, tcpNodePort, kubeProxyLagTimeout) + + By("checking the UDP NodePort is closed") + jig.TestNotReachableUDP(nodeIP, udpNodePort, kubeProxyLagTimeout) + + By("checking the TCP LoadBalancer is closed") + jig.TestNotReachableHTTP(tcpIngressIP, svcPort, loadBalancerLagTimeout) + + By("checking the UDP LoadBalancer is closed") + jig.TestNotReachableUDP(udpIngressIP, svcPort, loadBalancerLagTimeout) }) It("should prevent NodePort collisions", func() { + // TODO: use the ServiceTestJig here baseName := "nodeport-collision-" serviceName1 := baseName + "1" serviceName2 := baseName + "2" @@ -663,6 +720,7 @@ var _ = Describe("Services", func() { }) It("should check NodePort out-of-range", func() { + // TODO: use the ServiceTestJig here serviceName := "nodeport-range-test" ns := f.Namespace.Name @@ -729,6 +787,7 @@ var _ = Describe("Services", func() { }) It("should release NodePorts on delete", func() { + // TODO: use the ServiceTestJig here serviceName := "nodeport-reuse" ns := f.Namespace.Name @@ -781,118 +840,6 @@ var _ = Describe("Services", func() { service, err = t.CreateService(service) Expect(err).NotTo(HaveOccurred()) }) - - // This test hits several load-balancer cases because LB turnup is slow. - // Flaky issue #18952 - It("should serve identically named services in different namespaces on different load-balancers [Flaky]", func() { - // requires ExternalLoadBalancer - SkipUnlessProviderIs("gce", "gke", "aws") - - ns1 := f.Namespace.Name - - By("Building a second namespace api object") - namespacePtr, err := createTestingNS("services", c, nil) - Expect(err).NotTo(HaveOccurred()) - ns2 := namespacePtr.Name - extraNamespaces = append(extraNamespaces, ns2) - - serviceName := "test-svc" - servicePort := 9376 - - By("creating service " + serviceName + " with load balancer in namespace " + ns1) - t1 := NewServerTest(c, ns1, serviceName) - svc1 := t1.BuildServiceSpec() - svc1.Spec.Type = api.ServiceTypeLoadBalancer - svc1.Spec.Ports[0].Port = servicePort - svc1.Spec.Ports[0].TargetPort = intstr.FromInt(80) - _, err = t1.CreateService(svc1) - Expect(err).NotTo(HaveOccurred()) - - By("creating pod to be part of service " + serviceName + " in namespace " + ns1) - t1.CreateWebserverRC(1) - - loadBalancerIP := "" - if providerIs("gce", "gke") { - By("creating a static IP") - rand.Seed(time.Now().UTC().UnixNano()) - staticIPName := fmt.Sprintf("e2e-external-lb-test-%d", rand.Intn(65535)) - loadBalancerIP, err = createGCEStaticIP(staticIPName) - Expect(err).NotTo(HaveOccurred()) - defer func() { - // Release GCE static IP - this is not kube-managed and will not be automatically released. - deleteGCEStaticIP(staticIPName) - }() - } - - By("creating service " + serviceName + " with UDP load balancer in namespace " + ns2) - t2 := NewNetcatTest(c, ns2, serviceName) - svc2 := t2.BuildServiceSpec() - svc2.Spec.Type = api.ServiceTypeLoadBalancer - svc2.Spec.Ports[0].Port = servicePort - // UDP loadbalancing is tested via test NetcatTest - svc2.Spec.Ports[0].Protocol = api.ProtocolUDP - svc2.Spec.Ports[0].TargetPort = intstr.FromInt(80) - svc2.Spec.LoadBalancerIP = loadBalancerIP - _, err = t2.CreateService(svc2) - Expect(err).NotTo(HaveOccurred()) - - By("creating pod to be part of service " + serviceName + " in namespace " + ns2) - t2.CreateNetcatRC(2) - - ingressPoints := []string{} - svcs := []*api.Service{svc1, svc2} - for _, svc := range svcs { - namespace := svc.Namespace - lbip := svc.Spec.LoadBalancerIP - // This isn't actually part of the test, but it has the net effect of deleting the target pool and forwarding - // rule, so that we don't leak them - defer removeExternalLoadBalancer(f, svc) - - // Wait for the load balancer to be created asynchronously, which is - // currently indicated by ingress point(s) being added to the status. - result, err := waitForLoadBalancerIngress(c, serviceName, namespace) - Expect(err).NotTo(HaveOccurred()) - if len(result.Status.LoadBalancer.Ingress) != 1 { - Failf("got unexpected number (%v) of ingress points for externally load balanced service: %v", result.Status.LoadBalancer.Ingress, result) - } - ingress := result.Status.LoadBalancer.Ingress[0] - if len(result.Spec.Ports) != 1 { - Failf("got unexpected len(Spec.Ports) for LoadBalancer service: %v", result) - } - if lbip != "" { - Expect(ingress.IP).To(Equal(lbip)) - } - port := result.Spec.Ports[0] - if port.NodePort == 0 { - Failf("got unexpected Spec.Ports[0].nodePort for LoadBalancer service: %v", result) - } - if !ServiceNodePortRange.Contains(port.NodePort) { - Failf("got unexpected (out-of-range) port for LoadBalancer service: %v", result) - } - ing := result.Status.LoadBalancer.Ingress[0].IP - if ing == "" { - ing = result.Status.LoadBalancer.Ingress[0].Hostname - } - ingressPoints = append(ingressPoints, ing) // Save 'em to check uniqueness - - if svc1.Spec.Ports[0].Protocol == api.ProtocolTCP { - By("hitting the pod through the service's NodePort") - ip := pickNodeIP(c) - if err := wait.PollImmediate(poll, kubeProxyLagTimeout, func() (bool, error) { return testReachable(ip, port.NodePort) }); err != nil { - Failf("Could not reach nodePort service through node-ip %v:%v in %v", ip, port.NodePort, kubeProxyLagTimeout) - } - By("hitting the pod through the service's external load balancer") - testLoadBalancerReachable(ingress, servicePort) - } else { - By("hitting the pod through the service's NodePort") - testNetcatReachable(pickNodeIP(c), port.NodePort) - - By("hitting the pod through the service's external load balancer") - testNetcatLoadBalancerReachable(ingress, servicePort) - } - } - validateUniqueOrFail(ingressPoints) - }) }) // updateService fetches a service, calls the update function on it, @@ -918,66 +865,6 @@ func updateService(c *client.Client, namespace, serviceName string, update func( return service, err } -func waitForLoadBalancerIngress(c *client.Client, serviceName, namespace string) (*api.Service, error) { - // TODO: once support ticket 21807001 is resolved, reduce this timeout back to something reasonable - const timeout = 20 * time.Minute - var service *api.Service - By(fmt.Sprintf("waiting up to %v for service %s in namespace %s to have a LoadBalancer ingress point", timeout, serviceName, namespace)) - i := 1 - for start := time.Now(); time.Since(start) < timeout; time.Sleep(3 * time.Second) { - service, err := c.Services(namespace).Get(serviceName) - if err != nil { - Logf("Get service failed, ignoring for 5s: %v", err) - continue - } - if len(service.Status.LoadBalancer.Ingress) > 0 { - return service, nil - } - if i%5 == 0 { - Logf("Waiting for service %s in namespace %s to have a LoadBalancer ingress point (%v)", serviceName, namespace, time.Since(start)) - } - i++ - } - return service, fmt.Errorf("service %s in namespace %s doesn't have a LoadBalancer ingress point after %.2f seconds", serviceName, namespace, timeout.Seconds()) -} - -func waitForLoadBalancerDestroy(c *client.Client, serviceIP, servicePort, serviceName, namespace string) (*api.Service, error) { - // TODO: once support ticket 21807001 is resolved, reduce this timeout back to something reasonable - const timeout = 10 * time.Minute - var service *api.Service - defer func() { - if err := EnsureLoadBalancerResourcesDeleted(serviceIP, servicePort); err != nil { - Logf("Failed to delete cloud resources for service: %s %s (%v)", serviceIP, servicePort, err) - } - }() - By(fmt.Sprintf("waiting up to %v for service %s in namespace %s to have no LoadBalancer ingress points", timeout, serviceName, namespace)) - for start := time.Now(); time.Since(start) < timeout; time.Sleep(5 * time.Second) { - service, err := c.Services(namespace).Get(serviceName) - if err != nil { - Logf("Get service failed, ignoring for 5s: %v", err) - continue - } - if len(service.Status.LoadBalancer.Ingress) == 0 { - return service, nil - } - Logf("Waiting for service %s in namespace %s to have no LoadBalancer ingress points (%v)", serviceName, namespace, time.Since(start)) - } - - return service, fmt.Errorf("service %s in namespace %s still has LoadBalancer ingress points after %.2f seconds", serviceName, namespace, timeout.Seconds()) -} - -func validateUniqueOrFail(s []string) { - By(fmt.Sprintf("validating unique: %v", s)) - sort.Strings(s) - var prev string - for i, elem := range s { - if i > 0 && elem == prev { - Fail("duplicate found: " + elem) - } - prev = elem - } -} - func getContainerPortsByPodUID(endpoints *api.Endpoints) PortsByPodUID { m := PortsByPodUID{} for _, ss := range endpoints.Subsets { @@ -1181,50 +1068,8 @@ func pickNodeIP(c *client.Client) string { return ip } -func testLoadBalancerReachable(ingress api.LoadBalancerIngress, port int) bool { - return testLoadBalancerReachableInTime(ingress, port, podStartTimeout) -} - -func testNetcatLoadBalancerReachable(ingress api.LoadBalancerIngress, port int) bool { - return testNetcatLoadBalancerReachableInTime(ingress, port, podStartTimeout) -} - -func conditionFuncDecorator(ip string, port int, fn func(string, int) (bool, error)) wait.ConditionFunc { - return func() (bool, error) { - return fn(ip, port) - } -} - -func testLoadBalancerReachableInTime(ingress api.LoadBalancerIngress, port int, timeout time.Duration) bool { - ip := ingress.IP - if ip == "" { - ip = ingress.Hostname - } - - return testReachableInTime(conditionFuncDecorator(ip, port, testReachable), timeout) - -} - -func testNetcatLoadBalancerReachableInTime(ingress api.LoadBalancerIngress, port int, timeout time.Duration) bool { - ip := ingress.IP - if ip == "" { - ip = ingress.Hostname - } - - return testReachableInTime(conditionFuncDecorator(ip, port, testNetcatReachable), timeout) -} - -func testLoadBalancerNotReachable(ingress api.LoadBalancerIngress, port int) { - ip := ingress.IP - if ip == "" { - ip = ingress.Hostname - } - - testNotReachable(ip, port) -} - -func testReachable(ip string, port int) (bool, error) { - url := fmt.Sprintf("http://%s:%d", ip, port) +func testReachableHTTP(ip string, port int, request string, expect string) (bool, error) { + url := fmt.Sprintf("http://%s:%d%s", ip, port, request) if ip == "" { Failf("Got empty IP for reachability check (%s)", url) return false, nil @@ -1234,11 +1079,11 @@ func testReachable(ip string, port int) (bool, error) { return false, nil } - Logf("Testing reachability of %v", url) + Logf("Testing HTTP reachability of %v", url) resp, err := httpGetNoConnectionPool(url) if err != nil { - Logf("Got error waiting for reachability of %s: %v", url, err) + Logf("Got error testing for reachability of %s: %v", url, err) return false, nil } defer resp.Body.Close() @@ -1250,14 +1095,36 @@ func testReachable(ip string, port int) (bool, error) { if resp.StatusCode != 200 { return false, fmt.Errorf("received non-success return status %q trying to access %s; got body: %s", resp.Status, url, string(body)) } - if !strings.Contains(string(body), "test-webserver") { - return false, fmt.Errorf("received response body without expected substring 'test-webserver': %s", string(body)) + if !strings.Contains(string(body), expect) { + return false, fmt.Errorf("received response body without expected substring %q: %s", expect, string(body)) } Logf("Successfully reached %v", url) return true, nil } -func testNetcatReachable(ip string, port int) (bool, error) { +func testNotReachableHTTP(ip string, port int) (bool, error) { + url := fmt.Sprintf("http://%s:%d", ip, port) + if ip == "" { + Failf("Got empty IP for non-reachability check (%s)", url) + return false, nil + } + if port == 0 { + Failf("Got port==0 for non-reachability check (%s)", url) + return false, nil + } + + Logf("Testing HTTP non-reachability of %v", url) + + resp, err := httpGetNoConnectionPool(url) + if err != nil { + Logf("Confirmed that %s is not reachable", url) + return true, nil + } + resp.Body.Close() + return false, nil +} + +func testReachableUDP(ip string, port int, request string, expect string) (bool, error) { uri := fmt.Sprintf("udp://%s:%d", ip, port) if ip == "" { Failf("Got empty IP for reachability check (%s)", uri) @@ -1268,70 +1135,77 @@ func testNetcatReachable(ip string, port int) (bool, error) { return false, nil } - Logf("Testing reachability of %v", uri) + Logf("Testing UDP reachability of %v", uri) - con, err := net.Dial("udp", ip+":"+string(port)) + con, err := net.Dial("udp", ip+":"+strconv.Itoa(port)) if err != nil { - return false, fmt.Errorf("Failed to connect to: %s:%d (%s)", ip, port, err.Error()) + return false, fmt.Errorf("Failed to dial %s:%d: %v", ip, port, err) } - _, err = con.Write([]byte("\n")) + _, err = con.Write([]byte(fmt.Sprintf("%s\n", request))) if err != nil { - return false, fmt.Errorf("Failed to send newline: %s", err.Error()) + return false, fmt.Errorf("Failed to send request: %v", err) } - var buf []byte = make([]byte, len("SUCCESS")+1) + var buf []byte = make([]byte, len(expect)+1) + + err = con.SetDeadline(time.Now().Add(3 * time.Second)) + if err != nil { + return false, fmt.Errorf("Failed to set deadline: %v", err) + } _, err = con.Read(buf) if err != nil { - return false, fmt.Errorf("Failed to read result: %s", err.Error()) + return false, nil } - if !strings.HasPrefix(string(buf), "SUCCESS") { - return false, fmt.Errorf("Failed to retrieve: \"SUCCESS\"") + if !strings.Contains(string(buf), expect) { + return false, fmt.Errorf("Failed to retrieve %q, got %q", expect, string(buf)) } - Logf("Successfully retrieved \"SUCCESS\"") + Logf("Successfully reached %v", uri) return true, nil } -func testReachableInTime(testFunc wait.ConditionFunc, timeout time.Duration) bool { - By(fmt.Sprintf("Waiting up to %v", timeout)) - err := wait.PollImmediate(poll, timeout, testFunc) - if err != nil { - Expect(err).NotTo(HaveOccurred(), "Error waiting") - return false - } - return true -} - -func testNotReachable(ip string, port int) { - url := fmt.Sprintf("http://%s:%d", ip, port) +func testNotReachableUDP(ip string, port int, request string) (bool, error) { + uri := fmt.Sprintf("udp://%s:%d", ip, port) if ip == "" { - Failf("Got empty IP for non-reachability check (%s)", url) + Failf("Got empty IP for reachability check (%s)", uri) + return false, nil } if port == 0 { - Failf("Got port==0 for non-reachability check (%s)", url) + Failf("Got port==0 for reachability check (%s)", uri) + return false, nil } - desc := fmt.Sprintf("the url %s to be *not* reachable", url) - By(fmt.Sprintf("Waiting up to %v for %s", podStartTimeout, desc)) - err := wait.PollImmediate(poll, podStartTimeout, func() (bool, error) { - resp, err := httpGetNoConnectionPool(url) - if err != nil { - Logf("Successfully waited for %s", desc) - return true, nil - } - defer resp.Body.Close() - body, err := ioutil.ReadAll(resp.Body) - if err != nil { - Logf("Expecting %s to be unreachable but was reachable and got an error reading response: %v", url, err) - return false, nil - } - Logf("Able to reach service %s when should no longer have been reachable, status: %q and body: %s", url, resp.Status, string(body)) - return false, nil - }) - Expect(err).NotTo(HaveOccurred(), "Error waiting for %s", desc) + Logf("Testing UDP non-reachability of %v", uri) + + con, err := net.Dial("udp", ip+":"+strconv.Itoa(port)) + if err != nil { + Logf("Confirmed that %s is not reachable", uri) + return true, nil + } + + _, err = con.Write([]byte(fmt.Sprintf("%s\n", request))) + if err != nil { + Logf("Confirmed that %s is not reachable", uri) + return true, nil + } + + var buf []byte = make([]byte, 1) + + err = con.SetDeadline(time.Now().Add(3 * time.Second)) + if err != nil { + return false, fmt.Errorf("Failed to set deadline: %v", err) + } + + _, err = con.Read(buf) + if err != nil { + Logf("Confirmed that %s is not reachable", uri) + return true, nil + } + + return false, nil } // Creates a replication controller that serves its hostname and a service on top of it. @@ -1502,6 +1376,349 @@ func httpGetNoConnectionPool(url string) (*http.Response, error) { return client.Get(url) } +// A test jig to help testing. +type ServiceTestJig struct { + ID string + Name string + Client *client.Client + Labels map[string]string +} + +// NewServiceTestJig allocates and inits a new ServiceTestJig. +func NewServiceTestJig(client *client.Client, name string) *ServiceTestJig { + j := &ServiceTestJig{} + j.Client = client + j.Name = name + j.ID = j.Name + "-" + string(util.NewUUID()) + j.Labels = map[string]string{"testid": j.ID} + + return j +} + +// newServiceTemplate returns the default api.Service template for this jig, but +// does not actually create the Service. The default Service has the same name +// as the jig and exposes port 80. +func (j *ServiceTestJig) newServiceTemplate(namespace string, proto api.Protocol) *api.Service { + service := &api.Service{ + ObjectMeta: api.ObjectMeta{ + Namespace: namespace, + Name: j.Name, + Labels: j.Labels, + }, + Spec: api.ServiceSpec{ + Selector: j.Labels, + Ports: []api.ServicePort{ + { + Protocol: proto, + Port: 80, + }, + }, + }, + } + return service +} + +// CreateTCPServiceOrFail creates a new TCP Service based on the jig's +// defaults. Callers can provide a function to tweak the Service object before +// it is created. +func (j *ServiceTestJig) CreateTCPServiceOrFail(namespace string, tweak func(svc *api.Service)) *api.Service { + svc := j.newServiceTemplate(namespace, api.ProtocolTCP) + if tweak != nil { + tweak(svc) + } + result, err := j.Client.Services(namespace).Create(svc) + if err != nil { + Failf("Failed to create TCP Service %q: %v", svc.Name, err) + } + return result +} + +// CreateUDPServiceOrFail creates a new UDP Service based on the jig's +// defaults. Callers can provide a function to tweak the Service object before +// it is created. +func (j *ServiceTestJig) CreateUDPServiceOrFail(namespace string, tweak func(svc *api.Service)) *api.Service { + svc := j.newServiceTemplate(namespace, api.ProtocolUDP) + if tweak != nil { + tweak(svc) + } + result, err := j.Client.Services(namespace).Create(svc) + if err != nil { + Failf("Failed to create UDP Service %q: %v", svc.Name, err) + } + return result +} + +func (j *ServiceTestJig) SanityCheckService(svc *api.Service, svcType api.ServiceType) { + if svc.Spec.Type != svcType { + Failf("unexpected Spec.Type (%s) for service, expected %s", svc.Spec.Type, svcType) + } + expectNodePorts := false + if svcType != api.ServiceTypeClusterIP { + expectNodePorts = true + } + for i, port := range svc.Spec.Ports { + hasNodePort := (port.NodePort != 0) + if hasNodePort != expectNodePorts { + Failf("unexpected Spec.Ports[%d].NodePort (%d) for service", i, port.NodePort) + } + if hasNodePort { + if !ServiceNodePortRange.Contains(port.NodePort) { + Failf("out-of-range nodePort (%d) for service", port.NodePort) + } + } + } + expectIngress := false + if svcType == api.ServiceTypeLoadBalancer { + expectIngress = true + } + hasIngress := len(svc.Status.LoadBalancer.Ingress) != 0 + if hasIngress != expectIngress { + Failf("unexpected number of Status.LoadBalancer.Ingress (%d) for service", len(svc.Status.LoadBalancer.Ingress)) + } + if hasIngress { + for i, ing := range svc.Status.LoadBalancer.Ingress { + if ing.IP == "" && ing.Hostname == "" { + Failf("unexpected Status.LoadBalancer.Ingress[%d] for service: %#v", i, ing) + } + } + } +} + +// UpdateService fetches a service, calls the update function on it, and +// then attempts to send the updated service. It tries up to 3 times in the +// face of timeouts and conflicts. +func (j *ServiceTestJig) UpdateService(namespace, name string, update func(*api.Service)) (*api.Service, error) { + for i := 0; i < 3; i++ { + service, err := j.Client.Services(namespace).Get(name) + if err != nil { + return nil, fmt.Errorf("Failed to get Service %q: %v", name, err) + } + + update(service) + service, err = j.Client.Services(namespace).Update(service) + if err == nil { + return service, nil + } + if !errors.IsConflict(err) && !errors.IsServerTimeout(err) { + return nil, fmt.Errorf("Failed to update Service %q: %v", name, err) + } + } + return nil, fmt.Errorf("Too many retries updating Service %q", name) +} + +// UpdateServiceOrFail fetches a service, calls the update function on it, and +// then attempts to send the updated service. It tries up to 3 times in the +// face of timeouts and conflicts. +func (j *ServiceTestJig) UpdateServiceOrFail(namespace, name string, update func(*api.Service)) *api.Service { + svc, err := j.UpdateService(namespace, name, update) + if err != nil { + Failf(err.Error()) + } + return svc +} + +func (j *ServiceTestJig) ChangeServiceNodePortOrFail(namespace, name string, initial int) *api.Service { + var err error + var service *api.Service + for i := 1; i < ServiceNodePortRange.Size; i++ { + offs1 := initial - ServiceNodePortRange.Base + offs2 := (offs1 + i) % ServiceNodePortRange.Size + newPort := ServiceNodePortRange.Base + offs2 + service, err = j.UpdateService(namespace, name, func(s *api.Service) { + s.Spec.Ports[0].NodePort = newPort + }) + if err != nil && strings.Contains(err.Error(), "provided port is already allocated") { + Logf("tried nodePort %d, but it is in use, will try another", newPort) + continue + } + // Otherwise err was nil or err was a real error + break + } + if err != nil { + Failf("Could not change the nodePort: %v", err) + } + return service +} + +func (j *ServiceTestJig) WaitForLoadBalancerOrFail(namespace, name string) *api.Service { + var service *api.Service + Logf("Waiting up to %v for service %q to have a LoadBalancer", loadBalancerCreateTimeout, name) + pollFunc := func() (bool, error) { + svc, err := j.Client.Services(namespace).Get(name) + if err != nil { + return false, err + } + if len(svc.Status.LoadBalancer.Ingress) > 0 { + service = svc + return true, nil + } + return false, nil + } + if err := wait.PollImmediate(poll, loadBalancerCreateTimeout, pollFunc); err != nil { + Failf("Timeout waiting for service %q to have a load balancer", name) + } + return service +} + +func (j *ServiceTestJig) WaitForLoadBalancerDestroyOrFail(namespace, name string, ip string, port int) *api.Service { + // TODO: once support ticket 21807001 is resolved, reduce this timeout back to something reasonable + defer func() { + if err := EnsureLoadBalancerResourcesDeleted(ip, strconv.Itoa(port)); err != nil { + Logf("Failed to delete cloud resources for service: %s %d (%v)", ip, port, err) + } + }() + + var service *api.Service + Logf("Waiting up to %v for service %q to have no LoadBalancer", loadBalancerCreateTimeout, name) + pollFunc := func() (bool, error) { + svc, err := j.Client.Services(namespace).Get(name) + if err != nil { + return false, err + } + if len(svc.Status.LoadBalancer.Ingress) == 0 { + service = svc + return true, nil + } + return false, nil + } + if err := wait.PollImmediate(poll, loadBalancerCreateTimeout, pollFunc); err != nil { + Failf("Timeout waiting for service %q to have no load balancer", name) + } + return service +} + +func (j *ServiceTestJig) TestReachableHTTP(host string, port int, timeout time.Duration) { + if err := wait.PollImmediate(poll, timeout, func() (bool, error) { return testReachableHTTP(host, port, "/echo?msg=hello", "hello") }); err != nil { + Failf("Could not reach HTTP service through %v:%v after %v: %v", host, port, timeout, err) + } +} + +func (j *ServiceTestJig) TestNotReachableHTTP(host string, port int, timeout time.Duration) { + if err := wait.PollImmediate(poll, timeout, func() (bool, error) { return testNotReachableHTTP(host, port) }); err != nil { + Failf("Could still reach HTTP service through %v:%v after %v: %v", host, port, timeout, err) + } +} + +func (j *ServiceTestJig) TestReachableUDP(host string, port int, timeout time.Duration) { + if err := wait.PollImmediate(poll, timeout, func() (bool, error) { return testReachableUDP(host, port, "echo hello", "hello") }); err != nil { + Failf("Could not reach UDP service through %v:%v after %v: %v", host, port, timeout, err) + } +} + +func (j *ServiceTestJig) TestNotReachableUDP(host string, port int, timeout time.Duration) { + if err := wait.PollImmediate(poll, timeout, func() (bool, error) { return testNotReachableUDP(host, port, "echo hello") }); err != nil { + Failf("Could still reach UDP service through %v:%v after %v: %v", host, port, timeout, err) + } +} + +func getIngressPoint(ing *api.LoadBalancerIngress) string { + host := ing.IP + if host == "" { + host = ing.Hostname + } + return host +} + +// newRCTemplate returns the default api.ReplicationController object for +// this jig, but does not actually create the RC. The default RC has the same +// name as the jig and runs the "netexec" container. +func (j *ServiceTestJig) newRCTemplate(namespace string) *api.ReplicationController { + rc := &api.ReplicationController{ + ObjectMeta: api.ObjectMeta{ + Namespace: namespace, + Name: j.Name, + Labels: j.Labels, + }, + Spec: api.ReplicationControllerSpec{ + Replicas: 1, + Selector: j.Labels, + Template: &api.PodTemplateSpec{ + ObjectMeta: api.ObjectMeta{ + Labels: j.Labels, + }, + Spec: api.PodSpec{ + Containers: []api.Container{ + { + Name: "netexec", + Image: "gcr.io/google_containers/netexec:1.4", + Args: []string{"--http-port=80", "--udp-port=80"}, + ReadinessProbe: &api.Probe{ + PeriodSeconds: 3, + Handler: api.Handler{ + HTTPGet: &api.HTTPGetAction{ + Port: intstr.FromInt(80), + Path: "/hostName", + }, + }, + }, + }, + }, + TerminationGracePeriodSeconds: new(int64), + }, + }, + }, + } + return rc +} + +// RunOrFail creates a ReplicationController and Pod(s) and waits for the +// Pod(s) to be running. Callers can provide a function to tweak the RC object +// before it is created. +func (j *ServiceTestJig) RunOrFail(namespace string, tweak func(rc *api.ReplicationController)) *api.ReplicationController { + rc := j.newRCTemplate(namespace) + if tweak != nil { + tweak(rc) + } + result, err := j.Client.ReplicationControllers(namespace).Create(rc) + if err != nil { + Failf("Failed to created RC %q: %v", rc.Name, err) + } + pods, err := j.waitForPodsCreated(namespace, rc.Spec.Replicas) + if err != nil { + Failf("Failed to create pods: %v", err) + } + if err := j.waitForPodsReady(namespace, pods); err != nil { + Failf("Failed waiting for pods to be running: %v", err) + } + return result +} + +func (j *ServiceTestJig) waitForPodsCreated(namespace string, replicas int) ([]string, error) { + timeout := 2 * time.Minute + // List the pods, making sure we observe all the replicas. + label := labels.SelectorFromSet(labels.Set(j.Labels)) + Logf("Waiting up to %v for %d pods to be created", timeout, replicas) + for start := time.Now(); time.Since(start) < timeout; time.Sleep(2 * time.Second) { + options := api.ListOptions{LabelSelector: label} + pods, err := j.Client.Pods(namespace).List(options) + if err != nil { + return nil, err + } + + found := []string{} + for _, pod := range pods.Items { + if pod.DeletionTimestamp != nil { + continue + } + found = append(found, pod.Name) + } + if len(found) == replicas { + Logf("Found all %d pods", replicas) + return found, nil + } + Logf("Found %d/%d pods - will retry", len(found), replicas) + } + return nil, fmt.Errorf("Timeout waiting for %d pods to be created", replicas) +} + +func (j *ServiceTestJig) waitForPodsReady(namespace string, pods []string) error { + timeout := 2 * time.Minute + if !checkPodsRunningReady(j.Client, namespace, pods, timeout) { + return fmt.Errorf("Timeout waiting for %d pods to be ready") + } + return nil +} + // Simple helper class to avoid too much boilerplate in tests type ServiceTestFixture struct { ServiceName string @@ -1536,25 +1753,6 @@ func NewServerTest(client *client.Client, namespace string, serviceName string) return t } -func NewNetcatTest(client *client.Client, namespace string, serviceName string) *ServiceTestFixture { - t := &ServiceTestFixture{} - t.Client = client - t.Namespace = namespace - t.ServiceName = serviceName - t.TestId = t.ServiceName + "-" + string(util.NewUUID()) - t.Labels = map[string]string{ - "testid": t.TestId, - } - - t.rcs = make(map[string]bool) - t.services = make(map[string]bool) - - t.name = "netcat" - t.image = "ubuntu" - - return t -} - // Build default config for a service (which can then be changed) func (t *ServiceTestFixture) BuildServiceSpec() *api.Service { service := &api.Service{ @@ -1587,22 +1785,6 @@ func (t *ServiceTestFixture) CreateWebserverRC(replicas int) *api.ReplicationCon return rcAct } -// CreateNetcatRC creates rc-backed pods with a netcat listener -// configuration and records it for cleanup. -func (t *ServiceTestFixture) CreateNetcatRC(replicas int) *api.ReplicationController { - rcSpec := rcByNamePort(t.name, replicas, t.image, 80, api.ProtocolUDP, t.Labels) - rcSpec.Spec.Template.Spec.Containers[0].Command = []string{"/bin/bash"} - rcSpec.Spec.Template.Spec.Containers[0].Args = []string{"-c", "echo SUCCESS | nc -q 0 -u -l 0.0.0.0 80"} - rcAct, err := t.createRC(rcSpec) - if err != nil { - Failf("Failed to create rc %s: %v", rcSpec.Name, err) - } - if err := verifyPods(t.Client, t.Namespace, t.name, false, replicas); err != nil { - Failf("Failed to create %d pods with name %s: %v", replicas, t.name, err) - } - return rcAct -} - // createRC creates a replication controller and records it for cleanup. func (t *ServiceTestFixture) createRC(rc *api.ReplicationController) (*api.ReplicationController, error) { rc, err := t.Client.ReplicationControllers(t.Namespace).Create(rc) @@ -1661,35 +1843,3 @@ func (t *ServiceTestFixture) Cleanup() []error { return errs } - -func removeExternalLoadBalancer(f *Framework, svc *api.Service) { - By("changing service " + svc.Name + " back to type=ClusterIP") - service, err := updateService(f.Client, f.Namespace.Name, svc.Name, func(s *api.Service) { - s.Spec.Type = api.ServiceTypeClusterIP - s.Spec.Ports[0].NodePort = 0 - }) - Expect(err).NotTo(HaveOccurred()) - - // Updating the service type shouldn't change the Status immediately. The status should be - // updated after waitForLoadBalancerDestroy. - if len(service.Status.LoadBalancer.Ingress) == 0 { - Failf("got unexpected len(Status.LoadBalancer.Ingress) for NodePort service: %v", service) - } - if service.Spec.Type != api.ServiceTypeClusterIP { - Failf("got unexpected Spec.Type for back-to-ClusterIP service: %v", service) - } - if len(service.Spec.Ports) != 1 { - Failf("got unexpected len(Spec.Ports) for back-to-ClusterIP service: %v", service) - } - if service.Spec.Ports[0].NodePort != 0 { - Failf("got unexpected Spec.Ports[0].nodePort for back-to-ClusterIP service: %v", service) - } - - // Wait for the load balancer to be destroyed asynchronously - service, err = waitForLoadBalancerDestroy(f.Client, svc.Status.LoadBalancer.Ingress[0].IP, strconv.Itoa(svc.Spec.Ports[0].Port), svc.Name, f.Namespace.Name) - Expect(err).NotTo(HaveOccurred()) - - if len(service.Status.LoadBalancer.Ingress) != 0 { - Failf("got unexpected len(Status.LoadBalancer.Ingress) for back-to-ClusterIP service: %v", service) - } -} diff --git a/test/e2e/util.go b/test/e2e/util.go index ee5a4852495..810153fc0ec 100644 --- a/test/e2e/util.go +++ b/test/e2e/util.go @@ -744,13 +744,13 @@ func deleteNS(c *client.Client, namespace string, timeout time.Duration) error { return nil } -// Waits default ammount of time (podStartTimeout) for the specified pod to become running. +// Waits default amount of time (podStartTimeout) for the specified pod to become running. // Returns an error if timeout occurs first, or pod goes in to failed state. func waitForPodRunningInNamespace(c *client.Client, podName string, namespace string) error { return waitTimeoutForPodRunningInNamespace(c, podName, namespace, podStartTimeout) } -// Waits an extended ammount of time (slowPodStartTimeout) for the specified pod to become running. +// Waits an extended amount of time (slowPodStartTimeout) for the specified pod to become running. // Returns an error if timeout occurs first, or pod goes in to failed state. func waitForPodRunningInNamespaceSlow(c *client.Client, podName string, namespace string) error { return waitTimeoutForPodRunningInNamespace(c, podName, namespace, slowPodStartTimeout) @@ -2340,7 +2340,7 @@ func getSigner(provider string) (ssh.Signer, error) { // in namespace ns are running and ready, using c and waiting at most timeout. func checkPodsRunningReady(c *client.Client, ns string, podNames []string, timeout time.Duration) bool { np, desc := len(podNames), "running and ready" - Logf("Waiting up to %v for the following %d pods to be %s: %s", timeout, np, desc, podNames) + Logf("Waiting up to %v for %d pods to be %s: %s", timeout, np, desc, podNames) result := make(chan bool, len(podNames)) for ix := range podNames { // Launch off pod readiness checkers. From 11f75e61b971b97bfc019b03f87f2633216069c9 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Wed, 13 Jan 2016 12:07:18 -0800 Subject: [PATCH 087/328] Inject a kernel-compat tester for kube-proxy test --- cmd/kube-proxy/app/server.go | 20 +++++----- cmd/kube-proxy/app/server_test.go | 61 ++++++++++++++++++++++++++++--- pkg/proxy/iptables/proxier.go | 27 ++++++++++---- 3 files changed, 85 insertions(+), 23 deletions(-) diff --git a/cmd/kube-proxy/app/server.go b/cmd/kube-proxy/app/server.go index 4941908cf74..7161cc21e21 100644 --- a/cmd/kube-proxy/app/server.go +++ b/cmd/kube-proxy/app/server.go @@ -184,7 +184,7 @@ func NewProxyServerDefault(config *options.ProxyServerConfig) (*ProxyServer, err var proxier proxy.ProxyProvider var endpointsHandler proxyconfig.EndpointsConfigHandler - proxyMode := getProxyMode(string(config.Mode), client.Nodes(), hostname, iptInterface) + proxyMode := getProxyMode(string(config.Mode), client.Nodes(), hostname, iptInterface, iptables.LinuxKernelCompatTester{}) if proxyMode == proxyModeIptables { glog.V(2).Info("Using iptables Proxier.") proxierIptables, err := iptables.NewProxier(iptInterface, execer, config.IPTablesSyncPeriod.Duration, config.MasqueradeAll) @@ -301,28 +301,28 @@ type nodeGetter interface { Get(hostname string) (*api.Node, error) } -func getProxyMode(proxyMode string, client nodeGetter, hostname string, iptver iptables.IptablesVersioner) string { +func getProxyMode(proxyMode string, client nodeGetter, hostname string, iptver iptables.IptablesVersioner, kcompat iptables.KernelCompatTester) string { if proxyMode == proxyModeUserspace { return proxyModeUserspace } else if proxyMode == proxyModeIptables { - return tryIptablesProxy(iptver) + return tryIptablesProxy(iptver, kcompat) } else if proxyMode != "" { glog.V(1).Infof("Flag proxy-mode=%q unknown, assuming iptables proxy", proxyMode) - return tryIptablesProxy(iptver) + return tryIptablesProxy(iptver, kcompat) } // proxyMode == "" - choose the best option. if client == nil { glog.Errorf("nodeGetter is nil: assuming iptables proxy") - return tryIptablesProxy(iptver) + return tryIptablesProxy(iptver, kcompat) } node, err := client.Get(hostname) if err != nil { glog.Errorf("Can't get Node %q, assuming iptables proxy: %v", hostname, err) - return tryIptablesProxy(iptver) + return tryIptablesProxy(iptver, kcompat) } if node == nil { glog.Errorf("Got nil Node %q, assuming iptables proxy: %v", hostname) - return tryIptablesProxy(iptver) + return tryIptablesProxy(iptver, kcompat) } proxyMode, found := node.Annotations[betaProxyModeAnnotation] if found { @@ -338,13 +338,13 @@ func getProxyMode(proxyMode string, client nodeGetter, hostname string, iptver i glog.V(1).Infof("Annotation demands userspace proxy") return proxyModeUserspace } - return tryIptablesProxy(iptver) + return tryIptablesProxy(iptver, kcompat) } -func tryIptablesProxy(iptver iptables.IptablesVersioner) string { +func tryIptablesProxy(iptver iptables.IptablesVersioner, kcompat iptables.KernelCompatTester) string { var err error // guaranteed false on error, error only necessary for debugging - useIptablesProxy, err := iptables.CanUseIptablesProxier(iptver) + useIptablesProxy, err := iptables.CanUseIptablesProxier(iptver, kcompat) if err != nil { glog.Errorf("Can't determine whether to use iptables proxy, using userspace proxier: %v", err) return proxyModeUserspace diff --git a/cmd/kube-proxy/app/server_test.go b/cmd/kube-proxy/app/server_test.go index 6e69a05b87d..21562f28323 100644 --- a/cmd/kube-proxy/app/server_test.go +++ b/cmd/kube-proxy/app/server_test.go @@ -45,6 +45,17 @@ func (fake *fakeIptablesVersioner) GetVersion() (string, error) { return fake.version, fake.err } +type fakeKernelCompatTester struct { + ok bool +} + +func (fake *fakeKernelCompatTester) IsCompatible() error { + if !fake.ok { + return fmt.Errorf("error") + } + return nil +} + func Test_getProxyMode(t *testing.T) { if runtime.GOOS != "linux" { t.Skip("skipping on non-Linux") @@ -54,6 +65,7 @@ func Test_getProxyMode(t *testing.T) { annotationKey string annotationVal string iptablesVersion string + kernelCompat bool iptablesError error expected string }{ @@ -71,9 +83,16 @@ func Test_getProxyMode(t *testing.T) { iptablesVersion: "0.0.0", expected: proxyModeUserspace, }, - { // flag says iptables, version ok + { // flag says iptables, version ok, kernel not compatible flag: "iptables", iptablesVersion: iptables.MinCheckVersion, + kernelCompat: false, + expected: proxyModeUserspace, + }, + { // flag says iptables, version ok, kernel is compatible + flag: "iptables", + iptablesVersion: iptables.MinCheckVersion, + kernelCompat: true, expected: proxyModeIptables, }, { // detect, error @@ -86,9 +105,16 @@ func Test_getProxyMode(t *testing.T) { iptablesVersion: "0.0.0", expected: proxyModeUserspace, }, - { // detect, version ok + { // detect, version ok, kernel not compatible flag: "", iptablesVersion: iptables.MinCheckVersion, + kernelCompat: false, + expected: proxyModeUserspace, + }, + { // detect, version ok, kernel is compatible + flag: "", + iptablesVersion: iptables.MinCheckVersion, + kernelCompat: true, expected: proxyModeIptables, }, { // annotation says userspace @@ -111,11 +137,20 @@ func Test_getProxyMode(t *testing.T) { iptablesVersion: "0.0.0", expected: proxyModeUserspace, }, - { // annotation says iptables, version ok + { // annotation says iptables, version ok, kernel not compatible flag: "", annotationKey: "net.experimental.kubernetes.io/proxy-mode", annotationVal: "iptables", iptablesVersion: iptables.MinCheckVersion, + kernelCompat: false, + expected: proxyModeUserspace, + }, + { // annotation says iptables, version ok, kernel is compatible + flag: "", + annotationKey: "net.experimental.kubernetes.io/proxy-mode", + annotationVal: "iptables", + iptablesVersion: iptables.MinCheckVersion, + kernelCompat: true, expected: proxyModeIptables, }, { // annotation says something else, version ok @@ -123,6 +158,7 @@ func Test_getProxyMode(t *testing.T) { annotationKey: "net.experimental.kubernetes.io/proxy-mode", annotationVal: "other", iptablesVersion: iptables.MinCheckVersion, + kernelCompat: true, expected: proxyModeIptables, }, { // annotation says nothing, version ok @@ -130,6 +166,7 @@ func Test_getProxyMode(t *testing.T) { annotationKey: "net.experimental.kubernetes.io/proxy-mode", annotationVal: "", iptablesVersion: iptables.MinCheckVersion, + kernelCompat: true, expected: proxyModeIptables, }, { // annotation says userspace @@ -152,11 +189,20 @@ func Test_getProxyMode(t *testing.T) { iptablesVersion: "0.0.0", expected: proxyModeUserspace, }, - { // annotation says iptables, version ok + { // annotation says iptables, version ok, kernel not compatible flag: "", annotationKey: "net.beta.kubernetes.io/proxy-mode", annotationVal: "iptables", iptablesVersion: iptables.MinCheckVersion, + kernelCompat: false, + expected: proxyModeUserspace, + }, + { // annotation says iptables, version ok, kernel is compatible + flag: "", + annotationKey: "net.beta.kubernetes.io/proxy-mode", + annotationVal: "iptables", + iptablesVersion: iptables.MinCheckVersion, + kernelCompat: true, expected: proxyModeIptables, }, { // annotation says something else, version ok @@ -164,6 +210,7 @@ func Test_getProxyMode(t *testing.T) { annotationKey: "net.beta.kubernetes.io/proxy-mode", annotationVal: "other", iptablesVersion: iptables.MinCheckVersion, + kernelCompat: true, expected: proxyModeIptables, }, { // annotation says nothing, version ok @@ -171,6 +218,7 @@ func Test_getProxyMode(t *testing.T) { annotationKey: "net.beta.kubernetes.io/proxy-mode", annotationVal: "", iptablesVersion: iptables.MinCheckVersion, + kernelCompat: true, expected: proxyModeIptables, }, { // flag says userspace, annotation disagrees @@ -185,6 +233,7 @@ func Test_getProxyMode(t *testing.T) { annotationKey: "net.experimental.kubernetes.io/proxy-mode", annotationVal: "userspace", iptablesVersion: iptables.MinCheckVersion, + kernelCompat: true, expected: proxyModeIptables, }, { // flag says userspace, annotation disagrees @@ -199,6 +248,7 @@ func Test_getProxyMode(t *testing.T) { annotationKey: "net.beta.kubernetes.io/proxy-mode", annotationVal: "userspace", iptablesVersion: iptables.MinCheckVersion, + kernelCompat: true, expected: proxyModeIptables, }, } @@ -206,7 +256,8 @@ func Test_getProxyMode(t *testing.T) { getter := &fakeNodeInterface{} getter.node.Annotations = map[string]string{c.annotationKey: c.annotationVal} versioner := &fakeIptablesVersioner{c.iptablesVersion, c.iptablesError} - r := getProxyMode(c.flag, getter, "host", versioner) + kcompater := &fakeKernelCompatTester{c.kernelCompat} + r := getProxyMode(c.flag, getter, "host", versioner, kcompater) if r != c.expected { t.Errorf("Case[%d] Expected %q, got %q", i, c.expected, r) } diff --git a/pkg/proxy/iptables/proxier.go b/pkg/proxy/iptables/proxier.go index 236aeebf300..a406e427a60 100644 --- a/pkg/proxy/iptables/proxier.go +++ b/pkg/proxy/iptables/proxier.go @@ -68,12 +68,18 @@ type IptablesVersioner interface { GetVersion() (string, error) } +// KernelCompatTester tests whether the required kernel capabilities are +// present to run the iptables proxier. +type KernelCompatTester interface { + IsCompatible() error +} + // CanUseIptablesProxier returns true if we should use the iptables Proxier // instead of the "classic" userspace Proxier. This is determined by checking // the iptables version and for the existence of kernel features. It may return // an error if it fails to get the iptables version without error, in which // case it will also return false. -func CanUseIptablesProxier(iptver IptablesVersioner) (bool, error) { +func CanUseIptablesProxier(iptver IptablesVersioner, kcompat KernelCompatTester) (bool, error) { minVersion, err := semver.NewVersion(iptablesMinVersion) if err != nil { return false, err @@ -91,18 +97,23 @@ func CanUseIptablesProxier(iptver IptablesVersioner) (bool, error) { return false, nil } - // Check for the required sysctls. We don't care about the value, just - // that it exists. If this Proxier is chosen, we'll iniialize it as we - // need. - // TODO: we should inject a sysctl.Interface like we do for iptables - _, err = utilsysctl.GetSysctl(sysctlRouteLocalnet) - if err != nil { + // Check that the kernel supports what we need. + if err := kcompat.IsCompatible(); err != nil { return false, err } - return true, nil } +type LinuxKernelCompatTester struct{} + +func (lkct LinuxKernelCompatTester) IsCompatible() error { + // Check for the required sysctls. We don't care about the value, just + // that it exists. If this Proxier is chosen, we'll initialize it as we + // need. + _, err := utilsysctl.GetSysctl(sysctlRouteLocalnet) + return err +} + const sysctlRouteLocalnet = "net/ipv4/conf/all/route_localnet" const sysctlBridgeCallIptables = "net/bridge/bridge-nf-call-iptables" From ba5608a7e4f97d597b8353f31bef721a007fb9cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20K=C3=A4ldstr=C3=B6m?= Date: Wed, 3 Feb 2016 08:31:49 +0200 Subject: [PATCH 088/328] Update ginkgo and bolt Godeps so k8s builds on ARM64 --- Godeps/Godeps.json | 8 +- .../src/github.com/boltdb/bolt/Makefile | 50 +--- .../src/github.com/boltdb/bolt/README.md | 269 ++++++++++++++++-- .../src/github.com/boltdb/bolt/batch.go | 138 --------- .../src/github.com/boltdb/bolt/bolt_arm64.go | 9 + .../src/github.com/boltdb/bolt/bolt_linux.go | 2 - .../github.com/boltdb/bolt/bolt_openbsd.go | 2 - .../github.com/boltdb/bolt/bolt_ppc64le.go | 9 + .../src/github.com/boltdb/bolt/bolt_s390x.go | 9 + .../src/github.com/boltdb/bolt/bolt_unix.go | 13 +- .../boltdb/bolt/bolt_unix_solaris.go | 15 +- .../github.com/boltdb/bolt/bolt_windows.go | 62 +++- .../github.com/boltdb/bolt/boltsync_unix.go | 2 - .../src/github.com/boltdb/bolt/bucket.go | 9 +- .../github.com/boltdb/bolt/cmd/bolt/main.go | 5 +- .../src/github.com/boltdb/bolt/cursor.go | 54 ++-- .../src/github.com/boltdb/bolt/db.go | 212 +++++++++++++- .../src/github.com/boltdb/bolt/tx.go | 47 ++- .../src/github.com/onsi/ginkgo/.travis.yml | 5 +- .../src/github.com/onsi/ginkgo/CHANGELOG.md | 1 + .../github.com/onsi/ginkgo/config/config.go | 2 +- .../onsi/ginkgo/extensions/table/table.go | 98 +++++++ .../ginkgo/extensions/table/table_entry.go | 81 ++++++ .../onsi/ginkgo/ginkgo/nodot_command.go | 2 + .../ginkgo/ginkgo/testrunner/test_runner.go | 52 +++- .../ginkgo/ginkgo/testsuite/test_suite.go | 10 + .../onsi/ginkgo/ginkgo/unfocus_command.go | 2 + .../onsi/ginkgo/ginkgo/watch_command.go | 2 +- .../src/github.com/onsi/ginkgo/ginkgo_dsl.go | 22 ++ .../onsi/ginkgo/internal/leafnodes/runner.go | 8 +- .../remote/output_interceptor_unix.go | 9 +- .../remote/syscall_dup_linux_arm64.go | 11 + .../internal/remote/syscall_dup_unix.go | 10 + .../reporters/stenographer/stenographer.go | 53 ++-- .../src/github.com/onsi/ginkgo/types/types.go | 6 +- 35 files changed, 969 insertions(+), 320 deletions(-) delete mode 100644 Godeps/_workspace/src/github.com/boltdb/bolt/batch.go create mode 100644 Godeps/_workspace/src/github.com/boltdb/bolt/bolt_arm64.go create mode 100644 Godeps/_workspace/src/github.com/boltdb/bolt/bolt_ppc64le.go create mode 100644 Godeps/_workspace/src/github.com/boltdb/bolt/bolt_s390x.go create mode 100644 Godeps/_workspace/src/github.com/onsi/ginkgo/extensions/table/table.go create mode 100644 Godeps/_workspace/src/github.com/onsi/ginkgo/extensions/table/table_entry.go create mode 100644 Godeps/_workspace/src/github.com/onsi/ginkgo/internal/remote/syscall_dup_linux_arm64.go create mode 100644 Godeps/_workspace/src/github.com/onsi/ginkgo/internal/remote/syscall_dup_unix.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index f93395b03ac..d9504d3f3ac 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -132,8 +132,8 @@ }, { "ImportPath": "github.com/boltdb/bolt", - "Comment": "v1.0-119-g90fef38", - "Rev": "90fef389f98027ca55594edd7dbd6e7f3926fdad" + "Comment": "v1.1.0-65-gee4a088", + "Rev": "ee4a0888a9abe7eefe5a0992ca4cb06864839873" }, { "ImportPath": "github.com/bradfitz/http2", @@ -824,8 +824,8 @@ }, { "ImportPath": "github.com/onsi/ginkgo", - "Comment": "v1.2.0-6-gd981d36", - "Rev": "d981d36e9884231afa909627b9c275e4ba678f90" + "Comment": "v1.2.0-42-g07d85e6", + "Rev": "07d85e6b10c4289c7d612f9b13f45ba36f66d55b" }, { "ImportPath": "github.com/onsi/gomega", diff --git a/Godeps/_workspace/src/github.com/boltdb/bolt/Makefile b/Godeps/_workspace/src/github.com/boltdb/bolt/Makefile index cfbed514bbb..e035e63adcd 100644 --- a/Godeps/_workspace/src/github.com/boltdb/bolt/Makefile +++ b/Godeps/_workspace/src/github.com/boltdb/bolt/Makefile @@ -1,54 +1,18 @@ -TEST=. -BENCH=. -COVERPROFILE=/tmp/c.out BRANCH=`git rev-parse --abbrev-ref HEAD` COMMIT=`git rev-parse --short HEAD` GOLDFLAGS="-X main.branch $(BRANCH) -X main.commit $(COMMIT)" default: build -bench: - go test -v -test.run=NOTHINCONTAINSTHIS -test.bench=$(BENCH) - -# http://cloc.sourceforge.net/ -cloc: - @cloc --not-match-f='Makefile|_test.go' . - -cover: fmt - go test -coverprofile=$(COVERPROFILE) -test.run=$(TEST) $(COVERFLAG) . - go tool cover -html=$(COVERPROFILE) - rm $(COVERPROFILE) - -cpuprofile: fmt - @go test -c - @./bolt.test -test.v -test.run=$(TEST) -test.cpuprofile cpu.prof +race: + @go test -v -race -test.run="TestSimulate_(100op|1000op)" # go get github.com/kisielk/errcheck errcheck: - @echo "=== errcheck ===" - @errcheck github.com/boltdb/bolt + @errcheck -ignorepkg=bytes -ignore=os:Remove github.com/boltdb/bolt -fmt: - @go fmt ./... +test: + @go test -v -cover . + @go test -v ./cmd/bolt -get: - @go get -d ./... - -build: get - @mkdir -p bin - @go build -ldflags=$(GOLDFLAGS) -a -o bin/bolt ./cmd/bolt - -test: fmt - @go get github.com/stretchr/testify/assert - @echo "=== TESTS ===" - @go test -v -cover -test.run=$(TEST) - @echo "" - @echo "" - @echo "=== CLI ===" - @go test -v -test.run=$(TEST) ./cmd/bolt - @echo "" - @echo "" - @echo "=== RACE DETECTOR ===" - @go test -v -race -test.run="TestSimulate_(100op|1000op)" - -.PHONY: bench cloc cover cpuprofile fmt memprofile test +.PHONY: fmt test diff --git a/Godeps/_workspace/src/github.com/boltdb/bolt/README.md b/Godeps/_workspace/src/github.com/boltdb/bolt/README.md index 00fad6afb8b..82e85742c04 100644 --- a/Godeps/_workspace/src/github.com/boltdb/bolt/README.md +++ b/Godeps/_workspace/src/github.com/boltdb/bolt/README.md @@ -1,8 +1,8 @@ -Bolt [![Build Status](https://drone.io/github.com/boltdb/bolt/status.png)](https://drone.io/github.com/boltdb/bolt/latest) [![Coverage Status](https://coveralls.io/repos/boltdb/bolt/badge.png?branch=master)](https://coveralls.io/r/boltdb/bolt?branch=master) [![GoDoc](https://godoc.org/github.com/boltdb/bolt?status.png)](https://godoc.org/github.com/boltdb/bolt) ![Version](http://img.shields.io/badge/version-1.0-green.png) +Bolt [![Build Status](https://drone.io/github.com/boltdb/bolt/status.png)](https://drone.io/github.com/boltdb/bolt/latest) [![Coverage Status](https://coveralls.io/repos/boltdb/bolt/badge.svg?branch=master)](https://coveralls.io/r/boltdb/bolt?branch=master) [![GoDoc](https://godoc.org/github.com/boltdb/bolt?status.svg)](https://godoc.org/github.com/boltdb/bolt) ![Version](https://img.shields.io/badge/version-1.0-green.svg) ==== -Bolt is a pure Go key/value store inspired by [Howard Chu's][hyc_symas] and -the [LMDB project][lmdb]. The goal of the project is to provide a simple, +Bolt is a pure Go key/value store inspired by [Howard Chu's][hyc_symas] +[LMDB project][lmdb]. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL. @@ -13,7 +13,6 @@ and setting values. That's it. [hyc_symas]: https://twitter.com/hyc_symas [lmdb]: http://symas.com/mdb/ - ## Project Status Bolt is stable and the API is fixed. Full unit test coverage and randomized @@ -22,6 +21,36 @@ Bolt is currently in high-load production environments serving databases as large as 1TB. Many companies such as Shopify and Heroku use Bolt-backed services every day. +## Table of Contents + +- [Getting Started](#getting-started) + - [Installing](#installing) + - [Opening a database](#opening-a-database) + - [Transactions](#transactions) + - [Read-write transactions](#read-write-transactions) + - [Read-only transactions](#read-only-transactions) + - [Batch read-write transactions](#batch-read-write-transactions) + - [Managing transactions manually](#managing-transactions-manually) + - [Using buckets](#using-buckets) + - [Using key/value pairs](#using-keyvalue-pairs) + - [Autoincrementing integer for the bucket](#autoincrementing-integer-for-the-bucket) + - [Iterating over keys](#iterating-over-keys) + - [Prefix scans](#prefix-scans) + - [Range scans](#range-scans) + - [ForEach()](#foreach) + - [Nested buckets](#nested-buckets) + - [Database backups](#database-backups) + - [Statistics](#statistics) + - [Read-Only Mode](#read-only-mode) + - [Mobile Use (iOS/Android)](#mobile-use-iosandroid) +- [Resources](#resources) +- [Comparison with other databases](#comparison-with-other-databases) + - [Postgres, MySQL, & other relational databases](#postgres-mysql--other-relational-databases) + - [LevelDB, RocksDB](#leveldb-rocksdb) + - [LMDB](#lmdb) +- [Caveats & Limitations](#caveats--limitations) +- [Reading the Source](#reading-the-source) +- [Other Projects Using Bolt](#other-projects-using-bolt) ## Getting Started @@ -180,8 +209,8 @@ and then safely close your transaction if an error is returned. This is the recommended way to use Bolt transactions. However, sometimes you may want to manually start and end your transactions. -You can use the `Tx.Begin()` function directly but _please_ be sure to close the -transaction. +You can use the `Tx.Begin()` function directly but **please** be sure to close +the transaction. ```go // Start a writable transaction. @@ -256,7 +285,7 @@ db.View(func(tx *bolt.Tx) error { ``` The `Get()` function does not return an error because its operation is -guarenteed to work (unless there is some kind of system failure). If the key +guaranteed to work (unless there is some kind of system failure). If the key exists then it will return its byte slice value. If it doesn't exist then it will return `nil`. It's important to note that you can have a zero-length value set to a key which is different than the key not existing. @@ -268,6 +297,49 @@ transaction is open. If you need to use a value outside of the transaction then you must use `copy()` to copy it to another byte slice. +### Autoincrementing integer for the bucket +By using the `NextSequence()` function, you can let Bolt determine a sequence +which can be used as the unique identifier for your key/value pairs. See the +example below. + +```go +// CreateUser saves u to the store. The new user ID is set on u once the data is persisted. +func (s *Store) CreateUser(u *User) error { + return s.db.Update(func(tx *bolt.Tx) error { + // Retrieve the users bucket. + // This should be created when the DB is first opened. + b := tx.Bucket([]byte("users")) + + // Generate ID for the user. + // This returns an error only if the Tx is closed or not writeable. + // That can't happen in an Update() call so I ignore the error check. + id, _ = b.NextSequence() + u.ID = int(id) + + // Marshal user data into bytes. + buf, err := json.Marshal(u) + if err != nil { + return err + } + + // Persist bytes to users bucket. + return b.Put(itob(u.ID), buf) + }) +} + +// itob returns an 8-byte big endian representation of v. +func itob(v int) []byte { + b := make([]byte, 8) + binary.BigEndian.PutUint64(b, uint64(v)) + return b +} + +type User struct { + ID int + ... +} +``` + ### Iterating over keys Bolt stores its keys in byte-sorted order within a bucket. This makes sequential @@ -276,7 +348,9 @@ iteration over these keys extremely fast. To iterate over keys we'll use a ```go db.View(func(tx *bolt.Tx) error { + // Assume bucket exists and has keys b := tx.Bucket([]byte("MyBucket")) + c := b.Cursor() for k, v := c.First(); k != nil; k, v = c.Next() { @@ -300,10 +374,15 @@ Next() Move to the next key. Prev() Move to the previous key. ``` -When you have iterated to the end of the cursor then `Next()` will return `nil`. -You must seek to a position using `First()`, `Last()`, or `Seek()` before -calling `Next()` or `Prev()`. If you do not seek to a position then these -functions will return `nil`. +Each of those functions has a return signature of `(key []byte, value []byte)`. +When you have iterated to the end of the cursor then `Next()` will return a +`nil` key. You must seek to a position using `First()`, `Last()`, or `Seek()` +before calling `Next()` or `Prev()`. If you do not seek to a position then +these functions will return a `nil` key. + +During iteration, if the key is non-`nil` but the value is `nil`, that means +the key refers to a bucket rather than a value. Use `Bucket.Bucket()` to +access the sub-bucket. #### Prefix scans @@ -312,6 +391,7 @@ To iterate over a key prefix, you can combine `Seek()` and `bytes.HasPrefix()`: ```go db.View(func(tx *bolt.Tx) error { + // Assume bucket exists and has keys c := tx.Bucket([]byte("MyBucket")).Cursor() prefix := []byte("1234") @@ -331,7 +411,7 @@ date range like this: ```go db.View(func(tx *bolt.Tx) error { - // Assume our events bucket has RFC3339 encoded time keys. + // Assume our events bucket exists and has RFC3339 encoded time keys. c := tx.Bucket([]byte("Events")).Cursor() // Our time range spans the 90's decade. @@ -355,7 +435,9 @@ all the keys in a bucket: ```go db.View(func(tx *bolt.Tx) error { + // Assume bucket exists and has keys b := tx.Bucket([]byte("MyBucket")) + b.ForEach(func(k, v []byte) error { fmt.Printf("key=%s, value=%s\n", k, v) return nil @@ -382,8 +464,11 @@ func (*Bucket) DeleteBucket(key []byte) error Bolt is a single file so it's easy to backup. You can use the `Tx.WriteTo()` function to write a consistent view of the database to a writer. If you call this from a read-only transaction, it will perform a hot backup and not block -your other database reads and writes. It will also use `O_DIRECT` when available -to prevent page cache trashing. +your other database reads and writes. + +By default, it will use a regular file handle which will utilize the operating +system's page cache. See the [`Tx`](https://godoc.org/github.com/boltdb/bolt#Tx) +documentation for information about optimizing for larger-than-RAM datasets. One common use case is to backup over HTTP so you can use tools like `cURL` to do database backups: @@ -465,6 +550,84 @@ if err != nil { } ``` +### Mobile Use (iOS/Android) + +Bolt is able to run on mobile devices by leveraging the binding feature of the +[gomobile](https://github.com/golang/mobile) tool. Create a struct that will +contain your database logic and a reference to a `*bolt.DB` with a initializing +contstructor that takes in a filepath where the database file will be stored. +Neither Android nor iOS require extra permissions or cleanup from using this method. + +```go +func NewBoltDB(filepath string) *BoltDB { + db, err := bolt.Open(filepath+"/demo.db", 0600, nil) + if err != nil { + log.Fatal(err) + } + + return &BoltDB{db} +} + +type BoltDB struct { + db *bolt.DB + ... +} + +func (b *BoltDB) Path() string { + return b.db.Path() +} + +func (b *BoltDB) Close() { + b.db.Close() +} +``` + +Database logic should be defined as methods on this wrapper struct. + +To initialize this struct from the native language (both platforms now sync +their local storage to the cloud. These snippets disable that functionality for the +database file): + +#### Android + +```java +String path; +if (android.os.Build.VERSION.SDK_INT >=android.os.Build.VERSION_CODES.LOLLIPOP){ + path = getNoBackupFilesDir().getAbsolutePath(); +} else{ + path = getFilesDir().getAbsolutePath(); +} +Boltmobiledemo.BoltDB boltDB = Boltmobiledemo.NewBoltDB(path) +``` + +#### iOS + +```objc +- (void)demo { + NSString* path = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, + NSUserDomainMask, + YES) objectAtIndex:0]; + GoBoltmobiledemoBoltDB * demo = GoBoltmobiledemoNewBoltDB(path); + [self addSkipBackupAttributeToItemAtPath:demo.path]; + //Some DB Logic would go here + [demo close]; +} + +- (BOOL)addSkipBackupAttributeToItemAtPath:(NSString *) filePathString +{ + NSURL* URL= [NSURL fileURLWithPath: filePathString]; + assert([[NSFileManager defaultManager] fileExistsAtPath: [URL path]]); + + NSError *error = nil; + BOOL success = [URL setResourceValue: [NSNumber numberWithBool: YES] + forKey: NSURLIsExcludedFromBackupKey error: &error]; + if(!success){ + NSLog(@"Error excluding %@ from backup %@", [URL lastPathComponent], error); + } + return success; +} + +``` ## Resources @@ -500,7 +663,7 @@ they are libraries bundled into the application, however, their underlying structure is a log-structured merge-tree (LSM tree). An LSM tree optimizes random writes by using a write ahead log and multi-tiered, sorted files called SSTables. Bolt uses a B+tree internally and only a single file. Both approaches -have trade offs. +have trade-offs. If you require a high random write throughput (>10,000 w/sec) or you need to use spinning disks then LevelDB could be a good choice. If your application is @@ -536,9 +699,8 @@ It's important to pick the right tool for the job and Bolt is no exception. Here are a few things to note when evaluating and using Bolt: * Bolt is good for read intensive workloads. Sequential write performance is - also fast but random writes can be slow. You can add a write-ahead log or - [transaction coalescer](https://github.com/boltdb/coalescer) in front of Bolt - to mitigate this issue. + also fast but random writes can be slow. You can use `DB.Batch()` or add a + write-ahead log to help mitigate this issue. * Bolt uses a B+tree internally so there can be a lot of random page access. SSDs provide a significant performance boost over spinning disks. @@ -568,11 +730,13 @@ Here are a few things to note when evaluating and using Bolt: can in memory and will release memory as needed to other processes. This means that Bolt can show very high memory usage when working with large databases. However, this is expected and the OS will release memory as needed. Bolt can - handle databases much larger than the available physical RAM. + handle databases much larger than the available physical RAM, provided its + memory-map fits in the process virtual address space. It may be problematic + on 32-bits systems. * The data structures in the Bolt database are memory mapped so the data file will be endian specific. This means that you cannot copy a Bolt file from a - little endian machine to a big endian machine and have it work. For most + little endian machine to a big endian machine and have it work. For most users this is not a concern since most modern CPUs are little endian. * Because of the way pages are laid out on disk, Bolt cannot truncate data files @@ -587,6 +751,56 @@ Here are a few things to note when evaluating and using Bolt: [page-allocation]: https://github.com/boltdb/bolt/issues/308#issuecomment-74811638 +## Reading the Source + +Bolt is a relatively small code base (<3KLOC) for an embedded, serializable, +transactional key/value database so it can be a good starting point for people +interested in how databases work. + +The best places to start are the main entry points into Bolt: + +- `Open()` - Initializes the reference to the database. It's responsible for + creating the database if it doesn't exist, obtaining an exclusive lock on the + file, reading the meta pages, & memory-mapping the file. + +- `DB.Begin()` - Starts a read-only or read-write transaction depending on the + value of the `writable` argument. This requires briefly obtaining the "meta" + lock to keep track of open transactions. Only one read-write transaction can + exist at a time so the "rwlock" is acquired during the life of a read-write + transaction. + +- `Bucket.Put()` - Writes a key/value pair into a bucket. After validating the + arguments, a cursor is used to traverse the B+tree to the page and position + where they key & value will be written. Once the position is found, the bucket + materializes the underlying page and the page's parent pages into memory as + "nodes". These nodes are where mutations occur during read-write transactions. + These changes get flushed to disk during commit. + +- `Bucket.Get()` - Retrieves a key/value pair from a bucket. This uses a cursor + to move to the page & position of a key/value pair. During a read-only + transaction, the key and value data is returned as a direct reference to the + underlying mmap file so there's no allocation overhead. For read-write + transactions, this data may reference the mmap file or one of the in-memory + node values. + +- `Cursor` - This object is simply for traversing the B+tree of on-disk pages + or in-memory nodes. It can seek to a specific key, move to the first or last + value, or it can move forward or backward. The cursor handles the movement up + and down the B+tree transparently to the end user. + +- `Tx.Commit()` - Converts the in-memory dirty nodes and the list of free pages + into pages to be written to disk. Writing to disk then occurs in two phases. + First, the dirty pages are written to disk and an `fsync()` occurs. Second, a + new meta page with an incremented transaction ID is written and another + `fsync()` occurs. This two phase write ensures that partially written data + pages are ignored in the event of a crash since the meta page pointing to them + is never written. Partially written meta pages are invalidated because they + are written with a checksum. + +If you have additional notes that could be helpful for others, please submit +them via pull request. + + ## Other Projects Using Bolt Below is a list of public, open source projects that use Bolt: @@ -597,25 +811,30 @@ Below is a list of public, open source projects that use Bolt: * [Skybox Analytics](https://github.com/skybox/skybox) - A standalone funnel analysis tool for web analytics. * [Scuttlebutt](https://github.com/benbjohnson/scuttlebutt) - Uses Bolt to store and process all Twitter mentions of GitHub projects. * [Wiki](https://github.com/peterhellberg/wiki) - A tiny wiki using Goji, BoltDB and Blackfriday. -* [ChainStore](https://github.com/nulayer/chainstore) - Simple key-value interface to a variety of storage engines organized as a chain of operations. +* [ChainStore](https://github.com/pressly/chainstore) - Simple key-value interface to a variety of storage engines organized as a chain of operations. * [MetricBase](https://github.com/msiebuhr/MetricBase) - Single-binary version of Graphite. * [Gitchain](https://github.com/gitchain/gitchain) - Decentralized, peer-to-peer Git repositories aka "Git meets Bitcoin". * [event-shuttle](https://github.com/sclasen/event-shuttle) - A Unix system service to collect and reliably deliver messages to Kafka. * [ipxed](https://github.com/kelseyhightower/ipxed) - Web interface and api for ipxed. * [BoltStore](https://github.com/yosssi/boltstore) - Session store using Bolt. -* [photosite/session](http://godoc.org/bitbucket.org/kardianos/photosite/session) - Sessions for a photo viewing site. +* [photosite/session](https://godoc.org/bitbucket.org/kardianos/photosite/session) - Sessions for a photo viewing site. * [LedisDB](https://github.com/siddontang/ledisdb) - A high performance NoSQL, using Bolt as optional storage. * [ipLocator](https://github.com/AndreasBriese/ipLocator) - A fast ip-geo-location-server using bolt with bloom filters. * [cayley](https://github.com/google/cayley) - Cayley is an open-source graph database using Bolt as optional backend. * [bleve](http://www.blevesearch.com/) - A pure Go search engine similar to ElasticSearch that uses Bolt as the default storage backend. * [tentacool](https://github.com/optiflows/tentacool) - REST api server to manage system stuff (IP, DNS, Gateway...) on a linux server. * [SkyDB](https://github.com/skydb/sky) - Behavioral analytics database. -* [Seaweed File System](https://github.com/chrislusf/weed-fs) - Highly scalable distributed key~file system with O(1) disk read. -* [InfluxDB](http://influxdb.com) - Scalable datastore for metrics, events, and real-time analytics. +* [Seaweed File System](https://github.com/chrislusf/seaweedfs) - Highly scalable distributed key~file system with O(1) disk read. +* [InfluxDB](https://influxdata.com) - Scalable datastore for metrics, events, and real-time analytics. * [Freehold](http://tshannon.bitbucket.org/freehold/) - An open, secure, and lightweight platform for your files and data. * [Prometheus Annotation Server](https://github.com/oliver006/prom_annotation_server) - Annotation server for PromDash & Prometheus service monitoring system. * [Consul](https://github.com/hashicorp/consul) - Consul is service discovery and configuration made easy. Distributed, highly available, and datacenter-aware. -* [Kala](https://github.com/ajvb/kala) - Kala is a modern job scheduler optimized to run on a single node. It is persistant, JSON over HTTP API, ISO 8601 duration notation, and dependent jobs. +* [Kala](https://github.com/ajvb/kala) - Kala is a modern job scheduler optimized to run on a single node. It is persistent, JSON over HTTP API, ISO 8601 duration notation, and dependent jobs. * [drive](https://github.com/odeke-em/drive) - drive is an unofficial Google Drive command line client for \*NIX operating systems. +* [stow](https://github.com/djherbis/stow) - a persistence manager for objects + backed by boltdb. +* [buckets](https://github.com/joyrexus/buckets) - a bolt wrapper streamlining + simple tx and key scans. +* [Request Baskets](https://github.com/darklynx/request-baskets) - A web service to collect arbitrary HTTP requests and inspect them via REST API or simple web UI, similar to [RequestBin](http://requestb.in/) service If you are using Bolt in a project please send a pull request to add it to the list. diff --git a/Godeps/_workspace/src/github.com/boltdb/bolt/batch.go b/Godeps/_workspace/src/github.com/boltdb/bolt/batch.go deleted file mode 100644 index 84acae6bbf0..00000000000 --- a/Godeps/_workspace/src/github.com/boltdb/bolt/batch.go +++ /dev/null @@ -1,138 +0,0 @@ -package bolt - -import ( - "errors" - "fmt" - "sync" - "time" -) - -// Batch calls fn as part of a batch. It behaves similar to Update, -// except: -// -// 1. concurrent Batch calls can be combined into a single Bolt -// transaction. -// -// 2. the function passed to Batch may be called multiple times, -// regardless of whether it returns error or not. -// -// This means that Batch function side effects must be idempotent and -// take permanent effect only after a successful return is seen in -// caller. -// -// The maximum batch size and delay can be adjusted with DB.MaxBatchSize -// and DB.MaxBatchDelay, respectively. -// -// Batch is only useful when there are multiple goroutines calling it. -func (db *DB) Batch(fn func(*Tx) error) error { - errCh := make(chan error, 1) - - db.batchMu.Lock() - if (db.batch == nil) || (db.batch != nil && len(db.batch.calls) >= db.MaxBatchSize) { - // There is no existing batch, or the existing batch is full; start a new one. - db.batch = &batch{ - db: db, - } - db.batch.timer = time.AfterFunc(db.MaxBatchDelay, db.batch.trigger) - } - db.batch.calls = append(db.batch.calls, call{fn: fn, err: errCh}) - if len(db.batch.calls) >= db.MaxBatchSize { - // wake up batch, it's ready to run - go db.batch.trigger() - } - db.batchMu.Unlock() - - err := <-errCh - if err == trySolo { - err = db.Update(fn) - } - return err -} - -type call struct { - fn func(*Tx) error - err chan<- error -} - -type batch struct { - db *DB - timer *time.Timer - start sync.Once - calls []call -} - -// trigger runs the batch if it hasn't already been run. -func (b *batch) trigger() { - b.start.Do(b.run) -} - -// run performs the transactions in the batch and communicates results -// back to DB.Batch. -func (b *batch) run() { - b.db.batchMu.Lock() - b.timer.Stop() - // Make sure no new work is added to this batch, but don't break - // other batches. - if b.db.batch == b { - b.db.batch = nil - } - b.db.batchMu.Unlock() - -retry: - for len(b.calls) > 0 { - var failIdx = -1 - err := b.db.Update(func(tx *Tx) error { - for i, c := range b.calls { - if err := safelyCall(c.fn, tx); err != nil { - failIdx = i - return err - } - } - return nil - }) - - if failIdx >= 0 { - // take the failing transaction out of the batch. it's - // safe to shorten b.calls here because db.batch no longer - // points to us, and we hold the mutex anyway. - c := b.calls[failIdx] - b.calls[failIdx], b.calls = b.calls[len(b.calls)-1], b.calls[:len(b.calls)-1] - // tell the submitter re-run it solo, continue with the rest of the batch - c.err <- trySolo - continue retry - } - - // pass success, or bolt internal errors, to all callers - for _, c := range b.calls { - if c.err != nil { - c.err <- err - } - } - break retry - } -} - -// trySolo is a special sentinel error value used for signaling that a -// transaction function should be re-run. It should never be seen by -// callers. -var trySolo = errors.New("batch function returned an error and should be re-run solo") - -type panicked struct { - reason interface{} -} - -func (p panicked) Error() string { - if err, ok := p.reason.(error); ok { - return err.Error() - } - return fmt.Sprintf("panic: %v", p.reason) -} - -func safelyCall(fn func(*Tx) error, tx *Tx) (err error) { - defer func() { - if p := recover(); p != nil { - err = panicked{p} - } - }() - return fn(tx) -} diff --git a/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_arm64.go b/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_arm64.go new file mode 100644 index 00000000000..6d2309352e0 --- /dev/null +++ b/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_arm64.go @@ -0,0 +1,9 @@ +// +build arm64 + +package bolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0xFFFFFFFFFFFF // 256TB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0x7FFFFFFF diff --git a/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_linux.go b/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_linux.go index e9d1c907b63..2b676661409 100644 --- a/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_linux.go +++ b/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_linux.go @@ -4,8 +4,6 @@ import ( "syscall" ) -var odirect = syscall.O_DIRECT - // fdatasync flushes written data to a file descriptor. func fdatasync(db *DB) error { return syscall.Fdatasync(int(db.file.Fd())) diff --git a/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_openbsd.go b/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_openbsd.go index 7c1bef1a4f4..7058c3d734e 100644 --- a/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_openbsd.go +++ b/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_openbsd.go @@ -11,8 +11,6 @@ const ( msInvalidate // invalidate cached data ) -var odirect int - func msync(db *DB) error { _, _, errno := syscall.Syscall(syscall.SYS_MSYNC, uintptr(unsafe.Pointer(db.data)), uintptr(db.datasz), msInvalidate) if errno != 0 { diff --git a/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_ppc64le.go b/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_ppc64le.go new file mode 100644 index 00000000000..8351e129f6a --- /dev/null +++ b/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_ppc64le.go @@ -0,0 +1,9 @@ +// +build ppc64le + +package bolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0xFFFFFFFFFFFF // 256TB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0x7FFFFFFF diff --git a/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_s390x.go b/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_s390x.go new file mode 100644 index 00000000000..f4dd26bbba7 --- /dev/null +++ b/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_s390x.go @@ -0,0 +1,9 @@ +// +build s390x + +package bolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0xFFFFFFFFFFFF // 256TB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0x7FFFFFFF diff --git a/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_unix.go b/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_unix.go index 6eef6b22035..4b0723aac23 100644 --- a/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_unix.go +++ b/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_unix.go @@ -46,19 +46,8 @@ func funlock(f *os.File) error { // mmap memory maps a DB's data file. func mmap(db *DB, sz int) error { - // Truncate and fsync to ensure file size metadata is flushed. - // https://github.com/boltdb/bolt/issues/284 - if !db.NoGrowSync && !db.readOnly { - if err := db.file.Truncate(int64(sz)); err != nil { - return fmt.Errorf("file resize error: %s", err) - } - if err := db.file.Sync(); err != nil { - return fmt.Errorf("file sync error: %s", err) - } - } - // Map the data file to memory. - b, err := syscall.Mmap(int(db.file.Fd()), 0, sz, syscall.PROT_READ, syscall.MAP_SHARED) + b, err := syscall.Mmap(int(db.file.Fd()), 0, sz, syscall.PROT_READ, syscall.MAP_SHARED|db.MmapFlags) if err != nil { return err } diff --git a/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_unix_solaris.go b/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_unix_solaris.go index f480ee76d1f..1c4e48d63a0 100644 --- a/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_unix_solaris.go +++ b/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_unix_solaris.go @@ -1,4 +1,3 @@ - package bolt import ( @@ -7,6 +6,7 @@ import ( "syscall" "time" "unsafe" + "golang.org/x/sys/unix" ) @@ -56,19 +56,8 @@ func funlock(f *os.File) error { // mmap memory maps a DB's data file. func mmap(db *DB, sz int) error { - // Truncate and fsync to ensure file size metadata is flushed. - // https://github.com/boltdb/bolt/issues/284 - if !db.NoGrowSync && !db.readOnly { - if err := db.file.Truncate(int64(sz)); err != nil { - return fmt.Errorf("file resize error: %s", err) - } - if err := db.file.Sync(); err != nil { - return fmt.Errorf("file sync error: %s", err) - } - } - // Map the data file to memory. - b, err := unix.Mmap(int(db.file.Fd()), 0, sz, syscall.PROT_READ, syscall.MAP_SHARED) + b, err := unix.Mmap(int(db.file.Fd()), 0, sz, syscall.PROT_READ, syscall.MAP_SHARED|db.MmapFlags) if err != nil { return err } diff --git a/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_windows.go b/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_windows.go index 8b782be5f9e..91c4968f6a1 100644 --- a/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_windows.go +++ b/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_windows.go @@ -8,7 +8,37 @@ import ( "unsafe" ) -var odirect int +// LockFileEx code derived from golang build filemutex_windows.go @ v1.5.1 +var ( + modkernel32 = syscall.NewLazyDLL("kernel32.dll") + procLockFileEx = modkernel32.NewProc("LockFileEx") + procUnlockFileEx = modkernel32.NewProc("UnlockFileEx") +) + +const ( + // see https://msdn.microsoft.com/en-us/library/windows/desktop/aa365203(v=vs.85).aspx + flagLockExclusive = 2 + flagLockFailImmediately = 1 + + // see https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx + errLockViolation syscall.Errno = 0x21 +) + +func lockFileEx(h syscall.Handle, flags, reserved, locklow, lockhigh uint32, ol *syscall.Overlapped) (err error) { + r, _, err := procLockFileEx.Call(uintptr(h), uintptr(flags), uintptr(reserved), uintptr(locklow), uintptr(lockhigh), uintptr(unsafe.Pointer(ol))) + if r == 0 { + return err + } + return nil +} + +func unlockFileEx(h syscall.Handle, reserved, locklow, lockhigh uint32, ol *syscall.Overlapped) (err error) { + r, _, err := procUnlockFileEx.Call(uintptr(h), uintptr(reserved), uintptr(locklow), uintptr(lockhigh), uintptr(unsafe.Pointer(ol)), 0) + if r == 0 { + return err + } + return nil +} // fdatasync flushes written data to a file descriptor. func fdatasync(db *DB) error { @@ -16,13 +46,37 @@ func fdatasync(db *DB) error { } // flock acquires an advisory lock on a file descriptor. -func flock(f *os.File, _ bool, _ time.Duration) error { - return nil +func flock(f *os.File, exclusive bool, timeout time.Duration) error { + var t time.Time + for { + // If we're beyond our timeout then return an error. + // This can only occur after we've attempted a flock once. + if t.IsZero() { + t = time.Now() + } else if timeout > 0 && time.Since(t) > timeout { + return ErrTimeout + } + + var flag uint32 = flagLockFailImmediately + if exclusive { + flag |= flagLockExclusive + } + + err := lockFileEx(syscall.Handle(f.Fd()), flag, 0, 1, 0, &syscall.Overlapped{}) + if err == nil { + return nil + } else if err != errLockViolation { + return err + } + + // Wait for a bit and try again. + time.Sleep(50 * time.Millisecond) + } } // funlock releases an advisory lock on a file descriptor. func funlock(f *os.File) error { - return nil + return unlockFileEx(syscall.Handle(f.Fd()), 0, 1, 0, &syscall.Overlapped{}) } // mmap memory maps a DB's data file. diff --git a/Godeps/_workspace/src/github.com/boltdb/bolt/boltsync_unix.go b/Godeps/_workspace/src/github.com/boltdb/bolt/boltsync_unix.go index 8db89776fe6..f50442523c3 100644 --- a/Godeps/_workspace/src/github.com/boltdb/bolt/boltsync_unix.go +++ b/Godeps/_workspace/src/github.com/boltdb/bolt/boltsync_unix.go @@ -2,8 +2,6 @@ package bolt -var odirect int - // fdatasync flushes written data to a file descriptor. func fdatasync(db *DB) error { return db.file.Sync() diff --git a/Godeps/_workspace/src/github.com/boltdb/bolt/bucket.go b/Godeps/_workspace/src/github.com/boltdb/bolt/bucket.go index 6766992100f..d2f8c524e42 100644 --- a/Godeps/_workspace/src/github.com/boltdb/bolt/bucket.go +++ b/Godeps/_workspace/src/github.com/boltdb/bolt/bucket.go @@ -11,7 +11,7 @@ const ( MaxKeySize = 32768 // MaxValueSize is the maximum length of a value, in bytes. - MaxValueSize = 4294967295 + MaxValueSize = (1 << 31) - 2 ) const ( @@ -99,6 +99,7 @@ func (b *Bucket) Cursor() *Cursor { // Bucket retrieves a nested bucket by name. // Returns nil if the bucket does not exist. +// The bucket instance is only valid for the lifetime of the transaction. func (b *Bucket) Bucket(name []byte) *Bucket { if b.buckets != nil { if child := b.buckets[string(name)]; child != nil { @@ -148,6 +149,7 @@ func (b *Bucket) openBucket(value []byte) *Bucket { // CreateBucket creates a new bucket at the given key and returns the new bucket. // Returns an error if the key already exists, if the bucket name is blank, or if the bucket name is too long. +// The bucket instance is only valid for the lifetime of the transaction. func (b *Bucket) CreateBucket(key []byte) (*Bucket, error) { if b.tx.db == nil { return nil, ErrTxClosed @@ -192,6 +194,7 @@ func (b *Bucket) CreateBucket(key []byte) (*Bucket, error) { // CreateBucketIfNotExists creates a new bucket if it doesn't already exist and returns a reference to it. // Returns an error if the bucket name is blank, or if the bucket name is too long. +// The bucket instance is only valid for the lifetime of the transaction. func (b *Bucket) CreateBucketIfNotExists(key []byte) (*Bucket, error) { child, err := b.CreateBucket(key) if err == ErrBucketExists { @@ -270,6 +273,7 @@ func (b *Bucket) Get(key []byte) []byte { // Put sets the value for a key in the bucket. // If the key exist then its previous value will be overwritten. +// Supplied value must remain valid for the life of the transaction. // Returns an error if the bucket was created from a read-only transaction, if the key is blank, if the key is too large, or if the value is too large. func (b *Bucket) Put(key []byte, value []byte) error { if b.tx.db == nil { @@ -346,7 +350,8 @@ func (b *Bucket) NextSequence() (uint64, error) { // ForEach executes a function for each key/value pair in a bucket. // If the provided function returns an error then the iteration is stopped and -// the error is returned to the caller. +// the error is returned to the caller. The provided function must not modify +// the bucket; this will result in undefined behavior. func (b *Bucket) ForEach(fn func(k, v []byte) error) error { if b.tx.db == nil { return ErrTxClosed diff --git a/Godeps/_workspace/src/github.com/boltdb/bolt/cmd/bolt/main.go b/Godeps/_workspace/src/github.com/boltdb/bolt/cmd/bolt/main.go index c41ebe404d9..b96e6f73511 100644 --- a/Godeps/_workspace/src/github.com/boltdb/bolt/cmd/bolt/main.go +++ b/Godeps/_workspace/src/github.com/boltdb/bolt/cmd/bolt/main.go @@ -825,7 +825,10 @@ func (cmd *StatsCommand) Run(args ...string) error { fmt.Fprintln(cmd.Stdout, "Bucket statistics") fmt.Fprintf(cmd.Stdout, "\tTotal number of buckets: %d\n", s.BucketN) - percentage = int(float32(s.InlineBucketN) * 100.0 / float32(s.BucketN)) + percentage = 0 + if s.BucketN != 0 { + percentage = int(float32(s.InlineBucketN) * 100.0 / float32(s.BucketN)) + } fmt.Fprintf(cmd.Stdout, "\tTotal number on inlined buckets: %d (%d%%)\n", s.InlineBucketN, percentage) percentage = 0 if s.LeafInuse != 0 { diff --git a/Godeps/_workspace/src/github.com/boltdb/bolt/cursor.go b/Godeps/_workspace/src/github.com/boltdb/bolt/cursor.go index 006c54889e8..1be9f35e3ef 100644 --- a/Godeps/_workspace/src/github.com/boltdb/bolt/cursor.go +++ b/Godeps/_workspace/src/github.com/boltdb/bolt/cursor.go @@ -34,6 +34,13 @@ func (c *Cursor) First() (key []byte, value []byte) { p, n := c.bucket.pageNode(c.bucket.root) c.stack = append(c.stack, elemRef{page: p, node: n, index: 0}) c.first() + + // If we land on an empty page then move to the next value. + // https://github.com/boltdb/bolt/issues/450 + if c.stack[len(c.stack)-1].count() == 0 { + c.next() + } + k, v, flags := c.keyValue() if (flags & uint32(bucketLeafFlag)) != 0 { return k, nil @@ -209,28 +216,37 @@ func (c *Cursor) last() { // next moves to the next leaf element and returns the key and value. // If the cursor is at the last leaf element then it stays there and returns nil. func (c *Cursor) next() (key []byte, value []byte, flags uint32) { - // Attempt to move over one element until we're successful. - // Move up the stack as we hit the end of each page in our stack. - var i int - for i = len(c.stack) - 1; i >= 0; i-- { - elem := &c.stack[i] - if elem.index < elem.count()-1 { - elem.index++ - break + for { + // Attempt to move over one element until we're successful. + // Move up the stack as we hit the end of each page in our stack. + var i int + for i = len(c.stack) - 1; i >= 0; i-- { + elem := &c.stack[i] + if elem.index < elem.count()-1 { + elem.index++ + break + } } - } - // If we've hit the root page then stop and return. This will leave the - // cursor on the last element of the last page. - if i == -1 { - return nil, nil, 0 - } + // If we've hit the root page then stop and return. This will leave the + // cursor on the last element of the last page. + if i == -1 { + return nil, nil, 0 + } - // Otherwise start from where we left off in the stack and find the - // first element of the first leaf page. - c.stack = c.stack[:i+1] - c.first() - return c.keyValue() + // Otherwise start from where we left off in the stack and find the + // first element of the first leaf page. + c.stack = c.stack[:i+1] + c.first() + + // If this is an empty page then restart and move back up the stack. + // https://github.com/boltdb/bolt/issues/450 + if c.stack[len(c.stack)-1].count() == 0 { + continue + } + + return c.keyValue() + } } // search recursively performs a binary search against a given page/node until it finds a given key. diff --git a/Godeps/_workspace/src/github.com/boltdb/bolt/db.go b/Godeps/_workspace/src/github.com/boltdb/bolt/db.go index d39c4aa9cce..0f1e1bc3d74 100644 --- a/Godeps/_workspace/src/github.com/boltdb/bolt/db.go +++ b/Godeps/_workspace/src/github.com/boltdb/bolt/db.go @@ -1,8 +1,10 @@ package bolt import ( + "errors" "fmt" "hash/fnv" + "log" "os" "runtime" "runtime/debug" @@ -24,13 +26,14 @@ const magic uint32 = 0xED0CDAED // IgnoreNoSync specifies whether the NoSync field of a DB is ignored when // syncing changes to a file. This is required as some operating systems, // such as OpenBSD, do not have a unified buffer cache (UBC) and writes -// must be synchronzied using the msync(2) syscall. +// must be synchronized using the msync(2) syscall. const IgnoreNoSync = runtime.GOOS == "openbsd" // Default values if not set in a DB instance. const ( DefaultMaxBatchSize int = 1000 DefaultMaxBatchDelay = 10 * time.Millisecond + DefaultAllocSize = 16 * 1024 * 1024 ) // DB represents a collection of buckets persisted to a file on disk. @@ -63,6 +66,10 @@ type DB struct { // https://github.com/boltdb/bolt/issues/284 NoGrowSync bool + // If you want to read the entire database fast, you can set MmapFlag to + // syscall.MAP_POPULATE on Linux 2.6.23+ for sequential read-ahead. + MmapFlags int + // MaxBatchSize is the maximum size of a batch. Default value is // copied from DefaultMaxBatchSize in Open. // @@ -79,11 +86,17 @@ type DB struct { // Do not change concurrently with calls to Batch. MaxBatchDelay time.Duration + // AllocSize is the amount of space allocated when the database + // needs to create new pages. This is done to amortize the cost + // of truncate() and fsync() when growing the data file. + AllocSize int + path string file *os.File dataref []byte // mmap'ed readonly, write throws SEGV data *[maxMapSize]byte datasz int + filesz int // current on disk file size meta0 *meta meta1 *meta pageSize int @@ -136,10 +149,12 @@ func Open(path string, mode os.FileMode, options *Options) (*DB, error) { options = DefaultOptions } db.NoGrowSync = options.NoGrowSync + db.MmapFlags = options.MmapFlags // Set default values for later DB operations. db.MaxBatchSize = DefaultMaxBatchSize db.MaxBatchDelay = DefaultMaxBatchDelay + db.AllocSize = DefaultAllocSize flag := os.O_RDWR if options.ReadOnly { @@ -172,7 +187,7 @@ func Open(path string, mode os.FileMode, options *Options) (*DB, error) { // Initialize the database if it doesn't exist. if info, err := db.file.Stat(); err != nil { - return nil, fmt.Errorf("stat error: %s", err) + return nil, err } else if info.Size() == 0 { // Initialize new files with meta pages. if err := db.init(); err != nil { @@ -184,14 +199,14 @@ func Open(path string, mode os.FileMode, options *Options) (*DB, error) { if _, err := db.file.ReadAt(buf[:], 0); err == nil { m := db.pageInBuffer(buf[:], 0).meta() if err := m.validate(); err != nil { - return nil, fmt.Errorf("meta0 error: %s", err) + return nil, err } db.pageSize = int(m.pageSize) } } // Memory map the data file. - if err := db.mmap(0); err != nil { + if err := db.mmap(options.InitialMmapSize); err != nil { _ = db.close() return nil, err } @@ -248,10 +263,10 @@ func (db *DB) mmap(minsz int) error { // Validate the meta pages. if err := db.meta0.validate(); err != nil { - return fmt.Errorf("meta0 error: %s", err) + return err } if err := db.meta1.validate(); err != nil { - return fmt.Errorf("meta1 error: %s", err) + return err } return nil @@ -266,7 +281,7 @@ func (db *DB) munmap() error { } // mmapSize determines the appropriate size for the mmap given the current size -// of the database. The minimum size is 1MB and doubles until it reaches 1GB. +// of the database. The minimum size is 32KB and doubles until it reaches 1GB. // Returns an error if the new mmap size is greater than the max allowed. func (db *DB) mmapSize(size int) (int, error) { // Double the size from 32KB until 1GB. @@ -382,7 +397,9 @@ func (db *DB) close() error { // No need to unlock read-only file. if !db.readOnly { // Unlock the file. - _ = funlock(db.file) + if err := funlock(db.file); err != nil { + log.Printf("bolt.Close(): funlock error: %s", err) + } } // Close the file descriptor. @@ -401,11 +418,15 @@ func (db *DB) close() error { // will cause the calls to block and be serialized until the current write // transaction finishes. // -// Transactions should not be depedent on one another. Opening a read +// Transactions should not be dependent on one another. Opening a read // transaction and a write transaction in the same goroutine can cause the // writer to deadlock because the database periodically needs to re-mmap itself // as it grows and it cannot do that while a read transaction is open. // +// If a long running read transaction (for example, a snapshot transaction) is +// needed, you might want to set DB.InitialMmapSize to a large enough value +// to avoid potential blocking of write transaction. +// // IMPORTANT: You must close read-only transactions after you are finished or // else the database will not reclaim old pages. func (db *DB) Begin(writable bool) (*Tx, error) { @@ -589,6 +610,136 @@ func (db *DB) View(fn func(*Tx) error) error { return nil } +// Batch calls fn as part of a batch. It behaves similar to Update, +// except: +// +// 1. concurrent Batch calls can be combined into a single Bolt +// transaction. +// +// 2. the function passed to Batch may be called multiple times, +// regardless of whether it returns error or not. +// +// This means that Batch function side effects must be idempotent and +// take permanent effect only after a successful return is seen in +// caller. +// +// The maximum batch size and delay can be adjusted with DB.MaxBatchSize +// and DB.MaxBatchDelay, respectively. +// +// Batch is only useful when there are multiple goroutines calling it. +func (db *DB) Batch(fn func(*Tx) error) error { + errCh := make(chan error, 1) + + db.batchMu.Lock() + if (db.batch == nil) || (db.batch != nil && len(db.batch.calls) >= db.MaxBatchSize) { + // There is no existing batch, or the existing batch is full; start a new one. + db.batch = &batch{ + db: db, + } + db.batch.timer = time.AfterFunc(db.MaxBatchDelay, db.batch.trigger) + } + db.batch.calls = append(db.batch.calls, call{fn: fn, err: errCh}) + if len(db.batch.calls) >= db.MaxBatchSize { + // wake up batch, it's ready to run + go db.batch.trigger() + } + db.batchMu.Unlock() + + err := <-errCh + if err == trySolo { + err = db.Update(fn) + } + return err +} + +type call struct { + fn func(*Tx) error + err chan<- error +} + +type batch struct { + db *DB + timer *time.Timer + start sync.Once + calls []call +} + +// trigger runs the batch if it hasn't already been run. +func (b *batch) trigger() { + b.start.Do(b.run) +} + +// run performs the transactions in the batch and communicates results +// back to DB.Batch. +func (b *batch) run() { + b.db.batchMu.Lock() + b.timer.Stop() + // Make sure no new work is added to this batch, but don't break + // other batches. + if b.db.batch == b { + b.db.batch = nil + } + b.db.batchMu.Unlock() + +retry: + for len(b.calls) > 0 { + var failIdx = -1 + err := b.db.Update(func(tx *Tx) error { + for i, c := range b.calls { + if err := safelyCall(c.fn, tx); err != nil { + failIdx = i + return err + } + } + return nil + }) + + if failIdx >= 0 { + // take the failing transaction out of the batch. it's + // safe to shorten b.calls here because db.batch no longer + // points to us, and we hold the mutex anyway. + c := b.calls[failIdx] + b.calls[failIdx], b.calls = b.calls[len(b.calls)-1], b.calls[:len(b.calls)-1] + // tell the submitter re-run it solo, continue with the rest of the batch + c.err <- trySolo + continue retry + } + + // pass success, or bolt internal errors, to all callers + for _, c := range b.calls { + if c.err != nil { + c.err <- err + } + } + break retry + } +} + +// trySolo is a special sentinel error value used for signaling that a +// transaction function should be re-run. It should never be seen by +// callers. +var trySolo = errors.New("batch function returned an error and should be re-run solo") + +type panicked struct { + reason interface{} +} + +func (p panicked) Error() string { + if err, ok := p.reason.(error); ok { + return err.Error() + } + return fmt.Sprintf("panic: %v", p.reason) +} + +func safelyCall(fn func(*Tx) error, tx *Tx) (err error) { + defer func() { + if p := recover(); p != nil { + err = panicked{p} + } + }() + return fn(tx) +} + // Sync executes fdatasync() against the database file handle. // // This is not necessary under normal operation, however, if you use NoSync @@ -655,6 +806,36 @@ func (db *DB) allocate(count int) (*page, error) { return p, nil } +// grow grows the size of the database to the given sz. +func (db *DB) grow(sz int) error { + // Ignore if the new size is less than available file size. + if sz <= db.filesz { + return nil + } + + // If the data is smaller than the alloc size then only allocate what's needed. + // Once it goes over the allocation size then allocate in chunks. + if db.datasz < db.AllocSize { + sz = db.datasz + } else { + sz += db.AllocSize + } + + // Truncate and fsync to ensure file size metadata is flushed. + // https://github.com/boltdb/bolt/issues/284 + if !db.NoGrowSync && !db.readOnly { + if err := db.file.Truncate(int64(sz)); err != nil { + return fmt.Errorf("file resize error: %s", err) + } + if err := db.file.Sync(); err != nil { + return fmt.Errorf("file sync error: %s", err) + } + } + + db.filesz = sz + return nil +} + func (db *DB) IsReadOnly() bool { return db.readOnly } @@ -672,6 +853,19 @@ type Options struct { // Open database in read-only mode. Uses flock(..., LOCK_SH |LOCK_NB) to // grab a shared lock (UNIX). ReadOnly bool + + // Sets the DB.MmapFlags flag before memory mapping the file. + MmapFlags int + + // InitialMmapSize is the initial mmap size of the database + // in bytes. Read transactions won't block write transaction + // if the InitialMmapSize is large enough to hold database mmap + // size. (See DB.Begin for more information) + // + // If <=0, the initial map size is 0. + // If initialMmapSize is smaller than the previous database size, + // it takes no effect. + InitialMmapSize int } // DefaultOptions represent the options used if nil options are passed into Open(). diff --git a/Godeps/_workspace/src/github.com/boltdb/bolt/tx.go b/Godeps/_workspace/src/github.com/boltdb/bolt/tx.go index 6b52b2c8964..e74d2cae760 100644 --- a/Godeps/_workspace/src/github.com/boltdb/bolt/tx.go +++ b/Godeps/_workspace/src/github.com/boltdb/bolt/tx.go @@ -29,6 +29,14 @@ type Tx struct { pages map[pgid]*page stats TxStats commitHandlers []func() + + // WriteFlag specifies the flag for write-related methods like WriteTo(). + // Tx opens the database file with the specified flag to copy the data. + // + // By default, the flag is unset, which works well for mostly in-memory + // workloads. For databases that are much larger than available RAM, + // set the flag to syscall.O_DIRECT to avoid trashing the page cache. + WriteFlag int } // init initializes the transaction. @@ -87,18 +95,21 @@ func (tx *Tx) Stats() TxStats { // Bucket retrieves a bucket by name. // Returns nil if the bucket does not exist. +// The bucket instance is only valid for the lifetime of the transaction. func (tx *Tx) Bucket(name []byte) *Bucket { return tx.root.Bucket(name) } // CreateBucket creates a new bucket. // Returns an error if the bucket already exists, if the bucket name is blank, or if the bucket name is too long. +// The bucket instance is only valid for the lifetime of the transaction. func (tx *Tx) CreateBucket(name []byte) (*Bucket, error) { return tx.root.CreateBucket(name) } // CreateBucketIfNotExists creates a new bucket if it doesn't already exist. // Returns an error if the bucket name is blank, or if the bucket name is too long. +// The bucket instance is only valid for the lifetime of the transaction. func (tx *Tx) CreateBucketIfNotExists(name []byte) (*Bucket, error) { return tx.root.CreateBucketIfNotExists(name) } @@ -157,6 +168,8 @@ func (tx *Tx) Commit() error { // Free the old root bucket. tx.meta.root.root = tx.root.root + opgid := tx.meta.pgid + // Free the freelist and allocate new pages for it. This will overestimate // the size of the freelist but not underestimate the size (which would be bad). tx.db.freelist.free(tx.meta.txid, tx.db.page(tx.meta.freelist)) @@ -171,6 +184,14 @@ func (tx *Tx) Commit() error { } tx.meta.freelist = p.id + // If the high water mark has moved up then attempt to grow the database. + if tx.meta.pgid > opgid { + if err := tx.db.grow(int(tx.meta.pgid+1) * tx.db.pageSize); err != nil { + tx.rollback() + return err + } + } + // Write dirty pages to disk. startTime = time.Now() if err := tx.write(); err != nil { @@ -236,7 +257,8 @@ func (tx *Tx) close() { var freelistPendingN = tx.db.freelist.pending_count() var freelistAlloc = tx.db.freelist.size() - // Remove writer lock. + // Remove transaction ref & writer lock. + tx.db.rwtx = nil tx.db.rwlock.Unlock() // Merge statistics. @@ -250,11 +272,16 @@ func (tx *Tx) close() { } else { tx.db.removeTx(tx) } + + // Clear all references. tx.db = nil + tx.meta = nil + tx.root = Bucket{tx: tx} + tx.pages = nil } // Copy writes the entire database to a writer. -// This function exists for backwards compatibility. Use WriteTo() in +// This function exists for backwards compatibility. Use WriteTo() instead. func (tx *Tx) Copy(w io.Writer) error { _, err := tx.WriteTo(w) return err @@ -263,21 +290,18 @@ func (tx *Tx) Copy(w io.Writer) error { // WriteTo writes the entire database to a writer. // If err == nil then exactly tx.Size() bytes will be written into the writer. func (tx *Tx) WriteTo(w io.Writer) (n int64, err error) { - // Attempt to open reader directly. - var f *os.File - if f, err = os.OpenFile(tx.db.path, os.O_RDONLY|odirect, 0); err != nil { - // Fallback to a regular open if that doesn't work. - if f, err = os.OpenFile(tx.db.path, os.O_RDONLY, 0); err != nil { - return 0, err - } + // Attempt to open reader with WriteFlag + f, err := os.OpenFile(tx.db.path, os.O_RDONLY|tx.WriteFlag, 0) + if err != nil { + return 0, err } + defer func() { _ = f.Close() }() // Copy the meta pages. tx.db.metalock.Lock() n, err = io.CopyN(w, f, int64(tx.db.pageSize*2)) tx.db.metalock.Unlock() if err != nil { - _ = f.Close() return n, fmt.Errorf("meta copy: %s", err) } @@ -285,7 +309,6 @@ func (tx *Tx) WriteTo(w io.Writer) (n int64, err error) { wn, err := io.CopyN(w, f, tx.Size()-int64(tx.db.pageSize*2)) n += wn if err != nil { - _ = f.Close() return n, err } @@ -492,7 +515,7 @@ func (tx *Tx) writeMeta() error { } // page returns a reference to the page with a given id. -// If page has been written to then a temporary bufferred page is returned. +// If page has been written to then a temporary buffered page is returned. func (tx *Tx) page(id pgid) *page { // Check the dirty pages first. if tx.pages != nil { diff --git a/Godeps/_workspace/src/github.com/onsi/ginkgo/.travis.yml b/Godeps/_workspace/src/github.com/onsi/ginkgo/.travis.yml index 44018acc059..f0e67b84abe 100644 --- a/Godeps/_workspace/src/github.com/onsi/ginkgo/.travis.yml +++ b/Godeps/_workspace/src/github.com/onsi/ginkgo/.travis.yml @@ -2,13 +2,14 @@ language: go go: - 1.3 - 1.4 + - 1.5 - tip install: - - go get -v ./... + - go get -v -t ./... - go get golang.org/x/tools/cmd/cover - go get github.com/onsi/gomega - go install github.com/onsi/ginkgo/ginkgo - export PATH=$PATH:$HOME/gopath/bin -script: $HOME/gopath/bin/ginkgo -r --randomizeAllSpecs --failOnPending --randomizeSuites --race +script: $HOME/gopath/bin/ginkgo -r --randomizeAllSpecs --randomizeSuites --race --trace diff --git a/Godeps/_workspace/src/github.com/onsi/ginkgo/CHANGELOG.md b/Godeps/_workspace/src/github.com/onsi/ginkgo/CHANGELOG.md index ccba8abe7cc..438c8c1ec46 100644 --- a/Godeps/_workspace/src/github.com/onsi/ginkgo/CHANGELOG.md +++ b/Godeps/_workspace/src/github.com/onsi/ginkgo/CHANGELOG.md @@ -3,6 +3,7 @@ Improvements: - `Skip(message)` can be used to skip the current test. +- Added `extensions/table` - a Ginkgo DSL for [Table Driven Tests](http://onsi.github.io/ginkgo/#table-driven-tests) Bug Fixes: diff --git a/Godeps/_workspace/src/github.com/onsi/ginkgo/config/config.go b/Godeps/_workspace/src/github.com/onsi/ginkgo/config/config.go index 46ce16aa68d..7b22e34ad97 100644 --- a/Godeps/_workspace/src/github.com/onsi/ginkgo/config/config.go +++ b/Godeps/_workspace/src/github.com/onsi/ginkgo/config/config.go @@ -79,7 +79,7 @@ func Flags(flagSet *flag.FlagSet, prefix string, includeParallelFlags bool) { } flagSet.BoolVar(&(DefaultReporterConfig.NoColor), prefix+"noColor", false, "If set, suppress color output in default reporter.") - flagSet.Float64Var(&(DefaultReporterConfig.SlowSpecThreshold), prefix+"slowSpecThreshold", 5.0, "(in seconds) Specs that take longer to run than this threshold are flagged as slow by the default reporter (default: 5 seconds).") + flagSet.Float64Var(&(DefaultReporterConfig.SlowSpecThreshold), prefix+"slowSpecThreshold", 5.0, "(in seconds) Specs that take longer to run than this threshold are flagged as slow by the default reporter.") flagSet.BoolVar(&(DefaultReporterConfig.NoisyPendings), prefix+"noisyPendings", true, "If set, default reporter will shout about pending tests.") flagSet.BoolVar(&(DefaultReporterConfig.Verbose), prefix+"v", false, "If set, default reporter print out all specs as they begin.") flagSet.BoolVar(&(DefaultReporterConfig.Succinct), prefix+"succinct", false, "If set, default reporter prints out a very succinct report") diff --git a/Godeps/_workspace/src/github.com/onsi/ginkgo/extensions/table/table.go b/Godeps/_workspace/src/github.com/onsi/ginkgo/extensions/table/table.go new file mode 100644 index 00000000000..ae8ab7d248f --- /dev/null +++ b/Godeps/_workspace/src/github.com/onsi/ginkgo/extensions/table/table.go @@ -0,0 +1,98 @@ +/* + +Table provides a simple DSL for Ginkgo-native Table-Driven Tests + +The godoc documentation describes Table's API. More comprehensive documentation (with examples!) is available at http://onsi.github.io/ginkgo#table-driven-tests + +*/ + +package table + +import ( + "fmt" + "reflect" + + "github.com/onsi/ginkgo" +) + +/* +DescribeTable describes a table-driven test. + +For example: + + DescribeTable("a simple table", + func(x int, y int, expected bool) { + Ω(x > y).Should(Equal(expected)) + }, + Entry("x > y", 1, 0, true), + Entry("x == y", 0, 0, false), + Entry("x < y", 0, 1, false), + ) + +The first argument to `DescribeTable` is a string description. +The second argument is a function that will be run for each table entry. Your assertions go here - the function is equivalent to a Ginkgo It. +The subsequent arguments must be of type `TableEntry`. We recommend using the `Entry` convenience constructors. + +The `Entry` constructor takes a string description followed by an arbitrary set of parameters. These parameters are passed into your function. + +Under the hood, `DescribeTable` simply generates a new Ginkgo `Describe`. Each `Entry` is turned into an `It` within the `Describe`. + +It's important to understand that the `Describe`s and `It`s are generated at evaluation time (i.e. when Ginkgo constructs the tree of tests and before the tests run). + +Individual Entries can be focused (with FEntry) or marked pending (with PEntry or XEntry). In addition, the entire table can be focused or marked pending with FDescribeTable and PDescribeTable/XDescribeTable. +*/ +func DescribeTable(description string, itBody interface{}, entries ...TableEntry) bool { + describeTable(description, itBody, entries, false, false) + return true +} + +/* +You can focus a table with `FDescribeTable`. This is equivalent to `FDescribe`. +*/ +func FDescribeTable(description string, itBody interface{}, entries ...TableEntry) bool { + describeTable(description, itBody, entries, false, true) + return true +} + +/* +You can mark a table as pending with `PDescribeTable`. This is equivalent to `PDescribe`. +*/ +func PDescribeTable(description string, itBody interface{}, entries ...TableEntry) bool { + describeTable(description, itBody, entries, true, false) + return true +} + +/* +You can mark a table as pending with `XDescribeTable`. This is equivalent to `XDescribe`. +*/ +func XDescribeTable(description string, itBody interface{}, entries ...TableEntry) bool { + describeTable(description, itBody, entries, true, false) + return true +} + +func describeTable(description string, itBody interface{}, entries []TableEntry, pending bool, focused bool) { + itBodyValue := reflect.ValueOf(itBody) + if itBodyValue.Kind() != reflect.Func { + panic(fmt.Sprintf("DescribeTable expects a function, got %#v", itBody)) + } + + if pending { + ginkgo.PDescribe(description, func() { + for _, entry := range entries { + entry.generateIt(itBodyValue) + } + }) + } else if focused { + ginkgo.FDescribe(description, func() { + for _, entry := range entries { + entry.generateIt(itBodyValue) + } + }) + } else { + ginkgo.Describe(description, func() { + for _, entry := range entries { + entry.generateIt(itBodyValue) + } + }) + } +} diff --git a/Godeps/_workspace/src/github.com/onsi/ginkgo/extensions/table/table_entry.go b/Godeps/_workspace/src/github.com/onsi/ginkgo/extensions/table/table_entry.go new file mode 100644 index 00000000000..5fa645bceee --- /dev/null +++ b/Godeps/_workspace/src/github.com/onsi/ginkgo/extensions/table/table_entry.go @@ -0,0 +1,81 @@ +package table + +import ( + "reflect" + + "github.com/onsi/ginkgo" +) + +/* +TableEntry represents an entry in a table test. You generally use the `Entry` constructor. +*/ +type TableEntry struct { + Description string + Parameters []interface{} + Pending bool + Focused bool +} + +func (t TableEntry) generateIt(itBody reflect.Value) { + if t.Pending { + ginkgo.PIt(t.Description) + return + } + + values := []reflect.Value{} + for i, param := range t.Parameters { + var value reflect.Value + + if param == nil { + inType := itBody.Type().In(i) + value = reflect.Zero(inType) + } else { + value = reflect.ValueOf(param) + } + + values = append(values, value) + } + + body := func() { + itBody.Call(values) + } + + if t.Focused { + ginkgo.FIt(t.Description, body) + } else { + ginkgo.It(t.Description, body) + } +} + +/* +Entry constructs a TableEntry. + +The first argument is a required description (this becomes the content of the generated Ginkgo `It`). +Subsequent parameters are saved off and sent to the callback passed in to `DescribeTable`. + +Each Entry ends up generating an individual Ginkgo It. +*/ +func Entry(description string, parameters ...interface{}) TableEntry { + return TableEntry{description, parameters, false, false} +} + +/* +You can focus a particular entry with FEntry. This is equivalent to FIt. +*/ +func FEntry(description string, parameters ...interface{}) TableEntry { + return TableEntry{description, parameters, false, true} +} + +/* +You can mark a particular entry as pending with PEntry. This is equivalent to PIt. +*/ +func PEntry(description string, parameters ...interface{}) TableEntry { + return TableEntry{description, parameters, true, false} +} + +/* +You can mark a particular entry as pending with XEntry. This is equivalent to XIt. +*/ +func XEntry(description string, parameters ...interface{}) TableEntry { + return TableEntry{description, parameters, true, false} +} diff --git a/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/nodot_command.go b/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/nodot_command.go index e1a2e13099a..212235bae0a 100644 --- a/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/nodot_command.go +++ b/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/nodot_command.go @@ -63,6 +63,8 @@ func findSuiteFile() (string, os.FileMode) { if err != nil { complainAndQuit("Could not find suite file for nodot: " + err.Error()) } + defer f.Close() + if re.MatchReader(bufio.NewReader(f)) { return path, file.Mode() } diff --git a/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/testrunner/test_runner.go b/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/testrunner/test_runner.go index 1135c334d6f..a1e47ba18b3 100644 --- a/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/testrunner/test_runner.go +++ b/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/testrunner/test_runner.go @@ -101,13 +101,18 @@ func (t *TestRunner) CompileTo(path string) error { } if fileExists(path) == false { - compiledFile := filepath.Join(t.Suite.Path, t.Suite. PackageName+".test") + compiledFile := filepath.Join(t.Suite.Path, t.Suite.PackageName+".test") if fileExists(compiledFile) { // seems like we are on an old go version that does not support the -o flag on go test // move the compiled test file to the desired location by hand err = os.Rename(compiledFile, path) if err != nil { - return fmt.Errorf("Failed to move compiled file: %s", err) + // We cannot move the file, perhaps because the source and destination + // are on different partitions. We can copy the file, however. + err = copyFile(compiledFile, path) + if err != nil { + return fmt.Errorf("Failed to copy compiled file: %s", err) + } } } else { return fmt.Errorf("Failed to compile %s: output file %q could not be found", t.Suite.PackageName, path) @@ -124,6 +129,49 @@ func fileExists(path string) bool { return err == nil || os.IsNotExist(err) == false } +// copyFile copies the contents of the file named src to the file named +// by dst. The file will be created if it does not already exist. If the +// destination file exists, all it's contents will be replaced by the contents +// of the source file. +func copyFile(src, dst string) error { + srcInfo, err := os.Stat(src) + if err != nil { + return err + } + mode := srcInfo.Mode() + + in, err := os.Open(src) + if err != nil { + return err + } + + defer in.Close() + + out, err := os.Create(dst) + if err != nil { + return err + } + + defer func() { + closeErr := out.Close() + if err == nil { + err = closeErr + } + }() + + _, err = io.Copy(out, in) + if err != nil { + return err + } + + err = out.Sync() + if err != nil { + return err + } + + return out.Chmod(mode) +} + /* go test -c -i spits package.test out into the cwd. there's no way to change this. diff --git a/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/testsuite/test_suite.go b/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/testsuite/test_suite.go index cc7d2f45393..4ef3bc44ff1 100644 --- a/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/testsuite/test_suite.go +++ b/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/testsuite/test_suite.go @@ -4,6 +4,7 @@ import ( "errors" "io/ioutil" "os" + "path" "path/filepath" "regexp" "strings" @@ -47,6 +48,15 @@ func PrecompiledTestSuite(path string) (TestSuite, error) { func SuitesInDir(dir string, recurse bool) []TestSuite { suites := []TestSuite{} + + // "This change will only be enabled if the go command is run with + // GO15VENDOREXPERIMENT=1 in its environment." + // c.f. the vendor-experiment proposal https://goo.gl/2ucMeC + vendorExperiment := os.Getenv("GO15VENDOREXPERIMENT") + if (vendorExperiment == "1") && path.Base(dir) == "vendor" { + return suites + } + files, _ := ioutil.ReadDir(dir) re := regexp.MustCompile(`_test\.go$`) for _, file := range files { diff --git a/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/unfocus_command.go b/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/unfocus_command.go index 16f3c3b72e3..683c3a9982d 100644 --- a/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/unfocus_command.go +++ b/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/unfocus_command.go @@ -24,6 +24,8 @@ func unfocusSpecs([]string, []string) { unfocus("Context") unfocus("It") unfocus("Measure") + unfocus("DescribeTable") + unfocus("Entry") } func unfocus(component string) { diff --git a/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/watch_command.go b/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/watch_command.go index 97361224833..03ea0125877 100644 --- a/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/watch_command.go +++ b/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/watch_command.go @@ -80,7 +80,7 @@ func (w *SpecWatcher) WatchSuites(args []string, additionalArgs []string) { } for suite, err := range errors { - fmt.Printf("Failed to watch %s: %s\n"+suite.PackageName, err) + fmt.Printf("Failed to watch %s: %s\n", suite.PackageName, err) } if len(suites) == 1 { diff --git a/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo_dsl.go b/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo_dsl.go index 36f6d8e773f..1d8e593052a 100644 --- a/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo_dsl.go +++ b/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo_dsl.go @@ -347,6 +347,28 @@ func XIt(text string, _ ...interface{}) bool { return true } +//Specify blocks are aliases for It blocks and allow for more natural wording in situations +//which "It" does not fit into a natural sentence flow. All the same protocols apply for Specify blocks +//which apply to It blocks. +func Specify(text string, body interface{}, timeout ...float64) bool { + return It(text, body, timeout...) +} + +//You can focus individual Specifys using FSpecify +func FSpecify(text string, body interface{}, timeout ...float64) bool { + return FIt(text, body, timeout...) +} + +//You can mark Specifys as pending using PSpecify +func PSpecify(text string, is ...interface{}) bool { + return PIt(text, is...) +} + +//You can mark Specifys as pending using XSpecify +func XSpecify(text string, is ...interface{}) bool { + return XIt(text, is...) +} + //By allows you to better document large Its. // //Generally you should try to keep your Its short and to the point. This is not always possible, however, diff --git a/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/leafnodes/runner.go b/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/leafnodes/runner.go index 003f8516099..870ad826da0 100644 --- a/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/leafnodes/runner.go +++ b/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/leafnodes/runner.go @@ -68,7 +68,7 @@ func (r *runner) runAsync() (outcome types.SpecState, failure types.SpecFailure) done := make(chan interface{}, 1) go func() { - finished := false + finished := false defer func() { if e := recover(); e != nil || !finished { @@ -83,7 +83,7 @@ func (r *runner) runAsync() (outcome types.SpecState, failure types.SpecFailure) }() r.asyncFunc(done) - finished = true + finished = true }() select { @@ -96,7 +96,7 @@ func (r *runner) runAsync() (outcome types.SpecState, failure types.SpecFailure) return } func (r *runner) runSync() (outcome types.SpecState, failure types.SpecFailure) { - finished := false + finished := false defer func() { if e := recover(); e != nil || !finished { @@ -107,7 +107,7 @@ func (r *runner) runSync() (outcome types.SpecState, failure types.SpecFailure) }() r.syncFunc() - finished = true + finished = true return } diff --git a/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/remote/output_interceptor_unix.go b/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/remote/output_interceptor_unix.go index 181b227e62e..1235ad00cbb 100644 --- a/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/remote/output_interceptor_unix.go +++ b/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/remote/output_interceptor_unix.go @@ -6,7 +6,6 @@ import ( "errors" "io/ioutil" "os" - "syscall" ) func NewOutputInterceptor() OutputInterceptor { @@ -31,8 +30,12 @@ func (interceptor *outputInterceptor) StartInterceptingOutput() error { return err } - syscall.Dup2(int(interceptor.redirectFile.Fd()), 1) - syscall.Dup2(int(interceptor.redirectFile.Fd()), 2) + // Call a function in ./syscall_dup_*.go + // If building for everything other than linux_arm64, + // use a "normal" syscall.Dup2(oldfd, newfd) call. If building for linux_arm64 (which doesn't have syscall.Dup2) + // call syscall.Dup3(oldfd, newfd, 0). They are nearly identical, see: http://linux.die.net/man/2/dup3 + syscallDup(int(interceptor.redirectFile.Fd()), 1) + syscallDup(int(interceptor.redirectFile.Fd()), 2) return nil } diff --git a/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/remote/syscall_dup_linux_arm64.go b/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/remote/syscall_dup_linux_arm64.go new file mode 100644 index 00000000000..9550d37b36b --- /dev/null +++ b/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/remote/syscall_dup_linux_arm64.go @@ -0,0 +1,11 @@ +// +build linux,arm64 + +package remote + +import "syscall" + +// linux_arm64 doesn't have syscall.Dup2 which ginkgo uses, so +// use the nearly identical syscall.Dup3 instead +func syscallDup(oldfd int, newfd int) (err error) { + return syscall.Dup3(oldfd, newfd, 0) +} diff --git a/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/remote/syscall_dup_unix.go b/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/remote/syscall_dup_unix.go new file mode 100644 index 00000000000..e7fad5bbb03 --- /dev/null +++ b/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/remote/syscall_dup_unix.go @@ -0,0 +1,10 @@ +// +build !linux !arm64 +// +build !windows + +package remote + +import "syscall" + +func syscallDup(oldfd int, newfd int) (err error) { + return syscall.Dup2(oldfd, newfd) +} diff --git a/Godeps/_workspace/src/github.com/onsi/ginkgo/reporters/stenographer/stenographer.go b/Godeps/_workspace/src/github.com/onsi/ginkgo/reporters/stenographer/stenographer.go index 8d1a438df7f..5b5d905da16 100644 --- a/Godeps/_workspace/src/github.com/onsi/ginkgo/reporters/stenographer/stenographer.go +++ b/Godeps/_workspace/src/github.com/onsi/ginkgo/reporters/stenographer/stenographer.go @@ -8,6 +8,7 @@ package stenographer import ( "fmt" + "runtime" "strings" "github.com/onsi/ginkgo/types" @@ -59,14 +60,20 @@ type Stenographer interface { } func New(color bool) Stenographer { + denoter := "•" + if runtime.GOOS == "windows" { + denoter = "+" + } return &consoleStenographer{ color: color, + denoter: denoter, cursorState: cursorStateTop, } } type consoleStenographer struct { color bool + denoter string cursorState cursorStateType } @@ -197,7 +204,7 @@ func (s *consoleStenographer) announceSetupFailure(name string, summary *types.S s.println(0, s.colorize(redColor+boldStyle, "%s [%.3f seconds]", message, summary.RunTime.Seconds())) - indentation := s.printCodeLocationBlock([]string{name}, []types.CodeLocation{summary.CodeLocation}, summary.ComponentType, 0, true, true) + indentation := s.printCodeLocationBlock([]string{name}, []types.CodeLocation{summary.CodeLocation}, summary.ComponentType, 0, summary.State, true) s.printNewLine() s.printFailure(indentation, summary.State, summary.Failure, fullTrace) @@ -216,13 +223,13 @@ func (s *consoleStenographer) AnnounceCapturedOutput(output string) { } func (s *consoleStenographer) AnnounceSuccesfulSpec(spec *types.SpecSummary) { - s.print(0, s.colorize(greenColor, "•")) + s.print(0, s.colorize(greenColor, s.denoter)) s.stream() } func (s *consoleStenographer) AnnounceSuccesfulSlowSpec(spec *types.SpecSummary, succinct bool) { s.printBlockWithMessage( - s.colorize(greenColor, "• [SLOW TEST:%.3f seconds]", spec.RunTime.Seconds()), + s.colorize(greenColor, "%s [SLOW TEST:%.3f seconds]", s.denoter, spec.RunTime.Seconds()), "", spec, succinct, @@ -231,7 +238,7 @@ func (s *consoleStenographer) AnnounceSuccesfulSlowSpec(spec *types.SpecSummary, func (s *consoleStenographer) AnnounceSuccesfulMeasurement(spec *types.SpecSummary, succinct bool) { s.printBlockWithMessage( - s.colorize(greenColor, "• [MEASUREMENT]"), + s.colorize(greenColor, "%s [MEASUREMENT]", s.denoter), s.measurementReport(spec, succinct), spec, succinct, @@ -261,24 +268,24 @@ func (s *consoleStenographer) AnnounceSkippedSpec(spec *types.SpecSummary, succi s.startBlock() s.println(0, s.colorize(cyanColor+boldStyle, "S [SKIPPING]%s [%.3f seconds]", s.failureContext(spec.Failure.ComponentType), spec.RunTime.Seconds())) - indentation := s.printCodeLocationBlock(spec.ComponentTexts, spec.ComponentCodeLocations, spec.Failure.ComponentType, spec.Failure.ComponentIndex, true, succinct) + indentation := s.printCodeLocationBlock(spec.ComponentTexts, spec.ComponentCodeLocations, spec.Failure.ComponentType, spec.Failure.ComponentIndex, spec.State, succinct) s.printNewLine() - s.printFailure(indentation, spec.State, spec.Failure, fullTrace) + s.printSkip(indentation, spec.Failure) s.endBlock() } } func (s *consoleStenographer) AnnounceSpecTimedOut(spec *types.SpecSummary, succinct bool, fullTrace bool) { - s.printSpecFailure("•... Timeout", spec, succinct, fullTrace) + s.printSpecFailure(fmt.Sprintf("%s... Timeout", s.denoter), spec, succinct, fullTrace) } func (s *consoleStenographer) AnnounceSpecPanicked(spec *types.SpecSummary, succinct bool, fullTrace bool) { - s.printSpecFailure("•! Panic", spec, succinct, fullTrace) + s.printSpecFailure(fmt.Sprintf("%s! Panic", s.denoter), spec, succinct, fullTrace) } func (s *consoleStenographer) AnnounceSpecFailed(spec *types.SpecSummary, succinct bool, fullTrace bool) { - s.printSpecFailure("• Failure", spec, succinct, fullTrace) + s.printSpecFailure(fmt.Sprintf("%s Failure", s.denoter), spec, succinct, fullTrace) } func (s *consoleStenographer) SummarizeFailures(summaries []*types.SpecSummary) { @@ -311,7 +318,7 @@ func (s *consoleStenographer) SummarizeFailures(summaries []*types.SpecSummary) } else if summary.Failed() { s.print(0, s.colorize(redColor+boldStyle, "[Fail] ")) } - s.printSpecContext(summary.ComponentTexts, summary.ComponentCodeLocations, summary.Failure.ComponentType, summary.Failure.ComponentIndex, true, true) + s.printSpecContext(summary.ComponentTexts, summary.ComponentCodeLocations, summary.Failure.ComponentType, summary.Failure.ComponentIndex, summary.State, true) s.printNewLine() s.println(0, s.colorize(lightGrayColor, summary.Failure.Location.String())) } @@ -344,7 +351,7 @@ func (s *consoleStenographer) printBlockWithMessage(header string, message strin s.startBlock() s.println(0, header) - indentation := s.printCodeLocationBlock(spec.ComponentTexts, spec.ComponentCodeLocations, types.SpecComponentTypeInvalid, 0, false, succinct) + indentation := s.printCodeLocationBlock(spec.ComponentTexts, spec.ComponentCodeLocations, types.SpecComponentTypeInvalid, 0, spec.State, succinct) if message != "" { s.printNewLine() @@ -358,7 +365,7 @@ func (s *consoleStenographer) printSpecFailure(message string, spec *types.SpecS s.startBlock() s.println(0, s.colorize(redColor+boldStyle, "%s%s [%.3f seconds]", message, s.failureContext(spec.Failure.ComponentType), spec.RunTime.Seconds())) - indentation := s.printCodeLocationBlock(spec.ComponentTexts, spec.ComponentCodeLocations, spec.Failure.ComponentType, spec.Failure.ComponentIndex, true, succinct) + indentation := s.printCodeLocationBlock(spec.ComponentTexts, spec.ComponentCodeLocations, spec.Failure.ComponentType, spec.Failure.ComponentIndex, spec.State, succinct) s.printNewLine() s.printFailure(indentation, spec.State, spec.Failure, fullTrace) @@ -382,6 +389,12 @@ func (s *consoleStenographer) failureContext(failedComponentType types.SpecCompo return "" } +func (s *consoleStenographer) printSkip(indentation int, spec types.SpecFailure) { + s.println(indentation, s.colorize(cyanColor, spec.Message)) + s.printNewLine() + s.println(indentation, spec.Location.String()) +} + func (s *consoleStenographer) printFailure(indentation int, state types.SpecState, failure types.SpecFailure, fullTrace bool) { if state == types.SpecStatePanicked { s.println(indentation, s.colorize(redColor+boldStyle, failure.Message)) @@ -402,7 +415,7 @@ func (s *consoleStenographer) printFailure(indentation int, state types.SpecStat } } -func (s *consoleStenographer) printSpecContext(componentTexts []string, componentCodeLocations []types.CodeLocation, failedComponentType types.SpecComponentType, failedComponentIndex int, failure bool, succinct bool) int { +func (s *consoleStenographer) printSpecContext(componentTexts []string, componentCodeLocations []types.CodeLocation, failedComponentType types.SpecComponentType, failedComponentIndex int, state types.SpecState, succinct bool) int { startIndex := 1 indentation := 0 @@ -411,7 +424,11 @@ func (s *consoleStenographer) printSpecContext(componentTexts []string, componen } for i := startIndex; i < len(componentTexts); i++ { - if failure && i == failedComponentIndex { + if (state.IsFailure() || state == types.SpecStateSkipped) && i == failedComponentIndex { + color := redColor + if state == types.SpecStateSkipped { + color = cyanColor + } blockType := "" switch failedComponentType { case types.SpecComponentTypeBeforeSuite: @@ -430,9 +447,9 @@ func (s *consoleStenographer) printSpecContext(componentTexts []string, componen blockType = "Measurement" } if succinct { - s.print(0, s.colorize(redColor+boldStyle, "[%s] %s ", blockType, componentTexts[i])) + s.print(0, s.colorize(color+boldStyle, "[%s] %s ", blockType, componentTexts[i])) } else { - s.println(indentation, s.colorize(redColor+boldStyle, "%s [%s]", componentTexts[i], blockType)) + s.println(indentation, s.colorize(color+boldStyle, "%s [%s]", componentTexts[i], blockType)) s.println(indentation, s.colorize(grayColor, "%s", componentCodeLocations[i])) } } else { @@ -449,8 +466,8 @@ func (s *consoleStenographer) printSpecContext(componentTexts []string, componen return indentation } -func (s *consoleStenographer) printCodeLocationBlock(componentTexts []string, componentCodeLocations []types.CodeLocation, failedComponentType types.SpecComponentType, failedComponentIndex int, failure bool, succinct bool) int { - indentation := s.printSpecContext(componentTexts, componentCodeLocations, failedComponentType, failedComponentIndex, failure, succinct) +func (s *consoleStenographer) printCodeLocationBlock(componentTexts []string, componentCodeLocations []types.CodeLocation, failedComponentType types.SpecComponentType, failedComponentIndex int, state types.SpecState, succinct bool) int { + indentation := s.printSpecContext(componentTexts, componentCodeLocations, failedComponentType, failedComponentIndex, state, succinct) if succinct { if len(componentTexts) > 0 { diff --git a/Godeps/_workspace/src/github.com/onsi/ginkgo/types/types.go b/Godeps/_workspace/src/github.com/onsi/ginkgo/types/types.go index 583b3473959..889612e0a72 100644 --- a/Godeps/_workspace/src/github.com/onsi/ginkgo/types/types.go +++ b/Godeps/_workspace/src/github.com/onsi/ginkgo/types/types.go @@ -35,7 +35,7 @@ type SpecSummary struct { } func (s SpecSummary) HasFailureState() bool { - return s.State == SpecStateTimedOut || s.State == SpecStatePanicked || s.State == SpecStateFailed + return s.State.IsFailure() } func (s SpecSummary) TimedOut() bool { @@ -115,6 +115,10 @@ const ( SpecStateTimedOut ) +func (state SpecState) IsFailure() bool { + return state == SpecStateTimedOut || state == SpecStatePanicked || state == SpecStateFailed +} + type SpecComponentType uint const ( From a400be6d55036093fdafe53f0d913a219ba82adb Mon Sep 17 00:00:00 2001 From: Eric Tune Date: Tue, 2 Feb 2016 15:21:33 -0800 Subject: [PATCH 089/328] Added design proposal for selector generation. Linked from jobs proposal. --- docs/proposals/job.md | 5 +- docs/proposals/selector-generation.md | 133 ++++++++++++++++++++++++++ 2 files changed, 136 insertions(+), 2 deletions(-) create mode 100644 docs/proposals/selector-generation.md diff --git a/docs/proposals/job.md b/docs/proposals/job.md index 202e39ac227..36e7a760605 100644 --- a/docs/proposals/job.md +++ b/docs/proposals/job.md @@ -179,12 +179,13 @@ Job controller will be emitting the following events: ## Future evolution Below are the possible future extensions to the Job controller: -* Be able to limit the execution time for a job, similarly to ActiveDeadlineSeconds for Pods. -* Be able to create a chain of jobs dependent one on another. +* Be able to limit the execution time for a job, similarly to ActiveDeadlineSeconds for Pods. *now implemented* +* Be able to create a chain of jobs dependent one on another. *will be implemented in a separate type called Workflow* * Be able to specify the work each of the workers should execute (see type 1 from [this comment](https://github.com/kubernetes/kubernetes/issues/1624#issuecomment-97622142)) * Be able to inspect Pods running a Job, especially after a Job has finished, e.g. by providing pointers to Pods in the JobStatus ([see comment](https://github.com/kubernetes/kubernetes/pull/11746/files#r37142628)). +* help users avoid non-unique label selectors ([see this proposal](selector-generation.md)) diff --git a/docs/proposals/selector-generation.md b/docs/proposals/selector-generation.md new file mode 100644 index 00000000000..27107c31291 --- /dev/null +++ b/docs/proposals/selector-generation.md @@ -0,0 +1,133 @@ + + + + +WARNING +WARNING +WARNING +WARNING +WARNING + +

PLEASE NOTE: This document applies to the HEAD of the source tree

+ +If you are using a released version of Kubernetes, you should +refer to the docs that go with that version. + +Documentation for other releases can be found at +[releases.k8s.io](http://releases.k8s.io). + +-- + + + + + +Proposed Design +============= + +# Goals + +Make it really hard to accidentally create a job which has an overlapping selector, while still making it possible to chose an arbitrary selector, and without adding complex constraint solving to the APIserver. + +# Use Cases + +1. user can leave all label and selector fields blank and system will fill in reasonable ones: non-overlappingness guaranteed. +2. user can put on the pod template some labels that are useful to the user, without reasoning about non-overlappingness. System adds additional label to assure not overlapping. +3. If user wants to reparent pods to new job (very rare case) and knows what they are doing, they can completely disable this behavior and specify explicit selector. +4. If a controller that makes jobs, like scheduled job, wants to use different labels, such as the time and date of the run, it can do that. +5. If User reads v1beta1 documentation or reuses v1beta1 Job definitions and just changes the API group, the user should not automatically be allowed to specify a selector, since this is very rarely what people want to do and is error prone. +6. If User downloads an existing job definition, e.g. with `kubectl get jobs/old -o yaml` and tries to modify and post it, he should not create an overlapping job. +7. If User downloads an existing job definition, e.g. with `kubectl get jobs/old -o yaml` and tries to modify and post it, and he accidentally copies the uniquifying label from the old one, then he should not get an error from a label-key conflict, nor get erratic behavior. +8. If user reads swagger docs and sees the selector field, he should not be able to set it without realizing the risks. +8. (Deferred requirement:) If user wants to specify a preferred name for the non-overlappingness key, they can pick a name. + +# Proposed changes + +## APIserver + +`extensions/v1beta1 Job` remains the same. `batch/v1 Job` changes change as follows. + +There are two allowed usage modes: + +### Automatic Mode + +- User does not specify `job.spec.selector`. +- User is probably unaware of the `job.spec.noAutoSelector` field and does not think about it. +- User optionally puts labels on pod template (optional). user does not think about uniqueness, just labeling for user's own reasons. +- Defaulting logic sets `job.spec.selector` to `matchLabels["controller-uid"]="$UIDOFJOB"` +- Defaulting logic appends 2 labels to the `.spec.template.metadata.labels`. + - The first label is controller-uid=$UIDOFJOB. + - The second label is "job-name=$NAMEOFJOB". + +### Manual Mode + +- User means User or Controller for the rest of this list. +- User does specify `job.spec.selector`. +- User does specify `job.spec.noAutoSelector=true` +- User puts a unique label or label(s) on pod template (required). user does think carefully about uniqueness. +- No defaulting of pod labels or the selector happen. + +### Common to both modes + +- Validation code ensures that the selector on the job selects the labels on the pod template, and rejects if not. + +### Rationale + +UID is better than Name in that: +- it allows cross-namespace control someday if we need it. +- it is unique across all kinds. `controller-name=foo` does not ensure uniqueness across Kinds `job` vs `replicaSet`. Even `job-name=foo` has a problem: you might have a `batch.Job` and a `snazzyjob.io/types.Job` -- the latter cannot use label `job-name=foo`, though there is a temptation to do so. +- it uniquely identifies the controller across time. This prevents the case where, for example, someone deletes a job via the REST api or client (where cascade=false), leaving pods around. We don't want those to be picked up unintentionally. It also prevents the case where a user looks at an old job that finished but is not deleted, and tries to select its pods, and gets the wrong impression that it is still running. + +Job name is more user friendly. It is self documenting + +Commands like `kubectl get pods -l job-name=myjob` should do exactly what is wanted 99.9% of the time. Automated control loops should still use the controller-uid=label. + +Using both gets the benefits of both, at the cost of some label verbosity. + +### Overriding Unique Labels + +If user does specify `job.spec.selector` then the user must also specify `job.spec.noAutoSelector`. +This ensures the user knows that what he is doing is not the normal thing to do. + +To prevent users from copying the `job.spec.noAutoSelector` flag from existing jobs, it will be +optional and default to false, which means when you ask GET and existing job back that didn't use this feature, you don't even see the `job.spec.noAutoSelector` flag, so you are not tempted to wonder if you should fiddle with it. + +## Job Controller + +No changes + +## Kubectl + +No required changes. +Suggest moving SELECTOR to wide output of `kubectl get jobs` since users don't write the selector. + +## Docs + +Remove examples that use selector and remove labels from pod templates. +Recommend `kubectl get jobs -l job-name=name` as the way to find pods of a job. + +# Cross Version Compat + +`v1beta1` will not have a `job.spec.noAutoSelector` and will not provide a default selector. + +Conversion from v1beta1 to v1 will use the user-provided selector and set `job.spec.noAutoSelector=true`. + +# Future Work + +Follow this pattern for Deployments, ReplicaSet, DaemonSet when going to v1, if it works well for job. + +Docs will be edited to show examples without a `job.spec.selector`. + +We probably want as much as possible the same behavior for Job and ReplicationController. + + + + + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/proposals/selector-generation.md?pixel)]() + From 7df86e1ecf40015dac616e33f8fb94467d1e95ad Mon Sep 17 00:00:00 2001 From: Mike Danese Date: Tue, 2 Feb 2016 19:42:35 -0800 Subject: [PATCH 090/328] create external api for scheduler config move defaulting into external pacakge --- pkg/apis/componentconfig/register.go | 4 +- pkg/apis/componentconfig/types.go | 2 + pkg/apis/componentconfig/v1alpha1/defaults.go | 34 +++++++++++++ pkg/apis/componentconfig/v1alpha1/register.go | 4 +- pkg/apis/componentconfig/v1alpha1/types.go | 50 +++++++++++++++++++ .../cmd/kube-scheduler/app/options/options.go | 14 ++---- 6 files changed, 96 insertions(+), 12 deletions(-) diff --git a/pkg/apis/componentconfig/register.go b/pkg/apis/componentconfig/register.go index eaf67580996..3604129a651 100644 --- a/pkg/apis/componentconfig/register.go +++ b/pkg/apis/componentconfig/register.go @@ -45,7 +45,9 @@ func addKnownTypes(scheme *runtime.Scheme) { // TODO this will get cleaned up with the scheme types are fixed scheme.AddKnownTypes(SchemeGroupVersion, &KubeProxyConfiguration{}, + &KubeSchedulerConfiguration{}, ) } -func (obj *KubeProxyConfiguration) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *KubeProxyConfiguration) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *KubeSchedulerConfiguration) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } diff --git a/pkg/apis/componentconfig/types.go b/pkg/apis/componentconfig/types.go index af6417a8893..416089b08e1 100644 --- a/pkg/apis/componentconfig/types.go +++ b/pkg/apis/componentconfig/types.go @@ -291,6 +291,8 @@ type KubeletConfiguration struct { } type KubeSchedulerConfiguration struct { + unversioned.TypeMeta + // port is the port that the scheduler's http service runs on. Port int `json:"port"` // address is the IP address to serve on. diff --git a/pkg/apis/componentconfig/v1alpha1/defaults.go b/pkg/apis/componentconfig/v1alpha1/defaults.go index 0ce963f9263..c7544f304ee 100644 --- a/pkg/apis/componentconfig/v1alpha1/defaults.go +++ b/pkg/apis/componentconfig/v1alpha1/defaults.go @@ -19,8 +19,10 @@ package v1alpha1 import ( "time" + "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/kubelet/qos" + "k8s.io/kubernetes/pkg/master/ports" "k8s.io/kubernetes/pkg/runtime" ) @@ -44,5 +46,37 @@ func addDefaultingFuncs(scheme *runtime.Scheme) { obj.IPTablesSyncPeriod = unversioned.Duration{5 * time.Second} } }, + func(obj *KubeSchedulerConfiguration) { + if obj.Port == 0 { + obj.Port = ports.SchedulerPort + } + if obj.Address == "" { + obj.Address = "0.0.0.0" + } + if obj.AlgorithmProvider == "" { + obj.AlgorithmProvider = "DefaultProvider" + } + if obj.KubeAPIQPS == 0 { + obj.KubeAPIQPS = 50.0 + } + if obj.KubeAPIBurst == 0 { + obj.KubeAPIBurst = 100 + } + if obj.SchedulerName == "" { + obj.SchedulerName = api.DefaultSchedulerName + } + }, + func(obj *LeaderElectionConfiguration) { + zero := unversioned.Duration{} + if obj.LeaseDuration == zero { + obj.LeaseDuration = unversioned.Duration{15 * time.Second} + } + if obj.RenewDeadline == zero { + obj.RenewDeadline = unversioned.Duration{10 * time.Second} + } + if obj.RetryPeriod == zero { + obj.RetryPeriod = unversioned.Duration{2 * time.Second} + } + }, ) } diff --git a/pkg/apis/componentconfig/v1alpha1/register.go b/pkg/apis/componentconfig/v1alpha1/register.go index ab0bdd5fa8f..4510fac9263 100644 --- a/pkg/apis/componentconfig/v1alpha1/register.go +++ b/pkg/apis/componentconfig/v1alpha1/register.go @@ -35,7 +35,9 @@ func AddToScheme(scheme *runtime.Scheme) { func addKnownTypes(scheme *runtime.Scheme) { scheme.AddKnownTypes(SchemeGroupVersion, &KubeProxyConfiguration{}, + &KubeSchedulerConfiguration{}, ) } -func (obj *KubeProxyConfiguration) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *KubeProxyConfiguration) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *KubeSchedulerConfiguration) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } diff --git a/pkg/apis/componentconfig/v1alpha1/types.go b/pkg/apis/componentconfig/v1alpha1/types.go index 9da97f84ed9..47cab1ec409 100644 --- a/pkg/apis/componentconfig/v1alpha1/types.go +++ b/pkg/apis/componentconfig/v1alpha1/types.go @@ -74,3 +74,53 @@ const ( ProxyModeUserspace ProxyMode = "userspace" ProxyModeIPTables ProxyMode = "iptables" ) + +type KubeSchedulerConfiguration struct { + unversioned.TypeMeta + + // 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 +// clients for components that can run with leader election enabled. +type LeaderElectionConfiguration struct { + // leaderElect enables a leader election client to gain leadership + // before executing the main loop. Enable this when running replicated + // components for high availability. + LeaderElect *bool `json:"leaderElect"` + // leaseDuration is the duration that non-leader candidates will wait + // after observing a leadership renewal until attempting to acquire + // leadership of a led but unrenewed leader slot. This is effectively the + // maximum duration that a leader can be stopped before it is replaced + // by another candidate. This is only applicable if leader election is + // enabled. + LeaseDuration unversioned.Duration `json:"leaseDuration"` + // renewDeadline is the interval between attempts by the acting master to + // renew a leadership slot before it stops leading. This must be less + // than or equal to the lease duration. This is only applicable if leader + // election is enabled. + RenewDeadline unversioned.Duration `json:"renewDeadline"` + // retryPeriod is the duration the clients should wait between attempting + // acquisition and renewal of a leadership. This is only applicable if + // leader election is enabled. + RetryPeriod unversioned.Duration `json:"retryPeriod"` +} diff --git a/plugin/cmd/kube-scheduler/app/options/options.go b/plugin/cmd/kube-scheduler/app/options/options.go index 4975d60d679..9696fe03bd8 100644 --- a/plugin/cmd/kube-scheduler/app/options/options.go +++ b/plugin/cmd/kube-scheduler/app/options/options.go @@ -20,8 +20,8 @@ package options import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/componentconfig" + "k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1" "k8s.io/kubernetes/pkg/client/leaderelection" - "k8s.io/kubernetes/pkg/master/ports" "k8s.io/kubernetes/plugin/pkg/scheduler/factory" "github.com/spf13/pflag" @@ -40,16 +40,10 @@ type SchedulerServer struct { // NewSchedulerServer creates a new SchedulerServer with default parameters func NewSchedulerServer() *SchedulerServer { + config := componentconfig.KubeSchedulerConfiguration{} + api.Scheme.Convert(&v1alpha1.KubeSchedulerConfiguration{}, &config) s := SchedulerServer{ - KubeSchedulerConfiguration: componentconfig.KubeSchedulerConfiguration{ - Port: ports.SchedulerPort, - Address: "0.0.0.0", - AlgorithmProvider: factory.DefaultProvider, - KubeAPIQPS: 50.0, - KubeAPIBurst: 100, - SchedulerName: api.DefaultSchedulerName, - LeaderElection: leaderelection.DefaultLeaderElectionConfiguration(), - }, + KubeSchedulerConfiguration: config, } return &s } From 097a1d6dd165ced43ced9e5bccd04cb9ca0efb69 Mon Sep 17 00:00:00 2001 From: Mike Danese Date: Tue, 2 Feb 2016 20:32:31 -0800 Subject: [PATCH 091/328] autogenerated --- pkg/apis/componentconfig/types.generated.go | 696 +++++++----- .../v1alpha1/conversion_generated.go | 104 ++ .../v1alpha1/deep_copy_generated.go | 44 + .../v1alpha1/types.generated.go | 1003 +++++++++++++++++ 4 files changed, 1547 insertions(+), 300 deletions(-) diff --git a/pkg/apis/componentconfig/types.generated.go b/pkg/apis/componentconfig/types.generated.go index 08c28edb10b..00ec437be27 100644 --- a/pkg/apis/componentconfig/types.generated.go +++ b/pkg/apis/componentconfig/types.generated.go @@ -4327,12 +4327,14 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep500 := !z.EncBinary() yy2arr500 := z.EncBasicHandle().StructToArray - var yyq500 [9]bool + var yyq500 [11]bool _, _, _ = yysep500, yyq500, yy2arr500 const yyr500 bool = false + yyq500[0] = x.Kind != "" + yyq500[1] = x.APIVersion != "" var yynn500 int if yyr500 || yy2arr500 { - r.EncodeArrayStart(9) + r.EncodeArrayStart(11) } else { yynn500 = 9 for _, b := range yyq500 { @@ -4345,40 +4347,52 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr500 || yy2arr500 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym502 := z.EncBinary() - _ = yym502 - if false { + if yyq500[0] { + yym502 := z.EncBinary() + _ = yym502 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } } else { - r.EncodeInt(int64(x.Port)) + r.EncodeString(codecSelferC_UTF81234, "") } } 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 yyq500[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym503 := z.EncBinary() + _ = yym503 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } } } if yyr500 || yy2arr500 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym505 := z.EncBinary() - _ = yym505 - if false { + if yyq500[1] { + yym505 := z.EncBinary() + _ = yym505 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Address)) + r.EncodeString(codecSelferC_UTF81234, "") } } 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 yyq500[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym506 := z.EncBinary() + _ = yym506 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } } } if yyr500 || yy2arr500 { @@ -4387,17 +4401,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym508 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(x.AlgorithmProvider)) + r.EncodeInt(int64(x.Port)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("algorithmProvider")) + r.EncodeString(codecSelferC_UTF81234, string("port")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym509 := z.EncBinary() _ = yym509 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(x.AlgorithmProvider)) + r.EncodeInt(int64(x.Port)) } } if yyr500 || yy2arr500 { @@ -4406,17 +4420,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym511 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(x.PolicyConfigFile)) + r.EncodeString(codecSelferC_UTF81234, string(x.Address)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("policyConfigFile")) + r.EncodeString(codecSelferC_UTF81234, string("address")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym512 := z.EncBinary() _ = yym512 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(x.PolicyConfigFile)) + r.EncodeString(codecSelferC_UTF81234, string(x.Address)) } } if yyr500 || yy2arr500 { @@ -4425,17 +4439,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym514 if false { } else { - r.EncodeBool(bool(x.EnableProfiling)) + r.EncodeString(codecSelferC_UTF81234, string(x.AlgorithmProvider)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("enableProfiling")) + r.EncodeString(codecSelferC_UTF81234, string("algorithmProvider")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym515 := z.EncBinary() _ = yym515 if false { } else { - r.EncodeBool(bool(x.EnableProfiling)) + r.EncodeString(codecSelferC_UTF81234, string(x.AlgorithmProvider)) } } if yyr500 || yy2arr500 { @@ -4444,17 +4458,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym517 if false { } else { - r.EncodeFloat32(float32(x.KubeAPIQPS)) + r.EncodeString(codecSelferC_UTF81234, string(x.PolicyConfigFile)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kubeAPIQPS")) + r.EncodeString(codecSelferC_UTF81234, string("policyConfigFile")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym518 := z.EncBinary() _ = yym518 if false { } else { - r.EncodeFloat32(float32(x.KubeAPIQPS)) + r.EncodeString(codecSelferC_UTF81234, string(x.PolicyConfigFile)) } } if yyr500 || yy2arr500 { @@ -4463,17 +4477,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym520 if false { } else { - r.EncodeInt(int64(x.KubeAPIBurst)) + r.EncodeBool(bool(x.EnableProfiling)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kubeAPIBurst")) + r.EncodeString(codecSelferC_UTF81234, string("enableProfiling")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym521 := z.EncBinary() _ = yym521 if false { } else { - r.EncodeInt(int64(x.KubeAPIBurst)) + r.EncodeBool(bool(x.EnableProfiling)) } } if yyr500 || yy2arr500 { @@ -4481,6 +4495,44 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { yym523 := z.EncBinary() _ = yym523 if false { + } else { + r.EncodeFloat32(float32(x.KubeAPIQPS)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kubeAPIQPS")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym524 := z.EncBinary() + _ = yym524 + if false { + } else { + r.EncodeFloat32(float32(x.KubeAPIQPS)) + } + } + if yyr500 || yy2arr500 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym526 := z.EncBinary() + _ = yym526 + if false { + } else { + r.EncodeInt(int64(x.KubeAPIBurst)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kubeAPIBurst")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym527 := z.EncBinary() + _ = yym527 + if false { + } else { + r.EncodeInt(int64(x.KubeAPIBurst)) + } + } + if yyr500 || yy2arr500 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym529 := z.EncBinary() + _ = yym529 + if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName)) } @@ -4488,8 +4540,8 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("schedulerName")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym524 := z.EncBinary() - _ = yym524 + yym530 := z.EncBinary() + _ = yym530 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName)) @@ -4497,14 +4549,14 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr500 || yy2arr500 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy526 := &x.LeaderElection - yy526.CodecEncodeSelf(e) + yy532 := &x.LeaderElection + yy532.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("leaderElection")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy527 := &x.LeaderElection - yy527.CodecEncodeSelf(e) + yy533 := &x.LeaderElection + yy533.CodecEncodeSelf(e) } if yyr500 || yy2arr500 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) @@ -4519,25 +4571,25 @@ func (x *KubeSchedulerConfiguration) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym528 := z.DecBinary() - _ = yym528 + yym534 := z.DecBinary() + _ = yym534 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct529 := r.ContainerType() - if yyct529 == codecSelferValueTypeMap1234 { - yyl529 := r.ReadMapStart() - if yyl529 == 0 { + yyct535 := r.ContainerType() + if yyct535 == codecSelferValueTypeMap1234 { + yyl535 := r.ReadMapStart() + if yyl535 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl529, d) + x.codecDecodeSelfFromMap(yyl535, d) } - } else if yyct529 == codecSelferValueTypeArray1234 { - yyl529 := r.ReadArrayStart() - if yyl529 == 0 { + } else if yyct535 == codecSelferValueTypeArray1234 { + yyl535 := r.ReadArrayStart() + if yyl535 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl529, d) + x.codecDecodeSelfFromArray(yyl535, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -4549,12 +4601,12 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromMap(l int, d *codec1978. 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 { + var yys536Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys536Slc + var yyhl536 bool = l >= 0 + for yyj536 := 0; ; yyj536++ { + if yyhl536 { + if yyj536 >= l { break } } else { @@ -4563,10 +4615,22 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromMap(l int, d *codec1978. } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys530Slc = r.DecodeBytes(yys530Slc, true, true) - yys530 := string(yys530Slc) + yys536Slc = r.DecodeBytes(yys536Slc, true, true) + yys536 := string(yys536Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys530 { + switch yys536 { + 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()) + } case "port": if r.TryDecodeAsNil() { x.Port = 0 @@ -4619,13 +4683,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromMap(l int, d *codec1978. if r.TryDecodeAsNil() { x.LeaderElection = LeaderElectionConfiguration{} } else { - yyv539 := &x.LeaderElection - yyv539.CodecDecodeSelf(d) + yyv547 := &x.LeaderElection + yyv547.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys530) - } // end switch yys530 - } // end for yyj530 + z.DecStructFieldNotFound(-1, yys536) + } // end switch yys536 + } // end for yyj536 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -4633,16 +4697,48 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 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 + var yyj548 int + var yyb548 bool + var yyhl548 bool = l >= 0 + yyj548++ + if yyhl548 { + yyb548 = yyj548 > l } else { - yyb540 = r.CheckBreak() + yyb548 = r.CheckBreak() } - if yyb540 { + if yyb548 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj548++ + if yyhl548 { + yyb548 = yyj548 > l + } else { + yyb548 = r.CheckBreak() + } + if yyb548 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + yyj548++ + if yyhl548 { + yyb548 = yyj548 > l + } else { + yyb548 = r.CheckBreak() + } + if yyb548 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4652,13 +4748,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.Port = int(r.DecodeInt(codecSelferBitsize1234)) } - yyj540++ - if yyhl540 { - yyb540 = yyj540 > l + yyj548++ + if yyhl548 { + yyb548 = yyj548 > l } else { - yyb540 = r.CheckBreak() + yyb548 = r.CheckBreak() } - if yyb540 { + if yyb548 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4668,13 +4764,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.Address = string(r.DecodeString()) } - yyj540++ - if yyhl540 { - yyb540 = yyj540 > l + yyj548++ + if yyhl548 { + yyb548 = yyj548 > l } else { - yyb540 = r.CheckBreak() + yyb548 = r.CheckBreak() } - if yyb540 { + if yyb548 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4684,13 +4780,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.AlgorithmProvider = string(r.DecodeString()) } - yyj540++ - if yyhl540 { - yyb540 = yyj540 > l + yyj548++ + if yyhl548 { + yyb548 = yyj548 > l } else { - yyb540 = r.CheckBreak() + yyb548 = r.CheckBreak() } - if yyb540 { + if yyb548 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4700,13 +4796,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.PolicyConfigFile = string(r.DecodeString()) } - yyj540++ - if yyhl540 { - yyb540 = yyj540 > l + yyj548++ + if yyhl548 { + yyb548 = yyj548 > l } else { - yyb540 = r.CheckBreak() + yyb548 = r.CheckBreak() } - if yyb540 { + if yyb548 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4716,13 +4812,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.EnableProfiling = bool(r.DecodeBool()) } - yyj540++ - if yyhl540 { - yyb540 = yyj540 > l + yyj548++ + if yyhl548 { + yyb548 = yyj548 > l } else { - yyb540 = r.CheckBreak() + yyb548 = r.CheckBreak() } - if yyb540 { + if yyb548 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4732,13 +4828,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.KubeAPIQPS = float32(r.DecodeFloat(true)) } - yyj540++ - if yyhl540 { - yyb540 = yyj540 > l + yyj548++ + if yyhl548 { + yyb548 = yyj548 > l } else { - yyb540 = r.CheckBreak() + yyb548 = r.CheckBreak() } - if yyb540 { + if yyb548 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4748,13 +4844,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.KubeAPIBurst = int(r.DecodeInt(codecSelferBitsize1234)) } - yyj540++ - if yyhl540 { - yyb540 = yyj540 > l + yyj548++ + if yyhl548 { + yyb548 = yyj548 > l } else { - yyb540 = r.CheckBreak() + yyb548 = r.CheckBreak() } - if yyb540 { + if yyb548 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4764,13 +4860,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.SchedulerName = string(r.DecodeString()) } - yyj540++ - if yyhl540 { - yyb540 = yyj540 > l + yyj548++ + if yyhl548 { + yyb548 = yyj548 > l } else { - yyb540 = r.CheckBreak() + yyb548 = r.CheckBreak() } - if yyb540 { + if yyb548 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4778,21 +4874,21 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 if r.TryDecodeAsNil() { x.LeaderElection = LeaderElectionConfiguration{} } else { - yyv549 := &x.LeaderElection - yyv549.CodecDecodeSelf(d) + yyv559 := &x.LeaderElection + yyv559.CodecDecodeSelf(d) } for { - yyj540++ - if yyhl540 { - yyb540 = yyj540 > l + yyj548++ + if yyhl548 { + yyb548 = yyj548 > l } else { - yyb540 = r.CheckBreak() + yyb548 = r.CheckBreak() } - if yyb540 { + if yyb548 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj540-1, "") + z.DecStructFieldNotFound(yyj548-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -4804,33 +4900,33 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym550 := z.EncBinary() - _ = yym550 + yym560 := z.EncBinary() + _ = yym560 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 { + yysep561 := !z.EncBinary() + yy2arr561 := z.EncBasicHandle().StructToArray + var yyq561 [4]bool + _, _, _ = yysep561, yyq561, yy2arr561 + const yyr561 bool = false + var yynn561 int + if yyr561 || yy2arr561 { r.EncodeArrayStart(4) } else { - yynn551 = 4 - for _, b := range yyq551 { + yynn561 = 4 + for _, b := range yyq561 { if b { - yynn551++ + yynn561++ } } - r.EncodeMapStart(yynn551) - yynn551 = 0 + r.EncodeMapStart(yynn561) + yynn561 = 0 } - if yyr551 || yy2arr551 { + if yyr561 || yy2arr561 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym553 := z.EncBinary() - _ = yym553 + yym563 := z.EncBinary() + _ = yym563 if false { } else { r.EncodeBool(bool(x.LeaderElect)) @@ -4839,70 +4935,16 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("leaderElect")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym554 := z.EncBinary() - _ = yym554 + yym564 := z.EncBinary() + _ = yym564 if false { } else { r.EncodeBool(bool(x.LeaderElect)) } } - if yyr551 || yy2arr551 { + if yyr561 || yy2arr561 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy556 := &x.LeaseDuration - yym557 := z.EncBinary() - _ = yym557 - if false { - } else if z.HasExtensions() && z.EncExt(yy556) { - } else if !yym557 && z.IsJSONHandle() { - z.EncJSONMarshal(yy556) - } else { - z.EncFallback(yy556) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("leaseDuration")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy558 := &x.LeaseDuration - yym559 := z.EncBinary() - _ = yym559 - if false { - } else if z.HasExtensions() && z.EncExt(yy558) { - } else if !yym559 && z.IsJSONHandle() { - z.EncJSONMarshal(yy558) - } else { - z.EncFallback(yy558) - } - } - if yyr551 || yy2arr551 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy561 := &x.RenewDeadline - yym562 := z.EncBinary() - _ = yym562 - if false { - } else if z.HasExtensions() && z.EncExt(yy561) { - } else if !yym562 && z.IsJSONHandle() { - z.EncJSONMarshal(yy561) - } else { - z.EncFallback(yy561) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("renewDeadline")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy563 := &x.RenewDeadline - yym564 := z.EncBinary() - _ = yym564 - if false { - } else if z.HasExtensions() && z.EncExt(yy563) { - } else if !yym564 && z.IsJSONHandle() { - z.EncJSONMarshal(yy563) - } else { - z.EncFallback(yy563) - } - } - if yyr551 || yy2arr551 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy566 := &x.RetryPeriod + yy566 := &x.LeaseDuration yym567 := z.EncBinary() _ = yym567 if false { @@ -4914,9 +4956,9 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("retryPeriod")) + r.EncodeString(codecSelferC_UTF81234, string("leaseDuration")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy568 := &x.RetryPeriod + yy568 := &x.LeaseDuration yym569 := z.EncBinary() _ = yym569 if false { @@ -4927,7 +4969,61 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncFallback(yy568) } } - if yyr551 || yy2arr551 { + if yyr561 || yy2arr561 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy571 := &x.RenewDeadline + yym572 := z.EncBinary() + _ = yym572 + if false { + } else if z.HasExtensions() && z.EncExt(yy571) { + } else if !yym572 && z.IsJSONHandle() { + z.EncJSONMarshal(yy571) + } else { + z.EncFallback(yy571) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("renewDeadline")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy573 := &x.RenewDeadline + yym574 := z.EncBinary() + _ = yym574 + if false { + } else if z.HasExtensions() && z.EncExt(yy573) { + } else if !yym574 && z.IsJSONHandle() { + z.EncJSONMarshal(yy573) + } else { + z.EncFallback(yy573) + } + } + if yyr561 || yy2arr561 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy576 := &x.RetryPeriod + yym577 := z.EncBinary() + _ = yym577 + if false { + } else if z.HasExtensions() && z.EncExt(yy576) { + } else if !yym577 && z.IsJSONHandle() { + z.EncJSONMarshal(yy576) + } else { + z.EncFallback(yy576) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("retryPeriod")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy578 := &x.RetryPeriod + yym579 := z.EncBinary() + _ = yym579 + if false { + } else if z.HasExtensions() && z.EncExt(yy578) { + } else if !yym579 && z.IsJSONHandle() { + z.EncJSONMarshal(yy578) + } else { + z.EncFallback(yy578) + } + } + if yyr561 || yy2arr561 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -4940,25 +5036,25 @@ func (x *LeaderElectionConfiguration) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym570 := z.DecBinary() - _ = yym570 + yym580 := z.DecBinary() + _ = yym580 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct571 := r.ContainerType() - if yyct571 == codecSelferValueTypeMap1234 { - yyl571 := r.ReadMapStart() - if yyl571 == 0 { + yyct581 := r.ContainerType() + if yyct581 == codecSelferValueTypeMap1234 { + yyl581 := r.ReadMapStart() + if yyl581 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl571, d) + x.codecDecodeSelfFromMap(yyl581, d) } - } else if yyct571 == codecSelferValueTypeArray1234 { - yyl571 := r.ReadArrayStart() - if yyl571 == 0 { + } else if yyct581 == codecSelferValueTypeArray1234 { + yyl581 := r.ReadArrayStart() + if yyl581 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl571, d) + x.codecDecodeSelfFromArray(yyl581, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -4970,12 +5066,12 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromMap(l int, d *codec1978 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys572Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys572Slc - var yyhl572 bool = l >= 0 - for yyj572 := 0; ; yyj572++ { - if yyhl572 { - if yyj572 >= l { + var yys582Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys582Slc + var yyhl582 bool = l >= 0 + for yyj582 := 0; ; yyj582++ { + if yyhl582 { + if yyj582 >= l { break } } else { @@ -4984,10 +5080,10 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromMap(l int, d *codec1978 } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys572Slc = r.DecodeBytes(yys572Slc, true, true) - yys572 := string(yys572Slc) + yys582Slc = r.DecodeBytes(yys582Slc, true, true) + yys582 := string(yys582Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys572 { + switch yys582 { case "leaderElect": if r.TryDecodeAsNil() { x.LeaderElect = false @@ -4998,51 +5094,51 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromMap(l int, d *codec1978 if r.TryDecodeAsNil() { x.LeaseDuration = pkg1_unversioned.Duration{} } else { - yyv574 := &x.LeaseDuration - yym575 := z.DecBinary() - _ = yym575 + yyv584 := &x.LeaseDuration + yym585 := z.DecBinary() + _ = yym585 if false { - } else if z.HasExtensions() && z.DecExt(yyv574) { - } else if !yym575 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv574) + } else if z.HasExtensions() && z.DecExt(yyv584) { + } else if !yym585 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv584) } else { - z.DecFallback(yyv574, false) + z.DecFallback(yyv584, false) } } case "renewDeadline": if r.TryDecodeAsNil() { x.RenewDeadline = pkg1_unversioned.Duration{} } else { - yyv576 := &x.RenewDeadline - yym577 := z.DecBinary() - _ = yym577 + yyv586 := &x.RenewDeadline + yym587 := z.DecBinary() + _ = yym587 if false { - } else if z.HasExtensions() && z.DecExt(yyv576) { - } else if !yym577 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv576) + } else if z.HasExtensions() && z.DecExt(yyv586) { + } else if !yym587 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv586) } else { - z.DecFallback(yyv576, false) + z.DecFallback(yyv586, false) } } case "retryPeriod": if r.TryDecodeAsNil() { x.RetryPeriod = pkg1_unversioned.Duration{} } else { - yyv578 := &x.RetryPeriod - yym579 := z.DecBinary() - _ = yym579 + yyv588 := &x.RetryPeriod + yym589 := z.DecBinary() + _ = yym589 if false { - } else if z.HasExtensions() && z.DecExt(yyv578) { - } else if !yym579 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv578) + } else if z.HasExtensions() && z.DecExt(yyv588) { + } else if !yym589 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv588) } else { - z.DecFallback(yyv578, false) + z.DecFallback(yyv588, false) } } default: - z.DecStructFieldNotFound(-1, yys572) - } // end switch yys572 - } // end for yyj572 + z.DecStructFieldNotFound(-1, yys582) + } // end switch yys582 + } // end for yyj582 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -5050,16 +5146,16 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj580 int - var yyb580 bool - var yyhl580 bool = l >= 0 - yyj580++ - if yyhl580 { - yyb580 = yyj580 > l + var yyj590 int + var yyb590 bool + var yyhl590 bool = l >= 0 + yyj590++ + if yyhl590 { + yyb590 = yyj590 > l } else { - yyb580 = r.CheckBreak() + yyb590 = r.CheckBreak() } - if yyb580 { + if yyb590 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5069,13 +5165,13 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19 } else { x.LeaderElect = bool(r.DecodeBool()) } - yyj580++ - if yyhl580 { - yyb580 = yyj580 > l + yyj590++ + if yyhl590 { + yyb590 = yyj590 > l } else { - yyb580 = r.CheckBreak() + yyb590 = r.CheckBreak() } - if yyb580 { + if yyb590 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5083,24 +5179,24 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19 if r.TryDecodeAsNil() { x.LeaseDuration = pkg1_unversioned.Duration{} } else { - yyv582 := &x.LeaseDuration - yym583 := z.DecBinary() - _ = yym583 + yyv592 := &x.LeaseDuration + yym593 := z.DecBinary() + _ = yym593 if false { - } else if z.HasExtensions() && z.DecExt(yyv582) { - } else if !yym583 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv582) + } else if z.HasExtensions() && z.DecExt(yyv592) { + } else if !yym593 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv592) } else { - z.DecFallback(yyv582, false) + z.DecFallback(yyv592, false) } } - yyj580++ - if yyhl580 { - yyb580 = yyj580 > l + yyj590++ + if yyhl590 { + yyb590 = yyj590 > l } else { - yyb580 = r.CheckBreak() + yyb590 = r.CheckBreak() } - if yyb580 { + if yyb590 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5108,24 +5204,24 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19 if r.TryDecodeAsNil() { x.RenewDeadline = pkg1_unversioned.Duration{} } else { - yyv584 := &x.RenewDeadline - yym585 := z.DecBinary() - _ = yym585 + yyv594 := &x.RenewDeadline + yym595 := z.DecBinary() + _ = yym595 if false { - } else if z.HasExtensions() && z.DecExt(yyv584) { - } else if !yym585 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv584) + } else if z.HasExtensions() && z.DecExt(yyv594) { + } else if !yym595 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv594) } else { - z.DecFallback(yyv584, false) + z.DecFallback(yyv594, false) } } - yyj580++ - if yyhl580 { - yyb580 = yyj580 > l + yyj590++ + if yyhl590 { + yyb590 = yyj590 > l } else { - yyb580 = r.CheckBreak() + yyb590 = r.CheckBreak() } - if yyb580 { + if yyb590 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5133,29 +5229,29 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19 if r.TryDecodeAsNil() { x.RetryPeriod = pkg1_unversioned.Duration{} } else { - yyv586 := &x.RetryPeriod - yym587 := z.DecBinary() - _ = yym587 + yyv596 := &x.RetryPeriod + yym597 := z.DecBinary() + _ = yym597 if false { - } else if z.HasExtensions() && z.DecExt(yyv586) { - } else if !yym587 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv586) + } else if z.HasExtensions() && z.DecExt(yyv596) { + } else if !yym597 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv596) } else { - z.DecFallback(yyv586, false) + z.DecFallback(yyv596, false) } } for { - yyj580++ - if yyhl580 { - yyb580 = yyj580 > l + yyj590++ + if yyhl590 { + yyb590 = yyj590 > l } else { - yyb580 = r.CheckBreak() + yyb590 = r.CheckBreak() } - if yyb580 { + if yyb590 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj580-1, "") + z.DecStructFieldNotFound(yyj590-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/pkg/apis/componentconfig/v1alpha1/conversion_generated.go b/pkg/apis/componentconfig/v1alpha1/conversion_generated.go index e3d565a4977..c11acb52ef6 100644 --- a/pkg/apis/componentconfig/v1alpha1/conversion_generated.go +++ b/pkg/apis/componentconfig/v1alpha1/conversion_generated.go @@ -66,6 +66,56 @@ func Convert_componentconfig_KubeProxyConfiguration_To_v1alpha1_KubeProxyConfigu return autoConvert_componentconfig_KubeProxyConfiguration_To_v1alpha1_KubeProxyConfiguration(in, out, s) } +func autoConvert_componentconfig_KubeSchedulerConfiguration_To_v1alpha1_KubeSchedulerConfiguration(in *componentconfig.KubeSchedulerConfiguration, out *KubeSchedulerConfiguration, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*componentconfig.KubeSchedulerConfiguration))(in) + } + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + out.Port = in.Port + out.Address = in.Address + out.AlgorithmProvider = in.AlgorithmProvider + out.PolicyConfigFile = in.PolicyConfigFile + if err := api.Convert_bool_To_bool_ref(&in.EnableProfiling, &out.EnableProfiling, s); err != nil { + return err + } + out.KubeAPIQPS = in.KubeAPIQPS + out.KubeAPIBurst = in.KubeAPIBurst + out.SchedulerName = in.SchedulerName + if err := Convert_componentconfig_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(&in.LeaderElection, &out.LeaderElection, s); err != nil { + return err + } + return nil +} + +func Convert_componentconfig_KubeSchedulerConfiguration_To_v1alpha1_KubeSchedulerConfiguration(in *componentconfig.KubeSchedulerConfiguration, out *KubeSchedulerConfiguration, s conversion.Scope) error { + return autoConvert_componentconfig_KubeSchedulerConfiguration_To_v1alpha1_KubeSchedulerConfiguration(in, out, s) +} + +func autoConvert_componentconfig_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(in *componentconfig.LeaderElectionConfiguration, out *LeaderElectionConfiguration, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*componentconfig.LeaderElectionConfiguration))(in) + } + if err := api.Convert_bool_To_bool_ref(&in.LeaderElect, &out.LeaderElect, s); err != nil { + return err + } + if err := s.Convert(&in.LeaseDuration, &out.LeaseDuration, 0); err != nil { + return err + } + if err := s.Convert(&in.RenewDeadline, &out.RenewDeadline, 0); err != nil { + return err + } + if err := s.Convert(&in.RetryPeriod, &out.RetryPeriod, 0); err != nil { + return err + } + return nil +} + +func Convert_componentconfig_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(in *componentconfig.LeaderElectionConfiguration, out *LeaderElectionConfiguration, s conversion.Scope) error { + return autoConvert_componentconfig_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(in, out, s) +} + func autoConvert_v1alpha1_KubeProxyConfiguration_To_componentconfig_KubeProxyConfiguration(in *KubeProxyConfiguration, out *componentconfig.KubeProxyConfiguration, s conversion.Scope) error { if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { defaulting.(func(*KubeProxyConfiguration))(in) @@ -106,10 +156,64 @@ func Convert_v1alpha1_KubeProxyConfiguration_To_componentconfig_KubeProxyConfigu return autoConvert_v1alpha1_KubeProxyConfiguration_To_componentconfig_KubeProxyConfiguration(in, out, s) } +func autoConvert_v1alpha1_KubeSchedulerConfiguration_To_componentconfig_KubeSchedulerConfiguration(in *KubeSchedulerConfiguration, out *componentconfig.KubeSchedulerConfiguration, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*KubeSchedulerConfiguration))(in) + } + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + out.Port = in.Port + out.Address = in.Address + out.AlgorithmProvider = in.AlgorithmProvider + out.PolicyConfigFile = in.PolicyConfigFile + if err := api.Convert_bool_ref_To_bool(&in.EnableProfiling, &out.EnableProfiling, s); err != nil { + return err + } + out.KubeAPIQPS = in.KubeAPIQPS + out.KubeAPIBurst = in.KubeAPIBurst + out.SchedulerName = in.SchedulerName + if err := Convert_v1alpha1_LeaderElectionConfiguration_To_componentconfig_LeaderElectionConfiguration(&in.LeaderElection, &out.LeaderElection, s); err != nil { + return err + } + return nil +} + +func Convert_v1alpha1_KubeSchedulerConfiguration_To_componentconfig_KubeSchedulerConfiguration(in *KubeSchedulerConfiguration, out *componentconfig.KubeSchedulerConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha1_KubeSchedulerConfiguration_To_componentconfig_KubeSchedulerConfiguration(in, out, s) +} + +func autoConvert_v1alpha1_LeaderElectionConfiguration_To_componentconfig_LeaderElectionConfiguration(in *LeaderElectionConfiguration, out *componentconfig.LeaderElectionConfiguration, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*LeaderElectionConfiguration))(in) + } + if err := api.Convert_bool_ref_To_bool(&in.LeaderElect, &out.LeaderElect, s); err != nil { + return err + } + if err := s.Convert(&in.LeaseDuration, &out.LeaseDuration, 0); err != nil { + return err + } + if err := s.Convert(&in.RenewDeadline, &out.RenewDeadline, 0); err != nil { + return err + } + if err := s.Convert(&in.RetryPeriod, &out.RetryPeriod, 0); err != nil { + return err + } + return nil +} + +func Convert_v1alpha1_LeaderElectionConfiguration_To_componentconfig_LeaderElectionConfiguration(in *LeaderElectionConfiguration, out *componentconfig.LeaderElectionConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha1_LeaderElectionConfiguration_To_componentconfig_LeaderElectionConfiguration(in, out, s) +} + func init() { err := api.Scheme.AddGeneratedConversionFuncs( autoConvert_componentconfig_KubeProxyConfiguration_To_v1alpha1_KubeProxyConfiguration, + autoConvert_componentconfig_KubeSchedulerConfiguration_To_v1alpha1_KubeSchedulerConfiguration, + autoConvert_componentconfig_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration, autoConvert_v1alpha1_KubeProxyConfiguration_To_componentconfig_KubeProxyConfiguration, + autoConvert_v1alpha1_KubeSchedulerConfiguration_To_componentconfig_KubeSchedulerConfiguration, + autoConvert_v1alpha1_LeaderElectionConfiguration_To_componentconfig_LeaderElectionConfiguration, ) if err != nil { // If one of the conversion functions is malformed, detect it immediately. diff --git a/pkg/apis/componentconfig/v1alpha1/deep_copy_generated.go b/pkg/apis/componentconfig/v1alpha1/deep_copy_generated.go index 8e105a22e3f..0012e90414e 100644 --- a/pkg/apis/componentconfig/v1alpha1/deep_copy_generated.go +++ b/pkg/apis/componentconfig/v1alpha1/deep_copy_generated.go @@ -68,11 +68,55 @@ func deepCopy_v1alpha1_KubeProxyConfiguration(in KubeProxyConfiguration, out *Ku return nil } +func deepCopy_v1alpha1_KubeSchedulerConfiguration(in KubeSchedulerConfiguration, out *KubeSchedulerConfiguration, c *conversion.Cloner) error { + if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { + return err + } + out.Port = in.Port + out.Address = in.Address + out.AlgorithmProvider = in.AlgorithmProvider + out.PolicyConfigFile = in.PolicyConfigFile + if in.EnableProfiling != nil { + out.EnableProfiling = new(bool) + *out.EnableProfiling = *in.EnableProfiling + } else { + out.EnableProfiling = nil + } + out.KubeAPIQPS = in.KubeAPIQPS + out.KubeAPIBurst = in.KubeAPIBurst + out.SchedulerName = in.SchedulerName + if err := deepCopy_v1alpha1_LeaderElectionConfiguration(in.LeaderElection, &out.LeaderElection, c); err != nil { + return err + } + return nil +} + +func deepCopy_v1alpha1_LeaderElectionConfiguration(in LeaderElectionConfiguration, out *LeaderElectionConfiguration, c *conversion.Cloner) error { + if in.LeaderElect != nil { + out.LeaderElect = new(bool) + *out.LeaderElect = *in.LeaderElect + } else { + out.LeaderElect = nil + } + if err := deepCopy_unversioned_Duration(in.LeaseDuration, &out.LeaseDuration, c); err != nil { + return err + } + if err := deepCopy_unversioned_Duration(in.RenewDeadline, &out.RenewDeadline, c); err != nil { + return err + } + if err := deepCopy_unversioned_Duration(in.RetryPeriod, &out.RetryPeriod, c); err != nil { + return err + } + return nil +} + func init() { err := api.Scheme.AddGeneratedDeepCopyFuncs( deepCopy_unversioned_Duration, deepCopy_unversioned_TypeMeta, deepCopy_v1alpha1_KubeProxyConfiguration, + deepCopy_v1alpha1_KubeSchedulerConfiguration, + deepCopy_v1alpha1_LeaderElectionConfiguration, ) if err != nil { // if one of the deep copy functions is malformed, detect it immediately. diff --git a/pkg/apis/componentconfig/v1alpha1/types.generated.go b/pkg/apis/componentconfig/v1alpha1/types.generated.go index 0d426891cc1..1326d7526be 100644 --- a/pkg/apis/componentconfig/v1alpha1/types.generated.go +++ b/pkg/apis/componentconfig/v1alpha1/types.generated.go @@ -1022,3 +1022,1006 @@ func (x *ProxyMode) CodecDecodeSelf(d *codec1978.Decoder) { *((*string)(x)) = r.DecodeString() } } + +func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym108 := z.EncBinary() + _ = yym108 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep109 := !z.EncBinary() + yy2arr109 := z.EncBasicHandle().StructToArray + var yyq109 [11]bool + _, _, _ = yysep109, yyq109, yy2arr109 + const yyr109 bool = false + yyq109[0] = x.Kind != "" + yyq109[1] = x.APIVersion != "" + var yynn109 int + if yyr109 || yy2arr109 { + r.EncodeArrayStart(11) + } else { + yynn109 = 9 + for _, b := range yyq109 { + if b { + yynn109++ + } + } + r.EncodeMapStart(yynn109) + yynn109 = 0 + } + if yyr109 || yy2arr109 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq109[0] { + yym111 := z.EncBinary() + _ = yym111 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq109[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym112 := z.EncBinary() + _ = yym112 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr109 || yy2arr109 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq109[1] { + yym114 := z.EncBinary() + _ = yym114 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq109[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym115 := z.EncBinary() + _ = yym115 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr109 || yy2arr109 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym117 := z.EncBinary() + _ = yym117 + if false { + } else { + r.EncodeInt(int64(x.Port)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("port")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym118 := z.EncBinary() + _ = yym118 + if false { + } else { + r.EncodeInt(int64(x.Port)) + } + } + if yyr109 || yy2arr109 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym120 := z.EncBinary() + _ = yym120 + 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) + yym121 := z.EncBinary() + _ = yym121 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Address)) + } + } + if yyr109 || yy2arr109 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym123 := z.EncBinary() + _ = yym123 + 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) + yym124 := z.EncBinary() + _ = yym124 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.AlgorithmProvider)) + } + } + if yyr109 || yy2arr109 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym126 := z.EncBinary() + _ = yym126 + 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) + yym127 := z.EncBinary() + _ = yym127 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.PolicyConfigFile)) + } + } + if yyr109 || yy2arr109 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.EnableProfiling == nil { + r.EncodeNil() + } else { + yy129 := *x.EnableProfiling + yym130 := z.EncBinary() + _ = yym130 + if false { + } else { + r.EncodeBool(bool(yy129)) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("enableProfiling")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.EnableProfiling == nil { + r.EncodeNil() + } else { + yy131 := *x.EnableProfiling + yym132 := z.EncBinary() + _ = yym132 + if false { + } else { + r.EncodeBool(bool(yy131)) + } + } + } + if yyr109 || yy2arr109 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym134 := z.EncBinary() + _ = yym134 + if false { + } else { + r.EncodeFloat32(float32(x.KubeAPIQPS)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kubeAPIQPS")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym135 := z.EncBinary() + _ = yym135 + if false { + } else { + r.EncodeFloat32(float32(x.KubeAPIQPS)) + } + } + if yyr109 || yy2arr109 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym137 := z.EncBinary() + _ = yym137 + if false { + } else { + r.EncodeInt(int64(x.KubeAPIBurst)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kubeAPIBurst")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym138 := z.EncBinary() + _ = yym138 + if false { + } else { + r.EncodeInt(int64(x.KubeAPIBurst)) + } + } + if yyr109 || yy2arr109 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym140 := z.EncBinary() + _ = yym140 + 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) + yym141 := z.EncBinary() + _ = yym141 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName)) + } + } + if yyr109 || yy2arr109 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy143 := &x.LeaderElection + yy143.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("leaderElection")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy144 := &x.LeaderElection + yy144.CodecEncodeSelf(e) + } + if yyr109 || yy2arr109 { + 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 + yym145 := z.DecBinary() + _ = yym145 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct146 := r.ContainerType() + if yyct146 == codecSelferValueTypeMap1234 { + yyl146 := r.ReadMapStart() + if yyl146 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl146, d) + } + } else if yyct146 == codecSelferValueTypeArray1234 { + yyl146 := r.ReadArrayStart() + if yyl146 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl146, 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 yys147Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys147Slc + var yyhl147 bool = l >= 0 + for yyj147 := 0; ; yyj147++ { + if yyhl147 { + if yyj147 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys147Slc = r.DecodeBytes(yys147Slc, true, true) + yys147 := string(yys147Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys147 { + 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()) + } + 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() { + if x.EnableProfiling != nil { + x.EnableProfiling = nil + } + } else { + if x.EnableProfiling == nil { + x.EnableProfiling = new(bool) + } + yym155 := z.DecBinary() + _ = yym155 + if false { + } else { + *((*bool)(x.EnableProfiling)) = 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 { + yyv159 := &x.LeaderElection + yyv159.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys147) + } // end switch yys147 + } // end for yyj147 + 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 yyj160 int + var yyb160 bool + var yyhl160 bool = l >= 0 + yyj160++ + if yyhl160 { + yyb160 = yyj160 > l + } else { + yyb160 = r.CheckBreak() + } + if yyb160 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj160++ + if yyhl160 { + yyb160 = yyj160 > l + } else { + yyb160 = r.CheckBreak() + } + if yyb160 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + yyj160++ + if yyhl160 { + yyb160 = yyj160 > l + } else { + yyb160 = r.CheckBreak() + } + if yyb160 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Port = 0 + } else { + x.Port = int(r.DecodeInt(codecSelferBitsize1234)) + } + yyj160++ + if yyhl160 { + yyb160 = yyj160 > l + } else { + yyb160 = r.CheckBreak() + } + if yyb160 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Address = "" + } else { + x.Address = string(r.DecodeString()) + } + yyj160++ + if yyhl160 { + yyb160 = yyj160 > l + } else { + yyb160 = r.CheckBreak() + } + if yyb160 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.AlgorithmProvider = "" + } else { + x.AlgorithmProvider = string(r.DecodeString()) + } + yyj160++ + if yyhl160 { + yyb160 = yyj160 > l + } else { + yyb160 = r.CheckBreak() + } + if yyb160 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.PolicyConfigFile = "" + } else { + x.PolicyConfigFile = string(r.DecodeString()) + } + yyj160++ + if yyhl160 { + yyb160 = yyj160 > l + } else { + yyb160 = r.CheckBreak() + } + if yyb160 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.EnableProfiling != nil { + x.EnableProfiling = nil + } + } else { + if x.EnableProfiling == nil { + x.EnableProfiling = new(bool) + } + yym168 := z.DecBinary() + _ = yym168 + if false { + } else { + *((*bool)(x.EnableProfiling)) = r.DecodeBool() + } + } + yyj160++ + if yyhl160 { + yyb160 = yyj160 > l + } else { + yyb160 = r.CheckBreak() + } + if yyb160 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.KubeAPIQPS = 0 + } else { + x.KubeAPIQPS = float32(r.DecodeFloat(true)) + } + yyj160++ + if yyhl160 { + yyb160 = yyj160 > l + } else { + yyb160 = r.CheckBreak() + } + if yyb160 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.KubeAPIBurst = 0 + } else { + x.KubeAPIBurst = int(r.DecodeInt(codecSelferBitsize1234)) + } + yyj160++ + if yyhl160 { + yyb160 = yyj160 > l + } else { + yyb160 = r.CheckBreak() + } + if yyb160 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.SchedulerName = "" + } else { + x.SchedulerName = string(r.DecodeString()) + } + yyj160++ + if yyhl160 { + yyb160 = yyj160 > l + } else { + yyb160 = r.CheckBreak() + } + if yyb160 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.LeaderElection = LeaderElectionConfiguration{} + } else { + yyv172 := &x.LeaderElection + yyv172.CodecDecodeSelf(d) + } + for { + yyj160++ + if yyhl160 { + yyb160 = yyj160 > l + } else { + yyb160 = r.CheckBreak() + } + if yyb160 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj160-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 { + yym173 := z.EncBinary() + _ = yym173 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep174 := !z.EncBinary() + yy2arr174 := z.EncBasicHandle().StructToArray + var yyq174 [4]bool + _, _, _ = yysep174, yyq174, yy2arr174 + const yyr174 bool = false + var yynn174 int + if yyr174 || yy2arr174 { + r.EncodeArrayStart(4) + } else { + yynn174 = 4 + for _, b := range yyq174 { + if b { + yynn174++ + } + } + r.EncodeMapStart(yynn174) + yynn174 = 0 + } + if yyr174 || yy2arr174 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.LeaderElect == nil { + r.EncodeNil() + } else { + yy176 := *x.LeaderElect + yym177 := z.EncBinary() + _ = yym177 + if false { + } else { + r.EncodeBool(bool(yy176)) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("leaderElect")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.LeaderElect == nil { + r.EncodeNil() + } else { + yy178 := *x.LeaderElect + yym179 := z.EncBinary() + _ = yym179 + if false { + } else { + r.EncodeBool(bool(yy178)) + } + } + } + if yyr174 || yy2arr174 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy181 := &x.LeaseDuration + yym182 := z.EncBinary() + _ = yym182 + if false { + } else if z.HasExtensions() && z.EncExt(yy181) { + } else if !yym182 && z.IsJSONHandle() { + z.EncJSONMarshal(yy181) + } else { + z.EncFallback(yy181) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("leaseDuration")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy183 := &x.LeaseDuration + yym184 := z.EncBinary() + _ = yym184 + if false { + } else if z.HasExtensions() && z.EncExt(yy183) { + } else if !yym184 && z.IsJSONHandle() { + z.EncJSONMarshal(yy183) + } else { + z.EncFallback(yy183) + } + } + if yyr174 || yy2arr174 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy186 := &x.RenewDeadline + yym187 := z.EncBinary() + _ = yym187 + if false { + } else if z.HasExtensions() && z.EncExt(yy186) { + } else if !yym187 && z.IsJSONHandle() { + z.EncJSONMarshal(yy186) + } else { + z.EncFallback(yy186) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("renewDeadline")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy188 := &x.RenewDeadline + yym189 := z.EncBinary() + _ = yym189 + if false { + } else if z.HasExtensions() && z.EncExt(yy188) { + } else if !yym189 && z.IsJSONHandle() { + z.EncJSONMarshal(yy188) + } else { + z.EncFallback(yy188) + } + } + if yyr174 || yy2arr174 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy191 := &x.RetryPeriod + yym192 := z.EncBinary() + _ = yym192 + if false { + } else if z.HasExtensions() && z.EncExt(yy191) { + } else if !yym192 && z.IsJSONHandle() { + z.EncJSONMarshal(yy191) + } else { + z.EncFallback(yy191) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("retryPeriod")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy193 := &x.RetryPeriod + yym194 := z.EncBinary() + _ = yym194 + if false { + } else if z.HasExtensions() && z.EncExt(yy193) { + } else if !yym194 && z.IsJSONHandle() { + z.EncJSONMarshal(yy193) + } else { + z.EncFallback(yy193) + } + } + if yyr174 || yy2arr174 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *LeaderElectionConfiguration) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym195 := z.DecBinary() + _ = yym195 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct196 := r.ContainerType() + if yyct196 == codecSelferValueTypeMap1234 { + yyl196 := r.ReadMapStart() + if yyl196 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl196, d) + } + } else if yyct196 == codecSelferValueTypeArray1234 { + yyl196 := r.ReadArrayStart() + if yyl196 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl196, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *LeaderElectionConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys197Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys197Slc + var yyhl197 bool = l >= 0 + for yyj197 := 0; ; yyj197++ { + if yyhl197 { + if yyj197 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys197Slc = r.DecodeBytes(yys197Slc, true, true) + yys197 := string(yys197Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys197 { + case "leaderElect": + if r.TryDecodeAsNil() { + if x.LeaderElect != nil { + x.LeaderElect = nil + } + } else { + if x.LeaderElect == nil { + x.LeaderElect = new(bool) + } + yym199 := z.DecBinary() + _ = yym199 + if false { + } else { + *((*bool)(x.LeaderElect)) = r.DecodeBool() + } + } + case "leaseDuration": + if r.TryDecodeAsNil() { + x.LeaseDuration = pkg1_unversioned.Duration{} + } else { + yyv200 := &x.LeaseDuration + yym201 := z.DecBinary() + _ = yym201 + if false { + } else if z.HasExtensions() && z.DecExt(yyv200) { + } else if !yym201 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv200) + } else { + z.DecFallback(yyv200, false) + } + } + case "renewDeadline": + if r.TryDecodeAsNil() { + x.RenewDeadline = pkg1_unversioned.Duration{} + } else { + yyv202 := &x.RenewDeadline + yym203 := z.DecBinary() + _ = yym203 + if false { + } else if z.HasExtensions() && z.DecExt(yyv202) { + } else if !yym203 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv202) + } else { + z.DecFallback(yyv202, false) + } + } + case "retryPeriod": + if r.TryDecodeAsNil() { + x.RetryPeriod = pkg1_unversioned.Duration{} + } else { + yyv204 := &x.RetryPeriod + yym205 := z.DecBinary() + _ = yym205 + if false { + } else if z.HasExtensions() && z.DecExt(yyv204) { + } else if !yym205 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv204) + } else { + z.DecFallback(yyv204, false) + } + } + default: + z.DecStructFieldNotFound(-1, yys197) + } // end switch yys197 + } // end for yyj197 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj206 int + var yyb206 bool + var yyhl206 bool = l >= 0 + yyj206++ + if yyhl206 { + yyb206 = yyj206 > l + } else { + yyb206 = r.CheckBreak() + } + if yyb206 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.LeaderElect != nil { + x.LeaderElect = nil + } + } else { + if x.LeaderElect == nil { + x.LeaderElect = new(bool) + } + yym208 := z.DecBinary() + _ = yym208 + if false { + } else { + *((*bool)(x.LeaderElect)) = r.DecodeBool() + } + } + yyj206++ + if yyhl206 { + yyb206 = yyj206 > l + } else { + yyb206 = r.CheckBreak() + } + if yyb206 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.LeaseDuration = pkg1_unversioned.Duration{} + } else { + yyv209 := &x.LeaseDuration + yym210 := z.DecBinary() + _ = yym210 + if false { + } else if z.HasExtensions() && z.DecExt(yyv209) { + } else if !yym210 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv209) + } else { + z.DecFallback(yyv209, false) + } + } + yyj206++ + if yyhl206 { + yyb206 = yyj206 > l + } else { + yyb206 = r.CheckBreak() + } + if yyb206 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.RenewDeadline = pkg1_unversioned.Duration{} + } else { + yyv211 := &x.RenewDeadline + yym212 := z.DecBinary() + _ = yym212 + if false { + } else if z.HasExtensions() && z.DecExt(yyv211) { + } else if !yym212 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv211) + } else { + z.DecFallback(yyv211, false) + } + } + yyj206++ + if yyhl206 { + yyb206 = yyj206 > l + } else { + yyb206 = r.CheckBreak() + } + if yyb206 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.RetryPeriod = pkg1_unversioned.Duration{} + } else { + yyv213 := &x.RetryPeriod + yym214 := z.DecBinary() + _ = yym214 + if false { + } else if z.HasExtensions() && z.DecExt(yyv213) { + } else if !yym214 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv213) + } else { + z.DecFallback(yyv213, false) + } + } + for { + yyj206++ + if yyhl206 { + yyb206 = yyj206 > l + } else { + yyb206 = r.CheckBreak() + } + if yyb206 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj206-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} From e90de3f9855b68ffe4dbbbbd98484c2a3ec0e113 Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Wed, 3 Feb 2016 10:00:09 +0100 Subject: [PATCH 092/328] Fixed cleanup of persistent volumes. Kubelet.cleanupOrphanedVolumes() compares list of volumes mounted to a node with list of volumes that are required by pods scheduled on the node ("scheduled volume"). Both lists should contain real volumes, i.e. when a pod uses PersistentVolumeClaim, the list must contain name of the bound volume instead of name of the claim. --- pkg/kubelet/kubelet.go | 37 +++++++++++-- pkg/kubelet/kubelet_test.go | 100 ++++++++++++++++++++++++++++++++++++ 2 files changed, 134 insertions(+), 3 deletions(-) diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index 0ed51bad2df..6c11f12a3f0 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -1725,13 +1725,41 @@ func (kl *Kubelet) getPullSecretsForPod(pod *api.Pod) ([]api.Secret, error) { return pullSecrets, nil } +// Return name of a volume. When the volume is a PersistentVolumeClaim, +// it returns name of the real PersistentVolume bound to the claim. +// It returns errror when the clam is not bound yet. +func (kl *Kubelet) resolveVolumeName(pod *api.Pod, volume *api.Volume) (string, error) { + claimSource := volume.VolumeSource.PersistentVolumeClaim + if claimSource != nil { + // resolve real volume behind the claim + claim, err := kl.kubeClient.Legacy().PersistentVolumeClaims(pod.Namespace).Get(claimSource.ClaimName) + if err != nil { + return "", fmt.Errorf("Cannot find claim %s/%s for volume %s", pod.Namespace, claimSource.ClaimName, volume.Name) + } + if claim.Status.Phase != api.ClaimBound { + return "", fmt.Errorf("Claim for volume %s/%s is not bound yet", pod.Namespace, claimSource.ClaimName) + } + // Use the real bound volume instead of PersistentVolume.Name + return claim.Spec.VolumeName, nil + } + return volume.Name, nil +} + // Stores all volumes defined by the set of pods into a map. +// It stores real volumes there, i.e. persistent volume claims are resolved +// to volumes that are bound to them. // Keys for each entry are in the format (POD_ID)/(VOLUME_NAME) -func getDesiredVolumes(pods []*api.Pod) map[string]api.Volume { +func (kl *Kubelet) getDesiredVolumes(pods []*api.Pod) map[string]api.Volume { desiredVolumes := make(map[string]api.Volume) for _, pod := range pods { for _, volume := range pod.Spec.Volumes { - identifier := path.Join(string(pod.UID), volume.Name) + volumeName, err := kl.resolveVolumeName(pod, &volume) + if err != nil { + glog.V(3).Infof("%v", err) + // Ignore the error and hope it's resolved next time + continue + } + identifier := path.Join(string(pod.UID), volumeName) desiredVolumes[identifier] = volume } } @@ -1815,8 +1843,11 @@ func (kl *Kubelet) cleanupBandwidthLimits(allPods []*api.Pod) error { // Compares the map of current volumes to the map of desired volumes. // If an active volume does not have a respective desired volume, clean it up. +// This method is blocking: +// 1) it talks to API server to find volumes bound to persistent volume claims +// 2) it talks to cloud to detach volumes func (kl *Kubelet) cleanupOrphanedVolumes(pods []*api.Pod, runningPods []*kubecontainer.Pod) error { - desiredVolumes := getDesiredVolumes(pods) + desiredVolumes := kl.getDesiredVolumes(pods) currentVolumes := kl.getPodVolumesFromDisk() runningSet := sets.String{} diff --git a/pkg/kubelet/kubelet_test.go b/pkg/kubelet/kubelet_test.go index 9fee58d8874..eccb6b959d6 100644 --- a/pkg/kubelet/kubelet_test.go +++ b/pkg/kubelet/kubelet_test.go @@ -551,6 +551,106 @@ func TestGetPodVolumesFromDisk(t *testing.T) { } } +// Test for https://github.com/kubernetes/kubernetes/pull/19600 +func TestCleanupOrphanedVolumes(t *testing.T) { + testKubelet := newTestKubelet(t) + kubelet := testKubelet.kubelet + kubeClient := testKubelet.fakeKubeClient + plug := &volume.FakeVolumePlugin{PluginName: "fake", Host: nil} + kubelet.volumePluginMgr.InitPlugins([]volume.VolumePlugin{plug}, &volumeHost{kubelet}) + + // create a volume "on disk" + volsOnDisk := []struct { + podUID types.UID + volName string + }{ + {"podUID", "myrealvol"}, + } + + pathsOnDisk := []string{} + for i := range volsOnDisk { + fv := volume.FakeVolume{PodUID: volsOnDisk[i].podUID, VolName: volsOnDisk[i].volName, Plugin: plug} + fv.SetUp(nil) + pathsOnDisk = append(pathsOnDisk, fv.GetPath()) + } + + // store the claim in fake kubelet database + claim := api.PersistentVolumeClaim{ + ObjectMeta: api.ObjectMeta{ + Name: "myclaim", + Namespace: "test", + }, + Spec: api.PersistentVolumeClaimSpec{ + VolumeName: "myrealvol", + }, + Status: api.PersistentVolumeClaimStatus{ + Phase: api.ClaimBound, + }, + } + kubeClient.ReactionChain = fake.NewSimpleClientset(&api.PersistentVolumeClaimList{Items: []api.PersistentVolumeClaim{ + claim, + }}).ReactionChain + + // Create a pod referencing the volume via a PersistentVolumeClaim + pod := api.Pod{ + ObjectMeta: api.ObjectMeta{ + UID: "podUID", + Name: "pod", + Namespace: "test", + }, + Spec: api.PodSpec{ + Volumes: []api.Volume{ + { + Name: "myvolumeclaim", + VolumeSource: api.VolumeSource{ + PersistentVolumeClaim: &api.PersistentVolumeClaimVolumeSource{ + ClaimName: "myclaim", + }, + }, + }, + }, + }, + } + + // The pod is pending and not running yet. Test that cleanupOrphanedVolumes + // won't remove the volume from disk if the volume is referenced only + // indirectly by a claim. + err := kubelet.cleanupOrphanedVolumes([]*api.Pod{&pod}, []*kubecontainer.Pod{}) + if err != nil { + t.Errorf("cleanupOrphanedVolumes failed: %v", err) + } + + volumesFound := kubelet.getPodVolumesFromDisk() + if len(volumesFound) != len(pathsOnDisk) { + t.Errorf("Expected to find %d cleaners, got %d", len(pathsOnDisk), len(volumesFound)) + } + for _, ep := range pathsOnDisk { + found := false + for _, cl := range volumesFound { + if ep == cl.GetPath() { + found = true + break + } + } + if !found { + t.Errorf("Could not find a volume with path %s", ep) + } + } + + // The pod is deleted -> kubelet should delete the volume + err = kubelet.cleanupOrphanedVolumes([]*api.Pod{}, []*kubecontainer.Pod{}) + if err != nil { + t.Errorf("cleanupOrphanedVolumes failed: %v", err) + } + volumesFound = kubelet.getPodVolumesFromDisk() + if len(volumesFound) != 0 { + t.Errorf("Expected to find 0 cleaners, got %d", len(volumesFound)) + } + for _, cl := range volumesFound { + t.Errorf("Found unexpected volume %s", cl.GetPath()) + } +} + type stubVolume struct { path string volume.MetricsNil From 205e6899bec2b6b81505db7072e8e0d63188a77d Mon Sep 17 00:00:00 2001 From: Wojciech Tyczynski Date: Wed, 30 Dec 2015 15:51:56 +0100 Subject: [PATCH 093/328] Generate public deep-copy functions --- .../deepcopy-gen/generators/deepcopy.go | 28 +++++++++++++++---- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/cmd/libs/go2idl/deepcopy-gen/generators/deepcopy.go b/cmd/libs/go2idl/deepcopy-gen/generators/deepcopy.go index fda287a4095..db8128e290a 100644 --- a/cmd/libs/go2idl/deepcopy-gen/generators/deepcopy.go +++ b/cmd/libs/go2idl/deepcopy-gen/generators/deepcopy.go @@ -17,6 +17,7 @@ limitations under the License. package generators import ( + "fmt" "io" "path/filepath" "strings" @@ -202,6 +203,16 @@ func (g *genDeepCopy) Imports(c *generator.Context) (imports []string) { return importLines } +func argsFromType(t *types.Type) interface{} { + return map[string]interface{}{ + "type": t, + } +} + +func (g *genDeepCopy) funcNameTmpl(t *types.Type) string { + return "DeepCopy_$.type|public$" +} + func (g *genDeepCopy) Init(c *generator.Context, w io.Writer) error { sw := generator.NewSnippetWriter(w, c, "$", "$") sw.Do("func init() {\n", nil) @@ -211,7 +222,7 @@ func (g *genDeepCopy) Init(c *generator.Context, w io.Writer) error { sw.Do("if err := api.Scheme.AddGeneratedDeepCopyFuncs(\n", nil) } for _, t := range g.typesForInit { - sw.Do("deepCopy_$.|public$,\n", t) + sw.Do(fmt.Sprintf("%s,\n", g.funcNameTmpl(t)), argsFromType(t)) } sw.Do("); err != nil {\n", nil) sw.Do("// if one of the deep copy functions is malformed, detect it immediately.\n", nil) @@ -224,7 +235,8 @@ func (g *genDeepCopy) Init(c *generator.Context, w io.Writer) error { // GenerateType makes the body of a file implementing a set for type t. func (g *genDeepCopy) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error { sw := generator.NewSnippetWriter(w, c, "$", "$") - sw.Do("func deepCopy_$.|public$(in $.|raw$, out *$.|raw$, c *conversion.Cloner) error {\n", t) + funcName := g.funcNameTmpl(t) + sw.Do(fmt.Sprintf("func %s(in $.type|raw$, out *$.type|raw$, c *conversion.Cloner) error {\n", funcName), argsFromType(t)) g.generateFor(t, sw) sw.Do("return nil\n", nil) sw.Do("}\n\n", nil) @@ -270,7 +282,8 @@ func (g *genDeepCopy) doMap(t *types.Type, sw *generator.SnippetWriter) { } else { if g.copyableWithinPackage(t.Elem) { sw.Do("newVal := new($.|raw$)\n", t.Elem) - sw.Do("if err := deepCopy_$.|public$(val, newVal, c); err != nil {\n", t.Elem) + funcName := g.funcNameTmpl(t.Elem) + sw.Do(fmt.Sprintf("if err := %s(val, newVal, c); err != nil {\n", funcName), argsFromType(t.Elem)) sw.Do("return err\n", nil) sw.Do("}\n", nil) sw.Do("(*out)[key] = *newVal\n", nil) @@ -298,7 +311,8 @@ func (g *genDeepCopy) doSlice(t *types.Type, sw *generator.SnippetWriter) { if t.Elem.IsAssignable() { sw.Do("(*out)[i] = in[i]\n", nil) } else if g.copyableWithinPackage(t.Elem) { - sw.Do("if err := deepCopy_$.|public$(in[i], &(*out)[i], c); err != nil {\n", t.Elem) + funcName := g.funcNameTmpl(t.Elem) + sw.Do(fmt.Sprintf("if err := %s(in[i], &(*out)[i], c); err != nil {\n", funcName), argsFromType(t.Elem)) sw.Do("return err\n", nil) sw.Do("}\n", nil) } else { @@ -330,7 +344,8 @@ func (g *genDeepCopy) doStruct(t *types.Type, sw *generator.SnippetWriter) { sw.Do("}\n", nil) case types.Struct: if g.copyableWithinPackage(m.Type) { - sw.Do("if err := deepCopy_$.type|public$(in.$.name$, &out.$.name$, c); err != nil {\n", args) + funcName := g.funcNameTmpl(m.Type) + sw.Do(fmt.Sprintf("if err := %s(in.$.name$, &out.$.name$, c); err != nil {\n", funcName), args) sw.Do("return err\n", nil) sw.Do("}\n", nil) } else { @@ -364,7 +379,8 @@ func (g *genDeepCopy) doPointer(t *types.Type, sw *generator.SnippetWriter) { if t.Elem.Kind == types.Builtin { sw.Do("**out = *in", nil) } else if g.copyableWithinPackage(t.Elem) { - sw.Do("if err := deepCopy_$.|public$(*in, *out, c); err != nil {\n", t.Elem) + funcName := g.funcNameTmpl(t.Elem) + sw.Do(fmt.Sprintf("if err := %s(*in, *out, c); err != nil {\n", funcName), argsFromType(t.Elem)) sw.Do("return err\n", nil) sw.Do("}\n", nil) } else { From 68d0f6387af3f439343561a910ab13b9927b52a7 Mon Sep 17 00:00:00 2001 From: Wojciech Tyczynski Date: Wed, 30 Dec 2015 16:00:54 +0100 Subject: [PATCH 094/328] Regenerate auto-generated files --- pkg/api/deep_copy_generated.go | 999 ++++++++++++++++----------------- 1 file changed, 491 insertions(+), 508 deletions(-) diff --git a/pkg/api/deep_copy_generated.go b/pkg/api/deep_copy_generated.go index 5f1d83cfc9c..65c7f94b14e 100644 --- a/pkg/api/deep_copy_generated.go +++ b/pkg/api/deep_copy_generated.go @@ -31,152 +31,151 @@ import ( func init() { if err := Scheme.AddGeneratedDeepCopyFuncs( - deepCopy_api_AWSElasticBlockStoreVolumeSource, - deepCopy_api_Binding, - deepCopy_api_Capabilities, - deepCopy_api_CephFSVolumeSource, - deepCopy_api_CinderVolumeSource, - deepCopy_api_ComponentCondition, - deepCopy_api_ComponentStatus, - deepCopy_api_ComponentStatusList, - deepCopy_api_ConfigMap, - deepCopy_api_ConfigMapKeySelector, - deepCopy_api_ConfigMapList, - deepCopy_api_Container, - deepCopy_api_ContainerImage, - deepCopy_api_ContainerPort, - deepCopy_api_ContainerState, - deepCopy_api_ContainerStateRunning, - deepCopy_api_ContainerStateTerminated, - deepCopy_api_ContainerStateWaiting, - deepCopy_api_ContainerStatus, - deepCopy_api_ConversionError, - deepCopy_api_DaemonEndpoint, - deepCopy_api_DeleteOptions, - deepCopy_api_DownwardAPIVolumeFile, - deepCopy_api_DownwardAPIVolumeSource, - deepCopy_api_EmptyDirVolumeSource, - deepCopy_api_EndpointAddress, - deepCopy_api_EndpointPort, - deepCopy_api_EndpointSubset, - deepCopy_api_Endpoints, - deepCopy_api_EndpointsList, - deepCopy_api_EnvVar, - deepCopy_api_EnvVarSource, - deepCopy_api_Event, - deepCopy_api_EventList, - deepCopy_api_EventSource, - deepCopy_api_ExecAction, - deepCopy_api_ExportOptions, - deepCopy_api_FCVolumeSource, - deepCopy_api_FlexVolumeSource, - deepCopy_api_FlockerVolumeSource, - deepCopy_api_GCEPersistentDiskVolumeSource, - deepCopy_api_GitRepoVolumeSource, - deepCopy_api_GlusterfsVolumeSource, - deepCopy_api_HTTPGetAction, - deepCopy_api_Handler, - deepCopy_api_HostPathVolumeSource, - deepCopy_api_ISCSIVolumeSource, - deepCopy_api_Lifecycle, - deepCopy_api_LimitRange, - deepCopy_api_LimitRangeItem, - deepCopy_api_LimitRangeList, - deepCopy_api_LimitRangeSpec, - deepCopy_api_List, - deepCopy_api_ListOptions, - deepCopy_api_LoadBalancerIngress, - deepCopy_api_LoadBalancerStatus, - deepCopy_api_LocalObjectReference, - deepCopy_api_NFSVolumeSource, - deepCopy_api_Namespace, - deepCopy_api_NamespaceList, - deepCopy_api_NamespaceSpec, - deepCopy_api_NamespaceStatus, - deepCopy_api_Node, - deepCopy_api_NodeAddress, - deepCopy_api_NodeCondition, - deepCopy_api_NodeDaemonEndpoints, - deepCopy_api_NodeList, - deepCopy_api_NodeResources, - deepCopy_api_NodeSpec, - deepCopy_api_NodeStatus, - deepCopy_api_NodeSystemInfo, - deepCopy_api_ObjectFieldSelector, - deepCopy_api_ObjectMeta, - deepCopy_api_ObjectReference, - deepCopy_api_PersistentVolume, - deepCopy_api_PersistentVolumeClaim, - deepCopy_api_PersistentVolumeClaimList, - deepCopy_api_PersistentVolumeClaimSpec, - deepCopy_api_PersistentVolumeClaimStatus, - deepCopy_api_PersistentVolumeClaimVolumeSource, - deepCopy_api_PersistentVolumeList, - deepCopy_api_PersistentVolumeSource, - deepCopy_api_PersistentVolumeSpec, - deepCopy_api_PersistentVolumeStatus, - deepCopy_api_Pod, - deepCopy_api_PodAttachOptions, - deepCopy_api_PodCondition, - deepCopy_api_PodExecOptions, - deepCopy_api_PodList, - deepCopy_api_PodLogOptions, - deepCopy_api_PodProxyOptions, - deepCopy_api_PodSecurityContext, - deepCopy_api_PodSpec, - deepCopy_api_PodStatus, - deepCopy_api_PodStatusResult, - deepCopy_api_PodTemplate, - deepCopy_api_PodTemplateList, - deepCopy_api_PodTemplateSpec, - deepCopy_api_Probe, - deepCopy_api_RBDVolumeSource, - deepCopy_api_RangeAllocation, - deepCopy_api_ReplicationController, - deepCopy_api_ReplicationControllerList, - deepCopy_api_ReplicationControllerSpec, - deepCopy_api_ReplicationControllerStatus, - deepCopy_api_ResourceQuota, - deepCopy_api_ResourceQuotaList, - deepCopy_api_ResourceQuotaSpec, - deepCopy_api_ResourceQuotaStatus, - deepCopy_api_ResourceRequirements, - deepCopy_api_SELinuxOptions, - deepCopy_api_Secret, - deepCopy_api_SecretKeySelector, - deepCopy_api_SecretList, - deepCopy_api_SecretVolumeSource, - deepCopy_api_SecurityContext, - deepCopy_api_SerializedReference, - deepCopy_api_Service, - deepCopy_api_ServiceAccount, - deepCopy_api_ServiceAccountList, - deepCopy_api_ServiceList, - deepCopy_api_ServicePort, - deepCopy_api_ServiceSpec, - deepCopy_api_ServiceStatus, - deepCopy_api_TCPSocketAction, - deepCopy_api_Volume, - deepCopy_api_VolumeMount, - deepCopy_api_VolumeSource, - deepCopy_conversion_Meta, - deepCopy_intstr_IntOrString, - deepCopy_runtime_RawExtension, - deepCopy_sets_Empty, - deepCopy_unversioned_GroupKind, - deepCopy_unversioned_GroupResource, - deepCopy_unversioned_GroupVersion, - deepCopy_unversioned_GroupVersionKind, - deepCopy_unversioned_GroupVersionResource, - deepCopy_unversioned_ListMeta, - deepCopy_unversioned_TypeMeta, + DeepCopy_api_AWSElasticBlockStoreVolumeSource, + DeepCopy_api_Binding, + DeepCopy_api_Capabilities, + DeepCopy_api_CephFSVolumeSource, + DeepCopy_api_CinderVolumeSource, + DeepCopy_api_ComponentCondition, + DeepCopy_api_ComponentStatus, + DeepCopy_api_ComponentStatusList, + DeepCopy_api_ConfigMap, + DeepCopy_api_ConfigMapKeySelector, + DeepCopy_api_ConfigMapList, + DeepCopy_api_Container, + DeepCopy_api_ContainerImage, + DeepCopy_api_ContainerPort, + DeepCopy_api_ContainerState, + DeepCopy_api_ContainerStateRunning, + DeepCopy_api_ContainerStateTerminated, + DeepCopy_api_ContainerStateWaiting, + DeepCopy_api_ContainerStatus, + DeepCopy_api_ConversionError, + DeepCopy_api_DaemonEndpoint, + DeepCopy_api_DeleteOptions, + DeepCopy_api_DownwardAPIVolumeFile, + DeepCopy_api_DownwardAPIVolumeSource, + DeepCopy_api_EmptyDirVolumeSource, + DeepCopy_api_EndpointAddress, + DeepCopy_api_EndpointPort, + DeepCopy_api_EndpointSubset, + DeepCopy_api_Endpoints, + DeepCopy_api_EndpointsList, + DeepCopy_api_EnvVar, + DeepCopy_api_EnvVarSource, + DeepCopy_api_Event, + DeepCopy_api_EventList, + DeepCopy_api_EventSource, + DeepCopy_api_ExecAction, + DeepCopy_api_ExportOptions, + DeepCopy_api_FCVolumeSource, + DeepCopy_api_FlexVolumeSource, + DeepCopy_api_FlockerVolumeSource, + DeepCopy_api_GCEPersistentDiskVolumeSource, + DeepCopy_api_GitRepoVolumeSource, + DeepCopy_api_GlusterfsVolumeSource, + DeepCopy_api_HTTPGetAction, + DeepCopy_api_Handler, + DeepCopy_api_HostPathVolumeSource, + DeepCopy_api_ISCSIVolumeSource, + DeepCopy_api_Lifecycle, + DeepCopy_api_LimitRange, + DeepCopy_api_LimitRangeItem, + DeepCopy_api_LimitRangeList, + DeepCopy_api_LimitRangeSpec, + DeepCopy_api_List, + DeepCopy_api_ListOptions, + DeepCopy_api_LoadBalancerIngress, + DeepCopy_api_LoadBalancerStatus, + DeepCopy_api_LocalObjectReference, + DeepCopy_api_NFSVolumeSource, + DeepCopy_api_Namespace, + DeepCopy_api_NamespaceList, + DeepCopy_api_NamespaceSpec, + DeepCopy_api_NamespaceStatus, + DeepCopy_api_Node, + DeepCopy_api_NodeAddress, + DeepCopy_api_NodeCondition, + DeepCopy_api_NodeDaemonEndpoints, + DeepCopy_api_NodeList, + DeepCopy_api_NodeResources, + DeepCopy_api_NodeSpec, + DeepCopy_api_NodeStatus, + DeepCopy_api_NodeSystemInfo, + DeepCopy_api_ObjectFieldSelector, + DeepCopy_api_ObjectMeta, + DeepCopy_api_ObjectReference, + DeepCopy_api_PersistentVolume, + DeepCopy_api_PersistentVolumeClaim, + DeepCopy_api_PersistentVolumeClaimList, + DeepCopy_api_PersistentVolumeClaimSpec, + DeepCopy_api_PersistentVolumeClaimStatus, + DeepCopy_api_PersistentVolumeClaimVolumeSource, + DeepCopy_api_PersistentVolumeList, + DeepCopy_api_PersistentVolumeSource, + DeepCopy_api_PersistentVolumeSpec, + DeepCopy_api_PersistentVolumeStatus, + DeepCopy_api_Pod, + DeepCopy_api_PodAttachOptions, + DeepCopy_api_PodCondition, + DeepCopy_api_PodExecOptions, + DeepCopy_api_PodList, + DeepCopy_api_PodLogOptions, + DeepCopy_api_PodProxyOptions, + DeepCopy_api_PodSecurityContext, + DeepCopy_api_PodSpec, + DeepCopy_api_PodStatus, + DeepCopy_api_PodStatusResult, + DeepCopy_api_PodTemplate, + DeepCopy_api_PodTemplateList, + DeepCopy_api_PodTemplateSpec, + DeepCopy_api_Probe, + DeepCopy_api_RBDVolumeSource, + DeepCopy_api_RangeAllocation, + DeepCopy_api_ReplicationController, + DeepCopy_api_ReplicationControllerList, + DeepCopy_api_ReplicationControllerSpec, + DeepCopy_api_ReplicationControllerStatus, + DeepCopy_api_ResourceQuota, + DeepCopy_api_ResourceQuotaList, + DeepCopy_api_ResourceQuotaSpec, + DeepCopy_api_ResourceQuotaStatus, + DeepCopy_api_ResourceRequirements, + DeepCopy_api_SELinuxOptions, + DeepCopy_api_Secret, + DeepCopy_api_SecretKeySelector, + DeepCopy_api_SecretList, + DeepCopy_api_SecretVolumeSource, + DeepCopy_api_SecurityContext, + DeepCopy_api_SerializedReference, + DeepCopy_api_Service, + DeepCopy_api_ServiceAccount, + DeepCopy_api_ServiceAccountList, + DeepCopy_api_ServiceList, + DeepCopy_api_ServicePort, + DeepCopy_api_ServiceSpec, + DeepCopy_api_ServiceStatus, + DeepCopy_api_TCPSocketAction, + DeepCopy_api_Volume, + DeepCopy_api_VolumeMount, + DeepCopy_api_VolumeSource, + DeepCopy_conversion_Meta, + DeepCopy_intstr_IntOrString, + DeepCopy_sets_Empty, + DeepCopy_unversioned_GroupKind, + DeepCopy_unversioned_GroupResource, + DeepCopy_unversioned_GroupVersion, + DeepCopy_unversioned_GroupVersionKind, + DeepCopy_unversioned_GroupVersionResource, + DeepCopy_unversioned_ListMeta, + DeepCopy_unversioned_TypeMeta, ); err != nil { // if one of the deep copy functions is malformed, detect it immediately. panic(err) } } -func deepCopy_api_AWSElasticBlockStoreVolumeSource(in AWSElasticBlockStoreVolumeSource, out *AWSElasticBlockStoreVolumeSource, c *conversion.Cloner) error { +func DeepCopy_api_AWSElasticBlockStoreVolumeSource(in AWSElasticBlockStoreVolumeSource, out *AWSElasticBlockStoreVolumeSource, c *conversion.Cloner) error { out.VolumeID = in.VolumeID out.FSType = in.FSType out.Partition = in.Partition @@ -184,20 +183,20 @@ func deepCopy_api_AWSElasticBlockStoreVolumeSource(in AWSElasticBlockStoreVolume return nil } -func deepCopy_api_Binding(in Binding, out *Binding, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_Binding(in Binding, out *Binding, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { return err } - if err := deepCopy_api_ObjectReference(in.Target, &out.Target, c); err != nil { + if err := DeepCopy_api_ObjectReference(in.Target, &out.Target, c); err != nil { return err } return nil } -func deepCopy_api_Capabilities(in Capabilities, out *Capabilities, c *conversion.Cloner) error { +func DeepCopy_api_Capabilities(in Capabilities, out *Capabilities, c *conversion.Cloner) error { if in.Add != nil { in, out := in.Add, &out.Add *out = make([]Capability, len(in)) @@ -219,7 +218,7 @@ func deepCopy_api_Capabilities(in Capabilities, out *Capabilities, c *conversion return nil } -func deepCopy_api_CephFSVolumeSource(in CephFSVolumeSource, out *CephFSVolumeSource, c *conversion.Cloner) error { +func DeepCopy_api_CephFSVolumeSource(in CephFSVolumeSource, out *CephFSVolumeSource, c *conversion.Cloner) error { if in.Monitors != nil { in, out := in.Monitors, &out.Monitors *out = make([]string, len(in)) @@ -233,7 +232,7 @@ func deepCopy_api_CephFSVolumeSource(in CephFSVolumeSource, out *CephFSVolumeSou if in.SecretRef != nil { in, out := in.SecretRef, &out.SecretRef *out = new(LocalObjectReference) - if err := deepCopy_api_LocalObjectReference(*in, *out, c); err != nil { + if err := DeepCopy_api_LocalObjectReference(*in, *out, c); err != nil { return err } } else { @@ -243,14 +242,14 @@ func deepCopy_api_CephFSVolumeSource(in CephFSVolumeSource, out *CephFSVolumeSou return nil } -func deepCopy_api_CinderVolumeSource(in CinderVolumeSource, out *CinderVolumeSource, c *conversion.Cloner) error { +func DeepCopy_api_CinderVolumeSource(in CinderVolumeSource, out *CinderVolumeSource, c *conversion.Cloner) error { out.VolumeID = in.VolumeID out.FSType = in.FSType out.ReadOnly = in.ReadOnly return nil } -func deepCopy_api_ComponentCondition(in ComponentCondition, out *ComponentCondition, c *conversion.Cloner) error { +func DeepCopy_api_ComponentCondition(in ComponentCondition, out *ComponentCondition, c *conversion.Cloner) error { out.Type = in.Type out.Status = in.Status out.Message = in.Message @@ -258,18 +257,18 @@ func deepCopy_api_ComponentCondition(in ComponentCondition, out *ComponentCondit return nil } -func deepCopy_api_ComponentStatus(in ComponentStatus, out *ComponentStatus, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_ComponentStatus(in ComponentStatus, out *ComponentStatus, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { return err } if in.Conditions != nil { in, out := in.Conditions, &out.Conditions *out = make([]ComponentCondition, len(in)) for i := range in { - if err := deepCopy_api_ComponentCondition(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_ComponentCondition(in[i], &(*out)[i], c); err != nil { return err } } @@ -279,18 +278,18 @@ func deepCopy_api_ComponentStatus(in ComponentStatus, out *ComponentStatus, c *c return nil } -func deepCopy_api_ComponentStatusList(in ComponentStatusList, out *ComponentStatusList, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_ComponentStatusList(in ComponentStatusList, out *ComponentStatusList, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { + if err := DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { return err } if in.Items != nil { in, out := in.Items, &out.Items *out = make([]ComponentStatus, len(in)) for i := range in { - if err := deepCopy_api_ComponentStatus(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_ComponentStatus(in[i], &(*out)[i], c); err != nil { return err } } @@ -300,11 +299,11 @@ func deepCopy_api_ComponentStatusList(in ComponentStatusList, out *ComponentStat return nil } -func deepCopy_api_ConfigMap(in ConfigMap, out *ConfigMap, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_ConfigMap(in ConfigMap, out *ConfigMap, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { return err } if in.Data != nil { @@ -319,26 +318,26 @@ func deepCopy_api_ConfigMap(in ConfigMap, out *ConfigMap, c *conversion.Cloner) return nil } -func deepCopy_api_ConfigMapKeySelector(in ConfigMapKeySelector, out *ConfigMapKeySelector, c *conversion.Cloner) error { - if err := deepCopy_api_LocalObjectReference(in.LocalObjectReference, &out.LocalObjectReference, c); err != nil { +func DeepCopy_api_ConfigMapKeySelector(in ConfigMapKeySelector, out *ConfigMapKeySelector, c *conversion.Cloner) error { + if err := DeepCopy_api_LocalObjectReference(in.LocalObjectReference, &out.LocalObjectReference, c); err != nil { return err } out.Key = in.Key return nil } -func deepCopy_api_ConfigMapList(in ConfigMapList, out *ConfigMapList, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_ConfigMapList(in ConfigMapList, out *ConfigMapList, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { + if err := DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { return err } if in.Items != nil { in, out := in.Items, &out.Items *out = make([]ConfigMap, len(in)) for i := range in { - if err := deepCopy_api_ConfigMap(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_ConfigMap(in[i], &(*out)[i], c); err != nil { return err } } @@ -348,7 +347,7 @@ func deepCopy_api_ConfigMapList(in ConfigMapList, out *ConfigMapList, c *convers return nil } -func deepCopy_api_Container(in Container, out *Container, c *conversion.Cloner) error { +func DeepCopy_api_Container(in Container, out *Container, c *conversion.Cloner) error { out.Name = in.Name out.Image = in.Image if in.Command != nil { @@ -370,7 +369,7 @@ func deepCopy_api_Container(in Container, out *Container, c *conversion.Cloner) in, out := in.Ports, &out.Ports *out = make([]ContainerPort, len(in)) for i := range in { - if err := deepCopy_api_ContainerPort(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_ContainerPort(in[i], &(*out)[i], c); err != nil { return err } } @@ -381,21 +380,21 @@ func deepCopy_api_Container(in Container, out *Container, c *conversion.Cloner) in, out := in.Env, &out.Env *out = make([]EnvVar, len(in)) for i := range in { - if err := deepCopy_api_EnvVar(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_EnvVar(in[i], &(*out)[i], c); err != nil { return err } } } else { out.Env = nil } - if err := deepCopy_api_ResourceRequirements(in.Resources, &out.Resources, c); err != nil { + if err := DeepCopy_api_ResourceRequirements(in.Resources, &out.Resources, c); err != nil { return err } if in.VolumeMounts != nil { in, out := in.VolumeMounts, &out.VolumeMounts *out = make([]VolumeMount, len(in)) for i := range in { - if err := deepCopy_api_VolumeMount(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_VolumeMount(in[i], &(*out)[i], c); err != nil { return err } } @@ -405,7 +404,7 @@ func deepCopy_api_Container(in Container, out *Container, c *conversion.Cloner) if in.LivenessProbe != nil { in, out := in.LivenessProbe, &out.LivenessProbe *out = new(Probe) - if err := deepCopy_api_Probe(*in, *out, c); err != nil { + if err := DeepCopy_api_Probe(*in, *out, c); err != nil { return err } } else { @@ -414,7 +413,7 @@ func deepCopy_api_Container(in Container, out *Container, c *conversion.Cloner) if in.ReadinessProbe != nil { in, out := in.ReadinessProbe, &out.ReadinessProbe *out = new(Probe) - if err := deepCopy_api_Probe(*in, *out, c); err != nil { + if err := DeepCopy_api_Probe(*in, *out, c); err != nil { return err } } else { @@ -423,7 +422,7 @@ func deepCopy_api_Container(in Container, out *Container, c *conversion.Cloner) if in.Lifecycle != nil { in, out := in.Lifecycle, &out.Lifecycle *out = new(Lifecycle) - if err := deepCopy_api_Lifecycle(*in, *out, c); err != nil { + if err := DeepCopy_api_Lifecycle(*in, *out, c); err != nil { return err } } else { @@ -434,7 +433,7 @@ func deepCopy_api_Container(in Container, out *Container, c *conversion.Cloner) if in.SecurityContext != nil { in, out := in.SecurityContext, &out.SecurityContext *out = new(SecurityContext) - if err := deepCopy_api_SecurityContext(*in, *out, c); err != nil { + if err := DeepCopy_api_SecurityContext(*in, *out, c); err != nil { return err } } else { @@ -446,7 +445,7 @@ func deepCopy_api_Container(in Container, out *Container, c *conversion.Cloner) return nil } -func deepCopy_api_ContainerImage(in ContainerImage, out *ContainerImage, c *conversion.Cloner) error { +func DeepCopy_api_ContainerImage(in ContainerImage, out *ContainerImage, c *conversion.Cloner) error { if in.RepoTags != nil { in, out := in.RepoTags, &out.RepoTags *out = make([]string, len(in)) @@ -458,7 +457,7 @@ func deepCopy_api_ContainerImage(in ContainerImage, out *ContainerImage, c *conv return nil } -func deepCopy_api_ContainerPort(in ContainerPort, out *ContainerPort, c *conversion.Cloner) error { +func DeepCopy_api_ContainerPort(in ContainerPort, out *ContainerPort, c *conversion.Cloner) error { out.Name = in.Name out.HostPort = in.HostPort out.ContainerPort = in.ContainerPort @@ -467,11 +466,11 @@ func deepCopy_api_ContainerPort(in ContainerPort, out *ContainerPort, c *convers return nil } -func deepCopy_api_ContainerState(in ContainerState, out *ContainerState, c *conversion.Cloner) error { +func DeepCopy_api_ContainerState(in ContainerState, out *ContainerState, c *conversion.Cloner) error { if in.Waiting != nil { in, out := in.Waiting, &out.Waiting *out = new(ContainerStateWaiting) - if err := deepCopy_api_ContainerStateWaiting(*in, *out, c); err != nil { + if err := DeepCopy_api_ContainerStateWaiting(*in, *out, c); err != nil { return err } } else { @@ -480,7 +479,7 @@ func deepCopy_api_ContainerState(in ContainerState, out *ContainerState, c *conv if in.Running != nil { in, out := in.Running, &out.Running *out = new(ContainerStateRunning) - if err := deepCopy_api_ContainerStateRunning(*in, *out, c); err != nil { + if err := DeepCopy_api_ContainerStateRunning(*in, *out, c); err != nil { return err } } else { @@ -489,7 +488,7 @@ func deepCopy_api_ContainerState(in ContainerState, out *ContainerState, c *conv if in.Terminated != nil { in, out := in.Terminated, &out.Terminated *out = new(ContainerStateTerminated) - if err := deepCopy_api_ContainerStateTerminated(*in, *out, c); err != nil { + if err := DeepCopy_api_ContainerStateTerminated(*in, *out, c); err != nil { return err } } else { @@ -498,7 +497,7 @@ func deepCopy_api_ContainerState(in ContainerState, out *ContainerState, c *conv return nil } -func deepCopy_api_ContainerStateRunning(in ContainerStateRunning, out *ContainerStateRunning, c *conversion.Cloner) error { +func DeepCopy_api_ContainerStateRunning(in ContainerStateRunning, out *ContainerStateRunning, c *conversion.Cloner) error { if newVal, err := c.DeepCopy(in.StartedAt); err != nil { return err } else { @@ -507,7 +506,7 @@ func deepCopy_api_ContainerStateRunning(in ContainerStateRunning, out *Container return nil } -func deepCopy_api_ContainerStateTerminated(in ContainerStateTerminated, out *ContainerStateTerminated, c *conversion.Cloner) error { +func DeepCopy_api_ContainerStateTerminated(in ContainerStateTerminated, out *ContainerStateTerminated, c *conversion.Cloner) error { out.ExitCode = in.ExitCode out.Signal = in.Signal out.Reason = in.Reason @@ -526,18 +525,18 @@ func deepCopy_api_ContainerStateTerminated(in ContainerStateTerminated, out *Con return nil } -func deepCopy_api_ContainerStateWaiting(in ContainerStateWaiting, out *ContainerStateWaiting, c *conversion.Cloner) error { +func DeepCopy_api_ContainerStateWaiting(in ContainerStateWaiting, out *ContainerStateWaiting, c *conversion.Cloner) error { out.Reason = in.Reason out.Message = in.Message return nil } -func deepCopy_api_ContainerStatus(in ContainerStatus, out *ContainerStatus, c *conversion.Cloner) error { +func DeepCopy_api_ContainerStatus(in ContainerStatus, out *ContainerStatus, c *conversion.Cloner) error { out.Name = in.Name - if err := deepCopy_api_ContainerState(in.State, &out.State, c); err != nil { + if err := DeepCopy_api_ContainerState(in.State, &out.State, c); err != nil { return err } - if err := deepCopy_api_ContainerState(in.LastTerminationState, &out.LastTerminationState, c); err != nil { + if err := DeepCopy_api_ContainerState(in.LastTerminationState, &out.LastTerminationState, c); err != nil { return err } out.Ready = in.Ready @@ -548,7 +547,7 @@ func deepCopy_api_ContainerStatus(in ContainerStatus, out *ContainerStatus, c *c return nil } -func deepCopy_api_ConversionError(in ConversionError, out *ConversionError, c *conversion.Cloner) error { +func DeepCopy_api_ConversionError(in ConversionError, out *ConversionError, c *conversion.Cloner) error { if newVal, err := c.DeepCopy(in.In); err != nil { return err } else { @@ -563,13 +562,13 @@ func deepCopy_api_ConversionError(in ConversionError, out *ConversionError, c *c return nil } -func deepCopy_api_DaemonEndpoint(in DaemonEndpoint, out *DaemonEndpoint, c *conversion.Cloner) error { +func DeepCopy_api_DaemonEndpoint(in DaemonEndpoint, out *DaemonEndpoint, c *conversion.Cloner) error { out.Port = in.Port return nil } -func deepCopy_api_DeleteOptions(in DeleteOptions, out *DeleteOptions, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_DeleteOptions(in DeleteOptions, out *DeleteOptions, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } if in.GracePeriodSeconds != nil { @@ -582,20 +581,20 @@ func deepCopy_api_DeleteOptions(in DeleteOptions, out *DeleteOptions, c *convers return nil } -func deepCopy_api_DownwardAPIVolumeFile(in DownwardAPIVolumeFile, out *DownwardAPIVolumeFile, c *conversion.Cloner) error { +func DeepCopy_api_DownwardAPIVolumeFile(in DownwardAPIVolumeFile, out *DownwardAPIVolumeFile, c *conversion.Cloner) error { out.Path = in.Path - if err := deepCopy_api_ObjectFieldSelector(in.FieldRef, &out.FieldRef, c); err != nil { + if err := DeepCopy_api_ObjectFieldSelector(in.FieldRef, &out.FieldRef, c); err != nil { return err } return nil } -func deepCopy_api_DownwardAPIVolumeSource(in DownwardAPIVolumeSource, out *DownwardAPIVolumeSource, c *conversion.Cloner) error { +func DeepCopy_api_DownwardAPIVolumeSource(in DownwardAPIVolumeSource, out *DownwardAPIVolumeSource, c *conversion.Cloner) error { if in.Items != nil { in, out := in.Items, &out.Items *out = make([]DownwardAPIVolumeFile, len(in)) for i := range in { - if err := deepCopy_api_DownwardAPIVolumeFile(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_DownwardAPIVolumeFile(in[i], &(*out)[i], c); err != nil { return err } } @@ -605,17 +604,17 @@ func deepCopy_api_DownwardAPIVolumeSource(in DownwardAPIVolumeSource, out *Downw return nil } -func deepCopy_api_EmptyDirVolumeSource(in EmptyDirVolumeSource, out *EmptyDirVolumeSource, c *conversion.Cloner) error { +func DeepCopy_api_EmptyDirVolumeSource(in EmptyDirVolumeSource, out *EmptyDirVolumeSource, c *conversion.Cloner) error { out.Medium = in.Medium return nil } -func deepCopy_api_EndpointAddress(in EndpointAddress, out *EndpointAddress, c *conversion.Cloner) error { +func DeepCopy_api_EndpointAddress(in EndpointAddress, out *EndpointAddress, c *conversion.Cloner) error { out.IP = in.IP if in.TargetRef != nil { in, out := in.TargetRef, &out.TargetRef *out = new(ObjectReference) - if err := deepCopy_api_ObjectReference(*in, *out, c); err != nil { + if err := DeepCopy_api_ObjectReference(*in, *out, c); err != nil { return err } } else { @@ -624,19 +623,19 @@ func deepCopy_api_EndpointAddress(in EndpointAddress, out *EndpointAddress, c *c return nil } -func deepCopy_api_EndpointPort(in EndpointPort, out *EndpointPort, c *conversion.Cloner) error { +func DeepCopy_api_EndpointPort(in EndpointPort, out *EndpointPort, c *conversion.Cloner) error { out.Name = in.Name out.Port = in.Port out.Protocol = in.Protocol return nil } -func deepCopy_api_EndpointSubset(in EndpointSubset, out *EndpointSubset, c *conversion.Cloner) error { +func DeepCopy_api_EndpointSubset(in EndpointSubset, out *EndpointSubset, c *conversion.Cloner) error { if in.Addresses != nil { in, out := in.Addresses, &out.Addresses *out = make([]EndpointAddress, len(in)) for i := range in { - if err := deepCopy_api_EndpointAddress(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_EndpointAddress(in[i], &(*out)[i], c); err != nil { return err } } @@ -647,7 +646,7 @@ func deepCopy_api_EndpointSubset(in EndpointSubset, out *EndpointSubset, c *conv in, out := in.NotReadyAddresses, &out.NotReadyAddresses *out = make([]EndpointAddress, len(in)) for i := range in { - if err := deepCopy_api_EndpointAddress(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_EndpointAddress(in[i], &(*out)[i], c); err != nil { return err } } @@ -658,7 +657,7 @@ func deepCopy_api_EndpointSubset(in EndpointSubset, out *EndpointSubset, c *conv in, out := in.Ports, &out.Ports *out = make([]EndpointPort, len(in)) for i := range in { - if err := deepCopy_api_EndpointPort(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_EndpointPort(in[i], &(*out)[i], c); err != nil { return err } } @@ -668,18 +667,18 @@ func deepCopy_api_EndpointSubset(in EndpointSubset, out *EndpointSubset, c *conv return nil } -func deepCopy_api_Endpoints(in Endpoints, out *Endpoints, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_Endpoints(in Endpoints, out *Endpoints, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { return err } if in.Subsets != nil { in, out := in.Subsets, &out.Subsets *out = make([]EndpointSubset, len(in)) for i := range in { - if err := deepCopy_api_EndpointSubset(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_EndpointSubset(in[i], &(*out)[i], c); err != nil { return err } } @@ -689,18 +688,18 @@ func deepCopy_api_Endpoints(in Endpoints, out *Endpoints, c *conversion.Cloner) return nil } -func deepCopy_api_EndpointsList(in EndpointsList, out *EndpointsList, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_EndpointsList(in EndpointsList, out *EndpointsList, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { + if err := DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { return err } if in.Items != nil { in, out := in.Items, &out.Items *out = make([]Endpoints, len(in)) for i := range in { - if err := deepCopy_api_Endpoints(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_Endpoints(in[i], &(*out)[i], c); err != nil { return err } } @@ -710,13 +709,13 @@ func deepCopy_api_EndpointsList(in EndpointsList, out *EndpointsList, c *convers return nil } -func deepCopy_api_EnvVar(in EnvVar, out *EnvVar, c *conversion.Cloner) error { +func DeepCopy_api_EnvVar(in EnvVar, out *EnvVar, c *conversion.Cloner) error { out.Name = in.Name out.Value = in.Value if in.ValueFrom != nil { in, out := in.ValueFrom, &out.ValueFrom *out = new(EnvVarSource) - if err := deepCopy_api_EnvVarSource(*in, *out, c); err != nil { + if err := DeepCopy_api_EnvVarSource(*in, *out, c); err != nil { return err } } else { @@ -725,11 +724,11 @@ func deepCopy_api_EnvVar(in EnvVar, out *EnvVar, c *conversion.Cloner) error { return nil } -func deepCopy_api_EnvVarSource(in EnvVarSource, out *EnvVarSource, c *conversion.Cloner) error { +func DeepCopy_api_EnvVarSource(in EnvVarSource, out *EnvVarSource, c *conversion.Cloner) error { if in.FieldRef != nil { in, out := in.FieldRef, &out.FieldRef *out = new(ObjectFieldSelector) - if err := deepCopy_api_ObjectFieldSelector(*in, *out, c); err != nil { + if err := DeepCopy_api_ObjectFieldSelector(*in, *out, c); err != nil { return err } } else { @@ -738,7 +737,7 @@ func deepCopy_api_EnvVarSource(in EnvVarSource, out *EnvVarSource, c *conversion if in.ConfigMapKeyRef != nil { in, out := in.ConfigMapKeyRef, &out.ConfigMapKeyRef *out = new(ConfigMapKeySelector) - if err := deepCopy_api_ConfigMapKeySelector(*in, *out, c); err != nil { + if err := DeepCopy_api_ConfigMapKeySelector(*in, *out, c); err != nil { return err } } else { @@ -747,7 +746,7 @@ func deepCopy_api_EnvVarSource(in EnvVarSource, out *EnvVarSource, c *conversion if in.SecretKeyRef != nil { in, out := in.SecretKeyRef, &out.SecretKeyRef *out = new(SecretKeySelector) - if err := deepCopy_api_SecretKeySelector(*in, *out, c); err != nil { + if err := DeepCopy_api_SecretKeySelector(*in, *out, c); err != nil { return err } } else { @@ -756,19 +755,19 @@ func deepCopy_api_EnvVarSource(in EnvVarSource, out *EnvVarSource, c *conversion return nil } -func deepCopy_api_Event(in Event, out *Event, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_Event(in Event, out *Event, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { return err } - if err := deepCopy_api_ObjectReference(in.InvolvedObject, &out.InvolvedObject, c); err != nil { + if err := DeepCopy_api_ObjectReference(in.InvolvedObject, &out.InvolvedObject, c); err != nil { return err } out.Reason = in.Reason out.Message = in.Message - if err := deepCopy_api_EventSource(in.Source, &out.Source, c); err != nil { + if err := DeepCopy_api_EventSource(in.Source, &out.Source, c); err != nil { return err } if newVal, err := c.DeepCopy(in.FirstTimestamp); err != nil { @@ -786,18 +785,18 @@ func deepCopy_api_Event(in Event, out *Event, c *conversion.Cloner) error { return nil } -func deepCopy_api_EventList(in EventList, out *EventList, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_EventList(in EventList, out *EventList, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { + if err := DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { return err } if in.Items != nil { in, out := in.Items, &out.Items *out = make([]Event, len(in)) for i := range in { - if err := deepCopy_api_Event(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_Event(in[i], &(*out)[i], c); err != nil { return err } } @@ -807,13 +806,13 @@ func deepCopy_api_EventList(in EventList, out *EventList, c *conversion.Cloner) return nil } -func deepCopy_api_EventSource(in EventSource, out *EventSource, c *conversion.Cloner) error { +func DeepCopy_api_EventSource(in EventSource, out *EventSource, c *conversion.Cloner) error { out.Component = in.Component out.Host = in.Host return nil } -func deepCopy_api_ExecAction(in ExecAction, out *ExecAction, c *conversion.Cloner) error { +func DeepCopy_api_ExecAction(in ExecAction, out *ExecAction, c *conversion.Cloner) error { if in.Command != nil { in, out := in.Command, &out.Command *out = make([]string, len(in)) @@ -824,8 +823,8 @@ func deepCopy_api_ExecAction(in ExecAction, out *ExecAction, c *conversion.Clone return nil } -func deepCopy_api_ExportOptions(in ExportOptions, out *ExportOptions, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_ExportOptions(in ExportOptions, out *ExportOptions, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } out.Export = in.Export @@ -833,7 +832,7 @@ func deepCopy_api_ExportOptions(in ExportOptions, out *ExportOptions, c *convers return nil } -func deepCopy_api_FCVolumeSource(in FCVolumeSource, out *FCVolumeSource, c *conversion.Cloner) error { +func DeepCopy_api_FCVolumeSource(in FCVolumeSource, out *FCVolumeSource, c *conversion.Cloner) error { if in.TargetWWNs != nil { in, out := in.TargetWWNs, &out.TargetWWNs *out = make([]string, len(in)) @@ -853,13 +852,13 @@ func deepCopy_api_FCVolumeSource(in FCVolumeSource, out *FCVolumeSource, c *conv return nil } -func deepCopy_api_FlexVolumeSource(in FlexVolumeSource, out *FlexVolumeSource, c *conversion.Cloner) error { +func DeepCopy_api_FlexVolumeSource(in FlexVolumeSource, out *FlexVolumeSource, c *conversion.Cloner) error { out.Driver = in.Driver out.FSType = in.FSType if in.SecretRef != nil { in, out := in.SecretRef, &out.SecretRef *out = new(LocalObjectReference) - if err := deepCopy_api_LocalObjectReference(*in, *out, c); err != nil { + if err := DeepCopy_api_LocalObjectReference(*in, *out, c); err != nil { return err } } else { @@ -878,12 +877,12 @@ func deepCopy_api_FlexVolumeSource(in FlexVolumeSource, out *FlexVolumeSource, c return nil } -func deepCopy_api_FlockerVolumeSource(in FlockerVolumeSource, out *FlockerVolumeSource, c *conversion.Cloner) error { +func DeepCopy_api_FlockerVolumeSource(in FlockerVolumeSource, out *FlockerVolumeSource, c *conversion.Cloner) error { out.DatasetName = in.DatasetName return nil } -func deepCopy_api_GCEPersistentDiskVolumeSource(in GCEPersistentDiskVolumeSource, out *GCEPersistentDiskVolumeSource, c *conversion.Cloner) error { +func DeepCopy_api_GCEPersistentDiskVolumeSource(in GCEPersistentDiskVolumeSource, out *GCEPersistentDiskVolumeSource, c *conversion.Cloner) error { out.PDName = in.PDName out.FSType = in.FSType out.Partition = in.Partition @@ -891,23 +890,23 @@ func deepCopy_api_GCEPersistentDiskVolumeSource(in GCEPersistentDiskVolumeSource return nil } -func deepCopy_api_GitRepoVolumeSource(in GitRepoVolumeSource, out *GitRepoVolumeSource, c *conversion.Cloner) error { +func DeepCopy_api_GitRepoVolumeSource(in GitRepoVolumeSource, out *GitRepoVolumeSource, c *conversion.Cloner) error { out.Repository = in.Repository out.Revision = in.Revision out.Directory = in.Directory return nil } -func deepCopy_api_GlusterfsVolumeSource(in GlusterfsVolumeSource, out *GlusterfsVolumeSource, c *conversion.Cloner) error { +func DeepCopy_api_GlusterfsVolumeSource(in GlusterfsVolumeSource, out *GlusterfsVolumeSource, c *conversion.Cloner) error { out.EndpointsName = in.EndpointsName out.Path = in.Path out.ReadOnly = in.ReadOnly return nil } -func deepCopy_api_HTTPGetAction(in HTTPGetAction, out *HTTPGetAction, c *conversion.Cloner) error { +func DeepCopy_api_HTTPGetAction(in HTTPGetAction, out *HTTPGetAction, c *conversion.Cloner) error { out.Path = in.Path - if err := deepCopy_intstr_IntOrString(in.Port, &out.Port, c); err != nil { + if err := DeepCopy_intstr_IntOrString(in.Port, &out.Port, c); err != nil { return err } out.Host = in.Host @@ -915,11 +914,11 @@ func deepCopy_api_HTTPGetAction(in HTTPGetAction, out *HTTPGetAction, c *convers return nil } -func deepCopy_api_Handler(in Handler, out *Handler, c *conversion.Cloner) error { +func DeepCopy_api_Handler(in Handler, out *Handler, c *conversion.Cloner) error { if in.Exec != nil { in, out := in.Exec, &out.Exec *out = new(ExecAction) - if err := deepCopy_api_ExecAction(*in, *out, c); err != nil { + if err := DeepCopy_api_ExecAction(*in, *out, c); err != nil { return err } } else { @@ -928,7 +927,7 @@ func deepCopy_api_Handler(in Handler, out *Handler, c *conversion.Cloner) error if in.HTTPGet != nil { in, out := in.HTTPGet, &out.HTTPGet *out = new(HTTPGetAction) - if err := deepCopy_api_HTTPGetAction(*in, *out, c); err != nil { + if err := DeepCopy_api_HTTPGetAction(*in, *out, c); err != nil { return err } } else { @@ -937,7 +936,7 @@ func deepCopy_api_Handler(in Handler, out *Handler, c *conversion.Cloner) error if in.TCPSocket != nil { in, out := in.TCPSocket, &out.TCPSocket *out = new(TCPSocketAction) - if err := deepCopy_api_TCPSocketAction(*in, *out, c); err != nil { + if err := DeepCopy_api_TCPSocketAction(*in, *out, c); err != nil { return err } } else { @@ -946,12 +945,12 @@ func deepCopy_api_Handler(in Handler, out *Handler, c *conversion.Cloner) error return nil } -func deepCopy_api_HostPathVolumeSource(in HostPathVolumeSource, out *HostPathVolumeSource, c *conversion.Cloner) error { +func DeepCopy_api_HostPathVolumeSource(in HostPathVolumeSource, out *HostPathVolumeSource, c *conversion.Cloner) error { out.Path = in.Path return nil } -func deepCopy_api_ISCSIVolumeSource(in ISCSIVolumeSource, out *ISCSIVolumeSource, c *conversion.Cloner) error { +func DeepCopy_api_ISCSIVolumeSource(in ISCSIVolumeSource, out *ISCSIVolumeSource, c *conversion.Cloner) error { out.TargetPortal = in.TargetPortal out.IQN = in.IQN out.Lun = in.Lun @@ -961,11 +960,11 @@ func deepCopy_api_ISCSIVolumeSource(in ISCSIVolumeSource, out *ISCSIVolumeSource return nil } -func deepCopy_api_Lifecycle(in Lifecycle, out *Lifecycle, c *conversion.Cloner) error { +func DeepCopy_api_Lifecycle(in Lifecycle, out *Lifecycle, c *conversion.Cloner) error { if in.PostStart != nil { in, out := in.PostStart, &out.PostStart *out = new(Handler) - if err := deepCopy_api_Handler(*in, *out, c); err != nil { + if err := DeepCopy_api_Handler(*in, *out, c); err != nil { return err } } else { @@ -974,7 +973,7 @@ func deepCopy_api_Lifecycle(in Lifecycle, out *Lifecycle, c *conversion.Cloner) if in.PreStop != nil { in, out := in.PreStop, &out.PreStop *out = new(Handler) - if err := deepCopy_api_Handler(*in, *out, c); err != nil { + if err := DeepCopy_api_Handler(*in, *out, c); err != nil { return err } } else { @@ -983,20 +982,20 @@ func deepCopy_api_Lifecycle(in Lifecycle, out *Lifecycle, c *conversion.Cloner) return nil } -func deepCopy_api_LimitRange(in LimitRange, out *LimitRange, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_LimitRange(in LimitRange, out *LimitRange, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { return err } - if err := deepCopy_api_LimitRangeSpec(in.Spec, &out.Spec, c); err != nil { + if err := DeepCopy_api_LimitRangeSpec(in.Spec, &out.Spec, c); err != nil { return err } return nil } -func deepCopy_api_LimitRangeItem(in LimitRangeItem, out *LimitRangeItem, c *conversion.Cloner) error { +func DeepCopy_api_LimitRangeItem(in LimitRangeItem, out *LimitRangeItem, c *conversion.Cloner) error { out.Type = in.Type if in.Max != nil { in, out := in.Max, &out.Max @@ -1066,18 +1065,18 @@ func deepCopy_api_LimitRangeItem(in LimitRangeItem, out *LimitRangeItem, c *conv return nil } -func deepCopy_api_LimitRangeList(in LimitRangeList, out *LimitRangeList, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_LimitRangeList(in LimitRangeList, out *LimitRangeList, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { + if err := DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { return err } if in.Items != nil { in, out := in.Items, &out.Items *out = make([]LimitRange, len(in)) for i := range in { - if err := deepCopy_api_LimitRange(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_LimitRange(in[i], &(*out)[i], c); err != nil { return err } } @@ -1087,12 +1086,12 @@ func deepCopy_api_LimitRangeList(in LimitRangeList, out *LimitRangeList, c *conv return nil } -func deepCopy_api_LimitRangeSpec(in LimitRangeSpec, out *LimitRangeSpec, c *conversion.Cloner) error { +func DeepCopy_api_LimitRangeSpec(in LimitRangeSpec, out *LimitRangeSpec, c *conversion.Cloner) error { if in.Limits != nil { in, out := in.Limits, &out.Limits *out = make([]LimitRangeItem, len(in)) for i := range in { - if err := deepCopy_api_LimitRangeItem(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_LimitRangeItem(in[i], &(*out)[i], c); err != nil { return err } } @@ -1102,11 +1101,11 @@ func deepCopy_api_LimitRangeSpec(in LimitRangeSpec, out *LimitRangeSpec, c *conv return nil } -func deepCopy_api_List(in List, out *List, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_List(in List, out *List, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { + if err := DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { return err } if in.Items != nil { @@ -1125,8 +1124,8 @@ func deepCopy_api_List(in List, out *List, c *conversion.Cloner) error { return nil } -func deepCopy_api_ListOptions(in ListOptions, out *ListOptions, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_ListOptions(in ListOptions, out *ListOptions, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } if newVal, err := c.DeepCopy(in.LabelSelector); err != nil { @@ -1151,18 +1150,18 @@ func deepCopy_api_ListOptions(in ListOptions, out *ListOptions, c *conversion.Cl return nil } -func deepCopy_api_LoadBalancerIngress(in LoadBalancerIngress, out *LoadBalancerIngress, c *conversion.Cloner) error { +func DeepCopy_api_LoadBalancerIngress(in LoadBalancerIngress, out *LoadBalancerIngress, c *conversion.Cloner) error { out.IP = in.IP out.Hostname = in.Hostname return nil } -func deepCopy_api_LoadBalancerStatus(in LoadBalancerStatus, out *LoadBalancerStatus, c *conversion.Cloner) error { +func DeepCopy_api_LoadBalancerStatus(in LoadBalancerStatus, out *LoadBalancerStatus, c *conversion.Cloner) error { if in.Ingress != nil { in, out := in.Ingress, &out.Ingress *out = make([]LoadBalancerIngress, len(in)) for i := range in { - if err := deepCopy_api_LoadBalancerIngress(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_LoadBalancerIngress(in[i], &(*out)[i], c); err != nil { return err } } @@ -1172,46 +1171,46 @@ func deepCopy_api_LoadBalancerStatus(in LoadBalancerStatus, out *LoadBalancerSta return nil } -func deepCopy_api_LocalObjectReference(in LocalObjectReference, out *LocalObjectReference, c *conversion.Cloner) error { +func DeepCopy_api_LocalObjectReference(in LocalObjectReference, out *LocalObjectReference, c *conversion.Cloner) error { out.Name = in.Name return nil } -func deepCopy_api_NFSVolumeSource(in NFSVolumeSource, out *NFSVolumeSource, c *conversion.Cloner) error { +func DeepCopy_api_NFSVolumeSource(in NFSVolumeSource, out *NFSVolumeSource, c *conversion.Cloner) error { out.Server = in.Server out.Path = in.Path out.ReadOnly = in.ReadOnly return nil } -func deepCopy_api_Namespace(in Namespace, out *Namespace, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_Namespace(in Namespace, out *Namespace, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { return err } - if err := deepCopy_api_NamespaceSpec(in.Spec, &out.Spec, c); err != nil { + if err := DeepCopy_api_NamespaceSpec(in.Spec, &out.Spec, c); err != nil { return err } - if err := deepCopy_api_NamespaceStatus(in.Status, &out.Status, c); err != nil { + if err := DeepCopy_api_NamespaceStatus(in.Status, &out.Status, c); err != nil { return err } return nil } -func deepCopy_api_NamespaceList(in NamespaceList, out *NamespaceList, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_NamespaceList(in NamespaceList, out *NamespaceList, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { + if err := DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { return err } if in.Items != nil { in, out := in.Items, &out.Items *out = make([]Namespace, len(in)) for i := range in { - if err := deepCopy_api_Namespace(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_Namespace(in[i], &(*out)[i], c); err != nil { return err } } @@ -1221,7 +1220,7 @@ func deepCopy_api_NamespaceList(in NamespaceList, out *NamespaceList, c *convers return nil } -func deepCopy_api_NamespaceSpec(in NamespaceSpec, out *NamespaceSpec, c *conversion.Cloner) error { +func DeepCopy_api_NamespaceSpec(in NamespaceSpec, out *NamespaceSpec, c *conversion.Cloner) error { if in.Finalizers != nil { in, out := in.Finalizers, &out.Finalizers *out = make([]FinalizerName, len(in)) @@ -1234,34 +1233,34 @@ func deepCopy_api_NamespaceSpec(in NamespaceSpec, out *NamespaceSpec, c *convers return nil } -func deepCopy_api_NamespaceStatus(in NamespaceStatus, out *NamespaceStatus, c *conversion.Cloner) error { +func DeepCopy_api_NamespaceStatus(in NamespaceStatus, out *NamespaceStatus, c *conversion.Cloner) error { out.Phase = in.Phase return nil } -func deepCopy_api_Node(in Node, out *Node, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_Node(in Node, out *Node, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { return err } - if err := deepCopy_api_NodeSpec(in.Spec, &out.Spec, c); err != nil { + if err := DeepCopy_api_NodeSpec(in.Spec, &out.Spec, c); err != nil { return err } - if err := deepCopy_api_NodeStatus(in.Status, &out.Status, c); err != nil { + if err := DeepCopy_api_NodeStatus(in.Status, &out.Status, c); err != nil { return err } return nil } -func deepCopy_api_NodeAddress(in NodeAddress, out *NodeAddress, c *conversion.Cloner) error { +func DeepCopy_api_NodeAddress(in NodeAddress, out *NodeAddress, c *conversion.Cloner) error { out.Type = in.Type out.Address = in.Address return nil } -func deepCopy_api_NodeCondition(in NodeCondition, out *NodeCondition, c *conversion.Cloner) error { +func DeepCopy_api_NodeCondition(in NodeCondition, out *NodeCondition, c *conversion.Cloner) error { out.Type = in.Type out.Status = in.Status if newVal, err := c.DeepCopy(in.LastHeartbeatTime); err != nil { @@ -1279,25 +1278,25 @@ func deepCopy_api_NodeCondition(in NodeCondition, out *NodeCondition, c *convers return nil } -func deepCopy_api_NodeDaemonEndpoints(in NodeDaemonEndpoints, out *NodeDaemonEndpoints, c *conversion.Cloner) error { - if err := deepCopy_api_DaemonEndpoint(in.KubeletEndpoint, &out.KubeletEndpoint, c); err != nil { +func DeepCopy_api_NodeDaemonEndpoints(in NodeDaemonEndpoints, out *NodeDaemonEndpoints, c *conversion.Cloner) error { + if err := DeepCopy_api_DaemonEndpoint(in.KubeletEndpoint, &out.KubeletEndpoint, c); err != nil { return err } return nil } -func deepCopy_api_NodeList(in NodeList, out *NodeList, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_NodeList(in NodeList, out *NodeList, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { + if err := DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { return err } if in.Items != nil { in, out := in.Items, &out.Items *out = make([]Node, len(in)) for i := range in { - if err := deepCopy_api_Node(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_Node(in[i], &(*out)[i], c); err != nil { return err } } @@ -1307,7 +1306,7 @@ func deepCopy_api_NodeList(in NodeList, out *NodeList, c *conversion.Cloner) err return nil } -func deepCopy_api_NodeResources(in NodeResources, out *NodeResources, c *conversion.Cloner) error { +func DeepCopy_api_NodeResources(in NodeResources, out *NodeResources, c *conversion.Cloner) error { if in.Capacity != nil { in, out := in.Capacity, &out.Capacity *out = make(ResourceList) @@ -1324,7 +1323,7 @@ func deepCopy_api_NodeResources(in NodeResources, out *NodeResources, c *convers return nil } -func deepCopy_api_NodeSpec(in NodeSpec, out *NodeSpec, c *conversion.Cloner) error { +func DeepCopy_api_NodeSpec(in NodeSpec, out *NodeSpec, c *conversion.Cloner) error { out.PodCIDR = in.PodCIDR out.ExternalID = in.ExternalID out.ProviderID = in.ProviderID @@ -1332,7 +1331,7 @@ func deepCopy_api_NodeSpec(in NodeSpec, out *NodeSpec, c *conversion.Cloner) err return nil } -func deepCopy_api_NodeStatus(in NodeStatus, out *NodeStatus, c *conversion.Cloner) error { +func DeepCopy_api_NodeStatus(in NodeStatus, out *NodeStatus, c *conversion.Cloner) error { if in.Capacity != nil { in, out := in.Capacity, &out.Capacity *out = make(ResourceList) @@ -1364,7 +1363,7 @@ func deepCopy_api_NodeStatus(in NodeStatus, out *NodeStatus, c *conversion.Clone in, out := in.Conditions, &out.Conditions *out = make([]NodeCondition, len(in)) for i := range in { - if err := deepCopy_api_NodeCondition(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_NodeCondition(in[i], &(*out)[i], c); err != nil { return err } } @@ -1375,24 +1374,24 @@ func deepCopy_api_NodeStatus(in NodeStatus, out *NodeStatus, c *conversion.Clone in, out := in.Addresses, &out.Addresses *out = make([]NodeAddress, len(in)) for i := range in { - if err := deepCopy_api_NodeAddress(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_NodeAddress(in[i], &(*out)[i], c); err != nil { return err } } } else { out.Addresses = nil } - if err := deepCopy_api_NodeDaemonEndpoints(in.DaemonEndpoints, &out.DaemonEndpoints, c); err != nil { + if err := DeepCopy_api_NodeDaemonEndpoints(in.DaemonEndpoints, &out.DaemonEndpoints, c); err != nil { return err } - if err := deepCopy_api_NodeSystemInfo(in.NodeInfo, &out.NodeInfo, c); err != nil { + if err := DeepCopy_api_NodeSystemInfo(in.NodeInfo, &out.NodeInfo, c); err != nil { return err } if in.Images != nil { in, out := in.Images, &out.Images *out = make([]ContainerImage, len(in)) for i := range in { - if err := deepCopy_api_ContainerImage(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_ContainerImage(in[i], &(*out)[i], c); err != nil { return err } } @@ -1402,7 +1401,7 @@ func deepCopy_api_NodeStatus(in NodeStatus, out *NodeStatus, c *conversion.Clone return nil } -func deepCopy_api_NodeSystemInfo(in NodeSystemInfo, out *NodeSystemInfo, c *conversion.Cloner) error { +func DeepCopy_api_NodeSystemInfo(in NodeSystemInfo, out *NodeSystemInfo, c *conversion.Cloner) error { out.MachineID = in.MachineID out.SystemUUID = in.SystemUUID out.BootID = in.BootID @@ -1414,13 +1413,13 @@ func deepCopy_api_NodeSystemInfo(in NodeSystemInfo, out *NodeSystemInfo, c *conv return nil } -func deepCopy_api_ObjectFieldSelector(in ObjectFieldSelector, out *ObjectFieldSelector, c *conversion.Cloner) error { +func DeepCopy_api_ObjectFieldSelector(in ObjectFieldSelector, out *ObjectFieldSelector, c *conversion.Cloner) error { out.APIVersion = in.APIVersion out.FieldPath = in.FieldPath return nil } -func deepCopy_api_ObjectMeta(in ObjectMeta, out *ObjectMeta, c *conversion.Cloner) error { +func DeepCopy_api_ObjectMeta(in ObjectMeta, out *ObjectMeta, c *conversion.Cloner) error { out.Name = in.Name out.GenerateName = in.GenerateName out.Namespace = in.Namespace @@ -1472,7 +1471,7 @@ func deepCopy_api_ObjectMeta(in ObjectMeta, out *ObjectMeta, c *conversion.Clone return nil } -func deepCopy_api_ObjectReference(in ObjectReference, out *ObjectReference, c *conversion.Cloner) error { +func DeepCopy_api_ObjectReference(in ObjectReference, out *ObjectReference, c *conversion.Cloner) error { out.Kind = in.Kind out.Namespace = in.Namespace out.Name = in.Name @@ -1483,50 +1482,50 @@ func deepCopy_api_ObjectReference(in ObjectReference, out *ObjectReference, c *c return nil } -func deepCopy_api_PersistentVolume(in PersistentVolume, out *PersistentVolume, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_PersistentVolume(in PersistentVolume, out *PersistentVolume, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { return err } - if err := deepCopy_api_PersistentVolumeSpec(in.Spec, &out.Spec, c); err != nil { + if err := DeepCopy_api_PersistentVolumeSpec(in.Spec, &out.Spec, c); err != nil { return err } - if err := deepCopy_api_PersistentVolumeStatus(in.Status, &out.Status, c); err != nil { + if err := DeepCopy_api_PersistentVolumeStatus(in.Status, &out.Status, c); err != nil { return err } return nil } -func deepCopy_api_PersistentVolumeClaim(in PersistentVolumeClaim, out *PersistentVolumeClaim, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_PersistentVolumeClaim(in PersistentVolumeClaim, out *PersistentVolumeClaim, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { return err } - if err := deepCopy_api_PersistentVolumeClaimSpec(in.Spec, &out.Spec, c); err != nil { + if err := DeepCopy_api_PersistentVolumeClaimSpec(in.Spec, &out.Spec, c); err != nil { return err } - if err := deepCopy_api_PersistentVolumeClaimStatus(in.Status, &out.Status, c); err != nil { + if err := DeepCopy_api_PersistentVolumeClaimStatus(in.Status, &out.Status, c); err != nil { return err } return nil } -func deepCopy_api_PersistentVolumeClaimList(in PersistentVolumeClaimList, out *PersistentVolumeClaimList, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_PersistentVolumeClaimList(in PersistentVolumeClaimList, out *PersistentVolumeClaimList, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { + if err := DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { return err } if in.Items != nil { in, out := in.Items, &out.Items *out = make([]PersistentVolumeClaim, len(in)) for i := range in { - if err := deepCopy_api_PersistentVolumeClaim(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_PersistentVolumeClaim(in[i], &(*out)[i], c); err != nil { return err } } @@ -1536,7 +1535,7 @@ func deepCopy_api_PersistentVolumeClaimList(in PersistentVolumeClaimList, out *P return nil } -func deepCopy_api_PersistentVolumeClaimSpec(in PersistentVolumeClaimSpec, out *PersistentVolumeClaimSpec, c *conversion.Cloner) error { +func DeepCopy_api_PersistentVolumeClaimSpec(in PersistentVolumeClaimSpec, out *PersistentVolumeClaimSpec, c *conversion.Cloner) error { if in.AccessModes != nil { in, out := in.AccessModes, &out.AccessModes *out = make([]PersistentVolumeAccessMode, len(in)) @@ -1546,14 +1545,14 @@ func deepCopy_api_PersistentVolumeClaimSpec(in PersistentVolumeClaimSpec, out *P } else { out.AccessModes = nil } - if err := deepCopy_api_ResourceRequirements(in.Resources, &out.Resources, c); err != nil { + if err := DeepCopy_api_ResourceRequirements(in.Resources, &out.Resources, c); err != nil { return err } out.VolumeName = in.VolumeName return nil } -func deepCopy_api_PersistentVolumeClaimStatus(in PersistentVolumeClaimStatus, out *PersistentVolumeClaimStatus, c *conversion.Cloner) error { +func DeepCopy_api_PersistentVolumeClaimStatus(in PersistentVolumeClaimStatus, out *PersistentVolumeClaimStatus, c *conversion.Cloner) error { out.Phase = in.Phase if in.AccessModes != nil { in, out := in.AccessModes, &out.AccessModes @@ -1580,24 +1579,24 @@ func deepCopy_api_PersistentVolumeClaimStatus(in PersistentVolumeClaimStatus, ou return nil } -func deepCopy_api_PersistentVolumeClaimVolumeSource(in PersistentVolumeClaimVolumeSource, out *PersistentVolumeClaimVolumeSource, c *conversion.Cloner) error { +func DeepCopy_api_PersistentVolumeClaimVolumeSource(in PersistentVolumeClaimVolumeSource, out *PersistentVolumeClaimVolumeSource, c *conversion.Cloner) error { out.ClaimName = in.ClaimName out.ReadOnly = in.ReadOnly return nil } -func deepCopy_api_PersistentVolumeList(in PersistentVolumeList, out *PersistentVolumeList, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_PersistentVolumeList(in PersistentVolumeList, out *PersistentVolumeList, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { + if err := DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { return err } if in.Items != nil { in, out := in.Items, &out.Items *out = make([]PersistentVolume, len(in)) for i := range in { - if err := deepCopy_api_PersistentVolume(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_PersistentVolume(in[i], &(*out)[i], c); err != nil { return err } } @@ -1607,11 +1606,11 @@ func deepCopy_api_PersistentVolumeList(in PersistentVolumeList, out *PersistentV return nil } -func deepCopy_api_PersistentVolumeSource(in PersistentVolumeSource, out *PersistentVolumeSource, c *conversion.Cloner) error { +func DeepCopy_api_PersistentVolumeSource(in PersistentVolumeSource, out *PersistentVolumeSource, c *conversion.Cloner) error { if in.GCEPersistentDisk != nil { in, out := in.GCEPersistentDisk, &out.GCEPersistentDisk *out = new(GCEPersistentDiskVolumeSource) - if err := deepCopy_api_GCEPersistentDiskVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_GCEPersistentDiskVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -1620,7 +1619,7 @@ func deepCopy_api_PersistentVolumeSource(in PersistentVolumeSource, out *Persist if in.AWSElasticBlockStore != nil { in, out := in.AWSElasticBlockStore, &out.AWSElasticBlockStore *out = new(AWSElasticBlockStoreVolumeSource) - if err := deepCopy_api_AWSElasticBlockStoreVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_AWSElasticBlockStoreVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -1629,7 +1628,7 @@ func deepCopy_api_PersistentVolumeSource(in PersistentVolumeSource, out *Persist if in.HostPath != nil { in, out := in.HostPath, &out.HostPath *out = new(HostPathVolumeSource) - if err := deepCopy_api_HostPathVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_HostPathVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -1638,7 +1637,7 @@ func deepCopy_api_PersistentVolumeSource(in PersistentVolumeSource, out *Persist if in.Glusterfs != nil { in, out := in.Glusterfs, &out.Glusterfs *out = new(GlusterfsVolumeSource) - if err := deepCopy_api_GlusterfsVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_GlusterfsVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -1647,7 +1646,7 @@ func deepCopy_api_PersistentVolumeSource(in PersistentVolumeSource, out *Persist if in.NFS != nil { in, out := in.NFS, &out.NFS *out = new(NFSVolumeSource) - if err := deepCopy_api_NFSVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_NFSVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -1656,7 +1655,7 @@ func deepCopy_api_PersistentVolumeSource(in PersistentVolumeSource, out *Persist if in.RBD != nil { in, out := in.RBD, &out.RBD *out = new(RBDVolumeSource) - if err := deepCopy_api_RBDVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_RBDVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -1665,7 +1664,7 @@ func deepCopy_api_PersistentVolumeSource(in PersistentVolumeSource, out *Persist if in.ISCSI != nil { in, out := in.ISCSI, &out.ISCSI *out = new(ISCSIVolumeSource) - if err := deepCopy_api_ISCSIVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_ISCSIVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -1674,7 +1673,7 @@ func deepCopy_api_PersistentVolumeSource(in PersistentVolumeSource, out *Persist if in.FlexVolume != nil { in, out := in.FlexVolume, &out.FlexVolume *out = new(FlexVolumeSource) - if err := deepCopy_api_FlexVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_FlexVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -1683,7 +1682,7 @@ func deepCopy_api_PersistentVolumeSource(in PersistentVolumeSource, out *Persist if in.Cinder != nil { in, out := in.Cinder, &out.Cinder *out = new(CinderVolumeSource) - if err := deepCopy_api_CinderVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_CinderVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -1692,7 +1691,7 @@ func deepCopy_api_PersistentVolumeSource(in PersistentVolumeSource, out *Persist if in.CephFS != nil { in, out := in.CephFS, &out.CephFS *out = new(CephFSVolumeSource) - if err := deepCopy_api_CephFSVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_CephFSVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -1701,7 +1700,7 @@ func deepCopy_api_PersistentVolumeSource(in PersistentVolumeSource, out *Persist if in.FC != nil { in, out := in.FC, &out.FC *out = new(FCVolumeSource) - if err := deepCopy_api_FCVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_FCVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -1710,7 +1709,7 @@ func deepCopy_api_PersistentVolumeSource(in PersistentVolumeSource, out *Persist if in.Flocker != nil { in, out := in.Flocker, &out.Flocker *out = new(FlockerVolumeSource) - if err := deepCopy_api_FlockerVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_FlockerVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -1719,7 +1718,7 @@ func deepCopy_api_PersistentVolumeSource(in PersistentVolumeSource, out *Persist return nil } -func deepCopy_api_PersistentVolumeSpec(in PersistentVolumeSpec, out *PersistentVolumeSpec, c *conversion.Cloner) error { +func DeepCopy_api_PersistentVolumeSpec(in PersistentVolumeSpec, out *PersistentVolumeSpec, c *conversion.Cloner) error { if in.Capacity != nil { in, out := in.Capacity, &out.Capacity *out = make(ResourceList) @@ -1733,7 +1732,7 @@ func deepCopy_api_PersistentVolumeSpec(in PersistentVolumeSpec, out *PersistentV } else { out.Capacity = nil } - if err := deepCopy_api_PersistentVolumeSource(in.PersistentVolumeSource, &out.PersistentVolumeSource, c); err != nil { + if err := DeepCopy_api_PersistentVolumeSource(in.PersistentVolumeSource, &out.PersistentVolumeSource, c); err != nil { return err } if in.AccessModes != nil { @@ -1748,7 +1747,7 @@ func deepCopy_api_PersistentVolumeSpec(in PersistentVolumeSpec, out *PersistentV if in.ClaimRef != nil { in, out := in.ClaimRef, &out.ClaimRef *out = new(ObjectReference) - if err := deepCopy_api_ObjectReference(*in, *out, c); err != nil { + if err := DeepCopy_api_ObjectReference(*in, *out, c); err != nil { return err } } else { @@ -1758,31 +1757,31 @@ func deepCopy_api_PersistentVolumeSpec(in PersistentVolumeSpec, out *PersistentV return nil } -func deepCopy_api_PersistentVolumeStatus(in PersistentVolumeStatus, out *PersistentVolumeStatus, c *conversion.Cloner) error { +func DeepCopy_api_PersistentVolumeStatus(in PersistentVolumeStatus, out *PersistentVolumeStatus, c *conversion.Cloner) error { out.Phase = in.Phase out.Message = in.Message out.Reason = in.Reason return nil } -func deepCopy_api_Pod(in Pod, out *Pod, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_Pod(in Pod, out *Pod, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { return err } - if err := deepCopy_api_PodSpec(in.Spec, &out.Spec, c); err != nil { + if err := DeepCopy_api_PodSpec(in.Spec, &out.Spec, c); err != nil { return err } - if err := deepCopy_api_PodStatus(in.Status, &out.Status, c); err != nil { + if err := DeepCopy_api_PodStatus(in.Status, &out.Status, c); err != nil { return err } return nil } -func deepCopy_api_PodAttachOptions(in PodAttachOptions, out *PodAttachOptions, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_PodAttachOptions(in PodAttachOptions, out *PodAttachOptions, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } out.Stdin = in.Stdin @@ -1793,7 +1792,7 @@ func deepCopy_api_PodAttachOptions(in PodAttachOptions, out *PodAttachOptions, c return nil } -func deepCopy_api_PodCondition(in PodCondition, out *PodCondition, c *conversion.Cloner) error { +func DeepCopy_api_PodCondition(in PodCondition, out *PodCondition, c *conversion.Cloner) error { out.Type = in.Type out.Status = in.Status if newVal, err := c.DeepCopy(in.LastProbeTime); err != nil { @@ -1811,8 +1810,8 @@ func deepCopy_api_PodCondition(in PodCondition, out *PodCondition, c *conversion return nil } -func deepCopy_api_PodExecOptions(in PodExecOptions, out *PodExecOptions, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_PodExecOptions(in PodExecOptions, out *PodExecOptions, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } out.Stdin = in.Stdin @@ -1830,18 +1829,18 @@ func deepCopy_api_PodExecOptions(in PodExecOptions, out *PodExecOptions, c *conv return nil } -func deepCopy_api_PodList(in PodList, out *PodList, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_PodList(in PodList, out *PodList, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { + if err := DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { return err } if in.Items != nil { in, out := in.Items, &out.Items *out = make([]Pod, len(in)) for i := range in { - if err := deepCopy_api_Pod(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_Pod(in[i], &(*out)[i], c); err != nil { return err } } @@ -1851,8 +1850,8 @@ func deepCopy_api_PodList(in PodList, out *PodList, c *conversion.Cloner) error return nil } -func deepCopy_api_PodLogOptions(in PodLogOptions, out *PodLogOptions, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_PodLogOptions(in PodLogOptions, out *PodLogOptions, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } out.Container = in.Container @@ -1894,22 +1893,22 @@ func deepCopy_api_PodLogOptions(in PodLogOptions, out *PodLogOptions, c *convers return nil } -func deepCopy_api_PodProxyOptions(in PodProxyOptions, out *PodProxyOptions, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_PodProxyOptions(in PodProxyOptions, out *PodProxyOptions, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } out.Path = in.Path return nil } -func deepCopy_api_PodSecurityContext(in PodSecurityContext, out *PodSecurityContext, c *conversion.Cloner) error { +func DeepCopy_api_PodSecurityContext(in PodSecurityContext, out *PodSecurityContext, c *conversion.Cloner) error { out.HostNetwork = in.HostNetwork out.HostPID = in.HostPID out.HostIPC = in.HostIPC if in.SELinuxOptions != nil { in, out := in.SELinuxOptions, &out.SELinuxOptions *out = new(SELinuxOptions) - if err := deepCopy_api_SELinuxOptions(*in, *out, c); err != nil { + if err := DeepCopy_api_SELinuxOptions(*in, *out, c); err != nil { return err } } else { @@ -1946,12 +1945,12 @@ func deepCopy_api_PodSecurityContext(in PodSecurityContext, out *PodSecurityCont return nil } -func deepCopy_api_PodSpec(in PodSpec, out *PodSpec, c *conversion.Cloner) error { +func DeepCopy_api_PodSpec(in PodSpec, out *PodSpec, c *conversion.Cloner) error { if in.Volumes != nil { in, out := in.Volumes, &out.Volumes *out = make([]Volume, len(in)) for i := range in { - if err := deepCopy_api_Volume(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_Volume(in[i], &(*out)[i], c); err != nil { return err } } @@ -1962,7 +1961,7 @@ func deepCopy_api_PodSpec(in PodSpec, out *PodSpec, c *conversion.Cloner) error in, out := in.Containers, &out.Containers *out = make([]Container, len(in)) for i := range in { - if err := deepCopy_api_Container(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_Container(in[i], &(*out)[i], c); err != nil { return err } } @@ -1999,7 +1998,7 @@ func deepCopy_api_PodSpec(in PodSpec, out *PodSpec, c *conversion.Cloner) error if in.SecurityContext != nil { in, out := in.SecurityContext, &out.SecurityContext *out = new(PodSecurityContext) - if err := deepCopy_api_PodSecurityContext(*in, *out, c); err != nil { + if err := DeepCopy_api_PodSecurityContext(*in, *out, c); err != nil { return err } } else { @@ -2009,7 +2008,7 @@ func deepCopy_api_PodSpec(in PodSpec, out *PodSpec, c *conversion.Cloner) error in, out := in.ImagePullSecrets, &out.ImagePullSecrets *out = make([]LocalObjectReference, len(in)) for i := range in { - if err := deepCopy_api_LocalObjectReference(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_LocalObjectReference(in[i], &(*out)[i], c); err != nil { return err } } @@ -2019,13 +2018,13 @@ func deepCopy_api_PodSpec(in PodSpec, out *PodSpec, c *conversion.Cloner) error return nil } -func deepCopy_api_PodStatus(in PodStatus, out *PodStatus, c *conversion.Cloner) error { +func DeepCopy_api_PodStatus(in PodStatus, out *PodStatus, c *conversion.Cloner) error { out.Phase = in.Phase if in.Conditions != nil { in, out := in.Conditions, &out.Conditions *out = make([]PodCondition, len(in)) for i := range in { - if err := deepCopy_api_PodCondition(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_PodCondition(in[i], &(*out)[i], c); err != nil { return err } } @@ -2051,7 +2050,7 @@ func deepCopy_api_PodStatus(in PodStatus, out *PodStatus, c *conversion.Cloner) in, out := in.ContainerStatuses, &out.ContainerStatuses *out = make([]ContainerStatus, len(in)) for i := range in { - if err := deepCopy_api_ContainerStatus(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_ContainerStatus(in[i], &(*out)[i], c); err != nil { return err } } @@ -2061,44 +2060,44 @@ func deepCopy_api_PodStatus(in PodStatus, out *PodStatus, c *conversion.Cloner) return nil } -func deepCopy_api_PodStatusResult(in PodStatusResult, out *PodStatusResult, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_PodStatusResult(in PodStatusResult, out *PodStatusResult, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { return err } - if err := deepCopy_api_PodStatus(in.Status, &out.Status, c); err != nil { + if err := DeepCopy_api_PodStatus(in.Status, &out.Status, c); err != nil { return err } return nil } -func deepCopy_api_PodTemplate(in PodTemplate, out *PodTemplate, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_PodTemplate(in PodTemplate, out *PodTemplate, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { return err } - if err := deepCopy_api_PodTemplateSpec(in.Template, &out.Template, c); err != nil { + if err := DeepCopy_api_PodTemplateSpec(in.Template, &out.Template, c); err != nil { return err } return nil } -func deepCopy_api_PodTemplateList(in PodTemplateList, out *PodTemplateList, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_PodTemplateList(in PodTemplateList, out *PodTemplateList, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { + if err := DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { return err } if in.Items != nil { in, out := in.Items, &out.Items *out = make([]PodTemplate, len(in)) for i := range in { - if err := deepCopy_api_PodTemplate(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_PodTemplate(in[i], &(*out)[i], c); err != nil { return err } } @@ -2108,18 +2107,18 @@ func deepCopy_api_PodTemplateList(in PodTemplateList, out *PodTemplateList, c *c return nil } -func deepCopy_api_PodTemplateSpec(in PodTemplateSpec, out *PodTemplateSpec, c *conversion.Cloner) error { - if err := deepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { +func DeepCopy_api_PodTemplateSpec(in PodTemplateSpec, out *PodTemplateSpec, c *conversion.Cloner) error { + if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { return err } - if err := deepCopy_api_PodSpec(in.Spec, &out.Spec, c); err != nil { + if err := DeepCopy_api_PodSpec(in.Spec, &out.Spec, c); err != nil { return err } return nil } -func deepCopy_api_Probe(in Probe, out *Probe, c *conversion.Cloner) error { - if err := deepCopy_api_Handler(in.Handler, &out.Handler, c); err != nil { +func DeepCopy_api_Probe(in Probe, out *Probe, c *conversion.Cloner) error { + if err := DeepCopy_api_Handler(in.Handler, &out.Handler, c); err != nil { return err } out.InitialDelaySeconds = in.InitialDelaySeconds @@ -2130,7 +2129,7 @@ func deepCopy_api_Probe(in Probe, out *Probe, c *conversion.Cloner) error { return nil } -func deepCopy_api_RBDVolumeSource(in RBDVolumeSource, out *RBDVolumeSource, c *conversion.Cloner) error { +func DeepCopy_api_RBDVolumeSource(in RBDVolumeSource, out *RBDVolumeSource, c *conversion.Cloner) error { if in.CephMonitors != nil { in, out := in.CephMonitors, &out.CephMonitors *out = make([]string, len(in)) @@ -2146,7 +2145,7 @@ func deepCopy_api_RBDVolumeSource(in RBDVolumeSource, out *RBDVolumeSource, c *c if in.SecretRef != nil { in, out := in.SecretRef, &out.SecretRef *out = new(LocalObjectReference) - if err := deepCopy_api_LocalObjectReference(*in, *out, c); err != nil { + if err := DeepCopy_api_LocalObjectReference(*in, *out, c); err != nil { return err } } else { @@ -2156,11 +2155,11 @@ func deepCopy_api_RBDVolumeSource(in RBDVolumeSource, out *RBDVolumeSource, c *c return nil } -func deepCopy_api_RangeAllocation(in RangeAllocation, out *RangeAllocation, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_RangeAllocation(in RangeAllocation, out *RangeAllocation, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { return err } out.Range = in.Range @@ -2174,34 +2173,34 @@ func deepCopy_api_RangeAllocation(in RangeAllocation, out *RangeAllocation, c *c return nil } -func deepCopy_api_ReplicationController(in ReplicationController, out *ReplicationController, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_ReplicationController(in ReplicationController, out *ReplicationController, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { return err } - if err := deepCopy_api_ReplicationControllerSpec(in.Spec, &out.Spec, c); err != nil { + if err := DeepCopy_api_ReplicationControllerSpec(in.Spec, &out.Spec, c); err != nil { return err } - if err := deepCopy_api_ReplicationControllerStatus(in.Status, &out.Status, c); err != nil { + if err := DeepCopy_api_ReplicationControllerStatus(in.Status, &out.Status, c); err != nil { return err } return nil } -func deepCopy_api_ReplicationControllerList(in ReplicationControllerList, out *ReplicationControllerList, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_ReplicationControllerList(in ReplicationControllerList, out *ReplicationControllerList, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { + if err := DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { return err } if in.Items != nil { in, out := in.Items, &out.Items *out = make([]ReplicationController, len(in)) for i := range in { - if err := deepCopy_api_ReplicationController(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_ReplicationController(in[i], &(*out)[i], c); err != nil { return err } } @@ -2211,7 +2210,7 @@ func deepCopy_api_ReplicationControllerList(in ReplicationControllerList, out *R return nil } -func deepCopy_api_ReplicationControllerSpec(in ReplicationControllerSpec, out *ReplicationControllerSpec, c *conversion.Cloner) error { +func DeepCopy_api_ReplicationControllerSpec(in ReplicationControllerSpec, out *ReplicationControllerSpec, c *conversion.Cloner) error { out.Replicas = in.Replicas if in.Selector != nil { in, out := in.Selector, &out.Selector @@ -2225,7 +2224,7 @@ func deepCopy_api_ReplicationControllerSpec(in ReplicationControllerSpec, out *R if in.Template != nil { in, out := in.Template, &out.Template *out = new(PodTemplateSpec) - if err := deepCopy_api_PodTemplateSpec(*in, *out, c); err != nil { + if err := DeepCopy_api_PodTemplateSpec(*in, *out, c); err != nil { return err } } else { @@ -2234,40 +2233,40 @@ func deepCopy_api_ReplicationControllerSpec(in ReplicationControllerSpec, out *R return nil } -func deepCopy_api_ReplicationControllerStatus(in ReplicationControllerStatus, out *ReplicationControllerStatus, c *conversion.Cloner) error { +func DeepCopy_api_ReplicationControllerStatus(in ReplicationControllerStatus, out *ReplicationControllerStatus, c *conversion.Cloner) error { out.Replicas = in.Replicas out.ObservedGeneration = in.ObservedGeneration return nil } -func deepCopy_api_ResourceQuota(in ResourceQuota, out *ResourceQuota, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_ResourceQuota(in ResourceQuota, out *ResourceQuota, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { return err } - if err := deepCopy_api_ResourceQuotaSpec(in.Spec, &out.Spec, c); err != nil { + if err := DeepCopy_api_ResourceQuotaSpec(in.Spec, &out.Spec, c); err != nil { return err } - if err := deepCopy_api_ResourceQuotaStatus(in.Status, &out.Status, c); err != nil { + if err := DeepCopy_api_ResourceQuotaStatus(in.Status, &out.Status, c); err != nil { return err } return nil } -func deepCopy_api_ResourceQuotaList(in ResourceQuotaList, out *ResourceQuotaList, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_ResourceQuotaList(in ResourceQuotaList, out *ResourceQuotaList, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { + if err := DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { return err } if in.Items != nil { in, out := in.Items, &out.Items *out = make([]ResourceQuota, len(in)) for i := range in { - if err := deepCopy_api_ResourceQuota(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_ResourceQuota(in[i], &(*out)[i], c); err != nil { return err } } @@ -2277,7 +2276,7 @@ func deepCopy_api_ResourceQuotaList(in ResourceQuotaList, out *ResourceQuotaList return nil } -func deepCopy_api_ResourceQuotaSpec(in ResourceQuotaSpec, out *ResourceQuotaSpec, c *conversion.Cloner) error { +func DeepCopy_api_ResourceQuotaSpec(in ResourceQuotaSpec, out *ResourceQuotaSpec, c *conversion.Cloner) error { if in.Hard != nil { in, out := in.Hard, &out.Hard *out = make(ResourceList) @@ -2294,7 +2293,7 @@ func deepCopy_api_ResourceQuotaSpec(in ResourceQuotaSpec, out *ResourceQuotaSpec return nil } -func deepCopy_api_ResourceQuotaStatus(in ResourceQuotaStatus, out *ResourceQuotaStatus, c *conversion.Cloner) error { +func DeepCopy_api_ResourceQuotaStatus(in ResourceQuotaStatus, out *ResourceQuotaStatus, c *conversion.Cloner) error { if in.Hard != nil { in, out := in.Hard, &out.Hard *out = make(ResourceList) @@ -2324,7 +2323,7 @@ func deepCopy_api_ResourceQuotaStatus(in ResourceQuotaStatus, out *ResourceQuota return nil } -func deepCopy_api_ResourceRequirements(in ResourceRequirements, out *ResourceRequirements, c *conversion.Cloner) error { +func DeepCopy_api_ResourceRequirements(in ResourceRequirements, out *ResourceRequirements, c *conversion.Cloner) error { if in.Limits != nil { in, out := in.Limits, &out.Limits *out = make(ResourceList) @@ -2354,7 +2353,7 @@ func deepCopy_api_ResourceRequirements(in ResourceRequirements, out *ResourceReq return nil } -func deepCopy_api_SELinuxOptions(in SELinuxOptions, out *SELinuxOptions, c *conversion.Cloner) error { +func DeepCopy_api_SELinuxOptions(in SELinuxOptions, out *SELinuxOptions, c *conversion.Cloner) error { out.User = in.User out.Role = in.Role out.Type = in.Type @@ -2362,11 +2361,11 @@ func deepCopy_api_SELinuxOptions(in SELinuxOptions, out *SELinuxOptions, c *conv return nil } -func deepCopy_api_Secret(in Secret, out *Secret, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_Secret(in Secret, out *Secret, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { return err } if in.Data != nil { @@ -2386,26 +2385,26 @@ func deepCopy_api_Secret(in Secret, out *Secret, c *conversion.Cloner) error { return nil } -func deepCopy_api_SecretKeySelector(in SecretKeySelector, out *SecretKeySelector, c *conversion.Cloner) error { - if err := deepCopy_api_LocalObjectReference(in.LocalObjectReference, &out.LocalObjectReference, c); err != nil { +func DeepCopy_api_SecretKeySelector(in SecretKeySelector, out *SecretKeySelector, c *conversion.Cloner) error { + if err := DeepCopy_api_LocalObjectReference(in.LocalObjectReference, &out.LocalObjectReference, c); err != nil { return err } out.Key = in.Key return nil } -func deepCopy_api_SecretList(in SecretList, out *SecretList, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_SecretList(in SecretList, out *SecretList, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { + if err := DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { return err } if in.Items != nil { in, out := in.Items, &out.Items *out = make([]Secret, len(in)) for i := range in { - if err := deepCopy_api_Secret(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_Secret(in[i], &(*out)[i], c); err != nil { return err } } @@ -2415,16 +2414,16 @@ func deepCopy_api_SecretList(in SecretList, out *SecretList, c *conversion.Clone return nil } -func deepCopy_api_SecretVolumeSource(in SecretVolumeSource, out *SecretVolumeSource, c *conversion.Cloner) error { +func DeepCopy_api_SecretVolumeSource(in SecretVolumeSource, out *SecretVolumeSource, c *conversion.Cloner) error { out.SecretName = in.SecretName return nil } -func deepCopy_api_SecurityContext(in SecurityContext, out *SecurityContext, c *conversion.Cloner) error { +func DeepCopy_api_SecurityContext(in SecurityContext, out *SecurityContext, c *conversion.Cloner) error { if in.Capabilities != nil { in, out := in.Capabilities, &out.Capabilities *out = new(Capabilities) - if err := deepCopy_api_Capabilities(*in, *out, c); err != nil { + if err := DeepCopy_api_Capabilities(*in, *out, c); err != nil { return err } } else { @@ -2440,7 +2439,7 @@ func deepCopy_api_SecurityContext(in SecurityContext, out *SecurityContext, c *c if in.SELinuxOptions != nil { in, out := in.SELinuxOptions, &out.SELinuxOptions *out = new(SELinuxOptions) - if err := deepCopy_api_SELinuxOptions(*in, *out, c); err != nil { + if err := DeepCopy_api_SELinuxOptions(*in, *out, c); err != nil { return err } } else { @@ -2463,44 +2462,44 @@ func deepCopy_api_SecurityContext(in SecurityContext, out *SecurityContext, c *c return nil } -func deepCopy_api_SerializedReference(in SerializedReference, out *SerializedReference, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_SerializedReference(in SerializedReference, out *SerializedReference, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_api_ObjectReference(in.Reference, &out.Reference, c); err != nil { + if err := DeepCopy_api_ObjectReference(in.Reference, &out.Reference, c); err != nil { return err } return nil } -func deepCopy_api_Service(in Service, out *Service, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_Service(in Service, out *Service, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { return err } - if err := deepCopy_api_ServiceSpec(in.Spec, &out.Spec, c); err != nil { + if err := DeepCopy_api_ServiceSpec(in.Spec, &out.Spec, c); err != nil { return err } - if err := deepCopy_api_ServiceStatus(in.Status, &out.Status, c); err != nil { + if err := DeepCopy_api_ServiceStatus(in.Status, &out.Status, c); err != nil { return err } return nil } -func deepCopy_api_ServiceAccount(in ServiceAccount, out *ServiceAccount, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_ServiceAccount(in ServiceAccount, out *ServiceAccount, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { return err } if in.Secrets != nil { in, out := in.Secrets, &out.Secrets *out = make([]ObjectReference, len(in)) for i := range in { - if err := deepCopy_api_ObjectReference(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_ObjectReference(in[i], &(*out)[i], c); err != nil { return err } } @@ -2511,7 +2510,7 @@ func deepCopy_api_ServiceAccount(in ServiceAccount, out *ServiceAccount, c *conv in, out := in.ImagePullSecrets, &out.ImagePullSecrets *out = make([]LocalObjectReference, len(in)) for i := range in { - if err := deepCopy_api_LocalObjectReference(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_LocalObjectReference(in[i], &(*out)[i], c); err != nil { return err } } @@ -2521,18 +2520,18 @@ func deepCopy_api_ServiceAccount(in ServiceAccount, out *ServiceAccount, c *conv return nil } -func deepCopy_api_ServiceAccountList(in ServiceAccountList, out *ServiceAccountList, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_ServiceAccountList(in ServiceAccountList, out *ServiceAccountList, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { + if err := DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { return err } if in.Items != nil { in, out := in.Items, &out.Items *out = make([]ServiceAccount, len(in)) for i := range in { - if err := deepCopy_api_ServiceAccount(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_ServiceAccount(in[i], &(*out)[i], c); err != nil { return err } } @@ -2542,18 +2541,18 @@ func deepCopy_api_ServiceAccountList(in ServiceAccountList, out *ServiceAccountL return nil } -func deepCopy_api_ServiceList(in ServiceList, out *ServiceList, c *conversion.Cloner) error { - if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { +func DeepCopy_api_ServiceList(in ServiceList, out *ServiceList, c *conversion.Cloner) error { + if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } - if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { + if err := DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { return err } if in.Items != nil { in, out := in.Items, &out.Items *out = make([]Service, len(in)) for i := range in { - if err := deepCopy_api_Service(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_Service(in[i], &(*out)[i], c); err != nil { return err } } @@ -2563,24 +2562,24 @@ func deepCopy_api_ServiceList(in ServiceList, out *ServiceList, c *conversion.Cl return nil } -func deepCopy_api_ServicePort(in ServicePort, out *ServicePort, c *conversion.Cloner) error { +func DeepCopy_api_ServicePort(in ServicePort, out *ServicePort, c *conversion.Cloner) error { out.Name = in.Name out.Protocol = in.Protocol out.Port = in.Port - if err := deepCopy_intstr_IntOrString(in.TargetPort, &out.TargetPort, c); err != nil { + if err := DeepCopy_intstr_IntOrString(in.TargetPort, &out.TargetPort, c); err != nil { return err } out.NodePort = in.NodePort return nil } -func deepCopy_api_ServiceSpec(in ServiceSpec, out *ServiceSpec, c *conversion.Cloner) error { +func DeepCopy_api_ServiceSpec(in ServiceSpec, out *ServiceSpec, c *conversion.Cloner) error { out.Type = in.Type if in.Ports != nil { in, out := in.Ports, &out.Ports *out = make([]ServicePort, len(in)) for i := range in { - if err := deepCopy_api_ServicePort(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_api_ServicePort(in[i], &(*out)[i], c); err != nil { return err } } @@ -2609,40 +2608,40 @@ func deepCopy_api_ServiceSpec(in ServiceSpec, out *ServiceSpec, c *conversion.Cl return nil } -func deepCopy_api_ServiceStatus(in ServiceStatus, out *ServiceStatus, c *conversion.Cloner) error { - if err := deepCopy_api_LoadBalancerStatus(in.LoadBalancer, &out.LoadBalancer, c); err != nil { +func DeepCopy_api_ServiceStatus(in ServiceStatus, out *ServiceStatus, c *conversion.Cloner) error { + if err := DeepCopy_api_LoadBalancerStatus(in.LoadBalancer, &out.LoadBalancer, c); err != nil { return err } return nil } -func deepCopy_api_TCPSocketAction(in TCPSocketAction, out *TCPSocketAction, c *conversion.Cloner) error { - if err := deepCopy_intstr_IntOrString(in.Port, &out.Port, c); err != nil { +func DeepCopy_api_TCPSocketAction(in TCPSocketAction, out *TCPSocketAction, c *conversion.Cloner) error { + if err := DeepCopy_intstr_IntOrString(in.Port, &out.Port, c); err != nil { return err } return nil } -func deepCopy_api_Volume(in Volume, out *Volume, c *conversion.Cloner) error { +func DeepCopy_api_Volume(in Volume, out *Volume, c *conversion.Cloner) error { out.Name = in.Name - if err := deepCopy_api_VolumeSource(in.VolumeSource, &out.VolumeSource, c); err != nil { + if err := DeepCopy_api_VolumeSource(in.VolumeSource, &out.VolumeSource, c); err != nil { return err } return nil } -func deepCopy_api_VolumeMount(in VolumeMount, out *VolumeMount, c *conversion.Cloner) error { +func DeepCopy_api_VolumeMount(in VolumeMount, out *VolumeMount, c *conversion.Cloner) error { out.Name = in.Name out.ReadOnly = in.ReadOnly out.MountPath = in.MountPath return nil } -func deepCopy_api_VolumeSource(in VolumeSource, out *VolumeSource, c *conversion.Cloner) error { +func DeepCopy_api_VolumeSource(in VolumeSource, out *VolumeSource, c *conversion.Cloner) error { if in.HostPath != nil { in, out := in.HostPath, &out.HostPath *out = new(HostPathVolumeSource) - if err := deepCopy_api_HostPathVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_HostPathVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -2651,7 +2650,7 @@ func deepCopy_api_VolumeSource(in VolumeSource, out *VolumeSource, c *conversion if in.EmptyDir != nil { in, out := in.EmptyDir, &out.EmptyDir *out = new(EmptyDirVolumeSource) - if err := deepCopy_api_EmptyDirVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_EmptyDirVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -2660,7 +2659,7 @@ func deepCopy_api_VolumeSource(in VolumeSource, out *VolumeSource, c *conversion if in.GCEPersistentDisk != nil { in, out := in.GCEPersistentDisk, &out.GCEPersistentDisk *out = new(GCEPersistentDiskVolumeSource) - if err := deepCopy_api_GCEPersistentDiskVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_GCEPersistentDiskVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -2669,7 +2668,7 @@ func deepCopy_api_VolumeSource(in VolumeSource, out *VolumeSource, c *conversion if in.AWSElasticBlockStore != nil { in, out := in.AWSElasticBlockStore, &out.AWSElasticBlockStore *out = new(AWSElasticBlockStoreVolumeSource) - if err := deepCopy_api_AWSElasticBlockStoreVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_AWSElasticBlockStoreVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -2678,7 +2677,7 @@ func deepCopy_api_VolumeSource(in VolumeSource, out *VolumeSource, c *conversion if in.GitRepo != nil { in, out := in.GitRepo, &out.GitRepo *out = new(GitRepoVolumeSource) - if err := deepCopy_api_GitRepoVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_GitRepoVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -2687,7 +2686,7 @@ func deepCopy_api_VolumeSource(in VolumeSource, out *VolumeSource, c *conversion if in.Secret != nil { in, out := in.Secret, &out.Secret *out = new(SecretVolumeSource) - if err := deepCopy_api_SecretVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_SecretVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -2696,7 +2695,7 @@ func deepCopy_api_VolumeSource(in VolumeSource, out *VolumeSource, c *conversion if in.NFS != nil { in, out := in.NFS, &out.NFS *out = new(NFSVolumeSource) - if err := deepCopy_api_NFSVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_NFSVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -2705,7 +2704,7 @@ func deepCopy_api_VolumeSource(in VolumeSource, out *VolumeSource, c *conversion if in.ISCSI != nil { in, out := in.ISCSI, &out.ISCSI *out = new(ISCSIVolumeSource) - if err := deepCopy_api_ISCSIVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_ISCSIVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -2714,7 +2713,7 @@ func deepCopy_api_VolumeSource(in VolumeSource, out *VolumeSource, c *conversion if in.Glusterfs != nil { in, out := in.Glusterfs, &out.Glusterfs *out = new(GlusterfsVolumeSource) - if err := deepCopy_api_GlusterfsVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_GlusterfsVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -2723,7 +2722,7 @@ func deepCopy_api_VolumeSource(in VolumeSource, out *VolumeSource, c *conversion if in.PersistentVolumeClaim != nil { in, out := in.PersistentVolumeClaim, &out.PersistentVolumeClaim *out = new(PersistentVolumeClaimVolumeSource) - if err := deepCopy_api_PersistentVolumeClaimVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_PersistentVolumeClaimVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -2732,7 +2731,7 @@ func deepCopy_api_VolumeSource(in VolumeSource, out *VolumeSource, c *conversion if in.RBD != nil { in, out := in.RBD, &out.RBD *out = new(RBDVolumeSource) - if err := deepCopy_api_RBDVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_RBDVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -2741,7 +2740,7 @@ func deepCopy_api_VolumeSource(in VolumeSource, out *VolumeSource, c *conversion if in.FlexVolume != nil { in, out := in.FlexVolume, &out.FlexVolume *out = new(FlexVolumeSource) - if err := deepCopy_api_FlexVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_FlexVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -2750,7 +2749,7 @@ func deepCopy_api_VolumeSource(in VolumeSource, out *VolumeSource, c *conversion if in.Cinder != nil { in, out := in.Cinder, &out.Cinder *out = new(CinderVolumeSource) - if err := deepCopy_api_CinderVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_CinderVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -2759,7 +2758,7 @@ func deepCopy_api_VolumeSource(in VolumeSource, out *VolumeSource, c *conversion if in.CephFS != nil { in, out := in.CephFS, &out.CephFS *out = new(CephFSVolumeSource) - if err := deepCopy_api_CephFSVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_CephFSVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -2768,7 +2767,7 @@ func deepCopy_api_VolumeSource(in VolumeSource, out *VolumeSource, c *conversion if in.Flocker != nil { in, out := in.Flocker, &out.Flocker *out = new(FlockerVolumeSource) - if err := deepCopy_api_FlockerVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_FlockerVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -2777,7 +2776,7 @@ func deepCopy_api_VolumeSource(in VolumeSource, out *VolumeSource, c *conversion if in.DownwardAPI != nil { in, out := in.DownwardAPI, &out.DownwardAPI *out = new(DownwardAPIVolumeSource) - if err := deepCopy_api_DownwardAPIVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_DownwardAPIVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -2786,7 +2785,7 @@ func deepCopy_api_VolumeSource(in VolumeSource, out *VolumeSource, c *conversion if in.FC != nil { in, out := in.FC, &out.FC *out = new(FCVolumeSource) - if err := deepCopy_api_FCVolumeSource(*in, *out, c); err != nil { + if err := DeepCopy_api_FCVolumeSource(*in, *out, c); err != nil { return err } } else { @@ -2795,7 +2794,7 @@ func deepCopy_api_VolumeSource(in VolumeSource, out *VolumeSource, c *conversion return nil } -func deepCopy_conversion_Meta(in conversion.Meta, out *conversion.Meta, c *conversion.Cloner) error { +func DeepCopy_conversion_Meta(in conversion.Meta, out *conversion.Meta, c *conversion.Cloner) error { out.SrcVersion = in.SrcVersion out.DestVersion = in.DestVersion if newVal, err := c.DeepCopy(in.KeyNameMapping); err != nil { @@ -2806,72 +2805,56 @@ func deepCopy_conversion_Meta(in conversion.Meta, out *conversion.Meta, c *conve return nil } -func deepCopy_intstr_IntOrString(in intstr.IntOrString, out *intstr.IntOrString, c *conversion.Cloner) error { +func DeepCopy_intstr_IntOrString(in intstr.IntOrString, out *intstr.IntOrString, c *conversion.Cloner) error { out.Type = in.Type out.IntVal = in.IntVal out.StrVal = in.StrVal return nil } -func deepCopy_runtime_RawExtension(in runtime.RawExtension, out *runtime.RawExtension, c *conversion.Cloner) error { - if in.RawJSON != nil { - in, out := in.RawJSON, &out.RawJSON - *out = make([]byte, len(in)) - copy(*out, in) - } else { - out.RawJSON = nil - } - if newVal, err := c.DeepCopy(in.Object); err != nil { - return err - } else { - out.Object = newVal.(runtime.Object) - } +func DeepCopy_sets_Empty(in sets.Empty, out *sets.Empty, c *conversion.Cloner) error { return nil } -func deepCopy_sets_Empty(in sets.Empty, out *sets.Empty, c *conversion.Cloner) error { - return nil -} - -func deepCopy_unversioned_GroupKind(in unversioned.GroupKind, out *unversioned.GroupKind, c *conversion.Cloner) error { +func DeepCopy_unversioned_GroupKind(in unversioned.GroupKind, out *unversioned.GroupKind, c *conversion.Cloner) error { out.Group = in.Group out.Kind = in.Kind return nil } -func deepCopy_unversioned_GroupResource(in unversioned.GroupResource, out *unversioned.GroupResource, c *conversion.Cloner) error { +func DeepCopy_unversioned_GroupResource(in unversioned.GroupResource, out *unversioned.GroupResource, c *conversion.Cloner) error { out.Group = in.Group out.Resource = in.Resource return nil } -func deepCopy_unversioned_GroupVersion(in unversioned.GroupVersion, out *unversioned.GroupVersion, c *conversion.Cloner) error { +func DeepCopy_unversioned_GroupVersion(in unversioned.GroupVersion, out *unversioned.GroupVersion, c *conversion.Cloner) error { out.Group = in.Group out.Version = in.Version return nil } -func deepCopy_unversioned_GroupVersionKind(in unversioned.GroupVersionKind, out *unversioned.GroupVersionKind, c *conversion.Cloner) error { +func DeepCopy_unversioned_GroupVersionKind(in unversioned.GroupVersionKind, out *unversioned.GroupVersionKind, c *conversion.Cloner) error { out.Group = in.Group out.Version = in.Version out.Kind = in.Kind return nil } -func deepCopy_unversioned_GroupVersionResource(in unversioned.GroupVersionResource, out *unversioned.GroupVersionResource, c *conversion.Cloner) error { +func DeepCopy_unversioned_GroupVersionResource(in unversioned.GroupVersionResource, out *unversioned.GroupVersionResource, c *conversion.Cloner) error { out.Group = in.Group out.Version = in.Version out.Resource = in.Resource return nil } -func deepCopy_unversioned_ListMeta(in unversioned.ListMeta, out *unversioned.ListMeta, c *conversion.Cloner) error { +func DeepCopy_unversioned_ListMeta(in unversioned.ListMeta, out *unversioned.ListMeta, c *conversion.Cloner) error { out.SelfLink = in.SelfLink out.ResourceVersion = in.ResourceVersion return nil } -func deepCopy_unversioned_TypeMeta(in unversioned.TypeMeta, out *unversioned.TypeMeta, c *conversion.Cloner) error { +func DeepCopy_unversioned_TypeMeta(in unversioned.TypeMeta, out *unversioned.TypeMeta, c *conversion.Cloner) error { out.Kind = in.Kind out.APIVersion = in.APIVersion return nil From 233a601130b4916e8febba147f622e49648718ee Mon Sep 17 00:00:00 2001 From: harry Date: Thu, 21 Jan 2016 17:05:37 +0800 Subject: [PATCH 095/328] Caculate priorities based on image locality Add test for image score Update generated docs --- docs/devel/scheduler_algorithm.md | 1 + .../algorithm/priorities/priorities.go | 72 ++++++++ .../algorithm/priorities/priorities_test.go | 158 ++++++++++++++++++ 3 files changed, 231 insertions(+) diff --git a/docs/devel/scheduler_algorithm.md b/docs/devel/scheduler_algorithm.md index 00a812a55c9..e886b0df3bb 100755 --- a/docs/devel/scheduler_algorithm.md +++ b/docs/devel/scheduler_algorithm.md @@ -65,6 +65,7 @@ Currently, Kubernetes scheduler provides some practical priority functions, incl - `BalancedResourceAllocation`: This priority function tries to put the Pod on a node such that the CPU and Memory utilization rate is balanced after the Pod is deployed. - `CalculateSpreadPriority`: Spread Pods by minimizing the number of Pods belonging to the same service on the same node. If zone information is present on the nodes, the priority will be adjusted so that pods are spread across zones and nodes. - `CalculateAntiAffinityPriority`: Spread Pods by minimizing the number of Pods belonging to the same service on nodes with the same value for a particular label. +- `ImageLocalityPriority`: Nodes are prioritized based on locality of images requested by a pod. Nodes with larger size of already-installed packages required by the pod will be preferred over nodes with no already-installed packages required by the pod or a small total size of already-installed packages required by the pod. The details of the above priority functions can be found in [plugin/pkg/scheduler/algorithm/priorities](http://releases.k8s.io/HEAD/plugin/pkg/scheduler/algorithm/priorities/). Kubernetes uses some, but not all, of these priority functions by default. You can see which ones are used by default in [plugin/pkg/scheduler/algorithmprovider/defaults/defaults.go](http://releases.k8s.io/HEAD/plugin/pkg/scheduler/algorithmprovider/defaults/defaults.go). Similar as predicates, you can combine the above priority functions and assign weight factors (positive number) to them as you want (check [scheduler.md](scheduler.md) for how to customize). diff --git a/plugin/pkg/scheduler/algorithm/priorities/priorities.go b/plugin/pkg/scheduler/algorithm/priorities/priorities.go index 112387e6d3c..e9d35707af9 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/priorities.go +++ b/plugin/pkg/scheduler/algorithm/priorities/priorities.go @@ -170,6 +170,78 @@ func (n *NodeLabelPrioritizer) CalculateNodeLabelPriority(pod *api.Pod, machines return result, nil } +// This is a reasonable size range of all container images. 90%ile of images on dockerhub drops into this range. +const ( + mb int64 = 1024 * 1024 + minImgSize int64 = 23 * mb + maxImgSize int64 = 1000 * mb +) + +// ImageLocalityPriority is a priority function that favors nodes that already have requested pod container's images. +// It will detect whether the requested images are present on a node, and then calculate a score ranging from 0 to 10 +// based on the total size of those images. +// - If none of the images are present, this node will be given the lowest priority. +// - If some of the images are present on a node, the larger their sizes' sum, the higher the node's priority. +func ImageLocalityPriority(pod *api.Pod, machinesToPods map[string][]*api.Pod, podLister algorithm.PodLister, nodeLister algorithm.NodeLister) (schedulerapi.HostPriorityList, error) { + sumSizeMap := make(map[string]int64) + + nodes, err := nodeLister.List() + if err != nil { + return nil, err + } + + for _, container := range pod.Spec.Containers { + for _, node := range nodes.Items { + // Check if this container's image is present and get its size. + imageSize := checkContainerImageOnNode(node, container) + // Add this size to the total result of this node. + sumSizeMap[node.Name] += imageSize + } + } + + result := []schedulerapi.HostPriority{} + // score int - scale of 0-10 + // 0 being the lowest priority and 10 being the highest. + for nodeName, sumSize := range sumSizeMap { + result = append(result, schedulerapi.HostPriority{Host: nodeName, + Score: calculateScoreFromSize(sumSize)}) + } + return result, nil +} + +// checkContainerImageOnNode checks if a container image is present on a node and returns its size. +func checkContainerImageOnNode(node api.Node, container api.Container) int64 { + for _, image := range node.Status.Images { + for _, repoTag := range image.RepoTags { + if container.Image == repoTag { + // Should return immediately. + return image.Size + } + } + } + return 0 +} + +// calculateScoreFromSize calculates the priority of a node. sumSize is sum size of requested images on this node. +// 1. Split image size range into 10 buckets. +// 2. Decide the priority of a given sumSize based on which bucket it belongs to. +func calculateScoreFromSize(sumSize int64) int { + var score int + switch { + case sumSize == 0 || sumSize < minImgSize: + // score == 0 means none of the images required by this pod are present on this + // node or the total size of the images present is too small to be taken into further consideration. + score = 0 + // If existing images' total size is larger than max, just make it highest priority. + case sumSize >= maxImgSize: + score = 10 + default: + score = int((10 * (sumSize - minImgSize) / (maxImgSize - minImgSize)) + 1) + } + // Return which bucket the given size belongs to + return score +} + // BalancedResourceAllocation favors nodes with balanced resource usage rate. // BalancedResourceAllocation should **NOT** be used alone, and **MUST** be used together with LeastRequestedPriority. // It calculates the difference between the cpu and memory fracion of capacity, and prioritizes the host based on how diff --git a/plugin/pkg/scheduler/algorithm/priorities/priorities_test.go b/plugin/pkg/scheduler/algorithm/priorities/priorities_test.go index 3d6207e5a5b..653ee4c6071 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/priorities_test.go +++ b/plugin/pkg/scheduler/algorithm/priorities/priorities_test.go @@ -732,3 +732,161 @@ func TestBalancedResourceAllocation(t *testing.T) { } } } + +func TestImageLocalityPriority(t *testing.T) { + test_40_250 := api.PodSpec{ + Containers: []api.Container{ + { + Image: "gcr.io/40", + }, + { + Image: "gcr.io/250", + }, + }, + } + + test_40_140 := api.PodSpec{ + Containers: []api.Container{ + { + Image: "gcr.io/40", + }, + { + Image: "gcr.io/140", + }, + }, + } + + test_min_max := api.PodSpec{ + Containers: []api.Container{ + { + Image: "gcr.io/10", + }, + { + Image: "gcr.io/2000", + }, + }, + } + + node_40_140_2000 := api.NodeStatus{ + Images: []api.ContainerImage{ + { + RepoTags: []string{ + "gcr.io/40", + "gcr.io/40:v1", + "gcr.io/40:v1", + }, + Size: int64(40 * mb), + }, + { + RepoTags: []string{ + "gcr.io/140", + "gcr.io/140:v1", + }, + Size: int64(140 * mb), + }, + { + RepoTags: []string{ + "gcr.io/2000", + }, + Size: int64(2000 * mb), + }, + }, + } + + node_250_10 := api.NodeStatus{ + Images: []api.ContainerImage{ + { + RepoTags: []string{ + "gcr.io/250", + }, + Size: int64(250 * mb), + }, + { + RepoTags: []string{ + "gcr.io/10", + "gcr.io/10:v1", + }, + Size: int64(10 * mb), + }, + }, + } + + tests := []struct { + pod *api.Pod + pods []*api.Pod + nodes []api.Node + expectedList schedulerapi.HostPriorityList + test string + }{ + { + // Pod: gcr.io/40 gcr.io/250 + + // Node1 + // Image: gcr.io/40 40MB + // Score: (40M-23M)/97.7M + 1 = 1 + + // Node2 + // Image: gcr.io/250 250MB + // Score: (250M-23M)/97.7M + 1 = 3 + pod: &api.Pod{Spec: test_40_250}, + nodes: []api.Node{makeImageNode("machine1", node_40_140_2000), makeImageNode("machine2", node_250_10)}, + expectedList: []schedulerapi.HostPriority{{"machine1", 1}, {"machine2", 3}}, + test: "two images spread on two nodes, prefer the larger image one", + }, + { + // Pod: gcr.io/40 gcr.io/140 + + // Node1 + // Image: gcr.io/40 40MB, gcr.io/140 140MB + // Score: (40M+140M-23M)/97.7M + 1 = 2 + + // Node2 + // Image: not present + // Score: 0 + pod: &api.Pod{Spec: test_40_140}, + nodes: []api.Node{makeImageNode("machine1", node_40_140_2000), makeImageNode("machine2", node_250_10)}, + expectedList: []schedulerapi.HostPriority{{"machine1", 2}, {"machine2", 0}}, + test: "two images on one node, prefer this node", + }, + { + // Pod: gcr.io/2000 gcr.io/10 + + // Node1 + // Image: gcr.io/2000 2000MB + // Score: 2000 > max score = 10 + + // Node2 + // Image: gcr.io/10 10MB + // Score: 10 < min score = 0 + pod: &api.Pod{Spec: test_min_max}, + nodes: []api.Node{makeImageNode("machine1", node_40_140_2000), makeImageNode("machine2", node_250_10)}, + expectedList: []schedulerapi.HostPriority{{"machine1", 10}, {"machine2", 0}}, + test: "if exceed limit, use limit", + }, + } + + for _, test := range tests { + m2p, err := predicates.MapPodsToMachines(algorithm.FakePodLister(test.pods)) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + list, err := ImageLocalityPriority(test.pod, m2p, algorithm.FakePodLister(test.pods), algorithm.FakeNodeLister(api.NodeList{Items: test.nodes})) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + sort.Sort(test.expectedList) + sort.Sort(list) + + if !reflect.DeepEqual(test.expectedList, list) { + t.Errorf("%s: expected %#v, got %#v", test.test, test.expectedList, list) + } + } +} + +func makeImageNode(node string, status api.NodeStatus) api.Node { + return api.Node{ + ObjectMeta: api.ObjectMeta{Name: node}, + Status: status, + } +} From e9139bb0e5860216930c4e5db1a0cf2087ad186e Mon Sep 17 00:00:00 2001 From: Yifan Gu Date: Thu, 28 Jan 2016 15:57:38 -0800 Subject: [PATCH 096/328] kubelet: Rename RunContainerOptionsGenerator to RuntimeHelper. Also add GetClusterDNS() to the interface to let rkt get the DNS servers, DNS names. --- pkg/kubelet/container/helpers.go | 7 ++++--- pkg/kubelet/dockertools/fake_manager.go | 4 ++-- pkg/kubelet/dockertools/manager.go | 10 +++++----- pkg/kubelet/dockertools/manager_test.go | 15 ++++++++++----- pkg/kubelet/kubelet.go | 6 +++--- 5 files changed, 24 insertions(+), 18 deletions(-) diff --git a/pkg/kubelet/container/helpers.go b/pkg/kubelet/container/helpers.go index 3f43363d272..21362744f49 100644 --- a/pkg/kubelet/container/helpers.go +++ b/pkg/kubelet/container/helpers.go @@ -36,10 +36,11 @@ type HandlerRunner interface { Run(containerID ContainerID, pod *api.Pod, container *api.Container, handler *api.Handler) error } -// RunContainerOptionsGenerator generates the options that necessary for -// container runtime to run a container. -type RunContainerOptionsGenerator interface { +// RuntimeHelper wraps kubelet to make container runtime +// able to get necessary informations like the RunContainerOptions, DNS settings. +type RuntimeHelper interface { GenerateRunContainerOptions(pod *api.Pod, container *api.Container) (*RunContainerOptions, error) + GetClusterDNS(pod *api.Pod) (dnsServers []string, dnsSearches []string, err error) } // ShouldContainerBeRestarted checks whether a container needs to be restarted. diff --git a/pkg/kubelet/dockertools/fake_manager.go b/pkg/kubelet/dockertools/fake_manager.go index 4f0a96cb58c..e2de8956771 100644 --- a/pkg/kubelet/dockertools/fake_manager.go +++ b/pkg/kubelet/dockertools/fake_manager.go @@ -40,13 +40,13 @@ func NewFakeDockerManager( containerLogsDir string, osInterface kubecontainer.OSInterface, networkPlugin network.NetworkPlugin, - generator kubecontainer.RunContainerOptionsGenerator, + runtimeHelper kubecontainer.RuntimeHelper, httpClient kubetypes.HttpGetter, imageBackOff *util.Backoff) *DockerManager { fakeOOMAdjuster := oom.NewFakeOOMAdjuster() fakeProcFs := procfs.NewFakeProcFS() dm := NewDockerManager(client, recorder, livenessManager, containerRefManager, machineInfo, podInfraContainerImage, qps, - burst, containerLogsDir, osInterface, networkPlugin, generator, httpClient, &NativeExecHandler{}, + burst, containerLogsDir, osInterface, networkPlugin, runtimeHelper, httpClient, &NativeExecHandler{}, fakeOOMAdjuster, fakeProcFs, false, imageBackOff, true) dm.dockerPuller = &FakeDockerPuller{} return dm diff --git a/pkg/kubelet/dockertools/manager.go b/pkg/kubelet/dockertools/manager.go index 21495a49d3f..fae288b93f4 100644 --- a/pkg/kubelet/dockertools/manager.go +++ b/pkg/kubelet/dockertools/manager.go @@ -129,8 +129,8 @@ type DockerManager struct { // Health check results. livenessManager proberesults.Manager - // Generator of runtime container options. - generator kubecontainer.RunContainerOptionsGenerator + // RuntimeHelper that wraps kubelet to generate runtime container options. + runtimeHelper kubecontainer.RuntimeHelper // Runner of lifecycle events. runner kubecontainer.HandlerRunner @@ -163,7 +163,7 @@ func NewDockerManager( containerLogsDir string, osInterface kubecontainer.OSInterface, networkPlugin network.NetworkPlugin, - generator kubecontainer.RunContainerOptionsGenerator, + runtimeHelper kubecontainer.RuntimeHelper, httpClient kubetypes.HttpGetter, execHandler ExecHandler, oomAdjuster *oom.OOMAdjuster, @@ -217,7 +217,7 @@ func NewDockerManager( containerLogsDir: containerLogsDir, networkPlugin: networkPlugin, livenessManager: livenessManager, - generator: generator, + runtimeHelper: runtimeHelper, execHandler: execHandler, oomAdjuster: oomAdjuster, procFs: procFs, @@ -1533,7 +1533,7 @@ func (dm *DockerManager) runContainerInPod(pod *api.Pod, container *api.Containe glog.Errorf("Can't make a ref to pod %v, container %v: '%v'", pod.Name, container.Name, err) } - opts, err := dm.generator.GenerateRunContainerOptions(pod, container) + opts, err := dm.runtimeHelper.GenerateRunContainerOptions(pod, container) if err != nil { return kubecontainer.ContainerID{}, fmt.Errorf("GenerateRunContainerOptions: %v", err) } diff --git a/pkg/kubelet/dockertools/manager_test.go b/pkg/kubelet/dockertools/manager_test.go index aba215aeb7d..21b67045e32 100644 --- a/pkg/kubelet/dockertools/manager_test.go +++ b/pkg/kubelet/dockertools/manager_test.go @@ -58,13 +58,15 @@ func (f *fakeHTTP) Get(url string) (*http.Response, error) { return nil, f.err } -type fakeOptionGenerator struct{} +// fakeRuntimeHelper implementes kubecontainer.RuntimeHelper inter +// faces for testing purposes. +type fakeRuntimeHelper struct{} -var _ kubecontainer.RunContainerOptionsGenerator = &fakeOptionGenerator{} +var _ kubecontainer.RuntimeHelper = &fakeRuntimeHelper{} var testPodContainerDir string -func (*fakeOptionGenerator) GenerateRunContainerOptions(pod *api.Pod, container *api.Container) (*kubecontainer.RunContainerOptions, error) { +func (f *fakeRuntimeHelper) GenerateRunContainerOptions(pod *api.Pod, container *api.Container) (*kubecontainer.RunContainerOptions, error) { var opts kubecontainer.RunContainerOptions var err error if len(container.TerminationMessagePath) != 0 { @@ -77,12 +79,15 @@ func (*fakeOptionGenerator) GenerateRunContainerOptions(pod *api.Pod, container return &opts, nil } +func (f *fakeRuntimeHelper) GetClusterDNS(pod *api.Pod) ([]string, []string, error) { + return nil, nil, fmt.Errorf("not implemented") +} + func newTestDockerManagerWithHTTPClient(fakeHTTPClient *fakeHTTP) (*DockerManager, *FakeDockerClient) { fakeDocker := NewFakeDockerClient() fakeRecorder := &record.FakeRecorder{} containerRefManager := kubecontainer.NewRefManager() networkPlugin, _ := network.InitNetworkPlugin([]network.NetworkPlugin{}, "", network.NewFakeHost(nil)) - optionGenerator := &fakeOptionGenerator{} dockerManager := NewFakeDockerManager( fakeDocker, fakeRecorder, @@ -93,7 +98,7 @@ func newTestDockerManagerWithHTTPClient(fakeHTTPClient *fakeHTTP) (*DockerManage 0, 0, "", kubecontainer.FakeOS{}, networkPlugin, - optionGenerator, + &fakeRuntimeHelper{}, fakeHTTPClient, util.NewBackOff(time.Second, 300*time.Second)) diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index 0ed51bad2df..55d11bd6417 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -1288,7 +1288,7 @@ func (kl *Kubelet) GenerateRunContainerOptions(pod *api.Pod, container *api.Cont } } - opts.DNS, opts.DNSSearch, err = kl.getClusterDNS(pod) + opts.DNS, opts.DNSSearch, err = kl.GetClusterDNS(pod) if err != nil { return nil, err } @@ -1457,9 +1457,9 @@ func (kl *Kubelet) podFieldSelectorRuntimeValue(fs *api.ObjectFieldSelector, pod return fieldpath.ExtractFieldPathAsString(pod, internalFieldPath) } -// getClusterDNS returns a list of the DNS servers and a list of the DNS search +// GetClusterDNS returns a list of the DNS servers and a list of the DNS search // domains of the cluster. -func (kl *Kubelet) getClusterDNS(pod *api.Pod) ([]string, []string, error) { +func (kl *Kubelet) GetClusterDNS(pod *api.Pod) ([]string, []string, error) { var hostDNS, hostSearch []string // Get host DNS settings if kl.resolverConfig != "" { From d27a635c4ae307afd2bb6e844ebd12bbd805f18b Mon Sep 17 00:00:00 2001 From: Yifan Gu Date: Thu, 28 Jan 2016 16:01:01 -0800 Subject: [PATCH 097/328] rkt: Add DNS support. rkt is now able to populate /etc/resolv.conf with command line flags. Update the runtime code to fix DNS issues. --- pkg/kubelet/rkt/fake_rkt_interface.go | 18 +++++ pkg/kubelet/rkt/rkt.go | 51 +++++++++++--- pkg/kubelet/rkt/rkt_test.go | 99 +++++++++++++++++++++++++++ 3 files changed, 159 insertions(+), 9 deletions(-) diff --git a/pkg/kubelet/rkt/fake_rkt_interface.go b/pkg/kubelet/rkt/fake_rkt_interface.go index a1850282d42..25e73e4b246 100644 --- a/pkg/kubelet/rkt/fake_rkt_interface.go +++ b/pkg/kubelet/rkt/fake_rkt_interface.go @@ -21,10 +21,13 @@ import ( "strconv" "sync" + "k8s.io/kubernetes/pkg/api" + "github.com/coreos/go-systemd/dbus" rktapi "github.com/coreos/rkt/api/v1alpha" "golang.org/x/net/context" "google.golang.org/grpc" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" ) // fakeRktInterface mocks the rktapi.PublicAPIClient interface for testing purpose. @@ -142,3 +145,18 @@ func (f *fakeSystemd) RestartUnit(name string, mode string, ch chan<- string) (i func (f *fakeSystemd) Reload() error { return fmt.Errorf("Not implemented") } + +// fakeRuntimeHelper implementes kubecontainer.RuntimeHelper interfaces for testing purpose. +type fakeRuntimeHelper struct { + dnsServers []string + dnsSearches []string + err error +} + +func (f *fakeRuntimeHelper) GenerateRunContainerOptions(pod *api.Pod, container *api.Container) (*kubecontainer.RunContainerOptions, error) { + return nil, fmt.Errorf("Not implemented") +} + +func (f *fakeRuntimeHelper) GetClusterDNS(pod *api.Pod) ([]string, []string, error) { + return f.dnsServers, f.dnsSearches, f.err +} diff --git a/pkg/kubelet/rkt/rkt.go b/pkg/kubelet/rkt/rkt.go index cb393c7812a..48b6cf82b6e 100644 --- a/pkg/kubelet/rkt/rkt.go +++ b/pkg/kubelet/rkt/rkt.go @@ -90,6 +90,12 @@ const ( defaultImageTag = "latest" defaultRktAPIServiceAddr = "localhost:15441" defaultNetworkName = "rkt.kubernetes.io" + + // ndots specifies the minimum number of dots that a domain name must contain for the resolver to consider it as FQDN (fully-qualified) + // we want to able to consider SRV lookup names like _dns._udp.kube-dns.default.svc to be considered relative. + // hence, setting ndots to be 5. + // TODO(yifan): Move this and dockertools.ndotsDNSOption to a common package. + defaultDNSOption = "ndots:5" ) // Runtime implements the Containerruntime for rkt. The implementation @@ -107,7 +113,7 @@ type Runtime struct { dockerKeyring credentialprovider.DockerKeyring containerRefManager *kubecontainer.RefManager - generator kubecontainer.RunContainerOptionsGenerator + runtimeHelper kubecontainer.RuntimeHelper recorder record.EventRecorder livenessManager proberesults.Manager volumeGetter volumeGetter @@ -131,7 +137,7 @@ type volumeGetter interface { // It will test if the rkt binary is in the $PATH, and whether we can get the // version of it. If so, creates the rkt container runtime, otherwise returns an error. func New(config *Config, - generator kubecontainer.RunContainerOptionsGenerator, + runtimeHelper kubecontainer.RuntimeHelper, recorder record.EventRecorder, containerRefManager *kubecontainer.RefManager, livenessManager proberesults.Manager, @@ -169,7 +175,7 @@ func New(config *Config, config: config, dockerKeyring: credentialprovider.NewDockerKeyring(), containerRefManager: containerRefManager, - generator: generator, + runtimeHelper: runtimeHelper, recorder: recorder, livenessManager: livenessManager, volumeGetter: volumeGetter, @@ -582,7 +588,7 @@ func (r *Runtime) newAppcRuntimeApp(pod *api.Pod, c api.Container, pullSecrets [ return err } - opts, err := r.generator.GenerateRunContainerOptions(pod, &c) + opts, err := r.runtimeHelper.GenerateRunContainerOptions(pod, &c) if err != nil { return err } @@ -702,6 +708,35 @@ func serviceFilePath(serviceName string) string { return path.Join(systemdServiceDir, serviceName) } +// generateRunCommand crafts a 'rkt run-prepared' command with necessary parameters. +func (r *Runtime) generateRunCommand(pod *api.Pod, uuid string) (string, error) { + runPrepared := r.buildCommand("run-prepared").Args + + // Setup network configuration. + if pod.Spec.SecurityContext != nil && pod.Spec.SecurityContext.HostNetwork { + runPrepared = append(runPrepared, "--net=host") + } else { + runPrepared = append(runPrepared, fmt.Sprintf("--net=%s", defaultNetworkName)) + } + + // Setup DNS. + dnsServers, dnsSearches, err := r.runtimeHelper.GetClusterDNS(pod) + if err != nil { + return "", err + } + for _, server := range dnsServers { + runPrepared = append(runPrepared, fmt.Sprintf("--dns=%s", server)) + } + for _, search := range dnsSearches { + runPrepared = append(runPrepared, fmt.Sprintf("--dns-search=%s", search)) + } + if len(dnsServers) > 0 || len(dnsSearches) > 0 { + runPrepared = append(runPrepared, fmt.Sprintf("--dns-opt=%s", defaultDNSOption)) + } + runPrepared = append(runPrepared, uuid) + return strings.Join(runPrepared, " "), nil +} + // preparePod will: // // 1. Invoke 'rkt prepare' to prepare the pod, and get the rkt pod uuid. @@ -754,11 +789,9 @@ func (r *Runtime) preparePod(pod *api.Pod, pullSecrets []api.Secret) (string, *k glog.V(4).Infof("'rkt prepare' returns %q", uuid) // Create systemd service file for the rkt pod. - var runPrepared string - if pod.Spec.SecurityContext != nil && pod.Spec.SecurityContext.HostNetwork { - runPrepared = fmt.Sprintf("%s run-prepared --mds-register=false --net=host %s", r.rktBinAbsPath, uuid) - } else { - runPrepared = fmt.Sprintf("%s run-prepared --mds-register=false --net=%s %s", r.rktBinAbsPath, defaultNetworkName, uuid) + runPrepared, err := r.generateRunCommand(pod, uuid) + if err != nil { + return "", nil, fmt.Errorf("failed to generate 'rkt run-prepared' command: %v", err) } // TODO handle pod.Spec.HostPID diff --git a/pkg/kubelet/rkt/rkt_test.go b/pkg/kubelet/rkt/rkt_test.go index 134e787dfa5..bbb655ee385 100644 --- a/pkg/kubelet/rkt/rkt_test.go +++ b/pkg/kubelet/rkt/rkt_test.go @@ -955,3 +955,102 @@ func TestSetApp(t *testing.T) { } } } + +func TestGenerateRunCommand(t *testing.T) { + tests := []struct { + pod *api.Pod + uuid string + + dnsServers []string + dnsSearches []string + err error + + expect string + }{ + // Case #0, returns error. + { + &api.Pod{ + Spec: api.PodSpec{}, + }, + "rkt-uuid-foo", + []string{}, + []string{}, + fmt.Errorf("failed to get cluster dns"), + "", + }, + // Case #1, returns no dns, with private-net. + { + &api.Pod{}, + "rkt-uuid-foo", + []string{}, + []string{}, + nil, + "/bin/rkt/rkt --debug=false --insecure-options=image,ondisk --local-config=/var/rkt/local/data --dir=/var/data run-prepared --net=rkt.kubernetes.io rkt-uuid-foo", + }, + // Case #2, returns no dns, with host-net. + { + &api.Pod{ + Spec: api.PodSpec{ + SecurityContext: &api.PodSecurityContext{ + HostNetwork: true, + }, + }, + }, + "rkt-uuid-foo", + []string{}, + []string{}, + nil, + "/bin/rkt/rkt --debug=false --insecure-options=image,ondisk --local-config=/var/rkt/local/data --dir=/var/data run-prepared --net=host rkt-uuid-foo", + }, + // Case #3, returns dns, dns searches, with private-net. + { + &api.Pod{ + Spec: api.PodSpec{ + SecurityContext: &api.PodSecurityContext{ + HostNetwork: false, + }, + }, + }, + "rkt-uuid-foo", + []string{"127.0.0.1"}, + []string{"."}, + nil, + "/bin/rkt/rkt --debug=false --insecure-options=image,ondisk --local-config=/var/rkt/local/data --dir=/var/data run-prepared --net=rkt.kubernetes.io --dns=127.0.0.1 --dns-search=. --dns-opt=ndots:5 rkt-uuid-foo", + }, + // Case #4, returns dns, dns searches, with host-network. + { + &api.Pod{ + Spec: api.PodSpec{ + SecurityContext: &api.PodSecurityContext{ + HostNetwork: true, + }, + }, + }, + "rkt-uuid-foo", + []string{"127.0.0.1"}, + []string{"."}, + nil, + "/bin/rkt/rkt --debug=false --insecure-options=image,ondisk --local-config=/var/rkt/local/data --dir=/var/data run-prepared --net=host --dns=127.0.0.1 --dns-search=. --dns-opt=ndots:5 rkt-uuid-foo", + }, + } + + rkt := &Runtime{ + rktBinAbsPath: "/bin/rkt/rkt", + config: &Config{ + Path: "/bin/rkt/rkt", + Stage1Image: "/bin/rkt/stage1-coreos.aci", + Dir: "/var/data", + InsecureOptions: "image,ondisk", + LocalConfigDir: "/var/rkt/local/data", + }, + } + + for i, tt := range tests { + testCaseHint := fmt.Sprintf("test case #%d", i) + rkt.runtimeHelper = &fakeRuntimeHelper{tt.dnsServers, tt.dnsSearches, tt.err} + + result, err := rkt.generateRunCommand(tt.pod, tt.uuid) + assert.Equal(t, tt.err, err, testCaseHint) + assert.Equal(t, tt.expect, result, testCaseHint) + } +} From 5ff5890ef974f4e51e2bdd9cec6914eb7b5d3886 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Sun, 31 Jan 2016 19:22:29 -0800 Subject: [PATCH 098/328] Remove e2e global 'timeout' --- test/e2e/cadvisor.go | 1 - test/e2e/nodeoutofdisk.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/test/e2e/cadvisor.go b/test/e2e/cadvisor.go index 4cddade31ca..2553d7f31b7 100644 --- a/test/e2e/cadvisor.go +++ b/test/e2e/cadvisor.go @@ -27,7 +27,6 @@ import ( ) const ( - timeout = 1 * time.Minute maxRetries = 6 sleepDuration = 10 * time.Second ) diff --git a/test/e2e/nodeoutofdisk.go b/test/e2e/nodeoutofdisk.go index 592422fb433..3edf49edf8f 100644 --- a/test/e2e/nodeoutofdisk.go +++ b/test/e2e/nodeoutofdisk.go @@ -218,7 +218,7 @@ func availCpu(c *client.Client, node *api.Node) (int64, error) { func availSize(c *client.Client, node *api.Node) (uint64, error) { statsResource := fmt.Sprintf("api/v1/proxy/nodes/%s/stats/", node.Name) Logf("Querying stats for node %s using url %s", node.Name, statsResource) - res, err := c.Get().AbsPath(statsResource).Timeout(timeout).Do().Raw() + res, err := c.Get().AbsPath(statsResource).Timeout(time.Minute).Do().Raw() if err != nil { return 0, fmt.Errorf("error querying cAdvisor API: %v", err) } From 67414afd116081bf8fc96ecb68c2ed3e0409ae6c Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 26 Jan 2016 22:02:59 -0600 Subject: [PATCH 099/328] Send PodCIDR to network plugins as an event --- pkg/kubelet/kubelet.go | 24 +++++++++++++++++++----- pkg/kubelet/kubelet_test.go | 6 +++--- pkg/kubelet/network/cni/cni.go | 3 +++ pkg/kubelet/network/exec/exec.go | 3 +++ pkg/kubelet/network/plugins.go | 12 ++++++++++++ pkg/kubelet/runtime.go | 2 -- 6 files changed, 40 insertions(+), 10 deletions(-) diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index 6c11f12a3f0..0bc00a9cc16 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -398,7 +398,8 @@ func NewMainKubelet( } klet.pleg = pleg.NewGenericPLEG(klet.containerRuntime, plegChannelCapacity, plegRelistPeriod, klet.podCache) - klet.runtimeState = newRuntimeState(maxWaitForContainerRuntime, configureCBR0, podCIDR, klet.isContainerRuntimeVersionCompatible) + klet.runtimeState = newRuntimeState(maxWaitForContainerRuntime, configureCBR0, klet.isContainerRuntimeVersionCompatible) + klet.updatePodCIDR(podCIDR) // setup containerGC containerGC, err := kubecontainer.NewContainerGC(klet.containerRuntime, containerGCPolicy) @@ -2644,9 +2645,7 @@ func (kl *Kubelet) syncNetworkStatus() { glog.Infof("Flannel server handshake failed %v", err) return } - glog.Infof("Setting cidr: %v -> %v", - kl.runtimeState.podCIDR(), podCIDR) - kl.runtimeState.setPodCIDR(podCIDR) + kl.updatePodCIDR(podCIDR) } if err := ensureIPTablesMasqRule(kl.nonMasqueradeCIDR); err != nil { err = fmt.Errorf("Error on adding ip table rules: %v", err) @@ -3026,7 +3025,7 @@ func (kl *Kubelet) tryUpdateNodeStatus() error { } } } else if kl.reconcileCIDR { - kl.runtimeState.setPodCIDR(node.Spec.PodCIDR) + kl.updatePodCIDR(node.Spec.PodCIDR) } if err := kl.setNodeStatus(node); err != nil { @@ -3445,6 +3444,21 @@ func (kl *Kubelet) GetRuntime() kubecontainer.Runtime { return kl.containerRuntime } +func (kl *Kubelet) updatePodCIDR(cidr string) { + if kl.runtimeState.podCIDR() == cidr { + return + } + + glog.Infof("Setting Pod CIDR: %v -> %v", kl.runtimeState.podCIDR(), cidr) + kl.runtimeState.setPodCIDR(cidr) + + if kl.networkPlugin != nil { + details := make(map[string]interface{}) + details[network.NET_PLUGIN_EVENT_POD_CIDR_CHANGE_DETAIL_CIDR] = cidr + kl.networkPlugin.Event(network.NET_PLUGIN_EVENT_POD_CIDR_CHANGE, details) + } +} + var minRsrc = resource.MustParse("1k") var maxRsrc = resource.MustParse("1P") diff --git a/pkg/kubelet/kubelet_test.go b/pkg/kubelet/kubelet_test.go index eccb6b959d6..3a1d8aa4ac5 100644 --- a/pkg/kubelet/kubelet_test.go +++ b/pkg/kubelet/kubelet_test.go @@ -117,7 +117,7 @@ func newTestKubelet(t *testing.T) *TestKubelet { kubelet.hostname = testKubeletHostname kubelet.nodeName = testKubeletHostname - kubelet.runtimeState = newRuntimeState(maxWaitForContainerRuntime, false, "" /* Pod CIDR */, func() error { return nil }) + kubelet.runtimeState = newRuntimeState(maxWaitForContainerRuntime, false, func() error { return nil }) kubelet.networkPlugin, _ = network.InitNetworkPlugin([]network.NetworkPlugin{}, "", network.NewFakeHost(nil)) if tempDir, err := ioutil.TempDir("/tmp", "kubelet_test."); err != nil { t.Fatalf("can't make a temp rootdir: %v", err) @@ -2961,7 +2961,7 @@ func TestDockerRuntimeVersion(t *testing.T) { }, } - kubelet.runtimeState = newRuntimeState(maxWaitForContainerRuntime, false, "", kubelet.isContainerRuntimeVersionCompatible) + kubelet.runtimeState = newRuntimeState(maxWaitForContainerRuntime, false, kubelet.isContainerRuntimeVersionCompatible) kubelet.updateRuntimeUp() if err := kubelet.updateNodeStatus(); err != nil { t.Errorf("unexpected error: %v", err) @@ -3424,7 +3424,7 @@ func TestUpdateNodeStatusWithoutContainerRuntime(t *testing.T) { }, }, } - kubelet.runtimeState = newRuntimeState(time.Duration(0), false, "" /* Pod CIDR */, func() error { return nil }) + kubelet.runtimeState = newRuntimeState(time.Duration(0), false, func() error { return nil }) kubelet.updateRuntimeUp() if err := kubelet.updateNodeStatus(); err != nil { t.Errorf("unexpected error: %v", err) diff --git a/pkg/kubelet/network/cni/cni.go b/pkg/kubelet/network/cni/cni.go index 5a124e08bd3..6fa7615348f 100644 --- a/pkg/kubelet/network/cni/cni.go +++ b/pkg/kubelet/network/cni/cni.go @@ -97,6 +97,9 @@ func (plugin *cniNetworkPlugin) Init(host network.Host) error { return nil } +func (plugin *cniNetworkPlugin) Event(name string, details map[string]interface{}) { +} + func (plugin *cniNetworkPlugin) Name() string { return CNIPluginName } diff --git a/pkg/kubelet/network/exec/exec.go b/pkg/kubelet/network/exec/exec.go index 6f2144581b3..52d895d9962 100644 --- a/pkg/kubelet/network/exec/exec.go +++ b/pkg/kubelet/network/exec/exec.go @@ -120,6 +120,9 @@ func (plugin *execNetworkPlugin) getExecutable() string { return path.Join(plugin.execPath, execName) } +func (plugin *execNetworkPlugin) Event(name string, details map[string]interface{}) { +} + func (plugin *execNetworkPlugin) Name() string { return plugin.execName } diff --git a/pkg/kubelet/network/plugins.go b/pkg/kubelet/network/plugins.go index 80678924532..eeb2971142c 100644 --- a/pkg/kubelet/network/plugins.go +++ b/pkg/kubelet/network/plugins.go @@ -33,12 +33,21 @@ import ( const DefaultPluginName = "kubernetes.io/no-op" +// Called when the node's Pod CIDR is known when using the +// controller manager's --allocate-node-cidrs=true option +const NET_PLUGIN_EVENT_POD_CIDR_CHANGE = "pod-cidr-change" +const NET_PLUGIN_EVENT_POD_CIDR_CHANGE_DETAIL_CIDR = "pod-cidr" + // Plugin is an interface to network plugins for the kubelet type NetworkPlugin interface { // Init initializes the plugin. This will be called exactly once // before any other methods are called. Init(host Host) error + // Called on various events like: + // NET_PLUGIN_EVENT_POD_CIDR_CHANGE + Event(name string, details map[string]interface{}) + // Name returns the plugin's name. This will be used when searching // for a plugin by name, e.g. Name() string @@ -130,6 +139,9 @@ func (plugin *noopNetworkPlugin) Init(host Host) error { return nil } +func (plugin *noopNetworkPlugin) Event(name string, details map[string]interface{}) { +} + func (plugin *noopNetworkPlugin) Name() string { return DefaultPluginName } diff --git a/pkg/kubelet/runtime.go b/pkg/kubelet/runtime.go index e97e8245780..6e3c413ad41 100644 --- a/pkg/kubelet/runtime.go +++ b/pkg/kubelet/runtime.go @@ -94,7 +94,6 @@ func (s *runtimeState) errors() []string { func newRuntimeState( runtimeSyncThreshold time.Duration, configureNetwork bool, - cidr string, runtimeCompatibility func() error, ) *runtimeState { var networkError error = nil @@ -105,7 +104,6 @@ func newRuntimeState( lastBaseRuntimeSync: time.Time{}, baseRuntimeSyncThreshold: runtimeSyncThreshold, networkError: networkError, - cidr: cidr, internalError: nil, runtimeCompatibility: runtimeCompatibility, } From fabb65c13f2472ae00a693db2fac10d58f689f12 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 16 Dec 2015 17:31:10 -0600 Subject: [PATCH 100/328] Add a network plugin that duplicates "configureCBR0" functionality --- cluster/gce/config-default.sh | 4 +- cluster/saltbase/salt/cni/init.sls | 20 ++ cluster/saltbase/salt/docker/docker-defaults | 6 +- .../kube-controller-manager.manifest | 2 + cluster/saltbase/salt/kubelet/default | 20 +- cluster/saltbase/salt/top.sls | 4 + cluster/vagrant/config-default.sh | 6 +- cluster/vagrant/provision-master.sh | 4 +- cluster/vagrant/provision-node.sh | 4 +- cluster/vagrant/provision-utils.sh | 1 + cluster/vagrant/util.sh | 1 + cmd/kubelet/app/plugins.go | 2 + docs/admin/network-plugins.md | 66 ++++ hack/local-up-cluster.sh | 19 ++ pkg/kubelet/dockertools/manager.go | 2 +- pkg/kubelet/kubelet.go | 10 + pkg/kubelet/network/kubenet/kubenet_linux.go | 287 ++++++++++++++++++ .../network/kubenet/kubenet_unsupported.go | 55 ++++ 18 files changed, 502 insertions(+), 11 deletions(-) create mode 100644 cluster/saltbase/salt/cni/init.sls create mode 100644 docs/admin/network-plugins.md create mode 100644 pkg/kubelet/network/kubenet/kubenet_linux.go create mode 100644 pkg/kubelet/network/kubenet/kubenet_unsupported.go diff --git a/cluster/gce/config-default.sh b/cluster/gce/config-default.sh index 4e4a08d9079..0762e57b3b2 100755 --- a/cluster/gce/config-default.sh +++ b/cluster/gce/config-default.sh @@ -112,8 +112,8 @@ ADMISSION_CONTROL=NamespaceLifecycle,LimitRanger,ServiceAccount,ResourceQuota,Pe # Optional: if set to true kube-up will automatically check for existing resources and clean them up. KUBE_UP_AUTOMATIC_CLEANUP=${KUBE_UP_AUTOMATIC_CLEANUP:-false} -# OpenContrail networking plugin specific settings -NETWORK_PROVIDER="${NETWORK_PROVIDER:-none}" # opencontrail, flannel +# Networking plugin specific settings. +NETWORK_PROVIDER="${NETWORK_PROVIDER:-none}" # opencontrail, flannel, kubenet OPENCONTRAIL_TAG="${OPENCONTRAIL_TAG:-R2.20}" OPENCONTRAIL_KUBERNETES_TAG="${OPENCONTRAIL_KUBERNETES_TAG:-master}" OPENCONTRAIL_PUBLIC_SUBNET="${OPENCONTRAIL_PUBLIC_SUBNET:-10.1.0.0/16}" diff --git a/cluster/saltbase/salt/cni/init.sls b/cluster/saltbase/salt/cni/init.sls new file mode 100644 index 00000000000..544f33f522b --- /dev/null +++ b/cluster/saltbase/salt/cni/init.sls @@ -0,0 +1,20 @@ +/opt/cni: + file.directory: + - user: root + - group: root + - mode: 755 + - makedirs: True + +# These are all available CNI network plugins. +cni-tar: + archive: + - extracted + - user: root + - name: /opt/cni + - makedirs: True + - source: https://storage.googleapis.com/kubernetes-release/network-plugins/cni-09214926.tar.gz + - tar_options: v + - source_hash: md5=58f8631f912dd88be6a0920775db7274 + - archive_format: tar + - if_missing: /opt/cni/bin + diff --git a/cluster/saltbase/salt/docker/docker-defaults b/cluster/saltbase/salt/docker/docker-defaults index 9ea5a121417..5b97c16d6a3 100644 --- a/cluster/saltbase/salt/docker/docker-defaults +++ b/cluster/saltbase/salt/docker/docker-defaults @@ -3,5 +3,9 @@ {% if pillar.get('e2e_storage_test_environment', '').lower() == 'true' -%} {% set e2e_opts = '-s devicemapper' -%} {% endif -%} -DOCKER_OPTS="{{grains_opts}} {{e2e_opts}} --bridge=cbr0 --iptables=false --ip-masq=false --log-level=warn" +{% set bridge_opts = "--bridge=cbr0" %} +{% if pillar.get('network_provider', '').lower() == 'kubenet' %} + {% set bridge_opts = "" %} +{% endif -%} +DOCKER_OPTS="{{grains_opts}} {{e2e_opts}} {{bridge_opts}} --iptables=false --ip-masq=false --log-level=warn" DOCKER_NOFILE=1000000 diff --git a/cluster/saltbase/salt/kube-controller-manager/kube-controller-manager.manifest b/cluster/saltbase/salt/kube-controller-manager/kube-controller-manager.manifest index e19b4d12a60..39444e91005 100644 --- a/cluster/saltbase/salt/kube-controller-manager/kube-controller-manager.manifest +++ b/cluster/saltbase/salt/kube-controller-manager/kube-controller-manager.manifest @@ -14,6 +14,8 @@ # This is expected to be a short-term compromise. {% if pillar.get('network_provider', '').lower() == 'flannel' %} {% set allocate_node_cidrs = "--allocate-node-cidrs=false" -%} +{% elif pillar.get('network_provider', '').lower() == 'kubenet' %} + {% set allocate_node_cidrs = "--allocate-node-cidrs=true" -%} {% elif pillar['allocate_node_cidrs'] is defined -%} {% set allocate_node_cidrs = "--allocate-node-cidrs=" + pillar['allocate_node_cidrs'] -%} {% endif -%} diff --git a/cluster/saltbase/salt/kubelet/default b/cluster/saltbase/salt/kubelet/default index 396d71df65f..4b051edc432 100644 --- a/cluster/saltbase/salt/kubelet/default +++ b/cluster/saltbase/salt/kubelet/default @@ -26,6 +26,7 @@ {% set debugging_handlers = "--enable-debugging-handlers=true" -%} +{% set reconcile_cidr_args = "" -%} {% if grains['roles'][0] == 'kubernetes-master' -%} {% if grains.cloud in ['aws', 'gce', 'vagrant', 'vsphere'] -%} @@ -33,7 +34,8 @@ # running on the master. {% if grains.kubelet_api_servers is defined -%} {% set api_servers_with_port = "--api-servers=https://" + grains.kubelet_api_servers -%} - {% set master_kubelet_args = master_kubelet_args + "--register-schedulable=false --reconcile-cidr=false" -%} + {% set master_kubelet_args = master_kubelet_args + "--register-schedulable=false" -%} + {% set reconcile_cidr_args = "--reconcile-cidr=false" -%} {% else -%} {% set api_servers_with_port = "" -%} {% endif -%} @@ -116,8 +118,13 @@ {% endif -%} {% set pod_cidr = "" %} -{% if grains['roles'][0] == 'kubernetes-master' and grains.get('cbr-cidr') %} - {% set pod_cidr = "--pod-cidr=" + grains['cbr-cidr'] %} +{% if grains['roles'][0] == 'kubernetes-master' %} + {% if grains.get('cbr-cidr') %} + {% set pod_cidr = "--pod-cidr=" + grains['cbr-cidr'] %} + {% elif api_servers_with_port == '' and pillar.get('network_provider', '').lower() == 'kubenet' %} + # Kubelet standalone mode needs a PodCIDR since there is no controller-manager + {% set pod_cidr = "--pod-cidr=10.76.0.0/16" %} + {% endif -%} {% endif %} {% set cpu_cfs_quota = "" %} @@ -133,6 +140,11 @@ {% set network_plugin = "" -%} {% if pillar.get('network_provider', '').lower() == 'opencontrail' %} {% set network_plugin = "--network-plugin=opencontrail" %} +{% elif pillar.get('network_provider', '').lower() == 'kubenet' %} + {% set network_plugin = "--network-plugin=kubenet" -%} + {% if reconcile_cidr_args == '' -%} + {% set reconcile_cidr_args = "--reconcile-cidr=true" -%} + {% endif -%} {% endif -%} {% set kubelet_port = "" -%} @@ -146,4 +158,4 @@ {% endif -%} # test_args has to be kept at the end, so they'll overwrite any prior configuration -DAEMON_ARGS="{{daemon_args}} {{api_servers_with_port}} {{debugging_handlers}} {{hostname_override}} {{cloud_provider}} {{config}} {{manifest_url}} --allow-privileged={{pillar['allow_privileged']}} {{log_level}} {{cluster_dns}} {{cluster_domain}} {{docker_root}} {{kubelet_root}} {{configure_cbr0}} {{non_masquerade_cidr}} {{cgroup_root}} {{system_container}} {{pod_cidr}} {{ master_kubelet_args }} {{cpu_cfs_quota}} {{network_plugin}} {{kubelet_port}} {{experimental_flannel_overlay}} {{test_args}}" +DAEMON_ARGS="{{daemon_args}} {{api_servers_with_port}} {{debugging_handlers}} {{hostname_override}} {{cloud_provider}} {{config}} {{manifest_url}} --allow-privileged={{pillar['allow_privileged']}} {{log_level}} {{cluster_dns}} {{cluster_domain}} {{docker_root}} {{kubelet_root}} {{configure_cbr0}} {{non_masquerade_cidr}} {{cgroup_root}} {{system_container}} {{pod_cidr}} {{ master_kubelet_args }} {{cpu_cfs_quota}} {{network_plugin}} {{kubelet_port}} {{experimental_flannel_overlay}} {{ reconcile_cidr_args }} {{test_args}}" diff --git a/cluster/saltbase/salt/top.sls b/cluster/saltbase/salt/top.sls index f3d32f779b7..e96c6390cea 100644 --- a/cluster/saltbase/salt/top.sls +++ b/cluster/saltbase/salt/top.sls @@ -15,6 +15,8 @@ base: - docker {% if pillar.get('network_provider', '').lower() == 'flannel' %} - flannel +{% elif pillar.get('network_provider', '').lower() == 'kubenet' %} + - cni {% endif %} - helpers - cadvisor @@ -46,6 +48,8 @@ base: {% if pillar.get('network_provider', '').lower() == 'flannel' %} - flannel-server - flannel +{% elif pillar.get('network_provider', '').lower() == 'kubenet' %} + - cni {% endif %} - kube-apiserver - kube-controller-manager diff --git a/cluster/vagrant/config-default.sh b/cluster/vagrant/config-default.sh index fd420c368b4..3172a8ace41 100755 --- a/cluster/vagrant/config-default.sh +++ b/cluster/vagrant/config-default.sh @@ -97,8 +97,12 @@ octets=($(echo "$SERVICE_CLUSTER_IP_RANGE" | sed -e 's|/.*||' -e 's/\./ /g')) service_ip=$(echo "${octets[*]}" | sed 's/ /./g') MASTER_EXTRA_SANS="IP:${service_ip},DNS:kubernetes,DNS:kubernetes.default,DNS:kubernetes.default.svc,DNS:kubernetes.default.svc.${DNS_DOMAIN},DNS:${MASTER_NAME}" +NETWORK_PROVIDER="${NETWORK_PROVIDER:-none}" # opencontrail, kubenet, etc +if [ "${NETWORK_PROVIDER}" == "kubenet" ]; then + CLUSTER_IP_RANGE="${CONTAINER_SUBNET}" +fi + # OpenContrail networking plugin specific settings -NETWORK_PROVIDER="${NETWORK_PROVIDER:-none}" # opencontrail OPENCONTRAIL_TAG="${OPENCONTRAIL_TAG:-R2.20}" OPENCONTRAIL_KUBERNETES_TAG="${OPENCONTRAIL_KUBERNETES_TAG:-master}" OPENCONTRAIL_PUBLIC_SUBNET="${OPENCONTRAIL_PUBLIC_SUBNET:-10.1.0.0/16}" diff --git a/cluster/vagrant/provision-master.sh b/cluster/vagrant/provision-master.sh index da6c611d434..46e1e4db9c3 100755 --- a/cluster/vagrant/provision-master.sh +++ b/cluster/vagrant/provision-master.sh @@ -57,7 +57,9 @@ echo "127.0.0.1 localhost" >> /etc/hosts # enables cmds like 'kubectl get pods' echo "$MASTER_IP $MASTER_NAME" >> /etc/hosts # Configure the master network -provision-network-master +if [ "${NETWORK_PROVIDER}" != "kubenet" ]; then + provision-network-master +fi write-salt-config kubernetes-master diff --git a/cluster/vagrant/provision-node.sh b/cluster/vagrant/provision-node.sh index 2fb64dd3131..544224a67ee 100755 --- a/cluster/vagrant/provision-node.sh +++ b/cluster/vagrant/provision-node.sh @@ -53,7 +53,9 @@ for (( i=0; i<${#NODE_NAMES[@]}; i++)); do done # Configure network -provision-network-node +if [ "${NETWORK_PROVIDER}" != "kubenet" ]; then + provision-network-node +fi write-salt-config kubernetes-pool diff --git a/cluster/vagrant/provision-utils.sh b/cluster/vagrant/provision-utils.sh index 286d86221d4..f095d71cfc7 100755 --- a/cluster/vagrant/provision-utils.sh +++ b/cluster/vagrant/provision-utils.sh @@ -38,6 +38,7 @@ instance_prefix: '$(echo "$INSTANCE_PREFIX" | sed -e "s/'/''/g")' admission_control: '$(echo "$ADMISSION_CONTROL" | sed -e "s/'/''/g")' enable_cpu_cfs_quota: '$(echo "$ENABLE_CPU_CFS_QUOTA" | sed -e "s/'/''/g")' network_provider: '$(echo "$NETWORK_PROVIDER" | sed -e "s/'/''/g")' +cluster_cidr: '$(echo "$CLUSTER_IP_RANGE" | sed -e "s/'/''/g")' opencontrail_tag: '$(echo "$OPENCONTRAIL_TAG" | sed -e "s/'/''/g")' opencontrail_kubernetes_tag: '$(echo "$OPENCONTRAIL_KUBERNETES_TAG" | sed -e "s/'/''/g")' opencontrail_public_subnet: '$(echo "$OPENCONTRAIL_PUBLIC_SUBNET" | sed -e "s/'/''/g")' diff --git a/cluster/vagrant/util.sh b/cluster/vagrant/util.sh index 875fa2a2cd7..0f90b1e2e07 100755 --- a/cluster/vagrant/util.sh +++ b/cluster/vagrant/util.sh @@ -153,6 +153,7 @@ function echo-kube-env() { echo "NODE_NAMES=(${NODE_NAMES[@]})" echo "NODE_IPS=(${NODE_IPS[@]})" echo "CONTAINER_SUBNET='${CONTAINER_SUBNET}'" + echo "CLUSTER_IP_RANGE='${CLUSTER_IP_RANGE}'" echo "MASTER_CONTAINER_SUBNET='${MASTER_CONTAINER_SUBNET}'" echo "NODE_CONTAINER_NETMASKS='${NODE_CONTAINER_NETMASKS[@]}'" echo "NODE_CONTAINER_SUBNETS=(${NODE_CONTAINER_SUBNETS[@]})" diff --git a/cmd/kubelet/app/plugins.go b/cmd/kubelet/app/plugins.go index 9dc450a5843..31b50b45108 100644 --- a/cmd/kubelet/app/plugins.go +++ b/cmd/kubelet/app/plugins.go @@ -25,6 +25,7 @@ import ( "k8s.io/kubernetes/pkg/kubelet/network" "k8s.io/kubernetes/pkg/kubelet/network/cni" "k8s.io/kubernetes/pkg/kubelet/network/exec" + "k8s.io/kubernetes/pkg/kubelet/network/kubenet" // Volume plugins "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/aws_ebs" @@ -88,6 +89,7 @@ func ProbeNetworkPlugins(pluginDir string) []network.NetworkPlugin { // for each existing plugin, add to the list allPlugins = append(allPlugins, exec.ProbeNetworkPlugins(pluginDir)...) allPlugins = append(allPlugins, cni.ProbeNetworkPlugins(pluginDir)...) + allPlugins = append(allPlugins, kubenet.NewPlugin()) return allPlugins } diff --git a/docs/admin/network-plugins.md b/docs/admin/network-plugins.md new file mode 100644 index 00000000000..41249f83b37 --- /dev/null +++ b/docs/admin/network-plugins.md @@ -0,0 +1,66 @@ + + + + +WARNING +WARNING +WARNING +WARNING +WARNING + +

PLEASE NOTE: This document applies to the HEAD of the source tree

+ +If you are using a released version of Kubernetes, you should +refer to the docs that go with that version. + +Documentation for other releases can be found at +[releases.k8s.io](http://releases.k8s.io). + +-- + + + + + +# Network Plugins + +__Disclaimer__: Network plugins are in alpha. Its contents will change rapidly. + +Network plugins in Kubernetes come in a few flavors: +* Plain vanilla exec plugins - deprecated in favor of CNI plugins. +* CNI plugins: adhere to the appc/CNI specification, designed for interoperability. +* Kubenet plugin: implements basic `cbr0` using the `bridge` and `host-local` CNI plugins + +## Installation + +The kubelet has a single default network plugin, and a default network common to the entire cluster. It probes for plugins when it starts up, remembers what it found, and executes the selected plugin at appropriate times in the pod lifecycle (this is only true for docker, as rkt manages its own CNI plugins). There are two Kubelet command line parameters to keep in mind when using plugins: +* `network-plugin-dir`: Kubelet probes this directory for plugins on startup +* `network-plugin`: The network plugin to use from `network-plugin-dir`. It must match the name reported by a plugin probed from the plugin directory. For CNI plugins, this is simply "cni". + +### Exec + +Place plugins in `network-plugin-dir/plugin-name/plugin-name`, i.e if you have a bridge plugin and `network-plugin-dir` is `/usr/lib/kubernetes`, you'd place the bridge plugin executable at `/usr/lib/kubernetes/bridge/bridge`. See [this comment](../../pkg/kubelet/network/exec/exec.go) for more details. + +### CNI + +The CNI plugin is selected by passing Kubelet the `--network-plugin=cni` command-line option. Kubelet reads the first CNI configuration file from `--network-plugin-dir` and uses the CNI configuration from that file to set up each pod's network. The CNI configuration file must match the [CNI specification](https://github.com/appc/cni/blob/master/SPEC.md), and any required CNI plugins referenced by the configuration must be present in `/opt/cni/bin`. + +### kubenet + +The Linux-only kubenet plugin provides functionality similar to the `--configure-cbr0` kubelet command-line option. It creates a Linux bridge named `cbr0` and creates a veth pair for each pod with the host end of each pair connected to `cbr0`. The pod end of the pair is assigned an IP address allocated from a range assigned to the node through either configuration or by the controller-manager. `cbr0` is assigned an MTU matching the smallest MTU of an enabled normal interface on the host. The kubenet plugin is currently mutually exclusive with, and will eventually replace, the --configure-cbr0 option. It is also currently incompatible with the flannel experimental overlay. + +The plugin requires a few things: +* The standard CNI `bridge` and `host-local` plugins to be placed in `/opt/cni/bin`. +* Kubelet must be run with the `--network-plugin=kubenet` argument to enable the plugin +* Kubelet must also be run with the `--reconcile-cidr` argument to ensure the IP subnet assigned to the node by configuration or the controller-manager is propagated to the plugin +* The node must be assigned an IP subnet through either the `--pod-cidr` kubelet command-line option or the `--allocate-node-cidrs=true --cluster-cidr=` controller-manager command-line options. + + + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/admin/network-plugins.md?pixel)]() + diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index f1cba1f2d5f..876a9a7b0dc 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -24,6 +24,7 @@ DOCKERIZE_KUBELET=${DOCKERIZE_KUBELET:-""} ALLOW_PRIVILEGED=${ALLOW_PRIVILEGED:-""} ALLOW_SECURITY_CONTEXT=${ALLOW_SECURITY_CONTEXT:-""} RUNTIME_CONFIG=${RUNTIME_CONFIG:-""} +NET_PLUGIN=${NET_PLUGIN:-""} KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. cd "${KUBE_ROOT}" @@ -255,12 +256,18 @@ function start_apiserver { } function start_controller_manager { + node_cidr_args="" + if [[ "${NET_PLUGIN}" == "kubenet" ]]; then + node_cidr_args="--allocate-node-cidrs=true --cluster-cidr=10.1.0.0/16 " + fi + CTLRMGR_LOG=/tmp/kube-controller-manager.log sudo -E "${GO_OUT}/kube-controller-manager" \ --v=${LOG_LEVEL} \ --service-account-private-key-file="${SERVICE_ACCOUNT_KEY}" \ --root-ca-file="${ROOT_CA_FILE}" \ --enable-hostpath-provisioner="${ENABLE_HOSTPATH_PROVISIONER}" \ + ${node_cidr_args} \ --master="${API_HOST}:${API_PORT}" >"${CTLRMGR_LOG}" 2>&1 & CTLRMGR_PID=$! } @@ -283,6 +290,16 @@ function start_kubelet { fi fi + net_plugin_args="" + if [[ -n "${NET_PLUGIN}" ]]; then + net_plugin_args="--network-plugin=${NET_PLUGIN}" + fi + + kubenet_plugin_args="" + if [[ "${NET_PLUGIN}" == "kubenet" ]]; then + kubenet_plugin_args="--reconcile-cidr=true " + fi + sudo -E "${GO_OUT}/kubelet" ${priv_arg}\ --v=${LOG_LEVEL} \ --chaos-chance="${CHAOS_CHANCE}" \ @@ -294,6 +311,8 @@ function start_kubelet { --api-servers="${API_HOST}:${API_PORT}" \ --cpu-cfs-quota=${CPU_CFS_QUOTA} \ --cluster-dns="127.0.0.1" \ + ${net_plugin_args} \ + ${kubenet_plugin_args} \ --port="$KUBELET_PORT" >"${KUBELET_LOG}" 2>&1 & KUBELET_PID=$! else diff --git a/pkg/kubelet/dockertools/manager.go b/pkg/kubelet/dockertools/manager.go index 21495a49d3f..74423232831 100644 --- a/pkg/kubelet/dockertools/manager.go +++ b/pkg/kubelet/dockertools/manager.go @@ -1654,7 +1654,7 @@ func (dm *DockerManager) createPodInfraContainer(pod *api.Pod) (kubecontainer.Do netNamespace := "" var ports []api.ContainerPort - if dm.networkPlugin.Name() == "cni" { + if dm.networkPlugin.Name() == "cni" || dm.networkPlugin.Name() == "kubenet" { netNamespace = "none" } diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index 0bc00a9cc16..be404075699 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -269,6 +269,13 @@ func NewMainKubelet( oomWatcher := NewOOMWatcher(cadvisorInterface, recorder) + // TODO: remove when internal cbr0 implementation gets removed in favor + // of the kubenet network plugin + if networkPluginName == "kubenet" { + configureCBR0 = false + flannelExperimentalOverlay = false + } + klet := &Kubelet{ hostname: hostname, nodeName: nodeName, @@ -638,6 +645,7 @@ type Kubelet struct { resolverConfig string // Optionally shape the bandwidth of a pod + // TODO: remove when kubenet plugin is ready shaper bandwidth.BandwidthShaper // True if container cpu limits should be enforced via cgroup CFS quota @@ -2595,6 +2603,8 @@ func (kl *Kubelet) updateRuntimeUp() { kl.runtimeState.setRuntimeSync(kl.clock.Now()) } +// TODO: remove when kubenet plugin is ready +// NOTE!!! if you make changes here, also make them to kubenet func (kl *Kubelet) reconcileCBR0(podCIDR string) error { if podCIDR == "" { glog.V(5).Info("PodCIDR not set. Will not configure cbr0.") diff --git a/pkg/kubelet/network/kubenet/kubenet_linux.go b/pkg/kubelet/network/kubenet/kubenet_linux.go new file mode 100644 index 00000000000..4eebe27e397 --- /dev/null +++ b/pkg/kubelet/network/kubenet/kubenet_linux.go @@ -0,0 +1,287 @@ +// +build linux + +/* +Copyright 2014 The Kubernetes Authors All rights reserved. + +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 kubenet + +import ( + "fmt" + "net" + "strings" + "syscall" + + "github.com/vishvananda/netlink" + + "github.com/appc/cni/libcni" + "github.com/golang/glog" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/kubelet/dockertools" + "k8s.io/kubernetes/pkg/kubelet/network" + "k8s.io/kubernetes/pkg/util/bandwidth" +) + +const ( + KubenetPluginName = "kubenet" + BridgeName = "cbr0" + DefaultCNIDir = "/opt/cni/bin" + DefaultInterfaceName = "eth0" +) + +type kubenetNetworkPlugin struct { + host network.Host + netConfig *libcni.NetworkConfig + cniConfig *libcni.CNIConfig + shaper bandwidth.BandwidthShaper + + podCIDRs map[kubecontainer.DockerID]string + MTU int +} + +func NewPlugin() network.NetworkPlugin { + return &kubenetNetworkPlugin{ + podCIDRs: make(map[kubecontainer.DockerID]string), + MTU: 1460, + } +} + +func (plugin *kubenetNetworkPlugin) Init(host network.Host) error { + plugin.host = host + plugin.cniConfig = &libcni.CNIConfig{ + Path: []string{DefaultCNIDir}, + } + + if link, err := findMinMTU(); err == nil { + plugin.MTU = link.MTU + glog.V(5).Infof("Using interface %s MTU %d as bridge MTU", link.Name, link.MTU) + } else { + glog.Warningf("Failed to find default bridge MTU: %v", err) + } + + return nil +} + +func findMinMTU() (*net.Interface, error) { + intfs, err := net.Interfaces() + if err != nil { + return nil, err + } + + mtu := 999999 + defIntfIndex := -1 + for i, intf := range intfs { + if ((intf.Flags & net.FlagUp) != 0) && (intf.Flags&(net.FlagLoopback|net.FlagPointToPoint) == 0) { + if intf.MTU < mtu { + mtu = intf.MTU + defIntfIndex = i + } + } + } + + if mtu >= 999999 || mtu < 576 || defIntfIndex < 0 { + return nil, fmt.Errorf("no suitable interface", BridgeName) + } + + return &intfs[defIntfIndex], nil +} + +const NET_CONFIG_TEMPLATE = `{ + "cniVersion": "0.1.0", + "name": "kubenet", + "type": "bridge", + "bridge": "%s", + "mtu": %d, + "addIf": "%s", + "isGateway": true, + "ipMasq": true, + "ipam": { + "type": "host-local", + "subnet": "%s", + "gateway": "%s", + "routes": [ + { "dst": "0.0.0.0/0" } + ] + } +}` + +func (plugin *kubenetNetworkPlugin) Event(name string, details map[string]interface{}) { + if name != network.NET_PLUGIN_EVENT_POD_CIDR_CHANGE { + return + } + + podCIDR, ok := details[network.NET_PLUGIN_EVENT_POD_CIDR_CHANGE_DETAIL_CIDR].(string) + if !ok { + glog.Warningf("%s event didn't contain pod CIDR", network.NET_PLUGIN_EVENT_POD_CIDR_CHANGE) + return + } + + if plugin.netConfig != nil { + glog.V(5).Infof("Ignoring subsequent pod CIDR update to %s", podCIDR) + return + } + + glog.V(5).Infof("PodCIDR is set to %q", podCIDR) + _, cidr, err := net.ParseCIDR(podCIDR) + if err == nil { + // Set bridge address to first address in IPNet + cidr.IP.To4()[3] += 1 + + json := fmt.Sprintf(NET_CONFIG_TEMPLATE, BridgeName, plugin.MTU, DefaultInterfaceName, podCIDR, cidr.IP.String()) + plugin.netConfig, err = libcni.ConfFromBytes([]byte(json)) + if err == nil { + glog.V(5).Infof("CNI network config:\n%s", json) + + // Ensure cbr0 has no conflicting addresses; CNI's 'bridge' + // plugin will bail out if the bridge has an unexpected one + plugin.clearBridgeAddressesExcept(cidr.IP.String()) + } + } + + if err != nil { + glog.Warningf("Failed to generate CNI network config: %v", err) + } +} + +func (plugin *kubenetNetworkPlugin) clearBridgeAddressesExcept(keep string) { + bridge, err := netlink.LinkByName(BridgeName) + if err != nil { + return + } + + addrs, err := netlink.AddrList(bridge, syscall.AF_INET) + if err != nil { + return + } + + for _, addr := range addrs { + if addr.IPNet.String() != keep { + glog.V(5).Infof("Removing old address %s from %s", addr.IPNet.String(), BridgeName) + netlink.AddrDel(bridge, &addr) + } + } +} + +func (plugin *kubenetNetworkPlugin) Name() string { + return KubenetPluginName +} + +func (plugin *kubenetNetworkPlugin) SetUpPod(namespace string, name string, id kubecontainer.DockerID) error { + // Can't set up pods if we don't have a PodCIDR yet + if plugin.netConfig == nil { + return fmt.Errorf("Kubenet needs a PodCIDR to set up pods") + } + + runtime, ok := plugin.host.GetRuntime().(*dockertools.DockerManager) + if !ok { + return fmt.Errorf("Kubenet execution called on non-docker runtime") + } + netnsPath, err := runtime.GetNetNS(id.ContainerID()) + if err != nil { + return err + } + + rt := buildCNIRuntimeConf(name, namespace, id.ContainerID(), netnsPath) + if err != nil { + return fmt.Errorf("Error building CNI config: %v", err) + } + + res, err := plugin.cniConfig.AddNetwork(plugin.netConfig, rt) + if err != nil { + return fmt.Errorf("Error adding container to network: %v", err) + } + if res.IP4 == nil { + return fmt.Errorf("CNI plugin reported no IPv4 address for container %v.", id) + } + + plugin.podCIDRs[id] = res.IP4.IP.String() + + // The first SetUpPod call creates the bridge; ensure shaping is enabled + if plugin.shaper == nil { + plugin.shaper = bandwidth.NewTCShaper(BridgeName) + if plugin.shaper == nil { + return fmt.Errorf("Failed to create bandwidth shaper!") + } + plugin.shaper.ReconcileInterface() + } + + // TODO: get ingress/egress from Pod.Spec and add pod CIDR to shaper + + return nil +} + +func (plugin *kubenetNetworkPlugin) TearDownPod(namespace string, name string, id kubecontainer.DockerID) error { + if plugin.netConfig == nil { + return fmt.Errorf("Kubenet needs a PodCIDR to tear down pods") + } + + runtime, ok := plugin.host.GetRuntime().(*dockertools.DockerManager) + if !ok { + return fmt.Errorf("Kubenet execution called on non-docker runtime") + } + netnsPath, err := runtime.GetNetNS(id.ContainerID()) + if err != nil { + return err + } + + rt := buildCNIRuntimeConf(name, namespace, id.ContainerID(), netnsPath) + if err != nil { + return fmt.Errorf("Error building CNI config: %v", err) + } + + // no cached CIDR is Ok during teardown + if cidr, ok := plugin.podCIDRs[id]; ok { + glog.V(5).Infof("Removing pod CIDR %s from shaper", cidr) + // shaper wants /32 + if addr, _, err := net.ParseCIDR(cidr); err != nil { + if err = plugin.shaper.Reset(fmt.Sprintf("%s/32", addr.String())); err != nil { + glog.Warningf("Failed to remove pod CIDR %s from shaper: %v", cidr, err) + } + } + } + delete(plugin.podCIDRs, id) + + if err := plugin.cniConfig.DelNetwork(plugin.netConfig, rt); err != nil { + return fmt.Errorf("Error removing container from network: %v", err) + } + + return nil +} + +// TODO: Use the addToNetwork function to obtain the IP of the Pod. That will assume idempotent ADD call to the plugin. +// Also fix the runtime's call to Status function to be done only in the case that the IP is lost, no need to do periodic calls +func (plugin *kubenetNetworkPlugin) Status(namespace string, name string, id kubecontainer.DockerID) (*network.PodNetworkStatus, error) { + cidr, ok := plugin.podCIDRs[id] + if !ok { + return nil, fmt.Errorf("No IP address found for pod %v", id) + } + + ip, _, err := net.ParseCIDR(strings.Trim(cidr, "\n")) + if err != nil { + return nil, err + } + return &network.PodNetworkStatus{IP: ip}, nil +} + +func buildCNIRuntimeConf(podName string, podNs string, podInfraContainerID kubecontainer.ContainerID, podNetnsPath string) *libcni.RuntimeConf { + glog.V(4).Infof("Kubenet: using netns path %v", podNetnsPath) + glog.V(4).Infof("Kubenet: using podns path %v", podNs) + + return &libcni.RuntimeConf{ + ContainerID: podInfraContainerID.ID, + NetNS: podNetnsPath, + IfName: DefaultInterfaceName, + } +} diff --git a/pkg/kubelet/network/kubenet/kubenet_unsupported.go b/pkg/kubelet/network/kubenet/kubenet_unsupported.go new file mode 100644 index 00000000000..751db291370 --- /dev/null +++ b/pkg/kubelet/network/kubenet/kubenet_unsupported.go @@ -0,0 +1,55 @@ +// +build !linux + +/* +Copyright 2014 The Kubernetes Authors All rights reserved. + +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 kubenet + +import ( + "fmt" + + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/kubelet/network" +) + +type kubenetNetworkPlugin struct { +} + +func NewPlugin() network.NetworkPlugin { + return &kubenetNetworkPlugin{} +} + +func (plugin *kubenetNetworkPlugin) Init(host network.Host) error { + return fmt.Errorf("Kubenet is not supported in this build") +} +func (plugin *kubenetNetworkPlugin) Event(name string, details map[string]interface{}) { +} + +func (plugin *kubenetNetworkPlugin) Name() string { + return "kubenet" +} + +func (plugin *kubenetNetworkPlugin) SetUpPod(namespace string, name string, id kubecontainer.DockerID) error { + return fmt.Errorf("Kubenet is not supported in this build") +} + +func (plugin *kubenetNetworkPlugin) TearDownPod(namespace string, name string, id kubecontainer.DockerID) error { + return fmt.Errorf("Kubenet is not supported in this build") +} + +func (plugin *kubenetNetworkPlugin) Status(namespace string, name string, id kubecontainer.DockerID) (*network.PodNetworkStatus, error) { + return nil, fmt.Errorf("Kubenet is not supported in this build") +} From a0831a2378c613188dd877b5332788448e707a28 Mon Sep 17 00:00:00 2001 From: Rudi Chiarito Date: Fri, 29 Jan 2016 14:35:04 -0500 Subject: [PATCH 101/328] Mass fix of Infof and co. missing the trailing "f", even when formatting placeholders are used --- cmd/kubemark/hollow-node.go | 2 +- cmd/libs/go2idl/client-gen/main.go | 2 +- pkg/cloudprovider/providers/aws/aws.go | 4 ++-- pkg/cloudprovider/providers/openstack/openstack.go | 2 +- .../persistentvolume_provisioner_controller.go | 2 +- pkg/kubelet/rkt/rkt.go | 2 +- pkg/metrics/generic_metrics.go | 2 +- pkg/volume/empty_dir/empty_dir_linux.go | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/kubemark/hollow-node.go b/cmd/kubemark/hollow-node.go index e5bd5f122c1..49f2868584c 100644 --- a/cmd/kubemark/hollow-node.go +++ b/cmd/kubemark/hollow-node.go @@ -84,7 +84,7 @@ func main() { util.InitFlags() if !knownMorphs.Has(config.Morph) { - glog.Fatal("Unknown morph: %v. Allowed values: %v", config.Morph, knownMorphs.List()) + glog.Fatalf("Unknown morph: %v. Allowed values: %v", config.Morph, knownMorphs.List()) } // create a client to communicate with API server. diff --git a/cmd/libs/go2idl/client-gen/main.go b/cmd/libs/go2idl/client-gen/main.go index d7417f6e3e0..280c1c0ddec 100644 --- a/cmd/libs/go2idl/client-gen/main.go +++ b/cmd/libs/go2idl/client-gen/main.go @@ -98,7 +98,7 @@ func main() { if err != nil { glog.Fatalf("Error: %v", err) } - glog.Info("going to generate clientset from these input paths: %v", inputPath) + glog.Infof("going to generate clientset from these input paths: %v", inputPath) arguments.InputDirs = append(inputPath, dependencies...) // TODO: we need to make OutPackagePath a map[string]string. For example, // we need clientset and the individual typed clients be output to different diff --git a/pkg/cloudprovider/providers/aws/aws.go b/pkg/cloudprovider/providers/aws/aws.go index 514fe4d97ea..5cf18d44ddd 100644 --- a/pkg/cloudprovider/providers/aws/aws.go +++ b/pkg/cloudprovider/providers/aws/aws.go @@ -1206,7 +1206,7 @@ func (c *AWSCloud) AttachDisk(instanceName string, diskName string, readOnly boo return "", fmt.Errorf("Error attaching EBS volume: %v", err) } - glog.V(2).Info("AttachVolume request returned %v", attachResponse) + glog.V(2).Infof("AttachVolume request returned %v", attachResponse) } err = disk.waitForAttachmentStatus("attached") @@ -1833,7 +1833,7 @@ func (s *AWSCloud) EnsureLoadBalancer(name, region string, publicIP net.IP, port err = s.ensureLoadBalancerInstances(orEmpty(loadBalancer.LoadBalancerName), loadBalancer.Instances, instances) if err != nil { - glog.Warning("Error registering instances with the load balancer: %v", err) + glog.Warningf("Error registering instances with the load balancer: %v", err) return nil, err } diff --git a/pkg/cloudprovider/providers/openstack/openstack.go b/pkg/cloudprovider/providers/openstack/openstack.go index 320bc308566..7237615283f 100644 --- a/pkg/cloudprovider/providers/openstack/openstack.go +++ b/pkg/cloudprovider/providers/openstack/openstack.go @@ -679,7 +679,7 @@ func (lb *LoadBalancer) EnsureLoadBalancer(name, region string, loadBalancerIP n return nil, fmt.Errorf("unsupported load balancer affinity: %v", affinity) } - glog.V(2).Info("Checking if openstack load balancer already exists: %s", name) + glog.V(2).Infof("Checking if openstack load balancer already exists: %s", name) _, exists, err := lb.GetLoadBalancer(name, region) if err != nil { return nil, fmt.Errorf("error checking if openstack load balancer already exists: %v", err) diff --git a/pkg/controller/persistentvolume/persistentvolume_provisioner_controller.go b/pkg/controller/persistentvolume/persistentvolume_provisioner_controller.go index 32a30de2a53..e2398a88d0f 100644 --- a/pkg/controller/persistentvolume/persistentvolume_provisioner_controller.go +++ b/pkg/controller/persistentvolume/persistentvolume_provisioner_controller.go @@ -202,7 +202,7 @@ func (controller *PersistentVolumeProvisionerController) reconcileClaim(claim *a claim.Annotations[pvProvisioningRequiredAnnotationKey] = pvProvisioningCompletedAnnotationValue _, err = controller.client.UpdatePersistentVolumeClaim(claim) if err != nil { - glog.Error("error updating persistent volume claim: %v", err) + glog.Errorf("error updating persistent volume claim: %v", err) } return nil diff --git a/pkg/kubelet/rkt/rkt.go b/pkg/kubelet/rkt/rkt.go index cb393c7812a..56c6cefe533 100644 --- a/pkg/kubelet/rkt/rkt.go +++ b/pkg/kubelet/rkt/rkt.go @@ -1428,7 +1428,7 @@ func (r *Runtime) GetPodStatus(uid types.UID, name, namespace string) (*kubecont for _, pod := range listResp.Pods { manifest, creationTime, restartCount, err := getPodInfo(pod) if err != nil { - glog.Warning("rkt: Couldn't get necessary info from the rkt pod, (uuid %q): %v", pod.Id, err) + glog.Warningf("rkt: Couldn't get necessary info from the rkt pod, (uuid %q): %v", pod.Id, err) continue } diff --git a/pkg/metrics/generic_metrics.go b/pkg/metrics/generic_metrics.go index 57dd016d86c..eecae0e7091 100644 --- a/pkg/metrics/generic_metrics.go +++ b/pkg/metrics/generic_metrics.go @@ -134,7 +134,7 @@ func parseMetrics(data string, knownMetrics map[string][]string, output *Metrics if isKnownMetric || isCommonMetric { (*output)[name] = append((*output)[name], metric) } else { - glog.Warning("Unknown metric %v", metric) + glog.Warningf("Unknown metric %v", metric) if unknownMetrics != nil { unknownMetrics.Insert(name) } diff --git a/pkg/volume/empty_dir/empty_dir_linux.go b/pkg/volume/empty_dir/empty_dir_linux.go index 3c1f2ccd514..d1ecf2b9344 100644 --- a/pkg/volume/empty_dir/empty_dir_linux.go +++ b/pkg/volume/empty_dir/empty_dir_linux.go @@ -46,7 +46,7 @@ func (m *realMountDetector) GetMountMedium(path string) (storageMedium, bool, er return 0, false, fmt.Errorf("statfs(%q): %v", path, err) } - glog.V(5).Info("Statfs_t of %v: %+v", path, buf) + glog.V(5).Infof("Statfs_t of %v: %+v", path, buf) if buf.Type == linuxTmpfsMagic { return mediumMemory, !notMnt, nil } From 3b89db78bf41f05b55c89db0f6810de337b0d17f Mon Sep 17 00:00:00 2001 From: Isaac Hollander McCreery Date: Wed, 3 Feb 2016 09:06:08 -0800 Subject: [PATCH 102/328] Organize jobs in e2e.sh --- hack/jenkins/e2e.sh | 413 +++++++++++++++++++++++--------------------- 1 file changed, 214 insertions(+), 199 deletions(-) diff --git a/hack/jenkins/e2e.sh b/hack/jenkins/e2e.sh index 9980d55499d..a4ef1c9d7d8 100755 --- a/hack/jenkins/e2e.sh +++ b/hack/jenkins/e2e.sh @@ -303,6 +303,30 @@ GCE_PARALLEL_SKIP_TESTS=( # release branches defines relevant jobs for that particular version of # Kubernetes. case ${JOB_NAME} in + + # PR builder + + # Runs a subset of tests on GCE in parallel. Run against all pending PRs. + kubernetes-pull-build-test-e2e-gce) + : ${E2E_CLUSTER_NAME:="jnks-e2e-gce-${NODE_NAME}-${EXECUTOR_NUMBER}"} + : ${E2E_NETWORK:="e2e-gce-${NODE_NAME}-${EXECUTOR_NUMBER}"} + : ${GINKGO_PARALLEL:="y"} + # This list should match the list in kubernetes-e2e-gce-parallel. + : ${GINKGO_TEST_ARGS:="--ginkgo.skip=$(join_regex_allow_empty \ + ${GCE_DEFAULT_SKIP_TESTS[@]:+${GCE_DEFAULT_SKIP_TESTS[@]}} \ + ${GCE_PARALLEL_SKIP_TESTS[@]:+${GCE_PARALLEL_SKIP_TESTS[@]}} \ + ${GCE_FLAKY_TESTS[@]:+${GCE_FLAKY_TESTS[@]}} \ + ${GCE_SLOW_TESTS[@]:+${GCE_SLOW_TESTS[@]}} \ + )"} + : ${KUBE_GCE_INSTANCE_PREFIX:="e2e-gce-${NODE_NAME}-${EXECUTOR_NUMBER}"} + : ${PROJECT:="kubernetes-jenkins-pull"} + : ${ENABLE_DEPLOYMENTS:=true} + # Override GCE defaults + NUM_NODES=${NUM_NODES_PARALLEL} + ;; + + # GCE core jobs + # Runs all non-slow, non-serial, non-flaky, tests on GCE in parallel. kubernetes-e2e-gce) : ${E2E_CLUSTER_NAME:="jenkins-gce-e2e"} @@ -317,6 +341,113 @@ case ${JOB_NAME} in : ${FAIL_ON_GCP_RESOURCE_LEAK:="true"} ;; + # Runs slow tests on GCE, sequentially. + kubernetes-e2e-gce-slow) + : ${E2E_CLUSTER_NAME:="jenkins-gce-e2e-slow"} + : ${E2E_NETWORK:="e2e-slow"} + # TODO(ihmccreery) remove [Skipped] once tetss are relabeled + : ${GINKGO_TEST_ARGS:="--ginkgo.focus=\[Slow\] \ + --ginkgo.skip=\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]|\[Skipped\]"} + : ${GINKGO_PARALLEL:="y"} + : ${KUBE_GCE_INSTANCE_PREFIX:="e2e-slow"} + : ${PROJECT:="k8s-jkns-e2e-gce-slow"} + : ${FAIL_ON_GCP_RESOURCE_LEAK:="true"} + ;; + + # Run the [Serial], [Disruptive], and [Feature:Restart] tests on GCE. + kubernetes-e2e-gce-serial) + : ${E2E_CLUSTER_NAME:="jenkins-gce-e2e-serial"} + : ${E2E_NETWORK:="jenkins-gce-e2e-serial"} + : ${FAIL_ON_GCP_RESOURCE_LEAK:="true"} + : ${GINKGO_TEST_ARGS:="--ginkgo.focus=\[Serial\]|\[Disruptive\] \ + --ginkgo.skip=\[Flaky\]|\[Feature:.+\]"} + : ${KUBE_GCE_INSTANCE_PREFIX:="e2e-serial"} + : ${PROJECT:="kubernetes-jkns-e2e-gce-serial"} + ;; + + # Runs the flaky tests on GCE, sequentially. + kubernetes-e2e-gce-flaky) + : ${E2E_CLUSTER_NAME:="jenkins-gce-e2e-flaky"} + : ${E2E_NETWORK:="e2e-flaky"} + : ${GINKGO_TEST_ARGS:="--ginkgo.skip=$(join_regex_allow_empty \ + ${GCE_DEFAULT_SKIP_TESTS[@]:+${GCE_DEFAULT_SKIP_TESTS[@]}} \ + ) --ginkgo.focus=$(join_regex_no_empty \ + ${GCE_FLAKY_TESTS[@]:+${GCE_FLAKY_TESTS[@]}} \ + )"} + : ${KUBE_GCE_INSTANCE_PREFIX:="e2e-flaky"} + : ${PROJECT:="k8s-jkns-e2e-gce-flaky"} + : ${FAIL_ON_GCP_RESOURCE_LEAK:="true"} + : ${E2E_DOWN:="true"} + ;; + + # Runs the flaky tests on GCE in parallel. + kubernetes-e2e-gce-parallel-flaky) + : ${E2E_CLUSTER_NAME:="parallel-flaky"} + : ${E2E_NETWORK:="e2e-parallel-flaky"} + : ${GINKGO_PARALLEL:="y"} + : ${GINKGO_TEST_ARGS:="--ginkgo.skip=$(join_regex_allow_empty \ + ${GCE_DEFAULT_SKIP_TESTS[@]:+${GCE_DEFAULT_SKIP_TESTS[@]}} \ + ${GCE_PARALLEL_SKIP_TESTS[@]:+${GCE_PARALLEL_SKIP_TESTS[@]}} \ + ) --ginkgo.focus=$(join_regex_no_empty \ + ${GCE_FLAKY_TESTS[@]:+${GCE_FLAKY_TESTS[@]}} \ + )"} + : ${KUBE_GCE_INSTANCE_PREFIX:="parallel-flaky"} + : ${PROJECT:="k8s-jkns-e2e-gce-prl-flaky"} + : ${FAIL_ON_GCP_RESOURCE_LEAK:="true"} + # Override GCE defaults. + NUM_NODES=${NUM_NODES_PARALLEL} + ;; + + # GKE core jobs + + # Runs all non-slow, non-serial, non-flaky, tests on GKE in parallel. + kubernetes-e2e-gke) + : ${E2E_CLUSTER_NAME:="jkns-gke-e2e-ci"} + : ${E2E_NETWORK:="e2e-gke-ci"} + : ${E2E_SET_CLUSTER_API_VERSION:=y} + : ${PROJECT:="k8s-jkns-e2e-gke-ci"} + : ${FAIL_ON_GCP_RESOURCE_LEAK:="true"} + # TODO(ihmccreery) remove [Skipped] once tests are relabeled + : ${GINKGO_TEST_ARGS:="--ginkgo.skip=\[Slow\]|\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]|\[Skipped\]"} + : ${GINKGO_PARALLEL:="y"} + ;; + + kubernetes-e2e-gke-slow) + : ${E2E_CLUSTER_NAME:="jkns-gke-e2e-slow"} + : ${E2E_NETWORK:="e2e-gke-slow"} + : ${E2E_SET_CLUSTER_API_VERSION:=y} + : ${PROJECT:="k8s-jkns-e2e-gke-slow"} + : ${FAIL_ON_GCP_RESOURCE_LEAK:="true"} + # TODO(ihmccreery) remove [Skipped] once tetss are relabeled + : ${GINKGO_TEST_ARGS:="--ginkgo.focus=\[Slow\] \ + --ginkgo.skip=\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]|\[Skipped\]"} + : ${GINKGO_PARALLEL:="y"} + ;; + + # Run the [Serial], [Disruptive], and [Feature:Restart] tests on GKE. + kubernetes-e2e-gke-serial) + : ${E2E_CLUSTER_NAME:="jenkins-gke-e2e-serial"} + : ${E2E_NETWORK:="jenkins-gke-e2e-serial"} + : ${E2E_SET_CLUSTER_API_VERSION:=y} + : ${FAIL_ON_GCP_RESOURCE_LEAK:="true"} + : ${GINKGO_TEST_ARGS:="--ginkgo.focus=\[Serial\]|\[Disruptive\] \ + --ginkgo.skip=\[Flaky\]|\[Feature:.+\]"} + : ${PROJECT:="jenkins-gke-e2e-serial"} + ;; + + kubernetes-e2e-gke-flaky) + : ${E2E_CLUSTER_NAME:="kubernetes-gke-e2e-flaky"} + : ${E2E_NETWORK:="gke-e2e-flaky"} + : ${E2E_SET_CLUSTER_API_VERSION:=y} + : ${PROJECT:="k8s-jkns-e2e-gke-ci-flaky"} + : ${FAIL_ON_GCP_RESOURCE_LEAK:="true"} + : ${GINKGO_TEST_ARGS:="--ginkgo.focus=$(join_regex_no_empty \ + ${GCE_FLAKY_TESTS[@]:+${GCE_FLAKY_TESTS[@]}} \ + )"} + ;; + + # AWS core jobs + # Runs all non-flaky, non-slow tests on AWS, sequentially. kubernetes-e2e-aws) : ${E2E_PUBLISH_GREEN_VERSION:=true} @@ -339,6 +470,23 @@ case ${JOB_NAME} in : ${AWS_SHARED_CREDENTIALS_FILE:='/var/lib/jenkins/.aws/credentials'} ;; + # Runs all non-flaky tests on AWS in parallel. + kubernetes-e2e-aws-parallel) + : ${E2E_CLUSTER_NAME:="jenkins-aws-e2e-parallel"} + : ${E2E_NETWORK:="e2e-parallel"} + : ${GINKGO_PARALLEL:="y"} + : ${GINKGO_TEST_ARGS:="--ginkgo.skip=$(join_regex_allow_empty \ + ${GCE_DEFAULT_SKIP_TESTS[@]:+${GCE_DEFAULT_SKIP_TESTS[@]}} \ + ${GCE_PARALLEL_SKIP_TESTS[@]:+${GCE_PARALLEL_SKIP_TESTS[@]}} \ + ${GCE_FLAKY_TESTS[@]:+${GCE_FLAKY_TESTS[@]}} \ + )"} + : ${ENABLE_DEPLOYMENTS:=true} + # Override AWS defaults. + NUM_NODES=${NUM_NODES_PARALLEL} + ;; + + # Feature jobs + # Runs only the examples tests on GCE. kubernetes-e2e-gce-examples) : ${E2E_CLUSTER_NAME:="jenkins-gce-e2e-examples"} @@ -361,108 +509,6 @@ case ${JOB_NAME} in ADMISSION_CONTROL="NamespaceLifecycle,InitialResources,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota" ;; - # Runs the flaky tests on GCE, sequentially. - kubernetes-e2e-gce-flaky) - : ${E2E_CLUSTER_NAME:="jenkins-gce-e2e-flaky"} - : ${E2E_NETWORK:="e2e-flaky"} - : ${GINKGO_TEST_ARGS:="--ginkgo.skip=$(join_regex_allow_empty \ - ${GCE_DEFAULT_SKIP_TESTS[@]:+${GCE_DEFAULT_SKIP_TESTS[@]}} \ - ) --ginkgo.focus=$(join_regex_no_empty \ - ${GCE_FLAKY_TESTS[@]:+${GCE_FLAKY_TESTS[@]}} \ - )"} - : ${KUBE_GCE_INSTANCE_PREFIX:="e2e-flaky"} - : ${PROJECT:="k8s-jkns-e2e-gce-flaky"} - : ${FAIL_ON_GCP_RESOURCE_LEAK:="true"} - : ${E2E_DOWN:="true"} - ;; - - # Runs slow tests on GCE, sequentially. - kubernetes-e2e-gce-slow) - : ${E2E_CLUSTER_NAME:="jenkins-gce-e2e-slow"} - : ${E2E_NETWORK:="e2e-slow"} - # TODO(ihmccreery) remove [Skipped] once tetss are relabeled - : ${GINKGO_TEST_ARGS:="--ginkgo.focus=\[Slow\] \ - --ginkgo.skip=\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]|\[Skipped\]"} - : ${GINKGO_PARALLEL:="y"} - : ${KUBE_GCE_INSTANCE_PREFIX:="e2e-slow"} - : ${PROJECT:="k8s-jkns-e2e-gce-slow"} - : ${FAIL_ON_GCP_RESOURCE_LEAK:="true"} - ;; - - # Runs a subset of tests on GCE in parallel. Run against all pending PRs. - kubernetes-pull-build-test-e2e-gce) - : ${E2E_CLUSTER_NAME:="jnks-e2e-gce-${NODE_NAME}-${EXECUTOR_NUMBER}"} - : ${E2E_NETWORK:="e2e-gce-${NODE_NAME}-${EXECUTOR_NUMBER}"} - : ${GINKGO_PARALLEL:="y"} - # This list should match the list in kubernetes-e2e-gce-parallel. - : ${GINKGO_TEST_ARGS:="--ginkgo.skip=$(join_regex_allow_empty \ - ${GCE_DEFAULT_SKIP_TESTS[@]:+${GCE_DEFAULT_SKIP_TESTS[@]}} \ - ${GCE_PARALLEL_SKIP_TESTS[@]:+${GCE_PARALLEL_SKIP_TESTS[@]}} \ - ${GCE_FLAKY_TESTS[@]:+${GCE_FLAKY_TESTS[@]}} \ - ${GCE_SLOW_TESTS[@]:+${GCE_SLOW_TESTS[@]}} \ - )"} - : ${KUBE_GCE_INSTANCE_PREFIX:="e2e-gce-${NODE_NAME}-${EXECUTOR_NUMBER}"} - : ${PROJECT:="kubernetes-jenkins-pull"} - : ${ENABLE_DEPLOYMENTS:=true} - # Override GCE defaults - NUM_NODES=${NUM_NODES_PARALLEL} - ;; - - # Runs all non-flaky tests on AWS in parallel. - kubernetes-e2e-aws-parallel) - : ${E2E_CLUSTER_NAME:="jenkins-aws-e2e-parallel"} - : ${E2E_NETWORK:="e2e-parallel"} - : ${GINKGO_PARALLEL:="y"} - : ${GINKGO_TEST_ARGS:="--ginkgo.skip=$(join_regex_allow_empty \ - ${GCE_DEFAULT_SKIP_TESTS[@]:+${GCE_DEFAULT_SKIP_TESTS[@]}} \ - ${GCE_PARALLEL_SKIP_TESTS[@]:+${GCE_PARALLEL_SKIP_TESTS[@]}} \ - ${GCE_FLAKY_TESTS[@]:+${GCE_FLAKY_TESTS[@]}} \ - )"} - : ${ENABLE_DEPLOYMENTS:=true} - # Override AWS defaults. - NUM_NODES=${NUM_NODES_PARALLEL} - ;; - - # Runs the flaky tests on GCE in parallel. - kubernetes-e2e-gce-parallel-flaky) - : ${E2E_CLUSTER_NAME:="parallel-flaky"} - : ${E2E_NETWORK:="e2e-parallel-flaky"} - : ${GINKGO_PARALLEL:="y"} - : ${GINKGO_TEST_ARGS:="--ginkgo.skip=$(join_regex_allow_empty \ - ${GCE_DEFAULT_SKIP_TESTS[@]:+${GCE_DEFAULT_SKIP_TESTS[@]}} \ - ${GCE_PARALLEL_SKIP_TESTS[@]:+${GCE_PARALLEL_SKIP_TESTS[@]}} \ - ) --ginkgo.focus=$(join_regex_no_empty \ - ${GCE_FLAKY_TESTS[@]:+${GCE_FLAKY_TESTS[@]}} \ - )"} - : ${KUBE_GCE_INSTANCE_PREFIX:="parallel-flaky"} - : ${PROJECT:="k8s-jkns-e2e-gce-prl-flaky"} - : ${FAIL_ON_GCP_RESOURCE_LEAK:="true"} - # Override GCE defaults. - NUM_NODES=${NUM_NODES_PARALLEL} - ;; - - # Run the [Serial], [Disruptive], and [Feature:Restart] tests on GCE. - kubernetes-e2e-gce-serial) - : ${E2E_CLUSTER_NAME:="jenkins-gce-e2e-serial"} - : ${E2E_NETWORK:="jenkins-gce-e2e-serial"} - : ${FAIL_ON_GCP_RESOURCE_LEAK:="true"} - : ${GINKGO_TEST_ARGS:="--ginkgo.focus=\[Serial\]|\[Disruptive\] \ - --ginkgo.skip=\[Flaky\]|\[Feature:.+\]"} - : ${KUBE_GCE_INSTANCE_PREFIX:="e2e-serial"} - : ${PROJECT:="kubernetes-jkns-e2e-gce-serial"} - ;; - - # Run the [Serial], [Disruptive], and [Feature:Restart] tests on GKE. - kubernetes-e2e-gke-serial) - : ${E2E_CLUSTER_NAME:="jenkins-gke-e2e-serial"} - : ${E2E_NETWORK:="jenkins-gke-e2e-serial"} - : ${E2E_SET_CLUSTER_API_VERSION:=y} - : ${FAIL_ON_GCP_RESOURCE_LEAK:="true"} - : ${GINKGO_TEST_ARGS:="--ginkgo.focus=\[Serial\]|\[Disruptive\] \ - --ginkgo.skip=\[Flaky\]|\[Feature:.+\]"} - : ${PROJECT:="jenkins-gke-e2e-serial"} - ;; - # Runs the performance/scalability tests on GCE. A larger cluster is used. kubernetes-e2e-gce-scalability) : ${E2E_CLUSTER_NAME:="jenkins-gce-e2e-scalability"} @@ -530,6 +576,70 @@ case ${JOB_NAME} in TEST_CLUSTER_RESYNC_PERIOD="--min-resync-period=12h" ;; + # Run Kubemark test on a fake 100 node cluster to have a comparison + # to the real results from scalability suite + kubernetes-kubemark-gce) + : ${E2E_CLUSTER_NAME:="kubernetes-kubemark"} + : ${E2E_NETWORK:="kubernetes-kubemark"} + : ${PROJECT:="k8s-jenkins-kubemark"} + : ${E2E_UP:="true"} + : ${E2E_DOWN:="true"} + : ${E2E_TEST:="false"} + : ${USE_KUBEMARK:="true"} + # Override defaults to be indpendent from GCE defaults and set kubemark parameters + KUBE_GCE_INSTANCE_PREFIX="kubemark100" + NUM_NODES="10" + MASTER_SIZE="n1-standard-2" + NODE_SIZE="n1-standard-1" + E2E_ZONE="asia-east1-a" + KUBEMARK_MASTER_SIZE="n1-standard-4" + KUBEMARK_NUM_NODES="100" + ;; + + # Run Kubemark test on a fake 500 node cluster to test for regressions on + # bigger clusters + kubernetes-kubemark-500-gce) + : ${E2E_CLUSTER_NAME:="kubernetes-kubemark-500"} + : ${E2E_NETWORK:="kubernetes-kubemark-500"} + : ${PROJECT:="kubernetes-scale"} + : ${E2E_UP:="true"} + : ${E2E_DOWN:="true"} + : ${E2E_TEST:="false"} + : ${USE_KUBEMARK:="true"} + # Override defaults to be indpendent from GCE defaults and set kubemark parameters + NUM_NODES="6" + MASTER_SIZE="n1-standard-4" + NODE_SIZE="n1-standard-8" + KUBE_GCE_INSTANCE_PREFIX="kubemark500" + E2E_ZONE="us-east1-b" + KUBEMARK_MASTER_SIZE="n1-standard-16" + KUBEMARK_NUM_NODES="500" + ;; + + # Run big Kubemark test, this currently means a 1000 node cluster and 16 core master + kubernetes-kubemark-gce-scale) + : ${E2E_CLUSTER_NAME:="kubernetes-kubemark-scale"} + : ${E2E_NETWORK:="kubernetes-kubemark-scale"} + : ${PROJECT:="kubernetes-scale"} + : ${E2E_UP:="true"} + : ${E2E_DOWN:="true"} + : ${E2E_TEST:="false"} + : ${USE_KUBEMARK:="true"} + # Override defaults to be indpendent from GCE defaults and set kubemark parameters + # We need 11 so that we won't hit max-pods limit (set to 100). TODO: do it in a nicer way. + NUM_NODES="11" + MASTER_SIZE="n1-standard-4" + NODE_SIZE="n1-standard-8" # Note: can fit about 17 hollow nodes per core + # so NUM_NODES x cores_per_node should + # be set accordingly. + KUBE_GCE_INSTANCE_PREFIX="kubemark1000" + E2E_ZONE="us-east1-b" + KUBEMARK_MASTER_SIZE="n1-standard-16" + KUBEMARK_NUM_NODES="1000" + ;; + + # Soak jobs + # Sets up the GCE soak cluster weekly using the latest CI release. kubernetes-soak-weekly-deploy-gce) : ${E2E_CLUSTER_NAME:="gce-soak-weekly"} @@ -561,41 +671,6 @@ case ${JOB_NAME} in : ${PROJECT:="kubernetes-jenkins"} ;; - # Runs all non-slow, non-serial, non-flaky, tests on GKE in parallel. - kubernetes-e2e-gke) - : ${E2E_CLUSTER_NAME:="jkns-gke-e2e-ci"} - : ${E2E_NETWORK:="e2e-gke-ci"} - : ${E2E_SET_CLUSTER_API_VERSION:=y} - : ${PROJECT:="k8s-jkns-e2e-gke-ci"} - : ${FAIL_ON_GCP_RESOURCE_LEAK:="true"} - # TODO(ihmccreery) remove [Skipped] once tests are relabeled - : ${GINKGO_TEST_ARGS:="--ginkgo.skip=\[Slow\]|\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]|\[Skipped\]"} - : ${GINKGO_PARALLEL:="y"} - ;; - - kubernetes-e2e-gke-slow) - : ${E2E_CLUSTER_NAME:="jkns-gke-e2e-slow"} - : ${E2E_NETWORK:="e2e-gke-slow"} - : ${E2E_SET_CLUSTER_API_VERSION:=y} - : ${PROJECT:="k8s-jkns-e2e-gke-slow"} - : ${FAIL_ON_GCP_RESOURCE_LEAK:="true"} - # TODO(ihmccreery) remove [Skipped] once tetss are relabeled - : ${GINKGO_TEST_ARGS:="--ginkgo.focus=\[Slow\] \ - --ginkgo.skip=\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]|\[Skipped\]"} - : ${GINKGO_PARALLEL:="y"} - ;; - - kubernetes-e2e-gke-flaky) - : ${E2E_CLUSTER_NAME:="kubernetes-gke-e2e-flaky"} - : ${E2E_NETWORK:="gke-e2e-flaky"} - : ${E2E_SET_CLUSTER_API_VERSION:=y} - : ${PROJECT:="k8s-jkns-e2e-gke-ci-flaky"} - : ${FAIL_ON_GCP_RESOURCE_LEAK:="true"} - : ${GINKGO_TEST_ARGS:="--ginkgo.focus=$(join_regex_no_empty \ - ${GCE_FLAKY_TESTS[@]:+${GCE_FLAKY_TESTS[@]}} \ - )"} - ;; - # Sets up the GKE soak cluster weekly using the latest CI release. kubernetes-soak-weekly-deploy-gke) : ${E2E_CLUSTER_NAME:="jenkins-gke-soak-weekly"} @@ -630,6 +705,8 @@ case ${JOB_NAME} in )"} ;; + # Upgrade jobs + # kubernetes-upgrade-gke-1.0-master # # Test upgrades from the latest release-1.0 build to the latest master build. @@ -813,68 +890,6 @@ case ${JOB_NAME} in : ${KUBE_GCE_INSTANCE_PREFIX:="e2e-upgrade-1-0"} : ${NUM_NODES:=5} ;; - - # Run Kubemark test on a fake 100 node cluster to have a comparison - # to the real results from scalability suite - kubernetes-kubemark-gce) - : ${E2E_CLUSTER_NAME:="kubernetes-kubemark"} - : ${E2E_NETWORK:="kubernetes-kubemark"} - : ${PROJECT:="k8s-jenkins-kubemark"} - : ${E2E_UP:="true"} - : ${E2E_DOWN:="true"} - : ${E2E_TEST:="false"} - : ${USE_KUBEMARK:="true"} - # Override defaults to be indpendent from GCE defaults and set kubemark parameters - KUBE_GCE_INSTANCE_PREFIX="kubemark100" - NUM_NODES="10" - MASTER_SIZE="n1-standard-2" - NODE_SIZE="n1-standard-1" - E2E_ZONE="asia-east1-a" - KUBEMARK_MASTER_SIZE="n1-standard-4" - KUBEMARK_NUM_NODES="100" - ;; - - # Run Kubemark test on a fake 500 node cluster to test for regressions on - # bigger clusters - kubernetes-kubemark-500-gce) - : ${E2E_CLUSTER_NAME:="kubernetes-kubemark-500"} - : ${E2E_NETWORK:="kubernetes-kubemark-500"} - : ${PROJECT:="kubernetes-scale"} - : ${E2E_UP:="true"} - : ${E2E_DOWN:="true"} - : ${E2E_TEST:="false"} - : ${USE_KUBEMARK:="true"} - # Override defaults to be indpendent from GCE defaults and set kubemark parameters - NUM_NODES="6" - MASTER_SIZE="n1-standard-4" - NODE_SIZE="n1-standard-8" - KUBE_GCE_INSTANCE_PREFIX="kubemark500" - E2E_ZONE="us-east1-b" - KUBEMARK_MASTER_SIZE="n1-standard-16" - KUBEMARK_NUM_NODES="500" - ;; - - # Run big Kubemark test, this currently means a 1000 node cluster and 16 core master - kubernetes-kubemark-gce-scale) - : ${E2E_CLUSTER_NAME:="kubernetes-kubemark-scale"} - : ${E2E_NETWORK:="kubernetes-kubemark-scale"} - : ${PROJECT:="kubernetes-scale"} - : ${E2E_UP:="true"} - : ${E2E_DOWN:="true"} - : ${E2E_TEST:="false"} - : ${USE_KUBEMARK:="true"} - # Override defaults to be indpendent from GCE defaults and set kubemark parameters - # We need 11 so that we won't hit max-pods limit (set to 100). TODO: do it in a nicer way. - NUM_NODES="11" - MASTER_SIZE="n1-standard-4" - NODE_SIZE="n1-standard-8" # Note: can fit about 17 hollow nodes per core - # so NUM_NODES x cores_per_node should - # be set accordingly. - KUBE_GCE_INSTANCE_PREFIX="kubemark1000" - E2E_ZONE="us-east1-b" - KUBEMARK_MASTER_SIZE="n1-standard-16" - KUBEMARK_NUM_NODES="1000" - ;; esac # Skip gcloud update checking From 24b8125bb11f0debf6418b4e1340bd8c8f8274e9 Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Wed, 3 Feb 2016 10:15:38 -0800 Subject: [PATCH 103/328] Revert "Disable flaky test." --- hack/test-cmd.sh | 55 +++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 29 deletions(-) diff --git a/hack/test-cmd.sh b/hack/test-cmd.sh index 513086d9b69..62dae08321c 100755 --- a/hack/test-cmd.sh +++ b/hack/test-cmd.sh @@ -36,7 +36,6 @@ function stop-proxy() PROXY_PORT_FILE= } - # Starts "kubect proxy" to test the client proxy. $1: api_prefix function start-proxy() { @@ -249,34 +248,32 @@ runTests() { ####################### # kubectl local proxy # ####################### -# This next block disabled until non-racy solution to -# port allocation can be found (#19999). -# -# # Make sure the UI can be proxied -# start-proxy -# check-curl-proxy-code /ui 301 -# check-curl-proxy-code /metrics 200 -# check-curl-proxy-code /api/ui 404 -# if [[ -n "${version}" ]]; then -# check-curl-proxy-code /api/${version}/namespaces 200 -# fi -# check-curl-proxy-code /static/ 200 -# stop-proxy -# -# # Make sure the in-development api is accessible by default -# start-proxy -# check-curl-proxy-code /apis 200 -# check-curl-proxy-code /apis/extensions/ 200 -# stop-proxy -# -# # Custom paths let you see everything. -# start-proxy /custom -# check-curl-proxy-code /custom/ui 301 -# check-curl-proxy-code /custom/metrics 200 -# if [[ -n "${version}" ]]; then -# check-curl-proxy-code /custom/api/${version}/namespaces 200 -# fi -# stop-proxy + + # Make sure the UI can be proxied + start-proxy + check-curl-proxy-code /ui 301 + check-curl-proxy-code /metrics 200 + check-curl-proxy-code /api/ui 404 + if [[ -n "${version}" ]]; then + check-curl-proxy-code /api/${version}/namespaces 200 + fi + check-curl-proxy-code /static/ 200 + stop-proxy + + # Make sure the in-development api is accessible by default + start-proxy + check-curl-proxy-code /apis 200 + check-curl-proxy-code /apis/extensions/ 200 + stop-proxy + + # Custom paths let you see everything. + start-proxy /custom + check-curl-proxy-code /custom/ui 301 + check-curl-proxy-code /custom/metrics 200 + if [[ -n "${version}" ]]; then + check-curl-proxy-code /custom/api/${version}/namespaces 200 + fi + stop-proxy ########################### # POD creation / deletion # From 5088d0e1474c25facdb1126ed0f885b4c6425a8b Mon Sep 17 00:00:00 2001 From: Janet Kuo Date: Fri, 22 Jan 2016 10:33:23 -0800 Subject: [PATCH 104/328] Record kubectl commands --- contrib/completions/bash/kubectl | 11 ++++ docs/man/man1/kubectl-annotate.1 | 4 ++ docs/man/man1/kubectl-apply.1 | 4 ++ docs/man/man1/kubectl-autoscale.1 | 4 ++ docs/man/man1/kubectl-create.1 | 4 ++ docs/man/man1/kubectl-edit.1 | 4 ++ docs/man/man1/kubectl-expose.1 | 4 ++ docs/man/man1/kubectl-label.1 | 4 ++ docs/man/man1/kubectl-patch.1 | 4 ++ docs/man/man1/kubectl-replace.1 | 4 ++ docs/man/man1/kubectl-run.1 | 4 ++ docs/man/man1/kubectl-scale.1 | 4 ++ docs/user-guide/kubectl/kubectl_annotate.md | 3 +- docs/user-guide/kubectl/kubectl_apply.md | 3 +- docs/user-guide/kubectl/kubectl_autoscale.md | 3 +- docs/user-guide/kubectl/kubectl_create.md | 3 +- docs/user-guide/kubectl/kubectl_edit.md | 3 +- docs/user-guide/kubectl/kubectl_expose.md | 3 +- docs/user-guide/kubectl/kubectl_label.md | 3 +- docs/user-guide/kubectl/kubectl_patch.md | 3 +- docs/user-guide/kubectl/kubectl_replace.md | 3 +- docs/user-guide/kubectl/kubectl_run.md | 3 +- docs/user-guide/kubectl/kubectl_scale.md | 3 +- .../deployment/deployment_controller.go | 7 +++ pkg/kubectl/cmd/annotate.go | 15 +++++ pkg/kubectl/cmd/apply.go | 19 +++++++ pkg/kubectl/cmd/autoscale.go | 7 +++ pkg/kubectl/cmd/create.go | 7 +++ pkg/kubectl/cmd/edit.go | 7 +++ pkg/kubectl/cmd/expose.go | 7 +++ pkg/kubectl/cmd/label.go | 6 ++ pkg/kubectl/cmd/patch.go | 11 ++++ pkg/kubectl/cmd/replace.go | 13 +++++ pkg/kubectl/cmd/run.go | 10 ++++ pkg/kubectl/cmd/run_test.go | 1 + pkg/kubectl/cmd/scale.go | 20 +++++++ pkg/kubectl/cmd/util/factory.go | 14 +++++ pkg/kubectl/cmd/util/helpers.go | 56 +++++++++++++++++++ 38 files changed, 277 insertions(+), 11 deletions(-) diff --git a/contrib/completions/bash/kubectl b/contrib/completions/bash/kubectl index 03af9e59d88..2afcb8ea9fa 100644 --- a/contrib/completions/bash/kubectl +++ b/contrib/completions/bash/kubectl @@ -616,6 +616,7 @@ _kubectl_create() flags_completion+=("__handle_filename_extension_flag json|yaml|yml") flags+=("--output=") two_word_flags+=("-o") + flags+=("--record") flags+=("--save-config") flags+=("--schema-cache-dir=") flags+=("--validate") @@ -671,6 +672,7 @@ _kubectl_replace() flags+=("--grace-period=") flags+=("--output=") two_word_flags+=("-o") + flags+=("--record") flags+=("--save-config") flags+=("--schema-cache-dir=") flags+=("--timeout=") @@ -726,6 +728,7 @@ _kubectl_patch() two_word_flags+=("-o") flags+=("--patch=") two_word_flags+=("-p") + flags+=("--record") flags+=("--alsologtostderr") flags+=("--api-version=") flags+=("--certificate-authority=") @@ -852,6 +855,7 @@ _kubectl_edit() flags+=("--output=") two_word_flags+=("-o") flags+=("--output-version=") + flags+=("--record") flags+=("--save-config") flags+=("--windows-line-endings") flags+=("--alsologtostderr") @@ -901,6 +905,7 @@ _kubectl_apply() flags_completion+=("__handle_filename_extension_flag json|yaml|yml") flags+=("--output=") two_word_flags+=("-o") + flags+=("--record") flags+=("--schema-cache-dir=") flags+=("--validate") flags+=("--alsologtostderr") @@ -1110,6 +1115,7 @@ _kubectl_scale() flags_completion+=("__handle_filename_extension_flag json|yaml|yml") flags+=("--output=") two_word_flags+=("-o") + flags+=("--record") flags+=("--replicas=") flags+=("--resource-version=") flags+=("--timeout=") @@ -1477,6 +1483,7 @@ _kubectl_run() flags+=("--output-version=") flags+=("--overrides=") flags+=("--port=") + flags+=("--record") flags+=("--replicas=") two_word_flags+=("-r") flags+=("--requests=") @@ -1555,6 +1562,7 @@ _kubectl_expose() flags+=("--overrides=") flags+=("--port=") flags+=("--protocol=") + flags+=("--record") flags+=("--save-config") flags+=("--selector=") flags+=("--session-affinity=") @@ -1620,6 +1628,7 @@ _kubectl_autoscale() flags+=("--output=") two_word_flags+=("-o") flags+=("--output-version=") + flags+=("--record") flags+=("--save-config") flags+=("--show-all") flags+=("-a") @@ -1857,6 +1866,7 @@ _kubectl_label() two_word_flags+=("-o") flags+=("--output-version=") flags+=("--overwrite") + flags+=("--record") flags+=("--resource-version=") flags+=("--selector=") two_word_flags+=("-l") @@ -1938,6 +1948,7 @@ _kubectl_annotate() two_word_flags+=("-o") flags+=("--output-version=") flags+=("--overwrite") + flags+=("--record") flags+=("--resource-version=") flags+=("--selector=") two_word_flags+=("-l") diff --git a/docs/man/man1/kubectl-annotate.1 b/docs/man/man1/kubectl-annotate.1 index 84de22540fa..3ff4336f227 100644 --- a/docs/man/man1/kubectl-annotate.1 +++ b/docs/man/man1/kubectl-annotate.1 @@ -55,6 +55,10 @@ horizontalpodautoscalers (hpa), resourcequotas (quota) or secrets. \fB\-\-overwrite\fP=false If true, allow annotations to be overwritten, otherwise reject annotation updates that overwrite existing annotations. +.PP +\fB\-\-record\fP=false + Record current kubectl command in the resource annotation. + .PP \fB\-\-resource\-version\fP="" If non\-empty, the annotation update will only succeed if this is the current resource\-version for the object. Only valid when specifying a single resource. diff --git a/docs/man/man1/kubectl-apply.1 b/docs/man/man1/kubectl-apply.1 index ad0418b3224..a5f3d080e00 100644 --- a/docs/man/man1/kubectl-apply.1 +++ b/docs/man/man1/kubectl-apply.1 @@ -29,6 +29,10 @@ JSON and YAML formats are accepted. \fB\-o\fP, \fB\-\-output\fP="" Output mode. Use "\-o name" for shorter output (resource/name). +.PP +\fB\-\-record\fP=false + Record current kubectl command in the resource annotation. + .PP \fB\-\-schema\-cache\-dir\fP="\~/.kube/schema" If non\-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema' diff --git a/docs/man/man1/kubectl-autoscale.1 b/docs/man/man1/kubectl-autoscale.1 index 348f55e05ed..867e4471b46 100644 --- a/docs/man/man1/kubectl-autoscale.1 +++ b/docs/man/man1/kubectl-autoscale.1 @@ -63,6 +63,10 @@ An autoscaler can automatically increase or decrease number of pods deployed wit \fB\-\-output\-version\fP="" Output the formatted object with the given version (default api\-version). +.PP +\fB\-\-record\fP=false + Record current kubectl command in the resource annotation. + .PP \fB\-\-save\-config\fP=false If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future. diff --git a/docs/man/man1/kubectl-create.1 b/docs/man/man1/kubectl-create.1 index e10b7828558..958b3ec2c71 100644 --- a/docs/man/man1/kubectl-create.1 +++ b/docs/man/man1/kubectl-create.1 @@ -28,6 +28,10 @@ JSON and YAML formats are accepted. \fB\-o\fP, \fB\-\-output\fP="" Output mode. Use "\-o name" for shorter output (resource/name). +.PP +\fB\-\-record\fP=false + Record current kubectl command in the resource annotation. + .PP \fB\-\-save\-config\fP=false If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future. diff --git a/docs/man/man1/kubectl-edit.1 b/docs/man/man1/kubectl-edit.1 index 0e833a7d1f8..5ac2eee6ab7 100644 --- a/docs/man/man1/kubectl-edit.1 +++ b/docs/man/man1/kubectl-edit.1 @@ -50,6 +50,10 @@ saved copy to include the latest resource version. \fB\-\-output\-version\fP="" Output the formatted object with the given version (default api\-version). +.PP +\fB\-\-record\fP=false + Record current kubectl command in the resource annotation. + .PP \fB\-\-save\-config\fP=false If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future. diff --git a/docs/man/man1/kubectl-expose.1 b/docs/man/man1/kubectl-expose.1 index 0be697f7a20..6865f091b7a 100644 --- a/docs/man/man1/kubectl-expose.1 +++ b/docs/man/man1/kubectl-expose.1 @@ -85,6 +85,10 @@ the new service will re\-use the labels from the resource it exposes. \fB\-\-protocol\fP="TCP" The network protocol for the service to be created. Default is 'tcp'. +.PP +\fB\-\-record\fP=false + Record current kubectl command in the resource annotation. + .PP \fB\-\-save\-config\fP=false If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future. diff --git a/docs/man/man1/kubectl-label.1 b/docs/man/man1/kubectl-label.1 index 755962a8bce..ea14efdac4f 100644 --- a/docs/man/man1/kubectl-label.1 +++ b/docs/man/man1/kubectl-label.1 @@ -52,6 +52,10 @@ If \-\-resource\-version is specified, then updates will use this resource versi \fB\-\-overwrite\fP=false If true, allow labels to be overwritten, otherwise reject label updates that overwrite existing labels. +.PP +\fB\-\-record\fP=false + Record current kubectl command in the resource annotation. + .PP \fB\-\-resource\-version\fP="" If non\-empty, the labels update will only succeed if this is the current resource\-version for the object. Only valid when specifying a single resource. diff --git a/docs/man/man1/kubectl-patch.1 b/docs/man/man1/kubectl-patch.1 index 454684f825d..ca1f1089924 100644 --- a/docs/man/man1/kubectl-patch.1 +++ b/docs/man/man1/kubectl-patch.1 @@ -36,6 +36,10 @@ Please refer to the models in \fB\-p\fP, \fB\-\-patch\fP="" The patch to be applied to the resource JSON file. +.PP +\fB\-\-record\fP=false + Record current kubectl command in the resource annotation. + .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP diff --git a/docs/man/man1/kubectl-replace.1 b/docs/man/man1/kubectl-replace.1 index 3418877c5e5..33eb80b7685 100644 --- a/docs/man/man1/kubectl-replace.1 +++ b/docs/man/man1/kubectl-replace.1 @@ -46,6 +46,10 @@ Please refer to the models in \fB\-o\fP, \fB\-\-output\fP="" Output mode. Use "\-o name" for shorter output (resource/name). +.PP +\fB\-\-record\fP=false + Record current kubectl command in the resource annotation. + .PP \fB\-\-save\-config\fP=false If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future. diff --git a/docs/man/man1/kubectl-run.1 b/docs/man/man1/kubectl-run.1 index bea0069e3b1..9131f717d05 100644 --- a/docs/man/man1/kubectl-run.1 +++ b/docs/man/man1/kubectl-run.1 @@ -84,6 +84,10 @@ Creates a replication controller or job to manage the created container(s). \fB\-\-port\fP=\-1 The port that this container exposes. If \-\-expose is true, this is also the port used by the service that is created. +.PP +\fB\-\-record\fP=false + Record current kubectl command in the resource annotation. + .PP \fB\-r\fP, \fB\-\-replicas\fP=1 Number of replicas to create for this container. Default is 1. diff --git a/docs/man/man1/kubectl-scale.1 b/docs/man/man1/kubectl-scale.1 index cea0bafa123..92b4f2daaf9 100644 --- a/docs/man/man1/kubectl-scale.1 +++ b/docs/man/man1/kubectl-scale.1 @@ -35,6 +35,10 @@ scale is sent to the server. \fB\-o\fP, \fB\-\-output\fP="" Output mode. Use "\-o name" for shorter output (resource/name). +.PP +\fB\-\-record\fP=false + Record current kubectl command in the resource annotation. + .PP \fB\-\-replicas\fP=\-1 The new desired number of replicas. Required. diff --git a/docs/user-guide/kubectl/kubectl_annotate.md b/docs/user-guide/kubectl/kubectl_annotate.md index 6cf45f22c99..5812ff4b6bd 100644 --- a/docs/user-guide/kubectl/kubectl_annotate.md +++ b/docs/user-guide/kubectl/kubectl_annotate.md @@ -88,6 +88,7 @@ $ kubectl annotate pods foo description- -o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md]. --output-version="": Output the formatted object with the given version (default api-version). --overwrite[=false]: If true, allow annotations to be overwritten, otherwise reject annotation updates that overwrite existing annotations. + --record[=false]: Record current kubectl command in the resource annotation. --resource-version="": If non-empty, the annotation update will only succeed if this is the current resource-version for the object. Only valid when specifying a single resource. -l, --selector="": Selector (label query) to filter on -a, --show-all[=false]: When printing, show all resources (default hide terminated pods.) @@ -127,7 +128,7 @@ $ kubectl annotate pods foo description- * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 8-Dec-2015 +###### Auto generated by spf13/cobra on 22-Jan-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_annotate.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_apply.md b/docs/user-guide/kubectl/kubectl_apply.md index f447378517e..0d2fca94f57 100644 --- a/docs/user-guide/kubectl/kubectl_apply.md +++ b/docs/user-guide/kubectl/kubectl_apply.md @@ -63,6 +63,7 @@ $ cat pod.json | kubectl apply -f - ``` -f, --filename=[]: Filename, directory, or URL to file that contains the configuration to apply -o, --output="": Output mode. Use "-o name" for shorter output (resource/name). + --record[=false]: Record current kubectl command in the resource annotation. --schema-cache-dir="~/.kube/schema": If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema' --validate[=true]: If true, use a schema to validate the input before sending it ``` @@ -99,7 +100,7 @@ $ cat pod.json | kubectl apply -f - * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 8-Dec-2015 +###### Auto generated by spf13/cobra on 22-Jan-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_apply.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_autoscale.md b/docs/user-guide/kubectl/kubectl_autoscale.md index f2477073a6c..61c0ff530e2 100644 --- a/docs/user-guide/kubectl/kubectl_autoscale.md +++ b/docs/user-guide/kubectl/kubectl_autoscale.md @@ -71,6 +71,7 @@ $ kubectl autoscale rc foo --max=5 --cpu-percent=80 --no-headers[=false]: When using the default output, don't print headers. -o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md]. --output-version="": Output the formatted object with the given version (default api-version). + --record[=false]: Record current kubectl command in the resource annotation. --save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future. -a, --show-all[=false]: When printing, show all resources (default hide terminated pods.) --sort-by="": If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string. @@ -109,7 +110,7 @@ $ kubectl autoscale rc foo --max=5 --cpu-percent=80 * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 8-Dec-2015 +###### Auto generated by spf13/cobra on 22-Jan-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_autoscale.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_create.md b/docs/user-guide/kubectl/kubectl_create.md index b3c25d94177..4ac999e08e7 100644 --- a/docs/user-guide/kubectl/kubectl_create.md +++ b/docs/user-guide/kubectl/kubectl_create.md @@ -62,6 +62,7 @@ $ cat pod.json | kubectl create -f - ``` -f, --filename=[]: Filename, directory, or URL to file to use to create the resource -o, --output="": Output mode. Use "-o name" for shorter output (resource/name). + --record[=false]: Record current kubectl command in the resource annotation. --save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future. --schema-cache-dir="~/.kube/schema": If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema' --validate[=true]: If true, use a schema to validate the input before sending it @@ -101,7 +102,7 @@ $ cat pod.json | kubectl create -f - * [kubectl create namespace](kubectl_create_namespace.md) - Create a namespace with the specified name. * [kubectl create secret](kubectl_create_secret.md) - Create a secret using specified subcommand. -###### Auto generated by spf13/cobra on 8-Dec-2015 +###### Auto generated by spf13/cobra on 22-Jan-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_create.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_edit.md b/docs/user-guide/kubectl/kubectl_edit.md index bd719a673fe..ee8ec24b66c 100644 --- a/docs/user-guide/kubectl/kubectl_edit.md +++ b/docs/user-guide/kubectl/kubectl_edit.md @@ -82,6 +82,7 @@ kubectl edit (RESOURCE/NAME | -f FILENAME) -f, --filename=[]: Filename, directory, or URL to file to use to edit the resource -o, --output="yaml": Output format. One of: yaml|json. --output-version="": Output the formatted object with the given version (default api-version). + --record[=false]: Record current kubectl command in the resource annotation. --save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future. --windows-line-endings[=false]: Use Windows line-endings (default Unix line-endings) ``` @@ -118,7 +119,7 @@ kubectl edit (RESOURCE/NAME | -f FILENAME) * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 8-Dec-2015 +###### Auto generated by spf13/cobra on 22-Jan-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_edit.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_expose.md b/docs/user-guide/kubectl/kubectl_expose.md index 25c62661c94..79e524157db 100644 --- a/docs/user-guide/kubectl/kubectl_expose.md +++ b/docs/user-guide/kubectl/kubectl_expose.md @@ -86,6 +86,7 @@ $ kubectl expose rc streamer --port=4100 --protocol=udp --name=video-stream --overrides="": An inline JSON override for the generated object. If this is non-empty, it is used to override the generated object. Requires that the object supply a valid apiVersion field. --port="": The port that the service should serve on. Copied from the resource being exposed, if unspecified --protocol="TCP": The network protocol for the service to be created. Default is 'tcp'. + --record[=false]: Record current kubectl command in the resource annotation. --save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future. --selector="": A label selector to use for this service. If empty (the default) infer the selector from the replication controller. --session-affinity="": If non-empty, set the session affinity for the service to this; legal values: 'None', 'ClientIP' @@ -128,7 +129,7 @@ $ kubectl expose rc streamer --port=4100 --protocol=udp --name=video-stream * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 10-Jan-2016 +###### Auto generated by spf13/cobra on 22-Jan-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_expose.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_label.md b/docs/user-guide/kubectl/kubectl_label.md index 09339404f37..9455fff8e22 100644 --- a/docs/user-guide/kubectl/kubectl_label.md +++ b/docs/user-guide/kubectl/kubectl_label.md @@ -82,6 +82,7 @@ $ kubectl label pods foo bar- -o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md]. --output-version="": Output the formatted object with the given version (default api-version). --overwrite[=false]: If true, allow labels to be overwritten, otherwise reject label updates that overwrite existing labels. + --record[=false]: Record current kubectl command in the resource annotation. --resource-version="": If non-empty, the labels update will only succeed if this is the current resource-version for the object. Only valid when specifying a single resource. -l, --selector="": Selector (label query) to filter on -a, --show-all[=false]: When printing, show all resources (default hide terminated pods.) @@ -121,7 +122,7 @@ $ kubectl label pods foo bar- * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 8-Dec-2015 +###### Auto generated by spf13/cobra on 22-Jan-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_label.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_patch.md b/docs/user-guide/kubectl/kubectl_patch.md index 91fb4c841ab..6d67664c4aa 100644 --- a/docs/user-guide/kubectl/kubectl_patch.md +++ b/docs/user-guide/kubectl/kubectl_patch.md @@ -69,6 +69,7 @@ kubectl patch pod valid-pod -p '{"spec":{"containers":[{"name":"kubernetes-serve -f, --filename=[]: Filename, directory, or URL to a file identifying the resource to update -o, --output="": Output mode. Use "-o name" for shorter output (resource/name). -p, --patch="": The patch to be applied to the resource JSON file. + --record[=false]: Record current kubectl command in the resource annotation. ``` ### Options inherited from parent commands @@ -103,7 +104,7 @@ kubectl patch pod valid-pod -p '{"spec":{"containers":[{"name":"kubernetes-serve * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 8-Dec-2015 +###### Auto generated by spf13/cobra on 22-Jan-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_patch.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_replace.md b/docs/user-guide/kubectl/kubectl_replace.md index f1bedbf948c..100f3dff75b 100644 --- a/docs/user-guide/kubectl/kubectl_replace.md +++ b/docs/user-guide/kubectl/kubectl_replace.md @@ -75,6 +75,7 @@ kubectl replace --force -f ./pod.json --force[=false]: Delete and re-create the specified resource --grace-period=-1: Only relevant during a force replace. Period of time in seconds given to the old resource to terminate gracefully. Ignored if negative. -o, --output="": Output mode. Use "-o name" for shorter output (resource/name). + --record[=false]: Record current kubectl command in the resource annotation. --save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future. --schema-cache-dir="~/.kube/schema": If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema' --timeout=0: Only relevant during a force replace. The length of time to wait before giving up on a delete of the old resource, zero means determine a timeout from the size of the object @@ -113,7 +114,7 @@ kubectl replace --force -f ./pod.json * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 8-Dec-2015 +###### Auto generated by spf13/cobra on 22-Jan-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_replace.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_run.md b/docs/user-guide/kubectl/kubectl_run.md index 9b8a6f8ef8f..56b49387d5f 100644 --- a/docs/user-guide/kubectl/kubectl_run.md +++ b/docs/user-guide/kubectl/kubectl_run.md @@ -99,6 +99,7 @@ $ kubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'pri --output-version="": Output the formatted object with the given version (default api-version). --overrides="": An inline JSON override for the generated object. If this is non-empty, it is used to override the generated object. Requires that the object supply a valid apiVersion field. --port=-1: The port that this container exposes. If --expose is true, this is also the port used by the service that is created. + --record[=false]: Record current kubectl command in the resource annotation. -r, --replicas=1: Number of replicas to create for this container. Default is 1. --requests="": The resource requirement requests for this container. For example, 'cpu=100m,memory=256Mi' --restart="Always": The restart policy for this Pod. Legal values [Always, OnFailure, Never]. If set to 'Always' a replication controller is created for this pod, if set to OnFailure or Never, a job is created for this pod and --replicas must be 1. Default 'Always' @@ -145,7 +146,7 @@ $ kubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'pri * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 14-Dec-2015 +###### Auto generated by spf13/cobra on 22-Jan-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_run.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_scale.md b/docs/user-guide/kubectl/kubectl_scale.md index 77c820e9055..61699354b82 100644 --- a/docs/user-guide/kubectl/kubectl_scale.md +++ b/docs/user-guide/kubectl/kubectl_scale.md @@ -75,6 +75,7 @@ $ kubectl scale --replicas=3 job/cron --current-replicas=-1: Precondition for current size. Requires that the current size of the resource match this value in order to scale. -f, --filename=[]: Filename, directory, or URL to a file identifying the resource to set a new size -o, --output="": Output mode. Use "-o name" for shorter output (resource/name). + --record[=false]: Record current kubectl command in the resource annotation. --replicas=-1: The new desired number of replicas. Required. --resource-version="": Precondition for resource version. Requires that the current resource version match this value in order to scale. --timeout=0: The length of time to wait before giving up on a scale operation, zero means don't wait. @@ -112,7 +113,7 @@ $ kubectl scale --replicas=3 job/cron * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 8-Dec-2015 +###### Auto generated by spf13/cobra on 22-Jan-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_scale.md?pixel)]() diff --git a/pkg/controller/deployment/deployment_controller.go b/pkg/controller/deployment/deployment_controller.go index 7b2a776a4e2..0024378e669 100644 --- a/pkg/controller/deployment/deployment_controller.go +++ b/pkg/controller/deployment/deployment_controller.go @@ -34,6 +34,7 @@ import ( unversioned_legacy "k8s.io/kubernetes/pkg/client/typed/generated/legacy/unversioned" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/framework" + "k8s.io/kubernetes/pkg/kubectl" "k8s.io/kubernetes/pkg/runtime" "k8s.io/kubernetes/pkg/util" deploymentutil "k8s.io/kubernetes/pkg/util/deployment" @@ -721,6 +722,12 @@ func (dc *DeploymentController) getNewRC(deployment extensions.Deployment, maxOl Template: &newRCTemplate, }, } + if _, ok := deployment.Annotations[kubectl.ChangeCauseAnnotation]; ok { + if newRC.Annotations == nil { + newRC.Annotations = make(map[string]string) + } + newRC.Annotations[kubectl.ChangeCauseAnnotation] = deployment.Annotations[kubectl.ChangeCauseAnnotation] + } createdRC, err := dc.client.Legacy().ReplicationControllers(namespace).Create(&newRC) if err != nil { dc.rcExpectations.DeleteExpectations(dKey) diff --git a/pkg/kubectl/cmd/annotate.go b/pkg/kubectl/cmd/annotate.go index 23ed867bb32..69921f90895 100644 --- a/pkg/kubectl/cmd/annotate.go +++ b/pkg/kubectl/cmd/annotate.go @@ -46,6 +46,9 @@ type AnnotateOptions struct { all bool resourceVersion string + changeCause string + recordFlag bool + f *cmdutil.Factory out io.Writer cmd *cobra.Command @@ -111,6 +114,7 @@ func NewCmdAnnotate(f *cmdutil.Factory, out io.Writer) *cobra.Command { cmd.Flags().StringVar(&options.resourceVersion, "resource-version", "", "If non-empty, the annotation update will only succeed if this is the current resource-version for the object. Only valid when specifying a single resource.") usage := "Filename, directory, or URL to a file identifying the resource to update the annotation" kubectl.AddJsonFilenameFlag(cmd, &options.filenames, usage) + cmdutil.AddRecordFlag(cmd) return cmd } @@ -151,6 +155,9 @@ func (o *AnnotateOptions) Complete(f *cmdutil.Factory, out io.Writer, cmd *cobra return err } + o.recordFlag = cmdutil.GetRecordFlag(cmd) + o.changeCause = f.Command() + mapper, typer := f.Object() o.builder = resource.NewBuilder(mapper, typer, resource.ClientMapperFunc(f.ClientForMapping), f.Decoder(true)). ContinueOnError(). @@ -199,6 +206,10 @@ func (o AnnotateOptions) RunAnnotate() error { if err != nil { return err } + // If we should record change-cause, add it to new annotations + if cmdutil.ContainsChangeCause(info) || o.recordFlag { + o.newAnnotations[kubectl.ChangeCauseAnnotation] = o.changeCause + } if err := o.updateAnnotations(obj); err != nil { return err } @@ -292,6 +303,10 @@ func validateAnnotations(removeAnnotations []string, newAnnotations map[string]s func validateNoAnnotationOverwrites(meta *api.ObjectMeta, annotations map[string]string) error { var buf bytes.Buffer for key := range annotations { + // change-cause annotation can always be overwritten + if key == kubectl.ChangeCauseAnnotation { + continue + } if value, found := meta.Annotations[key]; found { if buf.Len() > 0 { buf.WriteString("; ") diff --git a/pkg/kubectl/cmd/apply.go b/pkg/kubectl/cmd/apply.go index ef63b040092..89c6a6c1f64 100644 --- a/pkg/kubectl/cmd/apply.go +++ b/pkg/kubectl/cmd/apply.go @@ -69,6 +69,7 @@ func NewCmdApply(f *cmdutil.Factory, out io.Writer) *cobra.Command { cmd.MarkFlagRequired("filename") cmdutil.AddValidateFlags(cmd) cmdutil.AddOutputFlagsForMutation(cmd) + cmdutil.AddRecordFlag(cmd) return cmd } @@ -132,6 +133,13 @@ func RunApply(f *cmdutil.Factory, cmd *cobra.Command, out io.Writer, options *Ap if err := kubectl.CreateApplyAnnotation(info, encoder); err != nil { return cmdutil.AddSourceToErr("creating", info.Source, err) } + + if cmdutil.ShouldRecord(cmd, info) { + if err := cmdutil.RecordChangeCause(info.Object, f.Command()); err != nil { + return cmdutil.AddSourceToErr("creating", info.Source, err) + } + } + // Then create the resource and skip the three-way merge if err := createAndRefresh(info); err != nil { return cmdutil.AddSourceToErr("creating", info.Source, err) @@ -166,6 +174,17 @@ func RunApply(f *cmdutil.Factory, cmd *cobra.Command, out io.Writer, options *Ap return cmdutil.AddSourceToErr(fmt.Sprintf("applying patch:\n%s\nto:\n%v\nfor:", patch, info), info.Source, err) } + if cmdutil.ShouldRecord(cmd, info) { + patch, err = cmdutil.ChangeResourcePatch(info, f.Command()) + if err != nil { + return err + } + _, err = helper.Patch(info.Namespace, info.Name, api.StrategicMergePatchType, patch) + if err != nil { + return cmdutil.AddSourceToErr(fmt.Sprintf("applying patch:\n%s\nto:\n%v\nfor:", patch, info), info.Source, err) + } + } + count++ cmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, "configured") return nil diff --git a/pkg/kubectl/cmd/autoscale.go b/pkg/kubectl/cmd/autoscale.go index 6647db01180..343c3a8a55d 100644 --- a/pkg/kubectl/cmd/autoscale.go +++ b/pkg/kubectl/cmd/autoscale.go @@ -64,6 +64,7 @@ func NewCmdAutoscale(f *cmdutil.Factory, out io.Writer) *cobra.Command { usage := "Filename, directory, or URL to a file identifying the resource to autoscale." kubectl.AddJsonFilenameFlag(cmd, &filenames, usage) cmdutil.AddApplyAnnotationFlags(cmd) + cmdutil.AddRecordFlag(cmd) return cmd } @@ -139,6 +140,12 @@ func RunAutoscale(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args [] if err != nil { return err } + if cmdutil.ShouldRecord(cmd, hpa) { + if err := cmdutil.RecordChangeCause(hpa.Object, f.Command()); err != nil { + return err + } + object = hpa.Object + } // TODO: extract this flag to a central location, when such a location exists. if cmdutil.GetFlagBool(cmd, "dry-run") { return f.PrintObject(cmd, object, out) diff --git a/pkg/kubectl/cmd/create.go b/pkg/kubectl/cmd/create.go index 10b30ba4ef3..6c4061ea04f 100644 --- a/pkg/kubectl/cmd/create.go +++ b/pkg/kubectl/cmd/create.go @@ -73,6 +73,7 @@ func NewCmdCreate(f *cmdutil.Factory, out io.Writer) *cobra.Command { cmdutil.AddValidateFlags(cmd) cmdutil.AddOutputFlagsForMutation(cmd) cmdutil.AddApplyAnnotationFlags(cmd) + cmdutil.AddRecordFlag(cmd) // create subcommands cmd.AddCommand(NewCmdCreateNamespace(f, out)) @@ -120,6 +121,12 @@ func RunCreate(f *cmdutil.Factory, cmd *cobra.Command, out io.Writer, options *C return cmdutil.AddSourceToErr("creating", info.Source, err) } + if cmdutil.ShouldRecord(cmd, info) { + if err := cmdutil.RecordChangeCause(info.Object, f.Command()); err != nil { + return cmdutil.AddSourceToErr("creating", info.Source, err) + } + } + if err := createAndRefresh(info); err != nil { return cmdutil.AddSourceToErr("creating", info.Source, err) } diff --git a/pkg/kubectl/cmd/edit.go b/pkg/kubectl/cmd/edit.go index e98407bf846..7543c4a0e54 100644 --- a/pkg/kubectl/cmd/edit.go +++ b/pkg/kubectl/cmd/edit.go @@ -97,6 +97,7 @@ func NewCmdEdit(f *cmdutil.Factory, out io.Writer) *cobra.Command { cmd.Flags().String("output-version", "", "Output the formatted object with the given version (default api-version).") cmd.Flags().Bool("windows-line-endings", gruntime.GOOS == "windows", "Use Windows line-endings (default Unix line-endings)") cmdutil.AddApplyAnnotationFlags(cmd) + cmdutil.AddRecordFlag(cmd) return cmd } @@ -232,6 +233,12 @@ func RunEdit(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []strin if err := kubectl.CreateOrUpdateAnnotation(cmdutil.GetFlagBool(cmd, cmdutil.ApplyAnnotationsFlag), updates, encoder); err != nil { return preservedFile(err, file, out) } + if cmdutil.ShouldRecord(cmd, updates) { + err = cmdutil.RecordChangeCause(updates.Object, f.Command()) + if err != nil { + return err + } + } // encode updates back to "edited" since we'll only generate patch from "edited" if edited, err = runtime.Encode(encoder, updates.Object); err != nil { return preservedFile(err, file, out) diff --git a/pkg/kubectl/cmd/expose.go b/pkg/kubectl/cmd/expose.go index 05469713164..a00d00eb5a0 100644 --- a/pkg/kubectl/cmd/expose.go +++ b/pkg/kubectl/cmd/expose.go @@ -95,6 +95,7 @@ func NewCmdExposeService(f *cmdutil.Factory, out io.Writer) *cobra.Command { usage := "Filename, directory, or URL to a file identifying the resource to expose a service" kubectl.AddJsonFilenameFlag(cmd, &options.Filenames, usage) cmdutil.AddApplyAnnotationFlags(cmd) + cmdutil.AddRecordFlag(cmd) return cmd } @@ -210,6 +211,12 @@ func RunExpose(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []str if err != nil { return err } + if cmdutil.ShouldRecord(cmd, info) { + if err := cmdutil.RecordChangeCause(object, f.Command()); err != nil { + return err + } + } + info.Refresh(object, true) // TODO: extract this flag to a central location, when such a location exists. if cmdutil.GetFlagBool(cmd, "dry-run") { return f.PrintObject(cmd, object, out) diff --git a/pkg/kubectl/cmd/label.go b/pkg/kubectl/cmd/label.go index 8069d003f6f..9e6d76edc27 100644 --- a/pkg/kubectl/cmd/label.go +++ b/pkg/kubectl/cmd/label.go @@ -97,6 +97,7 @@ func NewCmdLabel(f *cmdutil.Factory, out io.Writer) *cobra.Command { usage := "Filename, directory, or URL to a file identifying the resource to update the labels" kubectl.AddJsonFilenameFlag(cmd, &options.Filenames, usage) cmd.Flags().Bool("dry-run", false, "If true, only print the object that would be sent, without sending it.") + cmdutil.AddRecordFlag(cmd) return cmd } @@ -252,6 +253,11 @@ func RunLabel(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []stri if err := labelFunc(obj, overwrite, resourceVersion, lbls, remove); err != nil { return err } + if cmdutil.ShouldRecord(cmd, info) { + if err := cmdutil.RecordChangeCause(obj, f.Command()); err != nil { + return err + } + } newData, err := json.Marshal(obj) if err != nil { return err diff --git a/pkg/kubectl/cmd/patch.go b/pkg/kubectl/cmd/patch.go index b537adaa186..9bce6f2088f 100644 --- a/pkg/kubectl/cmd/patch.go +++ b/pkg/kubectl/cmd/patch.go @@ -70,6 +70,7 @@ func NewCmdPatch(f *cmdutil.Factory, out io.Writer) *cobra.Command { cmd.Flags().StringP("patch", "p", "", "The patch to be applied to the resource JSON file.") cmd.MarkFlagRequired("patch") cmdutil.AddOutputFlagsForMutation(cmd) + cmdutil.AddRecordFlag(cmd) usage := "Filename, directory, or URL to a file identifying the resource to update" kubectl.AddJsonFilenameFlag(cmd, &options.Filenames, usage) @@ -124,6 +125,16 @@ func RunPatch(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []stri if err != nil { return err } + if cmdutil.ShouldRecord(cmd, info) { + patchBytes, err = cmdutil.ChangeResourcePatch(info, f.Command()) + if err != nil { + return err + } + _, err = helper.Patch(namespace, name, api.StrategicMergePatchType, patchBytes) + if err != nil { + return err + } + } cmdutil.PrintSuccess(mapper, shortOutput, out, "", name, "patched") return nil } diff --git a/pkg/kubectl/cmd/replace.go b/pkg/kubectl/cmd/replace.go index 226e5c434d0..81eacecbd41 100644 --- a/pkg/kubectl/cmd/replace.go +++ b/pkg/kubectl/cmd/replace.go @@ -84,6 +84,7 @@ func NewCmdReplace(f *cmdutil.Factory, out io.Writer) *cobra.Command { cmdutil.AddValidateFlags(cmd) cmdutil.AddOutputFlagsForMutation(cmd) cmdutil.AddApplyAnnotationFlags(cmd) + cmdutil.AddRecordFlag(cmd) return cmd } @@ -133,6 +134,12 @@ func RunReplace(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []st return cmdutil.AddSourceToErr("replacing", info.Source, err) } + if cmdutil.ShouldRecord(cmd, info) { + if err := cmdutil.RecordChangeCause(info.Object, f.Command()); err != nil { + return cmdutil.AddSourceToErr("replacing", info.Source, err) + } + } + // Serialize the object with the annotation applied. obj, err := resource.NewHelper(info.Client, info.Mapping).Replace(info.Namespace, info.Name, true, info.Object) if err != nil { @@ -220,6 +227,12 @@ func forceReplace(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args [] return err } + if cmdutil.ShouldRecord(cmd, info) { + if err := cmdutil.RecordChangeCause(info.Object, f.Command()); err != nil { + return cmdutil.AddSourceToErr("replacing", info.Source, err) + } + } + obj, err := resource.NewHelper(info.Client, info.Mapping).Create(info.Namespace, true, info.Object) if err != nil { return err diff --git a/pkg/kubectl/cmd/run.go b/pkg/kubectl/cmd/run.go index e7804bc9de5..78aba153831 100644 --- a/pkg/kubectl/cmd/run.go +++ b/pkg/kubectl/cmd/run.go @@ -83,6 +83,7 @@ func NewCmdRun(f *cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer) *c cmdutil.AddPrinterFlags(cmd) addRunFlags(cmd) cmdutil.AddApplyAnnotationFlags(cmd) + cmdutil.AddRecordFlag(cmd) return cmd } @@ -425,6 +426,15 @@ func createGeneratedObject(f *cmdutil.Factory, cmd *cobra.Command, generator kub return nil, "", nil, nil, err } + annotations, err := mapping.MetadataAccessor.Annotations(obj) + if err != nil { + return nil, "", nil, nil, err + } + if cmdutil.GetRecordFlag(cmd) || len(annotations[kubectl.ChangeCauseAnnotation]) > 0 { + if err := cmdutil.RecordChangeCause(obj, f.Command()); err != nil { + return nil, "", nil, nil, err + } + } // TODO: extract this flag to a central location, when such a location exists. if !cmdutil.GetFlagBool(cmd, "dry-run") { resourceMapper := &resource.Mapper{ diff --git a/pkg/kubectl/cmd/run_test.go b/pkg/kubectl/cmd/run_test.go index 520c7de30d3..8f7ebedbf04 100644 --- a/pkg/kubectl/cmd/run_test.go +++ b/pkg/kubectl/cmd/run_test.go @@ -300,6 +300,7 @@ func TestGenerateService(t *testing.T) { cmd := &cobra.Command{} cmd.Flags().String("output", "", "") cmd.Flags().Bool(cmdutil.ApplyAnnotationsFlag, false, "") + cmd.Flags().Bool("record", false, "Record current kubectl command in the resource annotation.") addRunFlags(cmd) if !test.expectPOST { diff --git a/pkg/kubectl/cmd/scale.go b/pkg/kubectl/cmd/scale.go index 2637fa2b0af..6ffd435661a 100644 --- a/pkg/kubectl/cmd/scale.go +++ b/pkg/kubectl/cmd/scale.go @@ -23,6 +23,7 @@ import ( "github.com/spf13/cobra" + "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/kubectl" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" "k8s.io/kubernetes/pkg/kubectl/resource" @@ -82,6 +83,7 @@ func NewCmdScale(f *cmdutil.Factory, out io.Writer) *cobra.Command { cmd.MarkFlagRequired("replicas") cmd.Flags().Duration("timeout", 0, "The length of time to wait before giving up on a scale operation, zero means don't wait.") cmdutil.AddOutputFlagsForMutation(cmd) + cmdutil.AddRecordFlag(cmd) usage := "Filename, directory, or URL to a file identifying the resource to set a new size" kubectl.AddJsonFilenameFlag(cmd, &options.Filenames, usage) @@ -149,6 +151,24 @@ func RunScale(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []stri errs = append(errs, err) continue } + if cmdutil.ShouldRecord(cmd, info) { + patchBytes, err := cmdutil.ChangeResourcePatch(info, f.Command()) + if err != nil { + errs = append(errs, err) + continue + } + mapping := info.ResourceMapping() + client, err := f.ClientForMapping(mapping) + if err != nil { + return err + } + helper := resource.NewHelper(client, mapping) + _, err = helper.Patch(info.Namespace, info.Name, api.StrategicMergePatchType, patchBytes) + if err != nil { + errs = append(errs, err) + continue + } + } cmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, "scaled") } diff --git a/pkg/kubectl/cmd/util/factory.go b/pkg/kubectl/cmd/util/factory.go index eea080f5378..283254f86fc 100644 --- a/pkg/kubectl/cmd/util/factory.go +++ b/pkg/kubectl/cmd/util/factory.go @@ -27,6 +27,7 @@ import ( "os/user" "path" "strconv" + "strings" "time" "github.com/emicklei/go-restful/swagger" @@ -62,6 +63,7 @@ const ( type Factory struct { clients *ClientCache flags *pflag.FlagSet + cmd string // Returns interfaces for dealing with arbitrary runtime.Objects. Object func() (meta.RESTMapper, runtime.ObjectTyper) @@ -182,6 +184,7 @@ func NewFactory(optionalClientConfig clientcmd.ClientConfig) *Factory { return &Factory{ clients: clients, flags: flags, + cmd: recordCommand(os.Args), Object: func() (meta.RESTMapper, runtime.ObjectTyper) { cfg, err := clientConfig.ClientConfig() @@ -472,6 +475,17 @@ func GetFirstPod(client *client.Client, namespace string, selector map[string]st return pod, nil } +func recordCommand(args []string) string { + if len(args) > 0 { + args[0] = "kubectl" + } + return strings.Join(args, " ") +} + +func (f *Factory) Command() string { + return f.cmd +} + // BindFlags adds any flags that are common to all kubectl sub commands. func (f *Factory) BindFlags(flags *pflag.FlagSet) { // any flags defined by external projects (not part of pflags) diff --git a/pkg/kubectl/cmd/util/helpers.go b/pkg/kubectl/cmd/util/helpers.go index d5705b4abd0..19cc401e7d0 100644 --- a/pkg/kubectl/cmd/util/helpers.go +++ b/pkg/kubectl/cmd/util/helpers.go @@ -18,6 +18,7 @@ package util import ( "bytes" + "encoding/json" "fmt" "io" "io/ioutil" @@ -27,6 +28,7 @@ import ( "strings" "time" + "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" @@ -34,6 +36,7 @@ import ( "k8s.io/kubernetes/pkg/kubectl/resource" "k8s.io/kubernetes/pkg/runtime" utilerrors "k8s.io/kubernetes/pkg/util/errors" + "k8s.io/kubernetes/pkg/util/strategicpatch" "github.com/evanphx/json-patch" "github.com/golang/glog" @@ -434,3 +437,56 @@ func UpdateObject(info *resource.Info, codec runtime.Codec, updateFn func(runtim return info.Object, nil } + +// AddCmdRecordFlag adds --record flag to command +func AddRecordFlag(cmd *cobra.Command) { + cmd.Flags().Bool("record", false, "Record current kubectl command in the resource annotation.") +} + +func GetRecordFlag(cmd *cobra.Command) bool { + return GetFlagBool(cmd, "record") +} + +// RecordChangeCause annotate change-cause to input runtime object. +func RecordChangeCause(obj runtime.Object, changeCause string) error { + meta, err := api.ObjectMetaFor(obj) + if err != nil { + return err + } + if meta.Annotations == nil { + meta.Annotations = make(map[string]string) + } + meta.Annotations[kubectl.ChangeCauseAnnotation] = changeCause + return nil +} + +// ChangeResourcePatch creates a strategic merge patch between the origin input resource info +// and the annotated with change-cause input resource info. +func ChangeResourcePatch(info *resource.Info, changeCause string) ([]byte, error) { + oldData, err := json.Marshal(info.Object) + if err != nil { + return nil, err + } + if err := RecordChangeCause(info.Object, changeCause); err != nil { + return nil, err + } + newData, err := json.Marshal(info.Object) + if err != nil { + return nil, err + } + return strategicpatch.CreateTwoWayMergePatch(oldData, newData, info.Object) +} + +// containsChangeCause checks if input resource info contains change-cause annotation. +func ContainsChangeCause(info *resource.Info) bool { + annotations, err := info.Mapping.MetadataAccessor.Annotations(info.Object) + if err != nil { + return false + } + return len(annotations[kubectl.ChangeCauseAnnotation]) > 0 +} + +// ShouldRecord checks if we should record current change cause +func ShouldRecord(cmd *cobra.Command, info *resource.Info) bool { + return GetRecordFlag(cmd) || ContainsChangeCause(info) +} From e3cb44aaffca4eefceec6e3754a44d419c770736 Mon Sep 17 00:00:00 2001 From: Janet Kuo Date: Mon, 1 Feb 2016 17:34:48 -0800 Subject: [PATCH 105/328] Copy deployment's annotations to its RC --- .../deployment/deployment_controller.go | 28 +++++++++++++------ pkg/kubectl/cmd/annotate.go | 8 +++--- pkg/kubectl/history.go | 21 ++++++-------- test/e2e/deployment.go | 7 +++-- 4 files changed, 37 insertions(+), 27 deletions(-) diff --git a/pkg/controller/deployment/deployment_controller.go b/pkg/controller/deployment/deployment_controller.go index 0024378e669..5d2ec0d3bdc 100644 --- a/pkg/controller/deployment/deployment_controller.go +++ b/pkg/controller/deployment/deployment_controller.go @@ -34,7 +34,6 @@ import ( unversioned_legacy "k8s.io/kubernetes/pkg/client/typed/generated/legacy/unversioned" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/framework" - "k8s.io/kubernetes/pkg/kubectl" "k8s.io/kubernetes/pkg/runtime" "k8s.io/kubernetes/pkg/util" deploymentutil "k8s.io/kubernetes/pkg/util/deployment" @@ -679,9 +678,21 @@ func (dc *DeploymentController) getNewRC(deployment extensions.Deployment, maxOl if existingNewRC.Annotations == nil { existingNewRC.Annotations = make(map[string]string) } + // Copy deployment's annotations to existing new RC + annotationChanged := false + for k, v := range deployment.Annotations { + if existingNewRC.Annotations[k] != v { + annotationChanged = true + existingNewRC.Annotations[k] = v + } + } + // Update existing new RC's revision annotation if existingNewRC.Annotations[deploymentutil.RevisionAnnotation] != newRevision { existingNewRC.Annotations[deploymentutil.RevisionAnnotation] = newRevision + annotationChanged = true glog.V(4).Infof("update existingNewRC %s revision to %s - %+v\n", existingNewRC.Name, newRevision) + } + if annotationChanged { return dc.client.Legacy().ReplicationControllers(deployment.ObjectMeta.Namespace).Update(existingNewRC) } return existingNewRC, nil @@ -708,13 +719,20 @@ func (dc *DeploymentController) getNewRC(deployment extensions.Deployment, maxOl return nil, fmt.Errorf("couldn't get key for deployment controller %#v: %v", deployment, err) } dc.rcExpectations.ExpectCreations(dKey, 1) + // Copy deployment's annotations to new RC + annotations := deployment.Annotations + if annotations == nil { + annotations = make(map[string]string) + } + // Set new RC's revision annotation + annotations[deploymentutil.RevisionAnnotation] = newRevision // Create new RC newRC := api.ReplicationController{ ObjectMeta: api.ObjectMeta{ GenerateName: deployment.Name + "-", Namespace: namespace, - Annotations: map[string]string{deploymentutil.RevisionAnnotation: newRevision}, + Annotations: annotations, }, Spec: api.ReplicationControllerSpec{ Replicas: 0, @@ -722,12 +740,6 @@ func (dc *DeploymentController) getNewRC(deployment extensions.Deployment, maxOl Template: &newRCTemplate, }, } - if _, ok := deployment.Annotations[kubectl.ChangeCauseAnnotation]; ok { - if newRC.Annotations == nil { - newRC.Annotations = make(map[string]string) - } - newRC.Annotations[kubectl.ChangeCauseAnnotation] = deployment.Annotations[kubectl.ChangeCauseAnnotation] - } createdRC, err := dc.client.Legacy().ReplicationControllers(namespace).Create(&newRC) if err != nil { dc.rcExpectations.DeleteExpectations(dKey) diff --git a/pkg/kubectl/cmd/annotate.go b/pkg/kubectl/cmd/annotate.go index 69921f90895..daebf57d1f6 100644 --- a/pkg/kubectl/cmd/annotate.go +++ b/pkg/kubectl/cmd/annotate.go @@ -46,8 +46,8 @@ type AnnotateOptions struct { all bool resourceVersion string - changeCause string - recordFlag bool + changeCause string + recordChangeCause bool f *cmdutil.Factory out io.Writer @@ -155,7 +155,7 @@ func (o *AnnotateOptions) Complete(f *cmdutil.Factory, out io.Writer, cmd *cobra return err } - o.recordFlag = cmdutil.GetRecordFlag(cmd) + o.recordChangeCause = cmdutil.GetRecordFlag(cmd) o.changeCause = f.Command() mapper, typer := f.Object() @@ -207,7 +207,7 @@ func (o AnnotateOptions) RunAnnotate() error { return err } // If we should record change-cause, add it to new annotations - if cmdutil.ContainsChangeCause(info) || o.recordFlag { + if cmdutil.ContainsChangeCause(info) || o.recordChangeCause { o.newAnnotations[kubectl.ChangeCauseAnnotation] = o.changeCause } if err := o.updateAnnotations(obj); err != nil { diff --git a/pkg/kubectl/history.go b/pkg/kubectl/history.go index f864e535c2f..fc0b9e809f2 100644 --- a/pkg/kubectl/history.go +++ b/pkg/kubectl/history.go @@ -79,19 +79,14 @@ func (h *DeploymentHistoryViewer) History(namespace, name string) (HistoryInfo, for _, rc := range allRCs { v, err := deploymentutil.Revision(rc) if err != nil { - return historyInfo, fmt.Errorf("failed to retrieve revision out of RC %s from deployment %s: %v", rc.Name, name, err) + continue } historyInfo.RevisionToTemplate[v] = rc.Spec.Template - changeCause, err := getChangeCause(rc) - if err != nil { - return historyInfo, fmt.Errorf("failed to retrieve change-cause out of RC %s from deployment %s: %v", rc.Name, name, err) - } - if len(changeCause) > 0 { - if historyInfo.RevisionToTemplate[v].Annotations == nil { - historyInfo.RevisionToTemplate[v].Annotations = make(map[string]string) - } - historyInfo.RevisionToTemplate[v].Annotations[ChangeCauseAnnotation] = changeCause + changeCause := getChangeCause(rc) + if historyInfo.RevisionToTemplate[v].Annotations == nil { + historyInfo.RevisionToTemplate[v].Annotations = make(map[string]string) } + historyInfo.RevisionToTemplate[v].Annotations[ChangeCauseAnnotation] = changeCause } return historyInfo, nil } @@ -130,10 +125,10 @@ func PrintRolloutHistory(historyInfo HistoryInfo, resource, name string) (string } // getChangeCause returns the change-cause annotation of the input object -func getChangeCause(obj runtime.Object) (string, error) { +func getChangeCause(obj runtime.Object) string { meta, err := api.ObjectMetaFor(obj) if err != nil { - return "", err + return "" } - return meta.Annotations[ChangeCauseAnnotation], nil + return meta.Annotations[ChangeCauseAnnotation] } diff --git a/test/e2e/deployment.go b/test/e2e/deployment.go index 1dc155875ff..90f50ce1099 100644 --- a/test/e2e/deployment.go +++ b/test/e2e/deployment.go @@ -160,7 +160,9 @@ func testNewDeployment(f *Framework) { podLabels := map[string]string{"name": "nginx"} replicas := 1 Logf("Creating simple deployment %s", deploymentName) - _, err := c.Extensions().Deployments(ns).Create(newDeployment(deploymentName, replicas, podLabels, "nginx", "nginx", extensions.RollingUpdateDeploymentStrategyType, nil)) + d := newDeployment(deploymentName, replicas, podLabels, "nginx", "nginx", extensions.RollingUpdateDeploymentStrategyType, nil) + d.Annotations = map[string]string{"test": "annotation-should-copy-to-RC"} + _, err := c.Extensions().Deployments(ns).Create(d) Expect(err).NotTo(HaveOccurred()) defer func() { deployment, err := c.Extensions().Deployments(ns).Get(deploymentName) @@ -189,7 +191,8 @@ func testNewDeployment(f *Framework) { Expect(deployment.Status.UpdatedReplicas).Should(Equal(replicas)) // Check if it's updated to revision 1 correctly - checkDeploymentRevision(c, ns, deploymentName, "1", "nginx", "nginx") + _, newRC := checkDeploymentRevision(c, ns, deploymentName, "1", "nginx", "nginx") + Expect(newRC.Annotations["test"]).Should(Equal("annotation-should-copy-to-RC")) } func testRollingUpdateDeployment(f *Framework) { From 344a587f34ab93b0d15af110da2654e641f98b42 Mon Sep 17 00:00:00 2001 From: Robert Bailey Date: Mon, 25 Jan 2016 15:29:32 -0800 Subject: [PATCH 106/328] Document the communication paths between the master and node. --- docs/admin/README.md | 1 + docs/admin/master-node-communication.md | 126 ++++++++++++++++++++++++ 2 files changed, 127 insertions(+) create mode 100644 docs/admin/master-node-communication.md diff --git a/docs/admin/README.md b/docs/admin/README.md index 04ba14e4db4..a1b245c13ad 100644 --- a/docs/admin/README.md +++ b/docs/admin/README.md @@ -60,6 +60,7 @@ It assumes some familiarity with concepts in the [User Guide](../user-guide/READ 1. [DNS](dns.md) 1. [Networking](networking.md) 1. [OVS Networking](ovs-networking.md) +1. [Master <-> Node Communication](master-node-communication.md) 1. Example Configurations 1. [Multiple Clusters](multi-cluster.md) 1. [High Availability Clusters](high-availability.md) diff --git a/docs/admin/master-node-communication.md b/docs/admin/master-node-communication.md new file mode 100644 index 00000000000..c86bba8b68d --- /dev/null +++ b/docs/admin/master-node-communication.md @@ -0,0 +1,126 @@ + + + + +WARNING +WARNING +WARNING +WARNING +WARNING + +

PLEASE NOTE: This document applies to the HEAD of the source tree

+ +If you are using a released version of Kubernetes, you should +refer to the docs that go with that version. + +Documentation for other releases can be found at +[releases.k8s.io](http://releases.k8s.io). + +-- + + + + + +# Master <-> Node Communication + +**Table of Contents** + + +- [Master <-> Node Communication](#master---node-communication) + - [Summary](#summary) + - [Cluster -> Master](#cluster---master) + - [Master -> Cluster](#master---cluster) + - [SSH Tunnels](#ssh-tunnels) + + + +## Summary + +This document catalogs the communication paths between the master (really the +apiserver) and the Kubernetes cluster. The intent is to allow users to +customize their installation to harden the network configuration such that +the cluster can be run on an untrusted network (or on fully public IPs on a +cloud provider). + +## Cluster -> Master + +All communication paths from the cluster to the master terminate at the +apiserver (none of the other master components are designed to expose remote +services). In a typical deployment, the apiserver is configured to listen for +remote connections on a secure HTTPS port (443) with one or more forms of +client [authentication](authentication.md) enabled. + +Nodes should be provisioned with the public root certificate for the cluster +such that they can connect securely to the apiserver along with valid client +credentials. For example, on a default GCE deployment, the client credentials +provided to the kubelet are in the form of a client certificate. Pods that +wish to connect to the apiserver can do so securely by leveraging a service +account so that Kubernetes will automatically inject the public root +certificate and a valid bearer token into the pod when it is instantiated. +The `kubernetes` service (in all namespaces) is configured with a virtual IP +address that is redirected (via kube-proxy) to the HTTPS endpoint on the +apiserver. + +The master components communicate with the cluster apiserver over the +insecure (not encrypted or authenticated) port. This port is typically only +exposed on the localhost interface of the master machine, so that the master +components, all running on the same machine, can communicate with the +cluster apiserver. Over time, the master components will be migrated to use +the secure port with authentication and authorization (see +[#13598](https://github.com/kubernetes/kubernetes/issues/13598)). + +As a result, the default operating mode for connections from the cluster +(nodes and pods running on the nodes) to the master is secured by default +and can run over untrusted and/or public networks. + +## Master -> Cluster + +There are two primary communication paths from the master (apiserver) to the +cluster. The first is from the apiserver to the kubelet process which runs on +each node in the cluster. The second is from the apiserver to any node, pod, +or service through the apiserver's proxy functionality. + +The connections from the apiserver to the kubelet are used for fetching logs +for pods, attaching (through kubectl) to running pods, and using the kubelet's +port-forwarding functionality. These connections terminate at the kubelet's +HTTPS endpoint, which is typically using a self-signed certificate, and +ignore the certificate presented by the kubelet (although you can override this +behavior by specifying the `--kubelet-certificate-authority`, +`--kubelet-client-certificate`, and `--kubelet-client-key` flags when starting +the cluster apiserver). By default, these connections **are not currently safe** +to run over untrusted and/or public networks as they are subject to +man-in-the-middle attacks. + +The connections from the apiserver to a node, pod, or service default to plain +HTTP connections and are therefore neither authenticated nor encrypted. They +can be run over a secure HTTPS connection by prefixing `https:` to the node, +pod, or service name in the API URL, but they will not validate the certificate +provided by the HTTPS endpoint nor provide client credentials so while the +connection will by encrypted, it will not provide any guarentees of integrity. +These connections **are not currently safe** to run over untrusted and/or +public networks. + +### SSH Tunnels + +[Google Container Engine](https://cloud.google.com/container-engine/docs/) uses +SSH tunnels to protect the Master -> Cluster communication paths. In this +configuration, the apiserver initiates an SSH tunnel to each node in the +cluster (connecting to the ssh server listening on port 22) and passes all +traffic destined for a kubelet, node, pod, or service through the tunnel. +This tunnel ensures that the traffic is not exposed outside of the private +GCE network in which the cluster is running. + + + + + + + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/admin/master-node-communication.md?pixel)]() + From ee4e60d78cf00229d7aab8886657e70e0d1a1d59 Mon Sep 17 00:00:00 2001 From: Mike Danese Date: Tue, 2 Feb 2016 21:35:21 -0800 Subject: [PATCH 107/328] componentconfig: move kube proxy defaulting into the exetrnal api --- cmd/kube-proxy/app/options/options.go | 22 ++++++------------- pkg/apis/componentconfig/v1alpha1/defaults.go | 15 ++++++++++++- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/cmd/kube-proxy/app/options/options.go b/cmd/kube-proxy/app/options/options.go index 12bfa195ec1..abd2d8a5d06 100644 --- a/cmd/kube-proxy/app/options/options.go +++ b/cmd/kube-proxy/app/options/options.go @@ -22,8 +22,8 @@ import ( "time" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/apis/componentconfig" + "k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1" "k8s.io/kubernetes/pkg/kubelet/qos" "k8s.io/kubernetes/pkg/util" @@ -48,21 +48,13 @@ type ProxyServerConfig struct { } func NewProxyConfig() *ProxyServerConfig { + config := componentconfig.KubeProxyConfiguration{} + api.Scheme.Convert(&v1alpha1.KubeProxyConfiguration{}, &config) return &ProxyServerConfig{ - KubeProxyConfiguration: componentconfig.KubeProxyConfiguration{ - BindAddress: "0.0.0.0", - HealthzPort: 10249, - HealthzBindAddress: "127.0.0.1", - OOMScoreAdj: util.IntPtr(qos.KubeProxyOOMScoreAdj), - ResourceContainer: "/kube-proxy", - IPTablesSyncPeriod: unversioned.Duration{30 * time.Second}, - UDPIdleTimeout: unversioned.Duration{250 * time.Millisecond}, - ConntrackMax: 256 * 1024, // 4x default (64k) - ConntrackTCPEstablishedTimeout: unversioned.Duration{Duration: 24 * time.Hour}, // 1 day (1/5 default) - }, - KubeAPIQPS: 5.0, - KubeAPIBurst: 10, - ConfigSyncPeriod: 15 * time.Minute, + KubeProxyConfiguration: config, + KubeAPIQPS: 5.0, + KubeAPIBurst: 10, + ConfigSyncPeriod: 15 * time.Minute, } } diff --git a/pkg/apis/componentconfig/v1alpha1/defaults.go b/pkg/apis/componentconfig/v1alpha1/defaults.go index 0ce963f9263..aa6b2e5ee5c 100644 --- a/pkg/apis/componentconfig/v1alpha1/defaults.go +++ b/pkg/apis/componentconfig/v1alpha1/defaults.go @@ -40,8 +40,21 @@ func addDefaultingFuncs(scheme *runtime.Scheme) { temp := int32(qos.KubeProxyOOMScoreAdj) obj.OOMScoreAdj = &temp } + if obj.ResourceContainer == "" { + obj.ResourceContainer = "/kube-proxy" + } if obj.IPTablesSyncPeriod.Duration == 0 { - obj.IPTablesSyncPeriod = unversioned.Duration{5 * time.Second} + obj.IPTablesSyncPeriod = unversioned.Duration{30 * time.Second} + } + zero := unversioned.Duration{} + if obj.UDPIdleTimeout == zero { + obj.UDPIdleTimeout = unversioned.Duration{250 * time.Millisecond} + } + if obj.ConntrackMax == 0 { + obj.ConntrackMax = 256 * 1024 // 4x default (64k) + } + if obj.ConntrackTCPEstablishedTimeout == zero { + obj.ConntrackTCPEstablishedTimeout = unversioned.Duration{Duration: 24 * time.Hour} // 1 day (1/5 default) } }, ) From b103f0f27996975e0f8dd915e7ed71ada2328765 Mon Sep 17 00:00:00 2001 From: Andy Zheng Date: Mon, 1 Feb 2016 11:36:45 -0800 Subject: [PATCH 108/328] Support master on Ubuntu Trusty This change support running kubernetes master on Ubuntu Trusty. It uses pure cloud-config and shell scripts, and completely gets rid of saltstack or the release salt tarball. --- build/common.sh | 30 +- cluster/gce/trusty/configure.sh | 466 +++++++++++++++++- cluster/gce/trusty/helper.sh | 38 +- .../kube-manifests/kube-apiserver.manifest | 98 ++++ .../kube-controller-manager.manifest | 83 ++++ cluster/gce/trusty/master.yaml | 235 +++++++++ cluster/gce/trusty/node.yaml | 34 +- .../saltbase/salt/kube-addons/kube-addons.sh | 8 +- 8 files changed, 945 insertions(+), 47 deletions(-) create mode 100644 cluster/gce/trusty/kube-manifests/kube-apiserver.manifest create mode 100644 cluster/gce/trusty/kube-manifests/kube-controller-manager.manifest create mode 100644 cluster/gce/trusty/master.yaml diff --git a/build/common.sh b/build/common.sh index b653ea298cd..ead0c982db1 100755 --- a/build/common.sh +++ b/build/common.sh @@ -883,27 +883,36 @@ function kube::release::package_salt_tarball() { # such as Ubuntu Trusty. # # There are two sources of manifests files: (1) some manifests in the directory -# cluster/saltbase/salt can be used directly or after minor revision, so we copy -# them from there; (2) otherwise, we will maintain separate copies in -# cluster/gce/kube-manifests. +# cluster/saltbase/salt and cluster/addons can be used directly or after minor +# revision, so we copy them from there; (2) otherwise, we will maintain separate +# copies in cluster/gce//kube-manifests. function kube::release::package_kube_manifests_tarball() { kube::log::status "Building tarball: manifests" local release_stage="${RELEASE_STAGE}/manifests/kubernetes" rm -rf "${release_stage}" - mkdir -p "${release_stage}" + mkdir -p "${release_stage}/trusty" - # Source 1: manifests from cluster/saltbase/salt. - # TODO(andyzheng0831): Add more manifests when supporting master on trusty. + # Source 1: manifests from cluster/saltbase/salt and cluster/addons local salt_dir="${KUBE_ROOT}/cluster/saltbase/salt" cp "${salt_dir}/fluentd-es/fluentd-es.yaml" "${release_stage}/" cp "${salt_dir}/fluentd-gcp/fluentd-gcp.yaml" "${release_stage}/" cp "${salt_dir}/kube-registry-proxy/kube-registry-proxy.yaml" "${release_stage}/" cp "${salt_dir}/kube-proxy/kube-proxy.manifest" "${release_stage}/" + cp "${salt_dir}/etcd/etcd.manifest" "${release_stage}/trusty" + cp "${salt_dir}/kube-scheduler/kube-scheduler.manifest" "${release_stage}/trusty" + cp "${salt_dir}/kube-addons/namespace.yaml" "${release_stage}/trusty" + cp "${salt_dir}/kube-addons/kube-addons.sh" "${release_stage}/trusty" + cp "${salt_dir}/kube-addons/kube-addon-update.sh" "${release_stage}/trusty" + cp -r "${salt_dir}/kube-admission-controls/limit-range" "${release_stage}/trusty" + local objects + objects=$(cd "${KUBE_ROOT}/cluster/addons" && find . \( -name \*.yaml -or -name \*.yaml.in -or -name \*.json \) | grep -v demo) + tar c -C "${KUBE_ROOT}/cluster/addons" ${objects} | tar x -C "${release_stage}/trusty" - # Source 2: manifests from cluster/gce/kube-manifests. - # TODO(andyzheng0831): Enable the following line after finishing issue #16702. - # cp "${KUBE_ROOT}/cluster/gce/kube-manifests/*" "${release_stage}/" + # Source 2: manifests from cluster/gce//kube-manifests. + # TODO(andyzheng0831): Avoid using separate copies for trusty. We should use whatever + # from cluster/saltbase/salt to minimize maintenance cost. + cp "${KUBE_ROOT}/cluster/gce/trusty/kube-manifests/"* "${release_stage}/trusty" cp -r "${KUBE_ROOT}/cluster/gce/coreos/kube-manifests"/* "${release_stage}/" kube::release::clean_cruft @@ -1094,10 +1103,11 @@ function kube::release::gcs::copy_release_artifacts() { # Stage everything in release directory kube::release::gcs::stage_and_hash "${RELEASE_DIR}"/* . || return 1 - # Having the configure-vm.sh and trusty/node.yaml scripts from the GCE cluster + # Having the configure-vm.sh script and and trusty code from the GCE cluster # deploy hosted with the release is useful for GKE. kube::release::gcs::stage_and_hash "${RELEASE_STAGE}/full/kubernetes/cluster/gce/configure-vm.sh" extra/gce || return 1 kube::release::gcs::stage_and_hash "${RELEASE_STAGE}/full/kubernetes/cluster/gce/trusty/node.yaml" extra/gce || return 1 + kube::release::gcs::stage_and_hash "${RELEASE_STAGE}/full/kubernetes/cluster/gce/trusty/master.yaml" extra/gce || return 1 kube::release::gcs::stage_and_hash "${RELEASE_STAGE}/full/kubernetes/cluster/gce/trusty/configure.sh" extra/gce || return 1 # Upload the "naked" binaries to GCS. This is useful for install scripts that diff --git a/cluster/gce/trusty/configure.sh b/cluster/gce/trusty/configure.sh index a2471169b80..d2fdda0cda6 100644 --- a/cluster/gce/trusty/configure.sh +++ b/cluster/gce/trusty/configure.sh @@ -53,16 +53,18 @@ create_dirs() { download_kube_env() { # Fetch kube-env from GCE metadata server. + readonly tmp_install_dir="/var/cache/kubernetes-install" + mkdir -p ${tmp_install_dir} curl --fail --silent --show-error \ -H "X-Google-Metadata-Request: True" \ - -o /tmp/kube-env-yaml \ + -o "${tmp_install_dir}/kube_env.yaml" \ http://metadata.google.internal/computeMetadata/v1/instance/attributes/kube-env # Convert the yaml format file into a shell-style file. eval $(python -c ''' import pipes,sys,yaml for k,v in yaml.load(sys.stdin).iteritems(): print("readonly {var}={value}".format(var = k, value = pipes.quote(str(v)))) -''' < /tmp/kube-env-yaml > /etc/kube-env) +''' < "${tmp_install_dir}/kube_env.yaml" > /etc/kube-env) } create_kubelet_kubeconfig() { @@ -181,6 +183,11 @@ install_kube_binary_config() { cp /tmp/kubernetes/server/bin/*.docker_tag /run/kube-docker-files/ if [ "${KUBERNETES_MASTER:-}" = "false" ]; then cp /tmp/kubernetes/server/bin/kube-proxy.tar /run/kube-docker-files/ + else + cp /tmp/kubernetes/server/bin/kube-apiserver.tar /run/kube-docker-files/ + cp /tmp/kubernetes/server/bin/kube-controller-manager.tar /run/kube-docker-files/ + cp /tmp/kubernetes/server/bin/kube-scheduler.tar /run/kube-docker-files/ + cp -r /tmp/kubernetes/addons /run/kube-docker-files/ fi # For a testing cluster, we use kubelet, kube-proxy, and kubectl binaries # from the release tarball and place them in /usr/local/bin. For a non-test @@ -246,3 +253,458 @@ prepare_log_file() { chmod 644 $1 chown root:root $1 } + +# It monitors the health of several master and node components. +health_monitoring() { + sleep_seconds=10 + max_seconds=10 + # We simply kill the process when there is a failure. Another upstart job will automatically + # restart the process. + while [ 1 ]; do + if ! timeout 20 docker ps > /dev/null; then + echo "Docker daemon failed!" + pkill docker + fi + if ! curl --insecure -m ${max_seconds} -f -s https://127.0.0.1:${KUBELET_PORT:-10250}/healthz > /dev/null; then + echo "Kubelet is unhealthy!" + pkill kubelet + fi + # TODO(andyzheng0831): Add master side health monitoring. + sleep ${sleep_seconds} + done +} + + +########## The functions below are for master only ########## + +# Mounts a persistent disk (formatting if needed) to store the persistent data +# on the master -- etcd's data, a few settings, and security certs/keys/tokens. +# safe_format_and_mount only formats an unformatted disk, and mkdir -p will +# leave a directory be if it already exists. +mount_master_pd() { + readonly pd_path="/dev/disk/by-id/google-master-pd" + readonly mount_point="/mnt/disks/master-pd" + + # TODO(zmerlynn): GKE is still lagging in master-pd creation + if [ ! -e ${pd_path} ]; then + return + fi + # Format and mount the disk, create directories on it for all of the master's + # persistent data, and link them to where they're used. + mkdir -p ${mount_point} + /usr/share/google/safe_format_and_mount -m "mkfs.ext4 -F" ${pd_path} ${mount_point} >/var/log/master-pd-mount.log || \ + { echo "!!! master-pd mount failed, review /var/log/master-pd-mount.log !!!"; return 1; } + # Contains all the data stored in etcd + mkdir -m 700 -p "${mount_point}/var/etcd" + # Contains the dynamically generated apiserver auth certs and keys + mkdir -p "${mount_point}/etc/srv/kubernetes" + # Directory for kube-apiserver to store SSH key (if necessary) + mkdir -p /"${mount_point}/etc/srv/sshproxy" + ln -s -f "${mount_point}/var/etcd" /var/etcd + mkdir -p /etc/srv + ln -s -f /"${mount_point}/etc/srv/kubernetes" /etc/srv/kubernetes + ln -s -f /"${mount_point}/etc/srv/sshproxy" /etc/srv/sshproxy + + if ! id etcd &>/dev/null; then + useradd -s /sbin/nologin -d /var/etcd etcd + fi + chown -R etcd /"${mount_point}/var/etcd" + chgrp -R etcd "${mount_point}/var/etcd" +} + +# A helper function that adds an entry to a token file. +# $1: account information +# $2: token file +add_token_entry() { + current_token=$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64 | tr -d "=+/" | dd bs=32 count=1 2>/dev/null) + echo "${tcurrent_token},$1,$1" >> $2 +} + +# After the first boot and on upgrade, these files exists on the master-pd +# and should never be touched again (except perhaps an additional service +# account, see NB below.) +create_master_auth() { + readonly auth_dir="/etc/srv/kubernetes" + if [ ! -e "${auth_dir}/ca.crt" ]; then + if [ ! -z "${CA_CERT:-}" ] && [ ! -z "${MASTER_CERT:-}" ] && [ ! -z "${MASTER_KEY:-}" ]; then + echo "${CA_CERT}" | base64 -d > "${auth_dir}/ca.crt" + echo "${MASTER_CERT}" | base64 -d > "${auth_dir}/server.cert" + echo "${MASTER_KEY}" | base64 -d > "${auth_dir}/server.key" + # Kubecfg cert/key are optional and included for backwards compatibility. + # TODO(roberthbailey): Remove these two lines once GKE no longer requires + # fetching clients certs from the master VM. + echo "${KUBECFG_CERT:-}" | base64 -d > "${auth_dir}/kubecfg.crt" + echo "${KUBECFG_KEY:-}" | base64 -d > "${auth_dir}/kubecfg.key" + fi + fi + readonly basic_auth_csv="${auth_dir}/basic_auth.csv" + if [ ! -e "${basic_auth_csv}" ]; then + echo "${KUBE_PASSWORD},${KUBE_USER},admin" > "${basic_auth_csv}" + fi + readonly known_tokens_csv="${auth_dir}/known_tokens.csv" + if [ ! -e "${known_tokens_csv}" ]; then + echo "${KUBE_BEARER_TOKEN},admin,admin" > "${known_tokens_csv}" + echo "${KUBELET_TOKEN},kubelet,kubelet" >> "${known_tokens_csv}" + echo "${KUBE_PROXY_TOKEN},kube_proxy,kube_proxy" >> "${known_tokens_csv}" + + # Generate tokens for other "service accounts". Append to known_tokens. + # + # NB: If this list ever changes, this script actually has to + # change to detect the existence of this file, kill any deleted + # old tokens and add any new tokens (to handle the upgrade case). + add_token_entry "system:scheduler" ${known_tokens_csv} + add_token_entry "system:controller_manager" ${known_tokens_csv} + add_token_entry "system:logging" ${known_tokens_csv} + add_token_entry "system:monitoring" ${known_tokens_csv} + add_token_entry "system:dns" ${known_tokens_csv} + fi + + if [ -n "${PROJECT_ID:-}" ] && [ -n "${TOKEN_URL:-}" ] && [ -n "${TOKEN_BODY:-}" ] && [ -n "${NODE_NETWORK:-}" ]; then + cat </etc/gce.conf +[global] +token-url = ${TOKEN_URL} +token-body = ${TOKEN_BODY} +project-id = ${PROJECT_ID} +network-name = ${NODE_NETWORK} +EOF + fi +} + +# Uses KUBELET_CA_CERT (falling back to CA_CERT), KUBELET_CERT, and KUBELET_KEY +# to generate a kubeconfig file for the kubelet to securely connect to the apiserver. +create_master_kubelet_auth() { + # Only configure the kubelet on the master if the required variables are + # set in the environment. + if [ -n "${KUBELET_APISERVER:-}" ] && [ -n "${KUBELET_CERT:-}" ] && [ -n "${KUBELET_KEY:-}" ]; then + create_kubelet_kubeconfig + fi +} + +# Replaces the variables in the etcd manifest file with the real values, and then +# copy the file to the manifest dir +# $1: value for variable 'suffix' +# $2: value for variable 'port' +# $3: value for variable 'server_port' +# $4: value for variable 'cpulimit' +# $5: pod name, which should be either etcd or etcd-events +prepare_etcd_manifest() { + readonly etcd_temp_file="/tmp/$5" + cp /run/kube-manifests/kubernetes/trusty/etcd.manifest "${etcd_temp_file}" + sed -i -e "s@{{ *suffix *}}@$1@g" "${etcd_temp_file}" + sed -i -e "s@{{ *port *}}@$2@g" "${etcd_temp_file}" + sed -i -e "s@{{ *server_port *}}@$3@g" "${etcd_temp_file}" + sed -i -e "s@{{ *cpulimit *}}@\"$4\"@g" "${etcd_temp_file}" + # Replace the volume host path + sed -i -e "s@/mnt/master-pd/var/etcd@/mnt/disks/master-pd/var/etcd@g" "${etcd_temp_file}" + mv "${etcd_temp_file}" /etc/kubernetes/manifests +} + +# Starts etcd server pod (and etcd-events pod if needed). +# More specifically, it prepares dirs and files, sets the variable value +# in the manifests, and copies them to /etc/kubernetes/manifests. +start_etcd_servers() { + if [ -d /etc/etcd ]; then + rm -rf /etc/etcd + fi + if [ -e /etc/default/etcd ]; then + rm -f /etc/default/etcd + fi + if [ -e /etc/systemd/system/etcd.service ]; then + rm -f /etc/systemd/system/etcd.service + fi + if [ -e /etc/init.d/etcd ]; then + rm -f /etc/init.d/etcd + fi + prepare_log_file /var/log/etcd.log + prepare_etcd_manifest "" "4001" "2380" "200m" "etcd.manifest" + + # Switch on the second etcd instance if there are more than 50 nodes. + if [ -n "${NUM_NODES:-}" ] && [ "${NUM_NODES}" -gt 50 ]; then + prepare_log_file /var/log/etcd-events.log + prepare_etcd_manifest "-events" "4002" "2381" "100m" "etcd-events.manifest" + fi +} + +# Calculates the following variables based on env variables, which will be used +# by the manifests of several kube-master components. +# CLOUD_CONFIG_VOLUME +# CLOUD_CONFIG_MOUNT +# DOCKER_REGISTRY +compute_master_manifest_variables() { + CLOUD_CONFIG_VOLUME="" + CLOUD_CONFIG_MOUNT="" + if [ -n "${PROJECT_ID:-}" ] && [ -n "${TOKEN_URL:-}" ] && [ -n "${TOKEN_BODY:-}" ] && [ -n "${NODE_NETWORK:-}" ]; then + CLOUD_CONFIG_VOLUME="{\"name\": \"cloudconfigmount\",\"hostPath\": {\"path\": \"/etc/gce.conf\"}}," + CLOUD_CONFIG_MOUNT="{\"name\": \"cloudconfigmount\",\"mountPath\": \"/etc/gce.conf\", \"readOnly\": true}," + fi + DOCKER_REGISTRY="gcr.io/google_containers" + if [ -n "${KUBE_DOCKER_REGISTRY:-}" ]; then + DOCKER_REGISTRY=${KUBE_DOCKER_REGISTRY} + fi + KUBECTL_BIN="/usr/bin/kubectl" + if [ "${TEST_CLUSTER:-}" = "true" ]; then + KUBECTL_BIN="/usr/local/bin/kubectl" + fi +} + +# Starts k8s apiserver. +# It prepares the log file, loads the docker image, calculates variables, sets them +# in the manifest file, and then copies the manifest file to /etc/kubernetes/manifests. +# +# Assumed vars (which are calculated in function compute_master_manifest_variables) +# CLOUD_CONFIG_VOLUME +# CLOUD_CONFIG_MOUNT +# DOCKER_REGISTRY +start_kube_apiserver() { + prepare_log_file /var/log/kube-apiserver.log + # Load the docker image from file. + echo "Try to load docker image file kube-apiserver.tar" + timeout 30 docker load -i /run/kube-docker-files/kube-apiserver.tar + + # Calculate variables and assemble the command line. + params="--cloud-provider=gce --address=127.0.0.1 --etcd-servers=http://127.0.0.1:4001 --tls-cert-file=/etc/srv/kubernetes/server.cert --tls-private-key-file=/etc/srv/kubernetes/server.key --secure-port=443 --client-ca-file=/etc/srv/kubernetes/ca.crt --token-auth-file=/etc/srv/kubernetes/known_tokens.csv --basic-auth-file=/etc/srv/kubernetes/basic_auth.csv --allow-privileged=true" + if [ -n "${NUM_NODES:-}" ] && [ "${NUM_NODES}" -gt 50 ]; then + params="${params} --etcd-servers-overrides=/events#http://127.0.0.1:4002" + fi + if [ -n "${SERVICE_CLUSTER_IP_RANGE:-}" ]; then + params="${params} --service-cluster-ip-range=${SERVICE_CLUSTER_IP_RANGE}" + fi + if [ -n "${ADMISSION_CONTROL:-}" ]; then + params="${params} --admission-control=${ADMISSION_CONTROL}" + fi + if [ -n "${KUBE_APISERVER_REQUEST_TIMEOUT:-}" ]; then + params="${params} --min-request-timeout=${KUBE_APISERVER_REQUEST_TIMEOUT}" + fi + if [ -n "${RUNTIME_CONFIG:-}" ]; then + params="${params} --runtime-config=${RUNTIME_CONFIG}" + fi + if [ -n "${APISERVER_TEST_ARGS:-}" ]; then + params="${params} ${APISERVER_TEST_ARGS}" + fi + log_level="--v=2" + if [ -n "${API_SERVER_TEST_LOG_LEVEL:-}" ]; then + log_level="${API_SERVER_TEST_LOG_LEVEL}" + fi + params="${params} ${log_level}" + + if [ -n "${PROJECT_ID:-}" ] && [ -n "${TOKEN_URL:-}" ] && [ -n "${TOKEN_BODY:-}" ] && [ -n "${NODE_NETWORK:-}" ]; then + readonly vm_external_ip=$(curl --fail --silent -H 'Metadata-Flavor: Google' "http://metadata/computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip") + params="${params} --cloud-config=/etc/gce.conf --advertise-address=${vm_external_ip} --ssh-user=${PROXY_SSH_USER} --ssh-keyfile=/etc/srv/sshproxy/.sshkeyfile" + fi + readonly kube_apiserver_docker_tag=$(cat /run/kube-docker-files/kube-apiserver.docker_tag) + + src_file="/run/kube-manifests/kubernetes/trusty/kube-apiserver.manifest" + sed -i -e "s@{{params}}@${params}@g" ${src_file} + sed -i -e "s@{{cloud_config_mount}}@${CLOUD_CONFIG_MOUNT}@g" ${src_file} + sed -i -e "s@{{cloud_config_volume}}@${CLOUD_CONFIG_VOLUME}@g" ${src_file} + sed -i -e "s@{{kube_docker_registry}}@${DOCKER_REGISTRY}@g" ${src_file} + sed -i -e "s@{{kube-apiserver_docker_tag}}@${kube_apiserver_docker_tag}@g" ${src_file} + cp ${src_file} /etc/kubernetes/manifests +} + +# Starts k8s controller manager. +# It prepares the log file, loads the docker image, calculates variables, sets them +# in the manifest file, and then copies the manifest file to /etc/kubernetes/manifests. +# +# Assumed vars (which are calculated in function compute_master_manifest_variables) +# CLOUD_CONFIG_VOLUME +# CLOUD_CONFIG_MOUNT +# DOCKER_REGISTRY +start_kube_controller_manager() { + prepare_log_file /var/log/kube-controller-manager.log + # Load the docker image from file. + echo "Try to load docker image file kube-controller-manager.tar" + timeout 30 docker load -i /run/kube-docker-files/kube-controller-manager.tar + + # Calculate variables and assemble the command line. + params="--master=127.0.0.1:8080 --cloud-provider=gce --root-ca-file=/etc/srv/kubernetes/ca.crt --service-account-private-key-file=/etc/srv/kubernetes/server.key" + if [ -n "${INSTANCE_PREFIX:-}" ]; then + params="${params} --cluster-name=${INSTANCE_PREFIX}" + fi + if [ -n "${CLUSTER_IP_RANGE:-}" ]; then + params="${params} --cluster-cidr=${CLUSTER_IP_RANGE}" + fi + if [ "${ALLOCATE_NODE_CIDRS:-}" = "true" ]; then + params="${params} --allocate-node-cidrs=${ALLOCATE_NODE_CIDRS}" + fi + if [ -n "${TERMINATED_POD_GC_THRESHOLD:-}" ]; then + params="${params} --terminated-pod-gc-threshold=${TERMINATED_POD_GC_THRESHOLD}" + fi + log_level="--v=2" + if [ -n "${CONTROLLER_MANAGER_TEST_LOG_LEVEL:-}" ]; then + log_level="${CONTROLLER_MANAGER_TEST_LOG_LEVEL}" + fi + params="${params} ${log_level}" + if [ -n "${CONTROLLER_MANAGER_TEST_ARGS:-}" ]; then + params="${params} ${CONTROLLER_MANAGER_TEST_ARGS}" + fi + readonly kube_rc_docker_tag=$(cat /run/kube-docker-files/kube-controller-manager.docker_tag) + + src_file="/run/kube-manifests/kubernetes/trusty/kube-controller-manager.manifest" + sed -i -e "s@{{params}}@${params}@g" ${src_file} + sed -i -e "s@{{cloud_config_mount}}@${CLOUD_CONFIG_MOUNT}@g" ${src_file} + sed -i -e "s@{{cloud_config_volume}}@${CLOUD_CONFIG_VOLUME}@g" ${src_file} + sed -i -e "s@{{kube_docker_registry}}@${DOCKER_REGISTRY}@g" ${src_file} + sed -i -e "s@{{kube-controller-manager_docker_tag}}@${kube_rc_docker_tag}@g" ${src_file} + cp ${src_file} /etc/kubernetes/manifests +} + +# Start k8s scheduler. +# It prepares the log file, loads the docker image, calculates variables, sets them +# in the manifest file, and then copies the manifest file to /etc/kubernetes/manifests. +# +# Assumed vars (which are calculated in compute_master_manifest_variables()) +# DOCKER_REGISTRY +start_kube_scheduler() { + prepare_log_file /var/log/kube-scheduler.log + # Load the docker image from file. + echo "Try to load docker image file kube-scheduler.tar" + timeout 30 docker load -i /run/kube-docker-files/kube-scheduler.tar + + # Calculate variables and set them in the manifest. + params="" + log_level="--v=2" + if [ -n "${SCHEDULER_TEST_LOG_LEVEL:-}" ]; then + log_level="${SCHEDULER_TEST_LOG_LEVEL}" + fi + params="${params} ${log_level}" + if [ -n "${SCHEDULER_TEST_ARGS:-}" ]; then + params="${params} ${SCHEDULER_TEST_ARGS}" + fi + readonly kube_scheduler_docker_tag=$(cat /run/kube-docker-files/kube-scheduler.docker_tag) + + # Remove salt comments and replace variables with values + src_file="/run/kube-manifests/kubernetes/trusty/kube-scheduler.manifest" + sed -i "/^ *{%/d" ${src_file} + sed -i -e "s@{{params}}@${params}@g" ${src_file} + sed -i -e "s@{{pillar\['kube_docker_registry'\]}}@${DOCKER_REGISTRY}@g" ${src_file} + sed -i -e "s@{{pillar\['kube-scheduler_docker_tag'\]}}@${kube_scheduler_docker_tag}@g" ${src_file} + cp ${src_file} /etc/kubernetes/manifests +} + +# Start a fluentd static pod for logging. +start_fluentd() { + if [ "${ENABLE_NODE_LOGGING:-}" = "true" ]; then + if [ "${LOGGING_DESTINATION:-}" = "gcp" ]; then + cp /run/kube-manifests/kubernetes/fluentd-gcp.yaml /etc/kubernetes/manifests/ + elif [ "${LOGGING_DESTINATION:-}" = "elasticsearch" ]; then + cp /run/kube-manifests/kubernetes/fluentd-es.yaml /etc/kubernetes/manifests/ + fi + fi +} + +# A helper function for copying addon manifests and set dir/files +# permissions. +# $1: addon category under /etc/kubernetes +# $2: manifest source dir +setup_addon_manifests() { + src_dir="/run/kube-manifests/kubernetes/trusty/$2" + dst_dir="/etc/kubernetes/$1/$2" + if [ ! -d "${dst_dir}" ]; then + mkdir -p "${dst_dir}" + fi + files=$(find "${src_dir}" -name "*.yaml") + if [ -n "${files}" ]; then + cp "${src_dir}/"*.yaml "${dst_dir}" + fi + files=$(find "${src_dir}" -name "*.json") + if [ -n "${files}" ]; then + cp "${src_dir}/"*.json "${dst_dir}" + fi + files=$(find "${src_dir}" -name "*.yaml.in") + if [ -n "${files}" ]; then + cp "${src_dir}/"*.yaml.in "${dst_dir}" + fi + chown -R root:root "${dst_dir}" + chmod 755 "${dst_dir}" + chmod 644 "${dst_dir}"/* +} + +# Start k8s addons static pods. +# +# Assumed vars (which are calculated in function compute_master_manifest_variables) +# KUBECTL_BIN +start_kube_addons() { + # Fluentd + start_fluentd + + addon_src_dir="/run/kube-manifests/kubernetes/trusty" + addon_dst_dir="/etc/kubernetes/addons" + # Set up manifests of other addons. + if [ "${ENABLE_CLUSTER_MONITORING:-}" = "influxdb" ] || \ + [ "${ENABLE_CLUSTER_MONITORING:-}" = "google" ] || \ + [ "${ENABLE_CLUSTER_MONITORING:-}" = "standalone" ] || \ + [ "${ENABLE_CLUSTER_MONITORING:-}" = "googleinfluxdb" ]; then + file_dir="cluster-monitoring/${ENABLE_CLUSTER_MONITORING}" + setup_addon_manifests "addons" "${file_dir}" + # Replace the salt configurations with variable values. + heapster_memory="300Mi" + if [ -n "${NUM_NODES:-}" ] && [ "${NUM_NODES}" -gt 1 ]; then + heapster_memory="$((${NUM_NODES} * 12 + 200))Mi" + fi + controller_yaml="${addon_dst_dir}/${file_dir}" + if [ "${ENABLE_CLUSTER_MONITORING:-}" = "googleinfluxdb" ]; then + controller_yaml="${controller_yaml}/heapster-controller-combined.yaml" + else + controller_yaml="${controller_yaml}/heapster-controller.yaml" + fi + sed -i "/^ *{%/d" "${controller_yaml}" + sed -i -e "s@{{ *heapster_memory *}}@${heapster_memory}@g" "${controller_yaml}" + fi + cp "${addon_src_dir}/namespace.yaml" "${addon_dst_dir}" + if [ "${ENABLE_L7_LOADBALANCING:-}" = "glbc" ]; then + setup_addon_manifests "addons" "cluster-loadbalancing/glbc" + fi + if [ "${ENABLE_CLUSTER_DNS:-}" = "true" ]; then + setup_addon_manifests "addons" "dns" + dns_rc_file="${addon_dst_dir}/dns/skydns-rc.yaml" + dns_svc_file="${addon_dst_dir}/dns/skydns-svc.yaml" + mv "${addon_dst_dir}/dns/skydns-rc.yaml.in" "${dns_rc_file}" + mv "${addon_dst_dir}/dns/skydns-svc.yaml.in" "${dns_svc_file}" + # Replace the salt configurations with variable values. + sed -i -e "s@{{ *pillar\['dns_replicas'\] *}}@${DNS_REPLICAS}@g" "${dns_rc_file}" + sed -i -e "s@{{ *pillar\['dns_domain'\] *}}@${DNS_DOMAIN}@g" "${dns_rc_file}" + sed -i -e "s@{{ *pillar\['dns_server'\] *}}@${DNS_SERVER_IP}@g" "${dns_svc_file}" + fi + if [ "${ENABLE_CLUSTER_REGISTRY:-}" = "true" ]; then + setup_addon_manifests "addons" "registry" + registry_pv_file="${addon_dst_dir}/registry/registry-pv.yaml" + registry_pvc_file="${addon_dst_dir}/registry/registry-pvc.yaml" + mv "${addon_dst_dir}/registry/registry-pv.yaml.in" "${registry_pv_file}" + mv "${addon_dst_dir}/registry/registry-pvc.yaml.in" "${registry_pvc_file}" + # Replace the salt configurations with variable values. + sed -i "/^ *{%/d" "${registry_pv_file}" + sed -i -e "s@{{ *pillar\['cluster_registry_disk_size'\] *}}@${CLUSTER_REGISTRY_DISK_SIZE}@g" "${registry_pv_file}" + sed -i -e "s@{{ *pillar\['cluster_registry_disk_size'\] *}}@${CLUSTER_REGISTRY_DISK_SIZE}@g" "${registry_pvc_file}" + sed -i -e "s@{{ *pillar\['cluster_registry_disk_name'\] *}}@${CLUSTER_REGISTRY_DISK}@g" "${registry_pvc_file}" + fi + if [ "${ENABLE_NODE_LOGGING:-}" = "true" ] && \ + [ "${LOGGING_DESTINATION:-}" = "elasticsearch" ] && \ + [ "${ENABLE_CLUSTER_LOGGING:-}" = "true" ]; then + setup_addon_manifests "addons" "fluentd-elasticsearch" + fi + if [ "${ENABLE_CLUSTER_UI:-}" = "true" ]; then + setup_addon_manifests "addons" "kube-ui" + fi + if echo "${ADMISSION_CONTROL:-}" | grep -q "LimitRanger"; then + setup_addon_manifests "admission-controls" "limit-range" + fi + + # Run scripts to start addons placed in /etc/kubernetes/addons + addon_script_dir="/var/lib/cloud/scripts/kubernetes" + mkdir -p "${addon_script_dir}" + cp "${addon_src_dir}/kube-addons.sh" "${addon_script_dir}" + cp "${addon_src_dir}/kube-addon-update.sh" "${addon_script_dir}" + chmod 544 "${addon_script_dir}/"*.sh + # In case that upstart does not set the HOME variable or sometimes + # GCE customized trusty has a read-only /root. + export HOME="/root" + mount -t tmpfs tmpfs "${HOME}" + mount --bind -o remount,rw,noexec "${HOME}" + export KUBECTL_BIN + export TOKEN_DIR="/etc/srv/kubernetes" + export kubelet_kubeconfig_file="/var/lib/kubelet/kubeconfig" + export TRUSTY_MASTER="true" + # Run the script to start and monitoring addon manifest changes. + /bin/bash "${addon_script_dir}/kube-addons.sh" +} diff --git a/cluster/gce/trusty/helper.sh b/cluster/gce/trusty/helper.sh index d5c9892e21e..206f3237d44 100755 --- a/cluster/gce/trusty/helper.sh +++ b/cluster/gce/trusty/helper.sh @@ -22,10 +22,6 @@ # replaced upstart with systemd as the init system. Consequently, the # configuration cannot work on these images. -# By sourcing debian's helper.sh, we use the same create-master-instance -# functions as debian. But we overwrite the create-node-instance-template -# function to use Ubuntu. -source "${KUBE_ROOT}/cluster/gce/debian/helper.sh" # $1: template name (required) function create-node-instance-template { @@ -35,3 +31,37 @@ function create-node-instance-template { "user-data=${KUBE_ROOT}/cluster/gce/trusty/node.yaml" \ "configure-sh=${KUBE_ROOT}/cluster/gce/trusty/configure.sh" } + +# create-master-instance creates the master instance. If called with +# an argument, the argument is used as the name to a reserved IP +# address for the master. (In the case of upgrade/repair, we re-use +# the same IP.) +# +# It requires a whole slew of assumed variables, partially due to to +# the call to write-master-env. Listing them would be rather +# futile. Instead, we list the required calls to ensure any additional +# variables are set: +# ensure-temp-dir +# detect-project +# get-bearer-token +# +function create-master-instance { + local address_opt="" + [[ -n ${1:-} ]] && address_opt="--address ${1}" + + write-master-env + gcloud compute instances create "${MASTER_NAME}" \ + ${address_opt} \ + --project "${PROJECT}" \ + --zone "${ZONE}" \ + --machine-type "${MASTER_SIZE}" \ + --image-project="${MASTER_IMAGE_PROJECT}" \ + --image "${MASTER_IMAGE}" \ + --tags "${MASTER_TAG}" \ + --network "${NETWORK}" \ + --scopes "storage-ro,compute-rw,monitoring,logging-write" \ + --can-ip-forward \ + --metadata-from-file \ + "kube-env=${KUBE_TEMP}/master-kube-env.yaml,user-data=${KUBE_ROOT}/cluster/gce/trusty/master.yaml,configure-sh=${KUBE_ROOT}/cluster/gce/trusty/configure.sh" \ + --disk "name=${MASTER_NAME}-pd,device-name=master-pd,mode=rw,boot=no,auto-delete=no" +} diff --git a/cluster/gce/trusty/kube-manifests/kube-apiserver.manifest b/cluster/gce/trusty/kube-manifests/kube-apiserver.manifest new file mode 100644 index 00000000000..fa37f1eacc3 --- /dev/null +++ b/cluster/gce/trusty/kube-manifests/kube-apiserver.manifest @@ -0,0 +1,98 @@ +{ +"apiVersion": "v1", +"kind": "Pod", +"metadata": { + "name":"kube-apiserver", + "namespace": "kube-system" +}, +"spec":{ +"hostNetwork": true, +"containers":[ + { + "name": "kube-apiserver", + "image": "{{kube_docker_registry}}/kube-apiserver:{{kube-apiserver_docker_tag}}", + "resources": { + "limits": { + "cpu": "250m" + } + }, + "command": [ + "/bin/sh", + "-c", + "/usr/local/bin/kube-apiserver {{params}} 1>>/var/log/kube-apiserver.log 2>&1" + ], + "livenessProbe": { + "httpGet": { + "host": "127.0.0.1", + "port": 8080, + "path": "/healthz" + }, + "initialDelaySeconds": 15, + "timeoutSeconds": 15 + }, + "ports":[ + { "name": "https", + "containerPort": 443, + "hostPort": 443},{ + "name": "local", + "containerPort": 8080, + "hostPort": 8080} + ], + "volumeMounts": [ + {{cloud_config_mount}} + { "name": "srvkube", + "mountPath": "/etc/srv/kubernetes", + "readOnly": true}, + { "name": "logfile", + "mountPath": "/var/log/kube-apiserver.log", + "readOnly": false}, + { "name": "etcssl", + "mountPath": "/etc/ssl", + "readOnly": true}, + { "name": "varssl", + "mountPath": "/var/ssl", + "readOnly": true}, + { "name": "etcopenssl", + "mountPath": "/etc/openssl", + "readOnly": true}, + { "name": "etcpkitls", + "mountPath": "/etc/pki/tls", + "readOnly": true}, + { "name": "srvsshproxy", + "mountPath": "/etc/srv/sshproxy", + "readOnly": false} + ] + } +], +"volumes":[ + {{cloud_config_volume}} + { "name": "srvkube", + "hostPath": { + "path": "/etc/srv/kubernetes"} + }, + { "name": "logfile", + "hostPath": { + "path": "/var/log/kube-apiserver.log"} + }, + { "name": "etcssl", + "hostPath": { + "path": "/etc/ssl"} + }, + { "name": "varssl", + "hostPath": { + "path": "/var/ssl"} + }, + { "name": "etcopenssl", + "hostPath": { + "path": "/etc/openssl"} + }, + { "name": "etcpkitls", + "hostPath": { + "path": "/etc/pki/tls"} + }, + { "name": "srvsshproxy", + "hostPath": { + "path": "/etc/srv/sshproxy"} + } +] +}} diff --git a/cluster/gce/trusty/kube-manifests/kube-controller-manager.manifest b/cluster/gce/trusty/kube-manifests/kube-controller-manager.manifest new file mode 100644 index 00000000000..de91d59ff42 --- /dev/null +++ b/cluster/gce/trusty/kube-manifests/kube-controller-manager.manifest @@ -0,0 +1,83 @@ +{ +"apiVersion": "v1", +"kind": "Pod", +"metadata": { + "name":"kube-controller-manager", + "namespace": "kube-system" +}, +"spec":{ +"hostNetwork": true, +"containers":[ + { + "name": "kube-controller-manager", + "image": "{{kube_docker_registry}}/kube-controller-manager:{{kube-controller-manager_docker_tag}}", + "resources": { + "limits": { + "cpu": "200m" + } + }, + "command": [ + "/bin/sh", + "-c", + "/usr/local/bin/kube-controller-manager {{params}} 1>>/var/log/kube-controller-manager.log 2>&1" + ], + "livenessProbe": { + "httpGet": { + "host": "127.0.0.1", + "port": 10252, + "path": "/healthz" + }, + "initialDelaySeconds": 15, + "timeoutSeconds": 15 + }, + "volumeMounts": [ + {{cloud_config_mount}} + { "name": "srvkube", + "mountPath": "/etc/srv/kubernetes", + "readOnly": true}, + { "name": "logfile", + "mountPath": "/var/log/kube-controller-manager.log", + "readOnly": false}, + { "name": "etcssl", + "mountPath": "/etc/ssl", + "readOnly": true}, + { "name": "varssl", + "mountPath": "/var/ssl", + "readOnly": true}, + { "name": "etcopenssl", + "mountPath": "/etc/openssl", + "readOnly": true}, + { "name": "etcpkitls", + "mountPath": "/etc/pki/tls", + "readOnly": true} + ] + } +], +"volumes":[ + {{cloud_config_volume}} + { "name": "srvkube", + "hostPath": { + "path": "/etc/srv/kubernetes"} + }, + { "name": "logfile", + "hostPath": { + "path": "/var/log/kube-controller-manager.log"} + }, + { "name": "etcssl", + "hostPath": { + "path": "/etc/ssl"} + }, + { "name": "varssl", + "hostPath": { + "path": "/var/ssl"} + }, + { "name": "etcopenssl", + "hostPath": { + "path": "/etc/openssl"} + }, + { "name": "etcpkitls", + "hostPath": { + "path": "/etc/pki/tls"} + } +] +}} diff --git a/cluster/gce/trusty/master.yaml b/cluster/gce/trusty/master.yaml new file mode 100644 index 00000000000..898f7963b4c --- /dev/null +++ b/cluster/gce/trusty/master.yaml @@ -0,0 +1,235 @@ +From nobody Tue Feb 1 11:33:00 2016 +Content-Type: multipart/mixed; boundary="====================================" +MIME-Version: 1.0 + +--==================================== +MIME-Version: 1.0 +Content-Type: text/upstart-job; charset="us-ascii" +Content-Transfer-Encoding: 7bit +Content-Disposition: attachment; filename="kube-env.conf" + +#upstart-job + +description "Prepare kube master environment" + +start on cloud-config + +script + set -o errexit + set -o nounset + + # Fetch the script for configuring the instance. + curl --fail --silent --show-error \ + -H "X-Google-Metadata-Request: True" \ + -o /etc/kube-configure.sh \ + http://metadata.google.internal/computeMetadata/v1/instance/attributes/configure-sh + . /etc/kube-configure.sh + + echo "Configuring hostname" + config_hostname + echo "Configuring IP firewall rules" + config_ip_firewall + echo "Downloading kube-env file" + download_kube_env + . /etc/kube-env + echo "Creating required directories" + create_dirs + echo "Mount master PD" + mount_master_pd + echo "Creating kuberntes master auth file" + create_master_auth + echo "Creating master instance kubelet auth file" + create_master_kubelet_auth +end script + +--==================================== +MIME-Version: 1.0 +Content-Type: text/upstart-job; charset="us-ascii" +Content-Transfer-Encoding: 7bit +Content-Disposition: attachment; filename="kube-install-packages.conf" + +#upstart-job + +description "Install packages needed to run kubernetes" + +start on stopped kube-env + +script + set -o errexit + set -o nounset + + . /etc/kube-configure.sh + install_critical_packages +end script + +--==================================== +MIME-Version: 1.0 +Content-Type: text/upstart-job; charset="us-ascii" +Content-Transfer-Encoding: 7bit +Content-Disposition: attachment; filename="kube-install-additional-packages.conf" + +#upstart-job + +description "Install additional packages used by kubernetes" + +start on stopped kube-install-packages + +script + set -o errexit + set -o nounset + + . /etc/kube-configure.sh + install_additional_packages +end script + +--==================================== +MIME-Version: 1.0 +Content-Type: text/upstart-job; charset="us-ascii" +Content-Transfer-Encoding: 7bit +Content-Disposition: attachment; filename="kube-install-master.conf" + +#upstart-job + +description "Download and install k8s binaries and configurations" + +start on stopped kube-env + +script + set -o errexit + set -o nounset + + . /etc/kube-configure.sh + . /etc/kube-env + install_kube_binary_config +end script + +--==================================== +MIME-Version: 1.0 +Content-Type: text/upstart-job; charset="us-ascii" +Content-Transfer-Encoding: 7bit +Content-Disposition: attachment; filename="kubelet.conf" + +#upstart-job + +description "Run kubelet service" + +start on stopped kube-install-packages and stopped kube-install-master + +respawn + +script + set -o errexit + set -o nounset + + echo "Start kubelet upstart job" + + . /etc/kube-env + BINARY_PATH="/usr/bin/kubelet" + if [ "${TEST_CLUSTER:-}" = "true" ]; then + BINARY_PATH="/usr/local/bin/kubelet" + fi + # Assemble command line flags based on env variables. + ARGS="--v=2" + if [ -n "${KUBELET_TEST_ARGS:-}" ]; then + ARGS="${KUBELET_TEST_ARGS}" + fi + if [ ! -z "${KUBELET_APISERVER:-}" ] && [ ! -z "${KUBELET_CERT:-}" ] && [ ! -z "${KUBELET_KEY:-}" ]; then + ARGS="${ARGS} --api-servers=https://${KUBELET_APISERVER}" + ARGS="${ARGS} --register-schedulable=false --reconcile-cidr=false" + ARGS="${ARGS} --pod-cidr=10.123.45.0/30" + else + ARGS="${ARGS} --pod-cidr=${MASTER_IP_RANGE}" + fi + if [ "${ENABLE_MANIFEST_URL:-}" = "true" ]; then + ARGS="${ARGS} --manifest-url=${MANIFEST_URL} --manifest-url-header=${MANIFEST_URL_HEADER}" + fi + + ${BINARY_PATH} \ + --enable-debugging-handlers=false \ + --cloud-provider=gce \ + --config=/etc/kubernetes/manifests \ + --allow-privileged=true \ + --cluster-dns=${DNS_SERVER_IP} \ + --cluster-domain=${DNS_DOMAIN} \ + --configure-cbr0=${ALLOCATE_NODE_CIDRS} \ + --cgroup-root=/ \ + --system-container=/system \ + --nosystemd=true \ + ${ARGS} +end script + +# Wait for 10s to start kubelet again. +post-stop exec sleep 10 + +--==================================== +MIME-Version: 1.0 +Content-Type: text/upstart-job; charset="us-ascii" +Content-Transfer-Encoding: 7bit +Content-Disposition: attachment; filename="kube-docker.conf" + +#upstart-job + +description "Restart docker daemon" + +# The condition "stopped kube-install-additional-packages" is to avoid +# breaking nsenter installation, which is through a docker container. +# It can be removed if we find a better way to install nsenter. +start on started kubelet and stopped kube-install-additional-packages + +script + set -o errexit + set -o nounset + + . /etc/kube-configure.sh + . /etc/kube-env + restart_docker_daemon +end script + +--==================================== +MIME-Version: 1.0 +Content-Type: text/upstart-job; charset="us-ascii" +Content-Transfer-Encoding: 7bit +Content-Disposition: attachment; filename="kube-master-components.conf" + +#upstart-job + +description "Start kube-master components and addons pods" + +start on stopped kube-docker + +script + set -o errexit + set -o nounset + + . /etc/kube-configure.sh + . /etc/kube-env + start_etcd_servers + compute_master_manifest_variables + start_kube_apiserver + start_kube_controller_manager + start_kube_scheduler + start_kube_addons +end script + +--==================================== +MIME-Version: 1.0 +Content-Type: text/upstart-job; charset="us-ascii" +Content-Transfer-Encoding: 7bit +Content-Disposition: attachment; filename="kube-master-health-monitoring.conf" + +#upstart-job + +description "Kubenetes master health monitoring" + +start on stopped kube-docker + +script + set -o errexit + set -o nounset + + . /etc/kube-configure.sh + . /etc/kube-env + health_monitoring +end script + +--====================================-- diff --git a/cluster/gce/trusty/node.yaml b/cluster/gce/trusty/node.yaml index e1d90ea539f..cb0078af3bb 100644 --- a/cluster/gce/trusty/node.yaml +++ b/cluster/gce/trusty/node.yaml @@ -1,4 +1,4 @@ -From nobody Tue Dec 22 10:13:54 2015 +From nobody Tue Feb 1 11:33:00 2016 Content-Type: multipart/mixed; boundary="====================================" MIME-Version: 1.0 @@ -240,15 +240,10 @@ script set -o nounset # Kube-system pod manifest files are located at /run/kube-manifests/kubernetes. + . /etc/kube-configure.sh . /etc/kube-env # Fluentd - if [ "${ENABLE_NODE_LOGGING:-}" = "true" ]; then - if [ "${LOGGING_DESTINATION:-}" = "gcp" ]; then - cp /run/kube-manifests/kubernetes/fluentd-gcp.yaml /etc/kubernetes/manifests/ - elif [ "${LOGGING_DESTINATION:-}" = "elasticsearch" ]; then - cp /run/kube-manifests/kubernetes/fluentd-es.yaml /etc/kubernetes/manifests/ - fi - fi + start_fluentd # Kube-registry-proxy if [ "${ENABLE_CLUSTER_REGISTRY:-}" = "true" ]; then cp /run/kube-manifests/kubernetes/kube-registry-proxy.yaml /etc/kubernetes/manifests/ @@ -275,28 +270,9 @@ script # TODO(andyzheng0831): replace it with a more reliable method if possible. sleep 60 + . /etc/kube-configure.sh . /etc/kube-env - sleep_seconds=10 - max_seconds=10 - # We simply kill the process when there is a failure. Another upstart job will automatically - # restart the process. - while [ 1 ]; do - if ! timeout 20 docker ps > /dev/null; then - echo "Docker daemon failed!" - pkill docker - fi - if ! curl --insecure -m ${max_seconds} -f -s https://127.0.0.1:${KUBELET_PORT:-10250}/healthz > /dev/null; then - echo "Kubelet is unhealthy!" - pkill kubelet - fi - if ! curl -m ${max_seconds} -f -s http://127.0.0.1:10249/healthz > /dev/null; then - echo "Kube-proxy is unhealthy!" - # Get the ID of kube-proxy container and then kill it. - container=$(docker ps -q --filter name='k8s_kube-proxy') - docker kill ${container} - fi - sleep ${sleep_seconds} - done + health_monitoring end script --====================================-- diff --git a/cluster/saltbase/salt/kube-addons/kube-addons.sh b/cluster/saltbase/salt/kube-addons/kube-addons.sh index d158d3340dc..19fafb6d2c6 100644 --- a/cluster/saltbase/salt/kube-addons/kube-addons.sh +++ b/cluster/saltbase/salt/kube-addons/kube-addons.sh @@ -23,6 +23,7 @@ ADDON_CHECK_INTERVAL_SEC=${TEST_ADDON_CHECK_INTERVAL_SEC:-600} SYSTEM_NAMESPACE=kube-system token_dir=${TOKEN_DIR:-/srv/kubernetes} +trusty_master=${TRUSTY_MASTER:-false} function ensure_python() { if ! python --version > /dev/null 2>&1; then @@ -162,8 +163,11 @@ function load-docker-images() { # managed result is of that. Start everything below that directory. echo "== Kubernetes addon manager started at $(date -Is) with ADDON_CHECK_INTERVAL_SEC=${ADDON_CHECK_INTERVAL_SEC} ==" -# Load any images that we may need -load-docker-images /srv/salt/kube-addons-images +# Load any images that we may need. This is not needed for trusty master and +# the way it restarts docker daemon does not work for trusty. +if [[ "${trusty_master}" == "false" ]]; then + load-docker-images /srv/salt/kube-addons-images +fi ensure_python From 070dce1bec68e14c5ed80155fd19ebb8d48b76b7 Mon Sep 17 00:00:00 2001 From: derekwaynecarr Date: Wed, 3 Feb 2016 14:39:24 -0500 Subject: [PATCH 109/328] Fix DeleteCollection in FakeClient --- .../client-gen/generators/fake/generator-fake-for-type.go | 4 ++-- .../generated/extensions/unversioned/fake/fake_daemonset.go | 2 +- .../generated/extensions/unversioned/fake/fake_deployment.go | 2 +- .../unversioned/fake/fake_horizontalpodautoscaler.go | 2 +- .../generated/extensions/unversioned/fake/fake_ingress.go | 2 +- .../typed/generated/extensions/unversioned/fake/fake_job.go | 2 +- .../generated/extensions/unversioned/fake/fake_replicaset.go | 2 +- .../extensions/unversioned/fake/fake_thirdpartyresource.go | 2 +- .../generated/legacy/unversioned/fake/fake_componentstatus.go | 2 +- .../typed/generated/legacy/unversioned/fake/fake_configmap.go | 2 +- .../typed/generated/legacy/unversioned/fake/fake_endpoints.go | 2 +- .../generated/legacy/unversioned/fake/fake_limitrange.go | 2 +- .../typed/generated/legacy/unversioned/fake/fake_namespace.go | 2 +- .../typed/generated/legacy/unversioned/fake/fake_node.go | 2 +- .../legacy/unversioned/fake/fake_persistentvolume.go | 2 +- .../legacy/unversioned/fake/fake_persistentvolumeclaim.go | 2 +- .../typed/generated/legacy/unversioned/fake/fake_pod.go | 2 +- .../generated/legacy/unversioned/fake/fake_podtemplate.go | 2 +- .../legacy/unversioned/fake/fake_replicationcontroller.go | 2 +- .../generated/legacy/unversioned/fake/fake_resourcequota.go | 2 +- .../typed/generated/legacy/unversioned/fake/fake_secret.go | 2 +- .../typed/generated/legacy/unversioned/fake/fake_service.go | 2 +- .../generated/legacy/unversioned/fake/fake_serviceaccount.go | 2 +- 23 files changed, 24 insertions(+), 24 deletions(-) diff --git a/cmd/libs/go2idl/client-gen/generators/fake/generator-fake-for-type.go b/cmd/libs/go2idl/client-gen/generators/fake/generator-fake-for-type.go index 3ad0e507b96..39216f76b45 100644 --- a/cmd/libs/go2idl/client-gen/generators/fake/generator-fake-for-type.go +++ b/cmd/libs/go2idl/client-gen/generators/fake/generator-fake-for-type.go @@ -212,8 +212,8 @@ func (c *Fake$.type|publicPlural$) Delete(name string, options *$.apiDeleteOptio var deleteCollectionTemplate = ` func (c *Fake$.type|publicPlural$) DeleteCollection(options *$.apiDeleteOptions|raw$, listOptions $.apiListOptions|raw$) error { - $if .namespaced$action := $.NewDeleteCollectionAction|raw$("events", c.ns, listOptions) - $else$action := $.NewRootDeleteCollectionAction|raw$("events", listOptions) + $if .namespaced$action := $.NewDeleteCollectionAction|raw$("$.type|allLowercasePlural$", c.ns, listOptions) + $else$action := $.NewRootDeleteCollectionAction|raw$("$.type|allLowercasePlural$", listOptions) $end$ _, err := c.Fake.Invokes(action, &$.type|raw$List{}) return err diff --git a/pkg/client/typed/generated/extensions/unversioned/fake/fake_daemonset.go b/pkg/client/typed/generated/extensions/unversioned/fake/fake_daemonset.go index 2bbfaa784af..7de9f927f77 100644 --- a/pkg/client/typed/generated/extensions/unversioned/fake/fake_daemonset.go +++ b/pkg/client/typed/generated/extensions/unversioned/fake/fake_daemonset.go @@ -68,7 +68,7 @@ func (c *FakeDaemonSets) Delete(name string, options *api.DeleteOptions) error { } func (c *FakeDaemonSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { - action := core.NewDeleteCollectionAction("events", c.ns, listOptions) + action := core.NewDeleteCollectionAction("daemonsets", c.ns, listOptions) _, err := c.Fake.Invokes(action, &extensions.DaemonSetList{}) return err diff --git a/pkg/client/typed/generated/extensions/unversioned/fake/fake_deployment.go b/pkg/client/typed/generated/extensions/unversioned/fake/fake_deployment.go index b6cc0713ff5..748968a9dbf 100644 --- a/pkg/client/typed/generated/extensions/unversioned/fake/fake_deployment.go +++ b/pkg/client/typed/generated/extensions/unversioned/fake/fake_deployment.go @@ -68,7 +68,7 @@ func (c *FakeDeployments) Delete(name string, options *api.DeleteOptions) error } func (c *FakeDeployments) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { - action := core.NewDeleteCollectionAction("events", c.ns, listOptions) + action := core.NewDeleteCollectionAction("deployments", c.ns, listOptions) _, err := c.Fake.Invokes(action, &extensions.DeploymentList{}) return err diff --git a/pkg/client/typed/generated/extensions/unversioned/fake/fake_horizontalpodautoscaler.go b/pkg/client/typed/generated/extensions/unversioned/fake/fake_horizontalpodautoscaler.go index 52083514f52..71b5cf322de 100644 --- a/pkg/client/typed/generated/extensions/unversioned/fake/fake_horizontalpodautoscaler.go +++ b/pkg/client/typed/generated/extensions/unversioned/fake/fake_horizontalpodautoscaler.go @@ -68,7 +68,7 @@ func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *api.DeleteOp } func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { - action := core.NewDeleteCollectionAction("events", c.ns, listOptions) + action := core.NewDeleteCollectionAction("horizontalpodautoscalers", c.ns, listOptions) _, err := c.Fake.Invokes(action, &extensions.HorizontalPodAutoscalerList{}) return err diff --git a/pkg/client/typed/generated/extensions/unversioned/fake/fake_ingress.go b/pkg/client/typed/generated/extensions/unversioned/fake/fake_ingress.go index 006271102ab..a331644e47c 100644 --- a/pkg/client/typed/generated/extensions/unversioned/fake/fake_ingress.go +++ b/pkg/client/typed/generated/extensions/unversioned/fake/fake_ingress.go @@ -68,7 +68,7 @@ func (c *FakeIngresses) Delete(name string, options *api.DeleteOptions) error { } func (c *FakeIngresses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { - action := core.NewDeleteCollectionAction("events", c.ns, listOptions) + action := core.NewDeleteCollectionAction("ingresses", c.ns, listOptions) _, err := c.Fake.Invokes(action, &extensions.IngressList{}) return err diff --git a/pkg/client/typed/generated/extensions/unversioned/fake/fake_job.go b/pkg/client/typed/generated/extensions/unversioned/fake/fake_job.go index 99ac27ec4a4..c1875c006be 100644 --- a/pkg/client/typed/generated/extensions/unversioned/fake/fake_job.go +++ b/pkg/client/typed/generated/extensions/unversioned/fake/fake_job.go @@ -68,7 +68,7 @@ func (c *FakeJobs) Delete(name string, options *api.DeleteOptions) error { } func (c *FakeJobs) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { - action := core.NewDeleteCollectionAction("events", c.ns, listOptions) + action := core.NewDeleteCollectionAction("jobs", c.ns, listOptions) _, err := c.Fake.Invokes(action, &extensions.JobList{}) return err diff --git a/pkg/client/typed/generated/extensions/unversioned/fake/fake_replicaset.go b/pkg/client/typed/generated/extensions/unversioned/fake/fake_replicaset.go index 0fc7ec2e756..d861326b7c9 100644 --- a/pkg/client/typed/generated/extensions/unversioned/fake/fake_replicaset.go +++ b/pkg/client/typed/generated/extensions/unversioned/fake/fake_replicaset.go @@ -68,7 +68,7 @@ func (c *FakeReplicaSets) Delete(name string, options *api.DeleteOptions) error } func (c *FakeReplicaSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { - action := core.NewDeleteCollectionAction("events", c.ns, listOptions) + action := core.NewDeleteCollectionAction("replicasets", c.ns, listOptions) _, err := c.Fake.Invokes(action, &extensions.ReplicaSetList{}) return err diff --git a/pkg/client/typed/generated/extensions/unversioned/fake/fake_thirdpartyresource.go b/pkg/client/typed/generated/extensions/unversioned/fake/fake_thirdpartyresource.go index afb78f39985..9a005d57089 100644 --- a/pkg/client/typed/generated/extensions/unversioned/fake/fake_thirdpartyresource.go +++ b/pkg/client/typed/generated/extensions/unversioned/fake/fake_thirdpartyresource.go @@ -58,7 +58,7 @@ func (c *FakeThirdPartyResources) Delete(name string, options *api.DeleteOptions } func (c *FakeThirdPartyResources) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { - action := core.NewDeleteCollectionAction("events", c.ns, listOptions) + action := core.NewDeleteCollectionAction("thirdpartyresources", c.ns, listOptions) _, err := c.Fake.Invokes(action, &extensions.ThirdPartyResourceList{}) return err diff --git a/pkg/client/typed/generated/legacy/unversioned/fake/fake_componentstatus.go b/pkg/client/typed/generated/legacy/unversioned/fake/fake_componentstatus.go index 7dc9dc5a058..86f04233be9 100644 --- a/pkg/client/typed/generated/legacy/unversioned/fake/fake_componentstatus.go +++ b/pkg/client/typed/generated/legacy/unversioned/fake/fake_componentstatus.go @@ -53,7 +53,7 @@ func (c *FakeComponentStatuses) Delete(name string, options *api.DeleteOptions) } func (c *FakeComponentStatuses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { - action := core.NewRootDeleteCollectionAction("events", listOptions) + action := core.NewRootDeleteCollectionAction("componentstatuses", listOptions) _, err := c.Fake.Invokes(action, &api.ComponentStatusList{}) return err diff --git a/pkg/client/typed/generated/legacy/unversioned/fake/fake_configmap.go b/pkg/client/typed/generated/legacy/unversioned/fake/fake_configmap.go index 17906624dd6..25035b1f263 100644 --- a/pkg/client/typed/generated/legacy/unversioned/fake/fake_configmap.go +++ b/pkg/client/typed/generated/legacy/unversioned/fake/fake_configmap.go @@ -57,7 +57,7 @@ func (c *FakeConfigMaps) Delete(name string, options *api.DeleteOptions) error { } func (c *FakeConfigMaps) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { - action := core.NewDeleteCollectionAction("events", c.ns, listOptions) + action := core.NewDeleteCollectionAction("configmaps", c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.ConfigMapList{}) return err diff --git a/pkg/client/typed/generated/legacy/unversioned/fake/fake_endpoints.go b/pkg/client/typed/generated/legacy/unversioned/fake/fake_endpoints.go index 209c9221cfa..6e67d071524 100644 --- a/pkg/client/typed/generated/legacy/unversioned/fake/fake_endpoints.go +++ b/pkg/client/typed/generated/legacy/unversioned/fake/fake_endpoints.go @@ -57,7 +57,7 @@ func (c *FakeEndpoints) Delete(name string, options *api.DeleteOptions) error { } func (c *FakeEndpoints) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { - action := core.NewDeleteCollectionAction("events", c.ns, listOptions) + action := core.NewDeleteCollectionAction("endpoints", c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.EndpointsList{}) return err diff --git a/pkg/client/typed/generated/legacy/unversioned/fake/fake_limitrange.go b/pkg/client/typed/generated/legacy/unversioned/fake/fake_limitrange.go index 223bb720803..1a6c18c2e0e 100644 --- a/pkg/client/typed/generated/legacy/unversioned/fake/fake_limitrange.go +++ b/pkg/client/typed/generated/legacy/unversioned/fake/fake_limitrange.go @@ -57,7 +57,7 @@ func (c *FakeLimitRanges) Delete(name string, options *api.DeleteOptions) error } func (c *FakeLimitRanges) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { - action := core.NewDeleteCollectionAction("events", c.ns, listOptions) + action := core.NewDeleteCollectionAction("limitranges", c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.LimitRangeList{}) return err diff --git a/pkg/client/typed/generated/legacy/unversioned/fake/fake_namespace.go b/pkg/client/typed/generated/legacy/unversioned/fake/fake_namespace.go index 8a131c63349..d8b0fa66010 100644 --- a/pkg/client/typed/generated/legacy/unversioned/fake/fake_namespace.go +++ b/pkg/client/typed/generated/legacy/unversioned/fake/fake_namespace.go @@ -62,7 +62,7 @@ func (c *FakeNamespaces) Delete(name string, options *api.DeleteOptions) error { } func (c *FakeNamespaces) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { - action := core.NewRootDeleteCollectionAction("events", listOptions) + action := core.NewRootDeleteCollectionAction("namespaces", listOptions) _, err := c.Fake.Invokes(action, &api.NamespaceList{}) return err diff --git a/pkg/client/typed/generated/legacy/unversioned/fake/fake_node.go b/pkg/client/typed/generated/legacy/unversioned/fake/fake_node.go index eabdb7ef7fa..4f8b0b9fb32 100644 --- a/pkg/client/typed/generated/legacy/unversioned/fake/fake_node.go +++ b/pkg/client/typed/generated/legacy/unversioned/fake/fake_node.go @@ -62,7 +62,7 @@ func (c *FakeNodes) Delete(name string, options *api.DeleteOptions) error { } func (c *FakeNodes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { - action := core.NewRootDeleteCollectionAction("events", listOptions) + action := core.NewRootDeleteCollectionAction("nodes", listOptions) _, err := c.Fake.Invokes(action, &api.NodeList{}) return err diff --git a/pkg/client/typed/generated/legacy/unversioned/fake/fake_persistentvolume.go b/pkg/client/typed/generated/legacy/unversioned/fake/fake_persistentvolume.go index 48c4d841f3c..36ce85a9e48 100644 --- a/pkg/client/typed/generated/legacy/unversioned/fake/fake_persistentvolume.go +++ b/pkg/client/typed/generated/legacy/unversioned/fake/fake_persistentvolume.go @@ -62,7 +62,7 @@ func (c *FakePersistentVolumes) Delete(name string, options *api.DeleteOptions) } func (c *FakePersistentVolumes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { - action := core.NewRootDeleteCollectionAction("events", listOptions) + action := core.NewRootDeleteCollectionAction("persistentvolumes", listOptions) _, err := c.Fake.Invokes(action, &api.PersistentVolumeList{}) return err diff --git a/pkg/client/typed/generated/legacy/unversioned/fake/fake_persistentvolumeclaim.go b/pkg/client/typed/generated/legacy/unversioned/fake/fake_persistentvolumeclaim.go index b4f7043a309..f9e7f5d5962 100644 --- a/pkg/client/typed/generated/legacy/unversioned/fake/fake_persistentvolumeclaim.go +++ b/pkg/client/typed/generated/legacy/unversioned/fake/fake_persistentvolumeclaim.go @@ -67,7 +67,7 @@ func (c *FakePersistentVolumeClaims) Delete(name string, options *api.DeleteOpti } func (c *FakePersistentVolumeClaims) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { - action := core.NewDeleteCollectionAction("events", c.ns, listOptions) + action := core.NewDeleteCollectionAction("persistentvolumeclaims", c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.PersistentVolumeClaimList{}) return err diff --git a/pkg/client/typed/generated/legacy/unversioned/fake/fake_pod.go b/pkg/client/typed/generated/legacy/unversioned/fake/fake_pod.go index a717c987b5e..cdd196df0d0 100644 --- a/pkg/client/typed/generated/legacy/unversioned/fake/fake_pod.go +++ b/pkg/client/typed/generated/legacy/unversioned/fake/fake_pod.go @@ -67,7 +67,7 @@ func (c *FakePods) Delete(name string, options *api.DeleteOptions) error { } func (c *FakePods) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { - action := core.NewDeleteCollectionAction("events", c.ns, listOptions) + action := core.NewDeleteCollectionAction("pods", c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.PodList{}) return err diff --git a/pkg/client/typed/generated/legacy/unversioned/fake/fake_podtemplate.go b/pkg/client/typed/generated/legacy/unversioned/fake/fake_podtemplate.go index 1da9b66482a..aff57eeb600 100644 --- a/pkg/client/typed/generated/legacy/unversioned/fake/fake_podtemplate.go +++ b/pkg/client/typed/generated/legacy/unversioned/fake/fake_podtemplate.go @@ -57,7 +57,7 @@ func (c *FakePodTemplates) Delete(name string, options *api.DeleteOptions) error } func (c *FakePodTemplates) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { - action := core.NewDeleteCollectionAction("events", c.ns, listOptions) + action := core.NewDeleteCollectionAction("podtemplates", c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.PodTemplateList{}) return err diff --git a/pkg/client/typed/generated/legacy/unversioned/fake/fake_replicationcontroller.go b/pkg/client/typed/generated/legacy/unversioned/fake/fake_replicationcontroller.go index 6f27c77278e..42f3e45ce1c 100644 --- a/pkg/client/typed/generated/legacy/unversioned/fake/fake_replicationcontroller.go +++ b/pkg/client/typed/generated/legacy/unversioned/fake/fake_replicationcontroller.go @@ -67,7 +67,7 @@ func (c *FakeReplicationControllers) Delete(name string, options *api.DeleteOpti } func (c *FakeReplicationControllers) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { - action := core.NewDeleteCollectionAction("events", c.ns, listOptions) + action := core.NewDeleteCollectionAction("replicationcontrollers", c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.ReplicationControllerList{}) return err diff --git a/pkg/client/typed/generated/legacy/unversioned/fake/fake_resourcequota.go b/pkg/client/typed/generated/legacy/unversioned/fake/fake_resourcequota.go index 25d6221e483..763821e4d45 100644 --- a/pkg/client/typed/generated/legacy/unversioned/fake/fake_resourcequota.go +++ b/pkg/client/typed/generated/legacy/unversioned/fake/fake_resourcequota.go @@ -67,7 +67,7 @@ func (c *FakeResourceQuotas) Delete(name string, options *api.DeleteOptions) err } func (c *FakeResourceQuotas) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { - action := core.NewDeleteCollectionAction("events", c.ns, listOptions) + action := core.NewDeleteCollectionAction("resourcequotas", c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.ResourceQuotaList{}) return err diff --git a/pkg/client/typed/generated/legacy/unversioned/fake/fake_secret.go b/pkg/client/typed/generated/legacy/unversioned/fake/fake_secret.go index 27701b811c5..15665da9283 100644 --- a/pkg/client/typed/generated/legacy/unversioned/fake/fake_secret.go +++ b/pkg/client/typed/generated/legacy/unversioned/fake/fake_secret.go @@ -57,7 +57,7 @@ func (c *FakeSecrets) Delete(name string, options *api.DeleteOptions) error { } func (c *FakeSecrets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { - action := core.NewDeleteCollectionAction("events", c.ns, listOptions) + action := core.NewDeleteCollectionAction("secrets", c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.SecretList{}) return err diff --git a/pkg/client/typed/generated/legacy/unversioned/fake/fake_service.go b/pkg/client/typed/generated/legacy/unversioned/fake/fake_service.go index aaf73a17f80..2a09e90edde 100644 --- a/pkg/client/typed/generated/legacy/unversioned/fake/fake_service.go +++ b/pkg/client/typed/generated/legacy/unversioned/fake/fake_service.go @@ -67,7 +67,7 @@ func (c *FakeServices) Delete(name string, options *api.DeleteOptions) error { } func (c *FakeServices) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { - action := core.NewDeleteCollectionAction("events", c.ns, listOptions) + action := core.NewDeleteCollectionAction("services", c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.ServiceList{}) return err diff --git a/pkg/client/typed/generated/legacy/unversioned/fake/fake_serviceaccount.go b/pkg/client/typed/generated/legacy/unversioned/fake/fake_serviceaccount.go index a34750494ae..9907396deb5 100644 --- a/pkg/client/typed/generated/legacy/unversioned/fake/fake_serviceaccount.go +++ b/pkg/client/typed/generated/legacy/unversioned/fake/fake_serviceaccount.go @@ -57,7 +57,7 @@ func (c *FakeServiceAccounts) Delete(name string, options *api.DeleteOptions) er } func (c *FakeServiceAccounts) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { - action := core.NewDeleteCollectionAction("events", c.ns, listOptions) + action := core.NewDeleteCollectionAction("serviceaccounts", c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.ServiceAccountList{}) return err From 54a9241605018770f94a9815daa5c51da74925f5 Mon Sep 17 00:00:00 2001 From: Zach Loafman Date: Wed, 3 Feb 2016 11:44:30 -0800 Subject: [PATCH 110/328] Revert "Up to golang 1.5.3" This reverts commit d26f4e15839a23b3350ffaa0575995ee81ddda50. --- build/build-image/cross/Dockerfile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/build/build-image/cross/Dockerfile b/build/build-image/cross/Dockerfile index 19368e695bd..f8aff81ca8f 100644 --- a/build/build-image/cross/Dockerfile +++ b/build/build-image/cross/Dockerfile @@ -15,17 +15,15 @@ # This file creates a standard build environment for building cross # platform go binary for the architecture kubernetes cares about. -FROM golang:1.5.3 -# Original MAINTAINER Joe Beda -MAINTAINER Brendan Burns +FROM golang:1.4.2 +MAINTAINER Joe Beda ENV KUBE_CROSSPLATFORMS \ linux/386 linux/arm \ darwin/amd64 darwin/386 \ windows/amd64 windows/386 -# Pre-compile the standard go library when cross-compiling. This is much easier now when we have go1.5 -RUN for platform in ${KUBE_CROSSPLATFORMS}; do GOOS=${platform%/*} GOARCH=${platform##*/} go install std; done +RUN cd /usr/src/go/src && for platform in ${KUBE_CROSSPLATFORMS}; do GOOS=${platform%/*} GOARCH=${platform##*/} ./make.bash --no-clean; done # Install g++, then download and install protoc for generating protobuf output RUN apt-get install -y g++ && apt-get clean && rm -rf /var/lib/apt/lists/* &&\ From e87b93f1b8f48998ee449bde6cd5c58db1f3bd18 Mon Sep 17 00:00:00 2001 From: Zach Loafman Date: Wed, 3 Feb 2016 11:46:03 -0800 Subject: [PATCH 111/328] KUBE_BUILD_GOLANG_VERSION=1.4.2 --- build/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/common.sh b/build/common.sh index b653ea298cd..ed8a9cb10df 100755 --- a/build/common.sh +++ b/build/common.sh @@ -48,7 +48,7 @@ readonly KUBE_GCS_DELETE_EXISTING="${KUBE_GCS_DELETE_EXISTING:-n}" # Constants readonly KUBE_BUILD_IMAGE_REPO=kube-build -readonly KUBE_BUILD_GOLANG_VERSION=1.5.3 +readonly KUBE_BUILD_GOLANG_VERSION=1.4.2 readonly KUBE_BUILD_IMAGE_CROSS_TAG="cross-${KUBE_BUILD_GOLANG_VERSION}-1" readonly KUBE_BUILD_IMAGE_CROSS="${KUBE_BUILD_IMAGE_REPO}:${KUBE_BUILD_IMAGE_CROSS_TAG}" # KUBE_BUILD_DATA_CONTAINER_NAME=kube-build-data- From 1ae1db60272afb70b17dbaa6a43bfe1ccc4a0aad Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Tue, 19 Jan 2016 10:45:30 -0500 Subject: [PATCH 112/328] AWS: Update copy-paste of GCE PD code to latest version We are (sadly) using a copy-and-paste of the GCE PD code for AWS EBS. This code hasn't been updated in a while, and it seems that the GCE code has some code to make volume mounting more robust that we should copy. --- pkg/cloudprovider/providers/aws/aws.go | 60 ++- pkg/volume/aws_ebs/aws_ebs.go | 30 +- pkg/volume/aws_ebs/aws_ebs_test.go | 35 +- pkg/volume/aws_ebs/aws_util.go | 367 +++++++++++++++--- .../persistentvolume/label/admission_test.go | 6 +- test/e2e/pd.go | 7 +- 6 files changed, 390 insertions(+), 115 deletions(-) diff --git a/pkg/cloudprovider/providers/aws/aws.go b/pkg/cloudprovider/providers/aws/aws.go index 514fe4d97ea..2a21959b5d0 100644 --- a/pkg/cloudprovider/providers/aws/aws.go +++ b/pkg/cloudprovider/providers/aws/aws.go @@ -158,11 +158,13 @@ type Volumes interface { AttachDisk(instanceName string, volumeName string, readOnly bool) (string, error) // Detach the disk from the specified instance // instanceName can be empty to mean "the instance on which we are running" - DetachDisk(instanceName string, volumeName string) error + // Returns the device where the volume was attached + DetachDisk(instanceName string, volumeName string) (string, error) // Create a volume with the specified options - CreateVolume(volumeOptions *VolumeOptions) (volumeName string, err error) - DeleteVolume(volumeName string) error + CreateDisk(volumeOptions *VolumeOptions) (volumeName string, err error) + // Delete the specified volume + DeleteDisk(volumeName string) error // Get labels to apply to volume on creation GetVolumeLabels(volumeName string) (map[string]string, error) @@ -201,6 +203,8 @@ type AWSCloud struct { mutex sync.Mutex } +var _ Volumes = &AWSCloud{} + type AWSCloudConfig struct { Global struct { // TODO: Is there any use for this? We can get it from the instance metadata service @@ -901,7 +905,7 @@ func (self *awsInstance) getInfo() (*ec2.Instance, error) { // Gets the mountDevice already assigned to the volume, or assigns an unused mountDevice. // If the volume is already assigned, this will return the existing mountDevice with alreadyAttached=true. // Otherwise the mountDevice is assigned by finding the first available mountDevice, and it is returned with alreadyAttached=false. -func (self *awsInstance) getMountDevice(volumeID string) (assigned mountDevice, alreadyAttached bool, err error) { +func (self *awsInstance) getMountDevice(volumeID string, assign bool) (assigned mountDevice, alreadyAttached bool, err error) { instanceType := self.getInstanceType() if instanceType == nil { return "", false, fmt.Errorf("could not get instance type for instance: %s", self.awsID) @@ -939,11 +943,17 @@ func (self *awsInstance) getMountDevice(volumeID string) (assigned mountDevice, // Check to see if this volume is already assigned a device on this machine for mountDevice, mappingVolumeID := range self.deviceMappings { if volumeID == mappingVolumeID { - glog.Warningf("Got assignment call for already-assigned volume: %s@%s", mountDevice, mappingVolumeID) + if assign { + glog.Warningf("Got assignment call for already-assigned volume: %s@%s", mountDevice, mappingVolumeID) + } return mountDevice, true, nil } } + if !assign { + return mountDevice(""), false, nil + } + // Check all the valid mountpoints to see if any of them are free valid := instanceType.getEBSMountDevices() chosen := mountDevice("") @@ -1172,7 +1182,7 @@ func (c *AWSCloud) AttachDisk(instanceName string, diskName string, readOnly boo return "", errors.New("AWS volumes cannot be mounted read-only") } - mountDevice, alreadyAttached, err := awsInstance.getMountDevice(disk.awsID) + mountDevice, alreadyAttached, err := awsInstance.getMountDevice(disk.awsID, true) if err != nil { return "", err } @@ -1220,15 +1230,25 @@ func (c *AWSCloud) AttachDisk(instanceName string, diskName string, readOnly boo } // Implements Volumes.DetachDisk -func (aws *AWSCloud) DetachDisk(instanceName string, diskName string) error { +func (aws *AWSCloud) DetachDisk(instanceName string, diskName string) (string, error) { disk, err := newAWSDisk(aws, diskName) if err != nil { - return err + return "", err } awsInstance, err := aws.getAwsInstance(instanceName) if err != nil { - return err + return "", err + } + + mountDevice, alreadyAttached, err := awsInstance.getMountDevice(disk.awsID, false) + if err != nil { + return "", err + } + + if !alreadyAttached { + glog.Warning("DetachDisk called on non-attached disk: ", diskName) + // TODO: Continue? Tolerate non-attached error in DetachVolume? } request := ec2.DetachVolumeInput{ @@ -1238,12 +1258,16 @@ func (aws *AWSCloud) DetachDisk(instanceName string, diskName string) error { response, err := aws.ec2.DetachVolume(&request) if err != nil { - return fmt.Errorf("error detaching EBS volume: %v", err) + return "", fmt.Errorf("error detaching EBS volume: %v", err) } if response == nil { - return errors.New("no response from DetachVolume") + return "", errors.New("no response from DetachVolume") } + // TODO: Fix this - just remove the cache? + // If we don't have a cache; we don't have to wait any more (the driver does it for us) + // Also, maybe we could get the locally connected drivers from the AWS metadata service? + // At this point we are waiting for the volume being detached. This // releases the volume and invalidates the cache even when there is a timeout. // @@ -1253,6 +1277,7 @@ func (aws *AWSCloud) DetachDisk(instanceName string, diskName string) error { // works though. An option would be to completely flush the cache upon timeouts. // defer func() { + // TODO: Not thread safe? for mountDevice, existingVolumeID := range awsInstance.deviceMappings { if existingVolumeID == disk.awsID { awsInstance.releaseMountDevice(disk.awsID, mountDevice) @@ -1263,14 +1288,15 @@ func (aws *AWSCloud) DetachDisk(instanceName string, diskName string) error { err = disk.waitForAttachmentStatus("detached") if err != nil { - return err + return "", err } - return err + hostDevicePath := "/dev/xvd" + string(mountDevice) + return hostDevicePath, err } // Implements Volumes.CreateVolume -func (s *AWSCloud) CreateVolume(volumeOptions *VolumeOptions) (string, error) { +func (s *AWSCloud) CreateDisk(volumeOptions *VolumeOptions) (string, error) { // TODO: Should we tag this with the cluster id (so it gets deleted when the cluster does?) request := &ec2.CreateVolumeInput{} @@ -1302,7 +1328,7 @@ func (s *AWSCloud) CreateVolume(volumeOptions *VolumeOptions) (string, error) { tagRequest.Tags = tags if _, err := s.createTags(tagRequest); err != nil { // delete the volume and hope it succeeds - delerr := s.DeleteVolume(volumeName) + delerr := s.DeleteDisk(volumeName) if delerr != nil { // delete did not succeed, we have a stray volume! return "", fmt.Errorf("error tagging volume %s, could not delete the volume: %v", volumeName, delerr) @@ -1313,8 +1339,8 @@ func (s *AWSCloud) CreateVolume(volumeOptions *VolumeOptions) (string, error) { return volumeName, nil } -// Implements Volumes.DeleteVolume -func (aws *AWSCloud) DeleteVolume(volumeName string) error { +// Implements Volumes.DeleteDisk +func (aws *AWSCloud) DeleteDisk(volumeName string) error { awsDisk, err := newAWSDisk(aws, volumeName) if err != nil { return err diff --git a/pkg/volume/aws_ebs/aws_ebs.go b/pkg/volume/aws_ebs/aws_ebs.go index 5df20b8d1fb..134f16c74e4 100644 --- a/pkg/volume/aws_ebs/aws_ebs.go +++ b/pkg/volume/aws_ebs/aws_ebs.go @@ -27,7 +27,6 @@ import ( "github.com/golang/glog" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" - awscloud "k8s.io/kubernetes/pkg/cloudprovider/providers/aws" "k8s.io/kubernetes/pkg/types" "k8s.io/kubernetes/pkg/util/exec" "k8s.io/kubernetes/pkg/util/mount" @@ -100,15 +99,15 @@ func (plugin *awsElasticBlockStorePlugin) newBuilderInternal(spec *volume.Spec, return &awsElasticBlockStoreBuilder{ awsElasticBlockStore: &awsElasticBlockStore{ - podUID: podUID, - volName: spec.Name(), - volumeID: volumeID, - manager: manager, - mounter: mounter, - plugin: plugin, + podUID: podUID, + volName: spec.Name(), + volumeID: volumeID, + partition: partition, + manager: manager, + mounter: mounter, + plugin: plugin, }, fsType: fsType, - partition: partition, readOnly: readOnly, diskMounter: &mount.SafeFormatAndMount{plugin.host.GetMounter(), exec.New()}}, nil } @@ -181,6 +180,8 @@ type awsElasticBlockStore struct { podUID types.UID // Unique id of the PD, used to find the disk resource in the provider. volumeID string + // Specifies the partition to mount + partition string // Utility interface that provides API calls to the provider to attach/detach disks. manager ebsManager // Mounter interface that provides system calls to mount the global path to the pod local path. @@ -196,22 +197,10 @@ func detachDiskLogError(ebs *awsElasticBlockStore) { } } -// getVolumeProvider returns the AWS Volumes interface -func (ebs *awsElasticBlockStore) getVolumeProvider() (awscloud.Volumes, error) { - cloud := ebs.plugin.host.GetCloudProvider() - volumes, ok := cloud.(awscloud.Volumes) - if !ok { - return nil, fmt.Errorf("Cloud provider does not support volumes") - } - return volumes, nil -} - type awsElasticBlockStoreBuilder struct { *awsElasticBlockStore // Filesystem type, optional. fsType string - // Specifies the partition to mount - partition string // Specifies whether the disk will be attached as read-only. readOnly bool // diskMounter provides the interface that is used to mount the actual block device. @@ -304,6 +293,7 @@ func makeGlobalPDPath(host volume.VolumeHost, volumeID string) string { return path.Join(host.GetPluginDir(awsElasticBlockStorePluginName), "mounts", name) } +// Reverses the mapping done in makeGlobalPDPath func getVolumeIDFromGlobalMount(host volume.VolumeHost, globalPath string) (string, error) { basePath := path.Join(host.GetPluginDir(awsElasticBlockStorePluginName), "mounts") rel, err := filepath.Rel(basePath, globalPath) diff --git a/pkg/volume/aws_ebs/aws_ebs_test.go b/pkg/volume/aws_ebs/aws_ebs_test.go index 313a1d2f8a6..8e81192b5b1 100644 --- a/pkg/volume/aws_ebs/aws_ebs_test.go +++ b/pkg/volume/aws_ebs/aws_ebs_test.go @@ -68,11 +68,12 @@ func TestGetAccessModes(t *testing.T) { if err != nil { t.Errorf("Can't find the plugin by name") } + if !contains(plug.GetAccessModes(), api.ReadWriteOnce) { - t.Errorf("Expected to find AccessMode: %s", api.ReadWriteOnce) + t.Errorf("Expected to support AccessModeTypes: %s", api.ReadWriteOnce) } - if len(plug.GetAccessModes()) != 1 { - t.Errorf("Expected to find exactly one AccessMode") + if contains(plug.GetAccessModes(), api.ReadOnlyMany) { + t.Errorf("Expected not to support AccessModeTypes: %s", api.ReadOnlyMany) } } @@ -85,7 +86,10 @@ func contains(modes []api.PersistentVolumeAccessMode, mode api.PersistentVolumeA return false } -type fakePDManager struct{} +type fakePDManager struct { + attachCalled bool + detachCalled bool +} // TODO(jonesdl) To fully test this, we could create a loopback device // and mount that instead. @@ -95,6 +99,10 @@ func (fake *fakePDManager) AttachAndMountDisk(b *awsElasticBlockStoreBuilder, gl if err != nil { return err } + fake.attachCalled = true + // Simulate the global mount so that the fakeMounter returns the + // expected number of mounts for the attached disk. + b.mounter.Mount(globalPath, globalPath, b.fsType, nil) return nil } @@ -104,6 +112,7 @@ func (fake *fakePDManager) DetachDisk(c *awsElasticBlockStoreCleaner) error { if err != nil { return err } + fake.detachCalled = true return nil } @@ -121,7 +130,7 @@ func (fake *fakePDManager) DeleteVolume(cd *awsElasticBlockStoreDeleter) error { func TestPlugin(t *testing.T) { tmpDir, err := utiltesting.MkTmpdir("awsebsTest") if err != nil { - t.Fatalf("can't make a temp dir: %v") + t.Fatalf("can't make a temp dir: %v", err) } defer os.RemoveAll(tmpDir) plugMgr := volume.VolumePluginMgr{} @@ -140,13 +149,16 @@ func TestPlugin(t *testing.T) { }, }, } - builder, err := plug.(*awsElasticBlockStorePlugin).newBuilderInternal(volume.NewSpecFromVolume(spec), types.UID("poduid"), &fakePDManager{}, &mount.FakeMounter{}) + fakeManager := &fakePDManager{} + fakeMounter := &mount.FakeMounter{} + builder, err := plug.(*awsElasticBlockStorePlugin).newBuilderInternal(volume.NewSpecFromVolume(spec), types.UID("poduid"), fakeManager, fakeMounter) if err != nil { t.Errorf("Failed to make a new Builder: %v", err) } if builder == nil { t.Errorf("Got a nil Builder") } + volPath := path.Join(tmpDir, "pods/poduid/volumes/kubernetes.io~aws-ebs/vol1") path := builder.GetPath() if path != volPath { @@ -170,8 +182,12 @@ func TestPlugin(t *testing.T) { t.Errorf("SetUp() failed: %v", err) } } + if !fakeManager.attachCalled { + t.Errorf("Attach watch not called") + } - cleaner, err := plug.(*awsElasticBlockStorePlugin).newCleanerInternal("vol1", types.UID("poduid"), &fakePDManager{}, &mount.FakeMounter{}) + fakeManager = &fakePDManager{} + cleaner, err := plug.(*awsElasticBlockStorePlugin).newCleanerInternal("vol1", types.UID("poduid"), fakeManager, fakeMounter) if err != nil { t.Errorf("Failed to make a new Cleaner: %v", err) } @@ -187,9 +203,12 @@ func TestPlugin(t *testing.T) { } else if !os.IsNotExist(err) { t.Errorf("SetUp() failed: %v", err) } + if !fakeManager.detachCalled { + t.Errorf("Detach watch not called") + } // Test Provisioner - cap := resource.MustParse("100Gi") + cap := resource.MustParse("100Mi") options := volume.VolumeOptions{ Capacity: cap, AccessModes: []api.PersistentVolumeAccessMode{ diff --git a/pkg/volume/aws_ebs/aws_util.go b/pkg/volume/aws_ebs/aws_util.go index 2f188c17070..1158b6841c3 100644 --- a/pkg/volume/aws_ebs/aws_util.go +++ b/pkg/volume/aws_ebs/aws_util.go @@ -17,47 +17,58 @@ limitations under the License. package aws_ebs import ( - "errors" + "fmt" "os" + "path/filepath" + "strings" "time" "github.com/golang/glog" - aws_cloud "k8s.io/kubernetes/pkg/cloudprovider/providers/aws" + "k8s.io/kubernetes/pkg/cloudprovider" + "k8s.io/kubernetes/pkg/cloudprovider/providers/aws" + "k8s.io/kubernetes/pkg/util" + "k8s.io/kubernetes/pkg/util/exec" + "k8s.io/kubernetes/pkg/util/keymutex" + "k8s.io/kubernetes/pkg/util/sets" "k8s.io/kubernetes/pkg/volume" ) +const ( + diskPartitionSuffix = "" + diskXVDPath = "/dev/xvd" + diskXVDPattern = "/dev/xvd*" + maxChecks = 60 + maxRetries = 10 + checkSleepDuration = time.Second + errorSleepDuration = 5 * time.Second +) + +// Singleton key mutex for keeping attach/detach operations for the same PD atomic +var attachDetachMutex = keymutex.NewKeyMutex() + type AWSDiskUtil struct{} -// Attaches a disk specified by a volume.AWSElasticBlockStore to the current kubelet. +// Attaches a disk to the current kubelet. // Mounts the disk to it's global path. -func (util *AWSDiskUtil) AttachAndMountDisk(b *awsElasticBlockStoreBuilder, globalPDPath string) error { - volumes, err := b.getVolumeProvider() +func (diskUtil *AWSDiskUtil) AttachAndMountDisk(b *awsElasticBlockStoreBuilder, globalPDPath string) error { + glog.V(5).Infof("AttachAndMountDisk(...) called for PD %q. Will block for existing operations, if any. (globalPDPath=%q)\r\n", b.volumeID, globalPDPath) + + // Block execution until any pending detach operations for this PD have completed + attachDetachMutex.LockKey(b.volumeID) + defer attachDetachMutex.UnlockKey(b.volumeID) + + glog.V(5).Infof("AttachAndMountDisk(...) called for PD %q. Awake and ready to execute. (globalPDPath=%q)\r\n", b.volumeID, globalPDPath) + + xvdBefore, err := filepath.Glob(diskXVDPattern) + if err != nil { + glog.Errorf("Error filepath.Glob(\"%s\"): %v\r\n", diskXVDPattern, err) + } + xvdBeforeSet := sets.NewString(xvdBefore...) + + devicePath, err := attachDiskAndVerify(b, xvdBeforeSet) if err != nil { return err } - devicePath, err := volumes.AttachDisk("", b.volumeID, b.readOnly) - if err != nil { - return err - } - if b.partition != "" { - devicePath = devicePath + b.partition - } - //TODO(jonesdl) There should probably be better method than busy-waiting here. - numTries := 0 - for { - _, err := os.Stat(devicePath) - if err == nil { - break - } - if err != nil && !os.IsNotExist(err) { - return err - } - numTries++ - if numTries == 10 { - return errors.New("Could not attach disk: Timeout after 10s (" + devicePath + ")") - } - time.Sleep(time.Second) - } // Only mount the PD globally once. notMnt, err := b.mounter.IsLikelyNotMountPoint(globalPDPath) @@ -87,64 +98,292 @@ func (util *AWSDiskUtil) AttachAndMountDisk(b *awsElasticBlockStoreBuilder, glob // Unmounts the device and detaches the disk from the kubelet's host machine. func (util *AWSDiskUtil) DetachDisk(c *awsElasticBlockStoreCleaner) error { - // Unmount the global PD mount, which should be the only one. - globalPDPath := makeGlobalPDPath(c.plugin.host, c.volumeID) - if err := c.mounter.Unmount(globalPDPath); err != nil { - glog.V(2).Info("Error unmount dir ", globalPDPath, ": ", err) - return err - } - if err := os.Remove(globalPDPath); err != nil { - glog.V(2).Info("Error removing dir ", globalPDPath, ": ", err) - return err - } - // Detach the disk - volumes, err := c.getVolumeProvider() - if err != nil { - glog.V(2).Info("Error getting volume provider for volumeID ", c.volumeID, ": ", err) - return err - } - if err := volumes.DetachDisk("", c.volumeID); err != nil { - glog.V(2).Info("Error detaching disk ", c.volumeID, ": ", err) - return err + glog.V(5).Infof("DetachDisk(...) for PD %q\r\n", c.volumeID) + + if err := unmountPDAndRemoveGlobalPath(c); err != nil { + glog.Errorf("Error unmounting PD %q: %v", c.volumeID, err) } + + // Detach disk asynchronously so that the kubelet sync loop is not blocked. + go detachDiskAndVerify(c) return nil } func (util *AWSDiskUtil) DeleteVolume(d *awsElasticBlockStoreDeleter) error { - volumes, err := d.getVolumeProvider() + cloud, err := getCloudProvider() if err != nil { - glog.V(2).Info("Error getting volume provider: ", err) return err } - if err := volumes.DeleteVolume(d.volumeID); err != nil { - glog.V(2).Infof("Error deleting AWS EBS volume %s: %v", d.volumeID, err) + if err = cloud.DeleteDisk(d.volumeID); err != nil { + glog.V(2).Infof("Error deleting EBS Disk volume %s: %v", d.volumeID, err) return err } - glog.V(2).Infof("Successfully deleted AWS EBS volume %s", d.volumeID) + glog.V(2).Infof("Successfully deleted EBS Disk volume %s", d.volumeID) return nil } func (util *AWSDiskUtil) CreateVolume(c *awsElasticBlockStoreProvisioner) (volumeID string, volumeSizeGB int, err error) { - volumes, err := c.getVolumeProvider() + cloud, err := getCloudProvider() if err != nil { - glog.V(2).Info("Error getting volume provider: ", err) return "", 0, err } requestBytes := c.options.Capacity.Value() - // AWS works with gigabytes, convert to GiB with rounding up - requestGB := int(volume.RoundUpSize(requestBytes, 1024*1024*1024)) - volSpec := &aws_cloud.VolumeOptions{ - CapacityGB: requestGB, - Tags: c.options.CloudTags, - } + // The cloud provider works with gigabytes, convert to GiB with rounding up + requestGB := volume.RoundUpSize(requestBytes, 1024*1024*1024) - name, err := volumes.CreateVolume(volSpec) + volumeOptions := &aws.VolumeOptions{} + volumeOptions.CapacityGB = int(requestGB) + + name, err := cloud.CreateDisk(volumeOptions) if err != nil { - glog.V(2).Infof("Error creating AWS EBS volume: %v", err) + glog.V(2).Infof("Error creating EBS Disk volume: %v", err) return "", 0, err } - glog.V(2).Infof("Successfully created AWS EBS volume %s", name) - return name, requestGB, nil + glog.V(2).Infof("Successfully created EBS Disk volume %s", name) + return name, int(requestGB), nil +} + +// Attaches the specified persistent disk device to node, verifies that it is attached, and retries if it fails. +func attachDiskAndVerify(b *awsElasticBlockStoreBuilder, xvdBeforeSet sets.String) (string, error) { + var awsCloud *aws.AWSCloud + for numRetries := 0; numRetries < maxRetries; numRetries++ { + var err error + if awsCloud == nil { + awsCloud, err = getCloudProvider() + if err != nil || awsCloud == nil { + // Retry on error. See issue #11321 + glog.Errorf("Error getting AWSCloudProvider while detaching PD %q: %v", b.volumeID, err) + time.Sleep(errorSleepDuration) + continue + } + } + + if numRetries > 0 { + glog.Warningf("Retrying attach for EBS Disk %q (retry count=%v).", b.volumeID, numRetries) + } + + devicePath, err := awsCloud.AttachDisk(b.volumeID, b.plugin.host.GetHostName(), b.readOnly) + if err != nil { + glog.Errorf("Error attaching PD %q: %v", b.volumeID, err) + time.Sleep(errorSleepDuration) + continue + } + + devicePaths := getDiskByIdPaths(b.awsElasticBlockStore, devicePath) + + for numChecks := 0; numChecks < maxChecks; numChecks++ { + path, err := verifyDevicePath(devicePaths, xvdBeforeSet) + if err != nil { + // Log error, if any, and continue checking periodically. See issue #11321 + glog.Errorf("Error verifying EBS Disk (%q) is attached: %v", b.volumeID, err) + } else if path != "" { + // A device path has successfully been created for the PD + glog.Infof("Successfully attached EBS Disk %q.", b.volumeID) + return path, nil + } + + // Sleep then check again + glog.V(3).Infof("Waiting for EBS Disk %q to attach.", b.volumeID) + time.Sleep(checkSleepDuration) + } + } + + return "", fmt.Errorf("Could not attach EBS Disk %q. Timeout waiting for mount paths to be created.", b.volumeID) +} + +// Returns the first path that exists, or empty string if none exist. +func verifyDevicePath(devicePaths []string, xvdBeforeSet sets.String) (string, error) { + if err := udevadmChangeToNewDrives(xvdBeforeSet); err != nil { + // udevadm errors should not block disk detachment, log and continue + glog.Errorf("udevadmChangeToNewDrives failed with: %v", err) + } + + for _, path := range devicePaths { + if pathExists, err := pathExists(path); err != nil { + return "", fmt.Errorf("Error checking if path exists: %v", err) + } else if pathExists { + return path, nil + } + } + + return "", nil +} + +// Detaches the specified persistent disk device from node, verifies that it is detached, and retries if it fails. +// This function is intended to be called asynchronously as a go routine. +func detachDiskAndVerify(c *awsElasticBlockStoreCleaner) { + glog.V(5).Infof("detachDiskAndVerify(...) for pd %q. Will block for pending operations", c.volumeID) + defer util.HandleCrash() + + // Block execution until any pending attach/detach operations for this PD have completed + attachDetachMutex.LockKey(c.volumeID) + defer attachDetachMutex.UnlockKey(c.volumeID) + + glog.V(5).Infof("detachDiskAndVerify(...) for pd %q. Awake and ready to execute.", c.volumeID) + + var awsCloud *aws.AWSCloud + for numRetries := 0; numRetries < maxRetries; numRetries++ { + var err error + if awsCloud == nil { + awsCloud, err = getCloudProvider() + if err != nil || awsCloud == nil { + // Retry on error. See issue #11321 + glog.Errorf("Error getting AWSCloudProvider while detaching PD %q: %v", c.volumeID, err) + time.Sleep(errorSleepDuration) + continue + } + } + + if numRetries > 0 { + glog.Warningf("Retrying detach for EBS Disk %q (retry count=%v).", c.volumeID, numRetries) + } + + devicePath, err := awsCloud.DetachDisk(c.volumeID, c.plugin.host.GetHostName()) + if err != nil { + glog.Errorf("Error detaching PD %q: %v", c.volumeID, err) + time.Sleep(errorSleepDuration) + continue + } + + devicePaths := getDiskByIdPaths(c.awsElasticBlockStore, devicePath) + + for numChecks := 0; numChecks < maxChecks; numChecks++ { + allPathsRemoved, err := verifyAllPathsRemoved(devicePaths) + if err != nil { + // Log error, if any, and continue checking periodically. + glog.Errorf("Error verifying EBS Disk (%q) is detached: %v", c.volumeID, err) + } else if allPathsRemoved { + // All paths to the PD have been succefully removed + unmountPDAndRemoveGlobalPath(c) + glog.Infof("Successfully detached EBS Disk %q.", c.volumeID) + return + } + + // Sleep then check again + glog.V(3).Infof("Waiting for EBS Disk %q to detach.", c.volumeID) + time.Sleep(checkSleepDuration) + } + + } + + glog.Errorf("Failed to detach EBS Disk %q. One or more mount paths was not removed.", c.volumeID) +} + +// Unmount the global PD mount, which should be the only one, and delete it. +func unmountPDAndRemoveGlobalPath(c *awsElasticBlockStoreCleaner) error { + globalPDPath := makeGlobalPDPath(c.plugin.host, c.volumeID) + + err := c.mounter.Unmount(globalPDPath) + os.Remove(globalPDPath) + return err +} + +// Returns the first path that exists, or empty string if none exist. +func verifyAllPathsRemoved(devicePaths []string) (bool, error) { + allPathsRemoved := true + for _, path := range devicePaths { + if err := udevadmChangeToDrive(path); err != nil { + // udevadm errors should not block disk detachment, log and continue + glog.Errorf("%v", err) + } + if exists, err := pathExists(path); err != nil { + return false, fmt.Errorf("Error checking if path exists: %v", err) + } else { + allPathsRemoved = allPathsRemoved && !exists + } + } + + return allPathsRemoved, nil +} + +// Returns list of all paths for given EBS mount +// This is more interesting on GCE (where we are able to identify volumes under /dev/disk-by-id) +// Here it is mostly about applying the partition path +func getDiskByIdPaths(d *awsElasticBlockStore, devicePath string) []string { + devicePaths := []string{} + if devicePath != "" { + devicePaths = append(devicePaths, devicePath) + } + + if d.partition != "" { + for i, path := range devicePaths { + devicePaths[i] = path + diskPartitionSuffix + d.partition + } + } + + return devicePaths +} + +// Checks if the specified path exists +func pathExists(path string) (bool, error) { + _, err := os.Stat(path) + if err == nil { + return true, nil + } else if os.IsNotExist(err) { + return false, nil + } else { + return false, err + } +} + +// Return cloud provider +func getCloudProvider() (*aws.AWSCloud, error) { + awsCloudProvider, err := cloudprovider.GetCloudProvider("aws", nil) + if err != nil || awsCloudProvider == nil { + return nil, err + } + + // The conversion must be safe otherwise bug in GetCloudProvider() + return awsCloudProvider.(*aws.AWSCloud), nil +} + +// TODO: This udev code is copy-and-paste from the gce_pd provider; refactor + +// Calls "udevadm trigger --action=change" for newly created "/dev/xvd*" drives (exist only in after set). +// This is workaround for Issue #7972. Once the underlying issue has been resolved, this may be removed. +func udevadmChangeToNewDrives(xvdBeforeSet sets.String) error { + xvdAfter, err := filepath.Glob(diskXVDPattern) + if err != nil { + return fmt.Errorf("Error filepath.Glob(\"%s\"): %v\r\n", diskXVDPattern, err) + } + + for _, xvd := range xvdAfter { + if !xvdBeforeSet.Has(xvd) { + return udevadmChangeToDrive(xvd) + } + } + + return nil +} + +// Calls "udevadm trigger --action=change" on the specified drive. +// drivePath must be the the block device path to trigger on, in the format "/dev/sd*", or a symlink to it. +// This is workaround for Issue #7972. Once the underlying issue has been resolved, this may be removed. +func udevadmChangeToDrive(drivePath string) error { + glog.V(5).Infof("udevadmChangeToDrive: drive=%q", drivePath) + + // Evaluate symlink, if any + drive, err := filepath.EvalSymlinks(drivePath) + if err != nil { + return fmt.Errorf("udevadmChangeToDrive: filepath.EvalSymlinks(%q) failed with %v.", drivePath, err) + } + glog.V(5).Infof("udevadmChangeToDrive: symlink path is %q", drive) + + // Check to make sure input is "/dev/xvd*" + if !strings.Contains(drive, diskXVDPath) { + return fmt.Errorf("udevadmChangeToDrive: expected input in the form \"%s\" but drive is %q.", diskXVDPattern, drive) + } + + // Call "udevadm trigger --action=change --property-match=DEVNAME=/dev/sd..." + _, err = exec.New().Command( + "udevadm", + "trigger", + "--action=change", + fmt.Sprintf("--property-match=DEVNAME=%s", drive)).CombinedOutput() + if err != nil { + return fmt.Errorf("udevadmChangeToDrive: udevadm trigger failed for drive %q with %v.", drive, err) + } + return nil } diff --git a/plugin/pkg/admission/persistentvolume/label/admission_test.go b/plugin/pkg/admission/persistentvolume/label/admission_test.go index def17508284..3fcebc7c246 100644 --- a/plugin/pkg/admission/persistentvolume/label/admission_test.go +++ b/plugin/pkg/admission/persistentvolume/label/admission_test.go @@ -37,11 +37,11 @@ func (v *mockVolumes) AttachDisk(instanceName string, volumeName string, readOnl return "", fmt.Errorf("not implemented") } -func (v *mockVolumes) DetachDisk(instanceName string, volumeName string) error { - return fmt.Errorf("not implemented") +func (v *mockVolumes) DetachDisk(instanceName string, volumeName string) (string, error) { + return "", fmt.Errorf("not implemented") } -func (v *mockVolumes) CreateVolume(volumeOptions *aws.VolumeOptions) (volumeName string, err error) { +func (v *mockVolumes) CreateDisk(volumeOptions *aws.VolumeOptions) (volumeName string, err error) { return "", fmt.Errorf("not implemented") } diff --git a/test/e2e/pd.go b/test/e2e/pd.go index 50120b63ade..965358696c5 100644 --- a/test/e2e/pd.go +++ b/test/e2e/pd.go @@ -326,7 +326,7 @@ func createPD() (string, error) { } volumeOptions := &awscloud.VolumeOptions{} volumeOptions.CapacityGB = 10 - return volumes.CreateVolume(volumeOptions) + return volumes.CreateDisk(volumeOptions) } } @@ -353,7 +353,7 @@ func deletePD(pdName string) error { if !ok { return fmt.Errorf("Provider does not support volumes") } - return volumes.DeleteVolume(pdName) + return volumes.DeleteDisk(pdName) } } @@ -383,7 +383,8 @@ func detachPD(hostName, pdName string) error { if !ok { return fmt.Errorf("Provider does not support volumes") } - return volumes.DetachDisk(hostName, pdName) + _, err := volumes.DetachDisk(hostName, pdName) + return err } } From 6c87a4be7c9572c260ef82508a394c151b362f67 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Mon, 19 Oct 2015 22:06:33 -0400 Subject: [PATCH 113/328] AWS: Handle deleting volume that no longer exists The tests in particular double-delete volumes, so we need to handle this graciously. --- pkg/cloudprovider/providers/aws/aws.go | 21 ++++++++++++------- pkg/volume/aws_ebs/aws_util.go | 9 ++++++-- .../persistentvolume/label/admission_test.go | 4 ++-- test/e2e/pd.go | 10 ++++++++- 4 files changed, 32 insertions(+), 12 deletions(-) diff --git a/pkg/cloudprovider/providers/aws/aws.go b/pkg/cloudprovider/providers/aws/aws.go index 2a21959b5d0..2c53133ce48 100644 --- a/pkg/cloudprovider/providers/aws/aws.go +++ b/pkg/cloudprovider/providers/aws/aws.go @@ -164,7 +164,9 @@ type Volumes interface { // Create a volume with the specified options CreateDisk(volumeOptions *VolumeOptions) (volumeName string, err error) // Delete the specified volume - DeleteDisk(volumeName string) error + // Returns true iff the volume was deleted + // If the was not found, returns (false, nil) + DeleteDisk(volumeName string) (bool, error) // Get labels to apply to volume on creation GetVolumeLabels(volumeName string) (map[string]string, error) @@ -1104,13 +1106,18 @@ func (self *awsDisk) waitForAttachmentStatus(status string) error { } // Deletes the EBS disk -func (self *awsDisk) deleteVolume() error { +func (self *awsDisk) deleteVolume() (bool, error) { request := &ec2.DeleteVolumeInput{VolumeId: aws.String(self.awsID)} _, err := self.ec2.DeleteVolume(request) if err != nil { - return fmt.Errorf("error delete EBS volumes: %v", err) + if awsError, ok := err.(awserr.Error); ok { + if awsError.Code() == "InvalidVolume.NotFound" { + return false, nil + } + } + return false, fmt.Errorf("error deleting EBS volumes: %v", err) } - return nil + return true, nil } // Gets the awsInstance for the EC2 instance on which we are running @@ -1328,7 +1335,7 @@ func (s *AWSCloud) CreateDisk(volumeOptions *VolumeOptions) (string, error) { tagRequest.Tags = tags if _, err := s.createTags(tagRequest); err != nil { // delete the volume and hope it succeeds - delerr := s.DeleteDisk(volumeName) + _, delerr := s.DeleteDisk(volumeName) if delerr != nil { // delete did not succeed, we have a stray volume! return "", fmt.Errorf("error tagging volume %s, could not delete the volume: %v", volumeName, delerr) @@ -1340,10 +1347,10 @@ func (s *AWSCloud) CreateDisk(volumeOptions *VolumeOptions) (string, error) { } // Implements Volumes.DeleteDisk -func (aws *AWSCloud) DeleteDisk(volumeName string) error { +func (aws *AWSCloud) DeleteDisk(volumeName string) (bool, error) { awsDisk, err := newAWSDisk(aws, volumeName) if err != nil { - return err + return false, err } return awsDisk.deleteVolume() } diff --git a/pkg/volume/aws_ebs/aws_util.go b/pkg/volume/aws_ebs/aws_util.go index 1158b6841c3..b0a8141f978 100644 --- a/pkg/volume/aws_ebs/aws_util.go +++ b/pkg/volume/aws_ebs/aws_util.go @@ -115,11 +115,16 @@ func (util *AWSDiskUtil) DeleteVolume(d *awsElasticBlockStoreDeleter) error { return err } - if err = cloud.DeleteDisk(d.volumeID); err != nil { + deleted, err := cloud.DeleteDisk(d.volumeID) + if err != nil { glog.V(2).Infof("Error deleting EBS Disk volume %s: %v", d.volumeID, err) return err } - glog.V(2).Infof("Successfully deleted EBS Disk volume %s", d.volumeID) + if deleted { + glog.V(2).Infof("Successfully deleted EBS Disk volume %s", d.volumeID) + } else { + glog.V(2).Infof("Successfully deleted EBS Disk volume %s (actually already deleted)", d.volumeID) + } return nil } diff --git a/plugin/pkg/admission/persistentvolume/label/admission_test.go b/plugin/pkg/admission/persistentvolume/label/admission_test.go index 3fcebc7c246..76289a13096 100644 --- a/plugin/pkg/admission/persistentvolume/label/admission_test.go +++ b/plugin/pkg/admission/persistentvolume/label/admission_test.go @@ -45,8 +45,8 @@ func (v *mockVolumes) CreateDisk(volumeOptions *aws.VolumeOptions) (volumeName s return "", fmt.Errorf("not implemented") } -func (v *mockVolumes) DeleteVolume(volumeName string) error { - return fmt.Errorf("not implemented") +func (v *mockVolumes) DeleteDisk(volumeName string) (bool, error) { + return false, fmt.Errorf("not implemented") } func (v *mockVolumes) GetVolumeLabels(volumeName string) (map[string]string, error) { diff --git a/test/e2e/pd.go b/test/e2e/pd.go index 965358696c5..d1b7cefff26 100644 --- a/test/e2e/pd.go +++ b/test/e2e/pd.go @@ -353,7 +353,15 @@ func deletePD(pdName string) error { if !ok { return fmt.Errorf("Provider does not support volumes") } - return volumes.DeleteDisk(pdName) + deleted, err := volumes.DeleteDisk(pdName) + if err != nil { + return err + } else { + if !deleted { + Logf("Volume deletion implicitly succeeded because volume %q does not exist.", pdName) + } + return nil + } } } From 089951e7b440400361bc03a7c05f73f952eab550 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Tue, 19 Jan 2016 11:05:25 -0500 Subject: [PATCH 114/328] Fix typo in comment: succefully -> successfully --- pkg/volume/aws_ebs/aws_util.go | 2 +- pkg/volume/gce_pd/gce_util.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/volume/aws_ebs/aws_util.go b/pkg/volume/aws_ebs/aws_util.go index b0a8141f978..079d8954b3e 100644 --- a/pkg/volume/aws_ebs/aws_util.go +++ b/pkg/volume/aws_ebs/aws_util.go @@ -260,7 +260,7 @@ func detachDiskAndVerify(c *awsElasticBlockStoreCleaner) { // Log error, if any, and continue checking periodically. glog.Errorf("Error verifying EBS Disk (%q) is detached: %v", c.volumeID, err) } else if allPathsRemoved { - // All paths to the PD have been succefully removed + // All paths to the PD have been successfully removed unmountPDAndRemoveGlobalPath(c) glog.Infof("Successfully detached EBS Disk %q.", c.volumeID) return diff --git a/pkg/volume/gce_pd/gce_util.go b/pkg/volume/gce_pd/gce_util.go index 6be17336ad0..6e926216d34 100644 --- a/pkg/volume/gce_pd/gce_util.go +++ b/pkg/volume/gce_pd/gce_util.go @@ -262,7 +262,7 @@ func detachDiskAndVerify(c *gcePersistentDiskCleaner) { // Log error, if any, and continue checking periodically. glog.Errorf("Error verifying GCE PD (%q) is detached: %v", c.pdName, err) } else if allPathsRemoved { - // All paths to the PD have been succefully removed + // All paths to the PD have been successfully removed unmountPDAndRemoveGlobalPath(c) glog.Infof("Successfully detached GCE PD %q.", c.pdName) return From d10e3debc79be2491bdfa83bb44d7536cbabb219 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Tue, 2 Feb 2016 14:17:13 +0000 Subject: [PATCH 115/328] AWS EBS: HandleCrash moved to util/runtime --- pkg/volume/aws_ebs/aws_util.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/volume/aws_ebs/aws_util.go b/pkg/volume/aws_ebs/aws_util.go index 079d8954b3e..61d7445b1d5 100644 --- a/pkg/volume/aws_ebs/aws_util.go +++ b/pkg/volume/aws_ebs/aws_util.go @@ -26,9 +26,9 @@ import ( "github.com/golang/glog" "k8s.io/kubernetes/pkg/cloudprovider" "k8s.io/kubernetes/pkg/cloudprovider/providers/aws" - "k8s.io/kubernetes/pkg/util" "k8s.io/kubernetes/pkg/util/exec" "k8s.io/kubernetes/pkg/util/keymutex" + "k8s.io/kubernetes/pkg/util/runtime" "k8s.io/kubernetes/pkg/util/sets" "k8s.io/kubernetes/pkg/volume" ) @@ -220,7 +220,7 @@ func verifyDevicePath(devicePaths []string, xvdBeforeSet sets.String) (string, e // This function is intended to be called asynchronously as a go routine. func detachDiskAndVerify(c *awsElasticBlockStoreCleaner) { glog.V(5).Infof("detachDiskAndVerify(...) for pd %q. Will block for pending operations", c.volumeID) - defer util.HandleCrash() + defer runtime.HandleCrash() // Block execution until any pending attach/detach operations for this PD have completed attachDetachMutex.LockKey(c.volumeID) From f61a5d0400218ea8334b75edd42831a1cbeed262 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Wed, 3 Feb 2016 18:21:28 +0000 Subject: [PATCH 116/328] AWS: Switch arguments to AttachDisk/DetachDisk to match GCE --- pkg/cloudprovider/providers/aws/aws.go | 8 ++++---- .../admission/persistentvolume/label/admission_test.go | 4 ++-- test/e2e/pd.go | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/cloudprovider/providers/aws/aws.go b/pkg/cloudprovider/providers/aws/aws.go index 2c53133ce48..ccdee2bb84f 100644 --- a/pkg/cloudprovider/providers/aws/aws.go +++ b/pkg/cloudprovider/providers/aws/aws.go @@ -155,11 +155,11 @@ type Volumes interface { // Attach the disk to the specified instance // instanceName can be empty to mean "the instance on which we are running" // Returns the device (e.g. /dev/xvdf) where we attached the volume - AttachDisk(instanceName string, volumeName string, readOnly bool) (string, error) + AttachDisk(diskName string, instanceName string, readOnly bool) (string, error) // Detach the disk from the specified instance // instanceName can be empty to mean "the instance on which we are running" // Returns the device where the volume was attached - DetachDisk(instanceName string, volumeName string) (string, error) + DetachDisk(diskName string, instanceName string) (string, error) // Create a volume with the specified options CreateDisk(volumeOptions *VolumeOptions) (volumeName string, err error) @@ -1172,7 +1172,7 @@ func (aws *AWSCloud) getAwsInstance(nodeName string) (*awsInstance, error) { } // Implements Volumes.AttachDisk -func (c *AWSCloud) AttachDisk(instanceName string, diskName string, readOnly bool) (string, error) { +func (c *AWSCloud) AttachDisk(diskName string, instanceName string, readOnly bool) (string, error) { disk, err := newAWSDisk(c, diskName) if err != nil { return "", err @@ -1237,7 +1237,7 @@ func (c *AWSCloud) AttachDisk(instanceName string, diskName string, readOnly boo } // Implements Volumes.DetachDisk -func (aws *AWSCloud) DetachDisk(instanceName string, diskName string) (string, error) { +func (aws *AWSCloud) DetachDisk(diskName string, instanceName string) (string, error) { disk, err := newAWSDisk(aws, diskName) if err != nil { return "", err diff --git a/plugin/pkg/admission/persistentvolume/label/admission_test.go b/plugin/pkg/admission/persistentvolume/label/admission_test.go index 76289a13096..934f3be78de 100644 --- a/plugin/pkg/admission/persistentvolume/label/admission_test.go +++ b/plugin/pkg/admission/persistentvolume/label/admission_test.go @@ -33,11 +33,11 @@ type mockVolumes struct { var _ aws.Volumes = &mockVolumes{} -func (v *mockVolumes) AttachDisk(instanceName string, volumeName string, readOnly bool) (string, error) { +func (v *mockVolumes) AttachDisk(diskName string, instanceName string, readOnly bool) (string, error) { return "", fmt.Errorf("not implemented") } -func (v *mockVolumes) DetachDisk(instanceName string, volumeName string) (string, error) { +func (v *mockVolumes) DetachDisk(diskName string, instanceName string) (string, error) { return "", fmt.Errorf("not implemented") } diff --git a/test/e2e/pd.go b/test/e2e/pd.go index d1b7cefff26..18cf56bf2cd 100644 --- a/test/e2e/pd.go +++ b/test/e2e/pd.go @@ -391,7 +391,7 @@ func detachPD(hostName, pdName string) error { if !ok { return fmt.Errorf("Provider does not support volumes") } - _, err := volumes.DetachDisk(hostName, pdName) + _, err := volumes.DetachDisk(pdName, hostName) return err } } From 12d407da194c4431558dca7e1f7256ad046cb3e7 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Wed, 3 Feb 2016 20:48:53 +0000 Subject: [PATCH 117/328] AWS EBS: Remove copied-and-pasted udevadm code This is in GCE to deal with a GCE specific issue; there's no reason to believe we need the same logic on AWS. --- pkg/volume/aws_ebs/aws_util.go | 64 ++-------------------------------- 1 file changed, 2 insertions(+), 62 deletions(-) diff --git a/pkg/volume/aws_ebs/aws_util.go b/pkg/volume/aws_ebs/aws_util.go index 61d7445b1d5..083842db63f 100644 --- a/pkg/volume/aws_ebs/aws_util.go +++ b/pkg/volume/aws_ebs/aws_util.go @@ -20,13 +20,11 @@ import ( "fmt" "os" "path/filepath" - "strings" "time" "github.com/golang/glog" "k8s.io/kubernetes/pkg/cloudprovider" "k8s.io/kubernetes/pkg/cloudprovider/providers/aws" - "k8s.io/kubernetes/pkg/util/exec" "k8s.io/kubernetes/pkg/util/keymutex" "k8s.io/kubernetes/pkg/util/runtime" "k8s.io/kubernetes/pkg/util/sets" @@ -179,7 +177,7 @@ func attachDiskAndVerify(b *awsElasticBlockStoreBuilder, xvdBeforeSet sets.Strin devicePaths := getDiskByIdPaths(b.awsElasticBlockStore, devicePath) for numChecks := 0; numChecks < maxChecks; numChecks++ { - path, err := verifyDevicePath(devicePaths, xvdBeforeSet) + path, err := verifyDevicePath(devicePaths) if err != nil { // Log error, if any, and continue checking periodically. See issue #11321 glog.Errorf("Error verifying EBS Disk (%q) is attached: %v", b.volumeID, err) @@ -199,12 +197,7 @@ func attachDiskAndVerify(b *awsElasticBlockStoreBuilder, xvdBeforeSet sets.Strin } // Returns the first path that exists, or empty string if none exist. -func verifyDevicePath(devicePaths []string, xvdBeforeSet sets.String) (string, error) { - if err := udevadmChangeToNewDrives(xvdBeforeSet); err != nil { - // udevadm errors should not block disk detachment, log and continue - glog.Errorf("udevadmChangeToNewDrives failed with: %v", err) - } - +func verifyDevicePath(devicePaths []string) (string, error) { for _, path := range devicePaths { if pathExists, err := pathExists(path); err != nil { return "", fmt.Errorf("Error checking if path exists: %v", err) @@ -289,10 +282,6 @@ func unmountPDAndRemoveGlobalPath(c *awsElasticBlockStoreCleaner) error { func verifyAllPathsRemoved(devicePaths []string) (bool, error) { allPathsRemoved := true for _, path := range devicePaths { - if err := udevadmChangeToDrive(path); err != nil { - // udevadm errors should not block disk detachment, log and continue - glog.Errorf("%v", err) - } if exists, err := pathExists(path); err != nil { return false, fmt.Errorf("Error checking if path exists: %v", err) } else { @@ -343,52 +332,3 @@ func getCloudProvider() (*aws.AWSCloud, error) { // The conversion must be safe otherwise bug in GetCloudProvider() return awsCloudProvider.(*aws.AWSCloud), nil } - -// TODO: This udev code is copy-and-paste from the gce_pd provider; refactor - -// Calls "udevadm trigger --action=change" for newly created "/dev/xvd*" drives (exist only in after set). -// This is workaround for Issue #7972. Once the underlying issue has been resolved, this may be removed. -func udevadmChangeToNewDrives(xvdBeforeSet sets.String) error { - xvdAfter, err := filepath.Glob(diskXVDPattern) - if err != nil { - return fmt.Errorf("Error filepath.Glob(\"%s\"): %v\r\n", diskXVDPattern, err) - } - - for _, xvd := range xvdAfter { - if !xvdBeforeSet.Has(xvd) { - return udevadmChangeToDrive(xvd) - } - } - - return nil -} - -// Calls "udevadm trigger --action=change" on the specified drive. -// drivePath must be the the block device path to trigger on, in the format "/dev/sd*", or a symlink to it. -// This is workaround for Issue #7972. Once the underlying issue has been resolved, this may be removed. -func udevadmChangeToDrive(drivePath string) error { - glog.V(5).Infof("udevadmChangeToDrive: drive=%q", drivePath) - - // Evaluate symlink, if any - drive, err := filepath.EvalSymlinks(drivePath) - if err != nil { - return fmt.Errorf("udevadmChangeToDrive: filepath.EvalSymlinks(%q) failed with %v.", drivePath, err) - } - glog.V(5).Infof("udevadmChangeToDrive: symlink path is %q", drive) - - // Check to make sure input is "/dev/xvd*" - if !strings.Contains(drive, diskXVDPath) { - return fmt.Errorf("udevadmChangeToDrive: expected input in the form \"%s\" but drive is %q.", diskXVDPattern, drive) - } - - // Call "udevadm trigger --action=change --property-match=DEVNAME=/dev/sd..." - _, err = exec.New().Command( - "udevadm", - "trigger", - "--action=change", - fmt.Sprintf("--property-match=DEVNAME=%s", drive)).CombinedOutput() - if err != nil { - return fmt.Errorf("udevadmChangeToDrive: udevadm trigger failed for drive %q with %v.", drive, err) - } - return nil -} From e1fa6e9fb817ef3cb1fb009c7d5110914def1529 Mon Sep 17 00:00:00 2001 From: Prashanth Balasubramanian Date: Mon, 1 Feb 2016 19:02:23 -0800 Subject: [PATCH 118/328] kube-proxy applies latest snapshot of endpoints and services. --- pkg/proxy/config/config.go | 28 +++++++++++++------ pkg/proxy/config/config_test.go | 49 ++++++++++++++++++++------------- pkg/proxy/iptables/proxier.go | 14 +++++++++- 3 files changed, 63 insertions(+), 28 deletions(-) diff --git a/pkg/proxy/config/config.go b/pkg/proxy/config/config.go index 7e6b1858220..e1d1e1523f8 100644 --- a/pkg/proxy/config/config.go +++ b/pkg/proxy/config/config.go @@ -128,19 +128,19 @@ func (s *endpointsStore) Merge(source string, change interface{}) error { update := change.(EndpointsUpdate) switch update.Op { case ADD: - glog.V(4).Infof("Adding new endpoint from source %s : %s", source, spew.Sdump(update.Endpoints)) + glog.V(5).Infof("Adding new endpoint from source %s : %s", source, spew.Sdump(update.Endpoints)) for _, value := range update.Endpoints { name := types.NamespacedName{Namespace: value.Namespace, Name: value.Name} endpoints[name] = value } case REMOVE: - glog.V(4).Infof("Removing an endpoint %s", spew.Sdump(update)) + glog.V(5).Infof("Removing an endpoint %s", spew.Sdump(update)) for _, value := range update.Endpoints { name := types.NamespacedName{Namespace: value.Namespace, Name: value.Name} delete(endpoints, name) } case SET: - glog.V(4).Infof("Setting endpoints %s", spew.Sdump(update)) + glog.V(5).Infof("Setting endpoints %s", spew.Sdump(update)) // Clear the old map entries by just creating a new map endpoints = make(map[types.NamespacedName]api.Endpoints) for _, value := range update.Endpoints { @@ -153,7 +153,13 @@ func (s *endpointsStore) Merge(source string, change interface{}) error { s.endpoints[source] = endpoints s.endpointLock.Unlock() if s.updates != nil { - s.updates <- struct{}{} + // Since we record the snapshot before sending this signal, it's + // possible that the consumer ends up performing an extra update. + select { + case s.updates <- struct{}{}: + default: + glog.V(4).Infof("Endpoints handler already has a pending interrupt.") + } } return nil } @@ -227,19 +233,19 @@ func (s *serviceStore) Merge(source string, change interface{}) error { update := change.(ServiceUpdate) switch update.Op { case ADD: - glog.V(4).Infof("Adding new service from source %s : %s", source, spew.Sdump(update.Services)) + glog.V(5).Infof("Adding new service from source %s : %s", source, spew.Sdump(update.Services)) for _, value := range update.Services { name := types.NamespacedName{Namespace: value.Namespace, Name: value.Name} services[name] = value } case REMOVE: - glog.V(4).Infof("Removing a service %s", spew.Sdump(update)) + glog.V(5).Infof("Removing a service %s", spew.Sdump(update)) for _, value := range update.Services { name := types.NamespacedName{Namespace: value.Namespace, Name: value.Name} delete(services, name) } case SET: - glog.V(4).Infof("Setting services %s", spew.Sdump(update)) + glog.V(5).Infof("Setting services %s", spew.Sdump(update)) // Clear the old map entries by just creating a new map services = make(map[types.NamespacedName]api.Service) for _, value := range update.Services { @@ -252,7 +258,13 @@ func (s *serviceStore) Merge(source string, change interface{}) error { s.services[source] = services s.serviceLock.Unlock() if s.updates != nil { - s.updates <- struct{}{} + // Since we record the snapshot before sending this signal, it's + // possible that the consumer ends up performing an extra update. + select { + case s.updates <- struct{}{}: + default: + glog.V(4).Infof("Service handler already has a pending interrupt.") + } } return nil } diff --git a/pkg/proxy/config/config_test.go b/pkg/proxy/config/config_test.go index 8dd373b18de..fdd3a7385a7 100644 --- a/pkg/proxy/config/config_test.go +++ b/pkg/proxy/config/config_test.go @@ -19,7 +19,6 @@ package config_test import ( "reflect" "sort" - "sync" "testing" "k8s.io/kubernetes/pkg/api" @@ -49,29 +48,35 @@ func (s sortedServices) Less(i, j int) bool { } type ServiceHandlerMock struct { - services []api.Service - updated sync.WaitGroup + updated chan []api.Service + waits int } func NewServiceHandlerMock() *ServiceHandlerMock { - return &ServiceHandlerMock{services: make([]api.Service, 0)} + return &ServiceHandlerMock{updated: make(chan []api.Service, 5)} } func (h *ServiceHandlerMock) OnServiceUpdate(services []api.Service) { sort.Sort(sortedServices(services)) - h.services = services - h.updated.Done() + h.updated <- services } func (h *ServiceHandlerMock) ValidateServices(t *testing.T, expectedServices []api.Service) { - h.updated.Wait() - if !reflect.DeepEqual(h.services, expectedServices) { - t.Errorf("Expected %#v, Got %#v", expectedServices, h.services) + // We might get 1 or more updates for N service updates, because we + // over write older snapshots of services from the producer go-routine + // if the consumer falls behind. Unittests will hard timeout in 5m. + var services []api.Service + for ; h.waits > 0; h.waits = h.waits - 1 { + services = <-h.updated + if reflect.DeepEqual(services, expectedServices) { + return + } } + t.Errorf("Expected %#v, Got %#v", expectedServices, services) } func (h *ServiceHandlerMock) Wait(waits int) { - h.updated.Add(waits) + h.waits = waits } type sortedEndpoints []api.Endpoints @@ -87,29 +92,35 @@ func (s sortedEndpoints) Less(i, j int) bool { } type EndpointsHandlerMock struct { - endpoints []api.Endpoints - updated sync.WaitGroup + updated chan []api.Endpoints + waits int } func NewEndpointsHandlerMock() *EndpointsHandlerMock { - return &EndpointsHandlerMock{endpoints: make([]api.Endpoints, 0)} + return &EndpointsHandlerMock{updated: make(chan []api.Endpoints, 5)} } func (h *EndpointsHandlerMock) OnEndpointsUpdate(endpoints []api.Endpoints) { sort.Sort(sortedEndpoints(endpoints)) - h.endpoints = endpoints - h.updated.Done() + h.updated <- endpoints } func (h *EndpointsHandlerMock) ValidateEndpoints(t *testing.T, expectedEndpoints []api.Endpoints) { - h.updated.Wait() - if !reflect.DeepEqual(h.endpoints, expectedEndpoints) { - t.Errorf("Expected %#v, Got %#v", expectedEndpoints, h.endpoints) + // We might get 1 or more updates for N endpoint updates, because we + // over write older snapshots of endpoints from the producer go-routine + // if the consumer falls behind. Unittests will hard timeout in 5m. + var endpoints []api.Endpoints + for ; h.waits > 0; h.waits = h.waits - 1 { + endpoints := <-h.updated + if reflect.DeepEqual(endpoints, expectedEndpoints) { + return + } } + t.Errorf("Expected %#v, Got %#v", expectedEndpoints, endpoints) } func (h *EndpointsHandlerMock) Wait(waits int) { - h.updated.Add(waits) + h.waits = waits } func CreateServiceUpdate(op Operation, services ...api.Service) ServiceUpdate { diff --git a/pkg/proxy/iptables/proxier.go b/pkg/proxy/iptables/proxier.go index 236aeebf300..c3ffd882339 100644 --- a/pkg/proxy/iptables/proxier.go +++ b/pkg/proxy/iptables/proxier.go @@ -279,6 +279,10 @@ func (proxier *Proxier) SyncLoop() { // OnServiceUpdate tracks the active set of service proxies. // They will be synchronized using syncProxyRules() func (proxier *Proxier) OnServiceUpdate(allServices []api.Service) { + start := time.Now() + defer func() { + glog.V(4).Infof("OnServiceUpdate took %v for %d services", time.Since(start), len(allServices)) + }() proxier.mu.Lock() defer proxier.mu.Unlock() proxier.haveReceivedServiceUpdate = true @@ -316,7 +320,6 @@ func (proxier *Proxier) OnServiceUpdate(allServices []api.Service) { glog.V(3).Infof("Something changed for service %q: removing it", serviceName) delete(proxier.serviceMap, serviceName) } - serviceIP := net.ParseIP(service.Spec.ClusterIP) glog.V(1).Infof("Adding new service %q at %s:%d/%s", serviceName, serviceIP, servicePort.Port, servicePort.Protocol) info = newServiceInfo(serviceName) @@ -347,6 +350,11 @@ func (proxier *Proxier) OnServiceUpdate(allServices []api.Service) { // OnEndpointsUpdate takes in a slice of updated endpoints. func (proxier *Proxier) OnEndpointsUpdate(allEndpoints []api.Endpoints) { + start := time.Now() + defer func() { + glog.V(4).Infof("OnEndpointsUpdate took %v for %d endpoints", time.Since(start), len(allEndpoints)) + }() + proxier.mu.Lock() defer proxier.mu.Unlock() proxier.haveReceivedEndpointsUpdate = true @@ -451,6 +459,10 @@ func servicePortEndpointChainName(s proxy.ServicePortName, protocol string, endp // The only other iptables rules are those that are setup in iptablesInit() // assumes proxier.mu is held func (proxier *Proxier) syncProxyRules() { + start := time.Now() + defer func() { + glog.V(4).Infof("syncProxyRules took %v", time.Since(start)) + }() // don't sync rules till we've received services and endpoints if !proxier.haveReceivedEndpointsUpdate || !proxier.haveReceivedServiceUpdate { glog.V(2).Info("Not syncing iptables until Services and Endpoints have been received from master") From 47f7f4417dcfe550e2ac06342eaad28ed2525a76 Mon Sep 17 00:00:00 2001 From: Prashanth Balasubramanian Date: Tue, 2 Feb 2016 11:34:36 -0800 Subject: [PATCH 119/328] Poll w/ timeout for nodeport to disappear. --- test/e2e/service.go | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/test/e2e/service.go b/test/e2e/service.go index db60705247f..7cc12a86adb 100644 --- a/test/e2e/service.go +++ b/test/e2e/service.go @@ -42,7 +42,9 @@ import ( // Maximum time a kube-proxy daemon on a node is allowed to not // notice a Service update, such as type=NodePort. -const kubeProxyLagTimeout = 45 * time.Second +// TODO: This timeout should be O(10s), observed values are O(1m), 5m is very +// liberal. Fix tracked in #20567. +const kubeProxyLagTimeout = 5 * time.Minute // This should match whatever the default/configured range is var ServiceNodePortRange = utilnet.PortRange{Base: 30000, Size: 2768} @@ -769,9 +771,17 @@ var _ = Describe("Services", func() { hostExec := LaunchHostExecPod(f.Client, f.Namespace.Name, "hostexec") cmd := fmt.Sprintf(`! ss -ant46 'sport = :%d' | tail -n +2 | grep LISTEN`, nodePort) - stdout, err := RunHostCmd(hostExec.Namespace, hostExec.Name, cmd) - if err != nil { - Failf("expected node port (%d) to not be in use, stdout: %v", nodePort, stdout) + var stdout string + if pollErr := wait.PollImmediate(poll, kubeProxyLagTimeout, func() (bool, error) { + var err error + stdout, err = RunHostCmd(hostExec.Namespace, hostExec.Name, cmd) + if err != nil { + Logf("expected node port (%d) to not be in use, stdout: %v", nodePort, stdout) + return false, nil + } + return true, nil + }); pollErr != nil { + Failf("expected node port (%d) to not be in use in %v, stdout: %v", nodePort, kubeProxyLagTimeout, stdout) } By(fmt.Sprintf("creating service "+serviceName+" with same NodePort %d", nodePort)) From f9f5736b01519574380a9ec1c65d00bc8751fd1b Mon Sep 17 00:00:00 2001 From: Chao Xu Date: Wed, 3 Feb 2016 13:04:58 -0800 Subject: [PATCH 120/328] grep sed --- cmd/integration/integration.go | 2 +- cmd/kube-apiserver/app/server.go | 2 +- cmd/kube-controller-manager/app/controllermanager.go | 2 +- cmd/kubelet/app/server.go | 2 +- cmd/kubemark/hollow-node.go | 2 +- cmd/libs/go2idl/client-gen/main.go | 4 ++-- .../{test_release_1_1 => test_release_1_2}/clientset.go | 2 +- contrib/mesos/pkg/controllermanager/controllermanager.go | 2 +- contrib/mesos/pkg/executor/apis.go | 2 +- contrib/mesos/pkg/executor/executor.go | 2 +- contrib/mesos/pkg/executor/registry.go | 2 +- contrib/mesos/pkg/executor/service/service.go | 2 +- contrib/mesos/pkg/node/node.go | 2 +- contrib/mesos/pkg/node/registrator.go | 2 +- contrib/mesos/pkg/node/statusupdater.go | 2 +- .../mesos/pkg/scheduler/components/controller/controller.go | 2 +- contrib/mesos/pkg/scheduler/components/framework/framework.go | 2 +- .../pkg/scheduler/components/podreconciler/podreconciler.go | 2 +- contrib/mesos/pkg/scheduler/components/scheduler.go | 2 +- contrib/mesos/pkg/scheduler/integration/integration_test.go | 2 +- contrib/mesos/pkg/scheduler/service/service.go | 2 +- contrib/mesos/pkg/service/endpoints_controller.go | 2 +- pkg/admission/chain.go | 2 +- pkg/admission/plugins.go | 2 +- .../{release_1_1 => release_1_2}/clientset.go | 2 +- .../{release_1_1 => release_1_2}/clientset_adaption.go | 2 +- pkg/client/testing/fake/clientset.go | 2 +- pkg/client/unversioned/testclient/simple/simple_testclient.go | 2 +- pkg/controller/controller_utils.go | 2 +- pkg/controller/controller_utils_test.go | 2 +- pkg/controller/daemon/controller.go | 2 +- pkg/controller/daemon/controller_test.go | 2 +- pkg/controller/deployment/deployment_controller.go | 2 +- pkg/controller/endpoint/endpoints_controller.go | 2 +- pkg/controller/endpoint/endpoints_controller_test.go | 2 +- pkg/controller/gc/gc_controller.go | 2 +- pkg/controller/job/controller.go | 2 +- pkg/controller/job/controller_test.go | 2 +- pkg/controller/namespace/namespace_controller.go | 2 +- pkg/controller/namespace/namespace_controller_test.go | 2 +- pkg/controller/node/nodecontroller.go | 2 +- .../persistentvolume_claim_binder_controller.go | 2 +- .../persistentvolume_provisioner_controller.go | 2 +- .../persistentvolume_provisioner_controller_test.go | 2 +- .../persistentvolume/persistentvolume_recycler_controller.go | 2 +- pkg/controller/podautoscaler/metrics/metrics_client.go | 2 +- pkg/controller/replicaset/replica_set.go | 2 +- pkg/controller/replicaset/replica_set_test.go | 2 +- pkg/controller/replication/replication_controller.go | 2 +- pkg/controller/replication/replication_controller_test.go | 2 +- pkg/controller/resourcequota/resource_quota_controller.go | 2 +- pkg/controller/route/routecontroller.go | 2 +- pkg/controller/service/servicecontroller.go | 2 +- pkg/controller/serviceaccount/serviceaccounts_controller.go | 2 +- pkg/controller/serviceaccount/tokengetter.go | 2 +- pkg/controller/serviceaccount/tokens_controller.go | 2 +- pkg/kubectl/cmd/util/factory.go | 2 +- pkg/kubectl/describe.go | 2 +- pkg/kubectl/history.go | 2 +- pkg/kubelet/config/apiserver.go | 2 +- pkg/kubelet/kubelet.go | 2 +- pkg/kubelet/network/cni/cni_test.go | 2 +- pkg/kubelet/network/plugins.go | 2 +- pkg/kubelet/network/testing.go | 2 +- pkg/kubelet/networks.go | 2 +- pkg/kubelet/pod/mirror_client.go | 2 +- pkg/kubelet/status/manager.go | 2 +- pkg/kubelet/status/manager_test.go | 2 +- pkg/kubelet/volumes.go | 2 +- pkg/kubemark/hollow_kubelet.go | 2 +- pkg/serviceaccount/jwt_test.go | 2 +- pkg/util/deployment/deployment.go | 2 +- pkg/volume/downwardapi/downwardapi_test.go | 2 +- pkg/volume/persistent_claim/persistent_claim_test.go | 2 +- pkg/volume/plugins.go | 2 +- pkg/volume/secret/secret_test.go | 2 +- pkg/volume/testing.go | 2 +- pkg/volume/util.go | 2 +- plugin/pkg/admission/admit/admission.go | 2 +- plugin/pkg/admission/alwayspullimages/admission.go | 2 +- plugin/pkg/admission/deny/admission.go | 2 +- plugin/pkg/admission/exec/admission.go | 2 +- plugin/pkg/admission/initialresources/admission.go | 2 +- plugin/pkg/admission/limitranger/admission.go | 2 +- plugin/pkg/admission/namespace/autoprovision/admission.go | 2 +- plugin/pkg/admission/namespace/exists/admission.go | 2 +- plugin/pkg/admission/namespace/lifecycle/admission.go | 2 +- plugin/pkg/admission/persistentvolume/label/admission.go | 2 +- plugin/pkg/admission/resourcequota/admission.go | 2 +- plugin/pkg/admission/securitycontext/scdeny/admission.go | 2 +- plugin/pkg/admission/serviceaccount/admission.go | 2 +- test/e2e/deployment.go | 2 +- test/e2e/util.go | 2 +- test/integration/framework/master_utils.go | 2 +- test/integration/persistent_volumes_test.go | 2 +- test/integration/service_account_test.go | 2 +- 96 files changed, 97 insertions(+), 97 deletions(-) rename cmd/libs/go2idl/client-gen/testoutput/clientset_generated/{test_release_1_1 => test_release_1_2}/clientset.go (99%) rename pkg/client/clientset_generated/{release_1_1 => release_1_2}/clientset.go (99%) rename pkg/client/clientset_generated/{release_1_1 => release_1_2}/clientset_adaption.go (98%) diff --git a/cmd/integration/integration.go b/cmd/integration/integration.go index de32c5d4e98..a5e8be2c247 100644 --- a/cmd/integration/integration.go +++ b/cmd/integration/integration.go @@ -38,7 +38,7 @@ import ( "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/api/v1" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/client/record" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/controller" diff --git a/cmd/kube-apiserver/app/server.go b/cmd/kube-apiserver/app/server.go index 4238f7f0f22..7f8adca08a6 100644 --- a/cmd/kube-apiserver/app/server.go +++ b/cmd/kube-apiserver/app/server.go @@ -42,7 +42,7 @@ import ( "k8s.io/kubernetes/pkg/apiserver" "k8s.io/kubernetes/pkg/apiserver/authenticator" "k8s.io/kubernetes/pkg/capabilities" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/cloudprovider" serviceaccountcontroller "k8s.io/kubernetes/pkg/controller/serviceaccount" diff --git a/cmd/kube-controller-manager/app/controllermanager.go b/cmd/kube-controller-manager/app/controllermanager.go index b7208cdc6e7..6edd29eedba 100644 --- a/cmd/kube-controller-manager/app/controllermanager.go +++ b/cmd/kube-controller-manager/app/controllermanager.go @@ -36,7 +36,7 @@ import ( "k8s.io/kubernetes/cmd/kube-controller-manager/app/options" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/unversioned" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/client/leaderelection" "k8s.io/kubernetes/pkg/client/record" client "k8s.io/kubernetes/pkg/client/unversioned" diff --git a/cmd/kubelet/app/server.go b/cmd/kubelet/app/server.go index 9fbdf52bc61..d5e15d17a55 100644 --- a/cmd/kubelet/app/server.go +++ b/cmd/kubelet/app/server.go @@ -38,7 +38,7 @@ import ( "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/capabilities" "k8s.io/kubernetes/pkg/client/chaosclient" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/client/record" unversioned_legacy "k8s.io/kubernetes/pkg/client/typed/generated/legacy/unversioned" client "k8s.io/kubernetes/pkg/client/unversioned" diff --git a/cmd/kubemark/hollow-node.go b/cmd/kubemark/hollow-node.go index e5bd5f122c1..7951a2503f6 100644 --- a/cmd/kubemark/hollow-node.go +++ b/cmd/kubemark/hollow-node.go @@ -23,7 +23,7 @@ import ( docker "github.com/fsouza/go-dockerclient" "k8s.io/kubernetes/pkg/api" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/client/record" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" diff --git a/cmd/libs/go2idl/client-gen/main.go b/cmd/libs/go2idl/client-gen/main.go index d7417f6e3e0..dc0a397cac7 100644 --- a/cmd/libs/go2idl/client-gen/main.go +++ b/cmd/libs/go2idl/client-gen/main.go @@ -32,7 +32,7 @@ import ( var ( test = flag.BoolP("test", "t", false, "set this flag to generate the client code for the testdata") inputVersions = flag.StringSlice("input", []string{"api/", "extensions/"}, "group/versions that client-gen will generate clients for. At most one version per group is allowed. Specified in the format \"group1/version1,group2/version2...\". Default to \"api/,extensions\"") - clientsetName = flag.StringP("clientset-name", "n", "release_1_1", "the name of the generated clientset package.") + clientsetName = flag.StringP("clientset-name", "n", "release_1_2", "the name of the generated clientset package.") clientsetPath = flag.String("clientset-path", "k8s.io/kubernetes/pkg/client/clientset_generated/", "the generated clientset will be output to /. Default to \"k8s.io/kubernetes/pkg/client/clientset_generated/\"") clientsetOnly = flag.Bool("clientset-only", false, "when set, client-gen only generates the clientset shell, without generating the individual typed clients") ) @@ -88,7 +88,7 @@ func main() { arguments.OutputPackagePath = "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput" arguments.CustomArgs = generators.ClientGenArgs{ []unversioned.GroupVersion{{"testgroup", ""}}, - "test_release_1_1", + "test_release_1_2", "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/", false, false, diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_release_1_1/clientset.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_release_1_2/clientset.go similarity index 99% rename from cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_release_1_1/clientset.go rename to cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_release_1_2/clientset.go index 2297ae855e6..657964c9383 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_release_1_1/clientset.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_release_1_2/clientset.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package test_release_1_1 +package test_release_1_2 import ( "github.com/golang/glog" diff --git a/contrib/mesos/pkg/controllermanager/controllermanager.go b/contrib/mesos/pkg/controllermanager/controllermanager.go index 9f4d8486fc5..9423274c2e8 100644 --- a/contrib/mesos/pkg/controllermanager/controllermanager.go +++ b/contrib/mesos/pkg/controllermanager/controllermanager.go @@ -29,7 +29,7 @@ import ( "k8s.io/kubernetes/cmd/kube-controller-manager/app/options" "k8s.io/kubernetes/contrib/mesos/pkg/node" "k8s.io/kubernetes/pkg/api/unversioned" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" diff --git a/contrib/mesos/pkg/executor/apis.go b/contrib/mesos/pkg/executor/apis.go index ab4add7edd4..ae98fd6f7f5 100644 --- a/contrib/mesos/pkg/executor/apis.go +++ b/contrib/mesos/pkg/executor/apis.go @@ -19,7 +19,7 @@ package executor import ( "k8s.io/kubernetes/contrib/mesos/pkg/node" "k8s.io/kubernetes/pkg/api" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" ) type kubeAPI interface { diff --git a/contrib/mesos/pkg/executor/executor.go b/contrib/mesos/pkg/executor/executor.go index 7af5108133b..217d6da3b96 100644 --- a/contrib/mesos/pkg/executor/executor.go +++ b/contrib/mesos/pkg/executor/executor.go @@ -26,7 +26,7 @@ import ( "sync/atomic" "time" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "github.com/fsouza/go-dockerclient" "github.com/gogo/protobuf/proto" diff --git a/contrib/mesos/pkg/executor/registry.go b/contrib/mesos/pkg/executor/registry.go index c79c20427a3..c9d870ab221 100644 --- a/contrib/mesos/pkg/executor/registry.go +++ b/contrib/mesos/pkg/executor/registry.go @@ -21,7 +21,7 @@ import ( "errors" "sync" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/contrib/mesos/pkg/executor/messages" "k8s.io/kubernetes/contrib/mesos/pkg/scheduler/meta" diff --git a/contrib/mesos/pkg/executor/service/service.go b/contrib/mesos/pkg/executor/service/service.go index 1172a38a70d..3e2b220c27a 100644 --- a/contrib/mesos/pkg/executor/service/service.go +++ b/contrib/mesos/pkg/executor/service/service.go @@ -33,7 +33,7 @@ import ( "k8s.io/kubernetes/contrib/mesos/pkg/hyperkube" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/kubelet" diff --git a/contrib/mesos/pkg/node/node.go b/contrib/mesos/pkg/node/node.go index e838a8d4792..b72eb385e88 100644 --- a/contrib/mesos/pkg/node/node.go +++ b/contrib/mesos/pkg/node/node.go @@ -23,7 +23,7 @@ import ( "strings" "time" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" log "github.com/golang/glog" mesos "github.com/mesos/mesos-go/mesosproto" diff --git a/contrib/mesos/pkg/node/registrator.go b/contrib/mesos/pkg/node/registrator.go index be80ad39975..e6dc2a5e073 100644 --- a/contrib/mesos/pkg/node/registrator.go +++ b/contrib/mesos/pkg/node/registrator.go @@ -20,7 +20,7 @@ import ( "fmt" "time" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" log "github.com/golang/glog" "k8s.io/kubernetes/contrib/mesos/pkg/queue" diff --git a/contrib/mesos/pkg/node/statusupdater.go b/contrib/mesos/pkg/node/statusupdater.go index f90de945cb6..670b0c197b7 100644 --- a/contrib/mesos/pkg/node/statusupdater.go +++ b/contrib/mesos/pkg/node/statusupdater.go @@ -20,7 +20,7 @@ import ( "fmt" "time" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" log "github.com/golang/glog" "k8s.io/kubernetes/cmd/kubelet/app/options" diff --git a/contrib/mesos/pkg/scheduler/components/controller/controller.go b/contrib/mesos/pkg/scheduler/components/controller/controller.go index a995fce3117..495dcbe79b1 100644 --- a/contrib/mesos/pkg/scheduler/components/controller/controller.go +++ b/contrib/mesos/pkg/scheduler/components/controller/controller.go @@ -19,7 +19,7 @@ package controller import ( "time" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" log "github.com/golang/glog" "k8s.io/kubernetes/contrib/mesos/pkg/runtime" diff --git a/contrib/mesos/pkg/scheduler/components/framework/framework.go b/contrib/mesos/pkg/scheduler/components/framework/framework.go index b8966e66659..6e2a99be078 100644 --- a/contrib/mesos/pkg/scheduler/components/framework/framework.go +++ b/contrib/mesos/pkg/scheduler/components/framework/framework.go @@ -45,7 +45,7 @@ import ( "k8s.io/kubernetes/contrib/mesos/pkg/scheduler/podtask" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/kubelet/container" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/util/sets" diff --git a/contrib/mesos/pkg/scheduler/components/podreconciler/podreconciler.go b/contrib/mesos/pkg/scheduler/components/podreconciler/podreconciler.go index 0a5c29fb745..c259d2faafa 100644 --- a/contrib/mesos/pkg/scheduler/components/podreconciler/podreconciler.go +++ b/contrib/mesos/pkg/scheduler/components/podreconciler/podreconciler.go @@ -19,7 +19,7 @@ package podreconciler import ( "time" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" log "github.com/golang/glog" "k8s.io/kubernetes/contrib/mesos/pkg/scheduler" diff --git a/contrib/mesos/pkg/scheduler/components/scheduler.go b/contrib/mesos/pkg/scheduler/components/scheduler.go index bafe3d21d69..57c18f2cf09 100644 --- a/contrib/mesos/pkg/scheduler/components/scheduler.go +++ b/contrib/mesos/pkg/scheduler/components/scheduler.go @@ -20,7 +20,7 @@ import ( "net/http" "sync" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" mesos "github.com/mesos/mesos-go/mesosproto" "k8s.io/kubernetes/contrib/mesos/pkg/backoff" diff --git a/contrib/mesos/pkg/scheduler/integration/integration_test.go b/contrib/mesos/pkg/scheduler/integration/integration_test.go index bc5c965ffe6..cc787379041 100644 --- a/contrib/mesos/pkg/scheduler/integration/integration_test.go +++ b/contrib/mesos/pkg/scheduler/integration/integration_test.go @@ -48,7 +48,7 @@ import ( "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/runtime" "k8s.io/kubernetes/pkg/util" diff --git a/contrib/mesos/pkg/scheduler/service/service.go b/contrib/mesos/pkg/scheduler/service/service.go index 6ba88f7d656..0fb8b0c29d1 100644 --- a/contrib/mesos/pkg/scheduler/service/service.go +++ b/contrib/mesos/pkg/scheduler/service/service.go @@ -33,7 +33,7 @@ import ( "sync" "time" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" etcd "github.com/coreos/etcd/client" "github.com/gogo/protobuf/proto" diff --git a/contrib/mesos/pkg/service/endpoints_controller.go b/contrib/mesos/pkg/service/endpoints_controller.go index c6be0321bd6..89550269060 100644 --- a/contrib/mesos/pkg/service/endpoints_controller.go +++ b/contrib/mesos/pkg/service/endpoints_controller.go @@ -27,7 +27,7 @@ import ( "k8s.io/kubernetes/pkg/api/endpoints" "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" kservice "k8s.io/kubernetes/pkg/controller/endpoint" "k8s.io/kubernetes/pkg/controller/framework" "k8s.io/kubernetes/pkg/labels" diff --git a/pkg/admission/chain.go b/pkg/admission/chain.go index 90262b01647..b6aa1f0eb59 100644 --- a/pkg/admission/chain.go +++ b/pkg/admission/chain.go @@ -16,7 +16,7 @@ limitations under the License. package admission -import clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" +import clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" // chainAdmissionHandler is an instance of admission.Interface that performs admission control using a chain of admission handlers type chainAdmissionHandler []Interface diff --git a/pkg/admission/plugins.go b/pkg/admission/plugins.go index 9c4fba36184..032cb4696de 100644 --- a/pkg/admission/plugins.go +++ b/pkg/admission/plugins.go @@ -23,7 +23,7 @@ import ( "sync" "github.com/golang/glog" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" ) // Factory is a function that returns an Interface for admission decisions. diff --git a/pkg/client/clientset_generated/release_1_1/clientset.go b/pkg/client/clientset_generated/release_1_2/clientset.go similarity index 99% rename from pkg/client/clientset_generated/release_1_1/clientset.go rename to pkg/client/clientset_generated/release_1_2/clientset.go index ec9bae28be3..63ae29d764f 100644 --- a/pkg/client/clientset_generated/release_1_1/clientset.go +++ b/pkg/client/clientset_generated/release_1_2/clientset.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package release_1_1 +package release_1_2 import ( "github.com/golang/glog" diff --git a/pkg/client/clientset_generated/release_1_1/clientset_adaption.go b/pkg/client/clientset_generated/release_1_2/clientset_adaption.go similarity index 98% rename from pkg/client/clientset_generated/release_1_1/clientset_adaption.go rename to pkg/client/clientset_generated/release_1_2/clientset_adaption.go index 118863c4219..533228fb2cc 100644 --- a/pkg/client/clientset_generated/release_1_1/clientset_adaption.go +++ b/pkg/client/clientset_generated/release_1_2/clientset_adaption.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package release_1_1 +package release_1_2 import ( extensions_unversioned "k8s.io/kubernetes/pkg/client/typed/generated/extensions/unversioned" diff --git a/pkg/client/testing/fake/clientset.go b/pkg/client/testing/fake/clientset.go index db509c25178..dd31b667b7e 100644 --- a/pkg/client/testing/fake/clientset.go +++ b/pkg/client/testing/fake/clientset.go @@ -18,7 +18,7 @@ package fake import ( "k8s.io/kubernetes/pkg/api" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/client/testing/core" "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/runtime" diff --git a/pkg/client/unversioned/testclient/simple/simple_testclient.go b/pkg/client/unversioned/testclient/simple/simple_testclient.go index 110b4d37e28..d53138151da 100644 --- a/pkg/client/unversioned/testclient/simple/simple_testclient.go +++ b/pkg/client/unversioned/testclient/simple/simple_testclient.go @@ -27,7 +27,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/unversioned" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/labels" diff --git a/pkg/controller/controller_utils.go b/pkg/controller/controller_utils.go index 53aca3ac826..5f01336638b 100644 --- a/pkg/controller/controller_utils.go +++ b/pkg/controller/controller_utils.go @@ -27,7 +27,7 @@ import ( "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/api/validation" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/controller/framework" "k8s.io/kubernetes/pkg/fields" diff --git a/pkg/controller/controller_utils_test.go b/pkg/controller/controller_utils_test.go index a9d75ec63be..194154505e3 100644 --- a/pkg/controller/controller_utils_test.go +++ b/pkg/controller/controller_utils_test.go @@ -30,7 +30,7 @@ import ( "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/client/record" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/runtime" diff --git a/pkg/controller/daemon/controller.go b/pkg/controller/daemon/controller.go index 3b4772c53e7..f23ee6c2e8a 100644 --- a/pkg/controller/daemon/controller.go +++ b/pkg/controller/daemon/controller.go @@ -27,7 +27,7 @@ import ( "k8s.io/kubernetes/pkg/api/validation" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/client/record" unversioned_extensions "k8s.io/kubernetes/pkg/client/typed/generated/extensions/unversioned" unversioned_legacy "k8s.io/kubernetes/pkg/client/typed/generated/legacy/unversioned" diff --git a/pkg/controller/daemon/controller_test.go b/pkg/controller/daemon/controller_test.go index e67fd7e76fa..36fa91b6dff 100644 --- a/pkg/controller/daemon/controller_test.go +++ b/pkg/controller/daemon/controller_test.go @@ -27,7 +27,7 @@ import ( "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/runtime" diff --git a/pkg/controller/deployment/deployment_controller.go b/pkg/controller/deployment/deployment_controller.go index 7b2a776a4e2..555ffc2a74d 100644 --- a/pkg/controller/deployment/deployment_controller.go +++ b/pkg/controller/deployment/deployment_controller.go @@ -29,7 +29,7 @@ import ( "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/client/record" unversioned_legacy "k8s.io/kubernetes/pkg/client/typed/generated/legacy/unversioned" "k8s.io/kubernetes/pkg/controller" diff --git a/pkg/controller/endpoint/endpoints_controller.go b/pkg/controller/endpoint/endpoints_controller.go index 0fe8f1e14a0..b9a35bbe229 100644 --- a/pkg/controller/endpoint/endpoints_controller.go +++ b/pkg/controller/endpoint/endpoints_controller.go @@ -27,7 +27,7 @@ import ( "k8s.io/kubernetes/pkg/api/errors" podutil "k8s.io/kubernetes/pkg/api/pod" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/framework" "k8s.io/kubernetes/pkg/labels" diff --git a/pkg/controller/endpoint/endpoints_controller_test.go b/pkg/controller/endpoint/endpoints_controller_test.go index b23998a1827..4a69dc843b9 100644 --- a/pkg/controller/endpoint/endpoints_controller_test.go +++ b/pkg/controller/endpoint/endpoints_controller_test.go @@ -28,7 +28,7 @@ import ( "k8s.io/kubernetes/pkg/api/unversioned" _ "k8s.io/kubernetes/pkg/apimachinery/registered" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/runtime" diff --git a/pkg/controller/gc/gc_controller.go b/pkg/controller/gc/gc_controller.go index 8a7a77adfda..c2c76f39b62 100644 --- a/pkg/controller/gc/gc_controller.go +++ b/pkg/controller/gc/gc_controller.go @@ -23,7 +23,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/framework" "k8s.io/kubernetes/pkg/fields" diff --git a/pkg/controller/job/controller.go b/pkg/controller/job/controller.go index 9ed5037cb77..654e3521ebe 100644 --- a/pkg/controller/job/controller.go +++ b/pkg/controller/job/controller.go @@ -27,7 +27,7 @@ import ( "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/client/record" unversioned_legacy "k8s.io/kubernetes/pkg/client/typed/generated/legacy/unversioned" "k8s.io/kubernetes/pkg/controller" diff --git a/pkg/controller/job/controller_test.go b/pkg/controller/job/controller_test.go index 477797a711a..c626c8a8fb1 100644 --- a/pkg/controller/job/controller_test.go +++ b/pkg/controller/job/controller_test.go @@ -25,7 +25,7 @@ import ( "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/apis/extensions" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/client/testing/core" "k8s.io/kubernetes/pkg/client/testing/fake" client "k8s.io/kubernetes/pkg/client/unversioned" diff --git a/pkg/controller/namespace/namespace_controller.go b/pkg/controller/namespace/namespace_controller.go index bd59507358a..c953cb8ac5d 100644 --- a/pkg/controller/namespace/namespace_controller.go +++ b/pkg/controller/namespace/namespace_controller.go @@ -24,7 +24,7 @@ import ( "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" extensions_unversioned "k8s.io/kubernetes/pkg/client/typed/generated/extensions/unversioned" "k8s.io/kubernetes/pkg/controller/framework" "k8s.io/kubernetes/pkg/runtime" diff --git a/pkg/controller/namespace/namespace_controller_test.go b/pkg/controller/namespace/namespace_controller_test.go index 369275caa99..2b0e2883d0b 100644 --- a/pkg/controller/namespace/namespace_controller_test.go +++ b/pkg/controller/namespace/namespace_controller_test.go @@ -25,7 +25,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/unversioned" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/client/testing/core" "k8s.io/kubernetes/pkg/client/testing/fake" "k8s.io/kubernetes/pkg/util/sets" diff --git a/pkg/controller/node/nodecontroller.go b/pkg/controller/node/nodecontroller.go index 44a297945e7..1a7c57d4921 100644 --- a/pkg/controller/node/nodecontroller.go +++ b/pkg/controller/node/nodecontroller.go @@ -28,7 +28,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/client/record" unversioned_legacy "k8s.io/kubernetes/pkg/client/typed/generated/legacy/unversioned" client "k8s.io/kubernetes/pkg/client/unversioned" diff --git a/pkg/controller/persistentvolume/persistentvolume_claim_binder_controller.go b/pkg/controller/persistentvolume/persistentvolume_claim_binder_controller.go index baf4eae6a5f..b5ba15b67fb 100644 --- a/pkg/controller/persistentvolume/persistentvolume_claim_binder_controller.go +++ b/pkg/controller/persistentvolume/persistentvolume_claim_binder_controller.go @@ -24,7 +24,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/controller/framework" "k8s.io/kubernetes/pkg/conversion" "k8s.io/kubernetes/pkg/runtime" diff --git a/pkg/controller/persistentvolume/persistentvolume_provisioner_controller.go b/pkg/controller/persistentvolume/persistentvolume_provisioner_controller.go index 32a30de2a53..7af4bee9d54 100644 --- a/pkg/controller/persistentvolume/persistentvolume_provisioner_controller.go +++ b/pkg/controller/persistentvolume/persistentvolume_provisioner_controller.go @@ -23,7 +23,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/cloudprovider" "k8s.io/kubernetes/pkg/controller/framework" "k8s.io/kubernetes/pkg/conversion" diff --git a/pkg/controller/persistentvolume/persistentvolume_provisioner_controller_test.go b/pkg/controller/persistentvolume/persistentvolume_provisioner_controller_test.go index 6362f1c3a17..a5895403cd5 100644 --- a/pkg/controller/persistentvolume/persistentvolume_provisioner_controller_test.go +++ b/pkg/controller/persistentvolume/persistentvolume_provisioner_controller_test.go @@ -25,7 +25,7 @@ import ( "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/testapi" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" fake_cloud "k8s.io/kubernetes/pkg/cloudprovider/providers/fake" "k8s.io/kubernetes/pkg/util" "k8s.io/kubernetes/pkg/volume" diff --git a/pkg/controller/persistentvolume/persistentvolume_recycler_controller.go b/pkg/controller/persistentvolume/persistentvolume_recycler_controller.go index fe1020bde46..2fdc6626f6e 100644 --- a/pkg/controller/persistentvolume/persistentvolume_recycler_controller.go +++ b/pkg/controller/persistentvolume/persistentvolume_recycler_controller.go @@ -23,7 +23,7 @@ import ( "github.com/golang/glog" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/cloudprovider" "k8s.io/kubernetes/pkg/controller/framework" "k8s.io/kubernetes/pkg/runtime" diff --git a/pkg/controller/podautoscaler/metrics/metrics_client.go b/pkg/controller/podautoscaler/metrics/metrics_client.go index a579fae02a5..663f1393127 100644 --- a/pkg/controller/podautoscaler/metrics/metrics_client.go +++ b/pkg/controller/podautoscaler/metrics/metrics_client.go @@ -24,7 +24,7 @@ import ( "github.com/golang/glog" "k8s.io/kubernetes/pkg/api" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/labels" heapster "k8s.io/heapster/api/v1/types" diff --git a/pkg/controller/replicaset/replica_set.go b/pkg/controller/replicaset/replica_set.go index ddd0ae6518a..ffa48cfc8de 100644 --- a/pkg/controller/replicaset/replica_set.go +++ b/pkg/controller/replicaset/replica_set.go @@ -28,7 +28,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/client/record" unversioned_legacy "k8s.io/kubernetes/pkg/client/typed/generated/legacy/unversioned" "k8s.io/kubernetes/pkg/controller" diff --git a/pkg/controller/replicaset/replica_set_test.go b/pkg/controller/replicaset/replica_set_test.go index ce838caa6d3..34c7c0902da 100644 --- a/pkg/controller/replicaset/replica_set_test.go +++ b/pkg/controller/replicaset/replica_set_test.go @@ -30,7 +30,7 @@ import ( "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/client/testing/core" "k8s.io/kubernetes/pkg/client/testing/fake" client "k8s.io/kubernetes/pkg/client/unversioned" diff --git a/pkg/controller/replication/replication_controller.go b/pkg/controller/replication/replication_controller.go index 93b62394b73..69bf7638b5b 100644 --- a/pkg/controller/replication/replication_controller.go +++ b/pkg/controller/replication/replication_controller.go @@ -27,7 +27,7 @@ import ( "github.com/golang/glog" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/client/record" unversioned_legacy "k8s.io/kubernetes/pkg/client/typed/generated/legacy/unversioned" "k8s.io/kubernetes/pkg/controller" diff --git a/pkg/controller/replication/replication_controller_test.go b/pkg/controller/replication/replication_controller_test.go index b0763129049..698888102d1 100644 --- a/pkg/controller/replication/replication_controller_test.go +++ b/pkg/controller/replication/replication_controller_test.go @@ -29,7 +29,7 @@ import ( "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/client/testing/core" "k8s.io/kubernetes/pkg/client/testing/fake" client "k8s.io/kubernetes/pkg/client/unversioned" diff --git a/pkg/controller/resourcequota/resource_quota_controller.go b/pkg/controller/resourcequota/resource_quota_controller.go index 0e16dc0d532..1e0f83f031a 100644 --- a/pkg/controller/resourcequota/resource_quota_controller.go +++ b/pkg/controller/resourcequota/resource_quota_controller.go @@ -24,7 +24,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/framework" "k8s.io/kubernetes/pkg/runtime" diff --git a/pkg/controller/route/routecontroller.go b/pkg/controller/route/routecontroller.go index 3811a7dab23..47312d0e47a 100644 --- a/pkg/controller/route/routecontroller.go +++ b/pkg/controller/route/routecontroller.go @@ -23,7 +23,7 @@ import ( "github.com/golang/glog" "k8s.io/kubernetes/pkg/api" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/cloudprovider" "k8s.io/kubernetes/pkg/util" ) diff --git a/pkg/controller/service/servicecontroller.go b/pkg/controller/service/servicecontroller.go index 0e64547d9c3..e1f8b5bd6c7 100644 --- a/pkg/controller/service/servicecontroller.go +++ b/pkg/controller/service/servicecontroller.go @@ -27,7 +27,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/client/record" unversioned_legacy "k8s.io/kubernetes/pkg/client/typed/generated/legacy/unversioned" "k8s.io/kubernetes/pkg/cloudprovider" diff --git a/pkg/controller/serviceaccount/serviceaccounts_controller.go b/pkg/controller/serviceaccount/serviceaccounts_controller.go index 32da0d86a6f..5b4ac12757b 100644 --- a/pkg/controller/serviceaccount/serviceaccounts_controller.go +++ b/pkg/controller/serviceaccount/serviceaccounts_controller.go @@ -25,7 +25,7 @@ import ( apierrs "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/meta" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/controller/framework" "k8s.io/kubernetes/pkg/fields" diff --git a/pkg/controller/serviceaccount/tokengetter.go b/pkg/controller/serviceaccount/tokengetter.go index a4748de977f..3db556b22ce 100644 --- a/pkg/controller/serviceaccount/tokengetter.go +++ b/pkg/controller/serviceaccount/tokengetter.go @@ -18,7 +18,7 @@ package serviceaccount import ( "k8s.io/kubernetes/pkg/api" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/registry/generic" "k8s.io/kubernetes/pkg/registry/secret" secretetcd "k8s.io/kubernetes/pkg/registry/secret/etcd" diff --git a/pkg/controller/serviceaccount/tokens_controller.go b/pkg/controller/serviceaccount/tokens_controller.go index 82bccd4aa73..b6518e8512d 100644 --- a/pkg/controller/serviceaccount/tokens_controller.go +++ b/pkg/controller/serviceaccount/tokens_controller.go @@ -25,7 +25,7 @@ import ( "k8s.io/kubernetes/pkg/api" apierrors "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/controller/framework" "k8s.io/kubernetes/pkg/fields" diff --git a/pkg/kubectl/cmd/util/factory.go b/pkg/kubectl/cmd/util/factory.go index eea080f5378..aec126b8aba 100644 --- a/pkg/kubectl/cmd/util/factory.go +++ b/pkg/kubectl/cmd/util/factory.go @@ -39,7 +39,7 @@ import ( "k8s.io/kubernetes/pkg/api/validation" "k8s.io/kubernetes/pkg/apimachinery/registered" "k8s.io/kubernetes/pkg/apis/extensions" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" "k8s.io/kubernetes/pkg/kubectl" diff --git a/pkg/kubectl/describe.go b/pkg/kubectl/describe.go index 7984b1dccac..32a17e0f29e 100644 --- a/pkg/kubectl/describe.go +++ b/pkg/kubectl/describe.go @@ -32,7 +32,7 @@ import ( "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/apis/extensions" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/fieldpath" "k8s.io/kubernetes/pkg/fields" diff --git a/pkg/kubectl/history.go b/pkg/kubectl/history.go index f864e535c2f..606f7716eb6 100644 --- a/pkg/kubectl/history.go +++ b/pkg/kubectl/history.go @@ -25,7 +25,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/apis/extensions" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/runtime" deploymentutil "k8s.io/kubernetes/pkg/util/deployment" "k8s.io/kubernetes/pkg/util/errors" diff --git a/pkg/kubelet/config/apiserver.go b/pkg/kubelet/config/apiserver.go index 6722b64c59d..15acbcf232a 100644 --- a/pkg/kubelet/config/apiserver.go +++ b/pkg/kubelet/config/apiserver.go @@ -20,7 +20,7 @@ package config import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/fields" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index 6c11f12a3f0..c08d4b70780 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -40,7 +40,7 @@ import ( "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/api/validation" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/client/record" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/cloudprovider" diff --git a/pkg/kubelet/network/cni/cni_test.go b/pkg/kubelet/network/cni/cni_test.go index 38e78573216..7f5545f3e44 100644 --- a/pkg/kubelet/network/cni/cni_test.go +++ b/pkg/kubelet/network/cni/cni_test.go @@ -28,7 +28,7 @@ import ( "testing" "text/template" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" docker "github.com/fsouza/go-dockerclient" cadvisorapi "github.com/google/cadvisor/info/v1" diff --git a/pkg/kubelet/network/plugins.go b/pkg/kubelet/network/plugins.go index 80678924532..e3cf5364696 100644 --- a/pkg/kubelet/network/plugins.go +++ b/pkg/kubelet/network/plugins.go @@ -21,7 +21,7 @@ import ( "net" "strings" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "github.com/golang/glog" "k8s.io/kubernetes/pkg/api" diff --git a/pkg/kubelet/network/testing.go b/pkg/kubelet/network/testing.go index a6612345023..21854f3c1fd 100644 --- a/pkg/kubelet/network/testing.go +++ b/pkg/kubelet/network/testing.go @@ -21,7 +21,7 @@ package network import ( "k8s.io/kubernetes/pkg/api" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" ) diff --git a/pkg/kubelet/networks.go b/pkg/kubelet/networks.go index af58a3dc7de..06e075e0959 100644 --- a/pkg/kubelet/networks.go +++ b/pkg/kubelet/networks.go @@ -18,7 +18,7 @@ package kubelet import ( "k8s.io/kubernetes/pkg/api" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" ) diff --git a/pkg/kubelet/pod/mirror_client.go b/pkg/kubelet/pod/mirror_client.go index 4027e0e4e4b..aa88742788e 100644 --- a/pkg/kubelet/pod/mirror_client.go +++ b/pkg/kubelet/pod/mirror_client.go @@ -20,7 +20,7 @@ import ( "github.com/golang/glog" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" ) diff --git a/pkg/kubelet/status/manager.go b/pkg/kubelet/status/manager.go index edc85a38c9b..a2182f5fd73 100644 --- a/pkg/kubelet/status/manager.go +++ b/pkg/kubelet/status/manager.go @@ -21,7 +21,7 @@ import ( "sync" "time" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "github.com/golang/glog" "k8s.io/kubernetes/pkg/api" diff --git a/pkg/kubelet/status/manager_test.go b/pkg/kubelet/status/manager_test.go index df3eb880fdb..19c810fc9b3 100644 --- a/pkg/kubelet/status/manager_test.go +++ b/pkg/kubelet/status/manager_test.go @@ -23,7 +23,7 @@ import ( "testing" "time" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/client/testing/core" "k8s.io/kubernetes/pkg/client/testing/fake" diff --git a/pkg/kubelet/volumes.go b/pkg/kubelet/volumes.go index c19854fbef7..09a0d942f12 100644 --- a/pkg/kubelet/volumes.go +++ b/pkg/kubelet/volumes.go @@ -23,7 +23,7 @@ import ( "github.com/golang/glog" "k8s.io/kubernetes/pkg/api" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/cloudprovider" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/types" diff --git a/pkg/kubemark/hollow_kubelet.go b/pkg/kubemark/hollow_kubelet.go index 23c97301d00..e841096a9cc 100644 --- a/pkg/kubemark/hollow_kubelet.go +++ b/pkg/kubemark/hollow_kubelet.go @@ -21,7 +21,7 @@ import ( kubeletapp "k8s.io/kubernetes/cmd/kubelet/app" "k8s.io/kubernetes/pkg/api" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/kubelet/cadvisor" "k8s.io/kubernetes/pkg/kubelet/cm" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" diff --git a/pkg/serviceaccount/jwt_test.go b/pkg/serviceaccount/jwt_test.go index 1a5bbee5615..ffc05ba2977 100644 --- a/pkg/serviceaccount/jwt_test.go +++ b/pkg/serviceaccount/jwt_test.go @@ -26,7 +26,7 @@ import ( "github.com/dgrijalva/jwt-go" "k8s.io/kubernetes/pkg/api" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/client/testing/fake" serviceaccountcontroller "k8s.io/kubernetes/pkg/controller/serviceaccount" "k8s.io/kubernetes/pkg/serviceaccount" diff --git a/pkg/util/deployment/deployment.go b/pkg/util/deployment/deployment.go index cc7b874772f..714a3486d2c 100644 --- a/pkg/util/deployment/deployment.go +++ b/pkg/util/deployment/deployment.go @@ -23,7 +23,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/labels" labelsutil "k8s.io/kubernetes/pkg/util/labels" podutil "k8s.io/kubernetes/pkg/util/pod" diff --git a/pkg/volume/downwardapi/downwardapi_test.go b/pkg/volume/downwardapi/downwardapi_test.go index 2f3253b0efe..5f9f1669a97 100644 --- a/pkg/volume/downwardapi/downwardapi_test.go +++ b/pkg/volume/downwardapi/downwardapi_test.go @@ -24,7 +24,7 @@ import ( "testing" "k8s.io/kubernetes/pkg/api" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/client/testing/fake" "k8s.io/kubernetes/pkg/types" utiltesting "k8s.io/kubernetes/pkg/util/testing" diff --git a/pkg/volume/persistent_claim/persistent_claim_test.go b/pkg/volume/persistent_claim/persistent_claim_test.go index 8854ad0f690..7ad6eac38e7 100644 --- a/pkg/volume/persistent_claim/persistent_claim_test.go +++ b/pkg/volume/persistent_claim/persistent_claim_test.go @@ -23,7 +23,7 @@ import ( "testing" "k8s.io/kubernetes/pkg/api" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/client/testing/fake" "k8s.io/kubernetes/pkg/types" utilstrings "k8s.io/kubernetes/pkg/util/strings" diff --git a/pkg/volume/plugins.go b/pkg/volume/plugins.go index 94fb8d5d72c..2d0c54ae3c0 100644 --- a/pkg/volume/plugins.go +++ b/pkg/volume/plugins.go @@ -24,7 +24,7 @@ import ( "github.com/golang/glog" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/cloudprovider" "k8s.io/kubernetes/pkg/types" utilerrors "k8s.io/kubernetes/pkg/util/errors" diff --git a/pkg/volume/secret/secret_test.go b/pkg/volume/secret/secret_test.go index 81449b55055..e028fe90460 100644 --- a/pkg/volume/secret/secret_test.go +++ b/pkg/volume/secret/secret_test.go @@ -25,7 +25,7 @@ import ( "testing" "k8s.io/kubernetes/pkg/api" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/client/testing/fake" "k8s.io/kubernetes/pkg/types" "k8s.io/kubernetes/pkg/util/mount" diff --git a/pkg/volume/testing.go b/pkg/volume/testing.go index 79c072a53cd..361ff6cfb01 100644 --- a/pkg/volume/testing.go +++ b/pkg/volume/testing.go @@ -26,7 +26,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/cloudprovider" "k8s.io/kubernetes/pkg/types" "k8s.io/kubernetes/pkg/util" diff --git a/pkg/volume/util.go b/pkg/volume/util.go index 3078e24830d..42fdc1ed572 100644 --- a/pkg/volume/util.go +++ b/pkg/volume/util.go @@ -22,7 +22,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/runtime" "k8s.io/kubernetes/pkg/watch" diff --git a/plugin/pkg/admission/admit/admission.go b/plugin/pkg/admission/admit/admission.go index 3f74f1d4b2c..5329aad627b 100644 --- a/plugin/pkg/admission/admit/admission.go +++ b/plugin/pkg/admission/admit/admission.go @@ -19,7 +19,7 @@ package admit import ( "io" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/admission" ) diff --git a/plugin/pkg/admission/alwayspullimages/admission.go b/plugin/pkg/admission/alwayspullimages/admission.go index 9111162e6bd..9a096c9301c 100644 --- a/plugin/pkg/admission/alwayspullimages/admission.go +++ b/plugin/pkg/admission/alwayspullimages/admission.go @@ -27,7 +27,7 @@ package alwayspullimages import ( "io" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" diff --git a/plugin/pkg/admission/deny/admission.go b/plugin/pkg/admission/deny/admission.go index e91f7065b5d..686cf8a3a03 100644 --- a/plugin/pkg/admission/deny/admission.go +++ b/plugin/pkg/admission/deny/admission.go @@ -20,7 +20,7 @@ import ( "errors" "io" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/admission" ) diff --git a/plugin/pkg/admission/exec/admission.go b/plugin/pkg/admission/exec/admission.go index d9f514dbffa..100672bb71e 100644 --- a/plugin/pkg/admission/exec/admission.go +++ b/plugin/pkg/admission/exec/admission.go @@ -20,7 +20,7 @@ import ( "fmt" "io" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" diff --git a/plugin/pkg/admission/initialresources/admission.go b/plugin/pkg/admission/initialresources/admission.go index cfd43ba3cc9..8e4e1c4c897 100644 --- a/plugin/pkg/admission/initialresources/admission.go +++ b/plugin/pkg/admission/initialresources/admission.go @@ -23,7 +23,7 @@ import ( "strings" "time" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "github.com/golang/glog" "k8s.io/kubernetes/pkg/admission" diff --git a/plugin/pkg/admission/limitranger/admission.go b/plugin/pkg/admission/limitranger/admission.go index ebaa4c1c21c..fb46cf5d7a9 100644 --- a/plugin/pkg/admission/limitranger/admission.go +++ b/plugin/pkg/admission/limitranger/admission.go @@ -22,7 +22,7 @@ import ( "sort" "strings" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" diff --git a/plugin/pkg/admission/namespace/autoprovision/admission.go b/plugin/pkg/admission/namespace/autoprovision/admission.go index 779b4baae4f..25cf79d2511 100644 --- a/plugin/pkg/admission/namespace/autoprovision/admission.go +++ b/plugin/pkg/admission/namespace/autoprovision/admission.go @@ -19,7 +19,7 @@ package autoprovision import ( "io" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" diff --git a/plugin/pkg/admission/namespace/exists/admission.go b/plugin/pkg/admission/namespace/exists/admission.go index 183461e8edb..e502f6052a2 100644 --- a/plugin/pkg/admission/namespace/exists/admission.go +++ b/plugin/pkg/admission/namespace/exists/admission.go @@ -20,7 +20,7 @@ import ( "io" "time" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" diff --git a/plugin/pkg/admission/namespace/lifecycle/admission.go b/plugin/pkg/admission/namespace/lifecycle/admission.go index add7c5aead1..0be144e962d 100644 --- a/plugin/pkg/admission/namespace/lifecycle/admission.go +++ b/plugin/pkg/admission/namespace/lifecycle/admission.go @@ -21,7 +21,7 @@ import ( "io" "time" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" diff --git a/plugin/pkg/admission/persistentvolume/label/admission.go b/plugin/pkg/admission/persistentvolume/label/admission.go index 9561bbfc25c..1860bb0b76d 100644 --- a/plugin/pkg/admission/persistentvolume/label/admission.go +++ b/plugin/pkg/admission/persistentvolume/label/admission.go @@ -21,7 +21,7 @@ import ( "io" "sync" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" diff --git a/plugin/pkg/admission/resourcequota/admission.go b/plugin/pkg/admission/resourcequota/admission.go index 2062bb7766a..766dd867c5c 100644 --- a/plugin/pkg/admission/resourcequota/admission.go +++ b/plugin/pkg/admission/resourcequota/admission.go @@ -22,7 +22,7 @@ import ( "math/rand" "time" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" diff --git a/plugin/pkg/admission/securitycontext/scdeny/admission.go b/plugin/pkg/admission/securitycontext/scdeny/admission.go index d60348b6742..9eced5bc602 100644 --- a/plugin/pkg/admission/securitycontext/scdeny/admission.go +++ b/plugin/pkg/admission/securitycontext/scdeny/admission.go @@ -20,7 +20,7 @@ import ( "fmt" "io" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" diff --git a/plugin/pkg/admission/serviceaccount/admission.go b/plugin/pkg/admission/serviceaccount/admission.go index 47a3e11b886..12fc869ec30 100644 --- a/plugin/pkg/admission/serviceaccount/admission.go +++ b/plugin/pkg/admission/serviceaccount/admission.go @@ -23,7 +23,7 @@ import ( "strconv" "time" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" diff --git a/test/e2e/deployment.go b/test/e2e/deployment.go index 1dc155875ff..e5fdc313353 100644 --- a/test/e2e/deployment.go +++ b/test/e2e/deployment.go @@ -22,7 +22,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/labels" deploymentutil "k8s.io/kubernetes/pkg/util/deployment" "k8s.io/kubernetes/pkg/util/intstr" diff --git a/test/e2e/util.go b/test/e2e/util.go index 65c8de9db47..b1014c45c51 100644 --- a/test/e2e/util.go +++ b/test/e2e/util.go @@ -40,7 +40,7 @@ import ( "k8s.io/kubernetes/pkg/apimachinery/registered" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/cache" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" diff --git a/test/integration/framework/master_utils.go b/test/integration/framework/master_utils.go index 2bbbdc0b532..7128d9e08a1 100644 --- a/test/integration/framework/master_utils.go +++ b/test/integration/framework/master_utils.go @@ -31,7 +31,7 @@ import ( "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/apiserver" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" "k8s.io/kubernetes/pkg/client/record" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/controller" diff --git a/test/integration/persistent_volumes_test.go b/test/integration/persistent_volumes_test.go index 3fa8889a5cb..4fecb572d7c 100644 --- a/test/integration/persistent_volumes_test.go +++ b/test/integration/persistent_volumes_test.go @@ -27,7 +27,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/testapi" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" client "k8s.io/kubernetes/pkg/client/unversioned" fake_cloud "k8s.io/kubernetes/pkg/cloudprovider/providers/fake" persistentvolumecontroller "k8s.io/kubernetes/pkg/controller/persistentvolume" diff --git a/test/integration/service_account_test.go b/test/integration/service_account_test.go index 7f93ef21fc1..a00f8af2b66 100644 --- a/test/integration/service_account_test.go +++ b/test/integration/service_account_test.go @@ -38,7 +38,7 @@ import ( "k8s.io/kubernetes/pkg/auth/authenticator/bearertoken" "k8s.io/kubernetes/pkg/auth/authorizer" "k8s.io/kubernetes/pkg/auth/user" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2" client "k8s.io/kubernetes/pkg/client/unversioned" serviceaccountcontroller "k8s.io/kubernetes/pkg/controller/serviceaccount" "k8s.io/kubernetes/pkg/master" From 36f6049b07ea03b401f1e6c5819ad1ff3f8b1e89 Mon Sep 17 00:00:00 2001 From: Eric Tune Date: Fri, 15 Jan 2016 14:34:46 -0800 Subject: [PATCH 121/328] Document Unions, conventions for adding to Unions. --- docs/devel/api-conventions.md | 10 +++ docs/devel/api_changes.md | 117 ++++++++++++++++++++++++++++++++-- 2 files changed, 123 insertions(+), 4 deletions(-) diff --git a/docs/devel/api-conventions.md b/docs/devel/api-conventions.md index c5fda4bb5bd..af02d3dbaf9 100644 --- a/docs/devel/api-conventions.md +++ b/docs/devel/api-conventions.md @@ -53,6 +53,7 @@ using resources with kubectl can be found in [Working with resources](../user-gu - [Lists of named subobjects preferred over maps](#lists-of-named-subobjects-preferred-over-maps) - [Primitive types](#primitive-types) - [Constants](#constants) + - [Unions](#unions) - [Lists and Simple kinds](#lists-and-simple-kinds) - [Differing Representations](#differing-representations) - [Verbs on Resources](#verbs-on-resources) @@ -263,6 +264,15 @@ This rule maintains the invariant that all JSON/YAML keys are fields in API obje Some fields will have a list of allowed values (enumerations). These values will be strings, and they will be in CamelCase, with an initial uppercase letter. Examples: "ClusterFirst", "Pending", "ClientIP". +#### Unions + +Sometimes, at most one of a set of fields can be set. For example, the [volumes] field of a PodSpec has 17 different volume type-specific +fields, such as `nfs` and `iscsi`. All fields in the set should be [Optional](#optional-vs-required). + +Sometimes, when a new type is created, the api designer may anticipate that a union will be needed in the future, even if only one field is +allowed initially. In this case, be sure to make the field [Optional](#optional-vs-required) optional. In the validation, you may +still return an error if the sole field is unset. Do not set a default value for that field. + ### Lists and Simple kinds Every list or simple kind SHOULD have the following metadata in a nested object field called "metadata": diff --git a/docs/devel/api_changes.md b/docs/devel/api_changes.md index 2fe8a5af8cd..0c039aab187 100644 --- a/docs/devel/api_changes.md +++ b/docs/devel/api_changes.md @@ -32,6 +32,38 @@ Documentation for other releases can be found at +*This document is oriented at developers who want to change existing APIs. +A set of API conventions, which applies to new APIs and to changes, can be +found at [API Conventions](api-conventions.md). + +**Table of Contents** + + +- [So you want to change the API?](#so-you-want-to-change-the-api) + - [Operational overview](#operational-overview) + - [On compatibility](#on-compatibility) + - [Incompatible API changes](#incompatible-api-changes) + - [Changing versioned APIs](#changing-versioned-apis) + - [Edit types.go](#edit-typesgo) + - [Edit defaults.go](#edit-defaultsgo) + - [Edit conversion.go](#edit-conversiongo) + - [Changing the internal structures](#changing-the-internal-structures) + - [Edit types.go](#edit-typesgo) + - [Edit validation.go](#edit-validationgo) + - [Edit version conversions](#edit-version-conversions) + - [Edit deep copy files](#edit-deep-copy-files) + - [Edit json (un)marshaling code](#edit-json-unmarshaling-code) + - [Making a new API Group](#making-a-new-api-group) + - [Update the fuzzer](#update-the-fuzzer) + - [Update the semantic comparisons](#update-the-semantic-comparisons) + - [Implement your change](#implement-your-change) + - [Write end-to-end tests](#write-end-to-end-tests) + - [Examples and docs](#examples-and-docs) + - [Alpha, Beta, and Stable Versions](#alpha-beta-and-stable-versions) + - [Adding Unstable Features to Stable Versions](#adding-unstable-features-to-stable-versions) + + + # So you want to change the API? Before attempting a change to the API, you should familiarize yourself @@ -273,6 +305,11 @@ enumerated set *can* be a compatible change, if handled properly (treat the removed value as deprecated but allowed). This is actually a special case of a new representation, discussed above. +For [Unions](api-conventions.md), sets of fields where at most one should be set, +it is acceptible to add a new option to the union if the [appropriate conventions] +were followed in the original object. Removing an option requires following +the deprecation process. + ## Incompatible API changes There are times when this might be OK, but mostly we want changes that @@ -549,10 +586,6 @@ hack/update-swagger-spec.sh The API spec changes should be in a commit separate from your other changes. -## Adding new REST objects - -TODO(smarterclayton): write this. - ## Alpha, Beta, and Stable Versions New feature development proceeds through a series of stages of increasing maturity: @@ -617,6 +650,82 @@ New feature development proceeds through a series of stages of increasing maturi - Support: API version will continue to be present for many subsequent software releases; - Recommended Use Cases: any +### Adding Unstable Features to Stable Versions + +When adding a feature to an object which is already Stable, the new fields and new behaviors +need to meet the Stable level requirements. If these cannot be met, then the new +field cannot be added to the object. + +For example, consider the following object: + +```go +// API v6. +type Frobber struct { + Height int `json:"height"` + Param string `json:"param"` +} +``` + +A developer is considering adding a new `Width` parameter, like this: + +```go +// API v6. +type Frobber struct { + Height int `json:"height"` + Width int `json:"height"` + Param string `json:"param"` +} +``` + +However, the new feature is not stable enough to be used in a stable version (`v6`). +Some reasons for this might include: + +- the final representation is undecided (e.g. should it be called `Width` or `Breadth`?) +- the implementation is not stable enough for general use (e.g. the `Area()` routine sometimes overflows.) + +The developer cannot add the new field until stability is met. However, sometimes stability +cannot be met until some users try the new feature, and some users are only able or willing +to accept a released version of Kubernetes. In that case, the developer has a few options, +both of which require staging work over several releases. + + +A preferred option is to first make a release where the new value (`Width` in this example) +is specified via an annotation, like this: + +```go +kind: frobber +version: v6 +metadata: + name: myfrobber + annotations: + frobbing.alpha.kubernetes.io/width: 2 +height: 4 +param: "green and blue" +``` + +This format allows users to specify the new field, but makes it clear +that they are using a Alpha feature when they do, since the word `alpha` +is in the annotation key. + +Another option is to introduce a new type with an new `alpha` or `beta` version +designator, like this: + +``` +// API v6alpha2 +type Frobber struct { + Height int `json:"height"` + Width int `json:"height"` + Param string `json:"param"` +} +``` + +The latter requires that all objects in the same API group as `Frobber` to be replicated in +the new version, `v6alpha2`. This also requires user to use a new client which uses the +other version. Therefore, this is not a preferred option. + +A releated issue is how a cluster manager can roll back from a new version +with a new feature, that is already being used by users. See https://github.com/kubernetes/kubernetes/issues/4855. + [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/devel/api_changes.md?pixel)]() From 0a36db19bf227c0d7bfb64683bb53bf1047d1090 Mon Sep 17 00:00:00 2001 From: Jerome Touffe-Blin Date: Thu, 4 Feb 2016 08:43:47 +1100 Subject: [PATCH 122/328] Fix #11543 - use DescribeInstances API to retrieve the correct private DNS name --- pkg/cloudprovider/providers/aws/aws.go | 9 ++++++--- pkg/cloudprovider/providers/aws/aws_test.go | 20 +++++++++++++++++--- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/pkg/cloudprovider/providers/aws/aws.go b/pkg/cloudprovider/providers/aws/aws.go index 514fe4d97ea..a6305ef38c5 100644 --- a/pkg/cloudprovider/providers/aws/aws.go +++ b/pkg/cloudprovider/providers/aws/aws.go @@ -654,6 +654,7 @@ func (aws *AWSCloud) NodeAddresses(name string) ([]api.NodeAddress, error) { } return []api.NodeAddress{ {Type: api.NodeInternalIP, Address: internalIP}, + {Type: api.NodeLegacyHostIP, Address: internalIP}, {Type: api.NodeExternalIP, Address: externalIP}, }, nil } @@ -1117,10 +1118,13 @@ func (s *AWSCloud) getSelfAWSInstance() (*awsInstance, error) { if err != nil { return nil, fmt.Errorf("error fetching instance-id from ec2 metadata service: %v", err) } - privateDnsName, err := s.metadata.GetMetadata("local-hostname") + // privateDnsName, err := s.metadata.GetMetadata("local-hostname") + // See #11543 - need to use ec2 API to get the privateDnsName in case of private dns zone e.g. mydomain.io + instance, err := s.getInstanceByID(instanceId) if err != nil { - return nil, fmt.Errorf("error fetching local-hostname from ec2 metadata service: %v", err) + return nil, fmt.Errorf("error finding instance %s: %v", instanceId, err) } + privateDnsName := aws.StringValue(instance.PrivateDnsName) availabilityZone, err := getAvailabilityZone(s.metadata) if err != nil { return nil, fmt.Errorf("error fetching availability zone from ec2 metadata service: %v", err) @@ -2137,7 +2141,6 @@ func (s *AWSCloud) UpdateLoadBalancer(name, region string, hosts []string) error } // Returns the instance with the specified ID -// This function is currently unused, but seems very likely to be needed again func (a *AWSCloud) getInstanceByID(instanceID string) (*ec2.Instance, error) { instances, err := a.getInstancesByIDs([]*string{&instanceID}) if err != nil { diff --git a/pkg/cloudprovider/providers/aws/aws_test.go b/pkg/cloudprovider/providers/aws/aws_test.go index 44d701d2347..b53503d02a5 100644 --- a/pkg/cloudprovider/providers/aws/aws_test.go +++ b/pkg/cloudprovider/providers/aws/aws_test.go @@ -133,6 +133,8 @@ func NewFakeAWSServices() *FakeAWSServices { s.instanceId = "i-self" s.privateDnsName = "ip-172-20-0-100.ec2.internal" + s.internalIP = "192.168.0.1" + s.externalIP = "1.2.3.4" var selfInstance ec2.Instance selfInstance.InstanceId = &s.instanceId selfInstance.PrivateDnsName = &s.privateDnsName @@ -587,9 +589,10 @@ func TestNodeAddresses(t *testing.T) { // (we test that this produces an error) var instance0 ec2.Instance var instance1 ec2.Instance + var instance2 ec2.Instance //0 - instance0.InstanceId = aws.String("instance-same") + instance0.InstanceId = aws.String("i-self") instance0.PrivateDnsName = aws.String("instance-same.ec2.internal") instance0.PrivateIpAddress = aws.String("192.168.0.1") instance0.PublicIpAddress = aws.String("1.2.3.4") @@ -600,7 +603,7 @@ func TestNodeAddresses(t *testing.T) { instance0.State = &state0 //1 - instance1.InstanceId = aws.String("instance-same") + instance1.InstanceId = aws.String("i-self") instance1.PrivateDnsName = aws.String("instance-same.ec2.internal") instance1.PrivateIpAddress = aws.String("192.168.0.2") instance1.InstanceType = aws.String("c3.large") @@ -609,7 +612,18 @@ func TestNodeAddresses(t *testing.T) { } instance1.State = &state1 - instances := []*ec2.Instance{&instance0, &instance1} + //2 + instance2.InstanceId = aws.String("i-self") + instance2.PrivateDnsName = aws.String("instance-other.ec2.internal") + instance2.PrivateIpAddress = aws.String("192.168.0.1") + instance2.PublicIpAddress = aws.String("1.2.3.4") + instance2.InstanceType = aws.String("c3.large") + state2 := ec2.InstanceState{ + Name: aws.String("running"), + } + instance2.State = &state2 + + instances := []*ec2.Instance{&instance0, &instance1, &instance2} aws1, _ := mockInstancesResp([]*ec2.Instance{}) _, err1 := aws1.NodeAddresses("instance-mismatch.ec2.internal") From cf4ad07adc65ac5224d8d44d1982f858de3d1eb8 Mon Sep 17 00:00:00 2001 From: Eric Tune Date: Mon, 11 Jan 2016 12:05:20 -0800 Subject: [PATCH 123/328] Print line number of failed link conversion. --- cmd/mungedocs/links.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cmd/mungedocs/links.go b/cmd/mungedocs/links.go index 9fb82ac16a7..af1b9ecdfb2 100644 --- a/cmd/mungedocs/links.go +++ b/cmd/mungedocs/links.go @@ -122,23 +122,25 @@ func processLink(in string, filePath string) (string, error) { // any relative links actually point to files that exist. func updateLinks(filePath string, mlines mungeLines) (mungeLines, error) { var out mungeLines - errors := []string{} + allErrs := []string{} - for _, mline := range mlines { + for lineNum, mline := range mlines { if mline.preformatted || !mline.link { out = append(out, mline) continue } line, err := processLink(mline.data, filePath) if err != nil { - errors = append(errors, err.Error()) + var s = fmt.Sprintf("On line %d: %s", lineNum, err.Error()) + err := errors.New(s) + allErrs = append(allErrs, err.Error()) } ml := newMungeLine(line) out = append(out, ml) } err := error(nil) - if len(errors) != 0 { - err = fmt.Errorf("%s", strings.Join(errors, "\n")) + if len(allErrs) != 0 { + err = fmt.Errorf("%s", strings.Join(allErrs, "\n")) } return out, err } From da8c6df2e091d4182eb6bdcd88783de0e21f749a Mon Sep 17 00:00:00 2001 From: Isaac Hollander McCreery Date: Wed, 3 Feb 2016 14:33:59 -0800 Subject: [PATCH 124/328] Remove skip list ENVs, instead rely on labels --- hack/jenkins/e2e.sh | 182 ++++++-------------------------------------- 1 file changed, 24 insertions(+), 158 deletions(-) diff --git a/hack/jenkins/e2e.sh b/hack/jenkins/e2e.sh index e751ba3023c..402f9aac3bb 100755 --- a/hack/jenkins/e2e.sh +++ b/hack/jenkins/e2e.sh @@ -21,25 +21,6 @@ set -o errexit set -o nounset set -o pipefail -# Join all args with | -# Example: join_regex_allow_empty a b "c d" e => a|b|c d|e -function join_regex_allow_empty() { - local IFS="|" - echo "$*" -} - -# Join all args with |, butin case of empty result prints "EMPTY\sSET" instead. -# Example: join_regex_no_empty a b "c d" e => a|b|c d|e -# join_regex_no_empty => EMPTY\sSET -function join_regex_no_empty() { - local IFS="|" - if [ -z "$*" ]; then - echo "EMPTY\sSET" - else - echo "$*" - fi -} - # Properly configure globals for an upgrade step in a GKE or GCE upgrade suite # # These suites: @@ -54,9 +35,6 @@ function join_regex_no_empty() { # Assumes globals: # $JOB_NAME # $KUBERNETES_PROVIDER -# $GCE_DEFAULT_SKIP_TESTS -# $GCE_FLAKY_TESTS -# $GCE_SLOW_TESTS # # Args: # $1 old_version: the version to deploy a cluster at, and old e2e tests to run @@ -80,17 +58,6 @@ function configure_upgrade_step() { } local -r step="${BASH_REMATCH[1]}" - local -r gce_test_args="--ginkgo.skip=$(join_regex_allow_empty \ - ${GCE_DEFAULT_SKIP_TESTS[@]:+${GCE_DEFAULT_SKIP_TESTS[@]}} \ - ${GCE_FLAKY_TESTS[@]:+${GCE_FLAKY_TESTS[@]}} \ - ${GCE_SLOW_TESTS[@]:+${GCE_SLOW_TESTS[@]}} \ - )" - local -r gke_test_args="--ginkgo.skip=$(join_regex_allow_empty \ - ${GCE_DEFAULT_SKIP_TESTS[@]:+${GCE_DEFAULT_SKIP_TESTS[@]}} \ - ${GCE_FLAKY_TESTS[@]:+${GCE_FLAKY_TESTS[@]}} \ - ${GCE_SLOW_TESTS[@]:+${GCE_SLOW_TESTS[@]}} \ - )" - if [[ "${KUBERNETES_PROVIDER}" == "gce" ]]; then KUBE_GCE_INSTANCE_PREFIX="$cluster_name" NUM_NODES=5 @@ -149,12 +116,6 @@ function configure_upgrade_step() { E2E_UP="false" E2E_TEST="true" E2E_DOWN="false" - - if [[ "${KUBERNETES_PROVIDER}" == "gke" ]]; then - GINKGO_TEST_ARGS="${gke_test_args}" - else - GINKGO_TEST_ARGS="${gce_test_args}" - fi ;; step5) @@ -178,12 +139,6 @@ function configure_upgrade_step() { E2E_UP="false" E2E_TEST="true" E2E_DOWN="false" - - if [[ "${KUBERNETES_PROVIDER}" == "gke" ]]; then - GINKGO_TEST_ARGS="${gke_test_args}" - else - GINKGO_TEST_ARGS="${gce_test_args}" - fi ;; step7) @@ -198,12 +153,6 @@ function configure_upgrade_step() { E2E_UP="false" E2E_TEST="true" E2E_DOWN="true" - - if [[ "${KUBERNETES_PROVIDER}" == "gke" ]]; then - GINKGO_TEST_ARGS="${gke_test_args}" - else - GINKGO_TEST_ARGS="${gce_test_args}" - fi ;; esac } @@ -263,41 +212,6 @@ fi # When 1.2.0-beta.0 comes out, e.g., this will become "ci/latest-1.2" CURRENT_RELEASE_PUBLISHED_VERSION="ci/latest-1.1" -# Specialized tests which should be skipped by default for projects. -GCE_DEFAULT_SKIP_TESTS=( - "\[Skipped\]" - "\[Feature:.+\]" - ) - -# Tests which kills or restarts components and/or nodes. -DISRUPTIVE_TESTS=( - "\[Disruptive\]" -) - -# The following tests are known to be flaky, and are thus run only in their own -# -flaky- build variants. -GCE_FLAKY_TESTS=( - "\[Flaky\]" - ) - -# The following tests are known to be slow running (> 2 min), and are -# thus run only in their own -slow- build variants. Note that tests -# can be slow by explicit design (e.g. some soak tests), or slow -# through poor implementation. Please indicate which applies in the -# comments below, and for poorly implemented tests, please quote the -# issue number tracking speed improvements. -GCE_SLOW_TESTS=( - "\[Slow\]" - ) - -# Tests which are not able to be run in parallel. -# -# TODO(ihmccreery) I'd like to get these combined with DISRUPTIVE_TESTS. -GCE_PARALLEL_SKIP_TESTS=( - "\[Serial\]" - "\[Disruptive\]" -) - # Define environment variables based on the Jenkins project name. # NOTE: Not all jobs are defined here. The hack/jenkins/e2e.sh in master and # release branches defines relevant jobs for that particular version of @@ -311,13 +225,9 @@ case ${JOB_NAME} in : ${E2E_CLUSTER_NAME:="jnks-e2e-gce-${NODE_NAME}-${EXECUTOR_NUMBER}"} : ${E2E_NETWORK:="e2e-gce-${NODE_NAME}-${EXECUTOR_NUMBER}"} : ${GINKGO_PARALLEL:="y"} - # This list should match the list in kubernetes-e2e-gce-parallel. - : ${GINKGO_TEST_ARGS:="--ginkgo.skip=$(join_regex_allow_empty \ - ${GCE_DEFAULT_SKIP_TESTS[@]:+${GCE_DEFAULT_SKIP_TESTS[@]}} \ - ${GCE_PARALLEL_SKIP_TESTS[@]:+${GCE_PARALLEL_SKIP_TESTS[@]}} \ - ${GCE_FLAKY_TESTS[@]:+${GCE_FLAKY_TESTS[@]}} \ - ${GCE_SLOW_TESTS[@]:+${GCE_SLOW_TESTS[@]}} \ - )"} + # This list should match the list in kubernetes-e2e-gce. + # TODO(ihmccreery) remove [Skipped] once tests are relabeled + : ${GINKGO_TEST_ARGS:="--ginkgo.skip=\[Slow\]|\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]|\[Skipped\]"} : ${KUBE_GCE_INSTANCE_PREFIX:="e2e-gce-${NODE_NAME}-${EXECUTOR_NUMBER}"} : ${PROJECT:="kubernetes-jenkins-pull"} : ${ENABLE_DEPLOYMENTS:=true} @@ -332,6 +242,7 @@ case ${JOB_NAME} in : ${E2E_CLUSTER_NAME:="jenkins-gce-e2e"} : ${E2E_PUBLISH_GREEN_VERSION:="true"} : ${E2E_NETWORK:="e2e-gce"} + # This list should match the list in kubernetes-pull-build-test-e2e-gce. # TODO(ihmccreery) remove [Skipped] once tests are relabeled : ${GINKGO_TEST_ARGS:="--ginkgo.skip=\[Slow\]|\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]|\[Skipped\]"} : ${GINKGO_PARALLEL:="y"} @@ -396,11 +307,9 @@ case ${JOB_NAME} in kubernetes-e2e-gce-flaky) : ${E2E_CLUSTER_NAME:="jenkins-gce-e2e-flaky"} : ${E2E_NETWORK:="e2e-flaky"} - : ${GINKGO_TEST_ARGS:="--ginkgo.skip=$(join_regex_allow_empty \ - ${GCE_DEFAULT_SKIP_TESTS[@]:+${GCE_DEFAULT_SKIP_TESTS[@]}} \ - ) --ginkgo.focus=$(join_regex_no_empty \ - ${GCE_FLAKY_TESTS[@]:+${GCE_FLAKY_TESTS[@]}} \ - )"} + # TODO(ihmccreery) remove [Skipped] once tetss are relabeled + : ${GINKGO_TEST_ARGS:="--ginkgo.focus=\[Flaky\] \ + --ginkgo.skip=\[Feature:.+\]|\[Skipped\]"} : ${KUBE_GCE_INSTANCE_PREFIX:="e2e-flaky"} : ${PROJECT:="k8s-jkns-e2e-gce-flaky"} : ${FAIL_ON_GCP_RESOURCE_LEAK:="true"} @@ -412,12 +321,9 @@ case ${JOB_NAME} in : ${E2E_CLUSTER_NAME:="parallel-flaky"} : ${E2E_NETWORK:="e2e-parallel-flaky"} : ${GINKGO_PARALLEL:="y"} - : ${GINKGO_TEST_ARGS:="--ginkgo.skip=$(join_regex_allow_empty \ - ${GCE_DEFAULT_SKIP_TESTS[@]:+${GCE_DEFAULT_SKIP_TESTS[@]}} \ - ${GCE_PARALLEL_SKIP_TESTS[@]:+${GCE_PARALLEL_SKIP_TESTS[@]}} \ - ) --ginkgo.focus=$(join_regex_no_empty \ - ${GCE_FLAKY_TESTS[@]:+${GCE_FLAKY_TESTS[@]}} \ - )"} + # TODO(ihmccreery) remove [Skipped] once tetss are relabeled + : ${GINKGO_TEST_ARGS:="--ginkgo.focus=\[Flaky\] \ + --ginkgo.skip=\[Serial\]|\[Disruptive\]|\[Feature:.+\]|\[Skipped\]"} : ${KUBE_GCE_INSTANCE_PREFIX:="parallel-flaky"} : ${PROJECT:="k8s-jkns-e2e-gce-prl-flaky"} : ${FAIL_ON_GCP_RESOURCE_LEAK:="true"} @@ -468,9 +374,9 @@ case ${JOB_NAME} in : ${E2E_SET_CLUSTER_API_VERSION:=y} : ${PROJECT:="k8s-jkns-e2e-gke-ci-flaky"} : ${FAIL_ON_GCP_RESOURCE_LEAK:="true"} - : ${GINKGO_TEST_ARGS:="--ginkgo.focus=$(join_regex_no_empty \ - ${GCE_FLAKY_TESTS[@]:+${GCE_FLAKY_TESTS[@]}} \ - )"} + # TODO(ihmccreery) remove [Skipped] once tetss are relabeled + : ${GINKGO_TEST_ARGS:="--ginkgo.focus=\[Flaky\] \ + --ginkgo.skip=\[Feature:.+\]|\[Skipped\]"} ;; # AWS core jobs @@ -482,11 +388,9 @@ case ${JOB_NAME} in : ${E2E_ZONE:="us-west-2a"} : ${ZONE:="us-west-2a"} : ${E2E_NETWORK:="e2e-aws"} - : ${GINKGO_TEST_ARGS:="--ginkgo.skip=$(join_regex_allow_empty \ - ${GCE_DEFAULT_SKIP_TESTS[@]:+${GCE_DEFAULT_SKIP_TESTS[@]}} \ - ${GCE_FLAKY_TESTS[@]:+${GCE_FLAKY_TESTS[@]}} \ - ${GCE_SLOW_TESTS[@]:+${GCE_SLOW_TESTS[@]}} \ - )"} + # TODO(ihmccreery) remove [Skipped] once tests are relabeled + : ${GINKGO_TEST_ARGS:="--ginkgo.skip=\[Slow\]|\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]|\[Skipped\]"} + : ${GINKGO_PARALLEL:="y"} : ${KUBE_GCE_INSTANCE_PREFIX="e2e-aws"} : ${PROJECT:="k8s-jkns-e2e-aws"} : ${ENABLE_DEPLOYMENTS:=true} @@ -497,21 +401,6 @@ case ${JOB_NAME} in : ${AWS_SHARED_CREDENTIALS_FILE:='/var/lib/jenkins/.aws/credentials'} ;; - # Runs all non-flaky tests on AWS in parallel. - kubernetes-e2e-aws-parallel) - : ${E2E_CLUSTER_NAME:="jenkins-aws-e2e-parallel"} - : ${E2E_NETWORK:="e2e-parallel"} - : ${GINKGO_PARALLEL:="y"} - : ${GINKGO_TEST_ARGS:="--ginkgo.skip=$(join_regex_allow_empty \ - ${GCE_DEFAULT_SKIP_TESTS[@]:+${GCE_DEFAULT_SKIP_TESTS[@]}} \ - ${GCE_PARALLEL_SKIP_TESTS[@]:+${GCE_PARALLEL_SKIP_TESTS[@]}} \ - ${GCE_FLAKY_TESTS[@]:+${GCE_FLAKY_TESTS[@]}} \ - )"} - : ${ENABLE_DEPLOYMENTS:=true} - # Override AWS defaults. - NUM_NODES=${NUM_NODES_PARALLEL} - ;; - # Feature jobs # Runs only the examples tests on GCE. @@ -565,12 +454,6 @@ case ${JOB_NAME} in : ${E2E_CLUSTER_NAME:="jenkins-gce-e2e-flannel"} : ${E2E_PUBLISH_GREEN_VERSION:="true"} : ${E2E_NETWORK:="e2e-gce-flannel"} - : ${GINKGO_TEST_ARGS:="--ginkgo.skip=$(join_regex_allow_empty \ - ${GCE_DEFAULT_SKIP_TESTS[@]:+${GCE_DEFAULT_SKIP_TESTS[@]}} \ - ${GCE_PARALLEL_SKIP_TESTS[@]:+${GCE_PARALLEL_SKIP_TESTS[@]}} \ - ${GCE_FLAKY_TESTS[@]:+${GCE_FLAKY_TESTS[@]}} \ - ${GCE_SLOW_TESTS[@]:+${GCE_SLOW_TESTS[@]}} \ - )"} : ${KUBE_GCE_INSTANCE_PREFIX:="e2e-flannel"} : ${PROJECT:="kubernetes-flannel"} # Override GCE defaults. @@ -715,13 +598,11 @@ case ${JOB_NAME} in # Clear out any orphaned namespaces in case previous run was interrupted. : ${E2E_CLEAN_START:="true"} # We should be testing the reliability of a long-running cluster. The - # DISRUPTIVE_TESTS kill/restart components or nodes in the cluster, + # [Disruptive] tests kill/restart components or nodes in the cluster, # defeating the purpose of a soak cluster. (#15722) - : ${GINKGO_TEST_ARGS:="--ginkgo.skip=$(join_regex_allow_empty \ - ${GCE_DEFAULT_SKIP_TESTS[@]:+${GCE_DEFAULT_SKIP_TESTS[@]}} \ - ${GCE_FLAKY_TESTS[@]:+${GCE_FLAKY_TESTS[@]}} \ - ${DISRUPTIVE_TESTS[@]:+${DISRUPTIVE_TESTS[@]}} \ - )"} + # + # TODO(ihmccreery) remove [Skipped] once tests are relabeled + : ${GINKGO_TEST_ARGS:="--ginkgo.skip=\[Disruptive\]|\[Flaky\]|\[Feature:.+\]|\[Skipped\]"} : ${KUBE_GCE_INSTANCE_PREFIX:="gce-soak-weekly"} : ${PROJECT:="kubernetes-jenkins"} ;; @@ -751,13 +632,11 @@ case ${JOB_NAME} in : ${PROJECT:="kubernetes-jenkins"} : ${E2E_OPT:="--check_version_skew=false"} # We should be testing the reliability of a long-running cluster. The - # DISRUPTIVE_TESTS kill/restart components or nodes in the cluster, + # [Disruptive] tests kill/restart components or nodes in the cluster, # defeating the purpose of a soak cluster. (#15722) - : ${GINKGO_TEST_ARGS:="--ginkgo.skip=$(join_regex_allow_empty \ - ${GCE_DEFAULT_SKIP_TESTS[@]:+${GCE_DEFAULT_SKIP_TESTS[@]}} \ - ${GCE_FLAKY_TESTS[@]:+${GCE_FLAKY_TESTS[@]}} \ - ${DISRUPTIVE_TESTS[@]:+${DISRUPTIVE_TESTS[@]}} \ - )"} + # + # TODO(ihmccreery) remove [Skipped] once tests are relabeled + : ${GINKGO_TEST_ARGS:="--ginkgo.skip=\[Disruptive\]|\[Flaky\]|\[Feature:.+\]|\[Skipped\]"} ;; # Upgrade jobs @@ -880,10 +759,6 @@ case ${JOB_NAME} in : ${E2E_UP:="false"} : ${E2E_TEST:="true"} : ${E2E_DOWN:="false"} - : ${GINKGO_TEST_ARGS:="--ginkgo.skip=$(join_regex_allow_empty \ - ${GCE_DEFAULT_SKIP_TESTS[@]:+${GCE_DEFAULT_SKIP_TESTS[@]}} \ - ${GCE_FLAKY_TESTS[@]:+${GCE_FLAKY_TESTS[@]}} \ - )"} : ${KUBE_GCE_INSTANCE_PREFIX:="e2e-upgrade-1-0"} : ${NUM_NODES:=5} ;; @@ -917,10 +792,6 @@ case ${JOB_NAME} in : ${E2E_UP:="false"} : ${E2E_TEST:="true"} : ${E2E_DOWN:="false"} - : ${GINKGO_TEST_ARGS:="--ginkgo.skip=$(join_regex_allow_empty \ - ${GCE_DEFAULT_SKIP_TESTS[@]:+${GCE_DEFAULT_SKIP_TESTS[@]}} \ - ${GCE_FLAKY_TESTS[@]:+${GCE_FLAKY_TESTS[@]}} \ - )"} : ${KUBE_GCE_INSTANCE_PREFIX:="e2e-upgrade-1-0"} : ${NUM_NODES:=5} ;; @@ -937,11 +808,6 @@ case ${JOB_NAME} in : ${E2E_UP:="false"} : ${E2E_TEST:="true"} : ${E2E_DOWN:="true"} - : ${GINKGO_TEST_ARGS:="--ginkgo.skip=$(join_regex_allow_empty \ - ${GCE_DEFAULT_SKIP_TESTS[@]:+${GCE_DEFAULT_SKIP_TESTS[@]}} \ - ${GCE_FLAKY_TESTS[@]:+${GCE_FLAKY_TESTS[@]}} \ - ${GCE_SLOW_TESTS[@]:+${GCE_SLOW_TESTS[@]}} \ - )"} : ${KUBE_GCE_INSTANCE_PREFIX:="e2e-upgrade-1-0"} : ${NUM_NODES:=5} ;; From 1e8a7716e8602a52ec24605d5a1dbdf0dcaa6220 Mon Sep 17 00:00:00 2001 From: Isaac Hollander McCreery Date: Wed, 3 Feb 2016 14:41:37 -0800 Subject: [PATCH 125/328] Fix typos in e2e.sh --- hack/jenkins/e2e.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hack/jenkins/e2e.sh b/hack/jenkins/e2e.sh index 402f9aac3bb..0cc70796ab2 100755 --- a/hack/jenkins/e2e.sh +++ b/hack/jenkins/e2e.sh @@ -256,7 +256,7 @@ case ${JOB_NAME} in kubernetes-e2e-gce-slow) : ${E2E_CLUSTER_NAME:="jenkins-gce-e2e-slow"} : ${E2E_NETWORK:="e2e-slow"} - # TODO(ihmccreery) remove [Skipped] once tetss are relabeled + # TODO(ihmccreery) remove [Skipped] once tests are relabeled : ${GINKGO_TEST_ARGS:="--ginkgo.focus=\[Slow\] \ --ginkgo.skip=\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]|\[Skipped\]"} : ${GINKGO_PARALLEL:="y"} @@ -307,7 +307,7 @@ case ${JOB_NAME} in kubernetes-e2e-gce-flaky) : ${E2E_CLUSTER_NAME:="jenkins-gce-e2e-flaky"} : ${E2E_NETWORK:="e2e-flaky"} - # TODO(ihmccreery) remove [Skipped] once tetss are relabeled + # TODO(ihmccreery) remove [Skipped] once tests are relabeled : ${GINKGO_TEST_ARGS:="--ginkgo.focus=\[Flaky\] \ --ginkgo.skip=\[Feature:.+\]|\[Skipped\]"} : ${KUBE_GCE_INSTANCE_PREFIX:="e2e-flaky"} @@ -321,7 +321,7 @@ case ${JOB_NAME} in : ${E2E_CLUSTER_NAME:="parallel-flaky"} : ${E2E_NETWORK:="e2e-parallel-flaky"} : ${GINKGO_PARALLEL:="y"} - # TODO(ihmccreery) remove [Skipped] once tetss are relabeled + # TODO(ihmccreery) remove [Skipped] once tests are relabeled : ${GINKGO_TEST_ARGS:="--ginkgo.focus=\[Flaky\] \ --ginkgo.skip=\[Serial\]|\[Disruptive\]|\[Feature:.+\]|\[Skipped\]"} : ${KUBE_GCE_INSTANCE_PREFIX:="parallel-flaky"} @@ -351,7 +351,7 @@ case ${JOB_NAME} in : ${E2E_SET_CLUSTER_API_VERSION:=y} : ${PROJECT:="k8s-jkns-e2e-gke-slow"} : ${FAIL_ON_GCP_RESOURCE_LEAK:="true"} - # TODO(ihmccreery) remove [Skipped] once tetss are relabeled + # TODO(ihmccreery) remove [Skipped] once tests are relabeled : ${GINKGO_TEST_ARGS:="--ginkgo.focus=\[Slow\] \ --ginkgo.skip=\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]|\[Skipped\]"} : ${GINKGO_PARALLEL:="y"} @@ -374,7 +374,7 @@ case ${JOB_NAME} in : ${E2E_SET_CLUSTER_API_VERSION:=y} : ${PROJECT:="k8s-jkns-e2e-gke-ci-flaky"} : ${FAIL_ON_GCP_RESOURCE_LEAK:="true"} - # TODO(ihmccreery) remove [Skipped] once tetss are relabeled + # TODO(ihmccreery) remove [Skipped] once tests are relabeled : ${GINKGO_TEST_ARGS:="--ginkgo.focus=\[Flaky\] \ --ginkgo.skip=\[Feature:.+\]|\[Skipped\]"} ;; From 88dbcffdf0e7a07d0ff604b556fcc8b39cbe0d93 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Wed, 3 Feb 2016 11:06:08 -0800 Subject: [PATCH 126/328] Fix wrong timeout param to wget --- test/e2e/service.go | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/test/e2e/service.go b/test/e2e/service.go index 7ebf3d3f96b..d336bcf69fb 100644 --- a/test/e2e/service.go +++ b/test/e2e/service.go @@ -239,8 +239,10 @@ var _ = Describe("Services", func() { ns := f.Namespace.Name numPods, servicePort := 3, 80 + By("creating service1 in namespace " + ns) podNames1, svc1IP, err := startServeHostnameService(c, ns, "service1", servicePort, numPods) Expect(err).NotTo(HaveOccurred()) + By("creating service2 in namespace " + ns) podNames2, svc2IP, err := startServeHostnameService(c, ns, "service2", servicePort, numPods) Expect(err).NotTo(HaveOccurred()) @@ -251,28 +253,35 @@ var _ = Describe("Services", func() { } host := hosts[0] + By("verifying service1 is up") expectNoError(verifyServeHostnameServiceUp(c, ns, host, podNames1, svc1IP, servicePort)) + + By("verifying service2 is up") expectNoError(verifyServeHostnameServiceUp(c, ns, host, podNames2, svc2IP, servicePort)) // Stop service 1 and make sure it is gone. + By("stopping service1") expectNoError(stopServeHostnameService(c, ns, "service1")) + By("verifying service1 is not up") expectNoError(verifyServeHostnameServiceDown(c, host, svc1IP, servicePort)) + By("verifying service2 is still up") expectNoError(verifyServeHostnameServiceUp(c, ns, host, podNames2, svc2IP, servicePort)) // Start another service and verify both are up. + By("creating service3 in namespace " + ns) podNames3, svc3IP, err := startServeHostnameService(c, ns, "service3", servicePort, numPods) Expect(err).NotTo(HaveOccurred()) if svc2IP == svc3IP { - Failf("VIPs conflict: %v", svc2IP) + Failf("service IPs conflict: %v", svc2IP) } + By("verifying service2 is still up") expectNoError(verifyServeHostnameServiceUp(c, ns, host, podNames2, svc2IP, servicePort)) - expectNoError(verifyServeHostnameServiceUp(c, ns, host, podNames3, svc3IP, servicePort)) - expectNoError(stopServeHostnameService(c, ns, "service2")) - expectNoError(stopServeHostnameService(c, ns, "service3")) + By("verifying service3 is up") + expectNoError(verifyServeHostnameServiceUp(c, ns, host, podNames3, svc3IP, servicePort)) }) It("should work after restarting kube-proxy [Disruptive]", func() { @@ -1290,17 +1299,18 @@ func verifyServeHostnameServiceUp(c *client.Client, ns, host string, expectedPod defer func() { deletePodOrFail(c, ns, execPodName) }() + // Loop a bunch of times - the proxy is randomized, so we want a good // chance of hitting each backend at least once. - command := fmt.Sprintf( - "for i in $(seq 1 %d); do wget -q -T 1 -O - http://%s:%d 2>&1 || true; echo; done", - 50*len(expectedPods), serviceIP, servicePort) - + buildCommand := func(wget string) string { + return fmt.Sprintf("for i in $(seq 1 %d); do %s http://%s:%d 2>&1 || true; echo; done", + 50*len(expectedPods), wget, serviceIP, servicePort) + } commands := []func() string{ // verify service from node func() string { - cmd := fmt.Sprintf(`set -e; %s`, command) - Logf("Executing cmd %v on host %v", cmd, host) + cmd := "set -e; " + buildCommand("wget -q --timeout=0.2 --tries=1 -O -") + Logf("Executing cmd %q on host %v", cmd, host) result, err := SSH(cmd, host, testContext.Provider) if err != nil || result.Code != 0 { LogSSHResult(result) @@ -1310,11 +1320,12 @@ func verifyServeHostnameServiceUp(c *client.Client, ns, host string, expectedPod }, // verify service from pod func() string { - Logf("Executing cmd %v in pod %v/%v", command, ns, execPodName) + cmd := buildCommand("wget -q -T 1 -O -") + Logf("Executing cmd %q in pod %v/%v", cmd, ns, execPodName) // TODO: Use exec-over-http via the netexec pod instead of kubectl exec. - output, err := RunHostCmd(ns, execPodName, command) + output, err := RunHostCmd(ns, execPodName, cmd) if err != nil { - Logf("error while kubectl execing %v in pod %v/%v: %v\nOutput: %v", command, ns, execPodName, err, output) + Logf("error while kubectl execing %q in pod %v/%v: %v\nOutput: %v", cmd, ns, execPodName, err, output) } return output }, @@ -1329,7 +1340,7 @@ func verifyServeHostnameServiceUp(c *client.Client, ns, host string, expectedPod pods := strings.Split(strings.TrimSpace(cmdFunc()), "\n") // Uniq pods before the sort because inserting them into a set // (which is implemented using dicts) can re-order them. - gotPods := sets.NewString(pods...).List() + gotPods = sets.NewString(pods...).List() if api.Semantic.DeepEqual(gotPods, expectedPods) { passed = true break From ec7366fc2a6c2dadccbb923de9c3a44f79a7b973 Mon Sep 17 00:00:00 2001 From: Minhan Xia Date: Wed, 3 Feb 2016 14:54:32 -0800 Subject: [PATCH 127/328] add service validation for mix protocol --- pkg/api/validation/validation.go | 6 ++++++ pkg/api/validation/validation_test.go | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/pkg/api/validation/validation.go b/pkg/api/validation/validation.go index f81e9845f80..966c5b71a57 100644 --- a/pkg/api/validation/validation.go +++ b/pkg/api/validation/validation.go @@ -1509,12 +1509,18 @@ func ValidateService(service *api.Service) field.ErrorList { if service.Spec.Type == api.ServiceTypeLoadBalancer { portsPath := specPath.Child("ports") + includeProtocols := sets.NewString() for i := range service.Spec.Ports { portPath := portsPath.Index(i) if !supportedPortProtocols.Has(string(service.Spec.Ports[i].Protocol)) { allErrs = append(allErrs, field.Invalid(portPath.Child("protocol"), service.Spec.Ports[i].Protocol, "cannot create an external load balancer with non-TCP/UDP ports")) + } else { + includeProtocols.Insert(string(service.Spec.Ports[i].Protocol)) } } + if includeProtocols.Len() > 1 { + allErrs = append(allErrs, field.Invalid(portsPath, service.Spec.Ports, "cannot create an external load balancer with mix protocols")) + } } if service.Spec.Type == api.ServiceTypeClusterIP { diff --git a/pkg/api/validation/validation_test.go b/pkg/api/validation/validation_test.go index 69e02012e3f..6eb02134558 100644 --- a/pkg/api/validation/validation_test.go +++ b/pkg/api/validation/validation_test.go @@ -2269,10 +2269,18 @@ func TestValidateService(t *testing.T) { name: "valid load balancer protocol UDP 2", tweakSvc: func(s *api.Service) { s.Spec.Type = api.ServiceTypeLoadBalancer - s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "q", Port: 12345, Protocol: "UDP", TargetPort: intstr.FromInt(12345)}) + s.Spec.Ports[0] = api.ServicePort{Name: "q", Port: 12345, Protocol: "UDP", TargetPort: intstr.FromInt(12345)} }, numErrs: 0, }, + { + name: "invalid load balancer with mix protocol", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeLoadBalancer + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "q", Port: 12345, Protocol: "UDP", TargetPort: intstr.FromInt(12345)}) + }, + numErrs: 1, + }, { name: "valid 1", tweakSvc: func(s *api.Service) { From 1db0925521eced2081bfb717915e77a43306c3c1 Mon Sep 17 00:00:00 2001 From: Paul Morie Date: Wed, 3 Feb 2016 18:25:03 -0500 Subject: [PATCH 128/328] Make it easier to debug pod IP flakes for downward API --- pkg/kubelet/kubelet.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index e8d4c1d6f39..747a71ee49b 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -1155,7 +1155,7 @@ func makeMounts(pod *api.Pod, podDir string, container *api.Container, podVolume // - container is not already mounting on /etc/hosts // When the pause container is being created, its IP is still unknown. Hence, PodIP will not have been set. mountEtcHostsFile := (pod.Spec.SecurityContext == nil || !pod.Spec.SecurityContext.HostNetwork) && len(pod.Status.PodIP) > 0 - glog.V(4).Infof("Will create hosts mount for container:%q, podIP:%s: %v", container.Name, pod.Status.PodIP, mountEtcHostsFile) + glog.V(3).Infof("container: %v/%v/%v podIP: %q creating hosts mount: %v", pod.Namespace, pod.Name, container.Name, pod.Status.PodIP, mountEtcHostsFile) mounts := []kubecontainer.Mount{} for _, mount := range container.VolumeMounts { mountEtcHostsFile = mountEtcHostsFile && (mount.MountPath != etcHostsPath) From 6a5157b4962826eb87b8468a682353c31679f155 Mon Sep 17 00:00:00 2001 From: Paul Morie Date: Wed, 3 Feb 2016 12:37:17 -0500 Subject: [PATCH 129/328] Allow boilerplate checks on whole filenames --- hack/boilerplate/boilerplate.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hack/boilerplate/boilerplate.py b/hack/boilerplate/boilerplate.py index 7b1ff435ecf..9a5f7010574 100755 --- a/hack/boilerplate/boilerplate.py +++ b/hack/boilerplate/boilerplate.py @@ -33,6 +33,7 @@ rootdir = os.path.abspath(rootdir) def get_refs(): refs = {} + for path in glob.glob(os.path.join(rootdir, "hack/boilerplate/boilerplate.*.txt")): extension = os.path.basename(path).split(".")[1] @@ -52,8 +53,12 @@ def file_passes(filename, refs, regexs): data = f.read() f.close() + basename = os.path.basename(filename) extension = file_extension(filename) - ref = refs[extension] + if extension != "": + ref = refs[extension] + else: + ref = refs[basename] # remove build tags from the top of Go files if extension == "go": @@ -128,8 +133,9 @@ def get_files(extensions): files = normalize_files(files) outfiles = [] for pathname in files: + basename = os.path.basename(pathname) extension = file_extension(pathname) - if extension in extensions: + if extension in extensions or basename in extensions: outfiles.append(pathname) return outfiles From 05bd1073012afd33ceaf59e8f3b9eafc73f1e1ef Mon Sep 17 00:00:00 2001 From: Paul Morie Date: Wed, 3 Feb 2016 01:30:10 -0500 Subject: [PATCH 130/328] Add boilerplate checks for Makefiles --- Makefile | 14 ++++++++++++++ build/debian-iptables/Makefile | 14 ++++++++++++++ build/pause/Makefile | 14 ++++++++++++++ cluster/addons/dns/kube2sky/Makefile | 14 ++++++++++++++ cluster/addons/dns/skydns/Makefile | 14 ++++++++++++++ .../addons/fluentd-elasticsearch/es-image/Makefile | 14 ++++++++++++++ .../fluentd-es-image/Makefile | 14 ++++++++++++++ .../fluentd-elasticsearch/kibana-image/Makefile | 14 ++++++++++++++ .../addons/fluentd-gcp/fluentd-gcp-image/Makefile | 14 ++++++++++++++ cluster/addons/registry/images/Makefile | 14 ++++++++++++++ cluster/images/etcd/Makefile | 14 ++++++++++++++ cluster/images/hyperkube/Makefile | 14 ++++++++++++++ cluster/images/kubelet/Makefile | 14 ++++++++++++++ cluster/images/kubemark/Makefile | 14 ++++++++++++++ cluster/images/nginx/Makefile | 14 ++++++++++++++ .../juju/charms/trusty/kubernetes-master/Makefile | 13 +++++++++++++ cluster/juju/charms/trusty/kubernetes/Makefile | 13 +++++++++++++ docs/design/clustering/Makefile | 14 ++++++++++++++ docs/user-guide/liveness/image/Makefile | 14 ++++++++++++++ docs/user-guide/logging-demo/Makefile | 14 ++++++++++++++ examples/cassandra/image/Makefile | 14 ++++++++++++++ examples/cluster-dns/images/backend/Makefile | 14 ++++++++++++++ examples/cluster-dns/images/frontend/Makefile | 14 ++++++++++++++ examples/explorer/Makefile | 14 ++++++++++++++ examples/https-nginx/Makefile | 14 ++++++++++++++ examples/kubectl-container/Makefile | 14 ++++++++++++++ hack/boilerplate/boilerplate.Makefile.txt | 14 ++++++++++++++ hack/jenkins/job-builder-image/Makefile | 14 ++++++++++++++ hack/jenkins/test-image/Makefile | 14 ++++++++++++++ test/images/dnsutils/Makefile | 14 ++++++++++++++ test/images/entrypoint-tester/Makefile | 14 ++++++++++++++ test/images/fakegitserver/Makefile | 14 ++++++++++++++ test/images/goproxy/Makefile | 14 ++++++++++++++ test/images/hostexec/Makefile | 14 ++++++++++++++ test/images/jessie-dnsutils/Makefile | 14 ++++++++++++++ test/images/mount-tester-user/Makefile | 14 ++++++++++++++ test/images/mount-tester/Makefile | 14 ++++++++++++++ test/images/n-way-http/Makefile | 14 ++++++++++++++ test/images/netexec/Makefile | 14 ++++++++++++++ test/images/network-tester/Makefile | 14 ++++++++++++++ test/images/port-forward-tester/Makefile | 14 ++++++++++++++ test/images/porter/Makefile | 14 ++++++++++++++ test/images/resource-consumer/Makefile | 14 ++++++++++++++ test/images/volumes-tester/ceph/Makefile | 14 ++++++++++++++ test/images/volumes-tester/gluster/Makefile | 14 ++++++++++++++ test/images/volumes-tester/iscsi/Makefile | 14 ++++++++++++++ test/images/volumes-tester/nfs/Makefile | 14 ++++++++++++++ test/images/volumes-tester/rbd/Makefile | 14 ++++++++++++++ test/scalability/counter/Makefile | 14 ++++++++++++++ test/soak/cauldron/Makefile | 14 ++++++++++++++ test/soak/serve_hostnames/Makefile | 14 ++++++++++++++ 51 files changed, 712 insertions(+) create mode 100644 hack/boilerplate/boilerplate.Makefile.txt diff --git a/Makefile b/Makefile index 361dc157155..e1ec649eb07 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + # Old-skool build tools. # # Targets (see each target for more information): diff --git a/build/debian-iptables/Makefile b/build/debian-iptables/Makefile index 3658b0c4bc2..9f50b8776b7 100644 --- a/build/debian-iptables/Makefile +++ b/build/debian-iptables/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + .PHONY: build push IMAGE = debian-iptables diff --git a/build/pause/Makefile b/build/pause/Makefile index df2363d1b1d..c788dcd8c9f 100644 --- a/build/pause/Makefile +++ b/build/pause/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + .PHONY: build push TAG = 2.0 diff --git a/cluster/addons/dns/kube2sky/Makefile b/cluster/addons/dns/kube2sky/Makefile index 3e6f3d97f49..7169d4fea66 100644 --- a/cluster/addons/dns/kube2sky/Makefile +++ b/cluster/addons/dns/kube2sky/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + # Makefile for the Docker image gcr.io/google_containers/kube2sky # MAINTAINER: Tim Hockin # If you update this image please bump the tag value before pushing. diff --git a/cluster/addons/dns/skydns/Makefile b/cluster/addons/dns/skydns/Makefile index 6e7cb882b4d..16a6563d2e4 100644 --- a/cluster/addons/dns/skydns/Makefile +++ b/cluster/addons/dns/skydns/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + all: skydns skydns: diff --git a/cluster/addons/fluentd-elasticsearch/es-image/Makefile b/cluster/addons/fluentd-elasticsearch/es-image/Makefile index fc10b328acb..2545483e5db 100755 --- a/cluster/addons/fluentd-elasticsearch/es-image/Makefile +++ b/cluster/addons/fluentd-elasticsearch/es-image/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + .PHONY: elasticsearch_logging_discovery build push # The current value of the tag to be used for building and diff --git a/cluster/addons/fluentd-elasticsearch/fluentd-es-image/Makefile b/cluster/addons/fluentd-elasticsearch/fluentd-es-image/Makefile index f20c9c99e2c..4dc3d137acb 100644 --- a/cluster/addons/fluentd-elasticsearch/fluentd-es-image/Makefile +++ b/cluster/addons/fluentd-elasticsearch/fluentd-es-image/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + .PHONY: build push IMAGE = fluentd-elasticsearch diff --git a/cluster/addons/fluentd-elasticsearch/kibana-image/Makefile b/cluster/addons/fluentd-elasticsearch/kibana-image/Makefile index 7e26ce6d241..55bcfe5fc44 100755 --- a/cluster/addons/fluentd-elasticsearch/kibana-image/Makefile +++ b/cluster/addons/fluentd-elasticsearch/kibana-image/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + .PHONY: build push TAG = 1.3 diff --git a/cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile b/cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile index e7a506f3aa6..efbe6a8aa92 100644 --- a/cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile +++ b/cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + # The build rule builds a Docker image that logs all Docker contains logs to # Google Compute Platform using the Cloud Logging API. The push rule pushes # the image to DockerHub. diff --git a/cluster/addons/registry/images/Makefile b/cluster/addons/registry/images/Makefile index bb776b656aa..a81c29e8d07 100644 --- a/cluster/addons/registry/images/Makefile +++ b/cluster/addons/registry/images/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + .PHONY: build push vet test clean TAG = 0.3 diff --git a/cluster/images/etcd/Makefile b/cluster/images/etcd/Makefile index 35d78944363..c301a97df99 100644 --- a/cluster/images/etcd/Makefile +++ b/cluster/images/etcd/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + # Build the etcd image # # Usage: diff --git a/cluster/images/hyperkube/Makefile b/cluster/images/hyperkube/Makefile index 43488d23f0a..7a48458d8fd 100644 --- a/cluster/images/hyperkube/Makefile +++ b/cluster/images/hyperkube/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + # Build the hyperkube image. # # Usage: diff --git a/cluster/images/kubelet/Makefile b/cluster/images/kubelet/Makefile index 2a936c1f11f..af71cac47a8 100644 --- a/cluster/images/kubelet/Makefile +++ b/cluster/images/kubelet/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + # build the kubelet image. # TODO: figure out the best base image diff --git a/cluster/images/kubemark/Makefile b/cluster/images/kubemark/Makefile index 12c01c51881..26246e83029 100644 --- a/cluster/images/kubemark/Makefile +++ b/cluster/images/kubemark/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + # build Kubemark image from currently built binaries containing both 'real' master and Hollow Node. # This makefile assumes that the kubemark binary is present in this directory. diff --git a/cluster/images/nginx/Makefile b/cluster/images/nginx/Makefile index ba787803071..f49694695d3 100644 --- a/cluster/images/nginx/Makefile +++ b/cluster/images/nginx/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + ### Nginx image # This image is used to run nginx on the master. diff --git a/cluster/juju/charms/trusty/kubernetes-master/Makefile b/cluster/juju/charms/trusty/kubernetes-master/Makefile index 34164d8c13e..50c46d395c8 100644 --- a/cluster/juju/charms/trusty/kubernetes-master/Makefile +++ b/cluster/juju/charms/trusty/kubernetes-master/Makefile @@ -1,3 +1,16 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. build: virtualenv lint test diff --git a/cluster/juju/charms/trusty/kubernetes/Makefile b/cluster/juju/charms/trusty/kubernetes/Makefile index c0de131d983..4cb969f3f43 100644 --- a/cluster/juju/charms/trusty/kubernetes/Makefile +++ b/cluster/juju/charms/trusty/kubernetes/Makefile @@ -1,3 +1,16 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. build: virtualenv lint test diff --git a/docs/design/clustering/Makefile b/docs/design/clustering/Makefile index f6aa53ed442..b1743cf49be 100644 --- a/docs/design/clustering/Makefile +++ b/docs/design/clustering/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FONT := DroidSansMono.ttf PNGS := $(patsubst %.seqdiag,%.png,$(wildcard *.seqdiag)) diff --git a/docs/user-guide/liveness/image/Makefile b/docs/user-guide/liveness/image/Makefile index 3eb9f0e2fe1..f29214f3501 100644 --- a/docs/user-guide/liveness/image/Makefile +++ b/docs/user-guide/liveness/image/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + all: push server: server.go diff --git a/docs/user-guide/logging-demo/Makefile b/docs/user-guide/logging-demo/Makefile index e4af040081a..0df0a18d2e3 100644 --- a/docs/user-guide/logging-demo/Makefile +++ b/docs/user-guide/logging-demo/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + # Makefile for launching synthetic logging sources (any platform) # and for reporting the forwarding rules for the # Elasticsearch and Kibana pods for the GCE platform. diff --git a/examples/cassandra/image/Makefile b/examples/cassandra/image/Makefile index 79497b69598..df761ef387f 100644 --- a/examples/cassandra/image/Makefile +++ b/examples/cassandra/image/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + # build the cassandra image. VERSION=v7 diff --git a/examples/cluster-dns/images/backend/Makefile b/examples/cluster-dns/images/backend/Makefile index 1b5ae02503f..91d8c3dd070 100644 --- a/examples/cluster-dns/images/backend/Makefile +++ b/examples/cluster-dns/images/backend/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + TAG = v1 PREFIX = gcr.io/google_containers IMAGE = example-dns-backend diff --git a/examples/cluster-dns/images/frontend/Makefile b/examples/cluster-dns/images/frontend/Makefile index a987ff7b67f..a198c6da6a9 100644 --- a/examples/cluster-dns/images/frontend/Makefile +++ b/examples/cluster-dns/images/frontend/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + TAG = v1 PREFIX = gcr.io/google_containers IMAGE = example-dns-frontend diff --git a/examples/explorer/Makefile b/examples/explorer/Makefile index ccbd90d75bb..b7dda571292 100644 --- a/examples/explorer/Makefile +++ b/examples/explorer/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + all: push # Keep this one version ahead, so no one accidentally blows away the latest published version. diff --git a/examples/https-nginx/Makefile b/examples/https-nginx/Makefile index a45d4c8c0ae..be53807d19f 100644 --- a/examples/https-nginx/Makefile +++ b/examples/https-nginx/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + all: TAG = 1.0 diff --git a/examples/kubectl-container/Makefile b/examples/kubectl-container/Makefile index 8622f1140f8..3683432680a 100644 --- a/examples/kubectl-container/Makefile +++ b/examples/kubectl-container/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + # Use: # # `make kubectl` will build kubectl. diff --git a/hack/boilerplate/boilerplate.Makefile.txt b/hack/boilerplate/boilerplate.Makefile.txt new file mode 100644 index 00000000000..6ce3fbd4645 --- /dev/null +++ b/hack/boilerplate/boilerplate.Makefile.txt @@ -0,0 +1,14 @@ +# Copyright YEAR The Kubernetes Authors All rights reserved. +# +# 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. + diff --git a/hack/jenkins/job-builder-image/Makefile b/hack/jenkins/job-builder-image/Makefile index d0c0ba1c736..dde94ebfa83 100644 --- a/hack/jenkins/job-builder-image/Makefile +++ b/hack/jenkins/job-builder-image/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + TAG = 1 all: diff --git a/hack/jenkins/test-image/Makefile b/hack/jenkins/test-image/Makefile index d805d5e5665..4cea80684a1 100644 --- a/hack/jenkins/test-image/Makefile +++ b/hack/jenkins/test-image/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + all: push TAG = 0.7 diff --git a/test/images/dnsutils/Makefile b/test/images/dnsutils/Makefile index a7bcc92b753..3224dc3aa0f 100644 --- a/test/images/dnsutils/Makefile +++ b/test/images/dnsutils/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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 image does not tag #TAG = PREFIX = gcr.io/google_containers diff --git a/test/images/entrypoint-tester/Makefile b/test/images/entrypoint-tester/Makefile index c230b89e4a3..31c703378ef 100644 --- a/test/images/entrypoint-tester/Makefile +++ b/test/images/entrypoint-tester/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + TAG = 0.1 PREFIX = kubernetes diff --git a/test/images/fakegitserver/Makefile b/test/images/fakegitserver/Makefile index c89287a8e2f..514d1aa05fd 100644 --- a/test/images/fakegitserver/Makefile +++ b/test/images/fakegitserver/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + .PHONY: all image push clean TAG = 0.1 diff --git a/test/images/goproxy/Makefile b/test/images/goproxy/Makefile index 9802be8f3ff..314ce073878 100644 --- a/test/images/goproxy/Makefile +++ b/test/images/goproxy/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + TAG = 0.1 PREFIX = gcr.io/google_containers diff --git a/test/images/hostexec/Makefile b/test/images/hostexec/Makefile index 0d196043115..6fd8a9da7dd 100644 --- a/test/images/hostexec/Makefile +++ b/test/images/hostexec/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + .PHONY: all image push clean TAG = 1.2 diff --git a/test/images/jessie-dnsutils/Makefile b/test/images/jessie-dnsutils/Makefile index 406b2c821e1..fc6fabeef8c 100644 --- a/test/images/jessie-dnsutils/Makefile +++ b/test/images/jessie-dnsutils/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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 image does not tag #TAG = PREFIX = gcr.io/google_containers diff --git a/test/images/mount-tester-user/Makefile b/test/images/mount-tester-user/Makefile index 72c58311a38..ce80af9167a 100644 --- a/test/images/mount-tester-user/Makefile +++ b/test/images/mount-tester-user/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + TAG = 0.4 PREFIX = gcr.io/google_containers diff --git a/test/images/mount-tester/Makefile b/test/images/mount-tester/Makefile index d6c6185405e..b281e244411 100644 --- a/test/images/mount-tester/Makefile +++ b/test/images/mount-tester/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + TAG = 0.6 PREFIX = gcr.io/google_containers diff --git a/test/images/n-way-http/Makefile b/test/images/n-way-http/Makefile index 864c66d01da..8a1e27450d0 100644 --- a/test/images/n-way-http/Makefile +++ b/test/images/n-way-http/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + all: push # 0.0 shouldn't clobber any released builds diff --git a/test/images/netexec/Makefile b/test/images/netexec/Makefile index 605375dc63a..3838e1d132c 100644 --- a/test/images/netexec/Makefile +++ b/test/images/netexec/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + .PHONY: all netexec image push clean TAG = 1.3.1 diff --git a/test/images/network-tester/Makefile b/test/images/network-tester/Makefile index 9e8e56fed1f..6392da48f67 100644 --- a/test/images/network-tester/Makefile +++ b/test/images/network-tester/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + TAG = 1.6 PREFIX = gcr.io/google_containers diff --git a/test/images/port-forward-tester/Makefile b/test/images/port-forward-tester/Makefile index 0e0aaf1d329..8e29d6a30c5 100644 --- a/test/images/port-forward-tester/Makefile +++ b/test/images/port-forward-tester/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + TAG = 1.0 PREFIX = gcr.io/google_containers diff --git a/test/images/porter/Makefile b/test/images/porter/Makefile index 54ac6f8aacc..3b758429e45 100644 --- a/test/images/porter/Makefile +++ b/test/images/porter/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + # Use: # # `make porter` will build porter. diff --git a/test/images/resource-consumer/Makefile b/test/images/resource-consumer/Makefile index 7b10e1e17a2..7a4a0b496a2 100644 --- a/test/images/resource-consumer/Makefile +++ b/test/images/resource-consumer/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + TAG = beta2 PREFIX = gcr.io/google_containers diff --git a/test/images/volumes-tester/ceph/Makefile b/test/images/volumes-tester/ceph/Makefile index 52233381ec4..74b94ef43ab 100644 --- a/test/images/volumes-tester/ceph/Makefile +++ b/test/images/volumes-tester/ceph/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + TAG = 0.1 PREFIX = gcr.io/google_containers diff --git a/test/images/volumes-tester/gluster/Makefile b/test/images/volumes-tester/gluster/Makefile index def3c729ef6..0a7e1b32980 100644 --- a/test/images/volumes-tester/gluster/Makefile +++ b/test/images/volumes-tester/gluster/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + TAG = 0.2 PREFIX = gcr.io/google_containers diff --git a/test/images/volumes-tester/iscsi/Makefile b/test/images/volumes-tester/iscsi/Makefile index 473904c3181..b912dba85fc 100644 --- a/test/images/volumes-tester/iscsi/Makefile +++ b/test/images/volumes-tester/iscsi/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + TAG = 0.1 PREFIX = gcr.io/google_containers diff --git a/test/images/volumes-tester/nfs/Makefile b/test/images/volumes-tester/nfs/Makefile index de9fbb2b835..ecb76e1aef6 100644 --- a/test/images/volumes-tester/nfs/Makefile +++ b/test/images/volumes-tester/nfs/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + TAG = 0.4 PREFIX = gcr.io/google_containers diff --git a/test/images/volumes-tester/rbd/Makefile b/test/images/volumes-tester/rbd/Makefile index 62f08b363ff..cf4b87b5491 100644 --- a/test/images/volumes-tester/rbd/Makefile +++ b/test/images/volumes-tester/rbd/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + TAG = 0.1 PREFIX = gcr.io/google_containers diff --git a/test/scalability/counter/Makefile b/test/scalability/counter/Makefile index c056db8c007..8219ea5379c 100644 --- a/test/scalability/counter/Makefile +++ b/test/scalability/counter/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + counter: kubectl create --validate -f counter-rc.yaml diff --git a/test/soak/cauldron/Makefile b/test/soak/cauldron/Makefile index 626fb298797..800327231c8 100644 --- a/test/soak/cauldron/Makefile +++ b/test/soak/cauldron/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + .PHONY: cauldron TAG = 1.0 diff --git a/test/soak/serve_hostnames/Makefile b/test/soak/serve_hostnames/Makefile index 9458e3d0982..af3c16cba1c 100644 --- a/test/soak/serve_hostnames/Makefile +++ b/test/soak/serve_hostnames/Makefile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + all: go build serve_hostnames.go From b672785d720aa69adcfe3169984d687a9873d27e Mon Sep 17 00:00:00 2001 From: Paul Morie Date: Wed, 3 Feb 2016 02:11:37 -0500 Subject: [PATCH 131/328] Add boilerplate checks for Dockerfiles --- build/build-image/Dockerfile | 2 +- build/build-image/cross/Dockerfile | 2 +- build/debian-iptables/Dockerfile | 14 ++++++++++++++ build/pause/Dockerfile | 14 ++++++++++++++ cluster/addons/dns/kube2sky/Dockerfile | 14 ++++++++++++++ cluster/addons/dns/skydns/Dockerfile | 14 ++++++++++++++ .../fluentd-elasticsearch/es-image/Dockerfile | 14 ++++++++++++++ .../fluentd-es-image/Dockerfile | 14 ++++++++++++++ .../fluentd-elasticsearch/kibana-image/Dockerfile | 14 ++++++++++++++ .../fluentd-gcp/fluentd-gcp-image/Dockerfile | 14 ++++++++++++++ cluster/addons/python-image/Dockerfile | 14 ++++++++++++++ cluster/addons/registry/images/Dockerfile | 14 ++++++++++++++ cluster/images/etcd/Dockerfile | 14 ++++++++++++++ cluster/images/hyperkube/Dockerfile | 14 ++++++++++++++ cluster/images/kubelet/Dockerfile | 14 ++++++++++++++ cluster/images/kubemark/Dockerfile | 14 ++++++++++++++ cluster/images/nginx/Dockerfile | 14 ++++++++++++++ cluster/mesos/docker/km/Dockerfile | 14 ++++++++++++++ cluster/mesos/docker/socat/Dockerfile | 14 ++++++++++++++ cluster/mesos/docker/test/Dockerfile | 14 ++++++++++++++ docs/design/clustering/Dockerfile | 14 ++++++++++++++ .../containers/backend/Dockerfile | 14 ++++++++++++++ .../environment-guide/containers/show/Dockerfile | 14 ++++++++++++++ .../horizontal-pod-autoscaling/image/Dockerfile | 14 ++++++++++++++ docs/user-guide/liveness/image/Dockerfile | 14 ++++++++++++++ .../update-demo/images/kitten/Dockerfile | 2 +- .../update-demo/images/nautilus/Dockerfile | 2 +- examples/cassandra/image/Dockerfile | 14 ++++++++++++++ examples/celery-rabbitmq/celery-app-add/Dockerfile | 14 ++++++++++++++ examples/celery-rabbitmq/flower/Dockerfile | 14 ++++++++++++++ examples/cluster-dns/images/backend/Dockerfile | 14 ++++++++++++++ examples/cluster-dns/images/frontend/Dockerfile | 14 ++++++++++++++ examples/explorer/Dockerfile | 2 +- examples/guestbook-go/_src/Dockerfile | 14 ++++++++++++++ examples/guestbook-go/_src/guestbook/Dockerfile | 14 ++++++++++++++ examples/guestbook/php-redis/Dockerfile | 14 ++++++++++++++ examples/guestbook/redis-slave/Dockerfile | 14 ++++++++++++++ examples/hazelcast/image/Dockerfile | 14 ++++++++++++++ examples/https-nginx/Dockerfile | 2 +- examples/job/work-queue-1/Dockerfile | 14 ++++++++++++++ examples/job/work-queue-2/Dockerfile | 14 ++++++++++++++ examples/k8petstore/redis-master/Dockerfile | 14 ++++++++++++++ examples/k8petstore/redis-slave/Dockerfile | 14 ++++++++++++++ examples/k8petstore/redis/Dockerfile | 14 ++++++++++++++ examples/k8petstore/web-server/Dockerfile | 14 ++++++++++++++ examples/kubectl-container/Dockerfile | 2 +- examples/meteor/dockerbase/Dockerfile | 14 ++++++++++++++ examples/mysql-galera/image/Dockerfile | 14 ++++++++++++++ examples/nfs/nfs-data/Dockerfile | 14 ++++++++++++++ examples/phabricator/php-phabricator/Dockerfile | 14 ++++++++++++++ examples/redis/image/Dockerfile | 14 ++++++++++++++ examples/rethinkdb/image/Dockerfile | 14 ++++++++++++++ hack/boilerplate/boilerplate.Dockerfile.txt | 14 ++++++++++++++ hack/gen-swagger-doc/Dockerfile | 14 ++++++++++++++ hack/jenkins/job-builder-image/Dockerfile | 14 ++++++++++++++ test/images/dnsutils/Dockerfile | 14 ++++++++++++++ test/images/entrypoint-tester/Dockerfile | 2 +- test/images/goproxy/Dockerfile | 2 +- test/images/hostexec/Dockerfile | 2 +- test/images/jessie-dnsutils/Dockerfile | 14 ++++++++++++++ test/images/mount-tester-user/Dockerfile | 2 +- test/images/mount-tester/Dockerfile | 2 +- test/images/n-way-http/Dockerfile | 2 +- test/images/netexec/Dockerfile | 14 ++++++++++++++ test/images/network-tester/Dockerfile | 2 +- test/images/porter/Dockerfile | 2 +- test/images/resource-consumer/Dockerfile | 14 ++++++++++++++ test/images/volumes-tester/ceph/Dockerfile | 14 ++++++++++++++ test/images/volumes-tester/gluster/Dockerfile | 2 +- test/images/volumes-tester/iscsi/Dockerfile | 2 +- test/images/volumes-tester/nfs/Dockerfile | 2 +- test/images/volumes-tester/rbd/Dockerfile | 2 +- test/soak/cauldron/Dockerfile | 14 ++++++++++++++ 73 files changed, 775 insertions(+), 19 deletions(-) create mode 100644 hack/boilerplate/boilerplate.Dockerfile.txt diff --git a/build/build-image/Dockerfile b/build/build-image/Dockerfile index 29a8e2d9ccf..b02af4e19ef 100644 --- a/build/build-image/Dockerfile +++ b/build/build-image/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2014 Google Inc. All rights reserved. +# Copyright 2016 The Kubernetes Authors All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/build-image/cross/Dockerfile b/build/build-image/cross/Dockerfile index 19368e695bd..e15111732b5 100644 --- a/build/build-image/cross/Dockerfile +++ b/build/build-image/cross/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2014 Google Inc. All rights reserved. +# Copyright 2016 The Kubernetes Authors All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/debian-iptables/Dockerfile b/build/debian-iptables/Dockerfile index 9b2048abc19..36cba66ec05 100644 --- a/build/debian-iptables/Dockerfile +++ b/build/debian-iptables/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM debian:jessie # All apt-get's must be in one run command or the diff --git a/build/pause/Dockerfile b/build/pause/Dockerfile index 7463c3e9f5a..30858ee78c8 100644 --- a/build/pause/Dockerfile +++ b/build/pause/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM scratch ADD pause / ENTRYPOINT ["/pause"] diff --git a/cluster/addons/dns/kube2sky/Dockerfile b/cluster/addons/dns/kube2sky/Dockerfile index eb1a3b83ebe..bd6dc55b722 100644 --- a/cluster/addons/dns/kube2sky/Dockerfile +++ b/cluster/addons/dns/kube2sky/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM busybox MAINTAINER Tim Hockin ADD kube2sky kube2sky diff --git a/cluster/addons/dns/skydns/Dockerfile b/cluster/addons/dns/skydns/Dockerfile index 7e0c5b92bc3..b1f045e2891 100644 --- a/cluster/addons/dns/skydns/Dockerfile +++ b/cluster/addons/dns/skydns/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM busybox MAINTAINER Tim Hockin ADD skydns skydns diff --git a/cluster/addons/fluentd-elasticsearch/es-image/Dockerfile b/cluster/addons/fluentd-elasticsearch/es-image/Dockerfile index 1e0c826a229..c7a7c88ddda 100644 --- a/cluster/addons/fluentd-elasticsearch/es-image/Dockerfile +++ b/cluster/addons/fluentd-elasticsearch/es-image/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + # A Dockerfile for creating an Elasticsearch instance that is designed # to work with Kubernetes logging. Inspired by the Dockerfile # dockerfile/elasticsearch diff --git a/cluster/addons/fluentd-elasticsearch/fluentd-es-image/Dockerfile b/cluster/addons/fluentd-elasticsearch/fluentd-es-image/Dockerfile index aac23b526cb..cf91f95d6c4 100644 --- a/cluster/addons/fluentd-elasticsearch/fluentd-es-image/Dockerfile +++ b/cluster/addons/fluentd-elasticsearch/fluentd-es-image/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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 Dockerfile will build an image that is configured # to run Fluentd with an Elasticsearch plug-in and the # provided configuration file. diff --git a/cluster/addons/fluentd-elasticsearch/kibana-image/Dockerfile b/cluster/addons/fluentd-elasticsearch/kibana-image/Dockerfile index 9299b48b7af..50d0a2c4db8 100644 --- a/cluster/addons/fluentd-elasticsearch/kibana-image/Dockerfile +++ b/cluster/addons/fluentd-elasticsearch/kibana-image/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + # A Dockerfile for creating a Kibana container that is designed # to work with Kubernetes logging. diff --git a/cluster/addons/fluentd-gcp/fluentd-gcp-image/Dockerfile b/cluster/addons/fluentd-gcp/fluentd-gcp-image/Dockerfile index ef9c58e2467..39a4263e1cf 100644 --- a/cluster/addons/fluentd-gcp/fluentd-gcp-image/Dockerfile +++ b/cluster/addons/fluentd-gcp/fluentd-gcp-image/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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 Dockerfile will build an image that is configured # to use Fluentd to collect all Docker container log files # and then cause them to be ingested using the Google Cloud diff --git a/cluster/addons/python-image/Dockerfile b/cluster/addons/python-image/Dockerfile index 67accb37e5d..6a93e589de6 100644 --- a/cluster/addons/python-image/Dockerfile +++ b/cluster/addons/python-image/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM python:2.7-slim RUN pip install pyyaml diff --git a/cluster/addons/registry/images/Dockerfile b/cluster/addons/registry/images/Dockerfile index f296449bad1..176b2baf678 100644 --- a/cluster/addons/registry/images/Dockerfile +++ b/cluster/addons/registry/images/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM haproxy:1.5 MAINTAINER Muhammed Uluyol diff --git a/cluster/images/etcd/Dockerfile b/cluster/images/etcd/Dockerfile index 28b4092abd7..480fc35b692 100644 --- a/cluster/images/etcd/Dockerfile +++ b/cluster/images/etcd/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM BASEIMAGE MAINTAINER Dawn Chen diff --git a/cluster/images/hyperkube/Dockerfile b/cluster/images/hyperkube/Dockerfile index 2ff58cd987a..7ed1e14f1ed 100644 --- a/cluster/images/hyperkube/Dockerfile +++ b/cluster/images/hyperkube/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM BASEIMAGE RUN DEBIAN_FRONTEND=noninteractive apt-get update -y \ diff --git a/cluster/images/kubelet/Dockerfile b/cluster/images/kubelet/Dockerfile index 423a7bae652..dbcbb3991da 100644 --- a/cluster/images/kubelet/Dockerfile +++ b/cluster/images/kubelet/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM centos ADD kubelet /kubelet RUN chmod a+rx /kubelet diff --git a/cluster/images/kubemark/Dockerfile b/cluster/images/kubemark/Dockerfile index 36fcf4f611a..653f1290049 100644 --- a/cluster/images/kubemark/Dockerfile +++ b/cluster/images/kubemark/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM debian:jessie COPY kubemark.sh /kubemark.sh diff --git a/cluster/images/nginx/Dockerfile b/cluster/images/nginx/Dockerfile index 63271bd131a..145c7c1c7ae 100644 --- a/cluster/images/nginx/Dockerfile +++ b/cluster/images/nginx/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM google/debian:wheezy COPY backports.list /etc/apt/sources.list.d/backports.list diff --git a/cluster/mesos/docker/km/Dockerfile b/cluster/mesos/docker/km/Dockerfile index af475408d5e..af0f2f2273a 100644 --- a/cluster/mesos/docker/km/Dockerfile +++ b/cluster/mesos/docker/km/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM ubuntu:14.04.3 MAINTAINER Mesosphere diff --git a/cluster/mesos/docker/socat/Dockerfile b/cluster/mesos/docker/socat/Dockerfile index e0f302b3108..4ef2fc02750 100644 --- a/cluster/mesos/docker/socat/Dockerfile +++ b/cluster/mesos/docker/socat/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM ubuntu:14.04.3 MAINTAINER Mesosphere diff --git a/cluster/mesos/docker/test/Dockerfile b/cluster/mesos/docker/test/Dockerfile index 575757c4cca..b0f65488ee8 100644 --- a/cluster/mesos/docker/test/Dockerfile +++ b/cluster/mesos/docker/test/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM golang:1.4.3 MAINTAINER Mesosphere diff --git a/docs/design/clustering/Dockerfile b/docs/design/clustering/Dockerfile index 3353419d843..60d258c4525 100644 --- a/docs/design/clustering/Dockerfile +++ b/docs/design/clustering/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM debian:jessie RUN apt-get update diff --git a/docs/user-guide/environment-guide/containers/backend/Dockerfile b/docs/user-guide/environment-guide/containers/backend/Dockerfile index 3fa58ff7abe..a0fe23c3897 100644 --- a/docs/user-guide/environment-guide/containers/backend/Dockerfile +++ b/docs/user-guide/environment-guide/containers/backend/Dockerfile @@ -1,2 +1,16 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM golang:onbuild EXPOSE 8080 diff --git a/docs/user-guide/environment-guide/containers/show/Dockerfile b/docs/user-guide/environment-guide/containers/show/Dockerfile index 3fa58ff7abe..a0fe23c3897 100644 --- a/docs/user-guide/environment-guide/containers/show/Dockerfile +++ b/docs/user-guide/environment-guide/containers/show/Dockerfile @@ -1,2 +1,16 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM golang:onbuild EXPOSE 8080 diff --git a/docs/user-guide/horizontal-pod-autoscaling/image/Dockerfile b/docs/user-guide/horizontal-pod-autoscaling/image/Dockerfile index 56f2d6252eb..1a93ea2ddc5 100644 --- a/docs/user-guide/horizontal-pod-autoscaling/image/Dockerfile +++ b/docs/user-guide/horizontal-pod-autoscaling/image/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM php:5-apache ADD index.php /var/www/html/index.php diff --git a/docs/user-guide/liveness/image/Dockerfile b/docs/user-guide/liveness/image/Dockerfile index d057ecd309e..2c5481c63ee 100644 --- a/docs/user-guide/liveness/image/Dockerfile +++ b/docs/user-guide/liveness/image/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM scratch ADD server /server diff --git a/docs/user-guide/update-demo/images/kitten/Dockerfile b/docs/user-guide/update-demo/images/kitten/Dockerfile index b053138b352..aef0de58c6b 100644 --- a/docs/user-guide/update-demo/images/kitten/Dockerfile +++ b/docs/user-guide/update-demo/images/kitten/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2014 Google Inc. All rights reserved. +# Copyright 2016 The Kubernetes Authors All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/docs/user-guide/update-demo/images/nautilus/Dockerfile b/docs/user-guide/update-demo/images/nautilus/Dockerfile index 2904a107916..16280b82159 100644 --- a/docs/user-guide/update-demo/images/nautilus/Dockerfile +++ b/docs/user-guide/update-demo/images/nautilus/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2014 Google Inc. All rights reserved. +# Copyright 2016 The Kubernetes Authors All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/cassandra/image/Dockerfile b/examples/cassandra/image/Dockerfile index 2ebd62fa5ab..d40c53ba085 100644 --- a/examples/cassandra/image/Dockerfile +++ b/examples/cassandra/image/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM google/debian:wheezy COPY cassandra.list /etc/apt/sources.list.d/cassandra.list diff --git a/examples/celery-rabbitmq/celery-app-add/Dockerfile b/examples/celery-rabbitmq/celery-app-add/Dockerfile index f507e0df647..13a6437a811 100644 --- a/examples/celery-rabbitmq/celery-app-add/Dockerfile +++ b/examples/celery-rabbitmq/celery-app-add/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM library/celery ADD celery_conf.py /data/celery_conf.py diff --git a/examples/celery-rabbitmq/flower/Dockerfile b/examples/celery-rabbitmq/flower/Dockerfile index 387ce3b98fd..cf70be419dd 100644 --- a/examples/celery-rabbitmq/flower/Dockerfile +++ b/examples/celery-rabbitmq/flower/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM ubuntu:trusty # update the package repository and install python pip diff --git a/examples/cluster-dns/images/backend/Dockerfile b/examples/cluster-dns/images/backend/Dockerfile index d45858468e9..dd1597001fa 100644 --- a/examples/cluster-dns/images/backend/Dockerfile +++ b/examples/cluster-dns/images/backend/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM python:2.7-slim COPY . /dns-backend diff --git a/examples/cluster-dns/images/frontend/Dockerfile b/examples/cluster-dns/images/frontend/Dockerfile index a2662881394..ba5bc065168 100644 --- a/examples/cluster-dns/images/frontend/Dockerfile +++ b/examples/cluster-dns/images/frontend/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM python:2.7-slim RUN pip install requests diff --git a/examples/explorer/Dockerfile b/examples/explorer/Dockerfile index e6545402f20..8bf0ec065c7 100644 --- a/examples/explorer/Dockerfile +++ b/examples/explorer/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2015 The Kubernetes Authors. All rights reserved. +# Copyright 2016 The Kubernetes Authors All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/guestbook-go/_src/Dockerfile b/examples/guestbook-go/_src/Dockerfile index 65416f211d6..adbe6c2237e 100644 --- a/examples/guestbook-go/_src/Dockerfile +++ b/examples/guestbook-go/_src/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM google/golang:latest ADD . /gopath/src/github.com/GoogleCloudPlatform/kubernetes/examples/guestbook-go/_src diff --git a/examples/guestbook-go/_src/guestbook/Dockerfile b/examples/guestbook-go/_src/guestbook/Dockerfile index 9ac96c7db29..5012dbb5634 100644 --- a/examples/guestbook-go/_src/guestbook/Dockerfile +++ b/examples/guestbook-go/_src/guestbook/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM busybox:ubuntu-14.04 ADD ./bin/guestbook /app/guestbook diff --git a/examples/guestbook/php-redis/Dockerfile b/examples/guestbook/php-redis/Dockerfile index 093cd7cbdc0..b7f699c5828 100644 --- a/examples/guestbook/php-redis/Dockerfile +++ b/examples/guestbook/php-redis/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM php:5-apache RUN apt-get update diff --git a/examples/guestbook/redis-slave/Dockerfile b/examples/guestbook/redis-slave/Dockerfile index 8167438bbea..1d097b57ac2 100644 --- a/examples/guestbook/redis-slave/Dockerfile +++ b/examples/guestbook/redis-slave/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM redis ADD run.sh /run.sh diff --git a/examples/hazelcast/image/Dockerfile b/examples/hazelcast/image/Dockerfile index bbb094a1310..3a26f29e693 100644 --- a/examples/hazelcast/image/Dockerfile +++ b/examples/hazelcast/image/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM quay.io/pires/docker-jre:8u45-2 MAINTAINER Paulo Pires diff --git a/examples/https-nginx/Dockerfile b/examples/https-nginx/Dockerfile index 2df7579c844..cf61b7c989d 100644 --- a/examples/https-nginx/Dockerfile +++ b/examples/https-nginx/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2015 The Kubernetes Authors. All rights reserved. +# Copyright 2016 The Kubernetes Authors All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/job/work-queue-1/Dockerfile b/examples/job/work-queue-1/Dockerfile index cbd36bb6203..aea1ee70ffc 100644 --- a/examples/job/work-queue-1/Dockerfile +++ b/examples/job/work-queue-1/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + # Specify BROKER_URL and QUEUE when running FROM ubuntu:14.04 diff --git a/examples/job/work-queue-2/Dockerfile b/examples/job/work-queue-2/Dockerfile index 2de23b3c983..5246f0735e9 100644 --- a/examples/job/work-queue-2/Dockerfile +++ b/examples/job/work-queue-2/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM python RUN pip install redis COPY ./worker.py /worker.py diff --git a/examples/k8petstore/redis-master/Dockerfile b/examples/k8petstore/redis-master/Dockerfile index d0bfc7bb075..9467d5a3ddd 100644 --- a/examples/k8petstore/redis-master/Dockerfile +++ b/examples/k8petstore/redis-master/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + # # Redis Dockerfile # diff --git a/examples/k8petstore/redis-slave/Dockerfile b/examples/k8petstore/redis-slave/Dockerfile index 764fea7ff67..f35885e9d19 100644 --- a/examples/k8petstore/redis-slave/Dockerfile +++ b/examples/k8petstore/redis-slave/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + # # Redis Dockerfile # diff --git a/examples/k8petstore/redis/Dockerfile b/examples/k8petstore/redis/Dockerfile index af1a8a46463..4261913d810 100644 --- a/examples/k8petstore/redis/Dockerfile +++ b/examples/k8petstore/redis/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + # # Redis Dockerfile # diff --git a/examples/k8petstore/web-server/Dockerfile b/examples/k8petstore/web-server/Dockerfile index d951a88f868..c85b58dd98c 100644 --- a/examples/k8petstore/web-server/Dockerfile +++ b/examples/k8petstore/web-server/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM golang:latest # Add source to gopath. This is defacto required for go apps. diff --git a/examples/kubectl-container/Dockerfile b/examples/kubectl-container/Dockerfile index d27d3573644..d4ab65f6c4c 100644 --- a/examples/kubectl-container/Dockerfile +++ b/examples/kubectl-container/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2014 Google Inc. All rights reserved. +# Copyright 2016 The Kubernetes Authors All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/meteor/dockerbase/Dockerfile b/examples/meteor/dockerbase/Dockerfile index 8ce633c634b..53d5bbfa972 100644 --- a/examples/meteor/dockerbase/Dockerfile +++ b/examples/meteor/dockerbase/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM node:0.10 MAINTAINER Christiaan Hees diff --git a/examples/mysql-galera/image/Dockerfile b/examples/mysql-galera/image/Dockerfile index 8359a53b088..ed7d45683c3 100644 --- a/examples/mysql-galera/image/Dockerfile +++ b/examples/mysql-galera/image/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM ubuntu:trusty # add our user and group first to make sure their IDs get assigned diff --git a/examples/nfs/nfs-data/Dockerfile b/examples/nfs/nfs-data/Dockerfile index 33fd131a5c7..77735a1ed1a 100644 --- a/examples/nfs/nfs-data/Dockerfile +++ b/examples/nfs/nfs-data/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM jsafrane/nfsexporter MAINTAINER Jan Safranek ADD index.html /mnt/data/index.html diff --git a/examples/phabricator/php-phabricator/Dockerfile b/examples/phabricator/php-phabricator/Dockerfile index 9bf1e0d3620..42eba6fdb7e 100644 --- a/examples/phabricator/php-phabricator/Dockerfile +++ b/examples/phabricator/php-phabricator/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM ubuntu:14.04 # Install all the required packages. diff --git a/examples/redis/image/Dockerfile b/examples/redis/image/Dockerfile index e4a1588a53a..612b93e5abb 100644 --- a/examples/redis/image/Dockerfile +++ b/examples/redis/image/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM redis:2.8 RUN apt-get update RUN apt-get install -yy -q python diff --git a/examples/rethinkdb/image/Dockerfile b/examples/rethinkdb/image/Dockerfile index 802181b9162..8c60c28a299 100644 --- a/examples/rethinkdb/image/Dockerfile +++ b/examples/rethinkdb/image/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM rethinkdb:1.16.0 MAINTAINER BinZhao diff --git a/hack/boilerplate/boilerplate.Dockerfile.txt b/hack/boilerplate/boilerplate.Dockerfile.txt new file mode 100644 index 00000000000..6ce3fbd4645 --- /dev/null +++ b/hack/boilerplate/boilerplate.Dockerfile.txt @@ -0,0 +1,14 @@ +# Copyright YEAR The Kubernetes Authors All rights reserved. +# +# 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. + diff --git a/hack/gen-swagger-doc/Dockerfile b/hack/gen-swagger-doc/Dockerfile index 9ad26afcc61..441bdacdc05 100644 --- a/hack/gen-swagger-doc/Dockerfile +++ b/hack/gen-swagger-doc/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM java:7-jre RUN apt-get update diff --git a/hack/jenkins/job-builder-image/Dockerfile b/hack/jenkins/job-builder-image/Dockerfile index 3e116dfe7e2..5f253a2db4f 100644 --- a/hack/jenkins/job-builder-image/Dockerfile +++ b/hack/jenkins/job-builder-image/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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 docker image runs Jenkins Job Builder (JJB) for automatic job reconciliation. FROM ubuntu:14.04 diff --git a/test/images/dnsutils/Dockerfile b/test/images/dnsutils/Dockerfile index e58cb0147c7..538bcb97acf 100644 --- a/test/images/dnsutils/Dockerfile +++ b/test/images/dnsutils/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM debian:wheezy MAINTAINER Tim Hockin "thockin@google.com" diff --git a/test/images/entrypoint-tester/Dockerfile b/test/images/entrypoint-tester/Dockerfile index 2547f38cd36..66c517d5b5a 100644 --- a/test/images/entrypoint-tester/Dockerfile +++ b/test/images/entrypoint-tester/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2015 Google Inc. All rights reserved. +# Copyright 2016 The Kubernetes Authors All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/goproxy/Dockerfile b/test/images/goproxy/Dockerfile index aaa18fa1185..f5a9540ae18 100644 --- a/test/images/goproxy/Dockerfile +++ b/test/images/goproxy/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2015 Google Inc. All rights reserved. +# Copyright 2016 The Kubernetes Authors All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/hostexec/Dockerfile b/test/images/hostexec/Dockerfile index a81d3e72557..daac6b00fc4 100644 --- a/test/images/hostexec/Dockerfile +++ b/test/images/hostexec/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2015 Google Inc. All rights reserved. +# Copyright 2016 The Kubernetes Authors All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/jessie-dnsutils/Dockerfile b/test/images/jessie-dnsutils/Dockerfile index b65fe62b8b4..d796330d8a6 100644 --- a/test/images/jessie-dnsutils/Dockerfile +++ b/test/images/jessie-dnsutils/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM debian:jessie MAINTAINER Abhishek Shah "abshah@google.com" diff --git a/test/images/mount-tester-user/Dockerfile b/test/images/mount-tester-user/Dockerfile index 205fac659da..36b8ddf23df 100644 --- a/test/images/mount-tester-user/Dockerfile +++ b/test/images/mount-tester-user/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2015 Google Inc. All rights reserved. +# Copyright 2016 The Kubernetes Authors All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/mount-tester/Dockerfile b/test/images/mount-tester/Dockerfile index e2485a12ef8..4ee867c826c 100644 --- a/test/images/mount-tester/Dockerfile +++ b/test/images/mount-tester/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2015 Google Inc. All rights reserved. +# Copyright 2016 The Kubernetes Authors All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/n-way-http/Dockerfile b/test/images/n-way-http/Dockerfile index 46c120ceca0..c14b05ee6e6 100644 --- a/test/images/n-way-http/Dockerfile +++ b/test/images/n-way-http/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2015 The Kubernetes Authors. All rights reserved. +# Copyright 2016 The Kubernetes Authors All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/netexec/Dockerfile b/test/images/netexec/Dockerfile index 9c57cac4150..4ea43d68fe9 100644 --- a/test/images/netexec/Dockerfile +++ b/test/images/netexec/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM busybox MAINTAINER Abhishek Shah "abshah@google.com" diff --git a/test/images/network-tester/Dockerfile b/test/images/network-tester/Dockerfile index 7955f5a463a..aeb5aece6c4 100644 --- a/test/images/network-tester/Dockerfile +++ b/test/images/network-tester/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2014 Google Inc. All rights reserved. +# Copyright 2016 The Kubernetes Authors All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/porter/Dockerfile b/test/images/porter/Dockerfile index 5a60ba566cd..2d62b452356 100644 --- a/test/images/porter/Dockerfile +++ b/test/images/porter/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2015 Google Inc. All rights reserved. +# Copyright 2016 The Kubernetes Authors All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/resource-consumer/Dockerfile b/test/images/resource-consumer/Dockerfile index b9d9d3bdfae..d3eca617d25 100644 --- a/test/images/resource-consumer/Dockerfile +++ b/test/images/resource-consumer/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM jess/stress MAINTAINER Ewa Socala ADD consumer /consumer diff --git a/test/images/volumes-tester/ceph/Dockerfile b/test/images/volumes-tester/ceph/Dockerfile index 5430e2c4262..a3e88faf4ca 100644 --- a/test/images/volumes-tester/ceph/Dockerfile +++ b/test/images/volumes-tester/ceph/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM centos:6 MAINTAINER Huamin Chen, hchen@redhat.com diff --git a/test/images/volumes-tester/gluster/Dockerfile b/test/images/volumes-tester/gluster/Dockerfile index fa3f0d332f5..9ecf8be0ffd 100644 --- a/test/images/volumes-tester/gluster/Dockerfile +++ b/test/images/volumes-tester/gluster/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2015 Google Inc. All rights reserved. +# Copyright 2016 The Kubernetes Authors All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/volumes-tester/iscsi/Dockerfile b/test/images/volumes-tester/iscsi/Dockerfile index 5505faf3aa0..4d8b91abab8 100644 --- a/test/images/volumes-tester/iscsi/Dockerfile +++ b/test/images/volumes-tester/iscsi/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2015 Google Inc. All rights reserved. +# Copyright 2016 The Kubernetes Authors All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/volumes-tester/nfs/Dockerfile b/test/images/volumes-tester/nfs/Dockerfile index 9117397265c..9e210f0272f 100644 --- a/test/images/volumes-tester/nfs/Dockerfile +++ b/test/images/volumes-tester/nfs/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2015 Google Inc. All rights reserved. +# Copyright 2016 The Kubernetes Authors All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/volumes-tester/rbd/Dockerfile b/test/images/volumes-tester/rbd/Dockerfile index 2a6498057da..ce6d1a6712d 100644 --- a/test/images/volumes-tester/rbd/Dockerfile +++ b/test/images/volumes-tester/rbd/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2015 Google Inc. All rights reserved. +# Copyright 2016 The Kubernetes Authors All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/soak/cauldron/Dockerfile b/test/soak/cauldron/Dockerfile index 1aed3e42a54..7625b13794d 100644 --- a/test/soak/cauldron/Dockerfile +++ b/test/soak/cauldron/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + FROM busybox MAINTAINER Satnam Singh ADD cauldron cauldron From c7beb9078c80f268e4a8a5f8118ecd25614a4ca7 Mon Sep 17 00:00:00 2001 From: nikhiljindal Date: Wed, 3 Feb 2016 14:26:11 -0800 Subject: [PATCH 132/328] Updating methods to return error rather than using glog.Fatalf --- cmd/integration/integration.go | 5 ++- cmd/kube-apiserver/app/server.go | 5 ++- examples/apiserver/apiserver.go | 17 ++++--- examples/apiserver/apiserver_test.go | 6 ++- examples/apiserver/server/main.go | 6 ++- pkg/genericapiserver/genericapiserver.go | 6 +-- pkg/genericapiserver/genericapiserver_test.go | 11 ++++- pkg/master/master.go | 11 +++-- pkg/master/master_test.go | 6 ++- test/component/scheduler/perf/util.go | 5 ++- test/integration/auth_test.go | 45 +++++++++++++++---- test/integration/extender_test.go | 5 ++- test/integration/framework/master_utils.go | 12 ++++- test/integration/scheduler_test.go | 16 +++++-- test/integration/secret_test.go | 5 ++- test/integration/service_account_test.go | 5 ++- 16 files changed, 128 insertions(+), 38 deletions(-) diff --git a/cmd/integration/integration.go b/cmd/integration/integration.go index 69318702e10..e021ea2c05e 100644 --- a/cmd/integration/integration.go +++ b/cmd/integration/integration.go @@ -170,7 +170,10 @@ func startComponents(firstManifestURL, secondManifestURL string) (string, string masterConfig.CacheTimeout = 2 * time.Second // Create a master and install handlers into mux. - m := master.New(masterConfig) + m, err := master.New(masterConfig) + if err != nil { + glog.Fatalf("Error in bringing up the master: %v", err) + } handler.delegate = m.Handler // Scheduler diff --git a/cmd/kube-apiserver/app/server.go b/cmd/kube-apiserver/app/server.go index 71cdf66cca4..6e56c9e7211 100644 --- a/cmd/kube-apiserver/app/server.go +++ b/cmd/kube-apiserver/app/server.go @@ -389,7 +389,10 @@ func Run(s *options.APIServer) error { Tunneler: tunneler, } - m := master.New(config) + m, err := master.New(config) + if err != nil { + return err + } m.Run(s.ServerRunOptions) return nil } diff --git a/examples/apiserver/apiserver.go b/examples/apiserver/apiserver.go index 9a61528f75f..e515f349b55 100644 --- a/examples/apiserver/apiserver.go +++ b/examples/apiserver/apiserver.go @@ -17,7 +17,8 @@ limitations under the License. package apiserver import ( - "github.com/golang/glog" + "fmt" + "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testdata/apis/testgroup/v1" testgroupetcd "k8s.io/kubernetes/examples/apiserver/rest" "k8s.io/kubernetes/pkg/api" @@ -45,24 +46,27 @@ func newStorageDestinations(groupName string, groupMeta *apimachinery.GroupMeta) return &storageDestinations, nil } -func Run() { +func Run() error { config := genericapiserver.Config{ EnableIndex: true, APIPrefix: "/api", APIGroupPrefix: "/apis", Serializer: api.Codecs, } - s := genericapiserver.New(&config) + s, err := genericapiserver.New(&config) + if err != nil { + return fmt.Errorf("Error in bringing up the server: %v", err) + } groupVersion := v1.SchemeGroupVersion groupName := groupVersion.Group groupMeta, err := registered.Group(groupName) if err != nil { - glog.Fatalf("%v", err) + return fmt.Errorf("%v", err) } storageDestinations, err := newStorageDestinations(groupName, groupMeta) if err != nil { - glog.Fatalf("Unable to init etcd: %v", err) + return fmt.Errorf("Unable to init etcd: %v", err) } restStorageMap := map[string]rest.Storage{ "testtypes": testgroupetcd.NewREST(storageDestinations.Get(groupName, "testtype"), s.StorageDecorator()), @@ -76,7 +80,8 @@ func Run() { NegotiatedSerializer: api.Codecs, } if err := s.InstallAPIGroups([]genericapiserver.APIGroupInfo{apiGroupInfo}); err != nil { - glog.Fatalf("Error in installing API: %v", err) + return fmt.Errorf("Error in installing API: %v", err) } s.Run(genericapiserver.NewServerRunOptions()) + return nil } diff --git a/examples/apiserver/apiserver_test.go b/examples/apiserver/apiserver_test.go index 134e356987e..6f74dedd397 100644 --- a/examples/apiserver/apiserver_test.go +++ b/examples/apiserver/apiserver_test.go @@ -35,7 +35,11 @@ var serverIP = "http://localhost:8080" var groupVersion = v1.SchemeGroupVersion func TestRun(t *testing.T) { - go Run() + go func() { + if err := Run(); err != nil { + t.Fatalf("Error in bringing up the server: %v", err) + } + }() if err := waitForApiserverUp(); err != nil { t.Fatalf("%v", err) } diff --git a/examples/apiserver/server/main.go b/examples/apiserver/server/main.go index 19961442fc5..aec0ef0ec90 100644 --- a/examples/apiserver/server/main.go +++ b/examples/apiserver/server/main.go @@ -18,8 +18,12 @@ package main import ( "k8s.io/kubernetes/examples/apiserver" + + "github.com/golang/glog" ) func main() { - apiserver.Run() + if err := apiserver.Run(); err != nil { + glog.Fatalf("Error in bringing up the server: %v", err) + } } diff --git a/pkg/genericapiserver/genericapiserver.go b/pkg/genericapiserver/genericapiserver.go index d80893b49c7..b024fdb618f 100644 --- a/pkg/genericapiserver/genericapiserver.go +++ b/pkg/genericapiserver/genericapiserver.go @@ -378,9 +378,9 @@ func setDefaults(c *Config) { // If the caller wants to add additional endpoints not using the GenericAPIServer's // auth, then the caller should create a handler for those endpoints, which delegates the // any unhandled paths to "Handler". -func New(c *Config) *GenericAPIServer { +func New(c *Config) (*GenericAPIServer, error) { if c.Serializer == nil { - glog.Fatalf("Genericapiserver.New() called with config.Serializer == nil") + return nil, fmt.Errorf("Genericapiserver.New() called with config.Serializer == nil") } setDefaults(c) @@ -435,7 +435,7 @@ func New(c *Config) *GenericAPIServer { s.init(c) - return s + return s, nil } func (s *GenericAPIServer) NewRequestInfoResolver() *apiserver.RequestInfoResolver { diff --git a/pkg/genericapiserver/genericapiserver_test.go b/pkg/genericapiserver/genericapiserver_test.go index e21ddcc95a4..6b7209a8218 100644 --- a/pkg/genericapiserver/genericapiserver_test.go +++ b/pkg/genericapiserver/genericapiserver_test.go @@ -56,7 +56,10 @@ func TestNew(t *testing.T) { config.ProxyTLSClientConfig = &tls.Config{} config.Serializer = api.Codecs - s := New(&config) + s, err := New(&config) + if err != nil { + t.Fatalf("Error in bringing up the server: %v", err) + } // Verify many of the variables match their config counterparts assert.Equal(s.enableLogsSupport, config.EnableLogsSupport) @@ -97,7 +100,11 @@ func TestInstallAPIGroups(t *testing.T) { config.APIGroupPrefix = "/apiGroupPrefix" config.Serializer = api.Codecs - s := New(&config) + s, err := New(&config) + if err != nil { + t.Fatalf("Error in bringing up the server: %v", err) + } + apiGroupMeta := registered.GroupOrDie(api.GroupName) extensionsGroupMeta := registered.GroupOrDie(extensions.GroupName) apiGroupsInfo := []APIGroupInfo{ diff --git a/pkg/master/master.go b/pkg/master/master.go index df7db628f53..ed6b115078f 100644 --- a/pkg/master/master.go +++ b/pkg/master/master.go @@ -131,12 +131,15 @@ type thirdPartyEntry struct { // Certain config fields will be set to a default value if unset. // Certain config fields must be specified, including: // KubeletClient -func New(c *Config) *Master { +func New(c *Config) (*Master, error) { if c.KubeletClient == nil { - glog.Fatalf("Master.New() called with config.KubeletClient == nil") + return nil, fmt.Errorf("Master.New() called with config.KubeletClient == nil") } - s := genericapiserver.New(c.Config) + s, err := genericapiserver.New(c.Config) + if err != nil { + return nil, err + } m := &Master{ GenericAPIServer: s, @@ -155,7 +158,7 @@ func New(c *Config) *Master { m.NewBootstrapController().Start() } - return m + return m, nil } func (m *Master) InstallAPIs(c *Config) { diff --git a/pkg/master/master_test.go b/pkg/master/master_test.go index b1996bd9604..a6e76d45747 100644 --- a/pkg/master/master_test.go +++ b/pkg/master/master_test.go @@ -89,7 +89,11 @@ func newMaster(t *testing.T) (*Master, *etcdtesting.EtcdTestServer, Config, *ass config.ProxyDialer = func(network, addr string) (net.Conn, error) { return nil, nil } config.ProxyTLSClientConfig = &tls.Config{} - master := New(&config) + master, err := New(&config) + if err != nil { + t.Fatalf("Error in bringing up the master: %v", err) + } + return master, etcdserver, config, assert } diff --git a/test/component/scheduler/perf/util.go b/test/component/scheduler/perf/util.go index 7c5a1d5c190..49b6acaf656 100644 --- a/test/component/scheduler/perf/util.go +++ b/test/component/scheduler/perf/util.go @@ -45,7 +45,10 @@ func mustSetupScheduler() (schedulerConfigFactory *factory.ConfigFactory, destro var m *master.Master masterConfig := framework.NewIntegrationTestMasterConfig() - m = master.New(masterConfig) + m, err := master.New(masterConfig) + if err != nil { + panic("error in brining up the master: " + err.Error()) + } s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { m.Handler.ServeHTTP(w, req) })) diff --git a/test/integration/auth_test.go b/test/integration/auth_test.go index 3c5335650e5..ba7e1525838 100644 --- a/test/integration/auth_test.go +++ b/test/integration/auth_test.go @@ -394,7 +394,10 @@ func TestAuthModeAlwaysAllow(t *testing.T) { // defer s.Close() masterConfig := framework.NewIntegrationTestMasterConfig() - m = master.New(masterConfig) + m, err := master.New(masterConfig) + if err != nil { + t.Fatalf("error in bringing up the master: %v", err) + } transport := http.DefaultTransport previousResourceVersion := make(map[string]float64) @@ -498,7 +501,10 @@ func TestAuthModeAlwaysDeny(t *testing.T) { masterConfig := framework.NewIntegrationTestMasterConfig() masterConfig.Authorizer = apiserver.NewAlwaysDenyAuthorizer() - m = master.New(masterConfig) + m, err := master.New(masterConfig) + if err != nil { + t.Fatalf("error in bringing up the master: %v", err) + } transport := http.DefaultTransport @@ -555,7 +561,10 @@ func TestAliceNotForbiddenOrUnauthorized(t *testing.T) { masterConfig.Authenticator = getTestTokenAuth() masterConfig.Authorizer = allowAliceAuthorizer{} masterConfig.AdmissionControl = admit.NewAlwaysAdmit() - m = master.New(masterConfig) + m, err := master.New(masterConfig) + if err != nil { + t.Fatalf("error in bringing up the master: %v", err) + } previousResourceVersion := make(map[string]float64) transport := http.DefaultTransport @@ -630,7 +639,10 @@ func TestBobIsForbidden(t *testing.T) { masterConfig := framework.NewIntegrationTestMasterConfig() masterConfig.Authenticator = getTestTokenAuth() masterConfig.Authorizer = allowAliceAuthorizer{} - m = master.New(masterConfig) + m, err := master.New(masterConfig) + if err != nil { + t.Fatalf("error in bringing up the master: %v", err) + } transport := http.DefaultTransport @@ -679,7 +691,10 @@ func TestUnknownUserIsUnauthorized(t *testing.T) { masterConfig := framework.NewIntegrationTestMasterConfig() masterConfig.Authenticator = getTestTokenAuth() masterConfig.Authorizer = allowAliceAuthorizer{} - m = master.New(masterConfig) + m, err := master.New(masterConfig) + if err != nil { + t.Fatalf("error in bringing up the master: %v", err) + } transport := http.DefaultTransport @@ -753,7 +768,10 @@ func TestAuthorizationAttributeDetermination(t *testing.T) { masterConfig := framework.NewIntegrationTestMasterConfig() masterConfig.Authenticator = getTestTokenAuth() masterConfig.Authorizer = trackingAuthorizer - m = master.New(masterConfig) + m, err := master.New(masterConfig) + if err != nil { + t.Fatalf("error in bringing up the master: %v", err) + } transport := http.DefaultTransport @@ -822,7 +840,10 @@ func TestNamespaceAuthorization(t *testing.T) { masterConfig := framework.NewIntegrationTestMasterConfig() masterConfig.Authenticator = getTestTokenAuth() masterConfig.Authorizer = a - m = master.New(masterConfig) + m, err := master.New(masterConfig) + if err != nil { + t.Fatalf("error in bringing up the master: %v", err) + } previousResourceVersion := make(map[string]float64) transport := http.DefaultTransport @@ -925,7 +946,10 @@ func TestKindAuthorization(t *testing.T) { masterConfig := framework.NewIntegrationTestMasterConfig() masterConfig.Authenticator = getTestTokenAuth() masterConfig.Authorizer = a - m = master.New(masterConfig) + m, err := master.New(masterConfig) + if err != nil { + t.Fatalf("error in bringing up the master: %v", err) + } previousResourceVersion := make(map[string]float64) transport := http.DefaultTransport @@ -1016,7 +1040,10 @@ func TestReadOnlyAuthorization(t *testing.T) { masterConfig.Authenticator = getTestTokenAuth() masterConfig.Authorizer = a - m = master.New(masterConfig) + m, err := master.New(masterConfig) + if err != nil { + t.Fatalf("error in bringing up the master: %v", err) + } transport := http.DefaultTransport diff --git a/test/integration/extender_test.go b/test/integration/extender_test.go index 4d46221a089..5a1b7a6aee2 100644 --- a/test/integration/extender_test.go +++ b/test/integration/extender_test.go @@ -195,7 +195,10 @@ func TestSchedulerExtender(t *testing.T) { // defer s.Close() masterConfig := framework.NewIntegrationTestMasterConfig() - m = master.New(masterConfig) + m, err := master.New(masterConfig) + if err != nil { + t.Fatalf("error in bringing up the master: %v", err) + } restClient := client.NewOrDie(&client.Config{Host: s.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) diff --git a/test/integration/framework/master_utils.go b/test/integration/framework/master_utils.go index 9d91be20d1a..c119daa5a30 100644 --- a/test/integration/framework/master_utils.go +++ b/test/integration/framework/master_utils.go @@ -135,7 +135,11 @@ func startMasterOrDie(masterConfig *master.Config) (*master.Master, *httptest.Se masterConfig.EnableProfiling = true masterConfig.EnableSwaggerSupport = true } - m = master.New(masterConfig) + m, err := master.New(masterConfig) + if err != nil { + glog.Fatalf("error in bringing up the master: %v", err) + } + return m, s } @@ -289,7 +293,11 @@ func StartPods(numPods int, host string, restClient *client.Client) error { func RunAMaster(t *testing.T) (*master.Master, *httptest.Server) { masterConfig := NewMasterConfig() masterConfig.EnableProfiling = true - m := master.New(masterConfig) + m, err := master.New(masterConfig) + if err != nil { + // TODO: Return error. + glog.Fatalf("error in bringing up the master: %v", err) + } s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { m.Handler.ServeHTTP(w, req) diff --git a/test/integration/scheduler_test.go b/test/integration/scheduler_test.go index 21cf958f775..e7c73840d26 100644 --- a/test/integration/scheduler_test.go +++ b/test/integration/scheduler_test.go @@ -62,7 +62,10 @@ func TestUnschedulableNodes(t *testing.T) { // defer s.Close() masterConfig := framework.NewIntegrationTestMasterConfig() - m = master.New(masterConfig) + m, err := master.New(masterConfig) + if err != nil { + t.Fatalf("Error in bringing up the master: %v", err) + } restClient := client.NewOrDie(&client.Config{Host: s.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) @@ -286,7 +289,11 @@ func TestMultiScheduler(t *testing.T) { // defer s.Close() masterConfig := framework.NewIntegrationTestMasterConfig() - m = master.New(masterConfig) + m, err := master.New(masterConfig) + if err != nil { + t.Fatalf("Error in bringing up the master: %v", err) + } + /* This integration tests the multi-scheduler feature in the following way: 1. create a default scheduler @@ -461,7 +468,10 @@ func TestAllocatable(t *testing.T) { defer s.Close() masterConfig := framework.NewIntegrationTestMasterConfig() - m = master.New(masterConfig) + m, err := master.New(masterConfig) + if err != nil { + t.Fatalf("Error in bringing up the master: %v", err) + } // 1. create and start default-scheduler restClient := client.NewOrDie(&client.Config{Host: s.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) diff --git a/test/integration/secret_test.go b/test/integration/secret_test.go index a1e5e7b2c0f..8c89d868465 100644 --- a/test/integration/secret_test.go +++ b/test/integration/secret_test.go @@ -53,7 +53,10 @@ func TestSecrets(t *testing.T) { // defer s.Close() masterConfig := framework.NewIntegrationTestMasterConfig() - m = master.New(masterConfig) + m, err := master.New(masterConfig) + if err != nil { + t.Fatalf("Error in bringing up the master: %v", err) + } framework.DeleteAllEtcdKeys() client := client.NewOrDie(&client.Config{Host: s.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) diff --git a/test/integration/service_account_test.go b/test/integration/service_account_test.go index 278b9be300e..3f8b3850c0b 100644 --- a/test/integration/service_account_test.go +++ b/test/integration/service_account_test.go @@ -408,7 +408,10 @@ func startServiceAccountTestServer(t *testing.T) (*client.Client, client.Config, masterConfig.AdmissionControl = serviceAccountAdmission // Create a master and install handlers into mux. - m = master.New(masterConfig) + m, err := master.New(masterConfig) + if err != nil { + t.Fatalf("Error in bringing up the master: %v", err) + } // Start the service account and service account token controllers tokenController := serviceaccountcontroller.NewTokensController(rootClient, serviceaccountcontroller.TokensControllerOptions{TokenGenerator: serviceaccount.JWTTokenGenerator(serviceAccountKey)}) From 7a59683e418010963fb633bd930a1b76b5a08ed4 Mon Sep 17 00:00:00 2001 From: Joe Finney Date: Wed, 3 Feb 2016 16:06:02 -0800 Subject: [PATCH 133/328] Retry SSH connection for E2E log gathering. --- pkg/master/tunneler.go | 15 ++++++++------- pkg/{util => ssh}/ssh.go | 19 +++++++++++++++---- pkg/{util => ssh}/ssh_test.go | 4 ++-- test/e2e/util.go | 7 ++++--- 4 files changed, 29 insertions(+), 16 deletions(-) rename pkg/{util => ssh}/ssh.go (96%) rename pkg/{util => ssh}/ssh_test.go (99%) diff --git a/pkg/master/tunneler.go b/pkg/master/tunneler.go index 9cb04b34c20..e79b9e5cf0f 100644 --- a/pkg/master/tunneler.go +++ b/pkg/master/tunneler.go @@ -24,6 +24,7 @@ import ( "sync/atomic" "time" + "k8s.io/kubernetes/pkg/ssh" "k8s.io/kubernetes/pkg/util" "github.com/golang/glog" @@ -47,7 +48,7 @@ type SSHTunneler struct { InstallSSHKey InstallSSHKey HealthCheckURL *url.URL - tunnels *util.SSHTunnelList + tunnels *ssh.SSHTunnelList lastSync int64 // Seconds since Epoch lastSyncMetric prometheus.GaugeFunc clock util.Clock @@ -97,7 +98,7 @@ func (c *SSHTunneler) Run(getAddresses AddressFunc) { } } - c.tunnels = util.NewSSHTunnelList(c.SSHUser, c.SSHKeyfile, c.HealthCheckURL, c.stopChan) + c.tunnels = ssh.NewSSHTunnelList(c.SSHUser, c.SSHKeyfile, c.HealthCheckURL, c.stopChan) // Sync loop to ensure that the SSH key has been installed. c.installSSHKeySyncLoop(c.SSHUser, publicKeyFile) // Sync tunnelList w/ nodes. @@ -129,12 +130,12 @@ func (c *SSHTunneler) installSSHKeySyncLoop(user, publicKeyfile string) { glog.Error("Won't attempt to install ssh key: InstallSSHKey function is nil") return } - key, err := util.ParsePublicKeyFromFile(publicKeyfile) + key, err := ssh.ParsePublicKeyFromFile(publicKeyfile) if err != nil { glog.Errorf("Failed to load public key: %v", err) return } - keyData, err := util.EncodeSSHKey(key) + keyData, err := ssh.EncodeSSHKey(key) if err != nil { glog.Errorf("Failed to encode public key: %v", err) return @@ -161,7 +162,7 @@ func (c *SSHTunneler) nodesSyncLoop() { } func generateSSHKey(privateKeyfile, publicKeyfile string) error { - private, public, err := util.GenerateKey(2048) + private, public, err := ssh.GenerateKey(2048) if err != nil { return err } @@ -176,10 +177,10 @@ func generateSSHKey(privateKeyfile, publicKeyfile string) error { glog.Errorf("Failed to remove stale private key: %v", err) } } - if err := ioutil.WriteFile(privateKeyfile, util.EncodePrivateKey(private), 0600); err != nil { + if err := ioutil.WriteFile(privateKeyfile, ssh.EncodePrivateKey(private), 0600); err != nil { return err } - publicKeyBytes, err := util.EncodePublicKey(public) + publicKeyBytes, err := ssh.EncodePublicKey(public) if err != nil { return err } diff --git a/pkg/util/ssh.go b/pkg/ssh/ssh.go similarity index 96% rename from pkg/util/ssh.go rename to pkg/ssh/ssh.go index 04a06afb3e7..a015bee916f 100644 --- a/pkg/util/ssh.go +++ b/pkg/ssh/ssh.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package util +package ssh import ( "bytes" @@ -39,8 +39,10 @@ import ( "github.com/prometheus/client_golang/prometheus" "golang.org/x/crypto/ssh" + "k8s.io/kubernetes/pkg/util" utilnet "k8s.io/kubernetes/pkg/util/net" "k8s.io/kubernetes/pkg/util/runtime" + "k8s.io/kubernetes/pkg/util/wait" ) var ( @@ -166,11 +168,11 @@ func (d *realSSHDialer) Dial(network, addr string, config *ssh.ClientConfig) (*s // host as specific user, along with any SSH-level error. // If user=="", it will default (like SSH) to os.Getenv("USER") func RunSSHCommand(cmd, user, host string, signer ssh.Signer) (string, string, int, error) { - return runSSHCommand(&realSSHDialer{}, cmd, user, host, signer) + return runSSHCommand(&realSSHDialer{}, cmd, user, host, signer, true) } // Internal implementation of runSSHCommand, for testing -func runSSHCommand(dialer sshDialer, cmd, user, host string, signer ssh.Signer) (string, string, int, error) { +func runSSHCommand(dialer sshDialer, cmd, user, host string, signer ssh.Signer, retry bool) (string, string, int, error) { if user == "" { user = os.Getenv("USER") } @@ -180,6 +182,15 @@ func runSSHCommand(dialer sshDialer, cmd, user, host string, signer ssh.Signer) Auth: []ssh.AuthMethod{ssh.PublicKeys(signer)}, } client, err := dialer.Dial("tcp", host, config) + if err != nil && retry { + err = wait.Poll(5*time.Second, 20*time.Second, func() (bool, error) { + fmt.Printf("error dialing %s@%s: '%v', retrying\n", user, host, err) + if client, err = dialer.Dial("tcp", host, config); err != nil { + return false, nil + } + return true, nil + }) + } if err != nil { return "", "", 0, fmt.Errorf("error getting SSH client to %s@%s: '%v'", user, host, err) } @@ -286,7 +297,7 @@ func NewSSHTunnelList(user, keyfile string, healthCheckURL *url.URL, stopChan ch healthCheckURL: healthCheckURL, } healthCheckPoll := 1 * time.Minute - go Until(func() { + go util.Until(func() { l.tunnelsLock.Lock() defer l.tunnelsLock.Unlock() // Healthcheck each tunnel every minute diff --git a/pkg/util/ssh_test.go b/pkg/ssh/ssh_test.go similarity index 99% rename from pkg/util/ssh_test.go rename to pkg/ssh/ssh_test.go index 072cfff6f1a..bbc1641e9aa 100644 --- a/pkg/util/ssh_test.go +++ b/pkg/ssh/ssh_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package util +package ssh import ( "fmt" @@ -304,7 +304,7 @@ func TestSSHUser(t *testing.T) { for _, item := range table { dialer := &mockSSHDialer{} - _, _, _, err := runSSHCommand(dialer, item.command, item.user, item.host, item.signer) + _, _, _, err := runSSHCommand(dialer, item.command, item.user, item.host, item.signer, false) if err == nil { t.Errorf("expected error (as mock returns error); did not get one") } diff --git a/test/e2e/util.go b/test/e2e/util.go index 810153fc0ec..a6986a09010 100644 --- a/test/e2e/util.go +++ b/test/e2e/util.go @@ -51,6 +51,7 @@ import ( "k8s.io/kubernetes/pkg/kubelet/util/format" "k8s.io/kubernetes/pkg/labels" "k8s.io/kubernetes/pkg/runtime" + sshutil "k8s.io/kubernetes/pkg/ssh" "k8s.io/kubernetes/pkg/util" deploymentutil "k8s.io/kubernetes/pkg/util/deployment" "k8s.io/kubernetes/pkg/util/sets" @@ -2219,7 +2220,7 @@ func SSH(cmd, host, provider string) (SSHResult, error) { result.User = os.Getenv("USER") } - stdout, stderr, code, err := util.RunSSHCommand(cmd, result.User, host, signer) + stdout, stderr, code, err := sshutil.RunSSHCommand(cmd, result.User, host, signer) result.Stdout = stdout result.Stderr = stderr result.Code = code @@ -2324,7 +2325,7 @@ func getSigner(provider string) (ssh.Signer, error) { // If there is an env. variable override, use that. aws_keyfile := os.Getenv("AWS_SSH_KEY") if len(aws_keyfile) != 0 { - return util.MakePrivateKeySignerFromFile(aws_keyfile) + return sshutil.MakePrivateKeySignerFromFile(aws_keyfile) } // Otherwise revert to home dir keyfile = "kube_aws_rsa" @@ -2333,7 +2334,7 @@ func getSigner(provider string) (ssh.Signer, error) { } key := filepath.Join(keydir, keyfile) - return util.MakePrivateKeySignerFromFile(key) + return sshutil.MakePrivateKeySignerFromFile(key) } // checkPodsRunning returns whether all pods whose names are listed in podNames From 97a34f039746653e0abc6c150d6fcd33645352f7 Mon Sep 17 00:00:00 2001 From: nikhiljindal Date: Wed, 3 Feb 2016 16:14:52 -0800 Subject: [PATCH 134/328] Removing unused var --- test/e2e/etcd_failure.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/e2e/etcd_failure.go b/test/e2e/etcd_failure.go index c2b161dc551..531fdb404da 100644 --- a/test/e2e/etcd_failure.go +++ b/test/e2e/etcd_failure.go @@ -29,7 +29,6 @@ import ( var _ = Describe("Etcd failure [Disruptive]", func() { - var skipped bool framework := NewFramework("etcd-failure") BeforeEach(func() { @@ -38,9 +37,7 @@ var _ = Describe("Etcd failure [Disruptive]", func() { // - master access // ... so the provider check should be identical to the intersection of // providers that provide those capabilities. - skipped = true SkipUnlessProviderIs("gce") - skipped = false Expect(RunRC(RCConfig{ Client: framework.Client, From 33654c8b4e7878d96c1c8e9ecbabc1265be3ed44 Mon Sep 17 00:00:00 2001 From: Prashanth Balasubramanian Date: Wed, 3 Feb 2016 16:12:54 -0800 Subject: [PATCH 135/328] Send update events from service-controller. --- pkg/controller/service/servicecontroller.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkg/controller/service/servicecontroller.go b/pkg/controller/service/servicecontroller.go index 0e64547d9c3..681558e475c 100644 --- a/pkg/controller/service/servicecontroller.go +++ b/pkg/controller/service/servicecontroller.go @@ -274,7 +274,7 @@ func (s *ServiceController) processDelta(delta *cache.Delta) (error, bool) { // Returns whatever error occurred along with a boolean indicator of whether it // should be retried. func (s *ServiceController) createLoadBalancerIfNeeded(namespacedName types.NamespacedName, service, appliedState *api.Service) (error, bool) { - if appliedState != nil && !needsUpdate(appliedState, service) { + if appliedState != nil && !s.needsUpdate(appliedState, service) { glog.Infof("LB already exists and doesn't need update for service %s", namespacedName) return nil, notRetryable } @@ -457,24 +457,32 @@ func (s *serviceCache) delete(serviceName string) { delete(s.serviceMap, serviceName) } -func needsUpdate(oldService *api.Service, newService *api.Service) bool { +func (s *ServiceController) needsUpdate(oldService *api.Service, newService *api.Service) bool { if !wantsLoadBalancer(oldService) && !wantsLoadBalancer(newService) { return false } if wantsLoadBalancer(oldService) != wantsLoadBalancer(newService) { + s.eventRecorder.Eventf(newService, api.EventTypeNormal, "Type", "%v -> %v", + oldService.Spec.Type, newService.Spec.Type) return true } if !portsEqualForLB(oldService, newService) || oldService.Spec.SessionAffinity != newService.Spec.SessionAffinity { return true } if !loadBalancerIPsAreEqual(oldService, newService) { + s.eventRecorder.Eventf(newService, api.EventTypeNormal, "LoadbalancerIP", "%v -> %v", + oldService.Spec.LoadBalancerIP, newService.Spec.LoadBalancerIP) return true } if len(oldService.Spec.ExternalIPs) != len(newService.Spec.ExternalIPs) { + s.eventRecorder.Eventf(newService, api.EventTypeNormal, "ExternalIP", "Count: %v -> %v", + len(oldService.Spec.ExternalIPs), len(newService.Spec.ExternalIPs)) return true } for i := range oldService.Spec.ExternalIPs { if oldService.Spec.ExternalIPs[i] != newService.Spec.ExternalIPs[i] { + s.eventRecorder.Eventf(newService, api.EventTypeNormal, "ExternalIP", "Added: %v", + newService.Spec.ExternalIPs[i]) return true } } From 216a35d988e6d9bd622578a7b5272884013e8cb0 Mon Sep 17 00:00:00 2001 From: Mike Danese Date: Wed, 3 Feb 2016 14:46:04 -0800 Subject: [PATCH 136/328] run serialization tests on all apigroups registered in testapi --- pkg/api/serialization_test.go | 48 +++++++++++++++++------------------ pkg/api/testapi/testapi.go | 9 ++++--- pkg/api/testing/fuzzer.go | 7 +++++ 3 files changed, 36 insertions(+), 28 deletions(-) diff --git a/pkg/api/serialization_test.go b/pkg/api/serialization_test.go index 0f69b8be81d..f95e9a27754 100644 --- a/pkg/api/serialization_test.go +++ b/pkg/api/serialization_test.go @@ -32,8 +32,6 @@ import ( apitesting "k8s.io/kubernetes/pkg/api/testing" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/api/v1" - _ "k8s.io/kubernetes/pkg/apis/extensions" - _ "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/pkg/runtime" "k8s.io/kubernetes/pkg/util" "k8s.io/kubernetes/pkg/util/sets" @@ -61,7 +59,7 @@ func fuzzInternalObject(t *testing.T, forVersion unversioned.GroupVersion, item } func roundTrip(t *testing.T, codec runtime.Codec, item runtime.Object) { - t.Logf("codec: %#v", codec) + //t.Logf("codec: %#v", codec) printer := spew.ConfigState{DisableMethods: true} @@ -94,12 +92,12 @@ func roundTrip(t *testing.T, codec runtime.Codec, item runtime.Object) { } // roundTripSame verifies the same source object is tested in all API versions. -func roundTripSame(t *testing.T, item runtime.Object, except ...string) { +func roundTripSame(t *testing.T, group testapi.TestGroup, item runtime.Object, except ...string) { set := sets.NewString(except...) seed := rand.Int63() - fuzzInternalObject(t, testapi.Default.InternalGroupVersion(), item, seed) + fuzzInternalObject(t, group.InternalGroupVersion(), item, seed) - version := *testapi.Default.GroupVersion() + version := *group.GroupVersion() codecs := []runtime.Codec{} for _, fn := range codecsToTest { codec, err := fn(version, item) @@ -123,9 +121,9 @@ func TestSpecificKind(t *testing.T) { // api.Scheme.Log(t) // defer api.Scheme.Log(nil) - kind := "List" + kind := "DaemonSet" for i := 0; i < *fuzzIters; i++ { - doRoundTripTest(kind, t) + doRoundTripTest(testapi.Groups["extensions"], kind, t) if t.Failed() { break } @@ -142,7 +140,7 @@ func TestList(t *testing.T) { t.Errorf("Couldn't make a %v? %v", kind, err) return } - roundTripSame(t, item) + roundTripSame(t, testapi.Default, item) } var nonRoundTrippableTypes = sets.NewString("ExportOptions") @@ -154,34 +152,36 @@ func TestRoundTripTypes(t *testing.T) { // api.Scheme.Log(t) // defer api.Scheme.Log(nil) - for kind := range api.Scheme.KnownTypes(testapi.Default.InternalGroupVersion()) { - t.Logf("working on %v in %v", kind, testapi.Default.InternalGroupVersion()) - if nonRoundTrippableTypes.Has(kind) { - continue - } - // Try a few times, since runTest uses random values. - for i := 0; i < *fuzzIters; i++ { - doRoundTripTest(kind, t) - if t.Failed() { - break + for groupKey, group := range testapi.Groups { + for kind := range api.Scheme.KnownTypes(group.InternalGroupVersion()) { + t.Logf("working on %v in %v", kind, groupKey) + if nonRoundTrippableTypes.Has(kind) { + continue + } + // Try a few times, since runTest uses random values. + for i := 0; i < *fuzzIters; i++ { + doRoundTripTest(group, kind, t) + if t.Failed() { + break + } } } } } -func doRoundTripTest(kind string, t *testing.T) { - item, err := api.Scheme.New(testapi.Default.InternalGroupVersion().WithKind(kind)) +func doRoundTripTest(group testapi.TestGroup, kind string, t *testing.T) { + item, err := api.Scheme.New(group.InternalGroupVersion().WithKind(kind)) if err != nil { t.Fatalf("Couldn't make a %v? %v", kind, err) } if _, err := meta.TypeAccessor(item); err != nil { t.Fatalf("%q is not a TypeMeta and cannot be tested - add it to nonRoundTrippableTypes: %v", kind, err) } - if api.Scheme.Recognizes(testapi.Default.GroupVersion().WithKind(kind)) { - roundTripSame(t, item, nonRoundTrippableTypesByVersion[kind]...) + if api.Scheme.Recognizes(group.GroupVersion().WithKind(kind)) { + roundTripSame(t, group, item, nonRoundTrippableTypesByVersion[kind]...) } if !nonInternalRoundTrippableTypes.Has(kind) { - roundTrip(t, testapi.Default.Codec(), fuzzInternalObject(t, testapi.Default.InternalGroupVersion(), item, rand.Int63())) + roundTrip(t, group.Codec(), fuzzInternalObject(t, group.InternalGroupVersion(), item, rand.Int63())) } } diff --git a/pkg/api/testapi/testapi.go b/pkg/api/testapi/testapi.go index 33b2e201fc8..d3fc91aae27 100644 --- a/pkg/api/testapi/testapi.go +++ b/pkg/api/testapi/testapi.go @@ -23,15 +23,16 @@ import ( "strings" "k8s.io/kubernetes/pkg/api" - _ "k8s.io/kubernetes/pkg/api/install" - _ "k8s.io/kubernetes/pkg/apis/extensions/install" - _ "k8s.io/kubernetes/pkg/apis/metrics/install" - "k8s.io/kubernetes/pkg/api/meta" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/apimachinery/registered" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/runtime" + + _ "k8s.io/kubernetes/pkg/api/install" + _ "k8s.io/kubernetes/pkg/apis/componentconfig/install" + _ "k8s.io/kubernetes/pkg/apis/extensions/install" + _ "k8s.io/kubernetes/pkg/apis/metrics/install" ) var ( diff --git a/pkg/api/testing/fuzzer.go b/pkg/api/testing/fuzzer.go index 30a2ed18746..5d240c2384a 100644 --- a/pkg/api/testing/fuzzer.go +++ b/pkg/api/testing/fuzzer.go @@ -397,6 +397,13 @@ func FuzzerFor(t *testing.T, version unversioned.GroupVersion, src rand.Source) s.MinReplicas = &minReplicas s.CPUUtilization = &extensions.CPUTargetUtilization{TargetPercentage: int(int32(c.RandUint64()))} }, + func(s *extensions.DaemonSetUpdateStrategy, c fuzz.Continue) { + c.FuzzNoCustom(s) + s.Type = extensions.RollingUpdateDaemonSetStrategyType + s.RollingUpdate = &extensions.RollingUpdateDaemonSet{ + MaxUnavailable: intstr.FromInt(10), + } + }, ) return f } From c8c82c1d8f8e143f9b571a731d7ff11d5101de20 Mon Sep 17 00:00:00 2001 From: Kevin Date: Tue, 26 Jan 2016 23:03:18 +0000 Subject: [PATCH 137/328] implement Node affinity and NodeSelector --- .../pod-with-node-affinity.yaml | 28 + examples/examples_test.go | 1 + pkg/api/deep_copy_generated.go | 103 + pkg/api/helpers.go | 52 + pkg/api/helpers_test.go | 122 + pkg/api/types.generated.go | 27998 +++++++------- pkg/api/types.go | 87 + pkg/api/v1/types.generated.go | 31930 ++++++++-------- pkg/api/v1/types.go | 88 + pkg/api/v1/types_swagger_doc_generated.go | 59 + pkg/api/validation/validation.go | 100 + pkg/api/validation/validation_test.go | 155 + pkg/labels/selector.go | 57 +- pkg/labels/selector_test.go | 34 + .../algorithm/predicates/predicates.go | 68 +- .../algorithm/predicates/predicates_test.go | 388 + .../algorithm/priorities/node_affinity.go | 95 + .../priorities/node_affinity_test.go | 167 + .../algorithmprovider/defaults/defaults.go | 9 + test/e2e/scheduler_predicates.go | 259 + 20 files changed, 33502 insertions(+), 28298 deletions(-) create mode 100644 docs/user-guide/node-selection/pod-with-node-affinity.yaml create mode 100644 plugin/pkg/scheduler/algorithm/priorities/node_affinity.go create mode 100644 plugin/pkg/scheduler/algorithm/priorities/node_affinity_test.go diff --git a/docs/user-guide/node-selection/pod-with-node-affinity.yaml b/docs/user-guide/node-selection/pod-with-node-affinity.yaml new file mode 100644 index 00000000000..526f83e4d4f --- /dev/null +++ b/docs/user-guide/node-selection/pod-with-node-affinity.yaml @@ -0,0 +1,28 @@ +apiVersion: v1 +kind: Pod +metadata: + name: with-labels + annotations: + scheduler.alpha.kubernetes.io/affinity: > + { + "nodeAffinity": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [ + { + "matchExpressions": [ + { + "key": "kubernetes.io/e2e-az-name", + "operator": "In", + "values": ["e2e-az1", "e2e-az2"] + } + ] + } + ] + } + } + } + another-annotation-key: another-annotation-value +spec: + containers: + - name: with-labels + image: gcr.io/google_containers/pause:2.0 diff --git a/examples/examples_test.go b/examples/examples_test.go index f6920945d1b..080ec1ec6be 100644 --- a/examples/examples_test.go +++ b/examples/examples_test.go @@ -320,6 +320,7 @@ func TestExampleObjectSchemas(t *testing.T) { }, "../docs/user-guide/node-selection": { "pod": &api.Pod{}, + "pod-with-node-affinity": &api.Pod{}, }, "../examples/openshift-origin": { "openshift-origin-namespace": &api.Namespace{}, diff --git a/pkg/api/deep_copy_generated.go b/pkg/api/deep_copy_generated.go index 65c7f94b14e..c2e5766a7cc 100644 --- a/pkg/api/deep_copy_generated.go +++ b/pkg/api/deep_copy_generated.go @@ -32,6 +32,7 @@ import ( func init() { if err := Scheme.AddGeneratedDeepCopyFuncs( DeepCopy_api_AWSElasticBlockStoreVolumeSource, + DeepCopy_api_Affinity, DeepCopy_api_Binding, DeepCopy_api_Capabilities, DeepCopy_api_CephFSVolumeSource, @@ -95,10 +96,14 @@ func init() { DeepCopy_api_NamespaceStatus, DeepCopy_api_Node, DeepCopy_api_NodeAddress, + DeepCopy_api_NodeAffinity, DeepCopy_api_NodeCondition, DeepCopy_api_NodeDaemonEndpoints, DeepCopy_api_NodeList, DeepCopy_api_NodeResources, + DeepCopy_api_NodeSelector, + DeepCopy_api_NodeSelectorRequirement, + DeepCopy_api_NodeSelectorTerm, DeepCopy_api_NodeSpec, DeepCopy_api_NodeStatus, DeepCopy_api_NodeSystemInfo, @@ -129,6 +134,7 @@ func init() { DeepCopy_api_PodTemplate, DeepCopy_api_PodTemplateList, DeepCopy_api_PodTemplateSpec, + DeepCopy_api_PreferredSchedulingTerm, DeepCopy_api_Probe, DeepCopy_api_RBDVolumeSource, DeepCopy_api_RangeAllocation, @@ -183,6 +189,19 @@ func DeepCopy_api_AWSElasticBlockStoreVolumeSource(in AWSElasticBlockStoreVolume return nil } +func DeepCopy_api_Affinity(in Affinity, out *Affinity, c *conversion.Cloner) error { + if in.NodeAffinity != nil { + in, out := in.NodeAffinity, &out.NodeAffinity + *out = new(NodeAffinity) + if err := DeepCopy_api_NodeAffinity(*in, *out, c); err != nil { + return err + } + } else { + out.NodeAffinity = nil + } + return nil +} + func DeepCopy_api_Binding(in Binding, out *Binding, c *conversion.Cloner) error { if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err @@ -1260,6 +1279,39 @@ func DeepCopy_api_NodeAddress(in NodeAddress, out *NodeAddress, c *conversion.Cl return nil } +func DeepCopy_api_NodeAffinity(in NodeAffinity, out *NodeAffinity, c *conversion.Cloner) error { + if in.RequiredDuringSchedulingRequiredDuringExecution != nil { + in, out := in.RequiredDuringSchedulingRequiredDuringExecution, &out.RequiredDuringSchedulingRequiredDuringExecution + *out = new(NodeSelector) + if err := DeepCopy_api_NodeSelector(*in, *out, c); err != nil { + return err + } + } else { + out.RequiredDuringSchedulingRequiredDuringExecution = nil + } + if in.RequiredDuringSchedulingIgnoredDuringExecution != nil { + in, out := in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution + *out = new(NodeSelector) + if err := DeepCopy_api_NodeSelector(*in, *out, c); err != nil { + return err + } + } else { + out.RequiredDuringSchedulingIgnoredDuringExecution = nil + } + if in.PreferredDuringSchedulingIgnoredDuringExecution != nil { + in, out := in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution + *out = make([]PreferredSchedulingTerm, len(in)) + for i := range in { + if err := DeepCopy_api_PreferredSchedulingTerm(in[i], &(*out)[i], c); err != nil { + return err + } + } + } else { + out.PreferredDuringSchedulingIgnoredDuringExecution = nil + } + return nil +} + func DeepCopy_api_NodeCondition(in NodeCondition, out *NodeCondition, c *conversion.Cloner) error { out.Type = in.Type out.Status = in.Status @@ -1323,6 +1375,49 @@ func DeepCopy_api_NodeResources(in NodeResources, out *NodeResources, c *convers return nil } +func DeepCopy_api_NodeSelector(in NodeSelector, out *NodeSelector, c *conversion.Cloner) error { + if in.NodeSelectorTerms != nil { + in, out := in.NodeSelectorTerms, &out.NodeSelectorTerms + *out = make([]NodeSelectorTerm, len(in)) + for i := range in { + if err := DeepCopy_api_NodeSelectorTerm(in[i], &(*out)[i], c); err != nil { + return err + } + } + } else { + out.NodeSelectorTerms = nil + } + return nil +} + +func DeepCopy_api_NodeSelectorRequirement(in NodeSelectorRequirement, out *NodeSelectorRequirement, c *conversion.Cloner) error { + out.Key = in.Key + out.Operator = in.Operator + if in.Values != nil { + in, out := in.Values, &out.Values + *out = make([]string, len(in)) + copy(*out, in) + } else { + out.Values = nil + } + return nil +} + +func DeepCopy_api_NodeSelectorTerm(in NodeSelectorTerm, out *NodeSelectorTerm, c *conversion.Cloner) error { + if in.MatchExpressions != nil { + in, out := in.MatchExpressions, &out.MatchExpressions + *out = make([]NodeSelectorRequirement, len(in)) + for i := range in { + if err := DeepCopy_api_NodeSelectorRequirement(in[i], &(*out)[i], c); err != nil { + return err + } + } + } else { + out.MatchExpressions = nil + } + return nil +} + func DeepCopy_api_NodeSpec(in NodeSpec, out *NodeSpec, c *conversion.Cloner) error { out.PodCIDR = in.PodCIDR out.ExternalID = in.ExternalID @@ -2117,6 +2212,14 @@ func DeepCopy_api_PodTemplateSpec(in PodTemplateSpec, out *PodTemplateSpec, c *c return nil } +func DeepCopy_api_PreferredSchedulingTerm(in PreferredSchedulingTerm, out *PreferredSchedulingTerm, c *conversion.Cloner) error { + out.Weight = in.Weight + if err := DeepCopy_api_NodeSelectorTerm(in.Preference, &out.Preference, c); err != nil { + return err + } + return nil +} + func DeepCopy_api_Probe(in Probe, out *Probe, c *conversion.Cloner) error { if err := DeepCopy_api_Handler(in.Handler, &out.Handler, c); err != nil { return err diff --git a/pkg/api/helpers.go b/pkg/api/helpers.go index 5bb480d7e0a..b373b9eee81 100644 --- a/pkg/api/helpers.go +++ b/pkg/api/helpers.go @@ -18,6 +18,7 @@ package api import ( "crypto/md5" + "encoding/json" "fmt" "reflect" "strings" @@ -263,3 +264,54 @@ func ParseRFC3339(s string, nowFn func() unversioned.Time) (unversioned.Time, er } return unversioned.Time{t}, nil } + +// NodeSelectorRequirementsAsSelector converts the []NodeSelectorRequirement api type into a struct that implements +// labels.Selector. +func NodeSelectorRequirementsAsSelector(nsm []NodeSelectorRequirement) (labels.Selector, error) { + if len(nsm) == 0 { + return labels.Nothing(), nil + } + selector := labels.NewSelector() + for _, expr := range nsm { + var op labels.Operator + switch expr.Operator { + case NodeSelectorOpIn: + op = labels.InOperator + case NodeSelectorOpNotIn: + op = labels.NotInOperator + case NodeSelectorOpExists: + op = labels.ExistsOperator + case NodeSelectorOpDoesNotExist: + op = labels.DoesNotExistOperator + case NodeSelectorOpGt: + op = labels.GreaterThanOperator + case NodeSelectorOpLt: + op = labels.LessThanOperator + default: + return nil, fmt.Errorf("%q is not a valid node selector operator", expr.Operator) + } + r, err := labels.NewRequirement(expr.Key, op, sets.NewString(expr.Values...)) + if err != nil { + return nil, err + } + selector = selector.Add(*r) + } + return selector, nil +} + +// AffinityAnnotationKey represents the key of affinity data (json serialized) +// in the Annotations of a Pod. +const AffinityAnnotationKey string = "scheduler.alpha.kubernetes.io/affinity" + +// GetAffinityFromPod gets the json serialized affinity data from Pod.Annotations +// and converts it to the Affinity type in api. +func GetAffinityFromPodAnnotations(annotations map[string]string) (Affinity, error) { + var affinity Affinity + if len(annotations) > 0 && annotations[AffinityAnnotationKey] != "" { + err := json.Unmarshal([]byte(annotations[AffinityAnnotationKey]), &affinity) + if err != nil { + return affinity, err + } + } + return affinity, nil +} diff --git a/pkg/api/helpers_test.go b/pkg/api/helpers_test.go index 6cbe4726939..2d6bd488f09 100644 --- a/pkg/api/helpers_test.go +++ b/pkg/api/helpers_test.go @@ -17,10 +17,12 @@ limitations under the License. package api import ( + "reflect" "strings" "testing" "k8s.io/kubernetes/pkg/api/resource" + "k8s.io/kubernetes/pkg/labels" "speter.net/go/exp/math/dec/inf" ) @@ -175,3 +177,123 @@ func TestRemoveDuplicateAccessModes(t *testing.T) { t.Errorf("Expected 2 distinct modes in set but found %v", len(modes)) } } + +func TestNodeSelectorRequirementsAsSelector(t *testing.T) { + matchExpressions := []NodeSelectorRequirement{{ + Key: "foo", + Operator: NodeSelectorOpIn, + Values: []string{"bar", "baz"}, + }} + mustParse := func(s string) labels.Selector { + out, e := labels.Parse(s) + if e != nil { + panic(e) + } + return out + } + tc := []struct { + in []NodeSelectorRequirement + out labels.Selector + expectErr bool + }{ + {in: nil, out: labels.Nothing()}, + {in: []NodeSelectorRequirement{}, out: labels.Nothing()}, + { + in: matchExpressions, + out: mustParse("foo in (baz,bar)"), + }, + { + in: []NodeSelectorRequirement{{ + Key: "foo", + Operator: NodeSelectorOpExists, + Values: []string{"bar", "baz"}, + }}, + expectErr: true, + }, + { + in: []NodeSelectorRequirement{{ + Key: "foo", + Operator: NodeSelectorOpGt, + Values: []string{"1.1"}, + }}, + out: mustParse("foo>1.1"), + }, + { + in: []NodeSelectorRequirement{{ + Key: "bar", + Operator: NodeSelectorOpLt, + Values: []string{"7.1"}, + }}, + out: mustParse("bar<7.1"), + }, + } + + for i, tc := range tc { + out, err := NodeSelectorRequirementsAsSelector(tc.in) + if err == nil && tc.expectErr { + t.Errorf("[%v]expected error but got none.", i) + } + if err != nil && !tc.expectErr { + t.Errorf("[%v]did not expect error but got: %v", i, err) + } + if !reflect.DeepEqual(out, tc.out) { + t.Errorf("[%v]expected:\n\t%+v\nbut got:\n\t%+v", i, tc.out, out) + } + } +} + +func TestGetAffinityFromPod(t *testing.T) { + testCases := []struct { + pod *Pod + expectErr bool + }{ + { + pod: &Pod{}, + expectErr: false, + }, + { + pod: &Pod{ + ObjectMeta: ObjectMeta{ + Annotations: map[string]string{ + AffinityAnnotationKey: ` + {"nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [{ + "matchExpressions": [{ + "key": "foo", + "operator": "In", + "values": ["value1", "value2"] + }] + }] + }}}`, + }, + }, + }, + expectErr: false, + }, + { + pod: &Pod{ + ObjectMeta: ObjectMeta{ + Annotations: map[string]string{ + AffinityAnnotationKey: ` + {"nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [{ + "matchExpressions": [{ + "key": "foo", + `, + }, + }, + }, + expectErr: true, + }, + } + + for i, tc := range testCases { + _, err := GetAffinityFromPodAnnotations(tc.pod.Annotations) + if err == nil && tc.expectErr { + t.Errorf("[%v]expected error but got none.", i) + } + if err != nil && !tc.expectErr { + t.Errorf("[%v]did not expect error but got: %v", i, err) + } + } +} diff --git a/pkg/api/types.generated.go b/pkg/api/types.generated.go index 428584d70a5..1e43d587de9 100644 --- a/pkg/api/types.generated.go +++ b/pkg/api/types.generated.go @@ -20576,7 +20576,7 @@ func (x *DNSPolicy) CodecDecodeSelf(d *codec1978.Decoder) { } } -func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { +func (x *NodeSelector) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r @@ -20590,22 +20590,14 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep1516 := !z.EncBinary() yy2arr1516 := z.EncBasicHandle().StructToArray - var yyq1516 [11]bool + var yyq1516 [1]bool _, _, _ = yysep1516, yyq1516, yy2arr1516 const yyr1516 bool = false - yyq1516[2] = x.RestartPolicy != "" - yyq1516[3] = x.TerminationGracePeriodSeconds != nil - yyq1516[4] = x.ActiveDeadlineSeconds != nil - yyq1516[5] = x.DNSPolicy != "" - yyq1516[6] = len(x.NodeSelector) != 0 - yyq1516[8] = x.NodeName != "" - yyq1516[9] = x.SecurityContext != nil - yyq1516[10] = len(x.ImagePullSecrets) != 0 var yynn1516 int if yyr1516 || yy2arr1516 { - r.EncodeArrayStart(11) + r.EncodeArrayStart(1) } else { - yynn1516 = 3 + yynn1516 = 1 for _, b := range yyq1516 { if b { yynn1516++ @@ -20616,288 +20608,28 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr1516 || yy2arr1516 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Volumes == nil { + if x.NodeSelectorTerms == nil { r.EncodeNil() } else { yym1518 := z.EncBinary() _ = yym1518 if false { } else { - h.encSliceVolume(([]Volume)(x.Volumes), e) + h.encSliceNodeSelectorTerm(([]NodeSelectorTerm)(x.NodeSelectorTerms), e) } } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("volumes")) + r.EncodeString(codecSelferC_UTF81234, string("nodeSelectorTerms")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Volumes == nil { + if x.NodeSelectorTerms == nil { r.EncodeNil() } else { yym1519 := z.EncBinary() _ = yym1519 if false { } else { - h.encSliceVolume(([]Volume)(x.Volumes), e) - } - } - } - if yyr1516 || yy2arr1516 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Containers == nil { - r.EncodeNil() - } else { - yym1521 := z.EncBinary() - _ = yym1521 - if false { - } else { - h.encSliceContainer(([]Container)(x.Containers), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("containers")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Containers == nil { - r.EncodeNil() - } else { - yym1522 := z.EncBinary() - _ = yym1522 - if false { - } else { - h.encSliceContainer(([]Container)(x.Containers), e) - } - } - } - if yyr1516 || yy2arr1516 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1516[2] { - x.RestartPolicy.CodecEncodeSelf(e) - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1516[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("restartPolicy")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - x.RestartPolicy.CodecEncodeSelf(e) - } - } - if yyr1516 || yy2arr1516 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1516[3] { - if x.TerminationGracePeriodSeconds == nil { - r.EncodeNil() - } else { - yy1525 := *x.TerminationGracePeriodSeconds - yym1526 := z.EncBinary() - _ = yym1526 - if false { - } else { - r.EncodeInt(int64(yy1525)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1516[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("terminationGracePeriodSeconds")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.TerminationGracePeriodSeconds == nil { - r.EncodeNil() - } else { - yy1527 := *x.TerminationGracePeriodSeconds - yym1528 := z.EncBinary() - _ = yym1528 - if false { - } else { - r.EncodeInt(int64(yy1527)) - } - } - } - } - if yyr1516 || yy2arr1516 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1516[4] { - if x.ActiveDeadlineSeconds == nil { - r.EncodeNil() - } else { - yy1530 := *x.ActiveDeadlineSeconds - yym1531 := z.EncBinary() - _ = yym1531 - if false { - } else { - r.EncodeInt(int64(yy1530)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1516[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("activeDeadlineSeconds")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.ActiveDeadlineSeconds == nil { - r.EncodeNil() - } else { - yy1532 := *x.ActiveDeadlineSeconds - yym1533 := z.EncBinary() - _ = yym1533 - if false { - } else { - r.EncodeInt(int64(yy1532)) - } - } - } - } - if yyr1516 || yy2arr1516 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1516[5] { - x.DNSPolicy.CodecEncodeSelf(e) - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1516[5] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("dnsPolicy")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - x.DNSPolicy.CodecEncodeSelf(e) - } - } - if yyr1516 || yy2arr1516 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1516[6] { - if x.NodeSelector == nil { - r.EncodeNil() - } else { - yym1536 := z.EncBinary() - _ = yym1536 - if false { - } else { - z.F.EncMapStringStringV(x.NodeSelector, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1516[6] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("nodeSelector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.NodeSelector == nil { - r.EncodeNil() - } else { - yym1537 := z.EncBinary() - _ = yym1537 - if false { - } else { - z.F.EncMapStringStringV(x.NodeSelector, false, e) - } - } - } - } - if yyr1516 || yy2arr1516 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1539 := z.EncBinary() - _ = yym1539 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountName)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("serviceAccountName")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1540 := z.EncBinary() - _ = yym1540 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountName)) - } - } - if yyr1516 || yy2arr1516 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1516[8] { - yym1542 := z.EncBinary() - _ = yym1542 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.NodeName)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1516[8] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("nodeName")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1543 := z.EncBinary() - _ = yym1543 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.NodeName)) - } - } - } - if yyr1516 || yy2arr1516 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1516[9] { - if x.SecurityContext == nil { - r.EncodeNil() - } else { - x.SecurityContext.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } else { - if yyq1516[9] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("securityContext")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.SecurityContext == nil { - r.EncodeNil() - } else { - x.SecurityContext.CodecEncodeSelf(e) - } - } - } - if yyr1516 || yy2arr1516 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1516[10] { - if x.ImagePullSecrets == nil { - r.EncodeNil() - } else { - yym1546 := z.EncBinary() - _ = yym1546 - if false { - } else { - h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1516[10] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("imagePullSecrets")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.ImagePullSecrets == nil { - r.EncodeNil() - } else { - yym1547 := z.EncBinary() - _ = yym1547 - if false { - } else { - h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e) - } + h.encSliceNodeSelectorTerm(([]NodeSelectorTerm)(x.NodeSelectorTerms), e) } } } @@ -20910,29 +20642,1623 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } +func (x *NodeSelector) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1520 := z.DecBinary() + _ = yym1520 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1521 := r.ContainerType() + if yyct1521 == codecSelferValueTypeMap1234 { + yyl1521 := r.ReadMapStart() + if yyl1521 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1521, d) + } + } else if yyct1521 == codecSelferValueTypeArray1234 { + yyl1521 := r.ReadArrayStart() + if yyl1521 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1521, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *NodeSelector) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1522Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1522Slc + var yyhl1522 bool = l >= 0 + for yyj1522 := 0; ; yyj1522++ { + if yyhl1522 { + if yyj1522 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1522Slc = r.DecodeBytes(yys1522Slc, true, true) + yys1522 := string(yys1522Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1522 { + case "nodeSelectorTerms": + if r.TryDecodeAsNil() { + x.NodeSelectorTerms = nil + } else { + yyv1523 := &x.NodeSelectorTerms + yym1524 := z.DecBinary() + _ = yym1524 + if false { + } else { + h.decSliceNodeSelectorTerm((*[]NodeSelectorTerm)(yyv1523), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys1522) + } // end switch yys1522 + } // end for yyj1522 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *NodeSelector) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1525 int + var yyb1525 bool + var yyhl1525 bool = l >= 0 + yyj1525++ + if yyhl1525 { + yyb1525 = yyj1525 > l + } else { + yyb1525 = r.CheckBreak() + } + if yyb1525 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.NodeSelectorTerms = nil + } else { + yyv1526 := &x.NodeSelectorTerms + yym1527 := z.DecBinary() + _ = yym1527 + if false { + } else { + h.decSliceNodeSelectorTerm((*[]NodeSelectorTerm)(yyv1526), d) + } + } + for { + yyj1525++ + if yyhl1525 { + yyb1525 = yyj1525 > l + } else { + yyb1525 = r.CheckBreak() + } + if yyb1525 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1525-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *NodeSelectorTerm) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1528 := z.EncBinary() + _ = yym1528 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1529 := !z.EncBinary() + yy2arr1529 := z.EncBasicHandle().StructToArray + var yyq1529 [1]bool + _, _, _ = yysep1529, yyq1529, yy2arr1529 + const yyr1529 bool = false + var yynn1529 int + if yyr1529 || yy2arr1529 { + r.EncodeArrayStart(1) + } else { + yynn1529 = 1 + for _, b := range yyq1529 { + if b { + yynn1529++ + } + } + r.EncodeMapStart(yynn1529) + yynn1529 = 0 + } + if yyr1529 || yy2arr1529 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.MatchExpressions == nil { + r.EncodeNil() + } else { + yym1531 := z.EncBinary() + _ = yym1531 + if false { + } else { + h.encSliceNodeSelectorRequirement(([]NodeSelectorRequirement)(x.MatchExpressions), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("matchExpressions")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.MatchExpressions == nil { + r.EncodeNil() + } else { + yym1532 := z.EncBinary() + _ = yym1532 + if false { + } else { + h.encSliceNodeSelectorRequirement(([]NodeSelectorRequirement)(x.MatchExpressions), e) + } + } + } + if yyr1529 || yy2arr1529 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *NodeSelectorTerm) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1533 := z.DecBinary() + _ = yym1533 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1534 := r.ContainerType() + if yyct1534 == codecSelferValueTypeMap1234 { + yyl1534 := r.ReadMapStart() + if yyl1534 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1534, d) + } + } else if yyct1534 == codecSelferValueTypeArray1234 { + yyl1534 := r.ReadArrayStart() + if yyl1534 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1534, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *NodeSelectorTerm) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1535Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1535Slc + var yyhl1535 bool = l >= 0 + for yyj1535 := 0; ; yyj1535++ { + if yyhl1535 { + if yyj1535 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1535Slc = r.DecodeBytes(yys1535Slc, true, true) + yys1535 := string(yys1535Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1535 { + case "matchExpressions": + if r.TryDecodeAsNil() { + x.MatchExpressions = nil + } else { + yyv1536 := &x.MatchExpressions + yym1537 := z.DecBinary() + _ = yym1537 + if false { + } else { + h.decSliceNodeSelectorRequirement((*[]NodeSelectorRequirement)(yyv1536), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys1535) + } // end switch yys1535 + } // end for yyj1535 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *NodeSelectorTerm) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1538 int + var yyb1538 bool + var yyhl1538 bool = l >= 0 + yyj1538++ + if yyhl1538 { + yyb1538 = yyj1538 > l + } else { + yyb1538 = r.CheckBreak() + } + if yyb1538 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.MatchExpressions = nil + } else { + yyv1539 := &x.MatchExpressions + yym1540 := z.DecBinary() + _ = yym1540 + if false { + } else { + h.decSliceNodeSelectorRequirement((*[]NodeSelectorRequirement)(yyv1539), d) + } + } + for { + yyj1538++ + if yyhl1538 { + yyb1538 = yyj1538 > l + } else { + yyb1538 = r.CheckBreak() + } + if yyb1538 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1538-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *NodeSelectorRequirement) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1541 := z.EncBinary() + _ = yym1541 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1542 := !z.EncBinary() + yy2arr1542 := z.EncBasicHandle().StructToArray + var yyq1542 [3]bool + _, _, _ = yysep1542, yyq1542, yy2arr1542 + const yyr1542 bool = false + yyq1542[2] = len(x.Values) != 0 + var yynn1542 int + if yyr1542 || yy2arr1542 { + r.EncodeArrayStart(3) + } else { + yynn1542 = 2 + for _, b := range yyq1542 { + if b { + yynn1542++ + } + } + r.EncodeMapStart(yynn1542) + yynn1542 = 0 + } + if yyr1542 || yy2arr1542 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym1544 := z.EncBinary() + _ = yym1544 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Key)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("key")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1545 := z.EncBinary() + _ = yym1545 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Key)) + } + } + if yyr1542 || yy2arr1542 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + x.Operator.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("operator")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Operator.CodecEncodeSelf(e) + } + if yyr1542 || yy2arr1542 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1542[2] { + if x.Values == nil { + r.EncodeNil() + } else { + yym1548 := z.EncBinary() + _ = yym1548 + if false { + } else { + z.F.EncSliceStringV(x.Values, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq1542[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("values")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Values == nil { + r.EncodeNil() + } else { + yym1549 := z.EncBinary() + _ = yym1549 + if false { + } else { + z.F.EncSliceStringV(x.Values, false, e) + } + } + } + } + if yyr1542 || yy2arr1542 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *NodeSelectorRequirement) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1550 := z.DecBinary() + _ = yym1550 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1551 := r.ContainerType() + if yyct1551 == codecSelferValueTypeMap1234 { + yyl1551 := r.ReadMapStart() + if yyl1551 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1551, d) + } + } else if yyct1551 == codecSelferValueTypeArray1234 { + yyl1551 := r.ReadArrayStart() + if yyl1551 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1551, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *NodeSelectorRequirement) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1552Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1552Slc + var yyhl1552 bool = l >= 0 + for yyj1552 := 0; ; yyj1552++ { + if yyhl1552 { + if yyj1552 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1552Slc = r.DecodeBytes(yys1552Slc, true, true) + yys1552 := string(yys1552Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1552 { + case "key": + if r.TryDecodeAsNil() { + x.Key = "" + } else { + x.Key = string(r.DecodeString()) + } + case "operator": + if r.TryDecodeAsNil() { + x.Operator = "" + } else { + x.Operator = NodeSelectorOperator(r.DecodeString()) + } + case "values": + if r.TryDecodeAsNil() { + x.Values = nil + } else { + yyv1555 := &x.Values + yym1556 := z.DecBinary() + _ = yym1556 + if false { + } else { + z.F.DecSliceStringX(yyv1555, false, d) + } + } + default: + z.DecStructFieldNotFound(-1, yys1552) + } // end switch yys1552 + } // end for yyj1552 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *NodeSelectorRequirement) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1557 int + var yyb1557 bool + var yyhl1557 bool = l >= 0 + yyj1557++ + if yyhl1557 { + yyb1557 = yyj1557 > l + } else { + yyb1557 = r.CheckBreak() + } + if yyb1557 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Key = "" + } else { + x.Key = string(r.DecodeString()) + } + yyj1557++ + if yyhl1557 { + yyb1557 = yyj1557 > l + } else { + yyb1557 = r.CheckBreak() + } + if yyb1557 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Operator = "" + } else { + x.Operator = NodeSelectorOperator(r.DecodeString()) + } + yyj1557++ + if yyhl1557 { + yyb1557 = yyj1557 > l + } else { + yyb1557 = r.CheckBreak() + } + if yyb1557 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Values = nil + } else { + yyv1560 := &x.Values + yym1561 := z.DecBinary() + _ = yym1561 + if false { + } else { + z.F.DecSliceStringX(yyv1560, false, d) + } + } + for { + yyj1557++ + if yyhl1557 { + yyb1557 = yyj1557 > l + } else { + yyb1557 = r.CheckBreak() + } + if yyb1557 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1557-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x NodeSelectorOperator) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1562 := z.EncBinary() + _ = yym1562 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *NodeSelectorOperator) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1563 := z.DecBinary() + _ = yym1563 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *Affinity) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1564 := z.EncBinary() + _ = yym1564 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1565 := !z.EncBinary() + yy2arr1565 := z.EncBasicHandle().StructToArray + var yyq1565 [1]bool + _, _, _ = yysep1565, yyq1565, yy2arr1565 + const yyr1565 bool = false + yyq1565[0] = x.NodeAffinity != nil + var yynn1565 int + if yyr1565 || yy2arr1565 { + r.EncodeArrayStart(1) + } else { + yynn1565 = 0 + for _, b := range yyq1565 { + if b { + yynn1565++ + } + } + r.EncodeMapStart(yynn1565) + yynn1565 = 0 + } + if yyr1565 || yy2arr1565 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1565[0] { + if x.NodeAffinity == nil { + r.EncodeNil() + } else { + x.NodeAffinity.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq1565[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("nodeAffinity")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.NodeAffinity == nil { + r.EncodeNil() + } else { + x.NodeAffinity.CodecEncodeSelf(e) + } + } + } + if yyr1565 || yy2arr1565 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *Affinity) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1567 := z.DecBinary() + _ = yym1567 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1568 := r.ContainerType() + if yyct1568 == codecSelferValueTypeMap1234 { + yyl1568 := r.ReadMapStart() + if yyl1568 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1568, d) + } + } else if yyct1568 == codecSelferValueTypeArray1234 { + yyl1568 := r.ReadArrayStart() + if yyl1568 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1568, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *Affinity) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1569Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1569Slc + var yyhl1569 bool = l >= 0 + for yyj1569 := 0; ; yyj1569++ { + if yyhl1569 { + if yyj1569 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1569Slc = r.DecodeBytes(yys1569Slc, true, true) + yys1569 := string(yys1569Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1569 { + case "nodeAffinity": + if r.TryDecodeAsNil() { + if x.NodeAffinity != nil { + x.NodeAffinity = nil + } + } else { + if x.NodeAffinity == nil { + x.NodeAffinity = new(NodeAffinity) + } + x.NodeAffinity.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys1569) + } // end switch yys1569 + } // end for yyj1569 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *Affinity) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1571 int + var yyb1571 bool + var yyhl1571 bool = l >= 0 + yyj1571++ + if yyhl1571 { + yyb1571 = yyj1571 > l + } else { + yyb1571 = r.CheckBreak() + } + if yyb1571 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.NodeAffinity != nil { + x.NodeAffinity = nil + } + } else { + if x.NodeAffinity == nil { + x.NodeAffinity = new(NodeAffinity) + } + x.NodeAffinity.CodecDecodeSelf(d) + } + for { + yyj1571++ + if yyhl1571 { + yyb1571 = yyj1571 > l + } else { + yyb1571 = r.CheckBreak() + } + if yyb1571 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1571-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *NodeAffinity) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1573 := z.EncBinary() + _ = yym1573 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1574 := !z.EncBinary() + yy2arr1574 := z.EncBasicHandle().StructToArray + var yyq1574 [3]bool + _, _, _ = yysep1574, yyq1574, yy2arr1574 + const yyr1574 bool = false + yyq1574[0] = x.RequiredDuringSchedulingRequiredDuringExecution != nil + yyq1574[1] = x.RequiredDuringSchedulingIgnoredDuringExecution != nil + yyq1574[2] = len(x.PreferredDuringSchedulingIgnoredDuringExecution) != 0 + var yynn1574 int + if yyr1574 || yy2arr1574 { + r.EncodeArrayStart(3) + } else { + yynn1574 = 0 + for _, b := range yyq1574 { + if b { + yynn1574++ + } + } + r.EncodeMapStart(yynn1574) + yynn1574 = 0 + } + if yyr1574 || yy2arr1574 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1574[0] { + if x.RequiredDuringSchedulingRequiredDuringExecution == nil { + r.EncodeNil() + } else { + x.RequiredDuringSchedulingRequiredDuringExecution.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq1574[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("requiredDuringSchedulingRequiredDuringExecution")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.RequiredDuringSchedulingRequiredDuringExecution == nil { + r.EncodeNil() + } else { + x.RequiredDuringSchedulingRequiredDuringExecution.CodecEncodeSelf(e) + } + } + } + if yyr1574 || yy2arr1574 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1574[1] { + if x.RequiredDuringSchedulingIgnoredDuringExecution == nil { + r.EncodeNil() + } else { + x.RequiredDuringSchedulingIgnoredDuringExecution.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq1574[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("requiredDuringSchedulingIgnoredDuringExecution")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.RequiredDuringSchedulingIgnoredDuringExecution == nil { + r.EncodeNil() + } else { + x.RequiredDuringSchedulingIgnoredDuringExecution.CodecEncodeSelf(e) + } + } + } + if yyr1574 || yy2arr1574 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1574[2] { + if x.PreferredDuringSchedulingIgnoredDuringExecution == nil { + r.EncodeNil() + } else { + yym1578 := z.EncBinary() + _ = yym1578 + if false { + } else { + h.encSlicePreferredSchedulingTerm(([]PreferredSchedulingTerm)(x.PreferredDuringSchedulingIgnoredDuringExecution), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq1574[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("preferredDuringSchedulingIgnoredDuringExecution")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.PreferredDuringSchedulingIgnoredDuringExecution == nil { + r.EncodeNil() + } else { + yym1579 := z.EncBinary() + _ = yym1579 + if false { + } else { + h.encSlicePreferredSchedulingTerm(([]PreferredSchedulingTerm)(x.PreferredDuringSchedulingIgnoredDuringExecution), e) + } + } + } + } + if yyr1574 || yy2arr1574 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *NodeAffinity) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1580 := z.DecBinary() + _ = yym1580 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1581 := r.ContainerType() + if yyct1581 == codecSelferValueTypeMap1234 { + yyl1581 := r.ReadMapStart() + if yyl1581 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1581, d) + } + } else if yyct1581 == codecSelferValueTypeArray1234 { + yyl1581 := r.ReadArrayStart() + if yyl1581 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1581, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *NodeAffinity) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1582Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1582Slc + var yyhl1582 bool = l >= 0 + for yyj1582 := 0; ; yyj1582++ { + if yyhl1582 { + if yyj1582 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1582Slc = r.DecodeBytes(yys1582Slc, true, true) + yys1582 := string(yys1582Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1582 { + case "requiredDuringSchedulingRequiredDuringExecution": + if r.TryDecodeAsNil() { + if x.RequiredDuringSchedulingRequiredDuringExecution != nil { + x.RequiredDuringSchedulingRequiredDuringExecution = nil + } + } else { + if x.RequiredDuringSchedulingRequiredDuringExecution == nil { + x.RequiredDuringSchedulingRequiredDuringExecution = new(NodeSelector) + } + x.RequiredDuringSchedulingRequiredDuringExecution.CodecDecodeSelf(d) + } + case "requiredDuringSchedulingIgnoredDuringExecution": + if r.TryDecodeAsNil() { + if x.RequiredDuringSchedulingIgnoredDuringExecution != nil { + x.RequiredDuringSchedulingIgnoredDuringExecution = nil + } + } else { + if x.RequiredDuringSchedulingIgnoredDuringExecution == nil { + x.RequiredDuringSchedulingIgnoredDuringExecution = new(NodeSelector) + } + x.RequiredDuringSchedulingIgnoredDuringExecution.CodecDecodeSelf(d) + } + case "preferredDuringSchedulingIgnoredDuringExecution": + if r.TryDecodeAsNil() { + x.PreferredDuringSchedulingIgnoredDuringExecution = nil + } else { + yyv1585 := &x.PreferredDuringSchedulingIgnoredDuringExecution + yym1586 := z.DecBinary() + _ = yym1586 + if false { + } else { + h.decSlicePreferredSchedulingTerm((*[]PreferredSchedulingTerm)(yyv1585), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys1582) + } // end switch yys1582 + } // end for yyj1582 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *NodeAffinity) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1587 int + var yyb1587 bool + var yyhl1587 bool = l >= 0 + yyj1587++ + if yyhl1587 { + yyb1587 = yyj1587 > l + } else { + yyb1587 = r.CheckBreak() + } + if yyb1587 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.RequiredDuringSchedulingRequiredDuringExecution != nil { + x.RequiredDuringSchedulingRequiredDuringExecution = nil + } + } else { + if x.RequiredDuringSchedulingRequiredDuringExecution == nil { + x.RequiredDuringSchedulingRequiredDuringExecution = new(NodeSelector) + } + x.RequiredDuringSchedulingRequiredDuringExecution.CodecDecodeSelf(d) + } + yyj1587++ + if yyhl1587 { + yyb1587 = yyj1587 > l + } else { + yyb1587 = r.CheckBreak() + } + if yyb1587 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.RequiredDuringSchedulingIgnoredDuringExecution != nil { + x.RequiredDuringSchedulingIgnoredDuringExecution = nil + } + } else { + if x.RequiredDuringSchedulingIgnoredDuringExecution == nil { + x.RequiredDuringSchedulingIgnoredDuringExecution = new(NodeSelector) + } + x.RequiredDuringSchedulingIgnoredDuringExecution.CodecDecodeSelf(d) + } + yyj1587++ + if yyhl1587 { + yyb1587 = yyj1587 > l + } else { + yyb1587 = r.CheckBreak() + } + if yyb1587 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.PreferredDuringSchedulingIgnoredDuringExecution = nil + } else { + yyv1590 := &x.PreferredDuringSchedulingIgnoredDuringExecution + yym1591 := z.DecBinary() + _ = yym1591 + if false { + } else { + h.decSlicePreferredSchedulingTerm((*[]PreferredSchedulingTerm)(yyv1590), d) + } + } + for { + yyj1587++ + if yyhl1587 { + yyb1587 = yyj1587 > l + } else { + yyb1587 = r.CheckBreak() + } + if yyb1587 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1587-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *PreferredSchedulingTerm) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1592 := z.EncBinary() + _ = yym1592 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1593 := !z.EncBinary() + yy2arr1593 := z.EncBasicHandle().StructToArray + var yyq1593 [2]bool + _, _, _ = yysep1593, yyq1593, yy2arr1593 + const yyr1593 bool = false + var yynn1593 int + if yyr1593 || yy2arr1593 { + r.EncodeArrayStart(2) + } else { + yynn1593 = 2 + for _, b := range yyq1593 { + if b { + yynn1593++ + } + } + r.EncodeMapStart(yynn1593) + yynn1593 = 0 + } + if yyr1593 || yy2arr1593 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym1595 := z.EncBinary() + _ = yym1595 + if false { + } else { + r.EncodeInt(int64(x.Weight)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("weight")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1596 := z.EncBinary() + _ = yym1596 + if false { + } else { + r.EncodeInt(int64(x.Weight)) + } + } + if yyr1593 || yy2arr1593 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy1598 := &x.Preference + yy1598.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("preference")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy1599 := &x.Preference + yy1599.CodecEncodeSelf(e) + } + if yyr1593 || yy2arr1593 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *PreferredSchedulingTerm) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1600 := z.DecBinary() + _ = yym1600 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1601 := r.ContainerType() + if yyct1601 == codecSelferValueTypeMap1234 { + yyl1601 := r.ReadMapStart() + if yyl1601 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1601, d) + } + } else if yyct1601 == codecSelferValueTypeArray1234 { + yyl1601 := r.ReadArrayStart() + if yyl1601 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1601, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *PreferredSchedulingTerm) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1602Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1602Slc + var yyhl1602 bool = l >= 0 + for yyj1602 := 0; ; yyj1602++ { + if yyhl1602 { + if yyj1602 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1602Slc = r.DecodeBytes(yys1602Slc, true, true) + yys1602 := string(yys1602Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1602 { + case "weight": + if r.TryDecodeAsNil() { + x.Weight = 0 + } else { + x.Weight = int(r.DecodeInt(codecSelferBitsize1234)) + } + case "preference": + if r.TryDecodeAsNil() { + x.Preference = NodeSelectorTerm{} + } else { + yyv1604 := &x.Preference + yyv1604.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys1602) + } // end switch yys1602 + } // end for yyj1602 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *PreferredSchedulingTerm) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1605 int + var yyb1605 bool + var yyhl1605 bool = l >= 0 + yyj1605++ + if yyhl1605 { + yyb1605 = yyj1605 > l + } else { + yyb1605 = r.CheckBreak() + } + if yyb1605 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Weight = 0 + } else { + x.Weight = int(r.DecodeInt(codecSelferBitsize1234)) + } + yyj1605++ + if yyhl1605 { + yyb1605 = yyj1605 > l + } else { + yyb1605 = r.CheckBreak() + } + if yyb1605 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Preference = NodeSelectorTerm{} + } else { + yyv1607 := &x.Preference + yyv1607.CodecDecodeSelf(d) + } + for { + yyj1605++ + if yyhl1605 { + yyb1605 = yyj1605 > l + } else { + yyb1605 = r.CheckBreak() + } + if yyb1605 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1605-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1608 := z.EncBinary() + _ = yym1608 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1609 := !z.EncBinary() + yy2arr1609 := z.EncBasicHandle().StructToArray + var yyq1609 [11]bool + _, _, _ = yysep1609, yyq1609, yy2arr1609 + const yyr1609 bool = false + yyq1609[2] = x.RestartPolicy != "" + yyq1609[3] = x.TerminationGracePeriodSeconds != nil + yyq1609[4] = x.ActiveDeadlineSeconds != nil + yyq1609[5] = x.DNSPolicy != "" + yyq1609[6] = len(x.NodeSelector) != 0 + yyq1609[8] = x.NodeName != "" + yyq1609[9] = x.SecurityContext != nil + yyq1609[10] = len(x.ImagePullSecrets) != 0 + var yynn1609 int + if yyr1609 || yy2arr1609 { + r.EncodeArrayStart(11) + } else { + yynn1609 = 3 + for _, b := range yyq1609 { + if b { + yynn1609++ + } + } + r.EncodeMapStart(yynn1609) + yynn1609 = 0 + } + if yyr1609 || yy2arr1609 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Volumes == nil { + r.EncodeNil() + } else { + yym1611 := z.EncBinary() + _ = yym1611 + if false { + } else { + h.encSliceVolume(([]Volume)(x.Volumes), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("volumes")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Volumes == nil { + r.EncodeNil() + } else { + yym1612 := z.EncBinary() + _ = yym1612 + if false { + } else { + h.encSliceVolume(([]Volume)(x.Volumes), e) + } + } + } + if yyr1609 || yy2arr1609 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Containers == nil { + r.EncodeNil() + } else { + yym1614 := z.EncBinary() + _ = yym1614 + if false { + } else { + h.encSliceContainer(([]Container)(x.Containers), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("containers")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Containers == nil { + r.EncodeNil() + } else { + yym1615 := z.EncBinary() + _ = yym1615 + if false { + } else { + h.encSliceContainer(([]Container)(x.Containers), e) + } + } + } + if yyr1609 || yy2arr1609 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1609[2] { + x.RestartPolicy.CodecEncodeSelf(e) + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq1609[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("restartPolicy")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.RestartPolicy.CodecEncodeSelf(e) + } + } + if yyr1609 || yy2arr1609 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1609[3] { + if x.TerminationGracePeriodSeconds == nil { + r.EncodeNil() + } else { + yy1618 := *x.TerminationGracePeriodSeconds + yym1619 := z.EncBinary() + _ = yym1619 + if false { + } else { + r.EncodeInt(int64(yy1618)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq1609[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("terminationGracePeriodSeconds")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.TerminationGracePeriodSeconds == nil { + r.EncodeNil() + } else { + yy1620 := *x.TerminationGracePeriodSeconds + yym1621 := z.EncBinary() + _ = yym1621 + if false { + } else { + r.EncodeInt(int64(yy1620)) + } + } + } + } + if yyr1609 || yy2arr1609 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1609[4] { + if x.ActiveDeadlineSeconds == nil { + r.EncodeNil() + } else { + yy1623 := *x.ActiveDeadlineSeconds + yym1624 := z.EncBinary() + _ = yym1624 + if false { + } else { + r.EncodeInt(int64(yy1623)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq1609[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("activeDeadlineSeconds")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.ActiveDeadlineSeconds == nil { + r.EncodeNil() + } else { + yy1625 := *x.ActiveDeadlineSeconds + yym1626 := z.EncBinary() + _ = yym1626 + if false { + } else { + r.EncodeInt(int64(yy1625)) + } + } + } + } + if yyr1609 || yy2arr1609 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1609[5] { + x.DNSPolicy.CodecEncodeSelf(e) + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq1609[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("dnsPolicy")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.DNSPolicy.CodecEncodeSelf(e) + } + } + if yyr1609 || yy2arr1609 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1609[6] { + if x.NodeSelector == nil { + r.EncodeNil() + } else { + yym1629 := z.EncBinary() + _ = yym1629 + if false { + } else { + z.F.EncMapStringStringV(x.NodeSelector, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq1609[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("nodeSelector")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.NodeSelector == nil { + r.EncodeNil() + } else { + yym1630 := z.EncBinary() + _ = yym1630 + if false { + } else { + z.F.EncMapStringStringV(x.NodeSelector, false, e) + } + } + } + } + if yyr1609 || yy2arr1609 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym1632 := z.EncBinary() + _ = yym1632 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountName)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("serviceAccountName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1633 := z.EncBinary() + _ = yym1633 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountName)) + } + } + if yyr1609 || yy2arr1609 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1609[8] { + yym1635 := z.EncBinary() + _ = yym1635 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.NodeName)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq1609[8] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("nodeName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1636 := z.EncBinary() + _ = yym1636 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.NodeName)) + } + } + } + if yyr1609 || yy2arr1609 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1609[9] { + if x.SecurityContext == nil { + r.EncodeNil() + } else { + x.SecurityContext.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq1609[9] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("securityContext")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.SecurityContext == nil { + r.EncodeNil() + } else { + x.SecurityContext.CodecEncodeSelf(e) + } + } + } + if yyr1609 || yy2arr1609 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1609[10] { + if x.ImagePullSecrets == nil { + r.EncodeNil() + } else { + yym1639 := z.EncBinary() + _ = yym1639 + if false { + } else { + h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq1609[10] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("imagePullSecrets")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.ImagePullSecrets == nil { + r.EncodeNil() + } else { + yym1640 := z.EncBinary() + _ = yym1640 + if false { + } else { + h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e) + } + } + } + } + if yyr1609 || yy2arr1609 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + func (x *PodSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1548 := z.DecBinary() - _ = yym1548 + yym1641 := z.DecBinary() + _ = yym1641 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1549 := r.ContainerType() - if yyct1549 == codecSelferValueTypeMap1234 { - yyl1549 := r.ReadMapStart() - if yyl1549 == 0 { + yyct1642 := r.ContainerType() + if yyct1642 == codecSelferValueTypeMap1234 { + yyl1642 := r.ReadMapStart() + if yyl1642 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1549, d) + x.codecDecodeSelfFromMap(yyl1642, d) } - } else if yyct1549 == codecSelferValueTypeArray1234 { - yyl1549 := r.ReadArrayStart() - if yyl1549 == 0 { + } else if yyct1642 == codecSelferValueTypeArray1234 { + yyl1642 := r.ReadArrayStart() + if yyl1642 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1549, d) + x.codecDecodeSelfFromArray(yyl1642, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -20944,12 +22270,12 @@ func (x *PodSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1550Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1550Slc - var yyhl1550 bool = l >= 0 - for yyj1550 := 0; ; yyj1550++ { - if yyhl1550 { - if yyj1550 >= l { + var yys1643Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1643Slc + var yyhl1643 bool = l >= 0 + for yyj1643 := 0; ; yyj1643++ { + if yyhl1643 { + if yyj1643 >= l { break } } else { @@ -20958,32 +22284,32 @@ func (x *PodSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1550Slc = r.DecodeBytes(yys1550Slc, true, true) - yys1550 := string(yys1550Slc) + yys1643Slc = r.DecodeBytes(yys1643Slc, true, true) + yys1643 := string(yys1643Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1550 { + switch yys1643 { case "volumes": if r.TryDecodeAsNil() { x.Volumes = nil } else { - yyv1551 := &x.Volumes - yym1552 := z.DecBinary() - _ = yym1552 + yyv1644 := &x.Volumes + yym1645 := z.DecBinary() + _ = yym1645 if false { } else { - h.decSliceVolume((*[]Volume)(yyv1551), d) + h.decSliceVolume((*[]Volume)(yyv1644), d) } } case "containers": if r.TryDecodeAsNil() { x.Containers = nil } else { - yyv1553 := &x.Containers - yym1554 := z.DecBinary() - _ = yym1554 + yyv1646 := &x.Containers + yym1647 := z.DecBinary() + _ = yym1647 if false { } else { - h.decSliceContainer((*[]Container)(yyv1553), d) + h.decSliceContainer((*[]Container)(yyv1646), d) } } case "restartPolicy": @@ -21001,8 +22327,8 @@ func (x *PodSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.TerminationGracePeriodSeconds == nil { x.TerminationGracePeriodSeconds = new(int64) } - yym1557 := z.DecBinary() - _ = yym1557 + yym1650 := z.DecBinary() + _ = yym1650 if false { } else { *((*int64)(x.TerminationGracePeriodSeconds)) = int64(r.DecodeInt(64)) @@ -21017,8 +22343,8 @@ func (x *PodSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.ActiveDeadlineSeconds == nil { x.ActiveDeadlineSeconds = new(int64) } - yym1559 := z.DecBinary() - _ = yym1559 + yym1652 := z.DecBinary() + _ = yym1652 if false { } else { *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64)) @@ -21034,12 +22360,12 @@ func (x *PodSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.NodeSelector = nil } else { - yyv1561 := &x.NodeSelector - yym1562 := z.DecBinary() - _ = yym1562 + yyv1654 := &x.NodeSelector + yym1655 := z.DecBinary() + _ = yym1655 if false { } else { - z.F.DecMapStringStringX(yyv1561, false, d) + z.F.DecMapStringStringX(yyv1654, false, d) } } case "serviceAccountName": @@ -21069,18 +22395,18 @@ func (x *PodSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ImagePullSecrets = nil } else { - yyv1566 := &x.ImagePullSecrets - yym1567 := z.DecBinary() - _ = yym1567 + yyv1659 := &x.ImagePullSecrets + yym1660 := z.DecBinary() + _ = yym1660 if false { } else { - h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv1566), d) + h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv1659), d) } } default: - z.DecStructFieldNotFound(-1, yys1550) - } // end switch yys1550 - } // end for yyj1550 + z.DecStructFieldNotFound(-1, yys1643) + } // end switch yys1643 + } // end for yyj1643 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -21088,16 +22414,16 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1568 int - var yyb1568 bool - var yyhl1568 bool = l >= 0 - yyj1568++ - if yyhl1568 { - yyb1568 = yyj1568 > l + var yyj1661 int + var yyb1661 bool + var yyhl1661 bool = l >= 0 + yyj1661++ + if yyhl1661 { + yyb1661 = yyj1661 > l } else { - yyb1568 = r.CheckBreak() + yyb1661 = r.CheckBreak() } - if yyb1568 { + if yyb1661 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21105,21 +22431,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Volumes = nil } else { - yyv1569 := &x.Volumes - yym1570 := z.DecBinary() - _ = yym1570 + yyv1662 := &x.Volumes + yym1663 := z.DecBinary() + _ = yym1663 if false { } else { - h.decSliceVolume((*[]Volume)(yyv1569), d) + h.decSliceVolume((*[]Volume)(yyv1662), d) } } - yyj1568++ - if yyhl1568 { - yyb1568 = yyj1568 > l + yyj1661++ + if yyhl1661 { + yyb1661 = yyj1661 > l } else { - yyb1568 = r.CheckBreak() + yyb1661 = r.CheckBreak() } - if yyb1568 { + if yyb1661 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21127,21 +22453,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Containers = nil } else { - yyv1571 := &x.Containers - yym1572 := z.DecBinary() - _ = yym1572 + yyv1664 := &x.Containers + yym1665 := z.DecBinary() + _ = yym1665 if false { } else { - h.decSliceContainer((*[]Container)(yyv1571), d) + h.decSliceContainer((*[]Container)(yyv1664), d) } } - yyj1568++ - if yyhl1568 { - yyb1568 = yyj1568 > l + yyj1661++ + if yyhl1661 { + yyb1661 = yyj1661 > l } else { - yyb1568 = r.CheckBreak() + yyb1661 = r.CheckBreak() } - if yyb1568 { + if yyb1661 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21151,13 +22477,13 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.RestartPolicy = RestartPolicy(r.DecodeString()) } - yyj1568++ - if yyhl1568 { - yyb1568 = yyj1568 > l + yyj1661++ + if yyhl1661 { + yyb1661 = yyj1661 > l } else { - yyb1568 = r.CheckBreak() + yyb1661 = r.CheckBreak() } - if yyb1568 { + if yyb1661 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21170,20 +22496,20 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.TerminationGracePeriodSeconds == nil { x.TerminationGracePeriodSeconds = new(int64) } - yym1575 := z.DecBinary() - _ = yym1575 + yym1668 := z.DecBinary() + _ = yym1668 if false { } else { *((*int64)(x.TerminationGracePeriodSeconds)) = int64(r.DecodeInt(64)) } } - yyj1568++ - if yyhl1568 { - yyb1568 = yyj1568 > l + yyj1661++ + if yyhl1661 { + yyb1661 = yyj1661 > l } else { - yyb1568 = r.CheckBreak() + yyb1661 = r.CheckBreak() } - if yyb1568 { + if yyb1661 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21196,20 +22522,20 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.ActiveDeadlineSeconds == nil { x.ActiveDeadlineSeconds = new(int64) } - yym1577 := z.DecBinary() - _ = yym1577 + yym1670 := z.DecBinary() + _ = yym1670 if false { } else { *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64)) } } - yyj1568++ - if yyhl1568 { - yyb1568 = yyj1568 > l + yyj1661++ + if yyhl1661 { + yyb1661 = yyj1661 > l } else { - yyb1568 = r.CheckBreak() + yyb1661 = r.CheckBreak() } - if yyb1568 { + if yyb1661 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21219,13 +22545,13 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.DNSPolicy = DNSPolicy(r.DecodeString()) } - yyj1568++ - if yyhl1568 { - yyb1568 = yyj1568 > l + yyj1661++ + if yyhl1661 { + yyb1661 = yyj1661 > l } else { - yyb1568 = r.CheckBreak() + yyb1661 = r.CheckBreak() } - if yyb1568 { + if yyb1661 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21233,21 +22559,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.NodeSelector = nil } else { - yyv1579 := &x.NodeSelector - yym1580 := z.DecBinary() - _ = yym1580 + yyv1672 := &x.NodeSelector + yym1673 := z.DecBinary() + _ = yym1673 if false { } else { - z.F.DecMapStringStringX(yyv1579, false, d) + z.F.DecMapStringStringX(yyv1672, false, d) } } - yyj1568++ - if yyhl1568 { - yyb1568 = yyj1568 > l + yyj1661++ + if yyhl1661 { + yyb1661 = yyj1661 > l } else { - yyb1568 = r.CheckBreak() + yyb1661 = r.CheckBreak() } - if yyb1568 { + if yyb1661 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21257,13 +22583,13 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.ServiceAccountName = string(r.DecodeString()) } - yyj1568++ - if yyhl1568 { - yyb1568 = yyj1568 > l + yyj1661++ + if yyhl1661 { + yyb1661 = yyj1661 > l } else { - yyb1568 = r.CheckBreak() + yyb1661 = r.CheckBreak() } - if yyb1568 { + if yyb1661 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21273,13 +22599,13 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.NodeName = string(r.DecodeString()) } - yyj1568++ - if yyhl1568 { - yyb1568 = yyj1568 > l + yyj1661++ + if yyhl1661 { + yyb1661 = yyj1661 > l } else { - yyb1568 = r.CheckBreak() + yyb1661 = r.CheckBreak() } - if yyb1568 { + if yyb1661 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21294,13 +22620,13 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.SecurityContext.CodecDecodeSelf(d) } - yyj1568++ - if yyhl1568 { - yyb1568 = yyj1568 > l + yyj1661++ + if yyhl1661 { + yyb1661 = yyj1661 > l } else { - yyb1568 = r.CheckBreak() + yyb1661 = r.CheckBreak() } - if yyb1568 { + if yyb1661 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21308,26 +22634,26 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ImagePullSecrets = nil } else { - yyv1584 := &x.ImagePullSecrets - yym1585 := z.DecBinary() - _ = yym1585 + yyv1677 := &x.ImagePullSecrets + yym1678 := z.DecBinary() + _ = yym1678 if false { } else { - h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv1584), d) + h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv1677), d) } } for { - yyj1568++ - if yyhl1568 { - yyb1568 = yyj1568 > l + yyj1661++ + if yyhl1661 { + yyb1661 = yyj1661 > l } else { - yyb1568 = r.CheckBreak() + yyb1661 = r.CheckBreak() } - if yyb1568 { + if yyb1661 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1568-1, "") + z.DecStructFieldNotFound(yyj1661-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -21339,42 +22665,42 @@ func (x *PodSecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1586 := z.EncBinary() - _ = yym1586 + yym1679 := z.EncBinary() + _ = yym1679 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1587 := !z.EncBinary() - yy2arr1587 := z.EncBasicHandle().StructToArray - var yyq1587 [8]bool - _, _, _ = yysep1587, yyq1587, yy2arr1587 - const yyr1587 bool = false - yyq1587[0] = x.HostNetwork != false - yyq1587[1] = x.HostPID != false - yyq1587[2] = x.HostIPC != false - yyq1587[3] = x.SELinuxOptions != nil - yyq1587[4] = x.RunAsUser != nil - yyq1587[5] = x.RunAsNonRoot != nil - yyq1587[6] = len(x.SupplementalGroups) != 0 - yyq1587[7] = x.FSGroup != nil - var yynn1587 int - if yyr1587 || yy2arr1587 { + yysep1680 := !z.EncBinary() + yy2arr1680 := z.EncBasicHandle().StructToArray + var yyq1680 [8]bool + _, _, _ = yysep1680, yyq1680, yy2arr1680 + const yyr1680 bool = false + yyq1680[0] = x.HostNetwork != false + yyq1680[1] = x.HostPID != false + yyq1680[2] = x.HostIPC != false + yyq1680[3] = x.SELinuxOptions != nil + yyq1680[4] = x.RunAsUser != nil + yyq1680[5] = x.RunAsNonRoot != nil + yyq1680[6] = len(x.SupplementalGroups) != 0 + yyq1680[7] = x.FSGroup != nil + var yynn1680 int + if yyr1680 || yy2arr1680 { r.EncodeArrayStart(8) } else { - yynn1587 = 0 - for _, b := range yyq1587 { + yynn1680 = 0 + for _, b := range yyq1680 { if b { - yynn1587++ + yynn1680++ } } - r.EncodeMapStart(yynn1587) - yynn1587 = 0 + r.EncodeMapStart(yynn1680) + yynn1680 = 0 } - if yyr1587 || yy2arr1587 { + if yyr1680 || yy2arr1680 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1587[0] { - yym1589 := z.EncBinary() - _ = yym1589 + if yyq1680[0] { + yym1682 := z.EncBinary() + _ = yym1682 if false { } else { r.EncodeBool(bool(x.HostNetwork)) @@ -21383,23 +22709,23 @@ func (x *PodSecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq1587[0] { + if yyq1680[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hostNetwork")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1590 := z.EncBinary() - _ = yym1590 + yym1683 := z.EncBinary() + _ = yym1683 if false { } else { r.EncodeBool(bool(x.HostNetwork)) } } } - if yyr1587 || yy2arr1587 { + if yyr1680 || yy2arr1680 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1587[1] { - yym1592 := z.EncBinary() - _ = yym1592 + if yyq1680[1] { + yym1685 := z.EncBinary() + _ = yym1685 if false { } else { r.EncodeBool(bool(x.HostPID)) @@ -21408,23 +22734,23 @@ func (x *PodSecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq1587[1] { + if yyq1680[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hostPID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1593 := z.EncBinary() - _ = yym1593 + yym1686 := z.EncBinary() + _ = yym1686 if false { } else { r.EncodeBool(bool(x.HostPID)) } } } - if yyr1587 || yy2arr1587 { + if yyr1680 || yy2arr1680 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1587[2] { - yym1595 := z.EncBinary() - _ = yym1595 + if yyq1680[2] { + yym1688 := z.EncBinary() + _ = yym1688 if false { } else { r.EncodeBool(bool(x.HostIPC)) @@ -21433,21 +22759,21 @@ func (x *PodSecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq1587[2] { + if yyq1680[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hostIPC")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1596 := z.EncBinary() - _ = yym1596 + yym1689 := z.EncBinary() + _ = yym1689 if false { } else { r.EncodeBool(bool(x.HostIPC)) } } } - if yyr1587 || yy2arr1587 { + if yyr1680 || yy2arr1680 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1587[3] { + if yyq1680[3] { if x.SELinuxOptions == nil { r.EncodeNil() } else { @@ -21457,7 +22783,7 @@ func (x *PodSecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1587[3] { + if yyq1680[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("seLinuxOptions")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -21468,84 +22794,84 @@ func (x *PodSecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1587 || yy2arr1587 { + if yyr1680 || yy2arr1680 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1587[4] { + if yyq1680[4] { if x.RunAsUser == nil { r.EncodeNil() } else { - yy1599 := *x.RunAsUser - yym1600 := z.EncBinary() - _ = yym1600 + yy1692 := *x.RunAsUser + yym1693 := z.EncBinary() + _ = yym1693 if false { } else { - r.EncodeInt(int64(yy1599)) + r.EncodeInt(int64(yy1692)) } } } else { r.EncodeNil() } } else { - if yyq1587[4] { + if yyq1680[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("runAsUser")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.RunAsUser == nil { r.EncodeNil() } else { - yy1601 := *x.RunAsUser - yym1602 := z.EncBinary() - _ = yym1602 + yy1694 := *x.RunAsUser + yym1695 := z.EncBinary() + _ = yym1695 if false { } else { - r.EncodeInt(int64(yy1601)) + r.EncodeInt(int64(yy1694)) } } } } - if yyr1587 || yy2arr1587 { + if yyr1680 || yy2arr1680 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1587[5] { + if yyq1680[5] { if x.RunAsNonRoot == nil { r.EncodeNil() } else { - yy1604 := *x.RunAsNonRoot - yym1605 := z.EncBinary() - _ = yym1605 + yy1697 := *x.RunAsNonRoot + yym1698 := z.EncBinary() + _ = yym1698 if false { } else { - r.EncodeBool(bool(yy1604)) + r.EncodeBool(bool(yy1697)) } } } else { r.EncodeNil() } } else { - if yyq1587[5] { + if yyq1680[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("runAsNonRoot")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.RunAsNonRoot == nil { r.EncodeNil() } else { - yy1606 := *x.RunAsNonRoot - yym1607 := z.EncBinary() - _ = yym1607 + yy1699 := *x.RunAsNonRoot + yym1700 := z.EncBinary() + _ = yym1700 if false { } else { - r.EncodeBool(bool(yy1606)) + r.EncodeBool(bool(yy1699)) } } } } - if yyr1587 || yy2arr1587 { + if yyr1680 || yy2arr1680 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1587[6] { + if yyq1680[6] { if x.SupplementalGroups == nil { r.EncodeNil() } else { - yym1609 := z.EncBinary() - _ = yym1609 + yym1702 := z.EncBinary() + _ = yym1702 if false { } else { z.F.EncSliceInt64V(x.SupplementalGroups, false, e) @@ -21555,15 +22881,15 @@ func (x *PodSecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1587[6] { + if yyq1680[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("supplementalGroups")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.SupplementalGroups == nil { r.EncodeNil() } else { - yym1610 := z.EncBinary() - _ = yym1610 + yym1703 := z.EncBinary() + _ = yym1703 if false { } else { z.F.EncSliceInt64V(x.SupplementalGroups, false, e) @@ -21571,42 +22897,42 @@ func (x *PodSecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1587 || yy2arr1587 { + if yyr1680 || yy2arr1680 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1587[7] { + if yyq1680[7] { if x.FSGroup == nil { r.EncodeNil() } else { - yy1612 := *x.FSGroup - yym1613 := z.EncBinary() - _ = yym1613 + yy1705 := *x.FSGroup + yym1706 := z.EncBinary() + _ = yym1706 if false { } else { - r.EncodeInt(int64(yy1612)) + r.EncodeInt(int64(yy1705)) } } } else { r.EncodeNil() } } else { - if yyq1587[7] { + if yyq1680[7] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("fsGroup")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.FSGroup == nil { r.EncodeNil() } else { - yy1614 := *x.FSGroup - yym1615 := z.EncBinary() - _ = yym1615 + yy1707 := *x.FSGroup + yym1708 := z.EncBinary() + _ = yym1708 if false { } else { - r.EncodeInt(int64(yy1614)) + r.EncodeInt(int64(yy1707)) } } } } - if yyr1587 || yy2arr1587 { + if yyr1680 || yy2arr1680 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -21619,25 +22945,25 @@ func (x *PodSecurityContext) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1616 := z.DecBinary() - _ = yym1616 + yym1709 := z.DecBinary() + _ = yym1709 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1617 := r.ContainerType() - if yyct1617 == codecSelferValueTypeMap1234 { - yyl1617 := r.ReadMapStart() - if yyl1617 == 0 { + yyct1710 := r.ContainerType() + if yyct1710 == codecSelferValueTypeMap1234 { + yyl1710 := r.ReadMapStart() + if yyl1710 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1617, d) + x.codecDecodeSelfFromMap(yyl1710, d) } - } else if yyct1617 == codecSelferValueTypeArray1234 { - yyl1617 := r.ReadArrayStart() - if yyl1617 == 0 { + } else if yyct1710 == codecSelferValueTypeArray1234 { + yyl1710 := r.ReadArrayStart() + if yyl1710 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1617, d) + x.codecDecodeSelfFromArray(yyl1710, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -21649,12 +22975,12 @@ func (x *PodSecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1618Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1618Slc - var yyhl1618 bool = l >= 0 - for yyj1618 := 0; ; yyj1618++ { - if yyhl1618 { - if yyj1618 >= l { + var yys1711Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1711Slc + var yyhl1711 bool = l >= 0 + for yyj1711 := 0; ; yyj1711++ { + if yyhl1711 { + if yyj1711 >= l { break } } else { @@ -21663,10 +22989,10 @@ func (x *PodSecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1618Slc = r.DecodeBytes(yys1618Slc, true, true) - yys1618 := string(yys1618Slc) + yys1711Slc = r.DecodeBytes(yys1711Slc, true, true) + yys1711 := string(yys1711Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1618 { + switch yys1711 { case "hostNetwork": if r.TryDecodeAsNil() { x.HostNetwork = false @@ -21705,8 +23031,8 @@ func (x *PodSecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) if x.RunAsUser == nil { x.RunAsUser = new(int64) } - yym1624 := z.DecBinary() - _ = yym1624 + yym1717 := z.DecBinary() + _ = yym1717 if false { } else { *((*int64)(x.RunAsUser)) = int64(r.DecodeInt(64)) @@ -21721,8 +23047,8 @@ func (x *PodSecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) if x.RunAsNonRoot == nil { x.RunAsNonRoot = new(bool) } - yym1626 := z.DecBinary() - _ = yym1626 + yym1719 := z.DecBinary() + _ = yym1719 if false { } else { *((*bool)(x.RunAsNonRoot)) = r.DecodeBool() @@ -21732,12 +23058,12 @@ func (x *PodSecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.SupplementalGroups = nil } else { - yyv1627 := &x.SupplementalGroups - yym1628 := z.DecBinary() - _ = yym1628 + yyv1720 := &x.SupplementalGroups + yym1721 := z.DecBinary() + _ = yym1721 if false { } else { - z.F.DecSliceInt64X(yyv1627, false, d) + z.F.DecSliceInt64X(yyv1720, false, d) } } case "fsGroup": @@ -21749,17 +23075,17 @@ func (x *PodSecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) if x.FSGroup == nil { x.FSGroup = new(int64) } - yym1630 := z.DecBinary() - _ = yym1630 + yym1723 := z.DecBinary() + _ = yym1723 if false { } else { *((*int64)(x.FSGroup)) = int64(r.DecodeInt(64)) } } default: - z.DecStructFieldNotFound(-1, yys1618) - } // end switch yys1618 - } // end for yyj1618 + z.DecStructFieldNotFound(-1, yys1711) + } // end switch yys1711 + } // end for yyj1711 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -21767,16 +23093,16 @@ func (x *PodSecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1631 int - var yyb1631 bool - var yyhl1631 bool = l >= 0 - yyj1631++ - if yyhl1631 { - yyb1631 = yyj1631 > l + var yyj1724 int + var yyb1724 bool + var yyhl1724 bool = l >= 0 + yyj1724++ + if yyhl1724 { + yyb1724 = yyj1724 > l } else { - yyb1631 = r.CheckBreak() + yyb1724 = r.CheckBreak() } - if yyb1631 { + if yyb1724 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21786,13 +23112,13 @@ func (x *PodSecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decode } else { x.HostNetwork = bool(r.DecodeBool()) } - yyj1631++ - if yyhl1631 { - yyb1631 = yyj1631 > l + yyj1724++ + if yyhl1724 { + yyb1724 = yyj1724 > l } else { - yyb1631 = r.CheckBreak() + yyb1724 = r.CheckBreak() } - if yyb1631 { + if yyb1724 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21802,13 +23128,13 @@ func (x *PodSecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decode } else { x.HostPID = bool(r.DecodeBool()) } - yyj1631++ - if yyhl1631 { - yyb1631 = yyj1631 > l + yyj1724++ + if yyhl1724 { + yyb1724 = yyj1724 > l } else { - yyb1631 = r.CheckBreak() + yyb1724 = r.CheckBreak() } - if yyb1631 { + if yyb1724 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21818,13 +23144,13 @@ func (x *PodSecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decode } else { x.HostIPC = bool(r.DecodeBool()) } - yyj1631++ - if yyhl1631 { - yyb1631 = yyj1631 > l + yyj1724++ + if yyhl1724 { + yyb1724 = yyj1724 > l } else { - yyb1631 = r.CheckBreak() + yyb1724 = r.CheckBreak() } - if yyb1631 { + if yyb1724 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21839,13 +23165,13 @@ func (x *PodSecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decode } x.SELinuxOptions.CodecDecodeSelf(d) } - yyj1631++ - if yyhl1631 { - yyb1631 = yyj1631 > l + yyj1724++ + if yyhl1724 { + yyb1724 = yyj1724 > l } else { - yyb1631 = r.CheckBreak() + yyb1724 = r.CheckBreak() } - if yyb1631 { + if yyb1724 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21858,20 +23184,20 @@ func (x *PodSecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decode if x.RunAsUser == nil { x.RunAsUser = new(int64) } - yym1637 := z.DecBinary() - _ = yym1637 + yym1730 := z.DecBinary() + _ = yym1730 if false { } else { *((*int64)(x.RunAsUser)) = int64(r.DecodeInt(64)) } } - yyj1631++ - if yyhl1631 { - yyb1631 = yyj1631 > l + yyj1724++ + if yyhl1724 { + yyb1724 = yyj1724 > l } else { - yyb1631 = r.CheckBreak() + yyb1724 = r.CheckBreak() } - if yyb1631 { + if yyb1724 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21884,20 +23210,20 @@ func (x *PodSecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decode if x.RunAsNonRoot == nil { x.RunAsNonRoot = new(bool) } - yym1639 := z.DecBinary() - _ = yym1639 + yym1732 := z.DecBinary() + _ = yym1732 if false { } else { *((*bool)(x.RunAsNonRoot)) = r.DecodeBool() } } - yyj1631++ - if yyhl1631 { - yyb1631 = yyj1631 > l + yyj1724++ + if yyhl1724 { + yyb1724 = yyj1724 > l } else { - yyb1631 = r.CheckBreak() + yyb1724 = r.CheckBreak() } - if yyb1631 { + if yyb1724 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21905,21 +23231,21 @@ func (x *PodSecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.SupplementalGroups = nil } else { - yyv1640 := &x.SupplementalGroups - yym1641 := z.DecBinary() - _ = yym1641 + yyv1733 := &x.SupplementalGroups + yym1734 := z.DecBinary() + _ = yym1734 if false { } else { - z.F.DecSliceInt64X(yyv1640, false, d) + z.F.DecSliceInt64X(yyv1733, false, d) } } - yyj1631++ - if yyhl1631 { - yyb1631 = yyj1631 > l + yyj1724++ + if yyhl1724 { + yyb1724 = yyj1724 > l } else { - yyb1631 = r.CheckBreak() + yyb1724 = r.CheckBreak() } - if yyb1631 { + if yyb1724 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21932,25 +23258,25 @@ func (x *PodSecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decode if x.FSGroup == nil { x.FSGroup = new(int64) } - yym1643 := z.DecBinary() - _ = yym1643 + yym1736 := z.DecBinary() + _ = yym1736 if false { } else { *((*int64)(x.FSGroup)) = int64(r.DecodeInt(64)) } } for { - yyj1631++ - if yyhl1631 { - yyb1631 = yyj1631 > l + yyj1724++ + if yyhl1724 { + yyb1724 = yyj1724 > l } else { - yyb1631 = r.CheckBreak() + yyb1724 = r.CheckBreak() } - if yyb1631 { + if yyb1724 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1631-1, "") + z.DecStructFieldNotFound(yyj1724-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -21962,60 +23288,60 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1644 := z.EncBinary() - _ = yym1644 + yym1737 := z.EncBinary() + _ = yym1737 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1645 := !z.EncBinary() - yy2arr1645 := z.EncBasicHandle().StructToArray - var yyq1645 [8]bool - _, _, _ = yysep1645, yyq1645, yy2arr1645 - const yyr1645 bool = false - yyq1645[0] = x.Phase != "" - yyq1645[1] = len(x.Conditions) != 0 - yyq1645[2] = x.Message != "" - yyq1645[3] = x.Reason != "" - yyq1645[4] = x.HostIP != "" - yyq1645[5] = x.PodIP != "" - yyq1645[6] = x.StartTime != nil - yyq1645[7] = len(x.ContainerStatuses) != 0 - var yynn1645 int - if yyr1645 || yy2arr1645 { + yysep1738 := !z.EncBinary() + yy2arr1738 := z.EncBasicHandle().StructToArray + var yyq1738 [8]bool + _, _, _ = yysep1738, yyq1738, yy2arr1738 + const yyr1738 bool = false + yyq1738[0] = x.Phase != "" + yyq1738[1] = len(x.Conditions) != 0 + yyq1738[2] = x.Message != "" + yyq1738[3] = x.Reason != "" + yyq1738[4] = x.HostIP != "" + yyq1738[5] = x.PodIP != "" + yyq1738[6] = x.StartTime != nil + yyq1738[7] = len(x.ContainerStatuses) != 0 + var yynn1738 int + if yyr1738 || yy2arr1738 { r.EncodeArrayStart(8) } else { - yynn1645 = 0 - for _, b := range yyq1645 { + yynn1738 = 0 + for _, b := range yyq1738 { if b { - yynn1645++ + yynn1738++ } } - r.EncodeMapStart(yynn1645) - yynn1645 = 0 + r.EncodeMapStart(yynn1738) + yynn1738 = 0 } - if yyr1645 || yy2arr1645 { + if yyr1738 || yy2arr1738 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1645[0] { + if yyq1738[0] { x.Phase.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1645[0] { + if yyq1738[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("phase")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Phase.CodecEncodeSelf(e) } } - if yyr1645 || yy2arr1645 { + if yyr1738 || yy2arr1738 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1645[1] { + if yyq1738[1] { if x.Conditions == nil { r.EncodeNil() } else { - yym1648 := z.EncBinary() - _ = yym1648 + yym1741 := z.EncBinary() + _ = yym1741 if false { } else { h.encSlicePodCondition(([]PodCondition)(x.Conditions), e) @@ -22025,15 +23351,15 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1645[1] { + if yyq1738[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("conditions")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Conditions == nil { r.EncodeNil() } else { - yym1649 := z.EncBinary() - _ = yym1649 + yym1742 := z.EncBinary() + _ = yym1742 if false { } else { h.encSlicePodCondition(([]PodCondition)(x.Conditions), e) @@ -22041,11 +23367,11 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1645 || yy2arr1645 { + if yyr1738 || yy2arr1738 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1645[2] { - yym1651 := z.EncBinary() - _ = yym1651 + if yyq1738[2] { + yym1744 := z.EncBinary() + _ = yym1744 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) @@ -22054,23 +23380,23 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1645[2] { + if yyq1738[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("message")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1652 := z.EncBinary() - _ = yym1652 + yym1745 := z.EncBinary() + _ = yym1745 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) } } } - if yyr1645 || yy2arr1645 { + if yyr1738 || yy2arr1738 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1645[3] { - yym1654 := z.EncBinary() - _ = yym1654 + if yyq1738[3] { + yym1747 := z.EncBinary() + _ = yym1747 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) @@ -22079,23 +23405,23 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1645[3] { + if yyq1738[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("reason")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1655 := z.EncBinary() - _ = yym1655 + yym1748 := z.EncBinary() + _ = yym1748 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) } } } - if yyr1645 || yy2arr1645 { + if yyr1738 || yy2arr1738 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1645[4] { - yym1657 := z.EncBinary() - _ = yym1657 + if yyq1738[4] { + yym1750 := z.EncBinary() + _ = yym1750 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.HostIP)) @@ -22104,23 +23430,23 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1645[4] { + if yyq1738[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hostIP")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1658 := z.EncBinary() - _ = yym1658 + yym1751 := z.EncBinary() + _ = yym1751 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.HostIP)) } } } - if yyr1645 || yy2arr1645 { + if yyr1738 || yy2arr1738 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1645[5] { - yym1660 := z.EncBinary() - _ = yym1660 + if yyq1738[5] { + yym1753 := z.EncBinary() + _ = yym1753 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodIP)) @@ -22129,31 +23455,31 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1645[5] { + if yyq1738[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podIP")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1661 := z.EncBinary() - _ = yym1661 + yym1754 := z.EncBinary() + _ = yym1754 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodIP)) } } } - if yyr1645 || yy2arr1645 { + if yyr1738 || yy2arr1738 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1645[6] { + if yyq1738[6] { if x.StartTime == nil { r.EncodeNil() } else { - yym1663 := z.EncBinary() - _ = yym1663 + yym1756 := z.EncBinary() + _ = yym1756 if false { } else if z.HasExtensions() && z.EncExt(x.StartTime) { - } else if yym1663 { + } else if yym1756 { z.EncBinaryMarshal(x.StartTime) - } else if !yym1663 && z.IsJSONHandle() { + } else if !yym1756 && z.IsJSONHandle() { z.EncJSONMarshal(x.StartTime) } else { z.EncFallback(x.StartTime) @@ -22163,20 +23489,20 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1645[6] { + if yyq1738[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("startTime")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.StartTime == nil { r.EncodeNil() } else { - yym1664 := z.EncBinary() - _ = yym1664 + yym1757 := z.EncBinary() + _ = yym1757 if false { } else if z.HasExtensions() && z.EncExt(x.StartTime) { - } else if yym1664 { + } else if yym1757 { z.EncBinaryMarshal(x.StartTime) - } else if !yym1664 && z.IsJSONHandle() { + } else if !yym1757 && z.IsJSONHandle() { z.EncJSONMarshal(x.StartTime) } else { z.EncFallback(x.StartTime) @@ -22184,14 +23510,14 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1645 || yy2arr1645 { + if yyr1738 || yy2arr1738 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1645[7] { + if yyq1738[7] { if x.ContainerStatuses == nil { r.EncodeNil() } else { - yym1666 := z.EncBinary() - _ = yym1666 + yym1759 := z.EncBinary() + _ = yym1759 if false { } else { h.encSliceContainerStatus(([]ContainerStatus)(x.ContainerStatuses), e) @@ -22201,15 +23527,15 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1645[7] { + if yyq1738[7] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("containerStatuses")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.ContainerStatuses == nil { r.EncodeNil() } else { - yym1667 := z.EncBinary() - _ = yym1667 + yym1760 := z.EncBinary() + _ = yym1760 if false { } else { h.encSliceContainerStatus(([]ContainerStatus)(x.ContainerStatuses), e) @@ -22217,7 +23543,7 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1645 || yy2arr1645 { + if yyr1738 || yy2arr1738 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -22230,25 +23556,25 @@ func (x *PodStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1668 := z.DecBinary() - _ = yym1668 + yym1761 := z.DecBinary() + _ = yym1761 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1669 := r.ContainerType() - if yyct1669 == codecSelferValueTypeMap1234 { - yyl1669 := r.ReadMapStart() - if yyl1669 == 0 { + yyct1762 := r.ContainerType() + if yyct1762 == codecSelferValueTypeMap1234 { + yyl1762 := r.ReadMapStart() + if yyl1762 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1669, d) + x.codecDecodeSelfFromMap(yyl1762, d) } - } else if yyct1669 == codecSelferValueTypeArray1234 { - yyl1669 := r.ReadArrayStart() - if yyl1669 == 0 { + } else if yyct1762 == codecSelferValueTypeArray1234 { + yyl1762 := r.ReadArrayStart() + if yyl1762 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1669, d) + x.codecDecodeSelfFromArray(yyl1762, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -22260,12 +23586,12 @@ func (x *PodStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1670Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1670Slc - var yyhl1670 bool = l >= 0 - for yyj1670 := 0; ; yyj1670++ { - if yyhl1670 { - if yyj1670 >= l { + var yys1763Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1763Slc + var yyhl1763 bool = l >= 0 + for yyj1763 := 0; ; yyj1763++ { + if yyhl1763 { + if yyj1763 >= l { break } } else { @@ -22274,10 +23600,10 @@ func (x *PodStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1670Slc = r.DecodeBytes(yys1670Slc, true, true) - yys1670 := string(yys1670Slc) + yys1763Slc = r.DecodeBytes(yys1763Slc, true, true) + yys1763 := string(yys1763Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1670 { + switch yys1763 { case "phase": if r.TryDecodeAsNil() { x.Phase = "" @@ -22288,12 +23614,12 @@ func (x *PodStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv1672 := &x.Conditions - yym1673 := z.DecBinary() - _ = yym1673 + yyv1765 := &x.Conditions + yym1766 := z.DecBinary() + _ = yym1766 if false { } else { - h.decSlicePodCondition((*[]PodCondition)(yyv1672), d) + h.decSlicePodCondition((*[]PodCondition)(yyv1765), d) } } case "message": @@ -22329,13 +23655,13 @@ func (x *PodStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.StartTime == nil { x.StartTime = new(pkg2_unversioned.Time) } - yym1679 := z.DecBinary() - _ = yym1679 + yym1772 := z.DecBinary() + _ = yym1772 if false { } else if z.HasExtensions() && z.DecExt(x.StartTime) { - } else if yym1679 { + } else if yym1772 { z.DecBinaryUnmarshal(x.StartTime) - } else if !yym1679 && z.IsJSONHandle() { + } else if !yym1772 && z.IsJSONHandle() { z.DecJSONUnmarshal(x.StartTime) } else { z.DecFallback(x.StartTime, false) @@ -22345,18 +23671,18 @@ func (x *PodStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ContainerStatuses = nil } else { - yyv1680 := &x.ContainerStatuses - yym1681 := z.DecBinary() - _ = yym1681 + yyv1773 := &x.ContainerStatuses + yym1774 := z.DecBinary() + _ = yym1774 if false { } else { - h.decSliceContainerStatus((*[]ContainerStatus)(yyv1680), d) + h.decSliceContainerStatus((*[]ContainerStatus)(yyv1773), d) } } default: - z.DecStructFieldNotFound(-1, yys1670) - } // end switch yys1670 - } // end for yyj1670 + z.DecStructFieldNotFound(-1, yys1763) + } // end switch yys1763 + } // end for yyj1763 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -22364,16 +23690,16 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1682 int - var yyb1682 bool - var yyhl1682 bool = l >= 0 - yyj1682++ - if yyhl1682 { - yyb1682 = yyj1682 > l + var yyj1775 int + var yyb1775 bool + var yyhl1775 bool = l >= 0 + yyj1775++ + if yyhl1775 { + yyb1775 = yyj1775 > l } else { - yyb1682 = r.CheckBreak() + yyb1775 = r.CheckBreak() } - if yyb1682 { + if yyb1775 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22383,13 +23709,13 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Phase = PodPhase(r.DecodeString()) } - yyj1682++ - if yyhl1682 { - yyb1682 = yyj1682 > l + yyj1775++ + if yyhl1775 { + yyb1775 = yyj1775 > l } else { - yyb1682 = r.CheckBreak() + yyb1775 = r.CheckBreak() } - if yyb1682 { + if yyb1775 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22397,21 +23723,21 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv1684 := &x.Conditions - yym1685 := z.DecBinary() - _ = yym1685 + yyv1777 := &x.Conditions + yym1778 := z.DecBinary() + _ = yym1778 if false { } else { - h.decSlicePodCondition((*[]PodCondition)(yyv1684), d) + h.decSlicePodCondition((*[]PodCondition)(yyv1777), d) } } - yyj1682++ - if yyhl1682 { - yyb1682 = yyj1682 > l + yyj1775++ + if yyhl1775 { + yyb1775 = yyj1775 > l } else { - yyb1682 = r.CheckBreak() + yyb1775 = r.CheckBreak() } - if yyb1682 { + if yyb1775 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22421,13 +23747,13 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Message = string(r.DecodeString()) } - yyj1682++ - if yyhl1682 { - yyb1682 = yyj1682 > l + yyj1775++ + if yyhl1775 { + yyb1775 = yyj1775 > l } else { - yyb1682 = r.CheckBreak() + yyb1775 = r.CheckBreak() } - if yyb1682 { + if yyb1775 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22437,13 +23763,13 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Reason = string(r.DecodeString()) } - yyj1682++ - if yyhl1682 { - yyb1682 = yyj1682 > l + yyj1775++ + if yyhl1775 { + yyb1775 = yyj1775 > l } else { - yyb1682 = r.CheckBreak() + yyb1775 = r.CheckBreak() } - if yyb1682 { + if yyb1775 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22453,13 +23779,13 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.HostIP = string(r.DecodeString()) } - yyj1682++ - if yyhl1682 { - yyb1682 = yyj1682 > l + yyj1775++ + if yyhl1775 { + yyb1775 = yyj1775 > l } else { - yyb1682 = r.CheckBreak() + yyb1775 = r.CheckBreak() } - if yyb1682 { + if yyb1775 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22469,13 +23795,13 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.PodIP = string(r.DecodeString()) } - yyj1682++ - if yyhl1682 { - yyb1682 = yyj1682 > l + yyj1775++ + if yyhl1775 { + yyb1775 = yyj1775 > l } else { - yyb1682 = r.CheckBreak() + yyb1775 = r.CheckBreak() } - if yyb1682 { + if yyb1775 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22488,25 +23814,25 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.StartTime == nil { x.StartTime = new(pkg2_unversioned.Time) } - yym1691 := z.DecBinary() - _ = yym1691 + yym1784 := z.DecBinary() + _ = yym1784 if false { } else if z.HasExtensions() && z.DecExt(x.StartTime) { - } else if yym1691 { + } else if yym1784 { z.DecBinaryUnmarshal(x.StartTime) - } else if !yym1691 && z.IsJSONHandle() { + } else if !yym1784 && z.IsJSONHandle() { z.DecJSONUnmarshal(x.StartTime) } else { z.DecFallback(x.StartTime, false) } } - yyj1682++ - if yyhl1682 { - yyb1682 = yyj1682 > l + yyj1775++ + if yyhl1775 { + yyb1775 = yyj1775 > l } else { - yyb1682 = r.CheckBreak() + yyb1775 = r.CheckBreak() } - if yyb1682 { + if yyb1775 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22514,26 +23840,26 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ContainerStatuses = nil } else { - yyv1692 := &x.ContainerStatuses - yym1693 := z.DecBinary() - _ = yym1693 + yyv1785 := &x.ContainerStatuses + yym1786 := z.DecBinary() + _ = yym1786 if false { } else { - h.decSliceContainerStatus((*[]ContainerStatus)(yyv1692), d) + h.decSliceContainerStatus((*[]ContainerStatus)(yyv1785), d) } } for { - yyj1682++ - if yyhl1682 { - yyb1682 = yyj1682 > l + yyj1775++ + if yyhl1775 { + yyb1775 = yyj1775 > l } else { - yyb1682 = r.CheckBreak() + yyb1775 = r.CheckBreak() } - if yyb1682 { + if yyb1775 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1682-1, "") + z.DecStructFieldNotFound(yyj1775-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -22545,38 +23871,38 @@ func (x *PodStatusResult) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1694 := z.EncBinary() - _ = yym1694 + yym1787 := z.EncBinary() + _ = yym1787 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1695 := !z.EncBinary() - yy2arr1695 := z.EncBasicHandle().StructToArray - var yyq1695 [4]bool - _, _, _ = yysep1695, yyq1695, yy2arr1695 - const yyr1695 bool = false - yyq1695[0] = x.Kind != "" - yyq1695[1] = x.APIVersion != "" - yyq1695[2] = true - yyq1695[3] = true - var yynn1695 int - if yyr1695 || yy2arr1695 { + yysep1788 := !z.EncBinary() + yy2arr1788 := z.EncBasicHandle().StructToArray + var yyq1788 [4]bool + _, _, _ = yysep1788, yyq1788, yy2arr1788 + const yyr1788 bool = false + yyq1788[0] = x.Kind != "" + yyq1788[1] = x.APIVersion != "" + yyq1788[2] = true + yyq1788[3] = true + var yynn1788 int + if yyr1788 || yy2arr1788 { r.EncodeArrayStart(4) } else { - yynn1695 = 0 - for _, b := range yyq1695 { + yynn1788 = 0 + for _, b := range yyq1788 { if b { - yynn1695++ + yynn1788++ } } - r.EncodeMapStart(yynn1695) - yynn1695 = 0 + r.EncodeMapStart(yynn1788) + yynn1788 = 0 } - if yyr1695 || yy2arr1695 { + if yyr1788 || yy2arr1788 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1695[0] { - yym1697 := z.EncBinary() - _ = yym1697 + if yyq1788[0] { + yym1790 := z.EncBinary() + _ = yym1790 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -22585,23 +23911,23 @@ func (x *PodStatusResult) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1695[0] { + if yyq1788[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1698 := z.EncBinary() - _ = yym1698 + yym1791 := z.EncBinary() + _ = yym1791 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr1695 || yy2arr1695 { + if yyr1788 || yy2arr1788 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1695[1] { - yym1700 := z.EncBinary() - _ = yym1700 + if yyq1788[1] { + yym1793 := z.EncBinary() + _ = yym1793 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -22610,53 +23936,53 @@ func (x *PodStatusResult) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1695[1] { + if yyq1788[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1701 := z.EncBinary() - _ = yym1701 + yym1794 := z.EncBinary() + _ = yym1794 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr1695 || yy2arr1695 { + if yyr1788 || yy2arr1788 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1695[2] { - yy1703 := &x.ObjectMeta - yy1703.CodecEncodeSelf(e) + if yyq1788[2] { + yy1796 := &x.ObjectMeta + yy1796.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1695[2] { + if yyq1788[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1704 := &x.ObjectMeta - yy1704.CodecEncodeSelf(e) + yy1797 := &x.ObjectMeta + yy1797.CodecEncodeSelf(e) } } - if yyr1695 || yy2arr1695 { + if yyr1788 || yy2arr1788 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1695[3] { - yy1706 := &x.Status - yy1706.CodecEncodeSelf(e) + if yyq1788[3] { + yy1799 := &x.Status + yy1799.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1695[3] { + if yyq1788[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1707 := &x.Status - yy1707.CodecEncodeSelf(e) + yy1800 := &x.Status + yy1800.CodecEncodeSelf(e) } } - if yyr1695 || yy2arr1695 { + if yyr1788 || yy2arr1788 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -22669,25 +23995,25 @@ func (x *PodStatusResult) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1708 := z.DecBinary() - _ = yym1708 + yym1801 := z.DecBinary() + _ = yym1801 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1709 := r.ContainerType() - if yyct1709 == codecSelferValueTypeMap1234 { - yyl1709 := r.ReadMapStart() - if yyl1709 == 0 { + yyct1802 := r.ContainerType() + if yyct1802 == codecSelferValueTypeMap1234 { + yyl1802 := r.ReadMapStart() + if yyl1802 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1709, d) + x.codecDecodeSelfFromMap(yyl1802, d) } - } else if yyct1709 == codecSelferValueTypeArray1234 { - yyl1709 := r.ReadArrayStart() - if yyl1709 == 0 { + } else if yyct1802 == codecSelferValueTypeArray1234 { + yyl1802 := r.ReadArrayStart() + if yyl1802 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1709, d) + x.codecDecodeSelfFromArray(yyl1802, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -22699,12 +24025,12 @@ func (x *PodStatusResult) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1710Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1710Slc - var yyhl1710 bool = l >= 0 - for yyj1710 := 0; ; yyj1710++ { - if yyhl1710 { - if yyj1710 >= l { + var yys1803Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1803Slc + var yyhl1803 bool = l >= 0 + for yyj1803 := 0; ; yyj1803++ { + if yyhl1803 { + if yyj1803 >= l { break } } else { @@ -22713,10 +24039,10 @@ func (x *PodStatusResult) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1710Slc = r.DecodeBytes(yys1710Slc, true, true) - yys1710 := string(yys1710Slc) + yys1803Slc = r.DecodeBytes(yys1803Slc, true, true) + yys1803 := string(yys1803Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1710 { + switch yys1803 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -22733,20 +24059,20 @@ func (x *PodStatusResult) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv1713 := &x.ObjectMeta - yyv1713.CodecDecodeSelf(d) + yyv1806 := &x.ObjectMeta + yyv1806.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = PodStatus{} } else { - yyv1714 := &x.Status - yyv1714.CodecDecodeSelf(d) + yyv1807 := &x.Status + yyv1807.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys1710) - } // end switch yys1710 - } // end for yyj1710 + z.DecStructFieldNotFound(-1, yys1803) + } // end switch yys1803 + } // end for yyj1803 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -22754,16 +24080,16 @@ func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1715 int - var yyb1715 bool - var yyhl1715 bool = l >= 0 - yyj1715++ - if yyhl1715 { - yyb1715 = yyj1715 > l + var yyj1808 int + var yyb1808 bool + var yyhl1808 bool = l >= 0 + yyj1808++ + if yyhl1808 { + yyb1808 = yyj1808 > l } else { - yyb1715 = r.CheckBreak() + yyb1808 = r.CheckBreak() } - if yyb1715 { + if yyb1808 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22773,13 +24099,13 @@ func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Kind = string(r.DecodeString()) } - yyj1715++ - if yyhl1715 { - yyb1715 = yyj1715 > l + yyj1808++ + if yyhl1808 { + yyb1808 = yyj1808 > l } else { - yyb1715 = r.CheckBreak() + yyb1808 = r.CheckBreak() } - if yyb1715 { + if yyb1808 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22789,13 +24115,13 @@ func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.APIVersion = string(r.DecodeString()) } - yyj1715++ - if yyhl1715 { - yyb1715 = yyj1715 > l + yyj1808++ + if yyhl1808 { + yyb1808 = yyj1808 > l } else { - yyb1715 = r.CheckBreak() + yyb1808 = r.CheckBreak() } - if yyb1715 { + if yyb1808 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22803,16 +24129,16 @@ func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv1718 := &x.ObjectMeta - yyv1718.CodecDecodeSelf(d) + yyv1811 := &x.ObjectMeta + yyv1811.CodecDecodeSelf(d) } - yyj1715++ - if yyhl1715 { - yyb1715 = yyj1715 > l + yyj1808++ + if yyhl1808 { + yyb1808 = yyj1808 > l } else { - yyb1715 = r.CheckBreak() + yyb1808 = r.CheckBreak() } - if yyb1715 { + if yyb1808 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22820,21 +24146,21 @@ func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Status = PodStatus{} } else { - yyv1719 := &x.Status - yyv1719.CodecDecodeSelf(d) + yyv1812 := &x.Status + yyv1812.CodecDecodeSelf(d) } for { - yyj1715++ - if yyhl1715 { - yyb1715 = yyj1715 > l + yyj1808++ + if yyhl1808 { + yyb1808 = yyj1808 > l } else { - yyb1715 = r.CheckBreak() + yyb1808 = r.CheckBreak() } - if yyb1715 { + if yyb1808 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1715-1, "") + z.DecStructFieldNotFound(yyj1808-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -22846,39 +24172,39 @@ func (x *Pod) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1720 := z.EncBinary() - _ = yym1720 + yym1813 := z.EncBinary() + _ = yym1813 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1721 := !z.EncBinary() - yy2arr1721 := z.EncBasicHandle().StructToArray - var yyq1721 [5]bool - _, _, _ = yysep1721, yyq1721, yy2arr1721 - const yyr1721 bool = false - yyq1721[0] = x.Kind != "" - yyq1721[1] = x.APIVersion != "" - yyq1721[2] = true - yyq1721[3] = true - yyq1721[4] = true - var yynn1721 int - if yyr1721 || yy2arr1721 { + yysep1814 := !z.EncBinary() + yy2arr1814 := z.EncBasicHandle().StructToArray + var yyq1814 [5]bool + _, _, _ = yysep1814, yyq1814, yy2arr1814 + const yyr1814 bool = false + yyq1814[0] = x.Kind != "" + yyq1814[1] = x.APIVersion != "" + yyq1814[2] = true + yyq1814[3] = true + yyq1814[4] = true + var yynn1814 int + if yyr1814 || yy2arr1814 { r.EncodeArrayStart(5) } else { - yynn1721 = 0 - for _, b := range yyq1721 { + yynn1814 = 0 + for _, b := range yyq1814 { if b { - yynn1721++ + yynn1814++ } } - r.EncodeMapStart(yynn1721) - yynn1721 = 0 + r.EncodeMapStart(yynn1814) + yynn1814 = 0 } - if yyr1721 || yy2arr1721 { + if yyr1814 || yy2arr1814 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1721[0] { - yym1723 := z.EncBinary() - _ = yym1723 + if yyq1814[0] { + yym1816 := z.EncBinary() + _ = yym1816 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -22887,23 +24213,23 @@ func (x *Pod) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1721[0] { + if yyq1814[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1724 := z.EncBinary() - _ = yym1724 + yym1817 := z.EncBinary() + _ = yym1817 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr1721 || yy2arr1721 { + if yyr1814 || yy2arr1814 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1721[1] { - yym1726 := z.EncBinary() - _ = yym1726 + if yyq1814[1] { + yym1819 := z.EncBinary() + _ = yym1819 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -22912,70 +24238,70 @@ func (x *Pod) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1721[1] { + if yyq1814[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1727 := z.EncBinary() - _ = yym1727 + yym1820 := z.EncBinary() + _ = yym1820 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr1721 || yy2arr1721 { + if yyr1814 || yy2arr1814 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1721[2] { - yy1729 := &x.ObjectMeta - yy1729.CodecEncodeSelf(e) + if yyq1814[2] { + yy1822 := &x.ObjectMeta + yy1822.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1721[2] { + if yyq1814[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1730 := &x.ObjectMeta - yy1730.CodecEncodeSelf(e) + yy1823 := &x.ObjectMeta + yy1823.CodecEncodeSelf(e) } } - if yyr1721 || yy2arr1721 { + if yyr1814 || yy2arr1814 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1721[3] { - yy1732 := &x.Spec - yy1732.CodecEncodeSelf(e) + if yyq1814[3] { + yy1825 := &x.Spec + yy1825.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1721[3] { + if yyq1814[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1733 := &x.Spec - yy1733.CodecEncodeSelf(e) + yy1826 := &x.Spec + yy1826.CodecEncodeSelf(e) } } - if yyr1721 || yy2arr1721 { + if yyr1814 || yy2arr1814 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1721[4] { - yy1735 := &x.Status - yy1735.CodecEncodeSelf(e) + if yyq1814[4] { + yy1828 := &x.Status + yy1828.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1721[4] { + if yyq1814[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1736 := &x.Status - yy1736.CodecEncodeSelf(e) + yy1829 := &x.Status + yy1829.CodecEncodeSelf(e) } } - if yyr1721 || yy2arr1721 { + if yyr1814 || yy2arr1814 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -22988,25 +24314,25 @@ func (x *Pod) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1737 := z.DecBinary() - _ = yym1737 + yym1830 := z.DecBinary() + _ = yym1830 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1738 := r.ContainerType() - if yyct1738 == codecSelferValueTypeMap1234 { - yyl1738 := r.ReadMapStart() - if yyl1738 == 0 { + yyct1831 := r.ContainerType() + if yyct1831 == codecSelferValueTypeMap1234 { + yyl1831 := r.ReadMapStart() + if yyl1831 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1738, d) + x.codecDecodeSelfFromMap(yyl1831, d) } - } else if yyct1738 == codecSelferValueTypeArray1234 { - yyl1738 := r.ReadArrayStart() - if yyl1738 == 0 { + } else if yyct1831 == codecSelferValueTypeArray1234 { + yyl1831 := r.ReadArrayStart() + if yyl1831 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1738, d) + x.codecDecodeSelfFromArray(yyl1831, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -23018,12 +24344,12 @@ func (x *Pod) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1739Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1739Slc - var yyhl1739 bool = l >= 0 - for yyj1739 := 0; ; yyj1739++ { - if yyhl1739 { - if yyj1739 >= l { + var yys1832Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1832Slc + var yyhl1832 bool = l >= 0 + for yyj1832 := 0; ; yyj1832++ { + if yyhl1832 { + if yyj1832 >= l { break } } else { @@ -23032,10 +24358,10 @@ func (x *Pod) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1739Slc = r.DecodeBytes(yys1739Slc, true, true) - yys1739 := string(yys1739Slc) + yys1832Slc = r.DecodeBytes(yys1832Slc, true, true) + yys1832 := string(yys1832Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1739 { + switch yys1832 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -23052,27 +24378,27 @@ func (x *Pod) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv1742 := &x.ObjectMeta - yyv1742.CodecDecodeSelf(d) + yyv1835 := &x.ObjectMeta + yyv1835.CodecDecodeSelf(d) } case "spec": if r.TryDecodeAsNil() { x.Spec = PodSpec{} } else { - yyv1743 := &x.Spec - yyv1743.CodecDecodeSelf(d) + yyv1836 := &x.Spec + yyv1836.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = PodStatus{} } else { - yyv1744 := &x.Status - yyv1744.CodecDecodeSelf(d) + yyv1837 := &x.Status + yyv1837.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys1739) - } // end switch yys1739 - } // end for yyj1739 + z.DecStructFieldNotFound(-1, yys1832) + } // end switch yys1832 + } // end for yyj1832 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -23080,16 +24406,16 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1745 int - var yyb1745 bool - var yyhl1745 bool = l >= 0 - yyj1745++ - if yyhl1745 { - yyb1745 = yyj1745 > l + var yyj1838 int + var yyb1838 bool + var yyhl1838 bool = l >= 0 + yyj1838++ + if yyhl1838 { + yyb1838 = yyj1838 > l } else { - yyb1745 = r.CheckBreak() + yyb1838 = r.CheckBreak() } - if yyb1745 { + if yyb1838 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23099,13 +24425,13 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj1745++ - if yyhl1745 { - yyb1745 = yyj1745 > l + yyj1838++ + if yyhl1838 { + yyb1838 = yyj1838 > l } else { - yyb1745 = r.CheckBreak() + yyb1838 = r.CheckBreak() } - if yyb1745 { + if yyb1838 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23115,13 +24441,13 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj1745++ - if yyhl1745 { - yyb1745 = yyj1745 > l + yyj1838++ + if yyhl1838 { + yyb1838 = yyj1838 > l } else { - yyb1745 = r.CheckBreak() + yyb1838 = r.CheckBreak() } - if yyb1745 { + if yyb1838 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23129,16 +24455,16 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv1748 := &x.ObjectMeta - yyv1748.CodecDecodeSelf(d) + yyv1841 := &x.ObjectMeta + yyv1841.CodecDecodeSelf(d) } - yyj1745++ - if yyhl1745 { - yyb1745 = yyj1745 > l + yyj1838++ + if yyhl1838 { + yyb1838 = yyj1838 > l } else { - yyb1745 = r.CheckBreak() + yyb1838 = r.CheckBreak() } - if yyb1745 { + if yyb1838 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23146,16 +24472,16 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = PodSpec{} } else { - yyv1749 := &x.Spec - yyv1749.CodecDecodeSelf(d) + yyv1842 := &x.Spec + yyv1842.CodecDecodeSelf(d) } - yyj1745++ - if yyhl1745 { - yyb1745 = yyj1745 > l + yyj1838++ + if yyhl1838 { + yyb1838 = yyj1838 > l } else { - yyb1745 = r.CheckBreak() + yyb1838 = r.CheckBreak() } - if yyb1745 { + if yyb1838 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23163,21 +24489,21 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = PodStatus{} } else { - yyv1750 := &x.Status - yyv1750.CodecDecodeSelf(d) + yyv1843 := &x.Status + yyv1843.CodecDecodeSelf(d) } for { - yyj1745++ - if yyhl1745 { - yyb1745 = yyj1745 > l + yyj1838++ + if yyhl1838 { + yyb1838 = yyj1838 > l } else { - yyb1745 = r.CheckBreak() + yyb1838 = r.CheckBreak() } - if yyb1745 { + if yyb1838 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1745-1, "") + z.DecStructFieldNotFound(yyj1838-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -23189,66 +24515,66 @@ func (x *PodTemplateSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1751 := z.EncBinary() - _ = yym1751 + yym1844 := z.EncBinary() + _ = yym1844 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1752 := !z.EncBinary() - yy2arr1752 := z.EncBasicHandle().StructToArray - var yyq1752 [2]bool - _, _, _ = yysep1752, yyq1752, yy2arr1752 - const yyr1752 bool = false - yyq1752[0] = true - yyq1752[1] = true - var yynn1752 int - if yyr1752 || yy2arr1752 { + yysep1845 := !z.EncBinary() + yy2arr1845 := z.EncBasicHandle().StructToArray + var yyq1845 [2]bool + _, _, _ = yysep1845, yyq1845, yy2arr1845 + const yyr1845 bool = false + yyq1845[0] = true + yyq1845[1] = true + var yynn1845 int + if yyr1845 || yy2arr1845 { r.EncodeArrayStart(2) } else { - yynn1752 = 0 - for _, b := range yyq1752 { + yynn1845 = 0 + for _, b := range yyq1845 { if b { - yynn1752++ + yynn1845++ } } - r.EncodeMapStart(yynn1752) - yynn1752 = 0 + r.EncodeMapStart(yynn1845) + yynn1845 = 0 } - if yyr1752 || yy2arr1752 { + if yyr1845 || yy2arr1845 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1752[0] { - yy1754 := &x.ObjectMeta - yy1754.CodecEncodeSelf(e) + if yyq1845[0] { + yy1847 := &x.ObjectMeta + yy1847.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1752[0] { + if yyq1845[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1755 := &x.ObjectMeta - yy1755.CodecEncodeSelf(e) + yy1848 := &x.ObjectMeta + yy1848.CodecEncodeSelf(e) } } - if yyr1752 || yy2arr1752 { + if yyr1845 || yy2arr1845 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1752[1] { - yy1757 := &x.Spec - yy1757.CodecEncodeSelf(e) + if yyq1845[1] { + yy1850 := &x.Spec + yy1850.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1752[1] { + if yyq1845[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1758 := &x.Spec - yy1758.CodecEncodeSelf(e) + yy1851 := &x.Spec + yy1851.CodecEncodeSelf(e) } } - if yyr1752 || yy2arr1752 { + if yyr1845 || yy2arr1845 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -23261,25 +24587,25 @@ func (x *PodTemplateSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1759 := z.DecBinary() - _ = yym1759 + yym1852 := z.DecBinary() + _ = yym1852 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1760 := r.ContainerType() - if yyct1760 == codecSelferValueTypeMap1234 { - yyl1760 := r.ReadMapStart() - if yyl1760 == 0 { + yyct1853 := r.ContainerType() + if yyct1853 == codecSelferValueTypeMap1234 { + yyl1853 := r.ReadMapStart() + if yyl1853 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1760, d) + x.codecDecodeSelfFromMap(yyl1853, d) } - } else if yyct1760 == codecSelferValueTypeArray1234 { - yyl1760 := r.ReadArrayStart() - if yyl1760 == 0 { + } else if yyct1853 == codecSelferValueTypeArray1234 { + yyl1853 := r.ReadArrayStart() + if yyl1853 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1760, d) + x.codecDecodeSelfFromArray(yyl1853, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -23291,12 +24617,12 @@ func (x *PodTemplateSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1761Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1761Slc - var yyhl1761 bool = l >= 0 - for yyj1761 := 0; ; yyj1761++ { - if yyhl1761 { - if yyj1761 >= l { + var yys1854Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1854Slc + var yyhl1854 bool = l >= 0 + for yyj1854 := 0; ; yyj1854++ { + if yyhl1854 { + if yyj1854 >= l { break } } else { @@ -23305,28 +24631,28 @@ func (x *PodTemplateSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1761Slc = r.DecodeBytes(yys1761Slc, true, true) - yys1761 := string(yys1761Slc) + yys1854Slc = r.DecodeBytes(yys1854Slc, true, true) + yys1854 := string(yys1854Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1761 { + switch yys1854 { case "metadata": if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv1762 := &x.ObjectMeta - yyv1762.CodecDecodeSelf(d) + yyv1855 := &x.ObjectMeta + yyv1855.CodecDecodeSelf(d) } case "spec": if r.TryDecodeAsNil() { x.Spec = PodSpec{} } else { - yyv1763 := &x.Spec - yyv1763.CodecDecodeSelf(d) + yyv1856 := &x.Spec + yyv1856.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys1761) - } // end switch yys1761 - } // end for yyj1761 + z.DecStructFieldNotFound(-1, yys1854) + } // end switch yys1854 + } // end for yyj1854 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -23334,16 +24660,16 @@ func (x *PodTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1764 int - var yyb1764 bool - var yyhl1764 bool = l >= 0 - yyj1764++ - if yyhl1764 { - yyb1764 = yyj1764 > l + var yyj1857 int + var yyb1857 bool + var yyhl1857 bool = l >= 0 + yyj1857++ + if yyhl1857 { + yyb1857 = yyj1857 > l } else { - yyb1764 = r.CheckBreak() + yyb1857 = r.CheckBreak() } - if yyb1764 { + if yyb1857 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23351,16 +24677,16 @@ func (x *PodTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv1765 := &x.ObjectMeta - yyv1765.CodecDecodeSelf(d) + yyv1858 := &x.ObjectMeta + yyv1858.CodecDecodeSelf(d) } - yyj1764++ - if yyhl1764 { - yyb1764 = yyj1764 > l + yyj1857++ + if yyhl1857 { + yyb1857 = yyj1857 > l } else { - yyb1764 = r.CheckBreak() + yyb1857 = r.CheckBreak() } - if yyb1764 { + if yyb1857 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23368,21 +24694,21 @@ func (x *PodTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Spec = PodSpec{} } else { - yyv1766 := &x.Spec - yyv1766.CodecDecodeSelf(d) + yyv1859 := &x.Spec + yyv1859.CodecDecodeSelf(d) } for { - yyj1764++ - if yyhl1764 { - yyb1764 = yyj1764 > l + yyj1857++ + if yyhl1857 { + yyb1857 = yyj1857 > l } else { - yyb1764 = r.CheckBreak() + yyb1857 = r.CheckBreak() } - if yyb1764 { + if yyb1857 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1764-1, "") + z.DecStructFieldNotFound(yyj1857-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -23394,38 +24720,38 @@ func (x *PodTemplate) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1767 := z.EncBinary() - _ = yym1767 + yym1860 := z.EncBinary() + _ = yym1860 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1768 := !z.EncBinary() - yy2arr1768 := z.EncBasicHandle().StructToArray - var yyq1768 [4]bool - _, _, _ = yysep1768, yyq1768, yy2arr1768 - const yyr1768 bool = false - yyq1768[0] = x.Kind != "" - yyq1768[1] = x.APIVersion != "" - yyq1768[2] = true - yyq1768[3] = true - var yynn1768 int - if yyr1768 || yy2arr1768 { + yysep1861 := !z.EncBinary() + yy2arr1861 := z.EncBasicHandle().StructToArray + var yyq1861 [4]bool + _, _, _ = yysep1861, yyq1861, yy2arr1861 + const yyr1861 bool = false + yyq1861[0] = x.Kind != "" + yyq1861[1] = x.APIVersion != "" + yyq1861[2] = true + yyq1861[3] = true + var yynn1861 int + if yyr1861 || yy2arr1861 { r.EncodeArrayStart(4) } else { - yynn1768 = 0 - for _, b := range yyq1768 { + yynn1861 = 0 + for _, b := range yyq1861 { if b { - yynn1768++ + yynn1861++ } } - r.EncodeMapStart(yynn1768) - yynn1768 = 0 + r.EncodeMapStart(yynn1861) + yynn1861 = 0 } - if yyr1768 || yy2arr1768 { + if yyr1861 || yy2arr1861 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1768[0] { - yym1770 := z.EncBinary() - _ = yym1770 + if yyq1861[0] { + yym1863 := z.EncBinary() + _ = yym1863 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -23434,23 +24760,23 @@ func (x *PodTemplate) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1768[0] { + if yyq1861[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1771 := z.EncBinary() - _ = yym1771 + yym1864 := z.EncBinary() + _ = yym1864 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr1768 || yy2arr1768 { + if yyr1861 || yy2arr1861 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1768[1] { - yym1773 := z.EncBinary() - _ = yym1773 + if yyq1861[1] { + yym1866 := z.EncBinary() + _ = yym1866 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -23459,53 +24785,53 @@ func (x *PodTemplate) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1768[1] { + if yyq1861[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1774 := z.EncBinary() - _ = yym1774 + yym1867 := z.EncBinary() + _ = yym1867 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr1768 || yy2arr1768 { + if yyr1861 || yy2arr1861 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1768[2] { - yy1776 := &x.ObjectMeta - yy1776.CodecEncodeSelf(e) + if yyq1861[2] { + yy1869 := &x.ObjectMeta + yy1869.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1768[2] { + if yyq1861[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1777 := &x.ObjectMeta - yy1777.CodecEncodeSelf(e) + yy1870 := &x.ObjectMeta + yy1870.CodecEncodeSelf(e) } } - if yyr1768 || yy2arr1768 { + if yyr1861 || yy2arr1861 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1768[3] { - yy1779 := &x.Template - yy1779.CodecEncodeSelf(e) + if yyq1861[3] { + yy1872 := &x.Template + yy1872.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1768[3] { + if yyq1861[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("template")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1780 := &x.Template - yy1780.CodecEncodeSelf(e) + yy1873 := &x.Template + yy1873.CodecEncodeSelf(e) } } - if yyr1768 || yy2arr1768 { + if yyr1861 || yy2arr1861 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -23518,25 +24844,25 @@ func (x *PodTemplate) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1781 := z.DecBinary() - _ = yym1781 + yym1874 := z.DecBinary() + _ = yym1874 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1782 := r.ContainerType() - if yyct1782 == codecSelferValueTypeMap1234 { - yyl1782 := r.ReadMapStart() - if yyl1782 == 0 { + yyct1875 := r.ContainerType() + if yyct1875 == codecSelferValueTypeMap1234 { + yyl1875 := r.ReadMapStart() + if yyl1875 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1782, d) + x.codecDecodeSelfFromMap(yyl1875, d) } - } else if yyct1782 == codecSelferValueTypeArray1234 { - yyl1782 := r.ReadArrayStart() - if yyl1782 == 0 { + } else if yyct1875 == codecSelferValueTypeArray1234 { + yyl1875 := r.ReadArrayStart() + if yyl1875 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1782, d) + x.codecDecodeSelfFromArray(yyl1875, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -23548,12 +24874,12 @@ func (x *PodTemplate) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1783Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1783Slc - var yyhl1783 bool = l >= 0 - for yyj1783 := 0; ; yyj1783++ { - if yyhl1783 { - if yyj1783 >= l { + var yys1876Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1876Slc + var yyhl1876 bool = l >= 0 + for yyj1876 := 0; ; yyj1876++ { + if yyhl1876 { + if yyj1876 >= l { break } } else { @@ -23562,10 +24888,10 @@ func (x *PodTemplate) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1783Slc = r.DecodeBytes(yys1783Slc, true, true) - yys1783 := string(yys1783Slc) + yys1876Slc = r.DecodeBytes(yys1876Slc, true, true) + yys1876 := string(yys1876Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1783 { + switch yys1876 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -23582,20 +24908,20 @@ func (x *PodTemplate) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv1786 := &x.ObjectMeta - yyv1786.CodecDecodeSelf(d) + yyv1879 := &x.ObjectMeta + yyv1879.CodecDecodeSelf(d) } case "template": if r.TryDecodeAsNil() { x.Template = PodTemplateSpec{} } else { - yyv1787 := &x.Template - yyv1787.CodecDecodeSelf(d) + yyv1880 := &x.Template + yyv1880.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys1783) - } // end switch yys1783 - } // end for yyj1783 + z.DecStructFieldNotFound(-1, yys1876) + } // end switch yys1876 + } // end for yyj1876 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -23603,16 +24929,16 @@ func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1788 int - var yyb1788 bool - var yyhl1788 bool = l >= 0 - yyj1788++ - if yyhl1788 { - yyb1788 = yyj1788 > l + var yyj1881 int + var yyb1881 bool + var yyhl1881 bool = l >= 0 + yyj1881++ + if yyhl1881 { + yyb1881 = yyj1881 > l } else { - yyb1788 = r.CheckBreak() + yyb1881 = r.CheckBreak() } - if yyb1788 { + if yyb1881 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23622,13 +24948,13 @@ func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj1788++ - if yyhl1788 { - yyb1788 = yyj1788 > l + yyj1881++ + if yyhl1881 { + yyb1881 = yyj1881 > l } else { - yyb1788 = r.CheckBreak() + yyb1881 = r.CheckBreak() } - if yyb1788 { + if yyb1881 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23638,13 +24964,13 @@ func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj1788++ - if yyhl1788 { - yyb1788 = yyj1788 > l + yyj1881++ + if yyhl1881 { + yyb1881 = yyj1881 > l } else { - yyb1788 = r.CheckBreak() + yyb1881 = r.CheckBreak() } - if yyb1788 { + if yyb1881 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23652,16 +24978,16 @@ func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv1791 := &x.ObjectMeta - yyv1791.CodecDecodeSelf(d) + yyv1884 := &x.ObjectMeta + yyv1884.CodecDecodeSelf(d) } - yyj1788++ - if yyhl1788 { - yyb1788 = yyj1788 > l + yyj1881++ + if yyhl1881 { + yyb1881 = yyj1881 > l } else { - yyb1788 = r.CheckBreak() + yyb1881 = r.CheckBreak() } - if yyb1788 { + if yyb1881 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23669,21 +24995,21 @@ func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Template = PodTemplateSpec{} } else { - yyv1792 := &x.Template - yyv1792.CodecDecodeSelf(d) + yyv1885 := &x.Template + yyv1885.CodecDecodeSelf(d) } for { - yyj1788++ - if yyhl1788 { - yyb1788 = yyj1788 > l + yyj1881++ + if yyhl1881 { + yyb1881 = yyj1881 > l } else { - yyb1788 = r.CheckBreak() + yyb1881 = r.CheckBreak() } - if yyb1788 { + if yyb1881 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1788-1, "") + z.DecStructFieldNotFound(yyj1881-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -23695,37 +25021,37 @@ func (x *PodTemplateList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1793 := z.EncBinary() - _ = yym1793 + yym1886 := z.EncBinary() + _ = yym1886 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1794 := !z.EncBinary() - yy2arr1794 := z.EncBasicHandle().StructToArray - var yyq1794 [4]bool - _, _, _ = yysep1794, yyq1794, yy2arr1794 - const yyr1794 bool = false - yyq1794[0] = x.Kind != "" - yyq1794[1] = x.APIVersion != "" - yyq1794[2] = true - var yynn1794 int - if yyr1794 || yy2arr1794 { + yysep1887 := !z.EncBinary() + yy2arr1887 := z.EncBasicHandle().StructToArray + var yyq1887 [4]bool + _, _, _ = yysep1887, yyq1887, yy2arr1887 + const yyr1887 bool = false + yyq1887[0] = x.Kind != "" + yyq1887[1] = x.APIVersion != "" + yyq1887[2] = true + var yynn1887 int + if yyr1887 || yy2arr1887 { r.EncodeArrayStart(4) } else { - yynn1794 = 1 - for _, b := range yyq1794 { + yynn1887 = 1 + for _, b := range yyq1887 { if b { - yynn1794++ + yynn1887++ } } - r.EncodeMapStart(yynn1794) - yynn1794 = 0 + r.EncodeMapStart(yynn1887) + yynn1887 = 0 } - if yyr1794 || yy2arr1794 { + if yyr1887 || yy2arr1887 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1794[0] { - yym1796 := z.EncBinary() - _ = yym1796 + if yyq1887[0] { + yym1889 := z.EncBinary() + _ = yym1889 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -23734,23 +25060,23 @@ func (x *PodTemplateList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1794[0] { + if yyq1887[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1797 := z.EncBinary() - _ = yym1797 + yym1890 := z.EncBinary() + _ = yym1890 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr1794 || yy2arr1794 { + if yyr1887 || yy2arr1887 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1794[1] { - yym1799 := z.EncBinary() - _ = yym1799 + if yyq1887[1] { + yym1892 := z.EncBinary() + _ = yym1892 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -23759,54 +25085,54 @@ func (x *PodTemplateList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1794[1] { + if yyq1887[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1800 := z.EncBinary() - _ = yym1800 + yym1893 := z.EncBinary() + _ = yym1893 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr1794 || yy2arr1794 { + if yyr1887 || yy2arr1887 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1794[2] { - yy1802 := &x.ListMeta - yym1803 := z.EncBinary() - _ = yym1803 + if yyq1887[2] { + yy1895 := &x.ListMeta + yym1896 := z.EncBinary() + _ = yym1896 if false { - } else if z.HasExtensions() && z.EncExt(yy1802) { + } else if z.HasExtensions() && z.EncExt(yy1895) { } else { - z.EncFallback(yy1802) + z.EncFallback(yy1895) } } else { r.EncodeNil() } } else { - if yyq1794[2] { + if yyq1887[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1804 := &x.ListMeta - yym1805 := z.EncBinary() - _ = yym1805 + yy1897 := &x.ListMeta + yym1898 := z.EncBinary() + _ = yym1898 if false { - } else if z.HasExtensions() && z.EncExt(yy1804) { + } else if z.HasExtensions() && z.EncExt(yy1897) { } else { - z.EncFallback(yy1804) + z.EncFallback(yy1897) } } } - if yyr1794 || yy2arr1794 { + if yyr1887 || yy2arr1887 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym1807 := z.EncBinary() - _ = yym1807 + yym1900 := z.EncBinary() + _ = yym1900 if false { } else { h.encSlicePodTemplate(([]PodTemplate)(x.Items), e) @@ -23819,15 +25145,15 @@ func (x *PodTemplateList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym1808 := z.EncBinary() - _ = yym1808 + yym1901 := z.EncBinary() + _ = yym1901 if false { } else { h.encSlicePodTemplate(([]PodTemplate)(x.Items), e) } } } - if yyr1794 || yy2arr1794 { + if yyr1887 || yy2arr1887 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -23840,25 +25166,25 @@ func (x *PodTemplateList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1809 := z.DecBinary() - _ = yym1809 + yym1902 := z.DecBinary() + _ = yym1902 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1810 := r.ContainerType() - if yyct1810 == codecSelferValueTypeMap1234 { - yyl1810 := r.ReadMapStart() - if yyl1810 == 0 { + yyct1903 := r.ContainerType() + if yyct1903 == codecSelferValueTypeMap1234 { + yyl1903 := r.ReadMapStart() + if yyl1903 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1810, d) + x.codecDecodeSelfFromMap(yyl1903, d) } - } else if yyct1810 == codecSelferValueTypeArray1234 { - yyl1810 := r.ReadArrayStart() - if yyl1810 == 0 { + } else if yyct1903 == codecSelferValueTypeArray1234 { + yyl1903 := r.ReadArrayStart() + if yyl1903 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1810, d) + x.codecDecodeSelfFromArray(yyl1903, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -23870,12 +25196,12 @@ func (x *PodTemplateList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1811Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1811Slc - var yyhl1811 bool = l >= 0 - for yyj1811 := 0; ; yyj1811++ { - if yyhl1811 { - if yyj1811 >= l { + var yys1904Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1904Slc + var yyhl1904 bool = l >= 0 + for yyj1904 := 0; ; yyj1904++ { + if yyhl1904 { + if yyj1904 >= l { break } } else { @@ -23884,10 +25210,10 @@ func (x *PodTemplateList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1811Slc = r.DecodeBytes(yys1811Slc, true, true) - yys1811 := string(yys1811Slc) + yys1904Slc = r.DecodeBytes(yys1904Slc, true, true) + yys1904 := string(yys1904Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1811 { + switch yys1904 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -23904,31 +25230,31 @@ func (x *PodTemplateList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv1814 := &x.ListMeta - yym1815 := z.DecBinary() - _ = yym1815 + yyv1907 := &x.ListMeta + yym1908 := z.DecBinary() + _ = yym1908 if false { - } else if z.HasExtensions() && z.DecExt(yyv1814) { + } else if z.HasExtensions() && z.DecExt(yyv1907) { } else { - z.DecFallback(yyv1814, false) + z.DecFallback(yyv1907, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv1816 := &x.Items - yym1817 := z.DecBinary() - _ = yym1817 + yyv1909 := &x.Items + yym1910 := z.DecBinary() + _ = yym1910 if false { } else { - h.decSlicePodTemplate((*[]PodTemplate)(yyv1816), d) + h.decSlicePodTemplate((*[]PodTemplate)(yyv1909), d) } } default: - z.DecStructFieldNotFound(-1, yys1811) - } // end switch yys1811 - } // end for yyj1811 + z.DecStructFieldNotFound(-1, yys1904) + } // end switch yys1904 + } // end for yyj1904 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -23936,16 +25262,16 @@ func (x *PodTemplateList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1818 int - var yyb1818 bool - var yyhl1818 bool = l >= 0 - yyj1818++ - if yyhl1818 { - yyb1818 = yyj1818 > l + var yyj1911 int + var yyb1911 bool + var yyhl1911 bool = l >= 0 + yyj1911++ + if yyhl1911 { + yyb1911 = yyj1911 > l } else { - yyb1818 = r.CheckBreak() + yyb1911 = r.CheckBreak() } - if yyb1818 { + if yyb1911 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23955,13 +25281,13 @@ func (x *PodTemplateList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Kind = string(r.DecodeString()) } - yyj1818++ - if yyhl1818 { - yyb1818 = yyj1818 > l + yyj1911++ + if yyhl1911 { + yyb1911 = yyj1911 > l } else { - yyb1818 = r.CheckBreak() + yyb1911 = r.CheckBreak() } - if yyb1818 { + if yyb1911 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23971,13 +25297,13 @@ func (x *PodTemplateList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.APIVersion = string(r.DecodeString()) } - yyj1818++ - if yyhl1818 { - yyb1818 = yyj1818 > l + yyj1911++ + if yyhl1911 { + yyb1911 = yyj1911 > l } else { - yyb1818 = r.CheckBreak() + yyb1911 = r.CheckBreak() } - if yyb1818 { + if yyb1911 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23985,22 +25311,22 @@ func (x *PodTemplateList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv1821 := &x.ListMeta - yym1822 := z.DecBinary() - _ = yym1822 + yyv1914 := &x.ListMeta + yym1915 := z.DecBinary() + _ = yym1915 if false { - } else if z.HasExtensions() && z.DecExt(yyv1821) { + } else if z.HasExtensions() && z.DecExt(yyv1914) { } else { - z.DecFallback(yyv1821, false) + z.DecFallback(yyv1914, false) } } - yyj1818++ - if yyhl1818 { - yyb1818 = yyj1818 > l + yyj1911++ + if yyhl1911 { + yyb1911 = yyj1911 > l } else { - yyb1818 = r.CheckBreak() + yyb1911 = r.CheckBreak() } - if yyb1818 { + if yyb1911 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24008,26 +25334,26 @@ func (x *PodTemplateList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Items = nil } else { - yyv1823 := &x.Items - yym1824 := z.DecBinary() - _ = yym1824 + yyv1916 := &x.Items + yym1917 := z.DecBinary() + _ = yym1917 if false { } else { - h.decSlicePodTemplate((*[]PodTemplate)(yyv1823), d) + h.decSlicePodTemplate((*[]PodTemplate)(yyv1916), d) } } for { - yyj1818++ - if yyhl1818 { - yyb1818 = yyj1818 > l + yyj1911++ + if yyhl1911 { + yyb1911 = yyj1911 > l } else { - yyb1818 = r.CheckBreak() + yyb1911 = r.CheckBreak() } - if yyb1818 { + if yyb1911 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1818-1, "") + z.DecStructFieldNotFound(yyj1911-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -24039,34 +25365,34 @@ func (x *ReplicationControllerSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1825 := z.EncBinary() - _ = yym1825 + yym1918 := z.EncBinary() + _ = yym1918 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1826 := !z.EncBinary() - yy2arr1826 := z.EncBasicHandle().StructToArray - var yyq1826 [3]bool - _, _, _ = yysep1826, yyq1826, yy2arr1826 - const yyr1826 bool = false - yyq1826[2] = x.Template != nil - var yynn1826 int - if yyr1826 || yy2arr1826 { + yysep1919 := !z.EncBinary() + yy2arr1919 := z.EncBasicHandle().StructToArray + var yyq1919 [3]bool + _, _, _ = yysep1919, yyq1919, yy2arr1919 + const yyr1919 bool = false + yyq1919[2] = x.Template != nil + var yynn1919 int + if yyr1919 || yy2arr1919 { r.EncodeArrayStart(3) } else { - yynn1826 = 2 - for _, b := range yyq1826 { + yynn1919 = 2 + for _, b := range yyq1919 { if b { - yynn1826++ + yynn1919++ } } - r.EncodeMapStart(yynn1826) - yynn1826 = 0 + r.EncodeMapStart(yynn1919) + yynn1919 = 0 } - if yyr1826 || yy2arr1826 { + if yyr1919 || yy2arr1919 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1828 := z.EncBinary() - _ = yym1828 + yym1921 := z.EncBinary() + _ = yym1921 if false { } else { r.EncodeInt(int64(x.Replicas)) @@ -24075,20 +25401,20 @@ func (x *ReplicationControllerSpec) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("replicas")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1829 := z.EncBinary() - _ = yym1829 + yym1922 := z.EncBinary() + _ = yym1922 if false { } else { r.EncodeInt(int64(x.Replicas)) } } - if yyr1826 || yy2arr1826 { + if yyr1919 || yy2arr1919 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Selector == nil { r.EncodeNil() } else { - yym1831 := z.EncBinary() - _ = yym1831 + yym1924 := z.EncBinary() + _ = yym1924 if false { } else { z.F.EncMapStringStringV(x.Selector, false, e) @@ -24101,17 +25427,17 @@ func (x *ReplicationControllerSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x.Selector == nil { r.EncodeNil() } else { - yym1832 := z.EncBinary() - _ = yym1832 + yym1925 := z.EncBinary() + _ = yym1925 if false { } else { z.F.EncMapStringStringV(x.Selector, false, e) } } } - if yyr1826 || yy2arr1826 { + if yyr1919 || yy2arr1919 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1826[2] { + if yyq1919[2] { if x.Template == nil { r.EncodeNil() } else { @@ -24121,7 +25447,7 @@ func (x *ReplicationControllerSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1826[2] { + if yyq1919[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("template")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -24132,7 +25458,7 @@ func (x *ReplicationControllerSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1826 || yy2arr1826 { + if yyr1919 || yy2arr1919 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -24145,25 +25471,25 @@ func (x *ReplicationControllerSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1834 := z.DecBinary() - _ = yym1834 + yym1927 := z.DecBinary() + _ = yym1927 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1835 := r.ContainerType() - if yyct1835 == codecSelferValueTypeMap1234 { - yyl1835 := r.ReadMapStart() - if yyl1835 == 0 { + yyct1928 := r.ContainerType() + if yyct1928 == codecSelferValueTypeMap1234 { + yyl1928 := r.ReadMapStart() + if yyl1928 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1835, d) + x.codecDecodeSelfFromMap(yyl1928, d) } - } else if yyct1835 == codecSelferValueTypeArray1234 { - yyl1835 := r.ReadArrayStart() - if yyl1835 == 0 { + } else if yyct1928 == codecSelferValueTypeArray1234 { + yyl1928 := r.ReadArrayStart() + if yyl1928 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1835, d) + x.codecDecodeSelfFromArray(yyl1928, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -24175,12 +25501,12 @@ func (x *ReplicationControllerSpec) codecDecodeSelfFromMap(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1836Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1836Slc - var yyhl1836 bool = l >= 0 - for yyj1836 := 0; ; yyj1836++ { - if yyhl1836 { - if yyj1836 >= l { + var yys1929Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1929Slc + var yyhl1929 bool = l >= 0 + for yyj1929 := 0; ; yyj1929++ { + if yyhl1929 { + if yyj1929 >= l { break } } else { @@ -24189,10 +25515,10 @@ func (x *ReplicationControllerSpec) codecDecodeSelfFromMap(l int, d *codec1978.D } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1836Slc = r.DecodeBytes(yys1836Slc, true, true) - yys1836 := string(yys1836Slc) + yys1929Slc = r.DecodeBytes(yys1929Slc, true, true) + yys1929 := string(yys1929Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1836 { + switch yys1929 { case "replicas": if r.TryDecodeAsNil() { x.Replicas = 0 @@ -24203,12 +25529,12 @@ func (x *ReplicationControllerSpec) codecDecodeSelfFromMap(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Selector = nil } else { - yyv1838 := &x.Selector - yym1839 := z.DecBinary() - _ = yym1839 + yyv1931 := &x.Selector + yym1932 := z.DecBinary() + _ = yym1932 if false { } else { - z.F.DecMapStringStringX(yyv1838, false, d) + z.F.DecMapStringStringX(yyv1931, false, d) } } case "template": @@ -24223,9 +25549,9 @@ func (x *ReplicationControllerSpec) codecDecodeSelfFromMap(l int, d *codec1978.D x.Template.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys1836) - } // end switch yys1836 - } // end for yyj1836 + z.DecStructFieldNotFound(-1, yys1929) + } // end switch yys1929 + } // end for yyj1929 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -24233,16 +25559,16 @@ func (x *ReplicationControllerSpec) codecDecodeSelfFromArray(l int, d *codec1978 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1841 int - var yyb1841 bool - var yyhl1841 bool = l >= 0 - yyj1841++ - if yyhl1841 { - yyb1841 = yyj1841 > l + var yyj1934 int + var yyb1934 bool + var yyhl1934 bool = l >= 0 + yyj1934++ + if yyhl1934 { + yyb1934 = yyj1934 > l } else { - yyb1841 = r.CheckBreak() + yyb1934 = r.CheckBreak() } - if yyb1841 { + if yyb1934 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24252,13 +25578,13 @@ func (x *ReplicationControllerSpec) codecDecodeSelfFromArray(l int, d *codec1978 } else { x.Replicas = int(r.DecodeInt(codecSelferBitsize1234)) } - yyj1841++ - if yyhl1841 { - yyb1841 = yyj1841 > l + yyj1934++ + if yyhl1934 { + yyb1934 = yyj1934 > l } else { - yyb1841 = r.CheckBreak() + yyb1934 = r.CheckBreak() } - if yyb1841 { + if yyb1934 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24266,21 +25592,21 @@ func (x *ReplicationControllerSpec) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.Selector = nil } else { - yyv1843 := &x.Selector - yym1844 := z.DecBinary() - _ = yym1844 + yyv1936 := &x.Selector + yym1937 := z.DecBinary() + _ = yym1937 if false { } else { - z.F.DecMapStringStringX(yyv1843, false, d) + z.F.DecMapStringStringX(yyv1936, false, d) } } - yyj1841++ - if yyhl1841 { - yyb1841 = yyj1841 > l + yyj1934++ + if yyhl1934 { + yyb1934 = yyj1934 > l } else { - yyb1841 = r.CheckBreak() + yyb1934 = r.CheckBreak() } - if yyb1841 { + if yyb1934 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24296,17 +25622,17 @@ func (x *ReplicationControllerSpec) codecDecodeSelfFromArray(l int, d *codec1978 x.Template.CodecDecodeSelf(d) } for { - yyj1841++ - if yyhl1841 { - yyb1841 = yyj1841 > l + yyj1934++ + if yyhl1934 { + yyb1934 = yyj1934 > l } else { - yyb1841 = r.CheckBreak() + yyb1934 = r.CheckBreak() } - if yyb1841 { + if yyb1934 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1841-1, "") + z.DecStructFieldNotFound(yyj1934-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -24318,34 +25644,34 @@ func (x *ReplicationControllerStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1846 := z.EncBinary() - _ = yym1846 + yym1939 := z.EncBinary() + _ = yym1939 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1847 := !z.EncBinary() - yy2arr1847 := z.EncBasicHandle().StructToArray - var yyq1847 [2]bool - _, _, _ = yysep1847, yyq1847, yy2arr1847 - const yyr1847 bool = false - yyq1847[1] = x.ObservedGeneration != 0 - var yynn1847 int - if yyr1847 || yy2arr1847 { + yysep1940 := !z.EncBinary() + yy2arr1940 := z.EncBasicHandle().StructToArray + var yyq1940 [2]bool + _, _, _ = yysep1940, yyq1940, yy2arr1940 + const yyr1940 bool = false + yyq1940[1] = x.ObservedGeneration != 0 + var yynn1940 int + if yyr1940 || yy2arr1940 { r.EncodeArrayStart(2) } else { - yynn1847 = 1 - for _, b := range yyq1847 { + yynn1940 = 1 + for _, b := range yyq1940 { if b { - yynn1847++ + yynn1940++ } } - r.EncodeMapStart(yynn1847) - yynn1847 = 0 + r.EncodeMapStart(yynn1940) + yynn1940 = 0 } - if yyr1847 || yy2arr1847 { + if yyr1940 || yy2arr1940 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1849 := z.EncBinary() - _ = yym1849 + yym1942 := z.EncBinary() + _ = yym1942 if false { } else { r.EncodeInt(int64(x.Replicas)) @@ -24354,18 +25680,18 @@ func (x *ReplicationControllerStatus) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("replicas")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1850 := z.EncBinary() - _ = yym1850 + yym1943 := z.EncBinary() + _ = yym1943 if false { } else { r.EncodeInt(int64(x.Replicas)) } } - if yyr1847 || yy2arr1847 { + if yyr1940 || yy2arr1940 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1847[1] { - yym1852 := z.EncBinary() - _ = yym1852 + if yyq1940[1] { + yym1945 := z.EncBinary() + _ = yym1945 if false { } else { r.EncodeInt(int64(x.ObservedGeneration)) @@ -24374,19 +25700,19 @@ func (x *ReplicationControllerStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq1847[1] { + if yyq1940[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("observedGeneration")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1853 := z.EncBinary() - _ = yym1853 + yym1946 := z.EncBinary() + _ = yym1946 if false { } else { r.EncodeInt(int64(x.ObservedGeneration)) } } } - if yyr1847 || yy2arr1847 { + if yyr1940 || yy2arr1940 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -24399,25 +25725,25 @@ func (x *ReplicationControllerStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1854 := z.DecBinary() - _ = yym1854 + yym1947 := z.DecBinary() + _ = yym1947 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1855 := r.ContainerType() - if yyct1855 == codecSelferValueTypeMap1234 { - yyl1855 := r.ReadMapStart() - if yyl1855 == 0 { + yyct1948 := r.ContainerType() + if yyct1948 == codecSelferValueTypeMap1234 { + yyl1948 := r.ReadMapStart() + if yyl1948 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1855, d) + x.codecDecodeSelfFromMap(yyl1948, d) } - } else if yyct1855 == codecSelferValueTypeArray1234 { - yyl1855 := r.ReadArrayStart() - if yyl1855 == 0 { + } else if yyct1948 == codecSelferValueTypeArray1234 { + yyl1948 := r.ReadArrayStart() + if yyl1948 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1855, d) + x.codecDecodeSelfFromArray(yyl1948, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -24429,12 +25755,12 @@ func (x *ReplicationControllerStatus) codecDecodeSelfFromMap(l int, d *codec1978 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1856Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1856Slc - var yyhl1856 bool = l >= 0 - for yyj1856 := 0; ; yyj1856++ { - if yyhl1856 { - if yyj1856 >= l { + var yys1949Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1949Slc + var yyhl1949 bool = l >= 0 + for yyj1949 := 0; ; yyj1949++ { + if yyhl1949 { + if yyj1949 >= l { break } } else { @@ -24443,10 +25769,10 @@ func (x *ReplicationControllerStatus) codecDecodeSelfFromMap(l int, d *codec1978 } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1856Slc = r.DecodeBytes(yys1856Slc, true, true) - yys1856 := string(yys1856Slc) + yys1949Slc = r.DecodeBytes(yys1949Slc, true, true) + yys1949 := string(yys1949Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1856 { + switch yys1949 { case "replicas": if r.TryDecodeAsNil() { x.Replicas = 0 @@ -24460,9 +25786,9 @@ func (x *ReplicationControllerStatus) codecDecodeSelfFromMap(l int, d *codec1978 x.ObservedGeneration = int64(r.DecodeInt(64)) } default: - z.DecStructFieldNotFound(-1, yys1856) - } // end switch yys1856 - } // end for yyj1856 + z.DecStructFieldNotFound(-1, yys1949) + } // end switch yys1949 + } // end for yyj1949 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -24470,16 +25796,16 @@ func (x *ReplicationControllerStatus) codecDecodeSelfFromArray(l int, d *codec19 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1859 int - var yyb1859 bool - var yyhl1859 bool = l >= 0 - yyj1859++ - if yyhl1859 { - yyb1859 = yyj1859 > l + var yyj1952 int + var yyb1952 bool + var yyhl1952 bool = l >= 0 + yyj1952++ + if yyhl1952 { + yyb1952 = yyj1952 > l } else { - yyb1859 = r.CheckBreak() + yyb1952 = r.CheckBreak() } - if yyb1859 { + if yyb1952 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24489,13 +25815,13 @@ func (x *ReplicationControllerStatus) codecDecodeSelfFromArray(l int, d *codec19 } else { x.Replicas = int(r.DecodeInt(codecSelferBitsize1234)) } - yyj1859++ - if yyhl1859 { - yyb1859 = yyj1859 > l + yyj1952++ + if yyhl1952 { + yyb1952 = yyj1952 > l } else { - yyb1859 = r.CheckBreak() + yyb1952 = r.CheckBreak() } - if yyb1859 { + if yyb1952 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24506,17 +25832,17 @@ func (x *ReplicationControllerStatus) codecDecodeSelfFromArray(l int, d *codec19 x.ObservedGeneration = int64(r.DecodeInt(64)) } for { - yyj1859++ - if yyhl1859 { - yyb1859 = yyj1859 > l + yyj1952++ + if yyhl1952 { + yyb1952 = yyj1952 > l } else { - yyb1859 = r.CheckBreak() + yyb1952 = r.CheckBreak() } - if yyb1859 { + if yyb1952 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1859-1, "") + z.DecStructFieldNotFound(yyj1952-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -24528,39 +25854,39 @@ func (x *ReplicationController) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1862 := z.EncBinary() - _ = yym1862 + yym1955 := z.EncBinary() + _ = yym1955 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1863 := !z.EncBinary() - yy2arr1863 := z.EncBasicHandle().StructToArray - var yyq1863 [5]bool - _, _, _ = yysep1863, yyq1863, yy2arr1863 - const yyr1863 bool = false - yyq1863[0] = x.Kind != "" - yyq1863[1] = x.APIVersion != "" - yyq1863[2] = true - yyq1863[3] = true - yyq1863[4] = true - var yynn1863 int - if yyr1863 || yy2arr1863 { + yysep1956 := !z.EncBinary() + yy2arr1956 := z.EncBasicHandle().StructToArray + var yyq1956 [5]bool + _, _, _ = yysep1956, yyq1956, yy2arr1956 + const yyr1956 bool = false + yyq1956[0] = x.Kind != "" + yyq1956[1] = x.APIVersion != "" + yyq1956[2] = true + yyq1956[3] = true + yyq1956[4] = true + var yynn1956 int + if yyr1956 || yy2arr1956 { r.EncodeArrayStart(5) } else { - yynn1863 = 0 - for _, b := range yyq1863 { + yynn1956 = 0 + for _, b := range yyq1956 { if b { - yynn1863++ + yynn1956++ } } - r.EncodeMapStart(yynn1863) - yynn1863 = 0 + r.EncodeMapStart(yynn1956) + yynn1956 = 0 } - if yyr1863 || yy2arr1863 { + if yyr1956 || yy2arr1956 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1863[0] { - yym1865 := z.EncBinary() - _ = yym1865 + if yyq1956[0] { + yym1958 := z.EncBinary() + _ = yym1958 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -24569,23 +25895,23 @@ func (x *ReplicationController) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1863[0] { + if yyq1956[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1866 := z.EncBinary() - _ = yym1866 + yym1959 := z.EncBinary() + _ = yym1959 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr1863 || yy2arr1863 { + if yyr1956 || yy2arr1956 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1863[1] { - yym1868 := z.EncBinary() - _ = yym1868 + if yyq1956[1] { + yym1961 := z.EncBinary() + _ = yym1961 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -24594,70 +25920,70 @@ func (x *ReplicationController) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1863[1] { + if yyq1956[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1869 := z.EncBinary() - _ = yym1869 + yym1962 := z.EncBinary() + _ = yym1962 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr1863 || yy2arr1863 { + if yyr1956 || yy2arr1956 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1863[2] { - yy1871 := &x.ObjectMeta - yy1871.CodecEncodeSelf(e) + if yyq1956[2] { + yy1964 := &x.ObjectMeta + yy1964.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1863[2] { + if yyq1956[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1872 := &x.ObjectMeta - yy1872.CodecEncodeSelf(e) + yy1965 := &x.ObjectMeta + yy1965.CodecEncodeSelf(e) } } - if yyr1863 || yy2arr1863 { + if yyr1956 || yy2arr1956 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1863[3] { - yy1874 := &x.Spec - yy1874.CodecEncodeSelf(e) + if yyq1956[3] { + yy1967 := &x.Spec + yy1967.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1863[3] { + if yyq1956[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1875 := &x.Spec - yy1875.CodecEncodeSelf(e) + yy1968 := &x.Spec + yy1968.CodecEncodeSelf(e) } } - if yyr1863 || yy2arr1863 { + if yyr1956 || yy2arr1956 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1863[4] { - yy1877 := &x.Status - yy1877.CodecEncodeSelf(e) + if yyq1956[4] { + yy1970 := &x.Status + yy1970.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1863[4] { + if yyq1956[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1878 := &x.Status - yy1878.CodecEncodeSelf(e) + yy1971 := &x.Status + yy1971.CodecEncodeSelf(e) } } - if yyr1863 || yy2arr1863 { + if yyr1956 || yy2arr1956 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -24670,25 +25996,25 @@ func (x *ReplicationController) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1879 := z.DecBinary() - _ = yym1879 + yym1972 := z.DecBinary() + _ = yym1972 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1880 := r.ContainerType() - if yyct1880 == codecSelferValueTypeMap1234 { - yyl1880 := r.ReadMapStart() - if yyl1880 == 0 { + yyct1973 := r.ContainerType() + if yyct1973 == codecSelferValueTypeMap1234 { + yyl1973 := r.ReadMapStart() + if yyl1973 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1880, d) + x.codecDecodeSelfFromMap(yyl1973, d) } - } else if yyct1880 == codecSelferValueTypeArray1234 { - yyl1880 := r.ReadArrayStart() - if yyl1880 == 0 { + } else if yyct1973 == codecSelferValueTypeArray1234 { + yyl1973 := r.ReadArrayStart() + if yyl1973 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1880, d) + x.codecDecodeSelfFromArray(yyl1973, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -24700,12 +26026,12 @@ func (x *ReplicationController) codecDecodeSelfFromMap(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1881Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1881Slc - var yyhl1881 bool = l >= 0 - for yyj1881 := 0; ; yyj1881++ { - if yyhl1881 { - if yyj1881 >= l { + var yys1974Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1974Slc + var yyhl1974 bool = l >= 0 + for yyj1974 := 0; ; yyj1974++ { + if yyhl1974 { + if yyj1974 >= l { break } } else { @@ -24714,10 +26040,10 @@ func (x *ReplicationController) codecDecodeSelfFromMap(l int, d *codec1978.Decod } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1881Slc = r.DecodeBytes(yys1881Slc, true, true) - yys1881 := string(yys1881Slc) + yys1974Slc = r.DecodeBytes(yys1974Slc, true, true) + yys1974 := string(yys1974Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1881 { + switch yys1974 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -24734,27 +26060,27 @@ func (x *ReplicationController) codecDecodeSelfFromMap(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv1884 := &x.ObjectMeta - yyv1884.CodecDecodeSelf(d) + yyv1977 := &x.ObjectMeta + yyv1977.CodecDecodeSelf(d) } case "spec": if r.TryDecodeAsNil() { x.Spec = ReplicationControllerSpec{} } else { - yyv1885 := &x.Spec - yyv1885.CodecDecodeSelf(d) + yyv1978 := &x.Spec + yyv1978.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ReplicationControllerStatus{} } else { - yyv1886 := &x.Status - yyv1886.CodecDecodeSelf(d) + yyv1979 := &x.Status + yyv1979.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys1881) - } // end switch yys1881 - } // end for yyj1881 + z.DecStructFieldNotFound(-1, yys1974) + } // end switch yys1974 + } // end for yyj1974 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -24762,16 +26088,16 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1887 int - var yyb1887 bool - var yyhl1887 bool = l >= 0 - yyj1887++ - if yyhl1887 { - yyb1887 = yyj1887 > l + var yyj1980 int + var yyb1980 bool + var yyhl1980 bool = l >= 0 + yyj1980++ + if yyhl1980 { + yyb1980 = yyj1980 > l } else { - yyb1887 = r.CheckBreak() + yyb1980 = r.CheckBreak() } - if yyb1887 { + if yyb1980 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24781,13 +26107,13 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec } else { x.Kind = string(r.DecodeString()) } - yyj1887++ - if yyhl1887 { - yyb1887 = yyj1887 > l + yyj1980++ + if yyhl1980 { + yyb1980 = yyj1980 > l } else { - yyb1887 = r.CheckBreak() + yyb1980 = r.CheckBreak() } - if yyb1887 { + if yyb1980 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24797,13 +26123,13 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec } else { x.APIVersion = string(r.DecodeString()) } - yyj1887++ - if yyhl1887 { - yyb1887 = yyj1887 > l + yyj1980++ + if yyhl1980 { + yyb1980 = yyj1980 > l } else { - yyb1887 = r.CheckBreak() + yyb1980 = r.CheckBreak() } - if yyb1887 { + if yyb1980 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24811,16 +26137,16 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv1890 := &x.ObjectMeta - yyv1890.CodecDecodeSelf(d) + yyv1983 := &x.ObjectMeta + yyv1983.CodecDecodeSelf(d) } - yyj1887++ - if yyhl1887 { - yyb1887 = yyj1887 > l + yyj1980++ + if yyhl1980 { + yyb1980 = yyj1980 > l } else { - yyb1887 = r.CheckBreak() + yyb1980 = r.CheckBreak() } - if yyb1887 { + if yyb1980 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24828,16 +26154,16 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Spec = ReplicationControllerSpec{} } else { - yyv1891 := &x.Spec - yyv1891.CodecDecodeSelf(d) + yyv1984 := &x.Spec + yyv1984.CodecDecodeSelf(d) } - yyj1887++ - if yyhl1887 { - yyb1887 = yyj1887 > l + yyj1980++ + if yyhl1980 { + yyb1980 = yyj1980 > l } else { - yyb1887 = r.CheckBreak() + yyb1980 = r.CheckBreak() } - if yyb1887 { + if yyb1980 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24845,21 +26171,21 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Status = ReplicationControllerStatus{} } else { - yyv1892 := &x.Status - yyv1892.CodecDecodeSelf(d) + yyv1985 := &x.Status + yyv1985.CodecDecodeSelf(d) } for { - yyj1887++ - if yyhl1887 { - yyb1887 = yyj1887 > l + yyj1980++ + if yyhl1980 { + yyb1980 = yyj1980 > l } else { - yyb1887 = r.CheckBreak() + yyb1980 = r.CheckBreak() } - if yyb1887 { + if yyb1980 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1887-1, "") + z.DecStructFieldNotFound(yyj1980-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -24871,37 +26197,37 @@ func (x *ReplicationControllerList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1893 := z.EncBinary() - _ = yym1893 + yym1986 := z.EncBinary() + _ = yym1986 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1894 := !z.EncBinary() - yy2arr1894 := z.EncBasicHandle().StructToArray - var yyq1894 [4]bool - _, _, _ = yysep1894, yyq1894, yy2arr1894 - const yyr1894 bool = false - yyq1894[0] = x.Kind != "" - yyq1894[1] = x.APIVersion != "" - yyq1894[2] = true - var yynn1894 int - if yyr1894 || yy2arr1894 { + yysep1987 := !z.EncBinary() + yy2arr1987 := z.EncBasicHandle().StructToArray + var yyq1987 [4]bool + _, _, _ = yysep1987, yyq1987, yy2arr1987 + const yyr1987 bool = false + yyq1987[0] = x.Kind != "" + yyq1987[1] = x.APIVersion != "" + yyq1987[2] = true + var yynn1987 int + if yyr1987 || yy2arr1987 { r.EncodeArrayStart(4) } else { - yynn1894 = 1 - for _, b := range yyq1894 { + yynn1987 = 1 + for _, b := range yyq1987 { if b { - yynn1894++ + yynn1987++ } } - r.EncodeMapStart(yynn1894) - yynn1894 = 0 + r.EncodeMapStart(yynn1987) + yynn1987 = 0 } - if yyr1894 || yy2arr1894 { + if yyr1987 || yy2arr1987 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1894[0] { - yym1896 := z.EncBinary() - _ = yym1896 + if yyq1987[0] { + yym1989 := z.EncBinary() + _ = yym1989 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -24910,23 +26236,23 @@ func (x *ReplicationControllerList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1894[0] { + if yyq1987[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1897 := z.EncBinary() - _ = yym1897 + yym1990 := z.EncBinary() + _ = yym1990 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr1894 || yy2arr1894 { + if yyr1987 || yy2arr1987 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1894[1] { - yym1899 := z.EncBinary() - _ = yym1899 + if yyq1987[1] { + yym1992 := z.EncBinary() + _ = yym1992 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -24935,54 +26261,54 @@ func (x *ReplicationControllerList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1894[1] { + if yyq1987[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1900 := z.EncBinary() - _ = yym1900 + yym1993 := z.EncBinary() + _ = yym1993 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr1894 || yy2arr1894 { + if yyr1987 || yy2arr1987 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1894[2] { - yy1902 := &x.ListMeta - yym1903 := z.EncBinary() - _ = yym1903 + if yyq1987[2] { + yy1995 := &x.ListMeta + yym1996 := z.EncBinary() + _ = yym1996 if false { - } else if z.HasExtensions() && z.EncExt(yy1902) { + } else if z.HasExtensions() && z.EncExt(yy1995) { } else { - z.EncFallback(yy1902) + z.EncFallback(yy1995) } } else { r.EncodeNil() } } else { - if yyq1894[2] { + if yyq1987[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1904 := &x.ListMeta - yym1905 := z.EncBinary() - _ = yym1905 + yy1997 := &x.ListMeta + yym1998 := z.EncBinary() + _ = yym1998 if false { - } else if z.HasExtensions() && z.EncExt(yy1904) { + } else if z.HasExtensions() && z.EncExt(yy1997) { } else { - z.EncFallback(yy1904) + z.EncFallback(yy1997) } } } - if yyr1894 || yy2arr1894 { + if yyr1987 || yy2arr1987 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym1907 := z.EncBinary() - _ = yym1907 + yym2000 := z.EncBinary() + _ = yym2000 if false { } else { h.encSliceReplicationController(([]ReplicationController)(x.Items), e) @@ -24995,15 +26321,15 @@ func (x *ReplicationControllerList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym1908 := z.EncBinary() - _ = yym1908 + yym2001 := z.EncBinary() + _ = yym2001 if false { } else { h.encSliceReplicationController(([]ReplicationController)(x.Items), e) } } } - if yyr1894 || yy2arr1894 { + if yyr1987 || yy2arr1987 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -25016,25 +26342,25 @@ func (x *ReplicationControllerList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1909 := z.DecBinary() - _ = yym1909 + yym2002 := z.DecBinary() + _ = yym2002 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1910 := r.ContainerType() - if yyct1910 == codecSelferValueTypeMap1234 { - yyl1910 := r.ReadMapStart() - if yyl1910 == 0 { + yyct2003 := r.ContainerType() + if yyct2003 == codecSelferValueTypeMap1234 { + yyl2003 := r.ReadMapStart() + if yyl2003 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1910, d) + x.codecDecodeSelfFromMap(yyl2003, d) } - } else if yyct1910 == codecSelferValueTypeArray1234 { - yyl1910 := r.ReadArrayStart() - if yyl1910 == 0 { + } else if yyct2003 == codecSelferValueTypeArray1234 { + yyl2003 := r.ReadArrayStart() + if yyl2003 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1910, d) + x.codecDecodeSelfFromArray(yyl2003, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -25046,12 +26372,12 @@ func (x *ReplicationControllerList) codecDecodeSelfFromMap(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1911Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1911Slc - var yyhl1911 bool = l >= 0 - for yyj1911 := 0; ; yyj1911++ { - if yyhl1911 { - if yyj1911 >= l { + var yys2004Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2004Slc + var yyhl2004 bool = l >= 0 + for yyj2004 := 0; ; yyj2004++ { + if yyhl2004 { + if yyj2004 >= l { break } } else { @@ -25060,10 +26386,10 @@ func (x *ReplicationControllerList) codecDecodeSelfFromMap(l int, d *codec1978.D } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1911Slc = r.DecodeBytes(yys1911Slc, true, true) - yys1911 := string(yys1911Slc) + yys2004Slc = r.DecodeBytes(yys2004Slc, true, true) + yys2004 := string(yys2004Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1911 { + switch yys2004 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -25080,31 +26406,31 @@ func (x *ReplicationControllerList) codecDecodeSelfFromMap(l int, d *codec1978.D if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv1914 := &x.ListMeta - yym1915 := z.DecBinary() - _ = yym1915 + yyv2007 := &x.ListMeta + yym2008 := z.DecBinary() + _ = yym2008 if false { - } else if z.HasExtensions() && z.DecExt(yyv1914) { + } else if z.HasExtensions() && z.DecExt(yyv2007) { } else { - z.DecFallback(yyv1914, false) + z.DecFallback(yyv2007, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv1916 := &x.Items - yym1917 := z.DecBinary() - _ = yym1917 + yyv2009 := &x.Items + yym2010 := z.DecBinary() + _ = yym2010 if false { } else { - h.decSliceReplicationController((*[]ReplicationController)(yyv1916), d) + h.decSliceReplicationController((*[]ReplicationController)(yyv2009), d) } } default: - z.DecStructFieldNotFound(-1, yys1911) - } // end switch yys1911 - } // end for yyj1911 + z.DecStructFieldNotFound(-1, yys2004) + } // end switch yys2004 + } // end for yyj2004 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -25112,16 +26438,16 @@ func (x *ReplicationControllerList) codecDecodeSelfFromArray(l int, d *codec1978 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1918 int - var yyb1918 bool - var yyhl1918 bool = l >= 0 - yyj1918++ - if yyhl1918 { - yyb1918 = yyj1918 > l + var yyj2011 int + var yyb2011 bool + var yyhl2011 bool = l >= 0 + yyj2011++ + if yyhl2011 { + yyb2011 = yyj2011 > l } else { - yyb1918 = r.CheckBreak() + yyb2011 = r.CheckBreak() } - if yyb1918 { + if yyb2011 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -25131,13 +26457,13 @@ func (x *ReplicationControllerList) codecDecodeSelfFromArray(l int, d *codec1978 } else { x.Kind = string(r.DecodeString()) } - yyj1918++ - if yyhl1918 { - yyb1918 = yyj1918 > l + yyj2011++ + if yyhl2011 { + yyb2011 = yyj2011 > l } else { - yyb1918 = r.CheckBreak() + yyb2011 = r.CheckBreak() } - if yyb1918 { + if yyb2011 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -25147,13 +26473,13 @@ func (x *ReplicationControllerList) codecDecodeSelfFromArray(l int, d *codec1978 } else { x.APIVersion = string(r.DecodeString()) } - yyj1918++ - if yyhl1918 { - yyb1918 = yyj1918 > l + yyj2011++ + if yyhl2011 { + yyb2011 = yyj2011 > l } else { - yyb1918 = r.CheckBreak() + yyb2011 = r.CheckBreak() } - if yyb1918 { + if yyb2011 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -25161,22 +26487,22 @@ func (x *ReplicationControllerList) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv1921 := &x.ListMeta - yym1922 := z.DecBinary() - _ = yym1922 + yyv2014 := &x.ListMeta + yym2015 := z.DecBinary() + _ = yym2015 if false { - } else if z.HasExtensions() && z.DecExt(yyv1921) { + } else if z.HasExtensions() && z.DecExt(yyv2014) { } else { - z.DecFallback(yyv1921, false) + z.DecFallback(yyv2014, false) } } - yyj1918++ - if yyhl1918 { - yyb1918 = yyj1918 > l + yyj2011++ + if yyhl2011 { + yyb2011 = yyj2011 > l } else { - yyb1918 = r.CheckBreak() + yyb2011 = r.CheckBreak() } - if yyb1918 { + if yyb2011 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -25184,26 +26510,26 @@ func (x *ReplicationControllerList) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.Items = nil } else { - yyv1923 := &x.Items - yym1924 := z.DecBinary() - _ = yym1924 + yyv2016 := &x.Items + yym2017 := z.DecBinary() + _ = yym2017 if false { } else { - h.decSliceReplicationController((*[]ReplicationController)(yyv1923), d) + h.decSliceReplicationController((*[]ReplicationController)(yyv2016), d) } } for { - yyj1918++ - if yyhl1918 { - yyb1918 = yyj1918 > l + yyj2011++ + if yyhl2011 { + yyb2011 = yyj2011 > l } else { - yyb1918 = r.CheckBreak() + yyb2011 = r.CheckBreak() } - if yyb1918 { + if yyb2011 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1918-1, "") + z.DecStructFieldNotFound(yyj2011-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -25215,37 +26541,37 @@ func (x *ServiceList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1925 := z.EncBinary() - _ = yym1925 + yym2018 := z.EncBinary() + _ = yym2018 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1926 := !z.EncBinary() - yy2arr1926 := z.EncBasicHandle().StructToArray - var yyq1926 [4]bool - _, _, _ = yysep1926, yyq1926, yy2arr1926 - const yyr1926 bool = false - yyq1926[0] = x.Kind != "" - yyq1926[1] = x.APIVersion != "" - yyq1926[2] = true - var yynn1926 int - if yyr1926 || yy2arr1926 { + yysep2019 := !z.EncBinary() + yy2arr2019 := z.EncBasicHandle().StructToArray + var yyq2019 [4]bool + _, _, _ = yysep2019, yyq2019, yy2arr2019 + const yyr2019 bool = false + yyq2019[0] = x.Kind != "" + yyq2019[1] = x.APIVersion != "" + yyq2019[2] = true + var yynn2019 int + if yyr2019 || yy2arr2019 { r.EncodeArrayStart(4) } else { - yynn1926 = 1 - for _, b := range yyq1926 { + yynn2019 = 1 + for _, b := range yyq2019 { if b { - yynn1926++ + yynn2019++ } } - r.EncodeMapStart(yynn1926) - yynn1926 = 0 + r.EncodeMapStart(yynn2019) + yynn2019 = 0 } - if yyr1926 || yy2arr1926 { + if yyr2019 || yy2arr2019 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1926[0] { - yym1928 := z.EncBinary() - _ = yym1928 + if yyq2019[0] { + yym2021 := z.EncBinary() + _ = yym2021 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -25254,23 +26580,23 @@ func (x *ServiceList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1926[0] { + if yyq2019[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1929 := z.EncBinary() - _ = yym1929 + yym2022 := z.EncBinary() + _ = yym2022 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr1926 || yy2arr1926 { + if yyr2019 || yy2arr2019 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1926[1] { - yym1931 := z.EncBinary() - _ = yym1931 + if yyq2019[1] { + yym2024 := z.EncBinary() + _ = yym2024 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -25279,54 +26605,54 @@ func (x *ServiceList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1926[1] { + if yyq2019[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1932 := z.EncBinary() - _ = yym1932 + yym2025 := z.EncBinary() + _ = yym2025 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr1926 || yy2arr1926 { + if yyr2019 || yy2arr2019 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1926[2] { - yy1934 := &x.ListMeta - yym1935 := z.EncBinary() - _ = yym1935 + if yyq2019[2] { + yy2027 := &x.ListMeta + yym2028 := z.EncBinary() + _ = yym2028 if false { - } else if z.HasExtensions() && z.EncExt(yy1934) { + } else if z.HasExtensions() && z.EncExt(yy2027) { } else { - z.EncFallback(yy1934) + z.EncFallback(yy2027) } } else { r.EncodeNil() } } else { - if yyq1926[2] { + if yyq2019[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1936 := &x.ListMeta - yym1937 := z.EncBinary() - _ = yym1937 + yy2029 := &x.ListMeta + yym2030 := z.EncBinary() + _ = yym2030 if false { - } else if z.HasExtensions() && z.EncExt(yy1936) { + } else if z.HasExtensions() && z.EncExt(yy2029) { } else { - z.EncFallback(yy1936) + z.EncFallback(yy2029) } } } - if yyr1926 || yy2arr1926 { + if yyr2019 || yy2arr2019 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym1939 := z.EncBinary() - _ = yym1939 + yym2032 := z.EncBinary() + _ = yym2032 if false { } else { h.encSliceService(([]Service)(x.Items), e) @@ -25339,15 +26665,15 @@ func (x *ServiceList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym1940 := z.EncBinary() - _ = yym1940 + yym2033 := z.EncBinary() + _ = yym2033 if false { } else { h.encSliceService(([]Service)(x.Items), e) } } } - if yyr1926 || yy2arr1926 { + if yyr2019 || yy2arr2019 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -25360,25 +26686,25 @@ func (x *ServiceList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1941 := z.DecBinary() - _ = yym1941 + yym2034 := z.DecBinary() + _ = yym2034 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1942 := r.ContainerType() - if yyct1942 == codecSelferValueTypeMap1234 { - yyl1942 := r.ReadMapStart() - if yyl1942 == 0 { + yyct2035 := r.ContainerType() + if yyct2035 == codecSelferValueTypeMap1234 { + yyl2035 := r.ReadMapStart() + if yyl2035 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1942, d) + x.codecDecodeSelfFromMap(yyl2035, d) } - } else if yyct1942 == codecSelferValueTypeArray1234 { - yyl1942 := r.ReadArrayStart() - if yyl1942 == 0 { + } else if yyct2035 == codecSelferValueTypeArray1234 { + yyl2035 := r.ReadArrayStart() + if yyl2035 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1942, d) + x.codecDecodeSelfFromArray(yyl2035, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -25390,12 +26716,12 @@ func (x *ServiceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1943Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1943Slc - var yyhl1943 bool = l >= 0 - for yyj1943 := 0; ; yyj1943++ { - if yyhl1943 { - if yyj1943 >= l { + var yys2036Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2036Slc + var yyhl2036 bool = l >= 0 + for yyj2036 := 0; ; yyj2036++ { + if yyhl2036 { + if yyj2036 >= l { break } } else { @@ -25404,10 +26730,10 @@ func (x *ServiceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1943Slc = r.DecodeBytes(yys1943Slc, true, true) - yys1943 := string(yys1943Slc) + yys2036Slc = r.DecodeBytes(yys2036Slc, true, true) + yys2036 := string(yys2036Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1943 { + switch yys2036 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -25424,31 +26750,31 @@ func (x *ServiceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv1946 := &x.ListMeta - yym1947 := z.DecBinary() - _ = yym1947 + yyv2039 := &x.ListMeta + yym2040 := z.DecBinary() + _ = yym2040 if false { - } else if z.HasExtensions() && z.DecExt(yyv1946) { + } else if z.HasExtensions() && z.DecExt(yyv2039) { } else { - z.DecFallback(yyv1946, false) + z.DecFallback(yyv2039, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv1948 := &x.Items - yym1949 := z.DecBinary() - _ = yym1949 + yyv2041 := &x.Items + yym2042 := z.DecBinary() + _ = yym2042 if false { } else { - h.decSliceService((*[]Service)(yyv1948), d) + h.decSliceService((*[]Service)(yyv2041), d) } } default: - z.DecStructFieldNotFound(-1, yys1943) - } // end switch yys1943 - } // end for yyj1943 + z.DecStructFieldNotFound(-1, yys2036) + } // end switch yys2036 + } // end for yyj2036 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -25456,16 +26782,16 @@ func (x *ServiceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1950 int - var yyb1950 bool - var yyhl1950 bool = l >= 0 - yyj1950++ - if yyhl1950 { - yyb1950 = yyj1950 > l + var yyj2043 int + var yyb2043 bool + var yyhl2043 bool = l >= 0 + yyj2043++ + if yyhl2043 { + yyb2043 = yyj2043 > l } else { - yyb1950 = r.CheckBreak() + yyb2043 = r.CheckBreak() } - if yyb1950 { + if yyb2043 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -25475,13 +26801,13 @@ func (x *ServiceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj1950++ - if yyhl1950 { - yyb1950 = yyj1950 > l + yyj2043++ + if yyhl2043 { + yyb2043 = yyj2043 > l } else { - yyb1950 = r.CheckBreak() + yyb2043 = r.CheckBreak() } - if yyb1950 { + if yyb2043 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -25491,13 +26817,13 @@ func (x *ServiceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj1950++ - if yyhl1950 { - yyb1950 = yyj1950 > l + yyj2043++ + if yyhl2043 { + yyb2043 = yyj2043 > l } else { - yyb1950 = r.CheckBreak() + yyb2043 = r.CheckBreak() } - if yyb1950 { + if yyb2043 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -25505,22 +26831,22 @@ func (x *ServiceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv1953 := &x.ListMeta - yym1954 := z.DecBinary() - _ = yym1954 + yyv2046 := &x.ListMeta + yym2047 := z.DecBinary() + _ = yym2047 if false { - } else if z.HasExtensions() && z.DecExt(yyv1953) { + } else if z.HasExtensions() && z.DecExt(yyv2046) { } else { - z.DecFallback(yyv1953, false) + z.DecFallback(yyv2046, false) } } - yyj1950++ - if yyhl1950 { - yyb1950 = yyj1950 > l + yyj2043++ + if yyhl2043 { + yyb2043 = yyj2043 > l } else { - yyb1950 = r.CheckBreak() + yyb2043 = r.CheckBreak() } - if yyb1950 { + if yyb2043 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -25528,26 +26854,26 @@ func (x *ServiceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv1955 := &x.Items - yym1956 := z.DecBinary() - _ = yym1956 + yyv2048 := &x.Items + yym2049 := z.DecBinary() + _ = yym2049 if false { } else { - h.decSliceService((*[]Service)(yyv1955), d) + h.decSliceService((*[]Service)(yyv2048), d) } } for { - yyj1950++ - if yyhl1950 { - yyb1950 = yyj1950 > l + yyj2043++ + if yyhl2043 { + yyb2043 = yyj2043 > l } else { - yyb1950 = r.CheckBreak() + yyb2043 = r.CheckBreak() } - if yyb1950 { + if yyb2043 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1950-1, "") + z.DecStructFieldNotFound(yyj2043-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -25556,8 +26882,8 @@ func (x ServiceAffinity) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym1957 := z.EncBinary() - _ = yym1957 + yym2050 := z.EncBinary() + _ = yym2050 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -25569,8 +26895,8 @@ func (x *ServiceAffinity) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1958 := z.DecBinary() - _ = yym1958 + yym2051 := z.DecBinary() + _ = yym2051 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -25582,8 +26908,8 @@ func (x ServiceType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym1959 := z.EncBinary() - _ = yym1959 + yym2052 := z.EncBinary() + _ = yym2052 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -25595,8 +26921,8 @@ func (x *ServiceType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1960 := z.DecBinary() - _ = yym1960 + yym2053 := z.DecBinary() + _ = yym2053 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -25611,48 +26937,48 @@ func (x *ServiceStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1961 := z.EncBinary() - _ = yym1961 + yym2054 := z.EncBinary() + _ = yym2054 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1962 := !z.EncBinary() - yy2arr1962 := z.EncBasicHandle().StructToArray - var yyq1962 [1]bool - _, _, _ = yysep1962, yyq1962, yy2arr1962 - const yyr1962 bool = false - yyq1962[0] = true - var yynn1962 int - if yyr1962 || yy2arr1962 { + yysep2055 := !z.EncBinary() + yy2arr2055 := z.EncBasicHandle().StructToArray + var yyq2055 [1]bool + _, _, _ = yysep2055, yyq2055, yy2arr2055 + const yyr2055 bool = false + yyq2055[0] = true + var yynn2055 int + if yyr2055 || yy2arr2055 { r.EncodeArrayStart(1) } else { - yynn1962 = 0 - for _, b := range yyq1962 { + yynn2055 = 0 + for _, b := range yyq2055 { if b { - yynn1962++ + yynn2055++ } } - r.EncodeMapStart(yynn1962) - yynn1962 = 0 + r.EncodeMapStart(yynn2055) + yynn2055 = 0 } - if yyr1962 || yy2arr1962 { + if yyr2055 || yy2arr2055 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1962[0] { - yy1964 := &x.LoadBalancer - yy1964.CodecEncodeSelf(e) + if yyq2055[0] { + yy2057 := &x.LoadBalancer + yy2057.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1962[0] { + if yyq2055[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("loadBalancer")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1965 := &x.LoadBalancer - yy1965.CodecEncodeSelf(e) + yy2058 := &x.LoadBalancer + yy2058.CodecEncodeSelf(e) } } - if yyr1962 || yy2arr1962 { + if yyr2055 || yy2arr2055 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -25665,25 +26991,25 @@ func (x *ServiceStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1966 := z.DecBinary() - _ = yym1966 + yym2059 := z.DecBinary() + _ = yym2059 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1967 := r.ContainerType() - if yyct1967 == codecSelferValueTypeMap1234 { - yyl1967 := r.ReadMapStart() - if yyl1967 == 0 { + yyct2060 := r.ContainerType() + if yyct2060 == codecSelferValueTypeMap1234 { + yyl2060 := r.ReadMapStart() + if yyl2060 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1967, d) + x.codecDecodeSelfFromMap(yyl2060, d) } - } else if yyct1967 == codecSelferValueTypeArray1234 { - yyl1967 := r.ReadArrayStart() - if yyl1967 == 0 { + } else if yyct2060 == codecSelferValueTypeArray1234 { + yyl2060 := r.ReadArrayStart() + if yyl2060 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1967, d) + x.codecDecodeSelfFromArray(yyl2060, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -25695,12 +27021,12 @@ func (x *ServiceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1968Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1968Slc - var yyhl1968 bool = l >= 0 - for yyj1968 := 0; ; yyj1968++ { - if yyhl1968 { - if yyj1968 >= l { + var yys2061Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2061Slc + var yyhl2061 bool = l >= 0 + for yyj2061 := 0; ; yyj2061++ { + if yyhl2061 { + if yyj2061 >= l { break } } else { @@ -25709,21 +27035,21 @@ func (x *ServiceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1968Slc = r.DecodeBytes(yys1968Slc, true, true) - yys1968 := string(yys1968Slc) + yys2061Slc = r.DecodeBytes(yys2061Slc, true, true) + yys2061 := string(yys2061Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1968 { + switch yys2061 { case "loadBalancer": if r.TryDecodeAsNil() { x.LoadBalancer = LoadBalancerStatus{} } else { - yyv1969 := &x.LoadBalancer - yyv1969.CodecDecodeSelf(d) + yyv2062 := &x.LoadBalancer + yyv2062.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys1968) - } // end switch yys1968 - } // end for yyj1968 + z.DecStructFieldNotFound(-1, yys2061) + } // end switch yys2061 + } // end for yyj2061 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -25731,16 +27057,16 @@ func (x *ServiceStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1970 int - var yyb1970 bool - var yyhl1970 bool = l >= 0 - yyj1970++ - if yyhl1970 { - yyb1970 = yyj1970 > l + var yyj2063 int + var yyb2063 bool + var yyhl2063 bool = l >= 0 + yyj2063++ + if yyhl2063 { + yyb2063 = yyj2063 > l } else { - yyb1970 = r.CheckBreak() + yyb2063 = r.CheckBreak() } - if yyb1970 { + if yyb2063 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -25748,21 +27074,21 @@ func (x *ServiceStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.LoadBalancer = LoadBalancerStatus{} } else { - yyv1971 := &x.LoadBalancer - yyv1971.CodecDecodeSelf(d) + yyv2064 := &x.LoadBalancer + yyv2064.CodecDecodeSelf(d) } for { - yyj1970++ - if yyhl1970 { - yyb1970 = yyj1970 > l + yyj2063++ + if yyhl2063 { + yyb2063 = yyj2063 > l } else { - yyb1970 = r.CheckBreak() + yyb2063 = r.CheckBreak() } - if yyb1970 { + if yyb2063 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1970-1, "") + z.DecStructFieldNotFound(yyj2063-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -25774,38 +27100,38 @@ func (x *LoadBalancerStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1972 := z.EncBinary() - _ = yym1972 + yym2065 := z.EncBinary() + _ = yym2065 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1973 := !z.EncBinary() - yy2arr1973 := z.EncBasicHandle().StructToArray - var yyq1973 [1]bool - _, _, _ = yysep1973, yyq1973, yy2arr1973 - const yyr1973 bool = false - yyq1973[0] = len(x.Ingress) != 0 - var yynn1973 int - if yyr1973 || yy2arr1973 { + yysep2066 := !z.EncBinary() + yy2arr2066 := z.EncBasicHandle().StructToArray + var yyq2066 [1]bool + _, _, _ = yysep2066, yyq2066, yy2arr2066 + const yyr2066 bool = false + yyq2066[0] = len(x.Ingress) != 0 + var yynn2066 int + if yyr2066 || yy2arr2066 { r.EncodeArrayStart(1) } else { - yynn1973 = 0 - for _, b := range yyq1973 { + yynn2066 = 0 + for _, b := range yyq2066 { if b { - yynn1973++ + yynn2066++ } } - r.EncodeMapStart(yynn1973) - yynn1973 = 0 + r.EncodeMapStart(yynn2066) + yynn2066 = 0 } - if yyr1973 || yy2arr1973 { + if yyr2066 || yy2arr2066 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1973[0] { + if yyq2066[0] { if x.Ingress == nil { r.EncodeNil() } else { - yym1975 := z.EncBinary() - _ = yym1975 + yym2068 := z.EncBinary() + _ = yym2068 if false { } else { h.encSliceLoadBalancerIngress(([]LoadBalancerIngress)(x.Ingress), e) @@ -25815,15 +27141,15 @@ func (x *LoadBalancerStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1973[0] { + if yyq2066[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("ingress")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Ingress == nil { r.EncodeNil() } else { - yym1976 := z.EncBinary() - _ = yym1976 + yym2069 := z.EncBinary() + _ = yym2069 if false { } else { h.encSliceLoadBalancerIngress(([]LoadBalancerIngress)(x.Ingress), e) @@ -25831,7 +27157,7 @@ func (x *LoadBalancerStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1973 || yy2arr1973 { + if yyr2066 || yy2arr2066 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -25844,25 +27170,25 @@ func (x *LoadBalancerStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1977 := z.DecBinary() - _ = yym1977 + yym2070 := z.DecBinary() + _ = yym2070 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1978 := r.ContainerType() - if yyct1978 == codecSelferValueTypeMap1234 { - yyl1978 := r.ReadMapStart() - if yyl1978 == 0 { + yyct2071 := r.ContainerType() + if yyct2071 == codecSelferValueTypeMap1234 { + yyl2071 := r.ReadMapStart() + if yyl2071 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1978, d) + x.codecDecodeSelfFromMap(yyl2071, d) } - } else if yyct1978 == codecSelferValueTypeArray1234 { - yyl1978 := r.ReadArrayStart() - if yyl1978 == 0 { + } else if yyct2071 == codecSelferValueTypeArray1234 { + yyl2071 := r.ReadArrayStart() + if yyl2071 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1978, d) + x.codecDecodeSelfFromArray(yyl2071, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -25874,12 +27200,12 @@ func (x *LoadBalancerStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1979Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1979Slc - var yyhl1979 bool = l >= 0 - for yyj1979 := 0; ; yyj1979++ { - if yyhl1979 { - if yyj1979 >= l { + var yys2072Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2072Slc + var yyhl2072 bool = l >= 0 + for yyj2072 := 0; ; yyj2072++ { + if yyhl2072 { + if yyj2072 >= l { break } } else { @@ -25888,26 +27214,26 @@ func (x *LoadBalancerStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1979Slc = r.DecodeBytes(yys1979Slc, true, true) - yys1979 := string(yys1979Slc) + yys2072Slc = r.DecodeBytes(yys2072Slc, true, true) + yys2072 := string(yys2072Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1979 { + switch yys2072 { case "ingress": if r.TryDecodeAsNil() { x.Ingress = nil } else { - yyv1980 := &x.Ingress - yym1981 := z.DecBinary() - _ = yym1981 + yyv2073 := &x.Ingress + yym2074 := z.DecBinary() + _ = yym2074 if false { } else { - h.decSliceLoadBalancerIngress((*[]LoadBalancerIngress)(yyv1980), d) + h.decSliceLoadBalancerIngress((*[]LoadBalancerIngress)(yyv2073), d) } } default: - z.DecStructFieldNotFound(-1, yys1979) - } // end switch yys1979 - } // end for yyj1979 + z.DecStructFieldNotFound(-1, yys2072) + } // end switch yys2072 + } // end for yyj2072 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -25915,16 +27241,16 @@ func (x *LoadBalancerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1982 int - var yyb1982 bool - var yyhl1982 bool = l >= 0 - yyj1982++ - if yyhl1982 { - yyb1982 = yyj1982 > l + var yyj2075 int + var yyb2075 bool + var yyhl2075 bool = l >= 0 + yyj2075++ + if yyhl2075 { + yyb2075 = yyj2075 > l } else { - yyb1982 = r.CheckBreak() + yyb2075 = r.CheckBreak() } - if yyb1982 { + if yyb2075 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -25932,26 +27258,26 @@ func (x *LoadBalancerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Ingress = nil } else { - yyv1983 := &x.Ingress - yym1984 := z.DecBinary() - _ = yym1984 + yyv2076 := &x.Ingress + yym2077 := z.DecBinary() + _ = yym2077 if false { } else { - h.decSliceLoadBalancerIngress((*[]LoadBalancerIngress)(yyv1983), d) + h.decSliceLoadBalancerIngress((*[]LoadBalancerIngress)(yyv2076), d) } } for { - yyj1982++ - if yyhl1982 { - yyb1982 = yyj1982 > l + yyj2075++ + if yyhl2075 { + yyb2075 = yyj2075 > l } else { - yyb1982 = r.CheckBreak() + yyb2075 = r.CheckBreak() } - if yyb1982 { + if yyb2075 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1982-1, "") + z.DecStructFieldNotFound(yyj2075-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -25963,36 +27289,36 @@ func (x *LoadBalancerIngress) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1985 := z.EncBinary() - _ = yym1985 + yym2078 := z.EncBinary() + _ = yym2078 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1986 := !z.EncBinary() - yy2arr1986 := z.EncBasicHandle().StructToArray - var yyq1986 [2]bool - _, _, _ = yysep1986, yyq1986, yy2arr1986 - const yyr1986 bool = false - yyq1986[0] = x.IP != "" - yyq1986[1] = x.Hostname != "" - var yynn1986 int - if yyr1986 || yy2arr1986 { + yysep2079 := !z.EncBinary() + yy2arr2079 := z.EncBasicHandle().StructToArray + var yyq2079 [2]bool + _, _, _ = yysep2079, yyq2079, yy2arr2079 + const yyr2079 bool = false + yyq2079[0] = x.IP != "" + yyq2079[1] = x.Hostname != "" + var yynn2079 int + if yyr2079 || yy2arr2079 { r.EncodeArrayStart(2) } else { - yynn1986 = 0 - for _, b := range yyq1986 { + yynn2079 = 0 + for _, b := range yyq2079 { if b { - yynn1986++ + yynn2079++ } } - r.EncodeMapStart(yynn1986) - yynn1986 = 0 + r.EncodeMapStart(yynn2079) + yynn2079 = 0 } - if yyr1986 || yy2arr1986 { + if yyr2079 || yy2arr2079 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1986[0] { - yym1988 := z.EncBinary() - _ = yym1988 + if yyq2079[0] { + yym2081 := z.EncBinary() + _ = yym2081 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.IP)) @@ -26001,23 +27327,23 @@ func (x *LoadBalancerIngress) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1986[0] { + if yyq2079[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("ip")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1989 := z.EncBinary() - _ = yym1989 + yym2082 := z.EncBinary() + _ = yym2082 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.IP)) } } } - if yyr1986 || yy2arr1986 { + if yyr2079 || yy2arr2079 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1986[1] { - yym1991 := z.EncBinary() - _ = yym1991 + if yyq2079[1] { + yym2084 := z.EncBinary() + _ = yym2084 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Hostname)) @@ -26026,19 +27352,19 @@ func (x *LoadBalancerIngress) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1986[1] { + if yyq2079[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hostname")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1992 := z.EncBinary() - _ = yym1992 + yym2085 := z.EncBinary() + _ = yym2085 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Hostname)) } } } - if yyr1986 || yy2arr1986 { + if yyr2079 || yy2arr2079 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -26051,25 +27377,25 @@ func (x *LoadBalancerIngress) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1993 := z.DecBinary() - _ = yym1993 + yym2086 := z.DecBinary() + _ = yym2086 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1994 := r.ContainerType() - if yyct1994 == codecSelferValueTypeMap1234 { - yyl1994 := r.ReadMapStart() - if yyl1994 == 0 { + yyct2087 := r.ContainerType() + if yyct2087 == codecSelferValueTypeMap1234 { + yyl2087 := r.ReadMapStart() + if yyl2087 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1994, d) + x.codecDecodeSelfFromMap(yyl2087, d) } - } else if yyct1994 == codecSelferValueTypeArray1234 { - yyl1994 := r.ReadArrayStart() - if yyl1994 == 0 { + } else if yyct2087 == codecSelferValueTypeArray1234 { + yyl2087 := r.ReadArrayStart() + if yyl2087 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1994, d) + x.codecDecodeSelfFromArray(yyl2087, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -26081,12 +27407,12 @@ func (x *LoadBalancerIngress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1995Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1995Slc - var yyhl1995 bool = l >= 0 - for yyj1995 := 0; ; yyj1995++ { - if yyhl1995 { - if yyj1995 >= l { + var yys2088Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2088Slc + var yyhl2088 bool = l >= 0 + for yyj2088 := 0; ; yyj2088++ { + if yyhl2088 { + if yyj2088 >= l { break } } else { @@ -26095,10 +27421,10 @@ func (x *LoadBalancerIngress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1995Slc = r.DecodeBytes(yys1995Slc, true, true) - yys1995 := string(yys1995Slc) + yys2088Slc = r.DecodeBytes(yys2088Slc, true, true) + yys2088 := string(yys2088Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1995 { + switch yys2088 { case "ip": if r.TryDecodeAsNil() { x.IP = "" @@ -26112,9 +27438,9 @@ func (x *LoadBalancerIngress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder x.Hostname = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys1995) - } // end switch yys1995 - } // end for yyj1995 + z.DecStructFieldNotFound(-1, yys2088) + } // end switch yys2088 + } // end for yyj2088 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -26122,16 +27448,16 @@ func (x *LoadBalancerIngress) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1998 int - var yyb1998 bool - var yyhl1998 bool = l >= 0 - yyj1998++ - if yyhl1998 { - yyb1998 = yyj1998 > l + var yyj2091 int + var yyb2091 bool + var yyhl2091 bool = l >= 0 + yyj2091++ + if yyhl2091 { + yyb2091 = yyj2091 > l } else { - yyb1998 = r.CheckBreak() + yyb2091 = r.CheckBreak() } - if yyb1998 { + if yyb2091 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26141,13 +27467,13 @@ func (x *LoadBalancerIngress) codecDecodeSelfFromArray(l int, d *codec1978.Decod } else { x.IP = string(r.DecodeString()) } - yyj1998++ - if yyhl1998 { - yyb1998 = yyj1998 > l + yyj2091++ + if yyhl2091 { + yyb2091 = yyj2091 > l } else { - yyb1998 = r.CheckBreak() + yyb2091 = r.CheckBreak() } - if yyb1998 { + if yyb2091 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26158,17 +27484,17 @@ func (x *LoadBalancerIngress) codecDecodeSelfFromArray(l int, d *codec1978.Decod x.Hostname = string(r.DecodeString()) } for { - yyj1998++ - if yyhl1998 { - yyb1998 = yyj1998 > l + yyj2091++ + if yyhl2091 { + yyb2091 = yyj2091 > l } else { - yyb1998 = r.CheckBreak() + yyb2091 = r.CheckBreak() } - if yyb1998 { + if yyb2091 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1998-1, "") + z.DecStructFieldNotFound(yyj2091-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -26180,56 +27506,56 @@ func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2001 := z.EncBinary() - _ = yym2001 + yym2094 := z.EncBinary() + _ = yym2094 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2002 := !z.EncBinary() - yy2arr2002 := z.EncBasicHandle().StructToArray - var yyq2002 [7]bool - _, _, _ = yysep2002, yyq2002, yy2arr2002 - const yyr2002 bool = false - yyq2002[0] = x.Type != "" - yyq2002[3] = x.ClusterIP != "" - yyq2002[4] = len(x.ExternalIPs) != 0 - yyq2002[5] = x.LoadBalancerIP != "" - yyq2002[6] = x.SessionAffinity != "" - var yynn2002 int - if yyr2002 || yy2arr2002 { + yysep2095 := !z.EncBinary() + yy2arr2095 := z.EncBasicHandle().StructToArray + var yyq2095 [7]bool + _, _, _ = yysep2095, yyq2095, yy2arr2095 + const yyr2095 bool = false + yyq2095[0] = x.Type != "" + yyq2095[3] = x.ClusterIP != "" + yyq2095[4] = len(x.ExternalIPs) != 0 + yyq2095[5] = x.LoadBalancerIP != "" + yyq2095[6] = x.SessionAffinity != "" + var yynn2095 int + if yyr2095 || yy2arr2095 { r.EncodeArrayStart(7) } else { - yynn2002 = 2 - for _, b := range yyq2002 { + yynn2095 = 2 + for _, b := range yyq2095 { if b { - yynn2002++ + yynn2095++ } } - r.EncodeMapStart(yynn2002) - yynn2002 = 0 + r.EncodeMapStart(yynn2095) + yynn2095 = 0 } - if yyr2002 || yy2arr2002 { + if yyr2095 || yy2arr2095 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2002[0] { + if yyq2095[0] { x.Type.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2002[0] { + if yyq2095[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("type")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } } - if yyr2002 || yy2arr2002 { + if yyr2095 || yy2arr2095 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Ports == nil { r.EncodeNil() } else { - yym2005 := z.EncBinary() - _ = yym2005 + yym2098 := z.EncBinary() + _ = yym2098 if false { } else { h.encSliceServicePort(([]ServicePort)(x.Ports), e) @@ -26242,21 +27568,21 @@ func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x.Ports == nil { r.EncodeNil() } else { - yym2006 := z.EncBinary() - _ = yym2006 + yym2099 := z.EncBinary() + _ = yym2099 if false { } else { h.encSliceServicePort(([]ServicePort)(x.Ports), e) } } } - if yyr2002 || yy2arr2002 { + if yyr2095 || yy2arr2095 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Selector == nil { r.EncodeNil() } else { - yym2008 := z.EncBinary() - _ = yym2008 + yym2101 := z.EncBinary() + _ = yym2101 if false { } else { z.F.EncMapStringStringV(x.Selector, false, e) @@ -26269,19 +27595,19 @@ func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x.Selector == nil { r.EncodeNil() } else { - yym2009 := z.EncBinary() - _ = yym2009 + yym2102 := z.EncBinary() + _ = yym2102 if false { } else { z.F.EncMapStringStringV(x.Selector, false, e) } } } - if yyr2002 || yy2arr2002 { + if yyr2095 || yy2arr2095 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2002[3] { - yym2011 := z.EncBinary() - _ = yym2011 + if yyq2095[3] { + yym2104 := z.EncBinary() + _ = yym2104 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ClusterIP)) @@ -26290,26 +27616,26 @@ func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2002[3] { + if yyq2095[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("clusterIP")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2012 := z.EncBinary() - _ = yym2012 + yym2105 := z.EncBinary() + _ = yym2105 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ClusterIP)) } } } - if yyr2002 || yy2arr2002 { + if yyr2095 || yy2arr2095 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2002[4] { + if yyq2095[4] { if x.ExternalIPs == nil { r.EncodeNil() } else { - yym2014 := z.EncBinary() - _ = yym2014 + yym2107 := z.EncBinary() + _ = yym2107 if false { } else { z.F.EncSliceStringV(x.ExternalIPs, false, e) @@ -26319,15 +27645,15 @@ func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2002[4] { + if yyq2095[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("externalIPs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.ExternalIPs == nil { r.EncodeNil() } else { - yym2015 := z.EncBinary() - _ = yym2015 + yym2108 := z.EncBinary() + _ = yym2108 if false { } else { z.F.EncSliceStringV(x.ExternalIPs, false, e) @@ -26335,11 +27661,11 @@ func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2002 || yy2arr2002 { + if yyr2095 || yy2arr2095 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2002[5] { - yym2017 := z.EncBinary() - _ = yym2017 + if yyq2095[5] { + yym2110 := z.EncBinary() + _ = yym2110 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.LoadBalancerIP)) @@ -26348,34 +27674,34 @@ func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2002[5] { + if yyq2095[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("loadBalancerIP")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2018 := z.EncBinary() - _ = yym2018 + yym2111 := z.EncBinary() + _ = yym2111 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.LoadBalancerIP)) } } } - if yyr2002 || yy2arr2002 { + if yyr2095 || yy2arr2095 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2002[6] { + if yyq2095[6] { x.SessionAffinity.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2002[6] { + if yyq2095[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("sessionAffinity")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.SessionAffinity.CodecEncodeSelf(e) } } - if yyr2002 || yy2arr2002 { + if yyr2095 || yy2arr2095 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -26388,25 +27714,25 @@ func (x *ServiceSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2020 := z.DecBinary() - _ = yym2020 + yym2113 := z.DecBinary() + _ = yym2113 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2021 := r.ContainerType() - if yyct2021 == codecSelferValueTypeMap1234 { - yyl2021 := r.ReadMapStart() - if yyl2021 == 0 { + yyct2114 := r.ContainerType() + if yyct2114 == codecSelferValueTypeMap1234 { + yyl2114 := r.ReadMapStart() + if yyl2114 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2021, d) + x.codecDecodeSelfFromMap(yyl2114, d) } - } else if yyct2021 == codecSelferValueTypeArray1234 { - yyl2021 := r.ReadArrayStart() - if yyl2021 == 0 { + } else if yyct2114 == codecSelferValueTypeArray1234 { + yyl2114 := r.ReadArrayStart() + if yyl2114 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2021, d) + x.codecDecodeSelfFromArray(yyl2114, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -26418,12 +27744,12 @@ func (x *ServiceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2022Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2022Slc - var yyhl2022 bool = l >= 0 - for yyj2022 := 0; ; yyj2022++ { - if yyhl2022 { - if yyj2022 >= l { + var yys2115Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2115Slc + var yyhl2115 bool = l >= 0 + for yyj2115 := 0; ; yyj2115++ { + if yyhl2115 { + if yyj2115 >= l { break } } else { @@ -26432,10 +27758,10 @@ func (x *ServiceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2022Slc = r.DecodeBytes(yys2022Slc, true, true) - yys2022 := string(yys2022Slc) + yys2115Slc = r.DecodeBytes(yys2115Slc, true, true) + yys2115 := string(yys2115Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2022 { + switch yys2115 { case "type": if r.TryDecodeAsNil() { x.Type = "" @@ -26446,24 +27772,24 @@ func (x *ServiceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Ports = nil } else { - yyv2024 := &x.Ports - yym2025 := z.DecBinary() - _ = yym2025 + yyv2117 := &x.Ports + yym2118 := z.DecBinary() + _ = yym2118 if false { } else { - h.decSliceServicePort((*[]ServicePort)(yyv2024), d) + h.decSliceServicePort((*[]ServicePort)(yyv2117), d) } } case "selector": if r.TryDecodeAsNil() { x.Selector = nil } else { - yyv2026 := &x.Selector - yym2027 := z.DecBinary() - _ = yym2027 + yyv2119 := &x.Selector + yym2120 := z.DecBinary() + _ = yym2120 if false { } else { - z.F.DecMapStringStringX(yyv2026, false, d) + z.F.DecMapStringStringX(yyv2119, false, d) } } case "clusterIP": @@ -26476,12 +27802,12 @@ func (x *ServiceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ExternalIPs = nil } else { - yyv2029 := &x.ExternalIPs - yym2030 := z.DecBinary() - _ = yym2030 + yyv2122 := &x.ExternalIPs + yym2123 := z.DecBinary() + _ = yym2123 if false { } else { - z.F.DecSliceStringX(yyv2029, false, d) + z.F.DecSliceStringX(yyv2122, false, d) } } case "loadBalancerIP": @@ -26497,9 +27823,9 @@ func (x *ServiceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.SessionAffinity = ServiceAffinity(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys2022) - } // end switch yys2022 - } // end for yyj2022 + z.DecStructFieldNotFound(-1, yys2115) + } // end switch yys2115 + } // end for yyj2115 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -26507,16 +27833,16 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2033 int - var yyb2033 bool - var yyhl2033 bool = l >= 0 - yyj2033++ - if yyhl2033 { - yyb2033 = yyj2033 > l + var yyj2126 int + var yyb2126 bool + var yyhl2126 bool = l >= 0 + yyj2126++ + if yyhl2126 { + yyb2126 = yyj2126 > l } else { - yyb2033 = r.CheckBreak() + yyb2126 = r.CheckBreak() } - if yyb2033 { + if yyb2126 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26526,13 +27852,13 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Type = ServiceType(r.DecodeString()) } - yyj2033++ - if yyhl2033 { - yyb2033 = yyj2033 > l + yyj2126++ + if yyhl2126 { + yyb2126 = yyj2126 > l } else { - yyb2033 = r.CheckBreak() + yyb2126 = r.CheckBreak() } - if yyb2033 { + if yyb2126 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26540,21 +27866,21 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Ports = nil } else { - yyv2035 := &x.Ports - yym2036 := z.DecBinary() - _ = yym2036 + yyv2128 := &x.Ports + yym2129 := z.DecBinary() + _ = yym2129 if false { } else { - h.decSliceServicePort((*[]ServicePort)(yyv2035), d) + h.decSliceServicePort((*[]ServicePort)(yyv2128), d) } } - yyj2033++ - if yyhl2033 { - yyb2033 = yyj2033 > l + yyj2126++ + if yyhl2126 { + yyb2126 = yyj2126 > l } else { - yyb2033 = r.CheckBreak() + yyb2126 = r.CheckBreak() } - if yyb2033 { + if yyb2126 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26562,21 +27888,21 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Selector = nil } else { - yyv2037 := &x.Selector - yym2038 := z.DecBinary() - _ = yym2038 + yyv2130 := &x.Selector + yym2131 := z.DecBinary() + _ = yym2131 if false { } else { - z.F.DecMapStringStringX(yyv2037, false, d) + z.F.DecMapStringStringX(yyv2130, false, d) } } - yyj2033++ - if yyhl2033 { - yyb2033 = yyj2033 > l + yyj2126++ + if yyhl2126 { + yyb2126 = yyj2126 > l } else { - yyb2033 = r.CheckBreak() + yyb2126 = r.CheckBreak() } - if yyb2033 { + if yyb2126 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26586,13 +27912,13 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.ClusterIP = string(r.DecodeString()) } - yyj2033++ - if yyhl2033 { - yyb2033 = yyj2033 > l + yyj2126++ + if yyhl2126 { + yyb2126 = yyj2126 > l } else { - yyb2033 = r.CheckBreak() + yyb2126 = r.CheckBreak() } - if yyb2033 { + if yyb2126 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26600,21 +27926,21 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ExternalIPs = nil } else { - yyv2040 := &x.ExternalIPs - yym2041 := z.DecBinary() - _ = yym2041 + yyv2133 := &x.ExternalIPs + yym2134 := z.DecBinary() + _ = yym2134 if false { } else { - z.F.DecSliceStringX(yyv2040, false, d) + z.F.DecSliceStringX(yyv2133, false, d) } } - yyj2033++ - if yyhl2033 { - yyb2033 = yyj2033 > l + yyj2126++ + if yyhl2126 { + yyb2126 = yyj2126 > l } else { - yyb2033 = r.CheckBreak() + yyb2126 = r.CheckBreak() } - if yyb2033 { + if yyb2126 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26624,13 +27950,13 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.LoadBalancerIP = string(r.DecodeString()) } - yyj2033++ - if yyhl2033 { - yyb2033 = yyj2033 > l + yyj2126++ + if yyhl2126 { + yyb2126 = yyj2126 > l } else { - yyb2033 = r.CheckBreak() + yyb2126 = r.CheckBreak() } - if yyb2033 { + if yyb2126 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26641,17 +27967,17 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.SessionAffinity = ServiceAffinity(r.DecodeString()) } for { - yyj2033++ - if yyhl2033 { - yyb2033 = yyj2033 > l + yyj2126++ + if yyhl2126 { + yyb2126 = yyj2126 > l } else { - yyb2033 = r.CheckBreak() + yyb2126 = r.CheckBreak() } - if yyb2033 { + if yyb2126 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2033-1, "") + z.DecStructFieldNotFound(yyj2126-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -26663,33 +27989,33 @@ func (x *ServicePort) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2044 := z.EncBinary() - _ = yym2044 + yym2137 := z.EncBinary() + _ = yym2137 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2045 := !z.EncBinary() - yy2arr2045 := z.EncBasicHandle().StructToArray - var yyq2045 [5]bool - _, _, _ = yysep2045, yyq2045, yy2arr2045 - const yyr2045 bool = false - var yynn2045 int - if yyr2045 || yy2arr2045 { + yysep2138 := !z.EncBinary() + yy2arr2138 := z.EncBasicHandle().StructToArray + var yyq2138 [5]bool + _, _, _ = yysep2138, yyq2138, yy2arr2138 + const yyr2138 bool = false + var yynn2138 int + if yyr2138 || yy2arr2138 { r.EncodeArrayStart(5) } else { - yynn2045 = 5 - for _, b := range yyq2045 { + yynn2138 = 5 + for _, b := range yyq2138 { if b { - yynn2045++ + yynn2138++ } } - r.EncodeMapStart(yynn2045) - yynn2045 = 0 + r.EncodeMapStart(yynn2138) + yynn2138 = 0 } - if yyr2045 || yy2arr2045 { + if yyr2138 || yy2arr2138 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2047 := z.EncBinary() - _ = yym2047 + yym2140 := z.EncBinary() + _ = yym2140 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -26698,14 +28024,14 @@ func (x *ServicePort) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2048 := z.EncBinary() - _ = yym2048 + yym2141 := z.EncBinary() + _ = yym2141 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } - if yyr2045 || yy2arr2045 { + if yyr2138 || yy2arr2138 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Protocol.CodecEncodeSelf(e) } else { @@ -26714,10 +28040,10 @@ func (x *ServicePort) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Protocol.CodecEncodeSelf(e) } - if yyr2045 || yy2arr2045 { + if yyr2138 || yy2arr2138 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2051 := z.EncBinary() - _ = yym2051 + yym2144 := z.EncBinary() + _ = yym2144 if false { } else { r.EncodeInt(int64(x.Port)) @@ -26726,44 +28052,44 @@ func (x *ServicePort) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("port")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2052 := z.EncBinary() - _ = yym2052 + yym2145 := z.EncBinary() + _ = yym2145 if false { } else { r.EncodeInt(int64(x.Port)) } } - if yyr2045 || yy2arr2045 { + if yyr2138 || yy2arr2138 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy2054 := &x.TargetPort - yym2055 := z.EncBinary() - _ = yym2055 + yy2147 := &x.TargetPort + yym2148 := z.EncBinary() + _ = yym2148 if false { - } else if z.HasExtensions() && z.EncExt(yy2054) { - } else if !yym2055 && z.IsJSONHandle() { - z.EncJSONMarshal(yy2054) + } else if z.HasExtensions() && z.EncExt(yy2147) { + } else if !yym2148 && z.IsJSONHandle() { + z.EncJSONMarshal(yy2147) } else { - z.EncFallback(yy2054) + z.EncFallback(yy2147) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("targetPort")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2056 := &x.TargetPort - yym2057 := z.EncBinary() - _ = yym2057 + yy2149 := &x.TargetPort + yym2150 := z.EncBinary() + _ = yym2150 if false { - } else if z.HasExtensions() && z.EncExt(yy2056) { - } else if !yym2057 && z.IsJSONHandle() { - z.EncJSONMarshal(yy2056) + } else if z.HasExtensions() && z.EncExt(yy2149) { + } else if !yym2150 && z.IsJSONHandle() { + z.EncJSONMarshal(yy2149) } else { - z.EncFallback(yy2056) + z.EncFallback(yy2149) } } - if yyr2045 || yy2arr2045 { + if yyr2138 || yy2arr2138 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2059 := z.EncBinary() - _ = yym2059 + yym2152 := z.EncBinary() + _ = yym2152 if false { } else { r.EncodeInt(int64(x.NodePort)) @@ -26772,14 +28098,14 @@ func (x *ServicePort) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nodePort")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2060 := z.EncBinary() - _ = yym2060 + yym2153 := z.EncBinary() + _ = yym2153 if false { } else { r.EncodeInt(int64(x.NodePort)) } } - if yyr2045 || yy2arr2045 { + if yyr2138 || yy2arr2138 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -26792,25 +28118,25 @@ func (x *ServicePort) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2061 := z.DecBinary() - _ = yym2061 + yym2154 := z.DecBinary() + _ = yym2154 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2062 := r.ContainerType() - if yyct2062 == codecSelferValueTypeMap1234 { - yyl2062 := r.ReadMapStart() - if yyl2062 == 0 { + yyct2155 := r.ContainerType() + if yyct2155 == codecSelferValueTypeMap1234 { + yyl2155 := r.ReadMapStart() + if yyl2155 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2062, d) + x.codecDecodeSelfFromMap(yyl2155, d) } - } else if yyct2062 == codecSelferValueTypeArray1234 { - yyl2062 := r.ReadArrayStart() - if yyl2062 == 0 { + } else if yyct2155 == codecSelferValueTypeArray1234 { + yyl2155 := r.ReadArrayStart() + if yyl2155 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2062, d) + x.codecDecodeSelfFromArray(yyl2155, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -26822,12 +28148,12 @@ func (x *ServicePort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2063Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2063Slc - var yyhl2063 bool = l >= 0 - for yyj2063 := 0; ; yyj2063++ { - if yyhl2063 { - if yyj2063 >= l { + var yys2156Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2156Slc + var yyhl2156 bool = l >= 0 + for yyj2156 := 0; ; yyj2156++ { + if yyhl2156 { + if yyj2156 >= l { break } } else { @@ -26836,10 +28162,10 @@ func (x *ServicePort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2063Slc = r.DecodeBytes(yys2063Slc, true, true) - yys2063 := string(yys2063Slc) + yys2156Slc = r.DecodeBytes(yys2156Slc, true, true) + yys2156 := string(yys2156Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2063 { + switch yys2156 { case "name": if r.TryDecodeAsNil() { x.Name = "" @@ -26862,15 +28188,15 @@ func (x *ServicePort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.TargetPort = pkg5_intstr.IntOrString{} } else { - yyv2067 := &x.TargetPort - yym2068 := z.DecBinary() - _ = yym2068 + yyv2160 := &x.TargetPort + yym2161 := z.DecBinary() + _ = yym2161 if false { - } else if z.HasExtensions() && z.DecExt(yyv2067) { - } else if !yym2068 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv2067) + } else if z.HasExtensions() && z.DecExt(yyv2160) { + } else if !yym2161 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv2160) } else { - z.DecFallback(yyv2067, false) + z.DecFallback(yyv2160, false) } } case "nodePort": @@ -26880,9 +28206,9 @@ func (x *ServicePort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.NodePort = int(r.DecodeInt(codecSelferBitsize1234)) } default: - z.DecStructFieldNotFound(-1, yys2063) - } // end switch yys2063 - } // end for yyj2063 + z.DecStructFieldNotFound(-1, yys2156) + } // end switch yys2156 + } // end for yyj2156 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -26890,16 +28216,16 @@ func (x *ServicePort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2070 int - var yyb2070 bool - var yyhl2070 bool = l >= 0 - yyj2070++ - if yyhl2070 { - yyb2070 = yyj2070 > l + var yyj2163 int + var yyb2163 bool + var yyhl2163 bool = l >= 0 + yyj2163++ + if yyhl2163 { + yyb2163 = yyj2163 > l } else { - yyb2070 = r.CheckBreak() + yyb2163 = r.CheckBreak() } - if yyb2070 { + if yyb2163 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26909,13 +28235,13 @@ func (x *ServicePort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Name = string(r.DecodeString()) } - yyj2070++ - if yyhl2070 { - yyb2070 = yyj2070 > l + yyj2163++ + if yyhl2163 { + yyb2163 = yyj2163 > l } else { - yyb2070 = r.CheckBreak() + yyb2163 = r.CheckBreak() } - if yyb2070 { + if yyb2163 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26925,13 +28251,13 @@ func (x *ServicePort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Protocol = Protocol(r.DecodeString()) } - yyj2070++ - if yyhl2070 { - yyb2070 = yyj2070 > l + yyj2163++ + if yyhl2163 { + yyb2163 = yyj2163 > l } else { - yyb2070 = r.CheckBreak() + yyb2163 = r.CheckBreak() } - if yyb2070 { + if yyb2163 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26941,13 +28267,13 @@ func (x *ServicePort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Port = int(r.DecodeInt(codecSelferBitsize1234)) } - yyj2070++ - if yyhl2070 { - yyb2070 = yyj2070 > l + yyj2163++ + if yyhl2163 { + yyb2163 = yyj2163 > l } else { - yyb2070 = r.CheckBreak() + yyb2163 = r.CheckBreak() } - if yyb2070 { + if yyb2163 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26955,24 +28281,24 @@ func (x *ServicePort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.TargetPort = pkg5_intstr.IntOrString{} } else { - yyv2074 := &x.TargetPort - yym2075 := z.DecBinary() - _ = yym2075 + yyv2167 := &x.TargetPort + yym2168 := z.DecBinary() + _ = yym2168 if false { - } else if z.HasExtensions() && z.DecExt(yyv2074) { - } else if !yym2075 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv2074) + } else if z.HasExtensions() && z.DecExt(yyv2167) { + } else if !yym2168 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv2167) } else { - z.DecFallback(yyv2074, false) + z.DecFallback(yyv2167, false) } } - yyj2070++ - if yyhl2070 { - yyb2070 = yyj2070 > l + yyj2163++ + if yyhl2163 { + yyb2163 = yyj2163 > l } else { - yyb2070 = r.CheckBreak() + yyb2163 = r.CheckBreak() } - if yyb2070 { + if yyb2163 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26983,17 +28309,17 @@ func (x *ServicePort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.NodePort = int(r.DecodeInt(codecSelferBitsize1234)) } for { - yyj2070++ - if yyhl2070 { - yyb2070 = yyj2070 > l + yyj2163++ + if yyhl2163 { + yyb2163 = yyj2163 > l } else { - yyb2070 = r.CheckBreak() + yyb2163 = r.CheckBreak() } - if yyb2070 { + if yyb2163 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2070-1, "") + z.DecStructFieldNotFound(yyj2163-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -27005,39 +28331,39 @@ func (x *Service) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2077 := z.EncBinary() - _ = yym2077 + yym2170 := z.EncBinary() + _ = yym2170 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2078 := !z.EncBinary() - yy2arr2078 := z.EncBasicHandle().StructToArray - var yyq2078 [5]bool - _, _, _ = yysep2078, yyq2078, yy2arr2078 - const yyr2078 bool = false - yyq2078[0] = x.Kind != "" - yyq2078[1] = x.APIVersion != "" - yyq2078[2] = true - yyq2078[3] = true - yyq2078[4] = true - var yynn2078 int - if yyr2078 || yy2arr2078 { + yysep2171 := !z.EncBinary() + yy2arr2171 := z.EncBasicHandle().StructToArray + var yyq2171 [5]bool + _, _, _ = yysep2171, yyq2171, yy2arr2171 + const yyr2171 bool = false + yyq2171[0] = x.Kind != "" + yyq2171[1] = x.APIVersion != "" + yyq2171[2] = true + yyq2171[3] = true + yyq2171[4] = true + var yynn2171 int + if yyr2171 || yy2arr2171 { r.EncodeArrayStart(5) } else { - yynn2078 = 0 - for _, b := range yyq2078 { + yynn2171 = 0 + for _, b := range yyq2171 { if b { - yynn2078++ + yynn2171++ } } - r.EncodeMapStart(yynn2078) - yynn2078 = 0 + r.EncodeMapStart(yynn2171) + yynn2171 = 0 } - if yyr2078 || yy2arr2078 { + if yyr2171 || yy2arr2171 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2078[0] { - yym2080 := z.EncBinary() - _ = yym2080 + if yyq2171[0] { + yym2173 := z.EncBinary() + _ = yym2173 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -27046,23 +28372,23 @@ func (x *Service) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2078[0] { + if yyq2171[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2081 := z.EncBinary() - _ = yym2081 + yym2174 := z.EncBinary() + _ = yym2174 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2078 || yy2arr2078 { + if yyr2171 || yy2arr2171 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2078[1] { - yym2083 := z.EncBinary() - _ = yym2083 + if yyq2171[1] { + yym2176 := z.EncBinary() + _ = yym2176 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -27071,70 +28397,70 @@ func (x *Service) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2078[1] { + if yyq2171[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2084 := z.EncBinary() - _ = yym2084 + yym2177 := z.EncBinary() + _ = yym2177 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2078 || yy2arr2078 { + if yyr2171 || yy2arr2171 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2078[2] { - yy2086 := &x.ObjectMeta - yy2086.CodecEncodeSelf(e) + if yyq2171[2] { + yy2179 := &x.ObjectMeta + yy2179.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2078[2] { + if yyq2171[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2087 := &x.ObjectMeta - yy2087.CodecEncodeSelf(e) + yy2180 := &x.ObjectMeta + yy2180.CodecEncodeSelf(e) } } - if yyr2078 || yy2arr2078 { + if yyr2171 || yy2arr2171 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2078[3] { - yy2089 := &x.Spec - yy2089.CodecEncodeSelf(e) + if yyq2171[3] { + yy2182 := &x.Spec + yy2182.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2078[3] { + if yyq2171[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2090 := &x.Spec - yy2090.CodecEncodeSelf(e) + yy2183 := &x.Spec + yy2183.CodecEncodeSelf(e) } } - if yyr2078 || yy2arr2078 { + if yyr2171 || yy2arr2171 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2078[4] { - yy2092 := &x.Status - yy2092.CodecEncodeSelf(e) + if yyq2171[4] { + yy2185 := &x.Status + yy2185.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2078[4] { + if yyq2171[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2093 := &x.Status - yy2093.CodecEncodeSelf(e) + yy2186 := &x.Status + yy2186.CodecEncodeSelf(e) } } - if yyr2078 || yy2arr2078 { + if yyr2171 || yy2arr2171 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -27147,25 +28473,25 @@ func (x *Service) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2094 := z.DecBinary() - _ = yym2094 + yym2187 := z.DecBinary() + _ = yym2187 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2095 := r.ContainerType() - if yyct2095 == codecSelferValueTypeMap1234 { - yyl2095 := r.ReadMapStart() - if yyl2095 == 0 { + yyct2188 := r.ContainerType() + if yyct2188 == codecSelferValueTypeMap1234 { + yyl2188 := r.ReadMapStart() + if yyl2188 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2095, d) + x.codecDecodeSelfFromMap(yyl2188, d) } - } else if yyct2095 == codecSelferValueTypeArray1234 { - yyl2095 := r.ReadArrayStart() - if yyl2095 == 0 { + } else if yyct2188 == codecSelferValueTypeArray1234 { + yyl2188 := r.ReadArrayStart() + if yyl2188 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2095, d) + x.codecDecodeSelfFromArray(yyl2188, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -27177,12 +28503,12 @@ func (x *Service) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2096Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2096Slc - var yyhl2096 bool = l >= 0 - for yyj2096 := 0; ; yyj2096++ { - if yyhl2096 { - if yyj2096 >= l { + var yys2189Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2189Slc + var yyhl2189 bool = l >= 0 + for yyj2189 := 0; ; yyj2189++ { + if yyhl2189 { + if yyj2189 >= l { break } } else { @@ -27191,10 +28517,10 @@ func (x *Service) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2096Slc = r.DecodeBytes(yys2096Slc, true, true) - yys2096 := string(yys2096Slc) + yys2189Slc = r.DecodeBytes(yys2189Slc, true, true) + yys2189 := string(yys2189Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2096 { + switch yys2189 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -27211,27 +28537,27 @@ func (x *Service) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv2099 := &x.ObjectMeta - yyv2099.CodecDecodeSelf(d) + yyv2192 := &x.ObjectMeta + yyv2192.CodecDecodeSelf(d) } case "spec": if r.TryDecodeAsNil() { x.Spec = ServiceSpec{} } else { - yyv2100 := &x.Spec - yyv2100.CodecDecodeSelf(d) + yyv2193 := &x.Spec + yyv2193.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ServiceStatus{} } else { - yyv2101 := &x.Status - yyv2101.CodecDecodeSelf(d) + yyv2194 := &x.Status + yyv2194.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2096) - } // end switch yys2096 - } // end for yyj2096 + z.DecStructFieldNotFound(-1, yys2189) + } // end switch yys2189 + } // end for yyj2189 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -27239,16 +28565,16 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2102 int - var yyb2102 bool - var yyhl2102 bool = l >= 0 - yyj2102++ - if yyhl2102 { - yyb2102 = yyj2102 > l + var yyj2195 int + var yyb2195 bool + var yyhl2195 bool = l >= 0 + yyj2195++ + if yyhl2195 { + yyb2195 = yyj2195 > l } else { - yyb2102 = r.CheckBreak() + yyb2195 = r.CheckBreak() } - if yyb2102 { + if yyb2195 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27258,13 +28584,13 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2102++ - if yyhl2102 { - yyb2102 = yyj2102 > l + yyj2195++ + if yyhl2195 { + yyb2195 = yyj2195 > l } else { - yyb2102 = r.CheckBreak() + yyb2195 = r.CheckBreak() } - if yyb2102 { + if yyb2195 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27274,13 +28600,13 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2102++ - if yyhl2102 { - yyb2102 = yyj2102 > l + yyj2195++ + if yyhl2195 { + yyb2195 = yyj2195 > l } else { - yyb2102 = r.CheckBreak() + yyb2195 = r.CheckBreak() } - if yyb2102 { + if yyb2195 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27288,16 +28614,16 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv2105 := &x.ObjectMeta - yyv2105.CodecDecodeSelf(d) + yyv2198 := &x.ObjectMeta + yyv2198.CodecDecodeSelf(d) } - yyj2102++ - if yyhl2102 { - yyb2102 = yyj2102 > l + yyj2195++ + if yyhl2195 { + yyb2195 = yyj2195 > l } else { - yyb2102 = r.CheckBreak() + yyb2195 = r.CheckBreak() } - if yyb2102 { + if yyb2195 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27305,16 +28631,16 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ServiceSpec{} } else { - yyv2106 := &x.Spec - yyv2106.CodecDecodeSelf(d) + yyv2199 := &x.Spec + yyv2199.CodecDecodeSelf(d) } - yyj2102++ - if yyhl2102 { - yyb2102 = yyj2102 > l + yyj2195++ + if yyhl2195 { + yyb2195 = yyj2195 > l } else { - yyb2102 = r.CheckBreak() + yyb2195 = r.CheckBreak() } - if yyb2102 { + if yyb2195 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27322,21 +28648,21 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ServiceStatus{} } else { - yyv2107 := &x.Status - yyv2107.CodecDecodeSelf(d) + yyv2200 := &x.Status + yyv2200.CodecDecodeSelf(d) } for { - yyj2102++ - if yyhl2102 { - yyb2102 = yyj2102 > l + yyj2195++ + if yyhl2195 { + yyb2195 = yyj2195 > l } else { - yyb2102 = r.CheckBreak() + yyb2195 = r.CheckBreak() } - if yyb2102 { + if yyb2195 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2102-1, "") + z.DecStructFieldNotFound(yyj2195-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -27348,38 +28674,38 @@ func (x *ServiceAccount) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2108 := z.EncBinary() - _ = yym2108 + yym2201 := z.EncBinary() + _ = yym2201 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2109 := !z.EncBinary() - yy2arr2109 := z.EncBasicHandle().StructToArray - var yyq2109 [5]bool - _, _, _ = yysep2109, yyq2109, yy2arr2109 - const yyr2109 bool = false - yyq2109[0] = x.Kind != "" - yyq2109[1] = x.APIVersion != "" - yyq2109[2] = true - yyq2109[4] = len(x.ImagePullSecrets) != 0 - var yynn2109 int - if yyr2109 || yy2arr2109 { + yysep2202 := !z.EncBinary() + yy2arr2202 := z.EncBasicHandle().StructToArray + var yyq2202 [5]bool + _, _, _ = yysep2202, yyq2202, yy2arr2202 + const yyr2202 bool = false + yyq2202[0] = x.Kind != "" + yyq2202[1] = x.APIVersion != "" + yyq2202[2] = true + yyq2202[4] = len(x.ImagePullSecrets) != 0 + var yynn2202 int + if yyr2202 || yy2arr2202 { r.EncodeArrayStart(5) } else { - yynn2109 = 1 - for _, b := range yyq2109 { + yynn2202 = 1 + for _, b := range yyq2202 { if b { - yynn2109++ + yynn2202++ } } - r.EncodeMapStart(yynn2109) - yynn2109 = 0 + r.EncodeMapStart(yynn2202) + yynn2202 = 0 } - if yyr2109 || yy2arr2109 { + if yyr2202 || yy2arr2202 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2109[0] { - yym2111 := z.EncBinary() - _ = yym2111 + if yyq2202[0] { + yym2204 := z.EncBinary() + _ = yym2204 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -27388,23 +28714,23 @@ func (x *ServiceAccount) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2109[0] { + if yyq2202[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2112 := z.EncBinary() - _ = yym2112 + yym2205 := z.EncBinary() + _ = yym2205 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2109 || yy2arr2109 { + if yyr2202 || yy2arr2202 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2109[1] { - yym2114 := z.EncBinary() - _ = yym2114 + if yyq2202[1] { + yym2207 := z.EncBinary() + _ = yym2207 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -27413,42 +28739,42 @@ func (x *ServiceAccount) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2109[1] { + if yyq2202[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2115 := z.EncBinary() - _ = yym2115 + yym2208 := z.EncBinary() + _ = yym2208 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2109 || yy2arr2109 { + if yyr2202 || yy2arr2202 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2109[2] { - yy2117 := &x.ObjectMeta - yy2117.CodecEncodeSelf(e) + if yyq2202[2] { + yy2210 := &x.ObjectMeta + yy2210.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2109[2] { + if yyq2202[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2118 := &x.ObjectMeta - yy2118.CodecEncodeSelf(e) + yy2211 := &x.ObjectMeta + yy2211.CodecEncodeSelf(e) } } - if yyr2109 || yy2arr2109 { + if yyr2202 || yy2arr2202 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Secrets == nil { r.EncodeNil() } else { - yym2120 := z.EncBinary() - _ = yym2120 + yym2213 := z.EncBinary() + _ = yym2213 if false { } else { h.encSliceObjectReference(([]ObjectReference)(x.Secrets), e) @@ -27461,22 +28787,22 @@ func (x *ServiceAccount) CodecEncodeSelf(e *codec1978.Encoder) { if x.Secrets == nil { r.EncodeNil() } else { - yym2121 := z.EncBinary() - _ = yym2121 + yym2214 := z.EncBinary() + _ = yym2214 if false { } else { h.encSliceObjectReference(([]ObjectReference)(x.Secrets), e) } } } - if yyr2109 || yy2arr2109 { + if yyr2202 || yy2arr2202 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2109[4] { + if yyq2202[4] { if x.ImagePullSecrets == nil { r.EncodeNil() } else { - yym2123 := z.EncBinary() - _ = yym2123 + yym2216 := z.EncBinary() + _ = yym2216 if false { } else { h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e) @@ -27486,15 +28812,15 @@ func (x *ServiceAccount) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2109[4] { + if yyq2202[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("imagePullSecrets")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.ImagePullSecrets == nil { r.EncodeNil() } else { - yym2124 := z.EncBinary() - _ = yym2124 + yym2217 := z.EncBinary() + _ = yym2217 if false { } else { h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e) @@ -27502,7 +28828,7 @@ func (x *ServiceAccount) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2109 || yy2arr2109 { + if yyr2202 || yy2arr2202 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -27515,25 +28841,25 @@ func (x *ServiceAccount) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2125 := z.DecBinary() - _ = yym2125 + yym2218 := z.DecBinary() + _ = yym2218 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2126 := r.ContainerType() - if yyct2126 == codecSelferValueTypeMap1234 { - yyl2126 := r.ReadMapStart() - if yyl2126 == 0 { + yyct2219 := r.ContainerType() + if yyct2219 == codecSelferValueTypeMap1234 { + yyl2219 := r.ReadMapStart() + if yyl2219 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2126, d) + x.codecDecodeSelfFromMap(yyl2219, d) } - } else if yyct2126 == codecSelferValueTypeArray1234 { - yyl2126 := r.ReadArrayStart() - if yyl2126 == 0 { + } else if yyct2219 == codecSelferValueTypeArray1234 { + yyl2219 := r.ReadArrayStart() + if yyl2219 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2126, d) + x.codecDecodeSelfFromArray(yyl2219, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -27545,12 +28871,12 @@ func (x *ServiceAccount) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2127Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2127Slc - var yyhl2127 bool = l >= 0 - for yyj2127 := 0; ; yyj2127++ { - if yyhl2127 { - if yyj2127 >= l { + var yys2220Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2220Slc + var yyhl2220 bool = l >= 0 + for yyj2220 := 0; ; yyj2220++ { + if yyhl2220 { + if yyj2220 >= l { break } } else { @@ -27559,10 +28885,10 @@ func (x *ServiceAccount) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2127Slc = r.DecodeBytes(yys2127Slc, true, true) - yys2127 := string(yys2127Slc) + yys2220Slc = r.DecodeBytes(yys2220Slc, true, true) + yys2220 := string(yys2220Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2127 { + switch yys2220 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -27579,37 +28905,37 @@ func (x *ServiceAccount) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv2130 := &x.ObjectMeta - yyv2130.CodecDecodeSelf(d) + yyv2223 := &x.ObjectMeta + yyv2223.CodecDecodeSelf(d) } case "secrets": if r.TryDecodeAsNil() { x.Secrets = nil } else { - yyv2131 := &x.Secrets - yym2132 := z.DecBinary() - _ = yym2132 + yyv2224 := &x.Secrets + yym2225 := z.DecBinary() + _ = yym2225 if false { } else { - h.decSliceObjectReference((*[]ObjectReference)(yyv2131), d) + h.decSliceObjectReference((*[]ObjectReference)(yyv2224), d) } } case "imagePullSecrets": if r.TryDecodeAsNil() { x.ImagePullSecrets = nil } else { - yyv2133 := &x.ImagePullSecrets - yym2134 := z.DecBinary() - _ = yym2134 + yyv2226 := &x.ImagePullSecrets + yym2227 := z.DecBinary() + _ = yym2227 if false { } else { - h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv2133), d) + h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv2226), d) } } default: - z.DecStructFieldNotFound(-1, yys2127) - } // end switch yys2127 - } // end for yyj2127 + z.DecStructFieldNotFound(-1, yys2220) + } // end switch yys2220 + } // end for yyj2220 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -27617,16 +28943,16 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2135 int - var yyb2135 bool - var yyhl2135 bool = l >= 0 - yyj2135++ - if yyhl2135 { - yyb2135 = yyj2135 > l + var yyj2228 int + var yyb2228 bool + var yyhl2228 bool = l >= 0 + yyj2228++ + if yyhl2228 { + yyb2228 = yyj2228 > l } else { - yyb2135 = r.CheckBreak() + yyb2228 = r.CheckBreak() } - if yyb2135 { + if yyb2228 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27636,13 +28962,13 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2135++ - if yyhl2135 { - yyb2135 = yyj2135 > l + yyj2228++ + if yyhl2228 { + yyb2228 = yyj2228 > l } else { - yyb2135 = r.CheckBreak() + yyb2228 = r.CheckBreak() } - if yyb2135 { + if yyb2228 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27652,13 +28978,13 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2135++ - if yyhl2135 { - yyb2135 = yyj2135 > l + yyj2228++ + if yyhl2228 { + yyb2228 = yyj2228 > l } else { - yyb2135 = r.CheckBreak() + yyb2228 = r.CheckBreak() } - if yyb2135 { + if yyb2228 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27666,16 +28992,16 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv2138 := &x.ObjectMeta - yyv2138.CodecDecodeSelf(d) + yyv2231 := &x.ObjectMeta + yyv2231.CodecDecodeSelf(d) } - yyj2135++ - if yyhl2135 { - yyb2135 = yyj2135 > l + yyj2228++ + if yyhl2228 { + yyb2228 = yyj2228 > l } else { - yyb2135 = r.CheckBreak() + yyb2228 = r.CheckBreak() } - if yyb2135 { + if yyb2228 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27683,21 +29009,21 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Secrets = nil } else { - yyv2139 := &x.Secrets - yym2140 := z.DecBinary() - _ = yym2140 + yyv2232 := &x.Secrets + yym2233 := z.DecBinary() + _ = yym2233 if false { } else { - h.decSliceObjectReference((*[]ObjectReference)(yyv2139), d) + h.decSliceObjectReference((*[]ObjectReference)(yyv2232), d) } } - yyj2135++ - if yyhl2135 { - yyb2135 = yyj2135 > l + yyj2228++ + if yyhl2228 { + yyb2228 = yyj2228 > l } else { - yyb2135 = r.CheckBreak() + yyb2228 = r.CheckBreak() } - if yyb2135 { + if yyb2228 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27705,26 +29031,26 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ImagePullSecrets = nil } else { - yyv2141 := &x.ImagePullSecrets - yym2142 := z.DecBinary() - _ = yym2142 + yyv2234 := &x.ImagePullSecrets + yym2235 := z.DecBinary() + _ = yym2235 if false { } else { - h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv2141), d) + h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv2234), d) } } for { - yyj2135++ - if yyhl2135 { - yyb2135 = yyj2135 > l + yyj2228++ + if yyhl2228 { + yyb2228 = yyj2228 > l } else { - yyb2135 = r.CheckBreak() + yyb2228 = r.CheckBreak() } - if yyb2135 { + if yyb2228 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2135-1, "") + z.DecStructFieldNotFound(yyj2228-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -27736,37 +29062,37 @@ func (x *ServiceAccountList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2143 := z.EncBinary() - _ = yym2143 + yym2236 := z.EncBinary() + _ = yym2236 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2144 := !z.EncBinary() - yy2arr2144 := z.EncBasicHandle().StructToArray - var yyq2144 [4]bool - _, _, _ = yysep2144, yyq2144, yy2arr2144 - const yyr2144 bool = false - yyq2144[0] = x.Kind != "" - yyq2144[1] = x.APIVersion != "" - yyq2144[2] = true - var yynn2144 int - if yyr2144 || yy2arr2144 { + yysep2237 := !z.EncBinary() + yy2arr2237 := z.EncBasicHandle().StructToArray + var yyq2237 [4]bool + _, _, _ = yysep2237, yyq2237, yy2arr2237 + const yyr2237 bool = false + yyq2237[0] = x.Kind != "" + yyq2237[1] = x.APIVersion != "" + yyq2237[2] = true + var yynn2237 int + if yyr2237 || yy2arr2237 { r.EncodeArrayStart(4) } else { - yynn2144 = 1 - for _, b := range yyq2144 { + yynn2237 = 1 + for _, b := range yyq2237 { if b { - yynn2144++ + yynn2237++ } } - r.EncodeMapStart(yynn2144) - yynn2144 = 0 + r.EncodeMapStart(yynn2237) + yynn2237 = 0 } - if yyr2144 || yy2arr2144 { + if yyr2237 || yy2arr2237 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2144[0] { - yym2146 := z.EncBinary() - _ = yym2146 + if yyq2237[0] { + yym2239 := z.EncBinary() + _ = yym2239 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -27775,23 +29101,23 @@ func (x *ServiceAccountList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2144[0] { + if yyq2237[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2147 := z.EncBinary() - _ = yym2147 + yym2240 := z.EncBinary() + _ = yym2240 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2144 || yy2arr2144 { + if yyr2237 || yy2arr2237 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2144[1] { - yym2149 := z.EncBinary() - _ = yym2149 + if yyq2237[1] { + yym2242 := z.EncBinary() + _ = yym2242 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -27800,54 +29126,54 @@ func (x *ServiceAccountList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2144[1] { + if yyq2237[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2150 := z.EncBinary() - _ = yym2150 + yym2243 := z.EncBinary() + _ = yym2243 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2144 || yy2arr2144 { + if yyr2237 || yy2arr2237 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2144[2] { - yy2152 := &x.ListMeta - yym2153 := z.EncBinary() - _ = yym2153 + if yyq2237[2] { + yy2245 := &x.ListMeta + yym2246 := z.EncBinary() + _ = yym2246 if false { - } else if z.HasExtensions() && z.EncExt(yy2152) { + } else if z.HasExtensions() && z.EncExt(yy2245) { } else { - z.EncFallback(yy2152) + z.EncFallback(yy2245) } } else { r.EncodeNil() } } else { - if yyq2144[2] { + if yyq2237[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2154 := &x.ListMeta - yym2155 := z.EncBinary() - _ = yym2155 + yy2247 := &x.ListMeta + yym2248 := z.EncBinary() + _ = yym2248 if false { - } else if z.HasExtensions() && z.EncExt(yy2154) { + } else if z.HasExtensions() && z.EncExt(yy2247) { } else { - z.EncFallback(yy2154) + z.EncFallback(yy2247) } } } - if yyr2144 || yy2arr2144 { + if yyr2237 || yy2arr2237 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym2157 := z.EncBinary() - _ = yym2157 + yym2250 := z.EncBinary() + _ = yym2250 if false { } else { h.encSliceServiceAccount(([]ServiceAccount)(x.Items), e) @@ -27860,15 +29186,15 @@ func (x *ServiceAccountList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym2158 := z.EncBinary() - _ = yym2158 + yym2251 := z.EncBinary() + _ = yym2251 if false { } else { h.encSliceServiceAccount(([]ServiceAccount)(x.Items), e) } } } - if yyr2144 || yy2arr2144 { + if yyr2237 || yy2arr2237 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -27881,25 +29207,25 @@ func (x *ServiceAccountList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2159 := z.DecBinary() - _ = yym2159 + yym2252 := z.DecBinary() + _ = yym2252 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2160 := r.ContainerType() - if yyct2160 == codecSelferValueTypeMap1234 { - yyl2160 := r.ReadMapStart() - if yyl2160 == 0 { + yyct2253 := r.ContainerType() + if yyct2253 == codecSelferValueTypeMap1234 { + yyl2253 := r.ReadMapStart() + if yyl2253 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2160, d) + x.codecDecodeSelfFromMap(yyl2253, d) } - } else if yyct2160 == codecSelferValueTypeArray1234 { - yyl2160 := r.ReadArrayStart() - if yyl2160 == 0 { + } else if yyct2253 == codecSelferValueTypeArray1234 { + yyl2253 := r.ReadArrayStart() + if yyl2253 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2160, d) + x.codecDecodeSelfFromArray(yyl2253, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -27911,12 +29237,12 @@ func (x *ServiceAccountList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2161Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2161Slc - var yyhl2161 bool = l >= 0 - for yyj2161 := 0; ; yyj2161++ { - if yyhl2161 { - if yyj2161 >= l { + var yys2254Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2254Slc + var yyhl2254 bool = l >= 0 + for yyj2254 := 0; ; yyj2254++ { + if yyhl2254 { + if yyj2254 >= l { break } } else { @@ -27925,10 +29251,10 @@ func (x *ServiceAccountList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2161Slc = r.DecodeBytes(yys2161Slc, true, true) - yys2161 := string(yys2161Slc) + yys2254Slc = r.DecodeBytes(yys2254Slc, true, true) + yys2254 := string(yys2254Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2161 { + switch yys2254 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -27945,31 +29271,31 @@ func (x *ServiceAccountList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv2164 := &x.ListMeta - yym2165 := z.DecBinary() - _ = yym2165 + yyv2257 := &x.ListMeta + yym2258 := z.DecBinary() + _ = yym2258 if false { - } else if z.HasExtensions() && z.DecExt(yyv2164) { + } else if z.HasExtensions() && z.DecExt(yyv2257) { } else { - z.DecFallback(yyv2164, false) + z.DecFallback(yyv2257, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2166 := &x.Items - yym2167 := z.DecBinary() - _ = yym2167 + yyv2259 := &x.Items + yym2260 := z.DecBinary() + _ = yym2260 if false { } else { - h.decSliceServiceAccount((*[]ServiceAccount)(yyv2166), d) + h.decSliceServiceAccount((*[]ServiceAccount)(yyv2259), d) } } default: - z.DecStructFieldNotFound(-1, yys2161) - } // end switch yys2161 - } // end for yyj2161 + z.DecStructFieldNotFound(-1, yys2254) + } // end switch yys2254 + } // end for yyj2254 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -27977,16 +29303,16 @@ func (x *ServiceAccountList) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2168 int - var yyb2168 bool - var yyhl2168 bool = l >= 0 - yyj2168++ - if yyhl2168 { - yyb2168 = yyj2168 > l + var yyj2261 int + var yyb2261 bool + var yyhl2261 bool = l >= 0 + yyj2261++ + if yyhl2261 { + yyb2261 = yyj2261 > l } else { - yyb2168 = r.CheckBreak() + yyb2261 = r.CheckBreak() } - if yyb2168 { + if yyb2261 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27996,13 +29322,13 @@ func (x *ServiceAccountList) codecDecodeSelfFromArray(l int, d *codec1978.Decode } else { x.Kind = string(r.DecodeString()) } - yyj2168++ - if yyhl2168 { - yyb2168 = yyj2168 > l + yyj2261++ + if yyhl2261 { + yyb2261 = yyj2261 > l } else { - yyb2168 = r.CheckBreak() + yyb2261 = r.CheckBreak() } - if yyb2168 { + if yyb2261 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28012,13 +29338,13 @@ func (x *ServiceAccountList) codecDecodeSelfFromArray(l int, d *codec1978.Decode } else { x.APIVersion = string(r.DecodeString()) } - yyj2168++ - if yyhl2168 { - yyb2168 = yyj2168 > l + yyj2261++ + if yyhl2261 { + yyb2261 = yyj2261 > l } else { - yyb2168 = r.CheckBreak() + yyb2261 = r.CheckBreak() } - if yyb2168 { + if yyb2261 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28026,22 +29352,22 @@ func (x *ServiceAccountList) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv2171 := &x.ListMeta - yym2172 := z.DecBinary() - _ = yym2172 + yyv2264 := &x.ListMeta + yym2265 := z.DecBinary() + _ = yym2265 if false { - } else if z.HasExtensions() && z.DecExt(yyv2171) { + } else if z.HasExtensions() && z.DecExt(yyv2264) { } else { - z.DecFallback(yyv2171, false) + z.DecFallback(yyv2264, false) } } - yyj2168++ - if yyhl2168 { - yyb2168 = yyj2168 > l + yyj2261++ + if yyhl2261 { + yyb2261 = yyj2261 > l } else { - yyb2168 = r.CheckBreak() + yyb2261 = r.CheckBreak() } - if yyb2168 { + if yyb2261 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28049,26 +29375,26 @@ func (x *ServiceAccountList) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2173 := &x.Items - yym2174 := z.DecBinary() - _ = yym2174 + yyv2266 := &x.Items + yym2267 := z.DecBinary() + _ = yym2267 if false { } else { - h.decSliceServiceAccount((*[]ServiceAccount)(yyv2173), d) + h.decSliceServiceAccount((*[]ServiceAccount)(yyv2266), d) } } for { - yyj2168++ - if yyhl2168 { - yyb2168 = yyj2168 > l + yyj2261++ + if yyhl2261 { + yyb2261 = yyj2261 > l } else { - yyb2168 = r.CheckBreak() + yyb2261 = r.CheckBreak() } - if yyb2168 { + if yyb2261 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2168-1, "") + z.DecStructFieldNotFound(yyj2261-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -28080,37 +29406,37 @@ func (x *Endpoints) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2175 := z.EncBinary() - _ = yym2175 + yym2268 := z.EncBinary() + _ = yym2268 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2176 := !z.EncBinary() - yy2arr2176 := z.EncBasicHandle().StructToArray - var yyq2176 [4]bool - _, _, _ = yysep2176, yyq2176, yy2arr2176 - const yyr2176 bool = false - yyq2176[0] = x.Kind != "" - yyq2176[1] = x.APIVersion != "" - yyq2176[2] = true - var yynn2176 int - if yyr2176 || yy2arr2176 { + yysep2269 := !z.EncBinary() + yy2arr2269 := z.EncBasicHandle().StructToArray + var yyq2269 [4]bool + _, _, _ = yysep2269, yyq2269, yy2arr2269 + const yyr2269 bool = false + yyq2269[0] = x.Kind != "" + yyq2269[1] = x.APIVersion != "" + yyq2269[2] = true + var yynn2269 int + if yyr2269 || yy2arr2269 { r.EncodeArrayStart(4) } else { - yynn2176 = 1 - for _, b := range yyq2176 { + yynn2269 = 1 + for _, b := range yyq2269 { if b { - yynn2176++ + yynn2269++ } } - r.EncodeMapStart(yynn2176) - yynn2176 = 0 + r.EncodeMapStart(yynn2269) + yynn2269 = 0 } - if yyr2176 || yy2arr2176 { + if yyr2269 || yy2arr2269 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2176[0] { - yym2178 := z.EncBinary() - _ = yym2178 + if yyq2269[0] { + yym2271 := z.EncBinary() + _ = yym2271 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -28119,23 +29445,23 @@ func (x *Endpoints) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2176[0] { + if yyq2269[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2179 := z.EncBinary() - _ = yym2179 + yym2272 := z.EncBinary() + _ = yym2272 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2176 || yy2arr2176 { + if yyr2269 || yy2arr2269 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2176[1] { - yym2181 := z.EncBinary() - _ = yym2181 + if yyq2269[1] { + yym2274 := z.EncBinary() + _ = yym2274 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -28144,42 +29470,42 @@ func (x *Endpoints) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2176[1] { + if yyq2269[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2182 := z.EncBinary() - _ = yym2182 + yym2275 := z.EncBinary() + _ = yym2275 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2176 || yy2arr2176 { + if yyr2269 || yy2arr2269 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2176[2] { - yy2184 := &x.ObjectMeta - yy2184.CodecEncodeSelf(e) + if yyq2269[2] { + yy2277 := &x.ObjectMeta + yy2277.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2176[2] { + if yyq2269[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2185 := &x.ObjectMeta - yy2185.CodecEncodeSelf(e) + yy2278 := &x.ObjectMeta + yy2278.CodecEncodeSelf(e) } } - if yyr2176 || yy2arr2176 { + if yyr2269 || yy2arr2269 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Subsets == nil { r.EncodeNil() } else { - yym2187 := z.EncBinary() - _ = yym2187 + yym2280 := z.EncBinary() + _ = yym2280 if false { } else { h.encSliceEndpointSubset(([]EndpointSubset)(x.Subsets), e) @@ -28192,15 +29518,15 @@ func (x *Endpoints) CodecEncodeSelf(e *codec1978.Encoder) { if x.Subsets == nil { r.EncodeNil() } else { - yym2188 := z.EncBinary() - _ = yym2188 + yym2281 := z.EncBinary() + _ = yym2281 if false { } else { h.encSliceEndpointSubset(([]EndpointSubset)(x.Subsets), e) } } } - if yyr2176 || yy2arr2176 { + if yyr2269 || yy2arr2269 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -28213,25 +29539,25 @@ func (x *Endpoints) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2189 := z.DecBinary() - _ = yym2189 + yym2282 := z.DecBinary() + _ = yym2282 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2190 := r.ContainerType() - if yyct2190 == codecSelferValueTypeMap1234 { - yyl2190 := r.ReadMapStart() - if yyl2190 == 0 { + yyct2283 := r.ContainerType() + if yyct2283 == codecSelferValueTypeMap1234 { + yyl2283 := r.ReadMapStart() + if yyl2283 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2190, d) + x.codecDecodeSelfFromMap(yyl2283, d) } - } else if yyct2190 == codecSelferValueTypeArray1234 { - yyl2190 := r.ReadArrayStart() - if yyl2190 == 0 { + } else if yyct2283 == codecSelferValueTypeArray1234 { + yyl2283 := r.ReadArrayStart() + if yyl2283 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2190, d) + x.codecDecodeSelfFromArray(yyl2283, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -28243,12 +29569,12 @@ func (x *Endpoints) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2191Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2191Slc - var yyhl2191 bool = l >= 0 - for yyj2191 := 0; ; yyj2191++ { - if yyhl2191 { - if yyj2191 >= l { + var yys2284Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2284Slc + var yyhl2284 bool = l >= 0 + for yyj2284 := 0; ; yyj2284++ { + if yyhl2284 { + if yyj2284 >= l { break } } else { @@ -28257,10 +29583,10 @@ func (x *Endpoints) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2191Slc = r.DecodeBytes(yys2191Slc, true, true) - yys2191 := string(yys2191Slc) + yys2284Slc = r.DecodeBytes(yys2284Slc, true, true) + yys2284 := string(yys2284Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2191 { + switch yys2284 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -28277,25 +29603,25 @@ func (x *Endpoints) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv2194 := &x.ObjectMeta - yyv2194.CodecDecodeSelf(d) + yyv2287 := &x.ObjectMeta + yyv2287.CodecDecodeSelf(d) } case "Subsets": if r.TryDecodeAsNil() { x.Subsets = nil } else { - yyv2195 := &x.Subsets - yym2196 := z.DecBinary() - _ = yym2196 + yyv2288 := &x.Subsets + yym2289 := z.DecBinary() + _ = yym2289 if false { } else { - h.decSliceEndpointSubset((*[]EndpointSubset)(yyv2195), d) + h.decSliceEndpointSubset((*[]EndpointSubset)(yyv2288), d) } } default: - z.DecStructFieldNotFound(-1, yys2191) - } // end switch yys2191 - } // end for yyj2191 + z.DecStructFieldNotFound(-1, yys2284) + } // end switch yys2284 + } // end for yyj2284 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -28303,16 +29629,16 @@ func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2197 int - var yyb2197 bool - var yyhl2197 bool = l >= 0 - yyj2197++ - if yyhl2197 { - yyb2197 = yyj2197 > l + var yyj2290 int + var yyb2290 bool + var yyhl2290 bool = l >= 0 + yyj2290++ + if yyhl2290 { + yyb2290 = yyj2290 > l } else { - yyb2197 = r.CheckBreak() + yyb2290 = r.CheckBreak() } - if yyb2197 { + if yyb2290 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28322,13 +29648,13 @@ func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2197++ - if yyhl2197 { - yyb2197 = yyj2197 > l + yyj2290++ + if yyhl2290 { + yyb2290 = yyj2290 > l } else { - yyb2197 = r.CheckBreak() + yyb2290 = r.CheckBreak() } - if yyb2197 { + if yyb2290 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28338,13 +29664,13 @@ func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2197++ - if yyhl2197 { - yyb2197 = yyj2197 > l + yyj2290++ + if yyhl2290 { + yyb2290 = yyj2290 > l } else { - yyb2197 = r.CheckBreak() + yyb2290 = r.CheckBreak() } - if yyb2197 { + if yyb2290 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28352,16 +29678,16 @@ func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv2200 := &x.ObjectMeta - yyv2200.CodecDecodeSelf(d) + yyv2293 := &x.ObjectMeta + yyv2293.CodecDecodeSelf(d) } - yyj2197++ - if yyhl2197 { - yyb2197 = yyj2197 > l + yyj2290++ + if yyhl2290 { + yyb2290 = yyj2290 > l } else { - yyb2197 = r.CheckBreak() + yyb2290 = r.CheckBreak() } - if yyb2197 { + if yyb2290 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28369,26 +29695,26 @@ func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Subsets = nil } else { - yyv2201 := &x.Subsets - yym2202 := z.DecBinary() - _ = yym2202 + yyv2294 := &x.Subsets + yym2295 := z.DecBinary() + _ = yym2295 if false { } else { - h.decSliceEndpointSubset((*[]EndpointSubset)(yyv2201), d) + h.decSliceEndpointSubset((*[]EndpointSubset)(yyv2294), d) } } for { - yyj2197++ - if yyhl2197 { - yyb2197 = yyj2197 > l + yyj2290++ + if yyhl2290 { + yyb2290 = yyj2290 > l } else { - yyb2197 = r.CheckBreak() + yyb2290 = r.CheckBreak() } - if yyb2197 { + if yyb2290 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2197-1, "") + z.DecStructFieldNotFound(yyj2290-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -28400,36 +29726,36 @@ func (x *EndpointSubset) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2203 := z.EncBinary() - _ = yym2203 + yym2296 := z.EncBinary() + _ = yym2296 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2204 := !z.EncBinary() - yy2arr2204 := z.EncBasicHandle().StructToArray - var yyq2204 [3]bool - _, _, _ = yysep2204, yyq2204, yy2arr2204 - const yyr2204 bool = false - var yynn2204 int - if yyr2204 || yy2arr2204 { + yysep2297 := !z.EncBinary() + yy2arr2297 := z.EncBasicHandle().StructToArray + var yyq2297 [3]bool + _, _, _ = yysep2297, yyq2297, yy2arr2297 + const yyr2297 bool = false + var yynn2297 int + if yyr2297 || yy2arr2297 { r.EncodeArrayStart(3) } else { - yynn2204 = 3 - for _, b := range yyq2204 { + yynn2297 = 3 + for _, b := range yyq2297 { if b { - yynn2204++ + yynn2297++ } } - r.EncodeMapStart(yynn2204) - yynn2204 = 0 + r.EncodeMapStart(yynn2297) + yynn2297 = 0 } - if yyr2204 || yy2arr2204 { + if yyr2297 || yy2arr2297 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Addresses == nil { r.EncodeNil() } else { - yym2206 := z.EncBinary() - _ = yym2206 + yym2299 := z.EncBinary() + _ = yym2299 if false { } else { h.encSliceEndpointAddress(([]EndpointAddress)(x.Addresses), e) @@ -28442,21 +29768,21 @@ func (x *EndpointSubset) CodecEncodeSelf(e *codec1978.Encoder) { if x.Addresses == nil { r.EncodeNil() } else { - yym2207 := z.EncBinary() - _ = yym2207 + yym2300 := z.EncBinary() + _ = yym2300 if false { } else { h.encSliceEndpointAddress(([]EndpointAddress)(x.Addresses), e) } } } - if yyr2204 || yy2arr2204 { + if yyr2297 || yy2arr2297 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.NotReadyAddresses == nil { r.EncodeNil() } else { - yym2209 := z.EncBinary() - _ = yym2209 + yym2302 := z.EncBinary() + _ = yym2302 if false { } else { h.encSliceEndpointAddress(([]EndpointAddress)(x.NotReadyAddresses), e) @@ -28469,21 +29795,21 @@ func (x *EndpointSubset) CodecEncodeSelf(e *codec1978.Encoder) { if x.NotReadyAddresses == nil { r.EncodeNil() } else { - yym2210 := z.EncBinary() - _ = yym2210 + yym2303 := z.EncBinary() + _ = yym2303 if false { } else { h.encSliceEndpointAddress(([]EndpointAddress)(x.NotReadyAddresses), e) } } } - if yyr2204 || yy2arr2204 { + if yyr2297 || yy2arr2297 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Ports == nil { r.EncodeNil() } else { - yym2212 := z.EncBinary() - _ = yym2212 + yym2305 := z.EncBinary() + _ = yym2305 if false { } else { h.encSliceEndpointPort(([]EndpointPort)(x.Ports), e) @@ -28496,15 +29822,15 @@ func (x *EndpointSubset) CodecEncodeSelf(e *codec1978.Encoder) { if x.Ports == nil { r.EncodeNil() } else { - yym2213 := z.EncBinary() - _ = yym2213 + yym2306 := z.EncBinary() + _ = yym2306 if false { } else { h.encSliceEndpointPort(([]EndpointPort)(x.Ports), e) } } } - if yyr2204 || yy2arr2204 { + if yyr2297 || yy2arr2297 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -28517,25 +29843,25 @@ func (x *EndpointSubset) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2214 := z.DecBinary() - _ = yym2214 + yym2307 := z.DecBinary() + _ = yym2307 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2215 := r.ContainerType() - if yyct2215 == codecSelferValueTypeMap1234 { - yyl2215 := r.ReadMapStart() - if yyl2215 == 0 { + yyct2308 := r.ContainerType() + if yyct2308 == codecSelferValueTypeMap1234 { + yyl2308 := r.ReadMapStart() + if yyl2308 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2215, d) + x.codecDecodeSelfFromMap(yyl2308, d) } - } else if yyct2215 == codecSelferValueTypeArray1234 { - yyl2215 := r.ReadArrayStart() - if yyl2215 == 0 { + } else if yyct2308 == codecSelferValueTypeArray1234 { + yyl2308 := r.ReadArrayStart() + if yyl2308 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2215, d) + x.codecDecodeSelfFromArray(yyl2308, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -28547,12 +29873,12 @@ func (x *EndpointSubset) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2216Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2216Slc - var yyhl2216 bool = l >= 0 - for yyj2216 := 0; ; yyj2216++ { - if yyhl2216 { - if yyj2216 >= l { + var yys2309Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2309Slc + var yyhl2309 bool = l >= 0 + for yyj2309 := 0; ; yyj2309++ { + if yyhl2309 { + if yyj2309 >= l { break } } else { @@ -28561,50 +29887,50 @@ func (x *EndpointSubset) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2216Slc = r.DecodeBytes(yys2216Slc, true, true) - yys2216 := string(yys2216Slc) + yys2309Slc = r.DecodeBytes(yys2309Slc, true, true) + yys2309 := string(yys2309Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2216 { + switch yys2309 { case "Addresses": if r.TryDecodeAsNil() { x.Addresses = nil } else { - yyv2217 := &x.Addresses - yym2218 := z.DecBinary() - _ = yym2218 + yyv2310 := &x.Addresses + yym2311 := z.DecBinary() + _ = yym2311 if false { } else { - h.decSliceEndpointAddress((*[]EndpointAddress)(yyv2217), d) + h.decSliceEndpointAddress((*[]EndpointAddress)(yyv2310), d) } } case "NotReadyAddresses": if r.TryDecodeAsNil() { x.NotReadyAddresses = nil } else { - yyv2219 := &x.NotReadyAddresses - yym2220 := z.DecBinary() - _ = yym2220 + yyv2312 := &x.NotReadyAddresses + yym2313 := z.DecBinary() + _ = yym2313 if false { } else { - h.decSliceEndpointAddress((*[]EndpointAddress)(yyv2219), d) + h.decSliceEndpointAddress((*[]EndpointAddress)(yyv2312), d) } } case "Ports": if r.TryDecodeAsNil() { x.Ports = nil } else { - yyv2221 := &x.Ports - yym2222 := z.DecBinary() - _ = yym2222 + yyv2314 := &x.Ports + yym2315 := z.DecBinary() + _ = yym2315 if false { } else { - h.decSliceEndpointPort((*[]EndpointPort)(yyv2221), d) + h.decSliceEndpointPort((*[]EndpointPort)(yyv2314), d) } } default: - z.DecStructFieldNotFound(-1, yys2216) - } // end switch yys2216 - } // end for yyj2216 + z.DecStructFieldNotFound(-1, yys2309) + } // end switch yys2309 + } // end for yyj2309 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -28612,16 +29938,16 @@ func (x *EndpointSubset) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2223 int - var yyb2223 bool - var yyhl2223 bool = l >= 0 - yyj2223++ - if yyhl2223 { - yyb2223 = yyj2223 > l + var yyj2316 int + var yyb2316 bool + var yyhl2316 bool = l >= 0 + yyj2316++ + if yyhl2316 { + yyb2316 = yyj2316 > l } else { - yyb2223 = r.CheckBreak() + yyb2316 = r.CheckBreak() } - if yyb2223 { + if yyb2316 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28629,21 +29955,21 @@ func (x *EndpointSubset) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Addresses = nil } else { - yyv2224 := &x.Addresses - yym2225 := z.DecBinary() - _ = yym2225 + yyv2317 := &x.Addresses + yym2318 := z.DecBinary() + _ = yym2318 if false { } else { - h.decSliceEndpointAddress((*[]EndpointAddress)(yyv2224), d) + h.decSliceEndpointAddress((*[]EndpointAddress)(yyv2317), d) } } - yyj2223++ - if yyhl2223 { - yyb2223 = yyj2223 > l + yyj2316++ + if yyhl2316 { + yyb2316 = yyj2316 > l } else { - yyb2223 = r.CheckBreak() + yyb2316 = r.CheckBreak() } - if yyb2223 { + if yyb2316 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28651,21 +29977,21 @@ func (x *EndpointSubset) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.NotReadyAddresses = nil } else { - yyv2226 := &x.NotReadyAddresses - yym2227 := z.DecBinary() - _ = yym2227 + yyv2319 := &x.NotReadyAddresses + yym2320 := z.DecBinary() + _ = yym2320 if false { } else { - h.decSliceEndpointAddress((*[]EndpointAddress)(yyv2226), d) + h.decSliceEndpointAddress((*[]EndpointAddress)(yyv2319), d) } } - yyj2223++ - if yyhl2223 { - yyb2223 = yyj2223 > l + yyj2316++ + if yyhl2316 { + yyb2316 = yyj2316 > l } else { - yyb2223 = r.CheckBreak() + yyb2316 = r.CheckBreak() } - if yyb2223 { + if yyb2316 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28673,26 +29999,26 @@ func (x *EndpointSubset) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Ports = nil } else { - yyv2228 := &x.Ports - yym2229 := z.DecBinary() - _ = yym2229 + yyv2321 := &x.Ports + yym2322 := z.DecBinary() + _ = yym2322 if false { } else { - h.decSliceEndpointPort((*[]EndpointPort)(yyv2228), d) + h.decSliceEndpointPort((*[]EndpointPort)(yyv2321), d) } } for { - yyj2223++ - if yyhl2223 { - yyb2223 = yyj2223 > l + yyj2316++ + if yyhl2316 { + yyb2316 = yyj2316 > l } else { - yyb2223 = r.CheckBreak() + yyb2316 = r.CheckBreak() } - if yyb2223 { + if yyb2316 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2223-1, "") + z.DecStructFieldNotFound(yyj2316-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -28704,33 +30030,33 @@ func (x *EndpointAddress) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2230 := z.EncBinary() - _ = yym2230 + yym2323 := z.EncBinary() + _ = yym2323 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2231 := !z.EncBinary() - yy2arr2231 := z.EncBasicHandle().StructToArray - var yyq2231 [2]bool - _, _, _ = yysep2231, yyq2231, yy2arr2231 - const yyr2231 bool = false - var yynn2231 int - if yyr2231 || yy2arr2231 { + yysep2324 := !z.EncBinary() + yy2arr2324 := z.EncBasicHandle().StructToArray + var yyq2324 [2]bool + _, _, _ = yysep2324, yyq2324, yy2arr2324 + const yyr2324 bool = false + var yynn2324 int + if yyr2324 || yy2arr2324 { r.EncodeArrayStart(2) } else { - yynn2231 = 2 - for _, b := range yyq2231 { + yynn2324 = 2 + for _, b := range yyq2324 { if b { - yynn2231++ + yynn2324++ } } - r.EncodeMapStart(yynn2231) - yynn2231 = 0 + r.EncodeMapStart(yynn2324) + yynn2324 = 0 } - if yyr2231 || yy2arr2231 { + if yyr2324 || yy2arr2324 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2233 := z.EncBinary() - _ = yym2233 + yym2326 := z.EncBinary() + _ = yym2326 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.IP)) @@ -28739,14 +30065,14 @@ func (x *EndpointAddress) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("IP")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2234 := z.EncBinary() - _ = yym2234 + yym2327 := z.EncBinary() + _ = yym2327 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.IP)) } } - if yyr2231 || yy2arr2231 { + if yyr2324 || yy2arr2324 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.TargetRef == nil { r.EncodeNil() @@ -28763,7 +30089,7 @@ func (x *EndpointAddress) CodecEncodeSelf(e *codec1978.Encoder) { x.TargetRef.CodecEncodeSelf(e) } } - if yyr2231 || yy2arr2231 { + if yyr2324 || yy2arr2324 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -28776,25 +30102,25 @@ func (x *EndpointAddress) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2236 := z.DecBinary() - _ = yym2236 + yym2329 := z.DecBinary() + _ = yym2329 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2237 := r.ContainerType() - if yyct2237 == codecSelferValueTypeMap1234 { - yyl2237 := r.ReadMapStart() - if yyl2237 == 0 { + yyct2330 := r.ContainerType() + if yyct2330 == codecSelferValueTypeMap1234 { + yyl2330 := r.ReadMapStart() + if yyl2330 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2237, d) + x.codecDecodeSelfFromMap(yyl2330, d) } - } else if yyct2237 == codecSelferValueTypeArray1234 { - yyl2237 := r.ReadArrayStart() - if yyl2237 == 0 { + } else if yyct2330 == codecSelferValueTypeArray1234 { + yyl2330 := r.ReadArrayStart() + if yyl2330 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2237, d) + x.codecDecodeSelfFromArray(yyl2330, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -28806,12 +30132,12 @@ func (x *EndpointAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2238Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2238Slc - var yyhl2238 bool = l >= 0 - for yyj2238 := 0; ; yyj2238++ { - if yyhl2238 { - if yyj2238 >= l { + var yys2331Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2331Slc + var yyhl2331 bool = l >= 0 + for yyj2331 := 0; ; yyj2331++ { + if yyhl2331 { + if yyj2331 >= l { break } } else { @@ -28820,10 +30146,10 @@ func (x *EndpointAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2238Slc = r.DecodeBytes(yys2238Slc, true, true) - yys2238 := string(yys2238Slc) + yys2331Slc = r.DecodeBytes(yys2331Slc, true, true) + yys2331 := string(yys2331Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2238 { + switch yys2331 { case "IP": if r.TryDecodeAsNil() { x.IP = "" @@ -28842,9 +30168,9 @@ func (x *EndpointAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.TargetRef.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2238) - } // end switch yys2238 - } // end for yyj2238 + z.DecStructFieldNotFound(-1, yys2331) + } // end switch yys2331 + } // end for yyj2331 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -28852,16 +30178,16 @@ func (x *EndpointAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2241 int - var yyb2241 bool - var yyhl2241 bool = l >= 0 - yyj2241++ - if yyhl2241 { - yyb2241 = yyj2241 > l + var yyj2334 int + var yyb2334 bool + var yyhl2334 bool = l >= 0 + yyj2334++ + if yyhl2334 { + yyb2334 = yyj2334 > l } else { - yyb2241 = r.CheckBreak() + yyb2334 = r.CheckBreak() } - if yyb2241 { + if yyb2334 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28871,13 +30197,13 @@ func (x *EndpointAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.IP = string(r.DecodeString()) } - yyj2241++ - if yyhl2241 { - yyb2241 = yyj2241 > l + yyj2334++ + if yyhl2334 { + yyb2334 = yyj2334 > l } else { - yyb2241 = r.CheckBreak() + yyb2334 = r.CheckBreak() } - if yyb2241 { + if yyb2334 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28893,17 +30219,17 @@ func (x *EndpointAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) x.TargetRef.CodecDecodeSelf(d) } for { - yyj2241++ - if yyhl2241 { - yyb2241 = yyj2241 > l + yyj2334++ + if yyhl2334 { + yyb2334 = yyj2334 > l } else { - yyb2241 = r.CheckBreak() + yyb2334 = r.CheckBreak() } - if yyb2241 { + if yyb2334 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2241-1, "") + z.DecStructFieldNotFound(yyj2334-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -28915,33 +30241,33 @@ func (x *EndpointPort) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2244 := z.EncBinary() - _ = yym2244 + yym2337 := z.EncBinary() + _ = yym2337 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2245 := !z.EncBinary() - yy2arr2245 := z.EncBasicHandle().StructToArray - var yyq2245 [3]bool - _, _, _ = yysep2245, yyq2245, yy2arr2245 - const yyr2245 bool = false - var yynn2245 int - if yyr2245 || yy2arr2245 { + yysep2338 := !z.EncBinary() + yy2arr2338 := z.EncBasicHandle().StructToArray + var yyq2338 [3]bool + _, _, _ = yysep2338, yyq2338, yy2arr2338 + const yyr2338 bool = false + var yynn2338 int + if yyr2338 || yy2arr2338 { r.EncodeArrayStart(3) } else { - yynn2245 = 3 - for _, b := range yyq2245 { + yynn2338 = 3 + for _, b := range yyq2338 { if b { - yynn2245++ + yynn2338++ } } - r.EncodeMapStart(yynn2245) - yynn2245 = 0 + r.EncodeMapStart(yynn2338) + yynn2338 = 0 } - if yyr2245 || yy2arr2245 { + if yyr2338 || yy2arr2338 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2247 := z.EncBinary() - _ = yym2247 + yym2340 := z.EncBinary() + _ = yym2340 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -28950,17 +30276,17 @@ func (x *EndpointPort) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2248 := z.EncBinary() - _ = yym2248 + yym2341 := z.EncBinary() + _ = yym2341 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } - if yyr2245 || yy2arr2245 { + if yyr2338 || yy2arr2338 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2250 := z.EncBinary() - _ = yym2250 + yym2343 := z.EncBinary() + _ = yym2343 if false { } else { r.EncodeInt(int64(x.Port)) @@ -28969,14 +30295,14 @@ func (x *EndpointPort) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Port")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2251 := z.EncBinary() - _ = yym2251 + yym2344 := z.EncBinary() + _ = yym2344 if false { } else { r.EncodeInt(int64(x.Port)) } } - if yyr2245 || yy2arr2245 { + if yyr2338 || yy2arr2338 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Protocol.CodecEncodeSelf(e) } else { @@ -28985,7 +30311,7 @@ func (x *EndpointPort) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Protocol.CodecEncodeSelf(e) } - if yyr2245 || yy2arr2245 { + if yyr2338 || yy2arr2338 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -28998,25 +30324,25 @@ func (x *EndpointPort) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2253 := z.DecBinary() - _ = yym2253 + yym2346 := z.DecBinary() + _ = yym2346 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2254 := r.ContainerType() - if yyct2254 == codecSelferValueTypeMap1234 { - yyl2254 := r.ReadMapStart() - if yyl2254 == 0 { + yyct2347 := r.ContainerType() + if yyct2347 == codecSelferValueTypeMap1234 { + yyl2347 := r.ReadMapStart() + if yyl2347 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2254, d) + x.codecDecodeSelfFromMap(yyl2347, d) } - } else if yyct2254 == codecSelferValueTypeArray1234 { - yyl2254 := r.ReadArrayStart() - if yyl2254 == 0 { + } else if yyct2347 == codecSelferValueTypeArray1234 { + yyl2347 := r.ReadArrayStart() + if yyl2347 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2254, d) + x.codecDecodeSelfFromArray(yyl2347, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -29028,12 +30354,12 @@ func (x *EndpointPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2255Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2255Slc - var yyhl2255 bool = l >= 0 - for yyj2255 := 0; ; yyj2255++ { - if yyhl2255 { - if yyj2255 >= l { + var yys2348Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2348Slc + var yyhl2348 bool = l >= 0 + for yyj2348 := 0; ; yyj2348++ { + if yyhl2348 { + if yyj2348 >= l { break } } else { @@ -29042,10 +30368,10 @@ func (x *EndpointPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2255Slc = r.DecodeBytes(yys2255Slc, true, true) - yys2255 := string(yys2255Slc) + yys2348Slc = r.DecodeBytes(yys2348Slc, true, true) + yys2348 := string(yys2348Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2255 { + switch yys2348 { case "Name": if r.TryDecodeAsNil() { x.Name = "" @@ -29065,9 +30391,9 @@ func (x *EndpointPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Protocol = Protocol(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys2255) - } // end switch yys2255 - } // end for yyj2255 + z.DecStructFieldNotFound(-1, yys2348) + } // end switch yys2348 + } // end for yyj2348 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -29075,16 +30401,16 @@ func (x *EndpointPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2259 int - var yyb2259 bool - var yyhl2259 bool = l >= 0 - yyj2259++ - if yyhl2259 { - yyb2259 = yyj2259 > l + var yyj2352 int + var yyb2352 bool + var yyhl2352 bool = l >= 0 + yyj2352++ + if yyhl2352 { + yyb2352 = yyj2352 > l } else { - yyb2259 = r.CheckBreak() + yyb2352 = r.CheckBreak() } - if yyb2259 { + if yyb2352 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29094,13 +30420,13 @@ func (x *EndpointPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Name = string(r.DecodeString()) } - yyj2259++ - if yyhl2259 { - yyb2259 = yyj2259 > l + yyj2352++ + if yyhl2352 { + yyb2352 = yyj2352 > l } else { - yyb2259 = r.CheckBreak() + yyb2352 = r.CheckBreak() } - if yyb2259 { + if yyb2352 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29110,13 +30436,13 @@ func (x *EndpointPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Port = int(r.DecodeInt(codecSelferBitsize1234)) } - yyj2259++ - if yyhl2259 { - yyb2259 = yyj2259 > l + yyj2352++ + if yyhl2352 { + yyb2352 = yyj2352 > l } else { - yyb2259 = r.CheckBreak() + yyb2352 = r.CheckBreak() } - if yyb2259 { + if yyb2352 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29127,17 +30453,17 @@ func (x *EndpointPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Protocol = Protocol(r.DecodeString()) } for { - yyj2259++ - if yyhl2259 { - yyb2259 = yyj2259 > l + yyj2352++ + if yyhl2352 { + yyb2352 = yyj2352 > l } else { - yyb2259 = r.CheckBreak() + yyb2352 = r.CheckBreak() } - if yyb2259 { + if yyb2352 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2259-1, "") + z.DecStructFieldNotFound(yyj2352-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -29149,37 +30475,37 @@ func (x *EndpointsList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2263 := z.EncBinary() - _ = yym2263 + yym2356 := z.EncBinary() + _ = yym2356 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2264 := !z.EncBinary() - yy2arr2264 := z.EncBasicHandle().StructToArray - var yyq2264 [4]bool - _, _, _ = yysep2264, yyq2264, yy2arr2264 - const yyr2264 bool = false - yyq2264[0] = x.Kind != "" - yyq2264[1] = x.APIVersion != "" - yyq2264[2] = true - var yynn2264 int - if yyr2264 || yy2arr2264 { + yysep2357 := !z.EncBinary() + yy2arr2357 := z.EncBasicHandle().StructToArray + var yyq2357 [4]bool + _, _, _ = yysep2357, yyq2357, yy2arr2357 + const yyr2357 bool = false + yyq2357[0] = x.Kind != "" + yyq2357[1] = x.APIVersion != "" + yyq2357[2] = true + var yynn2357 int + if yyr2357 || yy2arr2357 { r.EncodeArrayStart(4) } else { - yynn2264 = 1 - for _, b := range yyq2264 { + yynn2357 = 1 + for _, b := range yyq2357 { if b { - yynn2264++ + yynn2357++ } } - r.EncodeMapStart(yynn2264) - yynn2264 = 0 + r.EncodeMapStart(yynn2357) + yynn2357 = 0 } - if yyr2264 || yy2arr2264 { + if yyr2357 || yy2arr2357 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2264[0] { - yym2266 := z.EncBinary() - _ = yym2266 + if yyq2357[0] { + yym2359 := z.EncBinary() + _ = yym2359 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -29188,23 +30514,23 @@ func (x *EndpointsList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2264[0] { + if yyq2357[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2267 := z.EncBinary() - _ = yym2267 + yym2360 := z.EncBinary() + _ = yym2360 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2264 || yy2arr2264 { + if yyr2357 || yy2arr2357 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2264[1] { - yym2269 := z.EncBinary() - _ = yym2269 + if yyq2357[1] { + yym2362 := z.EncBinary() + _ = yym2362 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -29213,54 +30539,54 @@ func (x *EndpointsList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2264[1] { + if yyq2357[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2270 := z.EncBinary() - _ = yym2270 + yym2363 := z.EncBinary() + _ = yym2363 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2264 || yy2arr2264 { + if yyr2357 || yy2arr2357 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2264[2] { - yy2272 := &x.ListMeta - yym2273 := z.EncBinary() - _ = yym2273 + if yyq2357[2] { + yy2365 := &x.ListMeta + yym2366 := z.EncBinary() + _ = yym2366 if false { - } else if z.HasExtensions() && z.EncExt(yy2272) { + } else if z.HasExtensions() && z.EncExt(yy2365) { } else { - z.EncFallback(yy2272) + z.EncFallback(yy2365) } } else { r.EncodeNil() } } else { - if yyq2264[2] { + if yyq2357[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2274 := &x.ListMeta - yym2275 := z.EncBinary() - _ = yym2275 + yy2367 := &x.ListMeta + yym2368 := z.EncBinary() + _ = yym2368 if false { - } else if z.HasExtensions() && z.EncExt(yy2274) { + } else if z.HasExtensions() && z.EncExt(yy2367) { } else { - z.EncFallback(yy2274) + z.EncFallback(yy2367) } } } - if yyr2264 || yy2arr2264 { + if yyr2357 || yy2arr2357 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym2277 := z.EncBinary() - _ = yym2277 + yym2370 := z.EncBinary() + _ = yym2370 if false { } else { h.encSliceEndpoints(([]Endpoints)(x.Items), e) @@ -29273,15 +30599,15 @@ func (x *EndpointsList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym2278 := z.EncBinary() - _ = yym2278 + yym2371 := z.EncBinary() + _ = yym2371 if false { } else { h.encSliceEndpoints(([]Endpoints)(x.Items), e) } } } - if yyr2264 || yy2arr2264 { + if yyr2357 || yy2arr2357 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -29294,25 +30620,25 @@ func (x *EndpointsList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2279 := z.DecBinary() - _ = yym2279 + yym2372 := z.DecBinary() + _ = yym2372 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2280 := r.ContainerType() - if yyct2280 == codecSelferValueTypeMap1234 { - yyl2280 := r.ReadMapStart() - if yyl2280 == 0 { + yyct2373 := r.ContainerType() + if yyct2373 == codecSelferValueTypeMap1234 { + yyl2373 := r.ReadMapStart() + if yyl2373 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2280, d) + x.codecDecodeSelfFromMap(yyl2373, d) } - } else if yyct2280 == codecSelferValueTypeArray1234 { - yyl2280 := r.ReadArrayStart() - if yyl2280 == 0 { + } else if yyct2373 == codecSelferValueTypeArray1234 { + yyl2373 := r.ReadArrayStart() + if yyl2373 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2280, d) + x.codecDecodeSelfFromArray(yyl2373, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -29324,12 +30650,12 @@ func (x *EndpointsList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2281Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2281Slc - var yyhl2281 bool = l >= 0 - for yyj2281 := 0; ; yyj2281++ { - if yyhl2281 { - if yyj2281 >= l { + var yys2374Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2374Slc + var yyhl2374 bool = l >= 0 + for yyj2374 := 0; ; yyj2374++ { + if yyhl2374 { + if yyj2374 >= l { break } } else { @@ -29338,10 +30664,10 @@ func (x *EndpointsList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2281Slc = r.DecodeBytes(yys2281Slc, true, true) - yys2281 := string(yys2281Slc) + yys2374Slc = r.DecodeBytes(yys2374Slc, true, true) + yys2374 := string(yys2374Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2281 { + switch yys2374 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -29358,31 +30684,31 @@ func (x *EndpointsList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv2284 := &x.ListMeta - yym2285 := z.DecBinary() - _ = yym2285 + yyv2377 := &x.ListMeta + yym2378 := z.DecBinary() + _ = yym2378 if false { - } else if z.HasExtensions() && z.DecExt(yyv2284) { + } else if z.HasExtensions() && z.DecExt(yyv2377) { } else { - z.DecFallback(yyv2284, false) + z.DecFallback(yyv2377, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2286 := &x.Items - yym2287 := z.DecBinary() - _ = yym2287 + yyv2379 := &x.Items + yym2380 := z.DecBinary() + _ = yym2380 if false { } else { - h.decSliceEndpoints((*[]Endpoints)(yyv2286), d) + h.decSliceEndpoints((*[]Endpoints)(yyv2379), d) } } default: - z.DecStructFieldNotFound(-1, yys2281) - } // end switch yys2281 - } // end for yyj2281 + z.DecStructFieldNotFound(-1, yys2374) + } // end switch yys2374 + } // end for yyj2374 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -29390,16 +30716,16 @@ func (x *EndpointsList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2288 int - var yyb2288 bool - var yyhl2288 bool = l >= 0 - yyj2288++ - if yyhl2288 { - yyb2288 = yyj2288 > l + var yyj2381 int + var yyb2381 bool + var yyhl2381 bool = l >= 0 + yyj2381++ + if yyhl2381 { + yyb2381 = yyj2381 > l } else { - yyb2288 = r.CheckBreak() + yyb2381 = r.CheckBreak() } - if yyb2288 { + if yyb2381 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29409,13 +30735,13 @@ func (x *EndpointsList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2288++ - if yyhl2288 { - yyb2288 = yyj2288 > l + yyj2381++ + if yyhl2381 { + yyb2381 = yyj2381 > l } else { - yyb2288 = r.CheckBreak() + yyb2381 = r.CheckBreak() } - if yyb2288 { + if yyb2381 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29425,13 +30751,13 @@ func (x *EndpointsList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2288++ - if yyhl2288 { - yyb2288 = yyj2288 > l + yyj2381++ + if yyhl2381 { + yyb2381 = yyj2381 > l } else { - yyb2288 = r.CheckBreak() + yyb2381 = r.CheckBreak() } - if yyb2288 { + if yyb2381 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29439,22 +30765,22 @@ func (x *EndpointsList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv2291 := &x.ListMeta - yym2292 := z.DecBinary() - _ = yym2292 + yyv2384 := &x.ListMeta + yym2385 := z.DecBinary() + _ = yym2385 if false { - } else if z.HasExtensions() && z.DecExt(yyv2291) { + } else if z.HasExtensions() && z.DecExt(yyv2384) { } else { - z.DecFallback(yyv2291, false) + z.DecFallback(yyv2384, false) } } - yyj2288++ - if yyhl2288 { - yyb2288 = yyj2288 > l + yyj2381++ + if yyhl2381 { + yyb2381 = yyj2381 > l } else { - yyb2288 = r.CheckBreak() + yyb2381 = r.CheckBreak() } - if yyb2288 { + if yyb2381 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29462,26 +30788,26 @@ func (x *EndpointsList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2293 := &x.Items - yym2294 := z.DecBinary() - _ = yym2294 + yyv2386 := &x.Items + yym2387 := z.DecBinary() + _ = yym2387 if false { } else { - h.decSliceEndpoints((*[]Endpoints)(yyv2293), d) + h.decSliceEndpoints((*[]Endpoints)(yyv2386), d) } } for { - yyj2288++ - if yyhl2288 { - yyb2288 = yyj2288 > l + yyj2381++ + if yyhl2381 { + yyb2381 = yyj2381 > l } else { - yyb2288 = r.CheckBreak() + yyb2381 = r.CheckBreak() } - if yyb2288 { + if yyb2381 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2288-1, "") + z.DecStructFieldNotFound(yyj2381-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -29493,38 +30819,38 @@ func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2295 := z.EncBinary() - _ = yym2295 + yym2388 := z.EncBinary() + _ = yym2388 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2296 := !z.EncBinary() - yy2arr2296 := z.EncBasicHandle().StructToArray - var yyq2296 [4]bool - _, _, _ = yysep2296, yyq2296, yy2arr2296 - const yyr2296 bool = false - yyq2296[0] = x.PodCIDR != "" - yyq2296[1] = x.ExternalID != "" - yyq2296[2] = x.ProviderID != "" - yyq2296[3] = x.Unschedulable != false - var yynn2296 int - if yyr2296 || yy2arr2296 { + yysep2389 := !z.EncBinary() + yy2arr2389 := z.EncBasicHandle().StructToArray + var yyq2389 [4]bool + _, _, _ = yysep2389, yyq2389, yy2arr2389 + const yyr2389 bool = false + yyq2389[0] = x.PodCIDR != "" + yyq2389[1] = x.ExternalID != "" + yyq2389[2] = x.ProviderID != "" + yyq2389[3] = x.Unschedulable != false + var yynn2389 int + if yyr2389 || yy2arr2389 { r.EncodeArrayStart(4) } else { - yynn2296 = 0 - for _, b := range yyq2296 { + yynn2389 = 0 + for _, b := range yyq2389 { if b { - yynn2296++ + yynn2389++ } } - r.EncodeMapStart(yynn2296) - yynn2296 = 0 + r.EncodeMapStart(yynn2389) + yynn2389 = 0 } - if yyr2296 || yy2arr2296 { + if yyr2389 || yy2arr2389 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2296[0] { - yym2298 := z.EncBinary() - _ = yym2298 + if yyq2389[0] { + yym2391 := z.EncBinary() + _ = yym2391 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodCIDR)) @@ -29533,23 +30859,23 @@ func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2296[0] { + if yyq2389[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podCIDR")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2299 := z.EncBinary() - _ = yym2299 + yym2392 := z.EncBinary() + _ = yym2392 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodCIDR)) } } } - if yyr2296 || yy2arr2296 { + if yyr2389 || yy2arr2389 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2296[1] { - yym2301 := z.EncBinary() - _ = yym2301 + if yyq2389[1] { + yym2394 := z.EncBinary() + _ = yym2394 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ExternalID)) @@ -29558,23 +30884,23 @@ func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2296[1] { + if yyq2389[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("externalID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2302 := z.EncBinary() - _ = yym2302 + yym2395 := z.EncBinary() + _ = yym2395 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ExternalID)) } } } - if yyr2296 || yy2arr2296 { + if yyr2389 || yy2arr2389 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2296[2] { - yym2304 := z.EncBinary() - _ = yym2304 + if yyq2389[2] { + yym2397 := z.EncBinary() + _ = yym2397 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ProviderID)) @@ -29583,23 +30909,23 @@ func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2296[2] { + if yyq2389[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("providerID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2305 := z.EncBinary() - _ = yym2305 + yym2398 := z.EncBinary() + _ = yym2398 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ProviderID)) } } } - if yyr2296 || yy2arr2296 { + if yyr2389 || yy2arr2389 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2296[3] { - yym2307 := z.EncBinary() - _ = yym2307 + if yyq2389[3] { + yym2400 := z.EncBinary() + _ = yym2400 if false { } else { r.EncodeBool(bool(x.Unschedulable)) @@ -29608,19 +30934,19 @@ func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq2296[3] { + if yyq2389[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("unschedulable")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2308 := z.EncBinary() - _ = yym2308 + yym2401 := z.EncBinary() + _ = yym2401 if false { } else { r.EncodeBool(bool(x.Unschedulable)) } } } - if yyr2296 || yy2arr2296 { + if yyr2389 || yy2arr2389 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -29633,25 +30959,25 @@ func (x *NodeSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2309 := z.DecBinary() - _ = yym2309 + yym2402 := z.DecBinary() + _ = yym2402 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2310 := r.ContainerType() - if yyct2310 == codecSelferValueTypeMap1234 { - yyl2310 := r.ReadMapStart() - if yyl2310 == 0 { + yyct2403 := r.ContainerType() + if yyct2403 == codecSelferValueTypeMap1234 { + yyl2403 := r.ReadMapStart() + if yyl2403 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2310, d) + x.codecDecodeSelfFromMap(yyl2403, d) } - } else if yyct2310 == codecSelferValueTypeArray1234 { - yyl2310 := r.ReadArrayStart() - if yyl2310 == 0 { + } else if yyct2403 == codecSelferValueTypeArray1234 { + yyl2403 := r.ReadArrayStart() + if yyl2403 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2310, d) + x.codecDecodeSelfFromArray(yyl2403, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -29663,12 +30989,12 @@ func (x *NodeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2311Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2311Slc - var yyhl2311 bool = l >= 0 - for yyj2311 := 0; ; yyj2311++ { - if yyhl2311 { - if yyj2311 >= l { + var yys2404Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2404Slc + var yyhl2404 bool = l >= 0 + for yyj2404 := 0; ; yyj2404++ { + if yyhl2404 { + if yyj2404 >= l { break } } else { @@ -29677,10 +31003,10 @@ func (x *NodeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2311Slc = r.DecodeBytes(yys2311Slc, true, true) - yys2311 := string(yys2311Slc) + yys2404Slc = r.DecodeBytes(yys2404Slc, true, true) + yys2404 := string(yys2404Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2311 { + switch yys2404 { case "podCIDR": if r.TryDecodeAsNil() { x.PodCIDR = "" @@ -29706,9 +31032,9 @@ func (x *NodeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Unschedulable = bool(r.DecodeBool()) } default: - z.DecStructFieldNotFound(-1, yys2311) - } // end switch yys2311 - } // end for yyj2311 + z.DecStructFieldNotFound(-1, yys2404) + } // end switch yys2404 + } // end for yyj2404 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -29716,16 +31042,16 @@ func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2316 int - var yyb2316 bool - var yyhl2316 bool = l >= 0 - yyj2316++ - if yyhl2316 { - yyb2316 = yyj2316 > l + var yyj2409 int + var yyb2409 bool + var yyhl2409 bool = l >= 0 + yyj2409++ + if yyhl2409 { + yyb2409 = yyj2409 > l } else { - yyb2316 = r.CheckBreak() + yyb2409 = r.CheckBreak() } - if yyb2316 { + if yyb2409 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29735,13 +31061,13 @@ func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.PodCIDR = string(r.DecodeString()) } - yyj2316++ - if yyhl2316 { - yyb2316 = yyj2316 > l + yyj2409++ + if yyhl2409 { + yyb2409 = yyj2409 > l } else { - yyb2316 = r.CheckBreak() + yyb2409 = r.CheckBreak() } - if yyb2316 { + if yyb2409 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29751,13 +31077,13 @@ func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.ExternalID = string(r.DecodeString()) } - yyj2316++ - if yyhl2316 { - yyb2316 = yyj2316 > l + yyj2409++ + if yyhl2409 { + yyb2409 = yyj2409 > l } else { - yyb2316 = r.CheckBreak() + yyb2409 = r.CheckBreak() } - if yyb2316 { + if yyb2409 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29767,13 +31093,13 @@ func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.ProviderID = string(r.DecodeString()) } - yyj2316++ - if yyhl2316 { - yyb2316 = yyj2316 > l + yyj2409++ + if yyhl2409 { + yyb2409 = yyj2409 > l } else { - yyb2316 = r.CheckBreak() + yyb2409 = r.CheckBreak() } - if yyb2316 { + if yyb2409 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29784,17 +31110,17 @@ func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Unschedulable = bool(r.DecodeBool()) } for { - yyj2316++ - if yyhl2316 { - yyb2316 = yyj2316 > l + yyj2409++ + if yyhl2409 { + yyb2409 = yyj2409 > l } else { - yyb2316 = r.CheckBreak() + yyb2409 = r.CheckBreak() } - if yyb2316 { + if yyb2409 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2316-1, "") + z.DecStructFieldNotFound(yyj2409-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -29806,33 +31132,33 @@ func (x *DaemonEndpoint) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2321 := z.EncBinary() - _ = yym2321 + yym2414 := z.EncBinary() + _ = yym2414 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2322 := !z.EncBinary() - yy2arr2322 := z.EncBasicHandle().StructToArray - var yyq2322 [1]bool - _, _, _ = yysep2322, yyq2322, yy2arr2322 - const yyr2322 bool = false - var yynn2322 int - if yyr2322 || yy2arr2322 { + yysep2415 := !z.EncBinary() + yy2arr2415 := z.EncBasicHandle().StructToArray + var yyq2415 [1]bool + _, _, _ = yysep2415, yyq2415, yy2arr2415 + const yyr2415 bool = false + var yynn2415 int + if yyr2415 || yy2arr2415 { r.EncodeArrayStart(1) } else { - yynn2322 = 1 - for _, b := range yyq2322 { + yynn2415 = 1 + for _, b := range yyq2415 { if b { - yynn2322++ + yynn2415++ } } - r.EncodeMapStart(yynn2322) - yynn2322 = 0 + r.EncodeMapStart(yynn2415) + yynn2415 = 0 } - if yyr2322 || yy2arr2322 { + if yyr2415 || yy2arr2415 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2324 := z.EncBinary() - _ = yym2324 + yym2417 := z.EncBinary() + _ = yym2417 if false { } else { r.EncodeInt(int64(x.Port)) @@ -29841,14 +31167,14 @@ func (x *DaemonEndpoint) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Port")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2325 := z.EncBinary() - _ = yym2325 + yym2418 := z.EncBinary() + _ = yym2418 if false { } else { r.EncodeInt(int64(x.Port)) } } - if yyr2322 || yy2arr2322 { + if yyr2415 || yy2arr2415 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -29861,25 +31187,25 @@ func (x *DaemonEndpoint) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2326 := z.DecBinary() - _ = yym2326 + yym2419 := z.DecBinary() + _ = yym2419 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2327 := r.ContainerType() - if yyct2327 == codecSelferValueTypeMap1234 { - yyl2327 := r.ReadMapStart() - if yyl2327 == 0 { + yyct2420 := r.ContainerType() + if yyct2420 == codecSelferValueTypeMap1234 { + yyl2420 := r.ReadMapStart() + if yyl2420 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2327, d) + x.codecDecodeSelfFromMap(yyl2420, d) } - } else if yyct2327 == codecSelferValueTypeArray1234 { - yyl2327 := r.ReadArrayStart() - if yyl2327 == 0 { + } else if yyct2420 == codecSelferValueTypeArray1234 { + yyl2420 := r.ReadArrayStart() + if yyl2420 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2327, d) + x.codecDecodeSelfFromArray(yyl2420, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -29891,12 +31217,12 @@ func (x *DaemonEndpoint) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2328Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2328Slc - var yyhl2328 bool = l >= 0 - for yyj2328 := 0; ; yyj2328++ { - if yyhl2328 { - if yyj2328 >= l { + var yys2421Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2421Slc + var yyhl2421 bool = l >= 0 + for yyj2421 := 0; ; yyj2421++ { + if yyhl2421 { + if yyj2421 >= l { break } } else { @@ -29905,10 +31231,10 @@ func (x *DaemonEndpoint) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2328Slc = r.DecodeBytes(yys2328Slc, true, true) - yys2328 := string(yys2328Slc) + yys2421Slc = r.DecodeBytes(yys2421Slc, true, true) + yys2421 := string(yys2421Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2328 { + switch yys2421 { case "Port": if r.TryDecodeAsNil() { x.Port = 0 @@ -29916,9 +31242,9 @@ func (x *DaemonEndpoint) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Port = int(r.DecodeInt(codecSelferBitsize1234)) } default: - z.DecStructFieldNotFound(-1, yys2328) - } // end switch yys2328 - } // end for yyj2328 + z.DecStructFieldNotFound(-1, yys2421) + } // end switch yys2421 + } // end for yyj2421 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -29926,16 +31252,16 @@ func (x *DaemonEndpoint) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2330 int - var yyb2330 bool - var yyhl2330 bool = l >= 0 - yyj2330++ - if yyhl2330 { - yyb2330 = yyj2330 > l + var yyj2423 int + var yyb2423 bool + var yyhl2423 bool = l >= 0 + yyj2423++ + if yyhl2423 { + yyb2423 = yyj2423 > l } else { - yyb2330 = r.CheckBreak() + yyb2423 = r.CheckBreak() } - if yyb2330 { + if yyb2423 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29946,17 +31272,17 @@ func (x *DaemonEndpoint) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Port = int(r.DecodeInt(codecSelferBitsize1234)) } for { - yyj2330++ - if yyhl2330 { - yyb2330 = yyj2330 > l + yyj2423++ + if yyhl2423 { + yyb2423 = yyj2423 > l } else { - yyb2330 = r.CheckBreak() + yyb2423 = r.CheckBreak() } - if yyb2330 { + if yyb2423 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2330-1, "") + z.DecStructFieldNotFound(yyj2423-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -29968,48 +31294,48 @@ func (x *NodeDaemonEndpoints) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2332 := z.EncBinary() - _ = yym2332 + yym2425 := z.EncBinary() + _ = yym2425 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2333 := !z.EncBinary() - yy2arr2333 := z.EncBasicHandle().StructToArray - var yyq2333 [1]bool - _, _, _ = yysep2333, yyq2333, yy2arr2333 - const yyr2333 bool = false - yyq2333[0] = true - var yynn2333 int - if yyr2333 || yy2arr2333 { + yysep2426 := !z.EncBinary() + yy2arr2426 := z.EncBasicHandle().StructToArray + var yyq2426 [1]bool + _, _, _ = yysep2426, yyq2426, yy2arr2426 + const yyr2426 bool = false + yyq2426[0] = true + var yynn2426 int + if yyr2426 || yy2arr2426 { r.EncodeArrayStart(1) } else { - yynn2333 = 0 - for _, b := range yyq2333 { + yynn2426 = 0 + for _, b := range yyq2426 { if b { - yynn2333++ + yynn2426++ } } - r.EncodeMapStart(yynn2333) - yynn2333 = 0 + r.EncodeMapStart(yynn2426) + yynn2426 = 0 } - if yyr2333 || yy2arr2333 { + if yyr2426 || yy2arr2426 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2333[0] { - yy2335 := &x.KubeletEndpoint - yy2335.CodecEncodeSelf(e) + if yyq2426[0] { + yy2428 := &x.KubeletEndpoint + yy2428.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2333[0] { + if yyq2426[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeletEndpoint")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2336 := &x.KubeletEndpoint - yy2336.CodecEncodeSelf(e) + yy2429 := &x.KubeletEndpoint + yy2429.CodecEncodeSelf(e) } } - if yyr2333 || yy2arr2333 { + if yyr2426 || yy2arr2426 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -30022,25 +31348,25 @@ func (x *NodeDaemonEndpoints) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2337 := z.DecBinary() - _ = yym2337 + yym2430 := z.DecBinary() + _ = yym2430 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2338 := r.ContainerType() - if yyct2338 == codecSelferValueTypeMap1234 { - yyl2338 := r.ReadMapStart() - if yyl2338 == 0 { + yyct2431 := r.ContainerType() + if yyct2431 == codecSelferValueTypeMap1234 { + yyl2431 := r.ReadMapStart() + if yyl2431 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2338, d) + x.codecDecodeSelfFromMap(yyl2431, d) } - } else if yyct2338 == codecSelferValueTypeArray1234 { - yyl2338 := r.ReadArrayStart() - if yyl2338 == 0 { + } else if yyct2431 == codecSelferValueTypeArray1234 { + yyl2431 := r.ReadArrayStart() + if yyl2431 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2338, d) + x.codecDecodeSelfFromArray(yyl2431, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -30052,12 +31378,12 @@ func (x *NodeDaemonEndpoints) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2339Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2339Slc - var yyhl2339 bool = l >= 0 - for yyj2339 := 0; ; yyj2339++ { - if yyhl2339 { - if yyj2339 >= l { + var yys2432Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2432Slc + var yyhl2432 bool = l >= 0 + for yyj2432 := 0; ; yyj2432++ { + if yyhl2432 { + if yyj2432 >= l { break } } else { @@ -30066,21 +31392,21 @@ func (x *NodeDaemonEndpoints) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2339Slc = r.DecodeBytes(yys2339Slc, true, true) - yys2339 := string(yys2339Slc) + yys2432Slc = r.DecodeBytes(yys2432Slc, true, true) + yys2432 := string(yys2432Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2339 { + switch yys2432 { case "kubeletEndpoint": if r.TryDecodeAsNil() { x.KubeletEndpoint = DaemonEndpoint{} } else { - yyv2340 := &x.KubeletEndpoint - yyv2340.CodecDecodeSelf(d) + yyv2433 := &x.KubeletEndpoint + yyv2433.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2339) - } // end switch yys2339 - } // end for yyj2339 + z.DecStructFieldNotFound(-1, yys2432) + } // end switch yys2432 + } // end for yyj2432 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -30088,16 +31414,16 @@ func (x *NodeDaemonEndpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2341 int - var yyb2341 bool - var yyhl2341 bool = l >= 0 - yyj2341++ - if yyhl2341 { - yyb2341 = yyj2341 > l + var yyj2434 int + var yyb2434 bool + var yyhl2434 bool = l >= 0 + yyj2434++ + if yyhl2434 { + yyb2434 = yyj2434 > l } else { - yyb2341 = r.CheckBreak() + yyb2434 = r.CheckBreak() } - if yyb2341 { + if yyb2434 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30105,21 +31431,21 @@ func (x *NodeDaemonEndpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.KubeletEndpoint = DaemonEndpoint{} } else { - yyv2342 := &x.KubeletEndpoint - yyv2342.CodecDecodeSelf(d) + yyv2435 := &x.KubeletEndpoint + yyv2435.CodecDecodeSelf(d) } for { - yyj2341++ - if yyhl2341 { - yyb2341 = yyj2341 > l + yyj2434++ + if yyhl2434 { + yyb2434 = yyj2434 > l } else { - yyb2341 = r.CheckBreak() + yyb2434 = r.CheckBreak() } - if yyb2341 { + if yyb2434 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2341-1, "") + z.DecStructFieldNotFound(yyj2434-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -30131,33 +31457,33 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2343 := z.EncBinary() - _ = yym2343 + yym2436 := z.EncBinary() + _ = yym2436 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2344 := !z.EncBinary() - yy2arr2344 := z.EncBasicHandle().StructToArray - var yyq2344 [8]bool - _, _, _ = yysep2344, yyq2344, yy2arr2344 - const yyr2344 bool = false - var yynn2344 int - if yyr2344 || yy2arr2344 { + yysep2437 := !z.EncBinary() + yy2arr2437 := z.EncBasicHandle().StructToArray + var yyq2437 [8]bool + _, _, _ = yysep2437, yyq2437, yy2arr2437 + const yyr2437 bool = false + var yynn2437 int + if yyr2437 || yy2arr2437 { r.EncodeArrayStart(8) } else { - yynn2344 = 8 - for _, b := range yyq2344 { + yynn2437 = 8 + for _, b := range yyq2437 { if b { - yynn2344++ + yynn2437++ } } - r.EncodeMapStart(yynn2344) - yynn2344 = 0 + r.EncodeMapStart(yynn2437) + yynn2437 = 0 } - if yyr2344 || yy2arr2344 { + if yyr2437 || yy2arr2437 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2346 := z.EncBinary() - _ = yym2346 + yym2439 := z.EncBinary() + _ = yym2439 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.MachineID)) @@ -30166,17 +31492,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("machineID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2347 := z.EncBinary() - _ = yym2347 + yym2440 := z.EncBinary() + _ = yym2440 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.MachineID)) } } - if yyr2344 || yy2arr2344 { + if yyr2437 || yy2arr2437 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2349 := z.EncBinary() - _ = yym2349 + yym2442 := z.EncBinary() + _ = yym2442 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.SystemUUID)) @@ -30185,17 +31511,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("systemUUID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2350 := z.EncBinary() - _ = yym2350 + yym2443 := z.EncBinary() + _ = yym2443 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.SystemUUID)) } } - if yyr2344 || yy2arr2344 { + if yyr2437 || yy2arr2437 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2352 := z.EncBinary() - _ = yym2352 + yym2445 := z.EncBinary() + _ = yym2445 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.BootID)) @@ -30204,17 +31530,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("bootID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2353 := z.EncBinary() - _ = yym2353 + yym2446 := z.EncBinary() + _ = yym2446 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.BootID)) } } - if yyr2344 || yy2arr2344 { + if yyr2437 || yy2arr2437 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2355 := z.EncBinary() - _ = yym2355 + yym2448 := z.EncBinary() + _ = yym2448 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KernelVersion)) @@ -30223,17 +31549,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kernelVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2356 := z.EncBinary() - _ = yym2356 + yym2449 := z.EncBinary() + _ = yym2449 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KernelVersion)) } } - if yyr2344 || yy2arr2344 { + if yyr2437 || yy2arr2437 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2358 := z.EncBinary() - _ = yym2358 + yym2451 := z.EncBinary() + _ = yym2451 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.OSImage)) @@ -30242,17 +31568,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("osImage")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2359 := z.EncBinary() - _ = yym2359 + yym2452 := z.EncBinary() + _ = yym2452 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.OSImage)) } } - if yyr2344 || yy2arr2344 { + if yyr2437 || yy2arr2437 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2361 := z.EncBinary() - _ = yym2361 + yym2454 := z.EncBinary() + _ = yym2454 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContainerRuntimeVersion)) @@ -30261,17 +31587,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("containerRuntimeVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2362 := z.EncBinary() - _ = yym2362 + yym2455 := z.EncBinary() + _ = yym2455 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContainerRuntimeVersion)) } } - if yyr2344 || yy2arr2344 { + if yyr2437 || yy2arr2437 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2364 := z.EncBinary() - _ = yym2364 + yym2457 := z.EncBinary() + _ = yym2457 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KubeletVersion)) @@ -30280,17 +31606,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeletVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2365 := z.EncBinary() - _ = yym2365 + yym2458 := z.EncBinary() + _ = yym2458 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KubeletVersion)) } } - if yyr2344 || yy2arr2344 { + if yyr2437 || yy2arr2437 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2367 := z.EncBinary() - _ = yym2367 + yym2460 := z.EncBinary() + _ = yym2460 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KubeProxyVersion)) @@ -30299,14 +31625,14 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeProxyVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2368 := z.EncBinary() - _ = yym2368 + yym2461 := z.EncBinary() + _ = yym2461 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KubeProxyVersion)) } } - if yyr2344 || yy2arr2344 { + if yyr2437 || yy2arr2437 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -30319,25 +31645,25 @@ func (x *NodeSystemInfo) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2369 := z.DecBinary() - _ = yym2369 + yym2462 := z.DecBinary() + _ = yym2462 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2370 := r.ContainerType() - if yyct2370 == codecSelferValueTypeMap1234 { - yyl2370 := r.ReadMapStart() - if yyl2370 == 0 { + yyct2463 := r.ContainerType() + if yyct2463 == codecSelferValueTypeMap1234 { + yyl2463 := r.ReadMapStart() + if yyl2463 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2370, d) + x.codecDecodeSelfFromMap(yyl2463, d) } - } else if yyct2370 == codecSelferValueTypeArray1234 { - yyl2370 := r.ReadArrayStart() - if yyl2370 == 0 { + } else if yyct2463 == codecSelferValueTypeArray1234 { + yyl2463 := r.ReadArrayStart() + if yyl2463 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2370, d) + x.codecDecodeSelfFromArray(yyl2463, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -30349,12 +31675,12 @@ func (x *NodeSystemInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2371Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2371Slc - var yyhl2371 bool = l >= 0 - for yyj2371 := 0; ; yyj2371++ { - if yyhl2371 { - if yyj2371 >= l { + var yys2464Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2464Slc + var yyhl2464 bool = l >= 0 + for yyj2464 := 0; ; yyj2464++ { + if yyhl2464 { + if yyj2464 >= l { break } } else { @@ -30363,10 +31689,10 @@ func (x *NodeSystemInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2371Slc = r.DecodeBytes(yys2371Slc, true, true) - yys2371 := string(yys2371Slc) + yys2464Slc = r.DecodeBytes(yys2464Slc, true, true) + yys2464 := string(yys2464Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2371 { + switch yys2464 { case "machineID": if r.TryDecodeAsNil() { x.MachineID = "" @@ -30416,9 +31742,9 @@ func (x *NodeSystemInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.KubeProxyVersion = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys2371) - } // end switch yys2371 - } // end for yyj2371 + z.DecStructFieldNotFound(-1, yys2464) + } // end switch yys2464 + } // end for yyj2464 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -30426,16 +31752,16 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2380 int - var yyb2380 bool - var yyhl2380 bool = l >= 0 - yyj2380++ - if yyhl2380 { - yyb2380 = yyj2380 > l + var yyj2473 int + var yyb2473 bool + var yyhl2473 bool = l >= 0 + yyj2473++ + if yyhl2473 { + yyb2473 = yyj2473 > l } else { - yyb2380 = r.CheckBreak() + yyb2473 = r.CheckBreak() } - if yyb2380 { + if yyb2473 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30445,13 +31771,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.MachineID = string(r.DecodeString()) } - yyj2380++ - if yyhl2380 { - yyb2380 = yyj2380 > l + yyj2473++ + if yyhl2473 { + yyb2473 = yyj2473 > l } else { - yyb2380 = r.CheckBreak() + yyb2473 = r.CheckBreak() } - if yyb2380 { + if yyb2473 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30461,13 +31787,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.SystemUUID = string(r.DecodeString()) } - yyj2380++ - if yyhl2380 { - yyb2380 = yyj2380 > l + yyj2473++ + if yyhl2473 { + yyb2473 = yyj2473 > l } else { - yyb2380 = r.CheckBreak() + yyb2473 = r.CheckBreak() } - if yyb2380 { + if yyb2473 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30477,13 +31803,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.BootID = string(r.DecodeString()) } - yyj2380++ - if yyhl2380 { - yyb2380 = yyj2380 > l + yyj2473++ + if yyhl2473 { + yyb2473 = yyj2473 > l } else { - yyb2380 = r.CheckBreak() + yyb2473 = r.CheckBreak() } - if yyb2380 { + if yyb2473 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30493,13 +31819,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.KernelVersion = string(r.DecodeString()) } - yyj2380++ - if yyhl2380 { - yyb2380 = yyj2380 > l + yyj2473++ + if yyhl2473 { + yyb2473 = yyj2473 > l } else { - yyb2380 = r.CheckBreak() + yyb2473 = r.CheckBreak() } - if yyb2380 { + if yyb2473 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30509,13 +31835,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.OSImage = string(r.DecodeString()) } - yyj2380++ - if yyhl2380 { - yyb2380 = yyj2380 > l + yyj2473++ + if yyhl2473 { + yyb2473 = yyj2473 > l } else { - yyb2380 = r.CheckBreak() + yyb2473 = r.CheckBreak() } - if yyb2380 { + if yyb2473 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30525,13 +31851,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.ContainerRuntimeVersion = string(r.DecodeString()) } - yyj2380++ - if yyhl2380 { - yyb2380 = yyj2380 > l + yyj2473++ + if yyhl2473 { + yyb2473 = yyj2473 > l } else { - yyb2380 = r.CheckBreak() + yyb2473 = r.CheckBreak() } - if yyb2380 { + if yyb2473 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30541,13 +31867,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.KubeletVersion = string(r.DecodeString()) } - yyj2380++ - if yyhl2380 { - yyb2380 = yyj2380 > l + yyj2473++ + if yyhl2473 { + yyb2473 = yyj2473 > l } else { - yyb2380 = r.CheckBreak() + yyb2473 = r.CheckBreak() } - if yyb2380 { + if yyb2473 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30558,17 +31884,17 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.KubeProxyVersion = string(r.DecodeString()) } for { - yyj2380++ - if yyhl2380 { - yyb2380 = yyj2380 > l + yyj2473++ + if yyhl2473 { + yyb2473 = yyj2473 > l } else { - yyb2380 = r.CheckBreak() + yyb2473 = r.CheckBreak() } - if yyb2380 { + if yyb2473 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2380-1, "") + z.DecStructFieldNotFound(yyj2473-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -30580,39 +31906,39 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2389 := z.EncBinary() - _ = yym2389 + yym2482 := z.EncBinary() + _ = yym2482 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2390 := !z.EncBinary() - yy2arr2390 := z.EncBasicHandle().StructToArray - var yyq2390 [8]bool - _, _, _ = yysep2390, yyq2390, yy2arr2390 - const yyr2390 bool = false - yyq2390[0] = len(x.Capacity) != 0 - yyq2390[1] = len(x.Allocatable) != 0 - yyq2390[2] = x.Phase != "" - yyq2390[3] = len(x.Conditions) != 0 - yyq2390[4] = len(x.Addresses) != 0 - yyq2390[5] = true - yyq2390[6] = true - var yynn2390 int - if yyr2390 || yy2arr2390 { + yysep2483 := !z.EncBinary() + yy2arr2483 := z.EncBasicHandle().StructToArray + var yyq2483 [8]bool + _, _, _ = yysep2483, yyq2483, yy2arr2483 + const yyr2483 bool = false + yyq2483[0] = len(x.Capacity) != 0 + yyq2483[1] = len(x.Allocatable) != 0 + yyq2483[2] = x.Phase != "" + yyq2483[3] = len(x.Conditions) != 0 + yyq2483[4] = len(x.Addresses) != 0 + yyq2483[5] = true + yyq2483[6] = true + var yynn2483 int + if yyr2483 || yy2arr2483 { r.EncodeArrayStart(8) } else { - yynn2390 = 1 - for _, b := range yyq2390 { + yynn2483 = 1 + for _, b := range yyq2483 { if b { - yynn2390++ + yynn2483++ } } - r.EncodeMapStart(yynn2390) - yynn2390 = 0 + r.EncodeMapStart(yynn2483) + yynn2483 = 0 } - if yyr2390 || yy2arr2390 { + if yyr2483 || yy2arr2483 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2390[0] { + if yyq2483[0] { if x.Capacity == nil { r.EncodeNil() } else { @@ -30622,7 +31948,7 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2390[0] { + if yyq2483[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("capacity")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -30633,9 +31959,9 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2390 || yy2arr2390 { + if yyr2483 || yy2arr2483 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2390[1] { + if yyq2483[1] { if x.Allocatable == nil { r.EncodeNil() } else { @@ -30645,7 +31971,7 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2390[1] { + if yyq2483[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("allocatable")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -30656,29 +31982,29 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2390 || yy2arr2390 { + if yyr2483 || yy2arr2483 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2390[2] { + if yyq2483[2] { x.Phase.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2390[2] { + if yyq2483[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("phase")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Phase.CodecEncodeSelf(e) } } - if yyr2390 || yy2arr2390 { + if yyr2483 || yy2arr2483 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2390[3] { + if yyq2483[3] { if x.Conditions == nil { r.EncodeNil() } else { - yym2395 := z.EncBinary() - _ = yym2395 + yym2488 := z.EncBinary() + _ = yym2488 if false { } else { h.encSliceNodeCondition(([]NodeCondition)(x.Conditions), e) @@ -30688,15 +32014,15 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2390[3] { + if yyq2483[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("conditions")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Conditions == nil { r.EncodeNil() } else { - yym2396 := z.EncBinary() - _ = yym2396 + yym2489 := z.EncBinary() + _ = yym2489 if false { } else { h.encSliceNodeCondition(([]NodeCondition)(x.Conditions), e) @@ -30704,14 +32030,14 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2390 || yy2arr2390 { + if yyr2483 || yy2arr2483 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2390[4] { + if yyq2483[4] { if x.Addresses == nil { r.EncodeNil() } else { - yym2398 := z.EncBinary() - _ = yym2398 + yym2491 := z.EncBinary() + _ = yym2491 if false { } else { h.encSliceNodeAddress(([]NodeAddress)(x.Addresses), e) @@ -30721,15 +32047,15 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2390[4] { + if yyq2483[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("addresses")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Addresses == nil { r.EncodeNil() } else { - yym2399 := z.EncBinary() - _ = yym2399 + yym2492 := z.EncBinary() + _ = yym2492 if false { } else { h.encSliceNodeAddress(([]NodeAddress)(x.Addresses), e) @@ -30737,47 +32063,47 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2390 || yy2arr2390 { + if yyr2483 || yy2arr2483 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2390[5] { - yy2401 := &x.DaemonEndpoints - yy2401.CodecEncodeSelf(e) + if yyq2483[5] { + yy2494 := &x.DaemonEndpoints + yy2494.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2390[5] { + if yyq2483[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("daemonEndpoints")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2402 := &x.DaemonEndpoints - yy2402.CodecEncodeSelf(e) + yy2495 := &x.DaemonEndpoints + yy2495.CodecEncodeSelf(e) } } - if yyr2390 || yy2arr2390 { + if yyr2483 || yy2arr2483 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2390[6] { - yy2404 := &x.NodeInfo - yy2404.CodecEncodeSelf(e) + if yyq2483[6] { + yy2497 := &x.NodeInfo + yy2497.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2390[6] { + if yyq2483[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nodeInfo")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2405 := &x.NodeInfo - yy2405.CodecEncodeSelf(e) + yy2498 := &x.NodeInfo + yy2498.CodecEncodeSelf(e) } } - if yyr2390 || yy2arr2390 { + if yyr2483 || yy2arr2483 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Images == nil { r.EncodeNil() } else { - yym2407 := z.EncBinary() - _ = yym2407 + yym2500 := z.EncBinary() + _ = yym2500 if false { } else { h.encSliceContainerImage(([]ContainerImage)(x.Images), e) @@ -30790,15 +32116,15 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x.Images == nil { r.EncodeNil() } else { - yym2408 := z.EncBinary() - _ = yym2408 + yym2501 := z.EncBinary() + _ = yym2501 if false { } else { h.encSliceContainerImage(([]ContainerImage)(x.Images), e) } } } - if yyr2390 || yy2arr2390 { + if yyr2483 || yy2arr2483 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -30811,25 +32137,25 @@ func (x *NodeStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2409 := z.DecBinary() - _ = yym2409 + yym2502 := z.DecBinary() + _ = yym2502 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2410 := r.ContainerType() - if yyct2410 == codecSelferValueTypeMap1234 { - yyl2410 := r.ReadMapStart() - if yyl2410 == 0 { + yyct2503 := r.ContainerType() + if yyct2503 == codecSelferValueTypeMap1234 { + yyl2503 := r.ReadMapStart() + if yyl2503 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2410, d) + x.codecDecodeSelfFromMap(yyl2503, d) } - } else if yyct2410 == codecSelferValueTypeArray1234 { - yyl2410 := r.ReadArrayStart() - if yyl2410 == 0 { + } else if yyct2503 == codecSelferValueTypeArray1234 { + yyl2503 := r.ReadArrayStart() + if yyl2503 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2410, d) + x.codecDecodeSelfFromArray(yyl2503, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -30841,12 +32167,12 @@ func (x *NodeStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2411Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2411Slc - var yyhl2411 bool = l >= 0 - for yyj2411 := 0; ; yyj2411++ { - if yyhl2411 { - if yyj2411 >= l { + var yys2504Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2504Slc + var yyhl2504 bool = l >= 0 + for yyj2504 := 0; ; yyj2504++ { + if yyhl2504 { + if yyj2504 >= l { break } } else { @@ -30855,23 +32181,23 @@ func (x *NodeStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2411Slc = r.DecodeBytes(yys2411Slc, true, true) - yys2411 := string(yys2411Slc) + yys2504Slc = r.DecodeBytes(yys2504Slc, true, true) + yys2504 := string(yys2504Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2411 { + switch yys2504 { case "capacity": if r.TryDecodeAsNil() { x.Capacity = nil } else { - yyv2412 := &x.Capacity - yyv2412.CodecDecodeSelf(d) + yyv2505 := &x.Capacity + yyv2505.CodecDecodeSelf(d) } case "allocatable": if r.TryDecodeAsNil() { x.Allocatable = nil } else { - yyv2413 := &x.Allocatable - yyv2413.CodecDecodeSelf(d) + yyv2506 := &x.Allocatable + yyv2506.CodecDecodeSelf(d) } case "phase": if r.TryDecodeAsNil() { @@ -30883,56 +32209,56 @@ func (x *NodeStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv2415 := &x.Conditions - yym2416 := z.DecBinary() - _ = yym2416 + yyv2508 := &x.Conditions + yym2509 := z.DecBinary() + _ = yym2509 if false { } else { - h.decSliceNodeCondition((*[]NodeCondition)(yyv2415), d) + h.decSliceNodeCondition((*[]NodeCondition)(yyv2508), d) } } case "addresses": if r.TryDecodeAsNil() { x.Addresses = nil } else { - yyv2417 := &x.Addresses - yym2418 := z.DecBinary() - _ = yym2418 + yyv2510 := &x.Addresses + yym2511 := z.DecBinary() + _ = yym2511 if false { } else { - h.decSliceNodeAddress((*[]NodeAddress)(yyv2417), d) + h.decSliceNodeAddress((*[]NodeAddress)(yyv2510), d) } } case "daemonEndpoints": if r.TryDecodeAsNil() { x.DaemonEndpoints = NodeDaemonEndpoints{} } else { - yyv2419 := &x.DaemonEndpoints - yyv2419.CodecDecodeSelf(d) + yyv2512 := &x.DaemonEndpoints + yyv2512.CodecDecodeSelf(d) } case "nodeInfo": if r.TryDecodeAsNil() { x.NodeInfo = NodeSystemInfo{} } else { - yyv2420 := &x.NodeInfo - yyv2420.CodecDecodeSelf(d) + yyv2513 := &x.NodeInfo + yyv2513.CodecDecodeSelf(d) } case "images": if r.TryDecodeAsNil() { x.Images = nil } else { - yyv2421 := &x.Images - yym2422 := z.DecBinary() - _ = yym2422 + yyv2514 := &x.Images + yym2515 := z.DecBinary() + _ = yym2515 if false { } else { - h.decSliceContainerImage((*[]ContainerImage)(yyv2421), d) + h.decSliceContainerImage((*[]ContainerImage)(yyv2514), d) } } default: - z.DecStructFieldNotFound(-1, yys2411) - } // end switch yys2411 - } // end for yyj2411 + z.DecStructFieldNotFound(-1, yys2504) + } // end switch yys2504 + } // end for yyj2504 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -30940,16 +32266,16 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2423 int - var yyb2423 bool - var yyhl2423 bool = l >= 0 - yyj2423++ - if yyhl2423 { - yyb2423 = yyj2423 > l + var yyj2516 int + var yyb2516 bool + var yyhl2516 bool = l >= 0 + yyj2516++ + if yyhl2516 { + yyb2516 = yyj2516 > l } else { - yyb2423 = r.CheckBreak() + yyb2516 = r.CheckBreak() } - if yyb2423 { + if yyb2516 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30957,16 +32283,16 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Capacity = nil } else { - yyv2424 := &x.Capacity - yyv2424.CodecDecodeSelf(d) + yyv2517 := &x.Capacity + yyv2517.CodecDecodeSelf(d) } - yyj2423++ - if yyhl2423 { - yyb2423 = yyj2423 > l + yyj2516++ + if yyhl2516 { + yyb2516 = yyj2516 > l } else { - yyb2423 = r.CheckBreak() + yyb2516 = r.CheckBreak() } - if yyb2423 { + if yyb2516 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30974,16 +32300,16 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Allocatable = nil } else { - yyv2425 := &x.Allocatable - yyv2425.CodecDecodeSelf(d) + yyv2518 := &x.Allocatable + yyv2518.CodecDecodeSelf(d) } - yyj2423++ - if yyhl2423 { - yyb2423 = yyj2423 > l + yyj2516++ + if yyhl2516 { + yyb2516 = yyj2516 > l } else { - yyb2423 = r.CheckBreak() + yyb2516 = r.CheckBreak() } - if yyb2423 { + if yyb2516 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30993,13 +32319,13 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Phase = NodePhase(r.DecodeString()) } - yyj2423++ - if yyhl2423 { - yyb2423 = yyj2423 > l + yyj2516++ + if yyhl2516 { + yyb2516 = yyj2516 > l } else { - yyb2423 = r.CheckBreak() + yyb2516 = r.CheckBreak() } - if yyb2423 { + if yyb2516 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -31007,21 +32333,21 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv2427 := &x.Conditions - yym2428 := z.DecBinary() - _ = yym2428 + yyv2520 := &x.Conditions + yym2521 := z.DecBinary() + _ = yym2521 if false { } else { - h.decSliceNodeCondition((*[]NodeCondition)(yyv2427), d) + h.decSliceNodeCondition((*[]NodeCondition)(yyv2520), d) } } - yyj2423++ - if yyhl2423 { - yyb2423 = yyj2423 > l + yyj2516++ + if yyhl2516 { + yyb2516 = yyj2516 > l } else { - yyb2423 = r.CheckBreak() + yyb2516 = r.CheckBreak() } - if yyb2423 { + if yyb2516 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -31029,21 +32355,21 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Addresses = nil } else { - yyv2429 := &x.Addresses - yym2430 := z.DecBinary() - _ = yym2430 + yyv2522 := &x.Addresses + yym2523 := z.DecBinary() + _ = yym2523 if false { } else { - h.decSliceNodeAddress((*[]NodeAddress)(yyv2429), d) + h.decSliceNodeAddress((*[]NodeAddress)(yyv2522), d) } } - yyj2423++ - if yyhl2423 { - yyb2423 = yyj2423 > l + yyj2516++ + if yyhl2516 { + yyb2516 = yyj2516 > l } else { - yyb2423 = r.CheckBreak() + yyb2516 = r.CheckBreak() } - if yyb2423 { + if yyb2516 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -31051,16 +32377,16 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.DaemonEndpoints = NodeDaemonEndpoints{} } else { - yyv2431 := &x.DaemonEndpoints - yyv2431.CodecDecodeSelf(d) + yyv2524 := &x.DaemonEndpoints + yyv2524.CodecDecodeSelf(d) } - yyj2423++ - if yyhl2423 { - yyb2423 = yyj2423 > l + yyj2516++ + if yyhl2516 { + yyb2516 = yyj2516 > l } else { - yyb2423 = r.CheckBreak() + yyb2516 = r.CheckBreak() } - if yyb2423 { + if yyb2516 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -31068,16 +32394,16 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.NodeInfo = NodeSystemInfo{} } else { - yyv2432 := &x.NodeInfo - yyv2432.CodecDecodeSelf(d) + yyv2525 := &x.NodeInfo + yyv2525.CodecDecodeSelf(d) } - yyj2423++ - if yyhl2423 { - yyb2423 = yyj2423 > l + yyj2516++ + if yyhl2516 { + yyb2516 = yyj2516 > l } else { - yyb2423 = r.CheckBreak() + yyb2516 = r.CheckBreak() } - if yyb2423 { + if yyb2516 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -31085,26 +32411,26 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Images = nil } else { - yyv2433 := &x.Images - yym2434 := z.DecBinary() - _ = yym2434 + yyv2526 := &x.Images + yym2527 := z.DecBinary() + _ = yym2527 if false { } else { - h.decSliceContainerImage((*[]ContainerImage)(yyv2433), d) + h.decSliceContainerImage((*[]ContainerImage)(yyv2526), d) } } for { - yyj2423++ - if yyhl2423 { - yyb2423 = yyj2423 > l + yyj2516++ + if yyhl2516 { + yyb2516 = yyj2516 > l } else { - yyb2423 = r.CheckBreak() + yyb2516 = r.CheckBreak() } - if yyb2423 { + if yyb2516 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2423-1, "") + z.DecStructFieldNotFound(yyj2516-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -31116,37 +32442,37 @@ func (x *ContainerImage) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2435 := z.EncBinary() - _ = yym2435 + yym2528 := z.EncBinary() + _ = yym2528 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2436 := !z.EncBinary() - yy2arr2436 := z.EncBasicHandle().StructToArray - var yyq2436 [2]bool - _, _, _ = yysep2436, yyq2436, yy2arr2436 - const yyr2436 bool = false - yyq2436[1] = x.Size != 0 - var yynn2436 int - if yyr2436 || yy2arr2436 { + yysep2529 := !z.EncBinary() + yy2arr2529 := z.EncBasicHandle().StructToArray + var yyq2529 [2]bool + _, _, _ = yysep2529, yyq2529, yy2arr2529 + const yyr2529 bool = false + yyq2529[1] = x.Size != 0 + var yynn2529 int + if yyr2529 || yy2arr2529 { r.EncodeArrayStart(2) } else { - yynn2436 = 1 - for _, b := range yyq2436 { + yynn2529 = 1 + for _, b := range yyq2529 { if b { - yynn2436++ + yynn2529++ } } - r.EncodeMapStart(yynn2436) - yynn2436 = 0 + r.EncodeMapStart(yynn2529) + yynn2529 = 0 } - if yyr2436 || yy2arr2436 { + if yyr2529 || yy2arr2529 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.RepoTags == nil { r.EncodeNil() } else { - yym2438 := z.EncBinary() - _ = yym2438 + yym2531 := z.EncBinary() + _ = yym2531 if false { } else { z.F.EncSliceStringV(x.RepoTags, false, e) @@ -31159,19 +32485,19 @@ func (x *ContainerImage) CodecEncodeSelf(e *codec1978.Encoder) { if x.RepoTags == nil { r.EncodeNil() } else { - yym2439 := z.EncBinary() - _ = yym2439 + yym2532 := z.EncBinary() + _ = yym2532 if false { } else { z.F.EncSliceStringV(x.RepoTags, false, e) } } } - if yyr2436 || yy2arr2436 { + if yyr2529 || yy2arr2529 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2436[1] { - yym2441 := z.EncBinary() - _ = yym2441 + if yyq2529[1] { + yym2534 := z.EncBinary() + _ = yym2534 if false { } else { r.EncodeInt(int64(x.Size)) @@ -31180,19 +32506,19 @@ func (x *ContainerImage) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq2436[1] { + if yyq2529[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("size")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2442 := z.EncBinary() - _ = yym2442 + yym2535 := z.EncBinary() + _ = yym2535 if false { } else { r.EncodeInt(int64(x.Size)) } } } - if yyr2436 || yy2arr2436 { + if yyr2529 || yy2arr2529 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -31205,25 +32531,25 @@ func (x *ContainerImage) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2443 := z.DecBinary() - _ = yym2443 + yym2536 := z.DecBinary() + _ = yym2536 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2444 := r.ContainerType() - if yyct2444 == codecSelferValueTypeMap1234 { - yyl2444 := r.ReadMapStart() - if yyl2444 == 0 { + yyct2537 := r.ContainerType() + if yyct2537 == codecSelferValueTypeMap1234 { + yyl2537 := r.ReadMapStart() + if yyl2537 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2444, d) + x.codecDecodeSelfFromMap(yyl2537, d) } - } else if yyct2444 == codecSelferValueTypeArray1234 { - yyl2444 := r.ReadArrayStart() - if yyl2444 == 0 { + } else if yyct2537 == codecSelferValueTypeArray1234 { + yyl2537 := r.ReadArrayStart() + if yyl2537 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2444, d) + x.codecDecodeSelfFromArray(yyl2537, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -31235,12 +32561,12 @@ func (x *ContainerImage) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2445Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2445Slc - var yyhl2445 bool = l >= 0 - for yyj2445 := 0; ; yyj2445++ { - if yyhl2445 { - if yyj2445 >= l { + var yys2538Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2538Slc + var yyhl2538 bool = l >= 0 + for yyj2538 := 0; ; yyj2538++ { + if yyhl2538 { + if yyj2538 >= l { break } } else { @@ -31249,20 +32575,20 @@ func (x *ContainerImage) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2445Slc = r.DecodeBytes(yys2445Slc, true, true) - yys2445 := string(yys2445Slc) + yys2538Slc = r.DecodeBytes(yys2538Slc, true, true) + yys2538 := string(yys2538Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2445 { + switch yys2538 { case "repoTags": if r.TryDecodeAsNil() { x.RepoTags = nil } else { - yyv2446 := &x.RepoTags - yym2447 := z.DecBinary() - _ = yym2447 + yyv2539 := &x.RepoTags + yym2540 := z.DecBinary() + _ = yym2540 if false { } else { - z.F.DecSliceStringX(yyv2446, false, d) + z.F.DecSliceStringX(yyv2539, false, d) } } case "size": @@ -31272,9 +32598,9 @@ func (x *ContainerImage) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Size = int64(r.DecodeInt(64)) } default: - z.DecStructFieldNotFound(-1, yys2445) - } // end switch yys2445 - } // end for yyj2445 + z.DecStructFieldNotFound(-1, yys2538) + } // end switch yys2538 + } // end for yyj2538 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -31282,16 +32608,16 @@ func (x *ContainerImage) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2449 int - var yyb2449 bool - var yyhl2449 bool = l >= 0 - yyj2449++ - if yyhl2449 { - yyb2449 = yyj2449 > l + var yyj2542 int + var yyb2542 bool + var yyhl2542 bool = l >= 0 + yyj2542++ + if yyhl2542 { + yyb2542 = yyj2542 > l } else { - yyb2449 = r.CheckBreak() + yyb2542 = r.CheckBreak() } - if yyb2449 { + if yyb2542 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -31299,21 +32625,21 @@ func (x *ContainerImage) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.RepoTags = nil } else { - yyv2450 := &x.RepoTags - yym2451 := z.DecBinary() - _ = yym2451 + yyv2543 := &x.RepoTags + yym2544 := z.DecBinary() + _ = yym2544 if false { } else { - z.F.DecSliceStringX(yyv2450, false, d) + z.F.DecSliceStringX(yyv2543, false, d) } } - yyj2449++ - if yyhl2449 { - yyb2449 = yyj2449 > l + yyj2542++ + if yyhl2542 { + yyb2542 = yyj2542 > l } else { - yyb2449 = r.CheckBreak() + yyb2542 = r.CheckBreak() } - if yyb2449 { + if yyb2542 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -31324,17 +32650,17 @@ func (x *ContainerImage) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Size = int64(r.DecodeInt(64)) } for { - yyj2449++ - if yyhl2449 { - yyb2449 = yyj2449 > l + yyj2542++ + if yyhl2542 { + yyb2542 = yyj2542 > l } else { - yyb2449 = r.CheckBreak() + yyb2542 = r.CheckBreak() } - if yyb2449 { + if yyb2542 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2449-1, "") + z.DecStructFieldNotFound(yyj2542-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -31343,8 +32669,8 @@ func (x NodePhase) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym2453 := z.EncBinary() - _ = yym2453 + yym2546 := z.EncBinary() + _ = yym2546 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -31356,8 +32682,8 @@ func (x *NodePhase) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2454 := z.DecBinary() - _ = yym2454 + yym2547 := z.DecBinary() + _ = yym2547 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -31369,8 +32695,8 @@ func (x NodeConditionType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym2455 := z.EncBinary() - _ = yym2455 + yym2548 := z.EncBinary() + _ = yym2548 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -31382,8 +32708,8 @@ func (x *NodeConditionType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2456 := z.DecBinary() - _ = yym2456 + yym2549 := z.DecBinary() + _ = yym2549 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -31398,34 +32724,34 @@ func (x *NodeCondition) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2457 := z.EncBinary() - _ = yym2457 + yym2550 := z.EncBinary() + _ = yym2550 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2458 := !z.EncBinary() - yy2arr2458 := z.EncBasicHandle().StructToArray - var yyq2458 [6]bool - _, _, _ = yysep2458, yyq2458, yy2arr2458 - const yyr2458 bool = false - yyq2458[2] = true - yyq2458[3] = true - yyq2458[4] = x.Reason != "" - yyq2458[5] = x.Message != "" - var yynn2458 int - if yyr2458 || yy2arr2458 { + yysep2551 := !z.EncBinary() + yy2arr2551 := z.EncBasicHandle().StructToArray + var yyq2551 [6]bool + _, _, _ = yysep2551, yyq2551, yy2arr2551 + const yyr2551 bool = false + yyq2551[2] = true + yyq2551[3] = true + yyq2551[4] = x.Reason != "" + yyq2551[5] = x.Message != "" + var yynn2551 int + if yyr2551 || yy2arr2551 { r.EncodeArrayStart(6) } else { - yynn2458 = 2 - for _, b := range yyq2458 { + yynn2551 = 2 + for _, b := range yyq2551 { if b { - yynn2458++ + yynn2551++ } } - r.EncodeMapStart(yynn2458) - yynn2458 = 0 + r.EncodeMapStart(yynn2551) + yynn2551 = 0 } - if yyr2458 || yy2arr2458 { + if yyr2551 || yy2arr2551 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Type.CodecEncodeSelf(e) } else { @@ -31434,7 +32760,7 @@ func (x *NodeCondition) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } - if yyr2458 || yy2arr2458 { + if yyr2551 || yy2arr2551 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Status.CodecEncodeSelf(e) } else { @@ -31443,85 +32769,85 @@ func (x *NodeCondition) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Status.CodecEncodeSelf(e) } - if yyr2458 || yy2arr2458 { + if yyr2551 || yy2arr2551 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2458[2] { - yy2462 := &x.LastHeartbeatTime - yym2463 := z.EncBinary() - _ = yym2463 + if yyq2551[2] { + yy2555 := &x.LastHeartbeatTime + yym2556 := z.EncBinary() + _ = yym2556 if false { - } else if z.HasExtensions() && z.EncExt(yy2462) { - } else if yym2463 { - z.EncBinaryMarshal(yy2462) - } else if !yym2463 && z.IsJSONHandle() { - z.EncJSONMarshal(yy2462) + } else if z.HasExtensions() && z.EncExt(yy2555) { + } else if yym2556 { + z.EncBinaryMarshal(yy2555) + } else if !yym2556 && z.IsJSONHandle() { + z.EncJSONMarshal(yy2555) } else { - z.EncFallback(yy2462) + z.EncFallback(yy2555) } } else { r.EncodeNil() } } else { - if yyq2458[2] { + if yyq2551[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("lastHeartbeatTime")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2464 := &x.LastHeartbeatTime - yym2465 := z.EncBinary() - _ = yym2465 + yy2557 := &x.LastHeartbeatTime + yym2558 := z.EncBinary() + _ = yym2558 if false { - } else if z.HasExtensions() && z.EncExt(yy2464) { - } else if yym2465 { - z.EncBinaryMarshal(yy2464) - } else if !yym2465 && z.IsJSONHandle() { - z.EncJSONMarshal(yy2464) + } else if z.HasExtensions() && z.EncExt(yy2557) { + } else if yym2558 { + z.EncBinaryMarshal(yy2557) + } else if !yym2558 && z.IsJSONHandle() { + z.EncJSONMarshal(yy2557) } else { - z.EncFallback(yy2464) + z.EncFallback(yy2557) } } } - if yyr2458 || yy2arr2458 { + if yyr2551 || yy2arr2551 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2458[3] { - yy2467 := &x.LastTransitionTime - yym2468 := z.EncBinary() - _ = yym2468 + if yyq2551[3] { + yy2560 := &x.LastTransitionTime + yym2561 := z.EncBinary() + _ = yym2561 if false { - } else if z.HasExtensions() && z.EncExt(yy2467) { - } else if yym2468 { - z.EncBinaryMarshal(yy2467) - } else if !yym2468 && z.IsJSONHandle() { - z.EncJSONMarshal(yy2467) + } else if z.HasExtensions() && z.EncExt(yy2560) { + } else if yym2561 { + z.EncBinaryMarshal(yy2560) + } else if !yym2561 && z.IsJSONHandle() { + z.EncJSONMarshal(yy2560) } else { - z.EncFallback(yy2467) + z.EncFallback(yy2560) } } else { r.EncodeNil() } } else { - if yyq2458[3] { + if yyq2551[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2469 := &x.LastTransitionTime - yym2470 := z.EncBinary() - _ = yym2470 + yy2562 := &x.LastTransitionTime + yym2563 := z.EncBinary() + _ = yym2563 if false { - } else if z.HasExtensions() && z.EncExt(yy2469) { - } else if yym2470 { - z.EncBinaryMarshal(yy2469) - } else if !yym2470 && z.IsJSONHandle() { - z.EncJSONMarshal(yy2469) + } else if z.HasExtensions() && z.EncExt(yy2562) { + } else if yym2563 { + z.EncBinaryMarshal(yy2562) + } else if !yym2563 && z.IsJSONHandle() { + z.EncJSONMarshal(yy2562) } else { - z.EncFallback(yy2469) + z.EncFallback(yy2562) } } } - if yyr2458 || yy2arr2458 { + if yyr2551 || yy2arr2551 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2458[4] { - yym2472 := z.EncBinary() - _ = yym2472 + if yyq2551[4] { + yym2565 := z.EncBinary() + _ = yym2565 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) @@ -31530,23 +32856,23 @@ func (x *NodeCondition) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2458[4] { + if yyq2551[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("reason")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2473 := z.EncBinary() - _ = yym2473 + yym2566 := z.EncBinary() + _ = yym2566 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) } } } - if yyr2458 || yy2arr2458 { + if yyr2551 || yy2arr2551 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2458[5] { - yym2475 := z.EncBinary() - _ = yym2475 + if yyq2551[5] { + yym2568 := z.EncBinary() + _ = yym2568 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) @@ -31555,19 +32881,19 @@ func (x *NodeCondition) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2458[5] { + if yyq2551[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("message")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2476 := z.EncBinary() - _ = yym2476 + yym2569 := z.EncBinary() + _ = yym2569 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) } } } - if yyr2458 || yy2arr2458 { + if yyr2551 || yy2arr2551 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -31580,25 +32906,25 @@ func (x *NodeCondition) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2477 := z.DecBinary() - _ = yym2477 + yym2570 := z.DecBinary() + _ = yym2570 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2478 := r.ContainerType() - if yyct2478 == codecSelferValueTypeMap1234 { - yyl2478 := r.ReadMapStart() - if yyl2478 == 0 { + yyct2571 := r.ContainerType() + if yyct2571 == codecSelferValueTypeMap1234 { + yyl2571 := r.ReadMapStart() + if yyl2571 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2478, d) + x.codecDecodeSelfFromMap(yyl2571, d) } - } else if yyct2478 == codecSelferValueTypeArray1234 { - yyl2478 := r.ReadArrayStart() - if yyl2478 == 0 { + } else if yyct2571 == codecSelferValueTypeArray1234 { + yyl2571 := r.ReadArrayStart() + if yyl2571 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2478, d) + x.codecDecodeSelfFromArray(yyl2571, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -31610,12 +32936,12 @@ func (x *NodeCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2479Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2479Slc - var yyhl2479 bool = l >= 0 - for yyj2479 := 0; ; yyj2479++ { - if yyhl2479 { - if yyj2479 >= l { + var yys2572Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2572Slc + var yyhl2572 bool = l >= 0 + for yyj2572 := 0; ; yyj2572++ { + if yyhl2572 { + if yyj2572 >= l { break } } else { @@ -31624,10 +32950,10 @@ func (x *NodeCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2479Slc = r.DecodeBytes(yys2479Slc, true, true) - yys2479 := string(yys2479Slc) + yys2572Slc = r.DecodeBytes(yys2572Slc, true, true) + yys2572 := string(yys2572Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2479 { + switch yys2572 { case "type": if r.TryDecodeAsNil() { x.Type = "" @@ -31644,34 +32970,34 @@ func (x *NodeCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.LastHeartbeatTime = pkg2_unversioned.Time{} } else { - yyv2482 := &x.LastHeartbeatTime - yym2483 := z.DecBinary() - _ = yym2483 + yyv2575 := &x.LastHeartbeatTime + yym2576 := z.DecBinary() + _ = yym2576 if false { - } else if z.HasExtensions() && z.DecExt(yyv2482) { - } else if yym2483 { - z.DecBinaryUnmarshal(yyv2482) - } else if !yym2483 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv2482) + } else if z.HasExtensions() && z.DecExt(yyv2575) { + } else if yym2576 { + z.DecBinaryUnmarshal(yyv2575) + } else if !yym2576 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv2575) } else { - z.DecFallback(yyv2482, false) + z.DecFallback(yyv2575, false) } } case "lastTransitionTime": if r.TryDecodeAsNil() { x.LastTransitionTime = pkg2_unversioned.Time{} } else { - yyv2484 := &x.LastTransitionTime - yym2485 := z.DecBinary() - _ = yym2485 + yyv2577 := &x.LastTransitionTime + yym2578 := z.DecBinary() + _ = yym2578 if false { - } else if z.HasExtensions() && z.DecExt(yyv2484) { - } else if yym2485 { - z.DecBinaryUnmarshal(yyv2484) - } else if !yym2485 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv2484) + } else if z.HasExtensions() && z.DecExt(yyv2577) { + } else if yym2578 { + z.DecBinaryUnmarshal(yyv2577) + } else if !yym2578 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv2577) } else { - z.DecFallback(yyv2484, false) + z.DecFallback(yyv2577, false) } } case "reason": @@ -31687,9 +33013,9 @@ func (x *NodeCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Message = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys2479) - } // end switch yys2479 - } // end for yyj2479 + z.DecStructFieldNotFound(-1, yys2572) + } // end switch yys2572 + } // end for yyj2572 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -31697,16 +33023,16 @@ func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2488 int - var yyb2488 bool - var yyhl2488 bool = l >= 0 - yyj2488++ - if yyhl2488 { - yyb2488 = yyj2488 > l + var yyj2581 int + var yyb2581 bool + var yyhl2581 bool = l >= 0 + yyj2581++ + if yyhl2581 { + yyb2581 = yyj2581 > l } else { - yyb2488 = r.CheckBreak() + yyb2581 = r.CheckBreak() } - if yyb2488 { + if yyb2581 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -31716,13 +33042,13 @@ func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Type = NodeConditionType(r.DecodeString()) } - yyj2488++ - if yyhl2488 { - yyb2488 = yyj2488 > l + yyj2581++ + if yyhl2581 { + yyb2581 = yyj2581 > l } else { - yyb2488 = r.CheckBreak() + yyb2581 = r.CheckBreak() } - if yyb2488 { + if yyb2581 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -31732,13 +33058,13 @@ func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Status = ConditionStatus(r.DecodeString()) } - yyj2488++ - if yyhl2488 { - yyb2488 = yyj2488 > l + yyj2581++ + if yyhl2581 { + yyb2581 = yyj2581 > l } else { - yyb2488 = r.CheckBreak() + yyb2581 = r.CheckBreak() } - if yyb2488 { + if yyb2581 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -31746,26 +33072,26 @@ func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.LastHeartbeatTime = pkg2_unversioned.Time{} } else { - yyv2491 := &x.LastHeartbeatTime - yym2492 := z.DecBinary() - _ = yym2492 + yyv2584 := &x.LastHeartbeatTime + yym2585 := z.DecBinary() + _ = yym2585 if false { - } else if z.HasExtensions() && z.DecExt(yyv2491) { - } else if yym2492 { - z.DecBinaryUnmarshal(yyv2491) - } else if !yym2492 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv2491) + } else if z.HasExtensions() && z.DecExt(yyv2584) { + } else if yym2585 { + z.DecBinaryUnmarshal(yyv2584) + } else if !yym2585 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv2584) } else { - z.DecFallback(yyv2491, false) + z.DecFallback(yyv2584, false) } } - yyj2488++ - if yyhl2488 { - yyb2488 = yyj2488 > l + yyj2581++ + if yyhl2581 { + yyb2581 = yyj2581 > l } else { - yyb2488 = r.CheckBreak() + yyb2581 = r.CheckBreak() } - if yyb2488 { + if yyb2581 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -31773,26 +33099,26 @@ func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.LastTransitionTime = pkg2_unversioned.Time{} } else { - yyv2493 := &x.LastTransitionTime - yym2494 := z.DecBinary() - _ = yym2494 + yyv2586 := &x.LastTransitionTime + yym2587 := z.DecBinary() + _ = yym2587 if false { - } else if z.HasExtensions() && z.DecExt(yyv2493) { - } else if yym2494 { - z.DecBinaryUnmarshal(yyv2493) - } else if !yym2494 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv2493) + } else if z.HasExtensions() && z.DecExt(yyv2586) { + } else if yym2587 { + z.DecBinaryUnmarshal(yyv2586) + } else if !yym2587 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv2586) } else { - z.DecFallback(yyv2493, false) + z.DecFallback(yyv2586, false) } } - yyj2488++ - if yyhl2488 { - yyb2488 = yyj2488 > l + yyj2581++ + if yyhl2581 { + yyb2581 = yyj2581 > l } else { - yyb2488 = r.CheckBreak() + yyb2581 = r.CheckBreak() } - if yyb2488 { + if yyb2581 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -31802,13 +33128,13 @@ func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Reason = string(r.DecodeString()) } - yyj2488++ - if yyhl2488 { - yyb2488 = yyj2488 > l + yyj2581++ + if yyhl2581 { + yyb2581 = yyj2581 > l } else { - yyb2488 = r.CheckBreak() + yyb2581 = r.CheckBreak() } - if yyb2488 { + if yyb2581 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -31819,17 +33145,17 @@ func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Message = string(r.DecodeString()) } for { - yyj2488++ - if yyhl2488 { - yyb2488 = yyj2488 > l + yyj2581++ + if yyhl2581 { + yyb2581 = yyj2581 > l } else { - yyb2488 = r.CheckBreak() + yyb2581 = r.CheckBreak() } - if yyb2488 { + if yyb2581 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2488-1, "") + z.DecStructFieldNotFound(yyj2581-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -31838,8 +33164,8 @@ func (x NodeAddressType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym2497 := z.EncBinary() - _ = yym2497 + yym2590 := z.EncBinary() + _ = yym2590 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -31851,8 +33177,8 @@ func (x *NodeAddressType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2498 := z.DecBinary() - _ = yym2498 + yym2591 := z.DecBinary() + _ = yym2591 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -31867,30 +33193,30 @@ func (x *NodeAddress) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2499 := z.EncBinary() - _ = yym2499 + yym2592 := z.EncBinary() + _ = yym2592 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2500 := !z.EncBinary() - yy2arr2500 := z.EncBasicHandle().StructToArray - var yyq2500 [2]bool - _, _, _ = yysep2500, yyq2500, yy2arr2500 - const yyr2500 bool = false - var yynn2500 int - if yyr2500 || yy2arr2500 { + yysep2593 := !z.EncBinary() + yy2arr2593 := z.EncBasicHandle().StructToArray + var yyq2593 [2]bool + _, _, _ = yysep2593, yyq2593, yy2arr2593 + const yyr2593 bool = false + var yynn2593 int + if yyr2593 || yy2arr2593 { r.EncodeArrayStart(2) } else { - yynn2500 = 2 - for _, b := range yyq2500 { + yynn2593 = 2 + for _, b := range yyq2593 { if b { - yynn2500++ + yynn2593++ } } - r.EncodeMapStart(yynn2500) - yynn2500 = 0 + r.EncodeMapStart(yynn2593) + yynn2593 = 0 } - if yyr2500 || yy2arr2500 { + if yyr2593 || yy2arr2593 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Type.CodecEncodeSelf(e) } else { @@ -31899,10 +33225,10 @@ func (x *NodeAddress) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } - if yyr2500 || yy2arr2500 { + if yyr2593 || yy2arr2593 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2503 := z.EncBinary() - _ = yym2503 + yym2596 := z.EncBinary() + _ = yym2596 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Address)) @@ -31911,14 +33237,14 @@ func (x *NodeAddress) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("address")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2504 := z.EncBinary() - _ = yym2504 + yym2597 := z.EncBinary() + _ = yym2597 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Address)) } } - if yyr2500 || yy2arr2500 { + if yyr2593 || yy2arr2593 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -31931,25 +33257,25 @@ func (x *NodeAddress) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2505 := z.DecBinary() - _ = yym2505 + yym2598 := z.DecBinary() + _ = yym2598 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2506 := r.ContainerType() - if yyct2506 == codecSelferValueTypeMap1234 { - yyl2506 := r.ReadMapStart() - if yyl2506 == 0 { + yyct2599 := r.ContainerType() + if yyct2599 == codecSelferValueTypeMap1234 { + yyl2599 := r.ReadMapStart() + if yyl2599 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2506, d) + x.codecDecodeSelfFromMap(yyl2599, d) } - } else if yyct2506 == codecSelferValueTypeArray1234 { - yyl2506 := r.ReadArrayStart() - if yyl2506 == 0 { + } else if yyct2599 == codecSelferValueTypeArray1234 { + yyl2599 := r.ReadArrayStart() + if yyl2599 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2506, d) + x.codecDecodeSelfFromArray(yyl2599, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -31961,12 +33287,12 @@ func (x *NodeAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2507Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2507Slc - var yyhl2507 bool = l >= 0 - for yyj2507 := 0; ; yyj2507++ { - if yyhl2507 { - if yyj2507 >= l { + var yys2600Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2600Slc + var yyhl2600 bool = l >= 0 + for yyj2600 := 0; ; yyj2600++ { + if yyhl2600 { + if yyj2600 >= l { break } } else { @@ -31975,10 +33301,10 @@ func (x *NodeAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2507Slc = r.DecodeBytes(yys2507Slc, true, true) - yys2507 := string(yys2507Slc) + yys2600Slc = r.DecodeBytes(yys2600Slc, true, true) + yys2600 := string(yys2600Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2507 { + switch yys2600 { case "type": if r.TryDecodeAsNil() { x.Type = "" @@ -31992,9 +33318,9 @@ func (x *NodeAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Address = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys2507) - } // end switch yys2507 - } // end for yyj2507 + z.DecStructFieldNotFound(-1, yys2600) + } // end switch yys2600 + } // end for yyj2600 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -32002,16 +33328,16 @@ func (x *NodeAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2510 int - var yyb2510 bool - var yyhl2510 bool = l >= 0 - yyj2510++ - if yyhl2510 { - yyb2510 = yyj2510 > l + var yyj2603 int + var yyb2603 bool + var yyhl2603 bool = l >= 0 + yyj2603++ + if yyhl2603 { + yyb2603 = yyj2603 > l } else { - yyb2510 = r.CheckBreak() + yyb2603 = r.CheckBreak() } - if yyb2510 { + if yyb2603 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32021,13 +33347,13 @@ func (x *NodeAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Type = NodeAddressType(r.DecodeString()) } - yyj2510++ - if yyhl2510 { - yyb2510 = yyj2510 > l + yyj2603++ + if yyhl2603 { + yyb2603 = yyj2603 > l } else { - yyb2510 = r.CheckBreak() + yyb2603 = r.CheckBreak() } - if yyb2510 { + if yyb2603 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32038,17 +33364,17 @@ func (x *NodeAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Address = string(r.DecodeString()) } for { - yyj2510++ - if yyhl2510 { - yyb2510 = yyj2510 > l + yyj2603++ + if yyhl2603 { + yyb2603 = yyj2603 > l } else { - yyb2510 = r.CheckBreak() + yyb2603 = r.CheckBreak() } - if yyb2510 { + if yyb2603 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2510-1, "") + z.DecStructFieldNotFound(yyj2603-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -32060,33 +33386,33 @@ func (x *NodeResources) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2513 := z.EncBinary() - _ = yym2513 + yym2606 := z.EncBinary() + _ = yym2606 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2514 := !z.EncBinary() - yy2arr2514 := z.EncBasicHandle().StructToArray - var yyq2514 [1]bool - _, _, _ = yysep2514, yyq2514, yy2arr2514 - const yyr2514 bool = false - yyq2514[0] = len(x.Capacity) != 0 - var yynn2514 int - if yyr2514 || yy2arr2514 { + yysep2607 := !z.EncBinary() + yy2arr2607 := z.EncBasicHandle().StructToArray + var yyq2607 [1]bool + _, _, _ = yysep2607, yyq2607, yy2arr2607 + const yyr2607 bool = false + yyq2607[0] = len(x.Capacity) != 0 + var yynn2607 int + if yyr2607 || yy2arr2607 { r.EncodeArrayStart(1) } else { - yynn2514 = 0 - for _, b := range yyq2514 { + yynn2607 = 0 + for _, b := range yyq2607 { if b { - yynn2514++ + yynn2607++ } } - r.EncodeMapStart(yynn2514) - yynn2514 = 0 + r.EncodeMapStart(yynn2607) + yynn2607 = 0 } - if yyr2514 || yy2arr2514 { + if yyr2607 || yy2arr2607 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2514[0] { + if yyq2607[0] { if x.Capacity == nil { r.EncodeNil() } else { @@ -32096,7 +33422,7 @@ func (x *NodeResources) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2514[0] { + if yyq2607[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("capacity")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -32107,7 +33433,7 @@ func (x *NodeResources) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2514 || yy2arr2514 { + if yyr2607 || yy2arr2607 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -32120,25 +33446,25 @@ func (x *NodeResources) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2516 := z.DecBinary() - _ = yym2516 + yym2609 := z.DecBinary() + _ = yym2609 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2517 := r.ContainerType() - if yyct2517 == codecSelferValueTypeMap1234 { - yyl2517 := r.ReadMapStart() - if yyl2517 == 0 { + yyct2610 := r.ContainerType() + if yyct2610 == codecSelferValueTypeMap1234 { + yyl2610 := r.ReadMapStart() + if yyl2610 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2517, d) + x.codecDecodeSelfFromMap(yyl2610, d) } - } else if yyct2517 == codecSelferValueTypeArray1234 { - yyl2517 := r.ReadArrayStart() - if yyl2517 == 0 { + } else if yyct2610 == codecSelferValueTypeArray1234 { + yyl2610 := r.ReadArrayStart() + if yyl2610 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2517, d) + x.codecDecodeSelfFromArray(yyl2610, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -32150,12 +33476,12 @@ func (x *NodeResources) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2518Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2518Slc - var yyhl2518 bool = l >= 0 - for yyj2518 := 0; ; yyj2518++ { - if yyhl2518 { - if yyj2518 >= l { + var yys2611Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2611Slc + var yyhl2611 bool = l >= 0 + for yyj2611 := 0; ; yyj2611++ { + if yyhl2611 { + if yyj2611 >= l { break } } else { @@ -32164,21 +33490,21 @@ func (x *NodeResources) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2518Slc = r.DecodeBytes(yys2518Slc, true, true) - yys2518 := string(yys2518Slc) + yys2611Slc = r.DecodeBytes(yys2611Slc, true, true) + yys2611 := string(yys2611Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2518 { + switch yys2611 { case "capacity": if r.TryDecodeAsNil() { x.Capacity = nil } else { - yyv2519 := &x.Capacity - yyv2519.CodecDecodeSelf(d) + yyv2612 := &x.Capacity + yyv2612.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2518) - } // end switch yys2518 - } // end for yyj2518 + z.DecStructFieldNotFound(-1, yys2611) + } // end switch yys2611 + } // end for yyj2611 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -32186,16 +33512,16 @@ func (x *NodeResources) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2520 int - var yyb2520 bool - var yyhl2520 bool = l >= 0 - yyj2520++ - if yyhl2520 { - yyb2520 = yyj2520 > l + var yyj2613 int + var yyb2613 bool + var yyhl2613 bool = l >= 0 + yyj2613++ + if yyhl2613 { + yyb2613 = yyj2613 > l } else { - yyb2520 = r.CheckBreak() + yyb2613 = r.CheckBreak() } - if yyb2520 { + if yyb2613 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32203,21 +33529,21 @@ func (x *NodeResources) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Capacity = nil } else { - yyv2521 := &x.Capacity - yyv2521.CodecDecodeSelf(d) + yyv2614 := &x.Capacity + yyv2614.CodecDecodeSelf(d) } for { - yyj2520++ - if yyhl2520 { - yyb2520 = yyj2520 > l + yyj2613++ + if yyhl2613 { + yyb2613 = yyj2613 > l } else { - yyb2520 = r.CheckBreak() + yyb2613 = r.CheckBreak() } - if yyb2520 { + if yyb2613 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2520-1, "") + z.DecStructFieldNotFound(yyj2613-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -32226,8 +33552,8 @@ func (x ResourceName) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym2522 := z.EncBinary() - _ = yym2522 + yym2615 := z.EncBinary() + _ = yym2615 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -32239,8 +33565,8 @@ func (x *ResourceName) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2523 := z.DecBinary() - _ = yym2523 + yym2616 := z.DecBinary() + _ = yym2616 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -32255,8 +33581,8 @@ func (x ResourceList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2524 := z.EncBinary() - _ = yym2524 + yym2617 := z.EncBinary() + _ = yym2617 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -32269,8 +33595,8 @@ func (x *ResourceList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2525 := z.DecBinary() - _ = yym2525 + yym2618 := z.DecBinary() + _ = yym2618 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -32285,39 +33611,39 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2526 := z.EncBinary() - _ = yym2526 + yym2619 := z.EncBinary() + _ = yym2619 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2527 := !z.EncBinary() - yy2arr2527 := z.EncBasicHandle().StructToArray - var yyq2527 [5]bool - _, _, _ = yysep2527, yyq2527, yy2arr2527 - const yyr2527 bool = false - yyq2527[0] = x.Kind != "" - yyq2527[1] = x.APIVersion != "" - yyq2527[2] = true - yyq2527[3] = true - yyq2527[4] = true - var yynn2527 int - if yyr2527 || yy2arr2527 { + yysep2620 := !z.EncBinary() + yy2arr2620 := z.EncBasicHandle().StructToArray + var yyq2620 [5]bool + _, _, _ = yysep2620, yyq2620, yy2arr2620 + const yyr2620 bool = false + yyq2620[0] = x.Kind != "" + yyq2620[1] = x.APIVersion != "" + yyq2620[2] = true + yyq2620[3] = true + yyq2620[4] = true + var yynn2620 int + if yyr2620 || yy2arr2620 { r.EncodeArrayStart(5) } else { - yynn2527 = 0 - for _, b := range yyq2527 { + yynn2620 = 0 + for _, b := range yyq2620 { if b { - yynn2527++ + yynn2620++ } } - r.EncodeMapStart(yynn2527) - yynn2527 = 0 + r.EncodeMapStart(yynn2620) + yynn2620 = 0 } - if yyr2527 || yy2arr2527 { + if yyr2620 || yy2arr2620 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2527[0] { - yym2529 := z.EncBinary() - _ = yym2529 + if yyq2620[0] { + yym2622 := z.EncBinary() + _ = yym2622 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -32326,23 +33652,23 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2527[0] { + if yyq2620[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2530 := z.EncBinary() - _ = yym2530 + yym2623 := z.EncBinary() + _ = yym2623 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2527 || yy2arr2527 { + if yyr2620 || yy2arr2620 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2527[1] { - yym2532 := z.EncBinary() - _ = yym2532 + if yyq2620[1] { + yym2625 := z.EncBinary() + _ = yym2625 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -32351,70 +33677,70 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2527[1] { + if yyq2620[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2533 := z.EncBinary() - _ = yym2533 + yym2626 := z.EncBinary() + _ = yym2626 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2527 || yy2arr2527 { + if yyr2620 || yy2arr2620 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2527[2] { - yy2535 := &x.ObjectMeta - yy2535.CodecEncodeSelf(e) + if yyq2620[2] { + yy2628 := &x.ObjectMeta + yy2628.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2527[2] { + if yyq2620[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2536 := &x.ObjectMeta - yy2536.CodecEncodeSelf(e) + yy2629 := &x.ObjectMeta + yy2629.CodecEncodeSelf(e) } } - if yyr2527 || yy2arr2527 { + if yyr2620 || yy2arr2620 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2527[3] { - yy2538 := &x.Spec - yy2538.CodecEncodeSelf(e) + if yyq2620[3] { + yy2631 := &x.Spec + yy2631.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2527[3] { + if yyq2620[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2539 := &x.Spec - yy2539.CodecEncodeSelf(e) + yy2632 := &x.Spec + yy2632.CodecEncodeSelf(e) } } - if yyr2527 || yy2arr2527 { + if yyr2620 || yy2arr2620 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2527[4] { - yy2541 := &x.Status - yy2541.CodecEncodeSelf(e) + if yyq2620[4] { + yy2634 := &x.Status + yy2634.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2527[4] { + if yyq2620[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2542 := &x.Status - yy2542.CodecEncodeSelf(e) + yy2635 := &x.Status + yy2635.CodecEncodeSelf(e) } } - if yyr2527 || yy2arr2527 { + if yyr2620 || yy2arr2620 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -32427,25 +33753,25 @@ func (x *Node) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2543 := z.DecBinary() - _ = yym2543 + yym2636 := z.DecBinary() + _ = yym2636 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2544 := r.ContainerType() - if yyct2544 == codecSelferValueTypeMap1234 { - yyl2544 := r.ReadMapStart() - if yyl2544 == 0 { + yyct2637 := r.ContainerType() + if yyct2637 == codecSelferValueTypeMap1234 { + yyl2637 := r.ReadMapStart() + if yyl2637 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2544, d) + x.codecDecodeSelfFromMap(yyl2637, d) } - } else if yyct2544 == codecSelferValueTypeArray1234 { - yyl2544 := r.ReadArrayStart() - if yyl2544 == 0 { + } else if yyct2637 == codecSelferValueTypeArray1234 { + yyl2637 := r.ReadArrayStart() + if yyl2637 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2544, d) + x.codecDecodeSelfFromArray(yyl2637, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -32457,12 +33783,12 @@ func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2545Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2545Slc - var yyhl2545 bool = l >= 0 - for yyj2545 := 0; ; yyj2545++ { - if yyhl2545 { - if yyj2545 >= l { + var yys2638Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2638Slc + var yyhl2638 bool = l >= 0 + for yyj2638 := 0; ; yyj2638++ { + if yyhl2638 { + if yyj2638 >= l { break } } else { @@ -32471,10 +33797,10 @@ func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2545Slc = r.DecodeBytes(yys2545Slc, true, true) - yys2545 := string(yys2545Slc) + yys2638Slc = r.DecodeBytes(yys2638Slc, true, true) + yys2638 := string(yys2638Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2545 { + switch yys2638 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -32491,27 +33817,27 @@ func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv2548 := &x.ObjectMeta - yyv2548.CodecDecodeSelf(d) + yyv2641 := &x.ObjectMeta + yyv2641.CodecDecodeSelf(d) } case "spec": if r.TryDecodeAsNil() { x.Spec = NodeSpec{} } else { - yyv2549 := &x.Spec - yyv2549.CodecDecodeSelf(d) + yyv2642 := &x.Spec + yyv2642.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = NodeStatus{} } else { - yyv2550 := &x.Status - yyv2550.CodecDecodeSelf(d) + yyv2643 := &x.Status + yyv2643.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2545) - } // end switch yys2545 - } // end for yyj2545 + z.DecStructFieldNotFound(-1, yys2638) + } // end switch yys2638 + } // end for yyj2638 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -32519,16 +33845,16 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2551 int - var yyb2551 bool - var yyhl2551 bool = l >= 0 - yyj2551++ - if yyhl2551 { - yyb2551 = yyj2551 > l + var yyj2644 int + var yyb2644 bool + var yyhl2644 bool = l >= 0 + yyj2644++ + if yyhl2644 { + yyb2644 = yyj2644 > l } else { - yyb2551 = r.CheckBreak() + yyb2644 = r.CheckBreak() } - if yyb2551 { + if yyb2644 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32538,13 +33864,13 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2551++ - if yyhl2551 { - yyb2551 = yyj2551 > l + yyj2644++ + if yyhl2644 { + yyb2644 = yyj2644 > l } else { - yyb2551 = r.CheckBreak() + yyb2644 = r.CheckBreak() } - if yyb2551 { + if yyb2644 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32554,13 +33880,13 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2551++ - if yyhl2551 { - yyb2551 = yyj2551 > l + yyj2644++ + if yyhl2644 { + yyb2644 = yyj2644 > l } else { - yyb2551 = r.CheckBreak() + yyb2644 = r.CheckBreak() } - if yyb2551 { + if yyb2644 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32568,16 +33894,16 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv2554 := &x.ObjectMeta - yyv2554.CodecDecodeSelf(d) + yyv2647 := &x.ObjectMeta + yyv2647.CodecDecodeSelf(d) } - yyj2551++ - if yyhl2551 { - yyb2551 = yyj2551 > l + yyj2644++ + if yyhl2644 { + yyb2644 = yyj2644 > l } else { - yyb2551 = r.CheckBreak() + yyb2644 = r.CheckBreak() } - if yyb2551 { + if yyb2644 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32585,16 +33911,16 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = NodeSpec{} } else { - yyv2555 := &x.Spec - yyv2555.CodecDecodeSelf(d) + yyv2648 := &x.Spec + yyv2648.CodecDecodeSelf(d) } - yyj2551++ - if yyhl2551 { - yyb2551 = yyj2551 > l + yyj2644++ + if yyhl2644 { + yyb2644 = yyj2644 > l } else { - yyb2551 = r.CheckBreak() + yyb2644 = r.CheckBreak() } - if yyb2551 { + if yyb2644 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32602,21 +33928,21 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = NodeStatus{} } else { - yyv2556 := &x.Status - yyv2556.CodecDecodeSelf(d) + yyv2649 := &x.Status + yyv2649.CodecDecodeSelf(d) } for { - yyj2551++ - if yyhl2551 { - yyb2551 = yyj2551 > l + yyj2644++ + if yyhl2644 { + yyb2644 = yyj2644 > l } else { - yyb2551 = r.CheckBreak() + yyb2644 = r.CheckBreak() } - if yyb2551 { + if yyb2644 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2551-1, "") + z.DecStructFieldNotFound(yyj2644-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -32628,37 +33954,37 @@ func (x *NodeList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2557 := z.EncBinary() - _ = yym2557 + yym2650 := z.EncBinary() + _ = yym2650 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2558 := !z.EncBinary() - yy2arr2558 := z.EncBasicHandle().StructToArray - var yyq2558 [4]bool - _, _, _ = yysep2558, yyq2558, yy2arr2558 - const yyr2558 bool = false - yyq2558[0] = x.Kind != "" - yyq2558[1] = x.APIVersion != "" - yyq2558[2] = true - var yynn2558 int - if yyr2558 || yy2arr2558 { + yysep2651 := !z.EncBinary() + yy2arr2651 := z.EncBasicHandle().StructToArray + var yyq2651 [4]bool + _, _, _ = yysep2651, yyq2651, yy2arr2651 + const yyr2651 bool = false + yyq2651[0] = x.Kind != "" + yyq2651[1] = x.APIVersion != "" + yyq2651[2] = true + var yynn2651 int + if yyr2651 || yy2arr2651 { r.EncodeArrayStart(4) } else { - yynn2558 = 1 - for _, b := range yyq2558 { + yynn2651 = 1 + for _, b := range yyq2651 { if b { - yynn2558++ + yynn2651++ } } - r.EncodeMapStart(yynn2558) - yynn2558 = 0 + r.EncodeMapStart(yynn2651) + yynn2651 = 0 } - if yyr2558 || yy2arr2558 { + if yyr2651 || yy2arr2651 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2558[0] { - yym2560 := z.EncBinary() - _ = yym2560 + if yyq2651[0] { + yym2653 := z.EncBinary() + _ = yym2653 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -32667,23 +33993,23 @@ func (x *NodeList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2558[0] { + if yyq2651[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2561 := z.EncBinary() - _ = yym2561 + yym2654 := z.EncBinary() + _ = yym2654 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2558 || yy2arr2558 { + if yyr2651 || yy2arr2651 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2558[1] { - yym2563 := z.EncBinary() - _ = yym2563 + if yyq2651[1] { + yym2656 := z.EncBinary() + _ = yym2656 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -32692,54 +34018,54 @@ func (x *NodeList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2558[1] { + if yyq2651[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2564 := z.EncBinary() - _ = yym2564 + yym2657 := z.EncBinary() + _ = yym2657 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2558 || yy2arr2558 { + if yyr2651 || yy2arr2651 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2558[2] { - yy2566 := &x.ListMeta - yym2567 := z.EncBinary() - _ = yym2567 + if yyq2651[2] { + yy2659 := &x.ListMeta + yym2660 := z.EncBinary() + _ = yym2660 if false { - } else if z.HasExtensions() && z.EncExt(yy2566) { + } else if z.HasExtensions() && z.EncExt(yy2659) { } else { - z.EncFallback(yy2566) + z.EncFallback(yy2659) } } else { r.EncodeNil() } } else { - if yyq2558[2] { + if yyq2651[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2568 := &x.ListMeta - yym2569 := z.EncBinary() - _ = yym2569 + yy2661 := &x.ListMeta + yym2662 := z.EncBinary() + _ = yym2662 if false { - } else if z.HasExtensions() && z.EncExt(yy2568) { + } else if z.HasExtensions() && z.EncExt(yy2661) { } else { - z.EncFallback(yy2568) + z.EncFallback(yy2661) } } } - if yyr2558 || yy2arr2558 { + if yyr2651 || yy2arr2651 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym2571 := z.EncBinary() - _ = yym2571 + yym2664 := z.EncBinary() + _ = yym2664 if false { } else { h.encSliceNode(([]Node)(x.Items), e) @@ -32752,15 +34078,15 @@ func (x *NodeList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym2572 := z.EncBinary() - _ = yym2572 + yym2665 := z.EncBinary() + _ = yym2665 if false { } else { h.encSliceNode(([]Node)(x.Items), e) } } } - if yyr2558 || yy2arr2558 { + if yyr2651 || yy2arr2651 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -32773,25 +34099,25 @@ func (x *NodeList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2573 := z.DecBinary() - _ = yym2573 + yym2666 := z.DecBinary() + _ = yym2666 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2574 := r.ContainerType() - if yyct2574 == codecSelferValueTypeMap1234 { - yyl2574 := r.ReadMapStart() - if yyl2574 == 0 { + yyct2667 := r.ContainerType() + if yyct2667 == codecSelferValueTypeMap1234 { + yyl2667 := r.ReadMapStart() + if yyl2667 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2574, d) + x.codecDecodeSelfFromMap(yyl2667, d) } - } else if yyct2574 == codecSelferValueTypeArray1234 { - yyl2574 := r.ReadArrayStart() - if yyl2574 == 0 { + } else if yyct2667 == codecSelferValueTypeArray1234 { + yyl2667 := r.ReadArrayStart() + if yyl2667 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2574, d) + x.codecDecodeSelfFromArray(yyl2667, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -32803,12 +34129,12 @@ func (x *NodeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2575Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2575Slc - var yyhl2575 bool = l >= 0 - for yyj2575 := 0; ; yyj2575++ { - if yyhl2575 { - if yyj2575 >= l { + var yys2668Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2668Slc + var yyhl2668 bool = l >= 0 + for yyj2668 := 0; ; yyj2668++ { + if yyhl2668 { + if yyj2668 >= l { break } } else { @@ -32817,10 +34143,10 @@ func (x *NodeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2575Slc = r.DecodeBytes(yys2575Slc, true, true) - yys2575 := string(yys2575Slc) + yys2668Slc = r.DecodeBytes(yys2668Slc, true, true) + yys2668 := string(yys2668Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2575 { + switch yys2668 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -32837,31 +34163,31 @@ func (x *NodeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv2578 := &x.ListMeta - yym2579 := z.DecBinary() - _ = yym2579 + yyv2671 := &x.ListMeta + yym2672 := z.DecBinary() + _ = yym2672 if false { - } else if z.HasExtensions() && z.DecExt(yyv2578) { + } else if z.HasExtensions() && z.DecExt(yyv2671) { } else { - z.DecFallback(yyv2578, false) + z.DecFallback(yyv2671, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2580 := &x.Items - yym2581 := z.DecBinary() - _ = yym2581 + yyv2673 := &x.Items + yym2674 := z.DecBinary() + _ = yym2674 if false { } else { - h.decSliceNode((*[]Node)(yyv2580), d) + h.decSliceNode((*[]Node)(yyv2673), d) } } default: - z.DecStructFieldNotFound(-1, yys2575) - } // end switch yys2575 - } // end for yyj2575 + z.DecStructFieldNotFound(-1, yys2668) + } // end switch yys2668 + } // end for yyj2668 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -32869,16 +34195,16 @@ func (x *NodeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2582 int - var yyb2582 bool - var yyhl2582 bool = l >= 0 - yyj2582++ - if yyhl2582 { - yyb2582 = yyj2582 > l + var yyj2675 int + var yyb2675 bool + var yyhl2675 bool = l >= 0 + yyj2675++ + if yyhl2675 { + yyb2675 = yyj2675 > l } else { - yyb2582 = r.CheckBreak() + yyb2675 = r.CheckBreak() } - if yyb2582 { + if yyb2675 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32888,13 +34214,13 @@ func (x *NodeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2582++ - if yyhl2582 { - yyb2582 = yyj2582 > l + yyj2675++ + if yyhl2675 { + yyb2675 = yyj2675 > l } else { - yyb2582 = r.CheckBreak() + yyb2675 = r.CheckBreak() } - if yyb2582 { + if yyb2675 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32904,13 +34230,13 @@ func (x *NodeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2582++ - if yyhl2582 { - yyb2582 = yyj2582 > l + yyj2675++ + if yyhl2675 { + yyb2675 = yyj2675 > l } else { - yyb2582 = r.CheckBreak() + yyb2675 = r.CheckBreak() } - if yyb2582 { + if yyb2675 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32918,22 +34244,22 @@ func (x *NodeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv2585 := &x.ListMeta - yym2586 := z.DecBinary() - _ = yym2586 + yyv2678 := &x.ListMeta + yym2679 := z.DecBinary() + _ = yym2679 if false { - } else if z.HasExtensions() && z.DecExt(yyv2585) { + } else if z.HasExtensions() && z.DecExt(yyv2678) { } else { - z.DecFallback(yyv2585, false) + z.DecFallback(yyv2678, false) } } - yyj2582++ - if yyhl2582 { - yyb2582 = yyj2582 > l + yyj2675++ + if yyhl2675 { + yyb2675 = yyj2675 > l } else { - yyb2582 = r.CheckBreak() + yyb2675 = r.CheckBreak() } - if yyb2582 { + if yyb2675 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32941,26 +34267,26 @@ func (x *NodeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2587 := &x.Items - yym2588 := z.DecBinary() - _ = yym2588 + yyv2680 := &x.Items + yym2681 := z.DecBinary() + _ = yym2681 if false { } else { - h.decSliceNode((*[]Node)(yyv2587), d) + h.decSliceNode((*[]Node)(yyv2680), d) } } for { - yyj2582++ - if yyhl2582 { - yyb2582 = yyj2582 > l + yyj2675++ + if yyhl2675 { + yyb2675 = yyj2675 > l } else { - yyb2582 = r.CheckBreak() + yyb2675 = r.CheckBreak() } - if yyb2582 { + if yyb2675 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2582-1, "") + z.DecStructFieldNotFound(yyj2675-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -32972,36 +34298,36 @@ func (x *NamespaceSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2589 := z.EncBinary() - _ = yym2589 + yym2682 := z.EncBinary() + _ = yym2682 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2590 := !z.EncBinary() - yy2arr2590 := z.EncBasicHandle().StructToArray - var yyq2590 [1]bool - _, _, _ = yysep2590, yyq2590, yy2arr2590 - const yyr2590 bool = false - var yynn2590 int - if yyr2590 || yy2arr2590 { + yysep2683 := !z.EncBinary() + yy2arr2683 := z.EncBasicHandle().StructToArray + var yyq2683 [1]bool + _, _, _ = yysep2683, yyq2683, yy2arr2683 + const yyr2683 bool = false + var yynn2683 int + if yyr2683 || yy2arr2683 { r.EncodeArrayStart(1) } else { - yynn2590 = 1 - for _, b := range yyq2590 { + yynn2683 = 1 + for _, b := range yyq2683 { if b { - yynn2590++ + yynn2683++ } } - r.EncodeMapStart(yynn2590) - yynn2590 = 0 + r.EncodeMapStart(yynn2683) + yynn2683 = 0 } - if yyr2590 || yy2arr2590 { + if yyr2683 || yy2arr2683 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Finalizers == nil { r.EncodeNil() } else { - yym2592 := z.EncBinary() - _ = yym2592 + yym2685 := z.EncBinary() + _ = yym2685 if false { } else { h.encSliceFinalizerName(([]FinalizerName)(x.Finalizers), e) @@ -33014,15 +34340,15 @@ func (x *NamespaceSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x.Finalizers == nil { r.EncodeNil() } else { - yym2593 := z.EncBinary() - _ = yym2593 + yym2686 := z.EncBinary() + _ = yym2686 if false { } else { h.encSliceFinalizerName(([]FinalizerName)(x.Finalizers), e) } } } - if yyr2590 || yy2arr2590 { + if yyr2683 || yy2arr2683 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -33035,25 +34361,25 @@ func (x *NamespaceSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2594 := z.DecBinary() - _ = yym2594 + yym2687 := z.DecBinary() + _ = yym2687 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2595 := r.ContainerType() - if yyct2595 == codecSelferValueTypeMap1234 { - yyl2595 := r.ReadMapStart() - if yyl2595 == 0 { + yyct2688 := r.ContainerType() + if yyct2688 == codecSelferValueTypeMap1234 { + yyl2688 := r.ReadMapStart() + if yyl2688 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2595, d) + x.codecDecodeSelfFromMap(yyl2688, d) } - } else if yyct2595 == codecSelferValueTypeArray1234 { - yyl2595 := r.ReadArrayStart() - if yyl2595 == 0 { + } else if yyct2688 == codecSelferValueTypeArray1234 { + yyl2688 := r.ReadArrayStart() + if yyl2688 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2595, d) + x.codecDecodeSelfFromArray(yyl2688, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -33065,12 +34391,12 @@ func (x *NamespaceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2596Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2596Slc - var yyhl2596 bool = l >= 0 - for yyj2596 := 0; ; yyj2596++ { - if yyhl2596 { - if yyj2596 >= l { + var yys2689Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2689Slc + var yyhl2689 bool = l >= 0 + for yyj2689 := 0; ; yyj2689++ { + if yyhl2689 { + if yyj2689 >= l { break } } else { @@ -33079,26 +34405,26 @@ func (x *NamespaceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2596Slc = r.DecodeBytes(yys2596Slc, true, true) - yys2596 := string(yys2596Slc) + yys2689Slc = r.DecodeBytes(yys2689Slc, true, true) + yys2689 := string(yys2689Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2596 { + switch yys2689 { case "Finalizers": if r.TryDecodeAsNil() { x.Finalizers = nil } else { - yyv2597 := &x.Finalizers - yym2598 := z.DecBinary() - _ = yym2598 + yyv2690 := &x.Finalizers + yym2691 := z.DecBinary() + _ = yym2691 if false { } else { - h.decSliceFinalizerName((*[]FinalizerName)(yyv2597), d) + h.decSliceFinalizerName((*[]FinalizerName)(yyv2690), d) } } default: - z.DecStructFieldNotFound(-1, yys2596) - } // end switch yys2596 - } // end for yyj2596 + z.DecStructFieldNotFound(-1, yys2689) + } // end switch yys2689 + } // end for yyj2689 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -33106,16 +34432,16 @@ func (x *NamespaceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2599 int - var yyb2599 bool - var yyhl2599 bool = l >= 0 - yyj2599++ - if yyhl2599 { - yyb2599 = yyj2599 > l + var yyj2692 int + var yyb2692 bool + var yyhl2692 bool = l >= 0 + yyj2692++ + if yyhl2692 { + yyb2692 = yyj2692 > l } else { - yyb2599 = r.CheckBreak() + yyb2692 = r.CheckBreak() } - if yyb2599 { + if yyb2692 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33123,26 +34449,26 @@ func (x *NamespaceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Finalizers = nil } else { - yyv2600 := &x.Finalizers - yym2601 := z.DecBinary() - _ = yym2601 + yyv2693 := &x.Finalizers + yym2694 := z.DecBinary() + _ = yym2694 if false { } else { - h.decSliceFinalizerName((*[]FinalizerName)(yyv2600), d) + h.decSliceFinalizerName((*[]FinalizerName)(yyv2693), d) } } for { - yyj2599++ - if yyhl2599 { - yyb2599 = yyj2599 > l + yyj2692++ + if yyhl2692 { + yyb2692 = yyj2692 > l } else { - yyb2599 = r.CheckBreak() + yyb2692 = r.CheckBreak() } - if yyb2599 { + if yyb2692 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2599-1, "") + z.DecStructFieldNotFound(yyj2692-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -33151,8 +34477,8 @@ func (x FinalizerName) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym2602 := z.EncBinary() - _ = yym2602 + yym2695 := z.EncBinary() + _ = yym2695 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -33164,8 +34490,8 @@ func (x *FinalizerName) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2603 := z.DecBinary() - _ = yym2603 + yym2696 := z.DecBinary() + _ = yym2696 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -33180,46 +34506,46 @@ func (x *NamespaceStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2604 := z.EncBinary() - _ = yym2604 + yym2697 := z.EncBinary() + _ = yym2697 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2605 := !z.EncBinary() - yy2arr2605 := z.EncBasicHandle().StructToArray - var yyq2605 [1]bool - _, _, _ = yysep2605, yyq2605, yy2arr2605 - const yyr2605 bool = false - yyq2605[0] = x.Phase != "" - var yynn2605 int - if yyr2605 || yy2arr2605 { + yysep2698 := !z.EncBinary() + yy2arr2698 := z.EncBasicHandle().StructToArray + var yyq2698 [1]bool + _, _, _ = yysep2698, yyq2698, yy2arr2698 + const yyr2698 bool = false + yyq2698[0] = x.Phase != "" + var yynn2698 int + if yyr2698 || yy2arr2698 { r.EncodeArrayStart(1) } else { - yynn2605 = 0 - for _, b := range yyq2605 { + yynn2698 = 0 + for _, b := range yyq2698 { if b { - yynn2605++ + yynn2698++ } } - r.EncodeMapStart(yynn2605) - yynn2605 = 0 + r.EncodeMapStart(yynn2698) + yynn2698 = 0 } - if yyr2605 || yy2arr2605 { + if yyr2698 || yy2arr2698 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2605[0] { + if yyq2698[0] { x.Phase.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2605[0] { + if yyq2698[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("phase")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Phase.CodecEncodeSelf(e) } } - if yyr2605 || yy2arr2605 { + if yyr2698 || yy2arr2698 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -33232,25 +34558,25 @@ func (x *NamespaceStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2607 := z.DecBinary() - _ = yym2607 + yym2700 := z.DecBinary() + _ = yym2700 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2608 := r.ContainerType() - if yyct2608 == codecSelferValueTypeMap1234 { - yyl2608 := r.ReadMapStart() - if yyl2608 == 0 { + yyct2701 := r.ContainerType() + if yyct2701 == codecSelferValueTypeMap1234 { + yyl2701 := r.ReadMapStart() + if yyl2701 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2608, d) + x.codecDecodeSelfFromMap(yyl2701, d) } - } else if yyct2608 == codecSelferValueTypeArray1234 { - yyl2608 := r.ReadArrayStart() - if yyl2608 == 0 { + } else if yyct2701 == codecSelferValueTypeArray1234 { + yyl2701 := r.ReadArrayStart() + if yyl2701 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2608, d) + x.codecDecodeSelfFromArray(yyl2701, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -33262,12 +34588,12 @@ func (x *NamespaceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2609Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2609Slc - var yyhl2609 bool = l >= 0 - for yyj2609 := 0; ; yyj2609++ { - if yyhl2609 { - if yyj2609 >= l { + var yys2702Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2702Slc + var yyhl2702 bool = l >= 0 + for yyj2702 := 0; ; yyj2702++ { + if yyhl2702 { + if yyj2702 >= l { break } } else { @@ -33276,10 +34602,10 @@ func (x *NamespaceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2609Slc = r.DecodeBytes(yys2609Slc, true, true) - yys2609 := string(yys2609Slc) + yys2702Slc = r.DecodeBytes(yys2702Slc, true, true) + yys2702 := string(yys2702Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2609 { + switch yys2702 { case "phase": if r.TryDecodeAsNil() { x.Phase = "" @@ -33287,9 +34613,9 @@ func (x *NamespaceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Phase = NamespacePhase(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys2609) - } // end switch yys2609 - } // end for yyj2609 + z.DecStructFieldNotFound(-1, yys2702) + } // end switch yys2702 + } // end for yyj2702 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -33297,16 +34623,16 @@ func (x *NamespaceStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2611 int - var yyb2611 bool - var yyhl2611 bool = l >= 0 - yyj2611++ - if yyhl2611 { - yyb2611 = yyj2611 > l + var yyj2704 int + var yyb2704 bool + var yyhl2704 bool = l >= 0 + yyj2704++ + if yyhl2704 { + yyb2704 = yyj2704 > l } else { - yyb2611 = r.CheckBreak() + yyb2704 = r.CheckBreak() } - if yyb2611 { + if yyb2704 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33317,17 +34643,17 @@ func (x *NamespaceStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) x.Phase = NamespacePhase(r.DecodeString()) } for { - yyj2611++ - if yyhl2611 { - yyb2611 = yyj2611 > l + yyj2704++ + if yyhl2704 { + yyb2704 = yyj2704 > l } else { - yyb2611 = r.CheckBreak() + yyb2704 = r.CheckBreak() } - if yyb2611 { + if yyb2704 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2611-1, "") + z.DecStructFieldNotFound(yyj2704-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -33336,8 +34662,8 @@ func (x NamespacePhase) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym2613 := z.EncBinary() - _ = yym2613 + yym2706 := z.EncBinary() + _ = yym2706 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -33349,8 +34675,8 @@ func (x *NamespacePhase) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2614 := z.DecBinary() - _ = yym2614 + yym2707 := z.DecBinary() + _ = yym2707 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -33365,39 +34691,39 @@ func (x *Namespace) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2615 := z.EncBinary() - _ = yym2615 + yym2708 := z.EncBinary() + _ = yym2708 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2616 := !z.EncBinary() - yy2arr2616 := z.EncBasicHandle().StructToArray - var yyq2616 [5]bool - _, _, _ = yysep2616, yyq2616, yy2arr2616 - const yyr2616 bool = false - yyq2616[0] = x.Kind != "" - yyq2616[1] = x.APIVersion != "" - yyq2616[2] = true - yyq2616[3] = true - yyq2616[4] = true - var yynn2616 int - if yyr2616 || yy2arr2616 { + yysep2709 := !z.EncBinary() + yy2arr2709 := z.EncBasicHandle().StructToArray + var yyq2709 [5]bool + _, _, _ = yysep2709, yyq2709, yy2arr2709 + const yyr2709 bool = false + yyq2709[0] = x.Kind != "" + yyq2709[1] = x.APIVersion != "" + yyq2709[2] = true + yyq2709[3] = true + yyq2709[4] = true + var yynn2709 int + if yyr2709 || yy2arr2709 { r.EncodeArrayStart(5) } else { - yynn2616 = 0 - for _, b := range yyq2616 { + yynn2709 = 0 + for _, b := range yyq2709 { if b { - yynn2616++ + yynn2709++ } } - r.EncodeMapStart(yynn2616) - yynn2616 = 0 + r.EncodeMapStart(yynn2709) + yynn2709 = 0 } - if yyr2616 || yy2arr2616 { + if yyr2709 || yy2arr2709 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2616[0] { - yym2618 := z.EncBinary() - _ = yym2618 + if yyq2709[0] { + yym2711 := z.EncBinary() + _ = yym2711 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -33406,23 +34732,23 @@ func (x *Namespace) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2616[0] { + if yyq2709[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2619 := z.EncBinary() - _ = yym2619 + yym2712 := z.EncBinary() + _ = yym2712 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2616 || yy2arr2616 { + if yyr2709 || yy2arr2709 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2616[1] { - yym2621 := z.EncBinary() - _ = yym2621 + if yyq2709[1] { + yym2714 := z.EncBinary() + _ = yym2714 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -33431,70 +34757,70 @@ func (x *Namespace) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2616[1] { + if yyq2709[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2622 := z.EncBinary() - _ = yym2622 + yym2715 := z.EncBinary() + _ = yym2715 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2616 || yy2arr2616 { + if yyr2709 || yy2arr2709 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2616[2] { - yy2624 := &x.ObjectMeta - yy2624.CodecEncodeSelf(e) + if yyq2709[2] { + yy2717 := &x.ObjectMeta + yy2717.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2616[2] { + if yyq2709[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2625 := &x.ObjectMeta - yy2625.CodecEncodeSelf(e) + yy2718 := &x.ObjectMeta + yy2718.CodecEncodeSelf(e) } } - if yyr2616 || yy2arr2616 { + if yyr2709 || yy2arr2709 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2616[3] { - yy2627 := &x.Spec - yy2627.CodecEncodeSelf(e) + if yyq2709[3] { + yy2720 := &x.Spec + yy2720.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2616[3] { + if yyq2709[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2628 := &x.Spec - yy2628.CodecEncodeSelf(e) + yy2721 := &x.Spec + yy2721.CodecEncodeSelf(e) } } - if yyr2616 || yy2arr2616 { + if yyr2709 || yy2arr2709 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2616[4] { - yy2630 := &x.Status - yy2630.CodecEncodeSelf(e) + if yyq2709[4] { + yy2723 := &x.Status + yy2723.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2616[4] { + if yyq2709[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2631 := &x.Status - yy2631.CodecEncodeSelf(e) + yy2724 := &x.Status + yy2724.CodecEncodeSelf(e) } } - if yyr2616 || yy2arr2616 { + if yyr2709 || yy2arr2709 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -33507,25 +34833,25 @@ func (x *Namespace) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2632 := z.DecBinary() - _ = yym2632 + yym2725 := z.DecBinary() + _ = yym2725 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2633 := r.ContainerType() - if yyct2633 == codecSelferValueTypeMap1234 { - yyl2633 := r.ReadMapStart() - if yyl2633 == 0 { + yyct2726 := r.ContainerType() + if yyct2726 == codecSelferValueTypeMap1234 { + yyl2726 := r.ReadMapStart() + if yyl2726 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2633, d) + x.codecDecodeSelfFromMap(yyl2726, d) } - } else if yyct2633 == codecSelferValueTypeArray1234 { - yyl2633 := r.ReadArrayStart() - if yyl2633 == 0 { + } else if yyct2726 == codecSelferValueTypeArray1234 { + yyl2726 := r.ReadArrayStart() + if yyl2726 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2633, d) + x.codecDecodeSelfFromArray(yyl2726, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -33537,12 +34863,12 @@ func (x *Namespace) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2634Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2634Slc - var yyhl2634 bool = l >= 0 - for yyj2634 := 0; ; yyj2634++ { - if yyhl2634 { - if yyj2634 >= l { + var yys2727Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2727Slc + var yyhl2727 bool = l >= 0 + for yyj2727 := 0; ; yyj2727++ { + if yyhl2727 { + if yyj2727 >= l { break } } else { @@ -33551,10 +34877,10 @@ func (x *Namespace) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2634Slc = r.DecodeBytes(yys2634Slc, true, true) - yys2634 := string(yys2634Slc) + yys2727Slc = r.DecodeBytes(yys2727Slc, true, true) + yys2727 := string(yys2727Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2634 { + switch yys2727 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -33571,27 +34897,27 @@ func (x *Namespace) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv2637 := &x.ObjectMeta - yyv2637.CodecDecodeSelf(d) + yyv2730 := &x.ObjectMeta + yyv2730.CodecDecodeSelf(d) } case "spec": if r.TryDecodeAsNil() { x.Spec = NamespaceSpec{} } else { - yyv2638 := &x.Spec - yyv2638.CodecDecodeSelf(d) + yyv2731 := &x.Spec + yyv2731.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = NamespaceStatus{} } else { - yyv2639 := &x.Status - yyv2639.CodecDecodeSelf(d) + yyv2732 := &x.Status + yyv2732.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2634) - } // end switch yys2634 - } // end for yyj2634 + z.DecStructFieldNotFound(-1, yys2727) + } // end switch yys2727 + } // end for yyj2727 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -33599,16 +34925,16 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2640 int - var yyb2640 bool - var yyhl2640 bool = l >= 0 - yyj2640++ - if yyhl2640 { - yyb2640 = yyj2640 > l + var yyj2733 int + var yyb2733 bool + var yyhl2733 bool = l >= 0 + yyj2733++ + if yyhl2733 { + yyb2733 = yyj2733 > l } else { - yyb2640 = r.CheckBreak() + yyb2733 = r.CheckBreak() } - if yyb2640 { + if yyb2733 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33618,13 +34944,13 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2640++ - if yyhl2640 { - yyb2640 = yyj2640 > l + yyj2733++ + if yyhl2733 { + yyb2733 = yyj2733 > l } else { - yyb2640 = r.CheckBreak() + yyb2733 = r.CheckBreak() } - if yyb2640 { + if yyb2733 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33634,13 +34960,13 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2640++ - if yyhl2640 { - yyb2640 = yyj2640 > l + yyj2733++ + if yyhl2733 { + yyb2733 = yyj2733 > l } else { - yyb2640 = r.CheckBreak() + yyb2733 = r.CheckBreak() } - if yyb2640 { + if yyb2733 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33648,16 +34974,16 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv2643 := &x.ObjectMeta - yyv2643.CodecDecodeSelf(d) + yyv2736 := &x.ObjectMeta + yyv2736.CodecDecodeSelf(d) } - yyj2640++ - if yyhl2640 { - yyb2640 = yyj2640 > l + yyj2733++ + if yyhl2733 { + yyb2733 = yyj2733 > l } else { - yyb2640 = r.CheckBreak() + yyb2733 = r.CheckBreak() } - if yyb2640 { + if yyb2733 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33665,16 +34991,16 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = NamespaceSpec{} } else { - yyv2644 := &x.Spec - yyv2644.CodecDecodeSelf(d) + yyv2737 := &x.Spec + yyv2737.CodecDecodeSelf(d) } - yyj2640++ - if yyhl2640 { - yyb2640 = yyj2640 > l + yyj2733++ + if yyhl2733 { + yyb2733 = yyj2733 > l } else { - yyb2640 = r.CheckBreak() + yyb2733 = r.CheckBreak() } - if yyb2640 { + if yyb2733 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33682,21 +35008,21 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = NamespaceStatus{} } else { - yyv2645 := &x.Status - yyv2645.CodecDecodeSelf(d) + yyv2738 := &x.Status + yyv2738.CodecDecodeSelf(d) } for { - yyj2640++ - if yyhl2640 { - yyb2640 = yyj2640 > l + yyj2733++ + if yyhl2733 { + yyb2733 = yyj2733 > l } else { - yyb2640 = r.CheckBreak() + yyb2733 = r.CheckBreak() } - if yyb2640 { + if yyb2733 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2640-1, "") + z.DecStructFieldNotFound(yyj2733-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -33708,37 +35034,37 @@ func (x *NamespaceList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2646 := z.EncBinary() - _ = yym2646 + yym2739 := z.EncBinary() + _ = yym2739 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2647 := !z.EncBinary() - yy2arr2647 := z.EncBasicHandle().StructToArray - var yyq2647 [4]bool - _, _, _ = yysep2647, yyq2647, yy2arr2647 - const yyr2647 bool = false - yyq2647[0] = x.Kind != "" - yyq2647[1] = x.APIVersion != "" - yyq2647[2] = true - var yynn2647 int - if yyr2647 || yy2arr2647 { + yysep2740 := !z.EncBinary() + yy2arr2740 := z.EncBasicHandle().StructToArray + var yyq2740 [4]bool + _, _, _ = yysep2740, yyq2740, yy2arr2740 + const yyr2740 bool = false + yyq2740[0] = x.Kind != "" + yyq2740[1] = x.APIVersion != "" + yyq2740[2] = true + var yynn2740 int + if yyr2740 || yy2arr2740 { r.EncodeArrayStart(4) } else { - yynn2647 = 1 - for _, b := range yyq2647 { + yynn2740 = 1 + for _, b := range yyq2740 { if b { - yynn2647++ + yynn2740++ } } - r.EncodeMapStart(yynn2647) - yynn2647 = 0 + r.EncodeMapStart(yynn2740) + yynn2740 = 0 } - if yyr2647 || yy2arr2647 { + if yyr2740 || yy2arr2740 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2647[0] { - yym2649 := z.EncBinary() - _ = yym2649 + if yyq2740[0] { + yym2742 := z.EncBinary() + _ = yym2742 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -33747,23 +35073,23 @@ func (x *NamespaceList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2647[0] { + if yyq2740[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2650 := z.EncBinary() - _ = yym2650 + yym2743 := z.EncBinary() + _ = yym2743 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2647 || yy2arr2647 { + if yyr2740 || yy2arr2740 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2647[1] { - yym2652 := z.EncBinary() - _ = yym2652 + if yyq2740[1] { + yym2745 := z.EncBinary() + _ = yym2745 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -33772,54 +35098,54 @@ func (x *NamespaceList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2647[1] { + if yyq2740[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2653 := z.EncBinary() - _ = yym2653 + yym2746 := z.EncBinary() + _ = yym2746 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2647 || yy2arr2647 { + if yyr2740 || yy2arr2740 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2647[2] { - yy2655 := &x.ListMeta - yym2656 := z.EncBinary() - _ = yym2656 + if yyq2740[2] { + yy2748 := &x.ListMeta + yym2749 := z.EncBinary() + _ = yym2749 if false { - } else if z.HasExtensions() && z.EncExt(yy2655) { + } else if z.HasExtensions() && z.EncExt(yy2748) { } else { - z.EncFallback(yy2655) + z.EncFallback(yy2748) } } else { r.EncodeNil() } } else { - if yyq2647[2] { + if yyq2740[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2657 := &x.ListMeta - yym2658 := z.EncBinary() - _ = yym2658 + yy2750 := &x.ListMeta + yym2751 := z.EncBinary() + _ = yym2751 if false { - } else if z.HasExtensions() && z.EncExt(yy2657) { + } else if z.HasExtensions() && z.EncExt(yy2750) { } else { - z.EncFallback(yy2657) + z.EncFallback(yy2750) } } } - if yyr2647 || yy2arr2647 { + if yyr2740 || yy2arr2740 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym2660 := z.EncBinary() - _ = yym2660 + yym2753 := z.EncBinary() + _ = yym2753 if false { } else { h.encSliceNamespace(([]Namespace)(x.Items), e) @@ -33832,15 +35158,15 @@ func (x *NamespaceList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym2661 := z.EncBinary() - _ = yym2661 + yym2754 := z.EncBinary() + _ = yym2754 if false { } else { h.encSliceNamespace(([]Namespace)(x.Items), e) } } } - if yyr2647 || yy2arr2647 { + if yyr2740 || yy2arr2740 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -33853,25 +35179,25 @@ func (x *NamespaceList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2662 := z.DecBinary() - _ = yym2662 + yym2755 := z.DecBinary() + _ = yym2755 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2663 := r.ContainerType() - if yyct2663 == codecSelferValueTypeMap1234 { - yyl2663 := r.ReadMapStart() - if yyl2663 == 0 { + yyct2756 := r.ContainerType() + if yyct2756 == codecSelferValueTypeMap1234 { + yyl2756 := r.ReadMapStart() + if yyl2756 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2663, d) + x.codecDecodeSelfFromMap(yyl2756, d) } - } else if yyct2663 == codecSelferValueTypeArray1234 { - yyl2663 := r.ReadArrayStart() - if yyl2663 == 0 { + } else if yyct2756 == codecSelferValueTypeArray1234 { + yyl2756 := r.ReadArrayStart() + if yyl2756 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2663, d) + x.codecDecodeSelfFromArray(yyl2756, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -33883,12 +35209,12 @@ func (x *NamespaceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2664Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2664Slc - var yyhl2664 bool = l >= 0 - for yyj2664 := 0; ; yyj2664++ { - if yyhl2664 { - if yyj2664 >= l { + var yys2757Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2757Slc + var yyhl2757 bool = l >= 0 + for yyj2757 := 0; ; yyj2757++ { + if yyhl2757 { + if yyj2757 >= l { break } } else { @@ -33897,10 +35223,10 @@ func (x *NamespaceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2664Slc = r.DecodeBytes(yys2664Slc, true, true) - yys2664 := string(yys2664Slc) + yys2757Slc = r.DecodeBytes(yys2757Slc, true, true) + yys2757 := string(yys2757Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2664 { + switch yys2757 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -33917,31 +35243,31 @@ func (x *NamespaceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv2667 := &x.ListMeta - yym2668 := z.DecBinary() - _ = yym2668 + yyv2760 := &x.ListMeta + yym2761 := z.DecBinary() + _ = yym2761 if false { - } else if z.HasExtensions() && z.DecExt(yyv2667) { + } else if z.HasExtensions() && z.DecExt(yyv2760) { } else { - z.DecFallback(yyv2667, false) + z.DecFallback(yyv2760, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2669 := &x.Items - yym2670 := z.DecBinary() - _ = yym2670 + yyv2762 := &x.Items + yym2763 := z.DecBinary() + _ = yym2763 if false { } else { - h.decSliceNamespace((*[]Namespace)(yyv2669), d) + h.decSliceNamespace((*[]Namespace)(yyv2762), d) } } default: - z.DecStructFieldNotFound(-1, yys2664) - } // end switch yys2664 - } // end for yyj2664 + z.DecStructFieldNotFound(-1, yys2757) + } // end switch yys2757 + } // end for yyj2757 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -33949,16 +35275,16 @@ func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2671 int - var yyb2671 bool - var yyhl2671 bool = l >= 0 - yyj2671++ - if yyhl2671 { - yyb2671 = yyj2671 > l + var yyj2764 int + var yyb2764 bool + var yyhl2764 bool = l >= 0 + yyj2764++ + if yyhl2764 { + yyb2764 = yyj2764 > l } else { - yyb2671 = r.CheckBreak() + yyb2764 = r.CheckBreak() } - if yyb2671 { + if yyb2764 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33968,13 +35294,13 @@ func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2671++ - if yyhl2671 { - yyb2671 = yyj2671 > l + yyj2764++ + if yyhl2764 { + yyb2764 = yyj2764 > l } else { - yyb2671 = r.CheckBreak() + yyb2764 = r.CheckBreak() } - if yyb2671 { + if yyb2764 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33984,13 +35310,13 @@ func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2671++ - if yyhl2671 { - yyb2671 = yyj2671 > l + yyj2764++ + if yyhl2764 { + yyb2764 = yyj2764 > l } else { - yyb2671 = r.CheckBreak() + yyb2764 = r.CheckBreak() } - if yyb2671 { + if yyb2764 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33998,22 +35324,22 @@ func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv2674 := &x.ListMeta - yym2675 := z.DecBinary() - _ = yym2675 + yyv2767 := &x.ListMeta + yym2768 := z.DecBinary() + _ = yym2768 if false { - } else if z.HasExtensions() && z.DecExt(yyv2674) { + } else if z.HasExtensions() && z.DecExt(yyv2767) { } else { - z.DecFallback(yyv2674, false) + z.DecFallback(yyv2767, false) } } - yyj2671++ - if yyhl2671 { - yyb2671 = yyj2671 > l + yyj2764++ + if yyhl2764 { + yyb2764 = yyj2764 > l } else { - yyb2671 = r.CheckBreak() + yyb2764 = r.CheckBreak() } - if yyb2671 { + if yyb2764 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34021,26 +35347,26 @@ func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2676 := &x.Items - yym2677 := z.DecBinary() - _ = yym2677 + yyv2769 := &x.Items + yym2770 := z.DecBinary() + _ = yym2770 if false { } else { - h.decSliceNamespace((*[]Namespace)(yyv2676), d) + h.decSliceNamespace((*[]Namespace)(yyv2769), d) } } for { - yyj2671++ - if yyhl2671 { - yyb2671 = yyj2671 > l + yyj2764++ + if yyhl2764 { + yyb2764 = yyj2764 > l } else { - yyb2671 = r.CheckBreak() + yyb2764 = r.CheckBreak() } - if yyb2671 { + if yyb2764 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2671-1, "") + z.DecStructFieldNotFound(yyj2764-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -34052,37 +35378,37 @@ func (x *Binding) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2678 := z.EncBinary() - _ = yym2678 + yym2771 := z.EncBinary() + _ = yym2771 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2679 := !z.EncBinary() - yy2arr2679 := z.EncBasicHandle().StructToArray - var yyq2679 [4]bool - _, _, _ = yysep2679, yyq2679, yy2arr2679 - const yyr2679 bool = false - yyq2679[0] = x.Kind != "" - yyq2679[1] = x.APIVersion != "" - yyq2679[2] = true - var yynn2679 int - if yyr2679 || yy2arr2679 { + yysep2772 := !z.EncBinary() + yy2arr2772 := z.EncBasicHandle().StructToArray + var yyq2772 [4]bool + _, _, _ = yysep2772, yyq2772, yy2arr2772 + const yyr2772 bool = false + yyq2772[0] = x.Kind != "" + yyq2772[1] = x.APIVersion != "" + yyq2772[2] = true + var yynn2772 int + if yyr2772 || yy2arr2772 { r.EncodeArrayStart(4) } else { - yynn2679 = 1 - for _, b := range yyq2679 { + yynn2772 = 1 + for _, b := range yyq2772 { if b { - yynn2679++ + yynn2772++ } } - r.EncodeMapStart(yynn2679) - yynn2679 = 0 + r.EncodeMapStart(yynn2772) + yynn2772 = 0 } - if yyr2679 || yy2arr2679 { + if yyr2772 || yy2arr2772 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2679[0] { - yym2681 := z.EncBinary() - _ = yym2681 + if yyq2772[0] { + yym2774 := z.EncBinary() + _ = yym2774 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -34091,23 +35417,23 @@ func (x *Binding) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2679[0] { + if yyq2772[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2682 := z.EncBinary() - _ = yym2682 + yym2775 := z.EncBinary() + _ = yym2775 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2679 || yy2arr2679 { + if yyr2772 || yy2arr2772 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2679[1] { - yym2684 := z.EncBinary() - _ = yym2684 + if yyq2772[1] { + yym2777 := z.EncBinary() + _ = yym2777 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -34116,47 +35442,47 @@ func (x *Binding) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2679[1] { + if yyq2772[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2685 := z.EncBinary() - _ = yym2685 + yym2778 := z.EncBinary() + _ = yym2778 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2679 || yy2arr2679 { + if yyr2772 || yy2arr2772 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2679[2] { - yy2687 := &x.ObjectMeta - yy2687.CodecEncodeSelf(e) + if yyq2772[2] { + yy2780 := &x.ObjectMeta + yy2780.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2679[2] { + if yyq2772[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2688 := &x.ObjectMeta - yy2688.CodecEncodeSelf(e) + yy2781 := &x.ObjectMeta + yy2781.CodecEncodeSelf(e) } } - if yyr2679 || yy2arr2679 { + if yyr2772 || yy2arr2772 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy2690 := &x.Target - yy2690.CodecEncodeSelf(e) + yy2783 := &x.Target + yy2783.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("target")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2691 := &x.Target - yy2691.CodecEncodeSelf(e) + yy2784 := &x.Target + yy2784.CodecEncodeSelf(e) } - if yyr2679 || yy2arr2679 { + if yyr2772 || yy2arr2772 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -34169,25 +35495,25 @@ func (x *Binding) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2692 := z.DecBinary() - _ = yym2692 + yym2785 := z.DecBinary() + _ = yym2785 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2693 := r.ContainerType() - if yyct2693 == codecSelferValueTypeMap1234 { - yyl2693 := r.ReadMapStart() - if yyl2693 == 0 { + yyct2786 := r.ContainerType() + if yyct2786 == codecSelferValueTypeMap1234 { + yyl2786 := r.ReadMapStart() + if yyl2786 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2693, d) + x.codecDecodeSelfFromMap(yyl2786, d) } - } else if yyct2693 == codecSelferValueTypeArray1234 { - yyl2693 := r.ReadArrayStart() - if yyl2693 == 0 { + } else if yyct2786 == codecSelferValueTypeArray1234 { + yyl2786 := r.ReadArrayStart() + if yyl2786 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2693, d) + x.codecDecodeSelfFromArray(yyl2786, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -34199,12 +35525,12 @@ func (x *Binding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2694Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2694Slc - var yyhl2694 bool = l >= 0 - for yyj2694 := 0; ; yyj2694++ { - if yyhl2694 { - if yyj2694 >= l { + var yys2787Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2787Slc + var yyhl2787 bool = l >= 0 + for yyj2787 := 0; ; yyj2787++ { + if yyhl2787 { + if yyj2787 >= l { break } } else { @@ -34213,10 +35539,10 @@ func (x *Binding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2694Slc = r.DecodeBytes(yys2694Slc, true, true) - yys2694 := string(yys2694Slc) + yys2787Slc = r.DecodeBytes(yys2787Slc, true, true) + yys2787 := string(yys2787Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2694 { + switch yys2787 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -34233,20 +35559,20 @@ func (x *Binding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv2697 := &x.ObjectMeta - yyv2697.CodecDecodeSelf(d) + yyv2790 := &x.ObjectMeta + yyv2790.CodecDecodeSelf(d) } case "target": if r.TryDecodeAsNil() { x.Target = ObjectReference{} } else { - yyv2698 := &x.Target - yyv2698.CodecDecodeSelf(d) + yyv2791 := &x.Target + yyv2791.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2694) - } // end switch yys2694 - } // end for yyj2694 + z.DecStructFieldNotFound(-1, yys2787) + } // end switch yys2787 + } // end for yyj2787 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -34254,16 +35580,16 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2699 int - var yyb2699 bool - var yyhl2699 bool = l >= 0 - yyj2699++ - if yyhl2699 { - yyb2699 = yyj2699 > l + var yyj2792 int + var yyb2792 bool + var yyhl2792 bool = l >= 0 + yyj2792++ + if yyhl2792 { + yyb2792 = yyj2792 > l } else { - yyb2699 = r.CheckBreak() + yyb2792 = r.CheckBreak() } - if yyb2699 { + if yyb2792 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34273,13 +35599,13 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2699++ - if yyhl2699 { - yyb2699 = yyj2699 > l + yyj2792++ + if yyhl2792 { + yyb2792 = yyj2792 > l } else { - yyb2699 = r.CheckBreak() + yyb2792 = r.CheckBreak() } - if yyb2699 { + if yyb2792 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34289,13 +35615,13 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2699++ - if yyhl2699 { - yyb2699 = yyj2699 > l + yyj2792++ + if yyhl2792 { + yyb2792 = yyj2792 > l } else { - yyb2699 = r.CheckBreak() + yyb2792 = r.CheckBreak() } - if yyb2699 { + if yyb2792 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34303,16 +35629,16 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv2702 := &x.ObjectMeta - yyv2702.CodecDecodeSelf(d) + yyv2795 := &x.ObjectMeta + yyv2795.CodecDecodeSelf(d) } - yyj2699++ - if yyhl2699 { - yyb2699 = yyj2699 > l + yyj2792++ + if yyhl2792 { + yyb2792 = yyj2792 > l } else { - yyb2699 = r.CheckBreak() + yyb2792 = r.CheckBreak() } - if yyb2699 { + if yyb2792 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34320,21 +35646,21 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Target = ObjectReference{} } else { - yyv2703 := &x.Target - yyv2703.CodecDecodeSelf(d) + yyv2796 := &x.Target + yyv2796.CodecDecodeSelf(d) } for { - yyj2699++ - if yyhl2699 { - yyb2699 = yyj2699 > l + yyj2792++ + if yyhl2792 { + yyb2792 = yyj2792 > l } else { - yyb2699 = r.CheckBreak() + yyb2792 = r.CheckBreak() } - if yyb2699 { + if yyb2792 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2699-1, "") + z.DecStructFieldNotFound(yyj2792-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -34346,36 +35672,36 @@ func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2704 := z.EncBinary() - _ = yym2704 + yym2797 := z.EncBinary() + _ = yym2797 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2705 := !z.EncBinary() - yy2arr2705 := z.EncBasicHandle().StructToArray - var yyq2705 [3]bool - _, _, _ = yysep2705, yyq2705, yy2arr2705 - const yyr2705 bool = false - yyq2705[0] = x.Kind != "" - yyq2705[1] = x.APIVersion != "" - var yynn2705 int - if yyr2705 || yy2arr2705 { + yysep2798 := !z.EncBinary() + yy2arr2798 := z.EncBasicHandle().StructToArray + var yyq2798 [3]bool + _, _, _ = yysep2798, yyq2798, yy2arr2798 + const yyr2798 bool = false + yyq2798[0] = x.Kind != "" + yyq2798[1] = x.APIVersion != "" + var yynn2798 int + if yyr2798 || yy2arr2798 { r.EncodeArrayStart(3) } else { - yynn2705 = 1 - for _, b := range yyq2705 { + yynn2798 = 1 + for _, b := range yyq2798 { if b { - yynn2705++ + yynn2798++ } } - r.EncodeMapStart(yynn2705) - yynn2705 = 0 + r.EncodeMapStart(yynn2798) + yynn2798 = 0 } - if yyr2705 || yy2arr2705 { + if yyr2798 || yy2arr2798 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2705[0] { - yym2707 := z.EncBinary() - _ = yym2707 + if yyq2798[0] { + yym2800 := z.EncBinary() + _ = yym2800 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -34384,23 +35710,23 @@ func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2705[0] { + if yyq2798[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2708 := z.EncBinary() - _ = yym2708 + yym2801 := z.EncBinary() + _ = yym2801 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2705 || yy2arr2705 { + if yyr2798 || yy2arr2798 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2705[1] { - yym2710 := z.EncBinary() - _ = yym2710 + if yyq2798[1] { + yym2803 := z.EncBinary() + _ = yym2803 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -34409,29 +35735,29 @@ func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2705[1] { + if yyq2798[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2711 := z.EncBinary() - _ = yym2711 + yym2804 := z.EncBinary() + _ = yym2804 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2705 || yy2arr2705 { + if yyr2798 || yy2arr2798 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.GracePeriodSeconds == nil { r.EncodeNil() } else { - yy2713 := *x.GracePeriodSeconds - yym2714 := z.EncBinary() - _ = yym2714 + yy2806 := *x.GracePeriodSeconds + yym2807 := z.EncBinary() + _ = yym2807 if false { } else { - r.EncodeInt(int64(yy2713)) + r.EncodeInt(int64(yy2806)) } } } else { @@ -34441,16 +35767,16 @@ func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x.GracePeriodSeconds == nil { r.EncodeNil() } else { - yy2715 := *x.GracePeriodSeconds - yym2716 := z.EncBinary() - _ = yym2716 + yy2808 := *x.GracePeriodSeconds + yym2809 := z.EncBinary() + _ = yym2809 if false { } else { - r.EncodeInt(int64(yy2715)) + r.EncodeInt(int64(yy2808)) } } } - if yyr2705 || yy2arr2705 { + if yyr2798 || yy2arr2798 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -34463,25 +35789,25 @@ func (x *DeleteOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2717 := z.DecBinary() - _ = yym2717 + yym2810 := z.DecBinary() + _ = yym2810 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2718 := r.ContainerType() - if yyct2718 == codecSelferValueTypeMap1234 { - yyl2718 := r.ReadMapStart() - if yyl2718 == 0 { + yyct2811 := r.ContainerType() + if yyct2811 == codecSelferValueTypeMap1234 { + yyl2811 := r.ReadMapStart() + if yyl2811 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2718, d) + x.codecDecodeSelfFromMap(yyl2811, d) } - } else if yyct2718 == codecSelferValueTypeArray1234 { - yyl2718 := r.ReadArrayStart() - if yyl2718 == 0 { + } else if yyct2811 == codecSelferValueTypeArray1234 { + yyl2811 := r.ReadArrayStart() + if yyl2811 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2718, d) + x.codecDecodeSelfFromArray(yyl2811, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -34493,12 +35819,12 @@ func (x *DeleteOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2719Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2719Slc - var yyhl2719 bool = l >= 0 - for yyj2719 := 0; ; yyj2719++ { - if yyhl2719 { - if yyj2719 >= l { + var yys2812Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2812Slc + var yyhl2812 bool = l >= 0 + for yyj2812 := 0; ; yyj2812++ { + if yyhl2812 { + if yyj2812 >= l { break } } else { @@ -34507,10 +35833,10 @@ func (x *DeleteOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2719Slc = r.DecodeBytes(yys2719Slc, true, true) - yys2719 := string(yys2719Slc) + yys2812Slc = r.DecodeBytes(yys2812Slc, true, true) + yys2812 := string(yys2812Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2719 { + switch yys2812 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -34532,17 +35858,17 @@ func (x *DeleteOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.GracePeriodSeconds == nil { x.GracePeriodSeconds = new(int64) } - yym2723 := z.DecBinary() - _ = yym2723 + yym2816 := z.DecBinary() + _ = yym2816 if false { } else { *((*int64)(x.GracePeriodSeconds)) = int64(r.DecodeInt(64)) } } default: - z.DecStructFieldNotFound(-1, yys2719) - } // end switch yys2719 - } // end for yyj2719 + z.DecStructFieldNotFound(-1, yys2812) + } // end switch yys2812 + } // end for yyj2812 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -34550,16 +35876,16 @@ func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2724 int - var yyb2724 bool - var yyhl2724 bool = l >= 0 - yyj2724++ - if yyhl2724 { - yyb2724 = yyj2724 > l + var yyj2817 int + var yyb2817 bool + var yyhl2817 bool = l >= 0 + yyj2817++ + if yyhl2817 { + yyb2817 = yyj2817 > l } else { - yyb2724 = r.CheckBreak() + yyb2817 = r.CheckBreak() } - if yyb2724 { + if yyb2817 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34569,13 +35895,13 @@ func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2724++ - if yyhl2724 { - yyb2724 = yyj2724 > l + yyj2817++ + if yyhl2817 { + yyb2817 = yyj2817 > l } else { - yyb2724 = r.CheckBreak() + yyb2817 = r.CheckBreak() } - if yyb2724 { + if yyb2817 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34585,13 +35911,13 @@ func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2724++ - if yyhl2724 { - yyb2724 = yyj2724 > l + yyj2817++ + if yyhl2817 { + yyb2817 = yyj2817 > l } else { - yyb2724 = r.CheckBreak() + yyb2817 = r.CheckBreak() } - if yyb2724 { + if yyb2817 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34604,25 +35930,25 @@ func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.GracePeriodSeconds == nil { x.GracePeriodSeconds = new(int64) } - yym2728 := z.DecBinary() - _ = yym2728 + yym2821 := z.DecBinary() + _ = yym2821 if false { } else { *((*int64)(x.GracePeriodSeconds)) = int64(r.DecodeInt(64)) } } for { - yyj2724++ - if yyhl2724 { - yyb2724 = yyj2724 > l + yyj2817++ + if yyhl2817 { + yyb2817 = yyj2817 > l } else { - yyb2724 = r.CheckBreak() + yyb2817 = r.CheckBreak() } - if yyb2724 { + if yyb2817 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2724-1, "") + z.DecStructFieldNotFound(yyj2817-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -34634,36 +35960,36 @@ func (x *ExportOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2729 := z.EncBinary() - _ = yym2729 + yym2822 := z.EncBinary() + _ = yym2822 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2730 := !z.EncBinary() - yy2arr2730 := z.EncBasicHandle().StructToArray - var yyq2730 [4]bool - _, _, _ = yysep2730, yyq2730, yy2arr2730 - const yyr2730 bool = false - yyq2730[0] = x.Kind != "" - yyq2730[1] = x.APIVersion != "" - var yynn2730 int - if yyr2730 || yy2arr2730 { + yysep2823 := !z.EncBinary() + yy2arr2823 := z.EncBasicHandle().StructToArray + var yyq2823 [4]bool + _, _, _ = yysep2823, yyq2823, yy2arr2823 + const yyr2823 bool = false + yyq2823[0] = x.Kind != "" + yyq2823[1] = x.APIVersion != "" + var yynn2823 int + if yyr2823 || yy2arr2823 { r.EncodeArrayStart(4) } else { - yynn2730 = 2 - for _, b := range yyq2730 { + yynn2823 = 2 + for _, b := range yyq2823 { if b { - yynn2730++ + yynn2823++ } } - r.EncodeMapStart(yynn2730) - yynn2730 = 0 + r.EncodeMapStart(yynn2823) + yynn2823 = 0 } - if yyr2730 || yy2arr2730 { + if yyr2823 || yy2arr2823 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2730[0] { - yym2732 := z.EncBinary() - _ = yym2732 + if yyq2823[0] { + yym2825 := z.EncBinary() + _ = yym2825 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -34672,23 +35998,23 @@ func (x *ExportOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2730[0] { + if yyq2823[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2733 := z.EncBinary() - _ = yym2733 + yym2826 := z.EncBinary() + _ = yym2826 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2730 || yy2arr2730 { + if yyr2823 || yy2arr2823 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2730[1] { - yym2735 := z.EncBinary() - _ = yym2735 + if yyq2823[1] { + yym2828 := z.EncBinary() + _ = yym2828 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -34697,22 +36023,22 @@ func (x *ExportOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2730[1] { + if yyq2823[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2736 := z.EncBinary() - _ = yym2736 + yym2829 := z.EncBinary() + _ = yym2829 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2730 || yy2arr2730 { + if yyr2823 || yy2arr2823 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2738 := z.EncBinary() - _ = yym2738 + yym2831 := z.EncBinary() + _ = yym2831 if false { } else { r.EncodeBool(bool(x.Export)) @@ -34721,17 +36047,17 @@ func (x *ExportOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("export")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2739 := z.EncBinary() - _ = yym2739 + yym2832 := z.EncBinary() + _ = yym2832 if false { } else { r.EncodeBool(bool(x.Export)) } } - if yyr2730 || yy2arr2730 { + if yyr2823 || yy2arr2823 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2741 := z.EncBinary() - _ = yym2741 + yym2834 := z.EncBinary() + _ = yym2834 if false { } else { r.EncodeBool(bool(x.Exact)) @@ -34740,14 +36066,14 @@ func (x *ExportOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("exact")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2742 := z.EncBinary() - _ = yym2742 + yym2835 := z.EncBinary() + _ = yym2835 if false { } else { r.EncodeBool(bool(x.Exact)) } } - if yyr2730 || yy2arr2730 { + if yyr2823 || yy2arr2823 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -34760,25 +36086,25 @@ func (x *ExportOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2743 := z.DecBinary() - _ = yym2743 + yym2836 := z.DecBinary() + _ = yym2836 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2744 := r.ContainerType() - if yyct2744 == codecSelferValueTypeMap1234 { - yyl2744 := r.ReadMapStart() - if yyl2744 == 0 { + yyct2837 := r.ContainerType() + if yyct2837 == codecSelferValueTypeMap1234 { + yyl2837 := r.ReadMapStart() + if yyl2837 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2744, d) + x.codecDecodeSelfFromMap(yyl2837, d) } - } else if yyct2744 == codecSelferValueTypeArray1234 { - yyl2744 := r.ReadArrayStart() - if yyl2744 == 0 { + } else if yyct2837 == codecSelferValueTypeArray1234 { + yyl2837 := r.ReadArrayStart() + if yyl2837 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2744, d) + x.codecDecodeSelfFromArray(yyl2837, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -34790,12 +36116,12 @@ func (x *ExportOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2745Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2745Slc - var yyhl2745 bool = l >= 0 - for yyj2745 := 0; ; yyj2745++ { - if yyhl2745 { - if yyj2745 >= l { + var yys2838Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2838Slc + var yyhl2838 bool = l >= 0 + for yyj2838 := 0; ; yyj2838++ { + if yyhl2838 { + if yyj2838 >= l { break } } else { @@ -34804,10 +36130,10 @@ func (x *ExportOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2745Slc = r.DecodeBytes(yys2745Slc, true, true) - yys2745 := string(yys2745Slc) + yys2838Slc = r.DecodeBytes(yys2838Slc, true, true) + yys2838 := string(yys2838Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2745 { + switch yys2838 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -34833,9 +36159,9 @@ func (x *ExportOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Exact = bool(r.DecodeBool()) } default: - z.DecStructFieldNotFound(-1, yys2745) - } // end switch yys2745 - } // end for yyj2745 + z.DecStructFieldNotFound(-1, yys2838) + } // end switch yys2838 + } // end for yyj2838 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -34843,16 +36169,16 @@ func (x *ExportOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2750 int - var yyb2750 bool - var yyhl2750 bool = l >= 0 - yyj2750++ - if yyhl2750 { - yyb2750 = yyj2750 > l + var yyj2843 int + var yyb2843 bool + var yyhl2843 bool = l >= 0 + yyj2843++ + if yyhl2843 { + yyb2843 = yyj2843 > l } else { - yyb2750 = r.CheckBreak() + yyb2843 = r.CheckBreak() } - if yyb2750 { + if yyb2843 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34862,13 +36188,13 @@ func (x *ExportOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2750++ - if yyhl2750 { - yyb2750 = yyj2750 > l + yyj2843++ + if yyhl2843 { + yyb2843 = yyj2843 > l } else { - yyb2750 = r.CheckBreak() + yyb2843 = r.CheckBreak() } - if yyb2750 { + if yyb2843 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34878,13 +36204,13 @@ func (x *ExportOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2750++ - if yyhl2750 { - yyb2750 = yyj2750 > l + yyj2843++ + if yyhl2843 { + yyb2843 = yyj2843 > l } else { - yyb2750 = r.CheckBreak() + yyb2843 = r.CheckBreak() } - if yyb2750 { + if yyb2843 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34894,13 +36220,13 @@ func (x *ExportOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Export = bool(r.DecodeBool()) } - yyj2750++ - if yyhl2750 { - yyb2750 = yyj2750 > l + yyj2843++ + if yyhl2843 { + yyb2843 = yyj2843 > l } else { - yyb2750 = r.CheckBreak() + yyb2843 = r.CheckBreak() } - if yyb2750 { + if yyb2843 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34911,17 +36237,17 @@ func (x *ExportOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Exact = bool(r.DecodeBool()) } for { - yyj2750++ - if yyhl2750 { - yyb2750 = yyj2750 > l + yyj2843++ + if yyhl2843 { + yyb2843 = yyj2843 > l } else { - yyb2750 = r.CheckBreak() + yyb2843 = r.CheckBreak() } - if yyb2750 { + if yyb2843 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2750-1, "") + z.DecStructFieldNotFound(yyj2843-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -34933,36 +36259,36 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2755 := z.EncBinary() - _ = yym2755 + yym2848 := z.EncBinary() + _ = yym2848 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2756 := !z.EncBinary() - yy2arr2756 := z.EncBasicHandle().StructToArray - var yyq2756 [7]bool - _, _, _ = yysep2756, yyq2756, yy2arr2756 - const yyr2756 bool = false - yyq2756[0] = x.Kind != "" - yyq2756[1] = x.APIVersion != "" - var yynn2756 int - if yyr2756 || yy2arr2756 { + yysep2849 := !z.EncBinary() + yy2arr2849 := z.EncBasicHandle().StructToArray + var yyq2849 [7]bool + _, _, _ = yysep2849, yyq2849, yy2arr2849 + const yyr2849 bool = false + yyq2849[0] = x.Kind != "" + yyq2849[1] = x.APIVersion != "" + var yynn2849 int + if yyr2849 || yy2arr2849 { r.EncodeArrayStart(7) } else { - yynn2756 = 5 - for _, b := range yyq2756 { + yynn2849 = 5 + for _, b := range yyq2849 { if b { - yynn2756++ + yynn2849++ } } - r.EncodeMapStart(yynn2756) - yynn2756 = 0 + r.EncodeMapStart(yynn2849) + yynn2849 = 0 } - if yyr2756 || yy2arr2756 { + if yyr2849 || yy2arr2849 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2756[0] { - yym2758 := z.EncBinary() - _ = yym2758 + if yyq2849[0] { + yym2851 := z.EncBinary() + _ = yym2851 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -34971,23 +36297,23 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2756[0] { + if yyq2849[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2759 := z.EncBinary() - _ = yym2759 + yym2852 := z.EncBinary() + _ = yym2852 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2756 || yy2arr2756 { + if yyr2849 || yy2arr2849 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2756[1] { - yym2761 := z.EncBinary() - _ = yym2761 + if yyq2849[1] { + yym2854 := z.EncBinary() + _ = yym2854 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -34996,25 +36322,25 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2756[1] { + if yyq2849[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2762 := z.EncBinary() - _ = yym2762 + yym2855 := z.EncBinary() + _ = yym2855 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2756 || yy2arr2756 { + if yyr2849 || yy2arr2849 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.LabelSelector == nil { r.EncodeNil() } else { - yym2764 := z.EncBinary() - _ = yym2764 + yym2857 := z.EncBinary() + _ = yym2857 if false { } else if z.HasExtensions() && z.EncExt(x.LabelSelector) { } else { @@ -35028,8 +36354,8 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x.LabelSelector == nil { r.EncodeNil() } else { - yym2765 := z.EncBinary() - _ = yym2765 + yym2858 := z.EncBinary() + _ = yym2858 if false { } else if z.HasExtensions() && z.EncExt(x.LabelSelector) { } else { @@ -35037,13 +36363,13 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2756 || yy2arr2756 { + if yyr2849 || yy2arr2849 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.FieldSelector == nil { r.EncodeNil() } else { - yym2767 := z.EncBinary() - _ = yym2767 + yym2860 := z.EncBinary() + _ = yym2860 if false { } else if z.HasExtensions() && z.EncExt(x.FieldSelector) { } else { @@ -35057,8 +36383,8 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x.FieldSelector == nil { r.EncodeNil() } else { - yym2768 := z.EncBinary() - _ = yym2768 + yym2861 := z.EncBinary() + _ = yym2861 if false { } else if z.HasExtensions() && z.EncExt(x.FieldSelector) { } else { @@ -35066,10 +36392,10 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2756 || yy2arr2756 { + if yyr2849 || yy2arr2849 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2770 := z.EncBinary() - _ = yym2770 + yym2863 := z.EncBinary() + _ = yym2863 if false { } else { r.EncodeBool(bool(x.Watch)) @@ -35078,17 +36404,17 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Watch")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2771 := z.EncBinary() - _ = yym2771 + yym2864 := z.EncBinary() + _ = yym2864 if false { } else { r.EncodeBool(bool(x.Watch)) } } - if yyr2756 || yy2arr2756 { + if yyr2849 || yy2arr2849 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2773 := z.EncBinary() - _ = yym2773 + yym2866 := z.EncBinary() + _ = yym2866 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) @@ -35097,24 +36423,24 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("ResourceVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2774 := z.EncBinary() - _ = yym2774 + yym2867 := z.EncBinary() + _ = yym2867 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) } } - if yyr2756 || yy2arr2756 { + if yyr2849 || yy2arr2849 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.TimeoutSeconds == nil { r.EncodeNil() } else { - yy2776 := *x.TimeoutSeconds - yym2777 := z.EncBinary() - _ = yym2777 + yy2869 := *x.TimeoutSeconds + yym2870 := z.EncBinary() + _ = yym2870 if false { } else { - r.EncodeInt(int64(yy2776)) + r.EncodeInt(int64(yy2869)) } } } else { @@ -35124,16 +36450,16 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x.TimeoutSeconds == nil { r.EncodeNil() } else { - yy2778 := *x.TimeoutSeconds - yym2779 := z.EncBinary() - _ = yym2779 + yy2871 := *x.TimeoutSeconds + yym2872 := z.EncBinary() + _ = yym2872 if false { } else { - r.EncodeInt(int64(yy2778)) + r.EncodeInt(int64(yy2871)) } } } - if yyr2756 || yy2arr2756 { + if yyr2849 || yy2arr2849 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -35146,25 +36472,25 @@ func (x *ListOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2780 := z.DecBinary() - _ = yym2780 + yym2873 := z.DecBinary() + _ = yym2873 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2781 := r.ContainerType() - if yyct2781 == codecSelferValueTypeMap1234 { - yyl2781 := r.ReadMapStart() - if yyl2781 == 0 { + yyct2874 := r.ContainerType() + if yyct2874 == codecSelferValueTypeMap1234 { + yyl2874 := r.ReadMapStart() + if yyl2874 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2781, d) + x.codecDecodeSelfFromMap(yyl2874, d) } - } else if yyct2781 == codecSelferValueTypeArray1234 { - yyl2781 := r.ReadArrayStart() - if yyl2781 == 0 { + } else if yyct2874 == codecSelferValueTypeArray1234 { + yyl2874 := r.ReadArrayStart() + if yyl2874 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2781, d) + x.codecDecodeSelfFromArray(yyl2874, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -35176,12 +36502,12 @@ func (x *ListOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2782Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2782Slc - var yyhl2782 bool = l >= 0 - for yyj2782 := 0; ; yyj2782++ { - if yyhl2782 { - if yyj2782 >= l { + var yys2875Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2875Slc + var yyhl2875 bool = l >= 0 + for yyj2875 := 0; ; yyj2875++ { + if yyhl2875 { + if yyj2875 >= l { break } } else { @@ -35190,10 +36516,10 @@ func (x *ListOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2782Slc = r.DecodeBytes(yys2782Slc, true, true) - yys2782 := string(yys2782Slc) + yys2875Slc = r.DecodeBytes(yys2875Slc, true, true) + yys2875 := string(yys2875Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2782 { + switch yys2875 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -35210,26 +36536,26 @@ func (x *ListOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.LabelSelector = nil } else { - yyv2785 := &x.LabelSelector - yym2786 := z.DecBinary() - _ = yym2786 + yyv2878 := &x.LabelSelector + yym2879 := z.DecBinary() + _ = yym2879 if false { - } else if z.HasExtensions() && z.DecExt(yyv2785) { + } else if z.HasExtensions() && z.DecExt(yyv2878) { } else { - z.DecFallback(yyv2785, true) + z.DecFallback(yyv2878, true) } } case "FieldSelector": if r.TryDecodeAsNil() { x.FieldSelector = nil } else { - yyv2787 := &x.FieldSelector - yym2788 := z.DecBinary() - _ = yym2788 + yyv2880 := &x.FieldSelector + yym2881 := z.DecBinary() + _ = yym2881 if false { - } else if z.HasExtensions() && z.DecExt(yyv2787) { + } else if z.HasExtensions() && z.DecExt(yyv2880) { } else { - z.DecFallback(yyv2787, true) + z.DecFallback(yyv2880, true) } } case "Watch": @@ -35253,17 +36579,17 @@ func (x *ListOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.TimeoutSeconds == nil { x.TimeoutSeconds = new(int64) } - yym2792 := z.DecBinary() - _ = yym2792 + yym2885 := z.DecBinary() + _ = yym2885 if false { } else { *((*int64)(x.TimeoutSeconds)) = int64(r.DecodeInt(64)) } } default: - z.DecStructFieldNotFound(-1, yys2782) - } // end switch yys2782 - } // end for yyj2782 + z.DecStructFieldNotFound(-1, yys2875) + } // end switch yys2875 + } // end for yyj2875 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -35271,16 +36597,16 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2793 int - var yyb2793 bool - var yyhl2793 bool = l >= 0 - yyj2793++ - if yyhl2793 { - yyb2793 = yyj2793 > l + var yyj2886 int + var yyb2886 bool + var yyhl2886 bool = l >= 0 + yyj2886++ + if yyhl2886 { + yyb2886 = yyj2886 > l } else { - yyb2793 = r.CheckBreak() + yyb2886 = r.CheckBreak() } - if yyb2793 { + if yyb2886 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35290,13 +36616,13 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2793++ - if yyhl2793 { - yyb2793 = yyj2793 > l + yyj2886++ + if yyhl2886 { + yyb2886 = yyj2886 > l } else { - yyb2793 = r.CheckBreak() + yyb2886 = r.CheckBreak() } - if yyb2793 { + if yyb2886 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35306,13 +36632,13 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2793++ - if yyhl2793 { - yyb2793 = yyj2793 > l + yyj2886++ + if yyhl2886 { + yyb2886 = yyj2886 > l } else { - yyb2793 = r.CheckBreak() + yyb2886 = r.CheckBreak() } - if yyb2793 { + if yyb2886 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35320,22 +36646,22 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.LabelSelector = nil } else { - yyv2796 := &x.LabelSelector - yym2797 := z.DecBinary() - _ = yym2797 + yyv2889 := &x.LabelSelector + yym2890 := z.DecBinary() + _ = yym2890 if false { - } else if z.HasExtensions() && z.DecExt(yyv2796) { + } else if z.HasExtensions() && z.DecExt(yyv2889) { } else { - z.DecFallback(yyv2796, true) + z.DecFallback(yyv2889, true) } } - yyj2793++ - if yyhl2793 { - yyb2793 = yyj2793 > l + yyj2886++ + if yyhl2886 { + yyb2886 = yyj2886 > l } else { - yyb2793 = r.CheckBreak() + yyb2886 = r.CheckBreak() } - if yyb2793 { + if yyb2886 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35343,22 +36669,22 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.FieldSelector = nil } else { - yyv2798 := &x.FieldSelector - yym2799 := z.DecBinary() - _ = yym2799 + yyv2891 := &x.FieldSelector + yym2892 := z.DecBinary() + _ = yym2892 if false { - } else if z.HasExtensions() && z.DecExt(yyv2798) { + } else if z.HasExtensions() && z.DecExt(yyv2891) { } else { - z.DecFallback(yyv2798, true) + z.DecFallback(yyv2891, true) } } - yyj2793++ - if yyhl2793 { - yyb2793 = yyj2793 > l + yyj2886++ + if yyhl2886 { + yyb2886 = yyj2886 > l } else { - yyb2793 = r.CheckBreak() + yyb2886 = r.CheckBreak() } - if yyb2793 { + if yyb2886 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35368,13 +36694,13 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Watch = bool(r.DecodeBool()) } - yyj2793++ - if yyhl2793 { - yyb2793 = yyj2793 > l + yyj2886++ + if yyhl2886 { + yyb2886 = yyj2886 > l } else { - yyb2793 = r.CheckBreak() + yyb2886 = r.CheckBreak() } - if yyb2793 { + if yyb2886 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35384,13 +36710,13 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.ResourceVersion = string(r.DecodeString()) } - yyj2793++ - if yyhl2793 { - yyb2793 = yyj2793 > l + yyj2886++ + if yyhl2886 { + yyb2886 = yyj2886 > l } else { - yyb2793 = r.CheckBreak() + yyb2886 = r.CheckBreak() } - if yyb2793 { + if yyb2886 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35403,25 +36729,25 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.TimeoutSeconds == nil { x.TimeoutSeconds = new(int64) } - yym2803 := z.DecBinary() - _ = yym2803 + yym2896 := z.DecBinary() + _ = yym2896 if false { } else { *((*int64)(x.TimeoutSeconds)) = int64(r.DecodeInt(64)) } } for { - yyj2793++ - if yyhl2793 { - yyb2793 = yyj2793 > l + yyj2886++ + if yyhl2886 { + yyb2886 = yyj2886 > l } else { - yyb2793 = r.CheckBreak() + yyb2886 = r.CheckBreak() } - if yyb2793 { + if yyb2886 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2793-1, "") + z.DecStructFieldNotFound(yyj2886-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -35433,36 +36759,36 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2804 := z.EncBinary() - _ = yym2804 + yym2897 := z.EncBinary() + _ = yym2897 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2805 := !z.EncBinary() - yy2arr2805 := z.EncBasicHandle().StructToArray - var yyq2805 [10]bool - _, _, _ = yysep2805, yyq2805, yy2arr2805 - const yyr2805 bool = false - yyq2805[0] = x.Kind != "" - yyq2805[1] = x.APIVersion != "" - var yynn2805 int - if yyr2805 || yy2arr2805 { + yysep2898 := !z.EncBinary() + yy2arr2898 := z.EncBasicHandle().StructToArray + var yyq2898 [10]bool + _, _, _ = yysep2898, yyq2898, yy2arr2898 + const yyr2898 bool = false + yyq2898[0] = x.Kind != "" + yyq2898[1] = x.APIVersion != "" + var yynn2898 int + if yyr2898 || yy2arr2898 { r.EncodeArrayStart(10) } else { - yynn2805 = 8 - for _, b := range yyq2805 { + yynn2898 = 8 + for _, b := range yyq2898 { if b { - yynn2805++ + yynn2898++ } } - r.EncodeMapStart(yynn2805) - yynn2805 = 0 + r.EncodeMapStart(yynn2898) + yynn2898 = 0 } - if yyr2805 || yy2arr2805 { + if yyr2898 || yy2arr2898 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2805[0] { - yym2807 := z.EncBinary() - _ = yym2807 + if yyq2898[0] { + yym2900 := z.EncBinary() + _ = yym2900 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -35471,23 +36797,23 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2805[0] { + if yyq2898[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2808 := z.EncBinary() - _ = yym2808 + yym2901 := z.EncBinary() + _ = yym2901 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2805 || yy2arr2805 { + if yyr2898 || yy2arr2898 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2805[1] { - yym2810 := z.EncBinary() - _ = yym2810 + if yyq2898[1] { + yym2903 := z.EncBinary() + _ = yym2903 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -35496,22 +36822,22 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2805[1] { + if yyq2898[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2811 := z.EncBinary() - _ = yym2811 + yym2904 := z.EncBinary() + _ = yym2904 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2805 || yy2arr2805 { + if yyr2898 || yy2arr2898 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2813 := z.EncBinary() - _ = yym2813 + yym2906 := z.EncBinary() + _ = yym2906 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Container)) @@ -35520,17 +36846,17 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Container")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2814 := z.EncBinary() - _ = yym2814 + yym2907 := z.EncBinary() + _ = yym2907 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Container)) } } - if yyr2805 || yy2arr2805 { + if yyr2898 || yy2arr2898 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2816 := z.EncBinary() - _ = yym2816 + yym2909 := z.EncBinary() + _ = yym2909 if false { } else { r.EncodeBool(bool(x.Follow)) @@ -35539,17 +36865,17 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Follow")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2817 := z.EncBinary() - _ = yym2817 + yym2910 := z.EncBinary() + _ = yym2910 if false { } else { r.EncodeBool(bool(x.Follow)) } } - if yyr2805 || yy2arr2805 { + if yyr2898 || yy2arr2898 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2819 := z.EncBinary() - _ = yym2819 + yym2912 := z.EncBinary() + _ = yym2912 if false { } else { r.EncodeBool(bool(x.Previous)) @@ -35558,24 +36884,24 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Previous")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2820 := z.EncBinary() - _ = yym2820 + yym2913 := z.EncBinary() + _ = yym2913 if false { } else { r.EncodeBool(bool(x.Previous)) } } - if yyr2805 || yy2arr2805 { + if yyr2898 || yy2arr2898 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.SinceSeconds == nil { r.EncodeNil() } else { - yy2822 := *x.SinceSeconds - yym2823 := z.EncBinary() - _ = yym2823 + yy2915 := *x.SinceSeconds + yym2916 := z.EncBinary() + _ = yym2916 if false { } else { - r.EncodeInt(int64(yy2822)) + r.EncodeInt(int64(yy2915)) } } } else { @@ -35585,27 +36911,27 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x.SinceSeconds == nil { r.EncodeNil() } else { - yy2824 := *x.SinceSeconds - yym2825 := z.EncBinary() - _ = yym2825 + yy2917 := *x.SinceSeconds + yym2918 := z.EncBinary() + _ = yym2918 if false { } else { - r.EncodeInt(int64(yy2824)) + r.EncodeInt(int64(yy2917)) } } } - if yyr2805 || yy2arr2805 { + if yyr2898 || yy2arr2898 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.SinceTime == nil { r.EncodeNil() } else { - yym2827 := z.EncBinary() - _ = yym2827 + yym2920 := z.EncBinary() + _ = yym2920 if false { } else if z.HasExtensions() && z.EncExt(x.SinceTime) { - } else if yym2827 { + } else if yym2920 { z.EncBinaryMarshal(x.SinceTime) - } else if !yym2827 && z.IsJSONHandle() { + } else if !yym2920 && z.IsJSONHandle() { z.EncJSONMarshal(x.SinceTime) } else { z.EncFallback(x.SinceTime) @@ -35618,23 +36944,23 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x.SinceTime == nil { r.EncodeNil() } else { - yym2828 := z.EncBinary() - _ = yym2828 + yym2921 := z.EncBinary() + _ = yym2921 if false { } else if z.HasExtensions() && z.EncExt(x.SinceTime) { - } else if yym2828 { + } else if yym2921 { z.EncBinaryMarshal(x.SinceTime) - } else if !yym2828 && z.IsJSONHandle() { + } else if !yym2921 && z.IsJSONHandle() { z.EncJSONMarshal(x.SinceTime) } else { z.EncFallback(x.SinceTime) } } } - if yyr2805 || yy2arr2805 { + if yyr2898 || yy2arr2898 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2830 := z.EncBinary() - _ = yym2830 + yym2923 := z.EncBinary() + _ = yym2923 if false { } else { r.EncodeBool(bool(x.Timestamps)) @@ -35643,24 +36969,24 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Timestamps")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2831 := z.EncBinary() - _ = yym2831 + yym2924 := z.EncBinary() + _ = yym2924 if false { } else { r.EncodeBool(bool(x.Timestamps)) } } - if yyr2805 || yy2arr2805 { + if yyr2898 || yy2arr2898 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.TailLines == nil { r.EncodeNil() } else { - yy2833 := *x.TailLines - yym2834 := z.EncBinary() - _ = yym2834 + yy2926 := *x.TailLines + yym2927 := z.EncBinary() + _ = yym2927 if false { } else { - r.EncodeInt(int64(yy2833)) + r.EncodeInt(int64(yy2926)) } } } else { @@ -35670,26 +36996,26 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x.TailLines == nil { r.EncodeNil() } else { - yy2835 := *x.TailLines - yym2836 := z.EncBinary() - _ = yym2836 + yy2928 := *x.TailLines + yym2929 := z.EncBinary() + _ = yym2929 if false { } else { - r.EncodeInt(int64(yy2835)) + r.EncodeInt(int64(yy2928)) } } } - if yyr2805 || yy2arr2805 { + if yyr2898 || yy2arr2898 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.LimitBytes == nil { r.EncodeNil() } else { - yy2838 := *x.LimitBytes - yym2839 := z.EncBinary() - _ = yym2839 + yy2931 := *x.LimitBytes + yym2932 := z.EncBinary() + _ = yym2932 if false { } else { - r.EncodeInt(int64(yy2838)) + r.EncodeInt(int64(yy2931)) } } } else { @@ -35699,16 +37025,16 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x.LimitBytes == nil { r.EncodeNil() } else { - yy2840 := *x.LimitBytes - yym2841 := z.EncBinary() - _ = yym2841 + yy2933 := *x.LimitBytes + yym2934 := z.EncBinary() + _ = yym2934 if false { } else { - r.EncodeInt(int64(yy2840)) + r.EncodeInt(int64(yy2933)) } } } - if yyr2805 || yy2arr2805 { + if yyr2898 || yy2arr2898 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -35721,25 +37047,25 @@ func (x *PodLogOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2842 := z.DecBinary() - _ = yym2842 + yym2935 := z.DecBinary() + _ = yym2935 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2843 := r.ContainerType() - if yyct2843 == codecSelferValueTypeMap1234 { - yyl2843 := r.ReadMapStart() - if yyl2843 == 0 { + yyct2936 := r.ContainerType() + if yyct2936 == codecSelferValueTypeMap1234 { + yyl2936 := r.ReadMapStart() + if yyl2936 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2843, d) + x.codecDecodeSelfFromMap(yyl2936, d) } - } else if yyct2843 == codecSelferValueTypeArray1234 { - yyl2843 := r.ReadArrayStart() - if yyl2843 == 0 { + } else if yyct2936 == codecSelferValueTypeArray1234 { + yyl2936 := r.ReadArrayStart() + if yyl2936 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2843, d) + x.codecDecodeSelfFromArray(yyl2936, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -35751,12 +37077,12 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2844Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2844Slc - var yyhl2844 bool = l >= 0 - for yyj2844 := 0; ; yyj2844++ { - if yyhl2844 { - if yyj2844 >= l { + var yys2937Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2937Slc + var yyhl2937 bool = l >= 0 + for yyj2937 := 0; ; yyj2937++ { + if yyhl2937 { + if yyj2937 >= l { break } } else { @@ -35765,10 +37091,10 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2844Slc = r.DecodeBytes(yys2844Slc, true, true) - yys2844 := string(yys2844Slc) + yys2937Slc = r.DecodeBytes(yys2937Slc, true, true) + yys2937 := string(yys2937Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2844 { + switch yys2937 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -35808,8 +37134,8 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.SinceSeconds == nil { x.SinceSeconds = new(int64) } - yym2851 := z.DecBinary() - _ = yym2851 + yym2944 := z.DecBinary() + _ = yym2944 if false { } else { *((*int64)(x.SinceSeconds)) = int64(r.DecodeInt(64)) @@ -35824,13 +37150,13 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.SinceTime == nil { x.SinceTime = new(pkg2_unversioned.Time) } - yym2853 := z.DecBinary() - _ = yym2853 + yym2946 := z.DecBinary() + _ = yym2946 if false { } else if z.HasExtensions() && z.DecExt(x.SinceTime) { - } else if yym2853 { + } else if yym2946 { z.DecBinaryUnmarshal(x.SinceTime) - } else if !yym2853 && z.IsJSONHandle() { + } else if !yym2946 && z.IsJSONHandle() { z.DecJSONUnmarshal(x.SinceTime) } else { z.DecFallback(x.SinceTime, false) @@ -35851,8 +37177,8 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.TailLines == nil { x.TailLines = new(int64) } - yym2856 := z.DecBinary() - _ = yym2856 + yym2949 := z.DecBinary() + _ = yym2949 if false { } else { *((*int64)(x.TailLines)) = int64(r.DecodeInt(64)) @@ -35867,17 +37193,17 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.LimitBytes == nil { x.LimitBytes = new(int64) } - yym2858 := z.DecBinary() - _ = yym2858 + yym2951 := z.DecBinary() + _ = yym2951 if false { } else { *((*int64)(x.LimitBytes)) = int64(r.DecodeInt(64)) } } default: - z.DecStructFieldNotFound(-1, yys2844) - } // end switch yys2844 - } // end for yyj2844 + z.DecStructFieldNotFound(-1, yys2937) + } // end switch yys2937 + } // end for yyj2937 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -35885,16 +37211,16 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2859 int - var yyb2859 bool - var yyhl2859 bool = l >= 0 - yyj2859++ - if yyhl2859 { - yyb2859 = yyj2859 > l + var yyj2952 int + var yyb2952 bool + var yyhl2952 bool = l >= 0 + yyj2952++ + if yyhl2952 { + yyb2952 = yyj2952 > l } else { - yyb2859 = r.CheckBreak() + yyb2952 = r.CheckBreak() } - if yyb2859 { + if yyb2952 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35904,13 +37230,13 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2859++ - if yyhl2859 { - yyb2859 = yyj2859 > l + yyj2952++ + if yyhl2952 { + yyb2952 = yyj2952 > l } else { - yyb2859 = r.CheckBreak() + yyb2952 = r.CheckBreak() } - if yyb2859 { + if yyb2952 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35920,13 +37246,13 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2859++ - if yyhl2859 { - yyb2859 = yyj2859 > l + yyj2952++ + if yyhl2952 { + yyb2952 = yyj2952 > l } else { - yyb2859 = r.CheckBreak() + yyb2952 = r.CheckBreak() } - if yyb2859 { + if yyb2952 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35936,13 +37262,13 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Container = string(r.DecodeString()) } - yyj2859++ - if yyhl2859 { - yyb2859 = yyj2859 > l + yyj2952++ + if yyhl2952 { + yyb2952 = yyj2952 > l } else { - yyb2859 = r.CheckBreak() + yyb2952 = r.CheckBreak() } - if yyb2859 { + if yyb2952 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35952,13 +37278,13 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Follow = bool(r.DecodeBool()) } - yyj2859++ - if yyhl2859 { - yyb2859 = yyj2859 > l + yyj2952++ + if yyhl2952 { + yyb2952 = yyj2952 > l } else { - yyb2859 = r.CheckBreak() + yyb2952 = r.CheckBreak() } - if yyb2859 { + if yyb2952 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35968,13 +37294,13 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Previous = bool(r.DecodeBool()) } - yyj2859++ - if yyhl2859 { - yyb2859 = yyj2859 > l + yyj2952++ + if yyhl2952 { + yyb2952 = yyj2952 > l } else { - yyb2859 = r.CheckBreak() + yyb2952 = r.CheckBreak() } - if yyb2859 { + if yyb2952 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35987,20 +37313,20 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.SinceSeconds == nil { x.SinceSeconds = new(int64) } - yym2866 := z.DecBinary() - _ = yym2866 + yym2959 := z.DecBinary() + _ = yym2959 if false { } else { *((*int64)(x.SinceSeconds)) = int64(r.DecodeInt(64)) } } - yyj2859++ - if yyhl2859 { - yyb2859 = yyj2859 > l + yyj2952++ + if yyhl2952 { + yyb2952 = yyj2952 > l } else { - yyb2859 = r.CheckBreak() + yyb2952 = r.CheckBreak() } - if yyb2859 { + if yyb2952 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36013,25 +37339,25 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.SinceTime == nil { x.SinceTime = new(pkg2_unversioned.Time) } - yym2868 := z.DecBinary() - _ = yym2868 + yym2961 := z.DecBinary() + _ = yym2961 if false { } else if z.HasExtensions() && z.DecExt(x.SinceTime) { - } else if yym2868 { + } else if yym2961 { z.DecBinaryUnmarshal(x.SinceTime) - } else if !yym2868 && z.IsJSONHandle() { + } else if !yym2961 && z.IsJSONHandle() { z.DecJSONUnmarshal(x.SinceTime) } else { z.DecFallback(x.SinceTime, false) } } - yyj2859++ - if yyhl2859 { - yyb2859 = yyj2859 > l + yyj2952++ + if yyhl2952 { + yyb2952 = yyj2952 > l } else { - yyb2859 = r.CheckBreak() + yyb2952 = r.CheckBreak() } - if yyb2859 { + if yyb2952 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36041,13 +37367,13 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Timestamps = bool(r.DecodeBool()) } - yyj2859++ - if yyhl2859 { - yyb2859 = yyj2859 > l + yyj2952++ + if yyhl2952 { + yyb2952 = yyj2952 > l } else { - yyb2859 = r.CheckBreak() + yyb2952 = r.CheckBreak() } - if yyb2859 { + if yyb2952 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36060,20 +37386,20 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.TailLines == nil { x.TailLines = new(int64) } - yym2871 := z.DecBinary() - _ = yym2871 + yym2964 := z.DecBinary() + _ = yym2964 if false { } else { *((*int64)(x.TailLines)) = int64(r.DecodeInt(64)) } } - yyj2859++ - if yyhl2859 { - yyb2859 = yyj2859 > l + yyj2952++ + if yyhl2952 { + yyb2952 = yyj2952 > l } else { - yyb2859 = r.CheckBreak() + yyb2952 = r.CheckBreak() } - if yyb2859 { + if yyb2952 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36086,25 +37412,25 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.LimitBytes == nil { x.LimitBytes = new(int64) } - yym2873 := z.DecBinary() - _ = yym2873 + yym2966 := z.DecBinary() + _ = yym2966 if false { } else { *((*int64)(x.LimitBytes)) = int64(r.DecodeInt(64)) } } for { - yyj2859++ - if yyhl2859 { - yyb2859 = yyj2859 > l + yyj2952++ + if yyhl2952 { + yyb2952 = yyj2952 > l } else { - yyb2859 = r.CheckBreak() + yyb2952 = r.CheckBreak() } - if yyb2859 { + if yyb2952 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2859-1, "") + z.DecStructFieldNotFound(yyj2952-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -36116,41 +37442,41 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2874 := z.EncBinary() - _ = yym2874 + yym2967 := z.EncBinary() + _ = yym2967 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2875 := !z.EncBinary() - yy2arr2875 := z.EncBasicHandle().StructToArray - var yyq2875 [7]bool - _, _, _ = yysep2875, yyq2875, yy2arr2875 - const yyr2875 bool = false - yyq2875[0] = x.Kind != "" - yyq2875[1] = x.APIVersion != "" - yyq2875[2] = x.Stdin != false - yyq2875[3] = x.Stdout != false - yyq2875[4] = x.Stderr != false - yyq2875[5] = x.TTY != false - yyq2875[6] = x.Container != "" - var yynn2875 int - if yyr2875 || yy2arr2875 { + yysep2968 := !z.EncBinary() + yy2arr2968 := z.EncBasicHandle().StructToArray + var yyq2968 [7]bool + _, _, _ = yysep2968, yyq2968, yy2arr2968 + const yyr2968 bool = false + yyq2968[0] = x.Kind != "" + yyq2968[1] = x.APIVersion != "" + yyq2968[2] = x.Stdin != false + yyq2968[3] = x.Stdout != false + yyq2968[4] = x.Stderr != false + yyq2968[5] = x.TTY != false + yyq2968[6] = x.Container != "" + var yynn2968 int + if yyr2968 || yy2arr2968 { r.EncodeArrayStart(7) } else { - yynn2875 = 0 - for _, b := range yyq2875 { + yynn2968 = 0 + for _, b := range yyq2968 { if b { - yynn2875++ + yynn2968++ } } - r.EncodeMapStart(yynn2875) - yynn2875 = 0 + r.EncodeMapStart(yynn2968) + yynn2968 = 0 } - if yyr2875 || yy2arr2875 { + if yyr2968 || yy2arr2968 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2875[0] { - yym2877 := z.EncBinary() - _ = yym2877 + if yyq2968[0] { + yym2970 := z.EncBinary() + _ = yym2970 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -36159,23 +37485,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2875[0] { + if yyq2968[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2878 := z.EncBinary() - _ = yym2878 + yym2971 := z.EncBinary() + _ = yym2971 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2875 || yy2arr2875 { + if yyr2968 || yy2arr2968 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2875[1] { - yym2880 := z.EncBinary() - _ = yym2880 + if yyq2968[1] { + yym2973 := z.EncBinary() + _ = yym2973 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -36184,23 +37510,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2875[1] { + if yyq2968[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2881 := z.EncBinary() - _ = yym2881 + yym2974 := z.EncBinary() + _ = yym2974 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2875 || yy2arr2875 { + if yyr2968 || yy2arr2968 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2875[2] { - yym2883 := z.EncBinary() - _ = yym2883 + if yyq2968[2] { + yym2976 := z.EncBinary() + _ = yym2976 if false { } else { r.EncodeBool(bool(x.Stdin)) @@ -36209,23 +37535,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq2875[2] { + if yyq2968[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("stdin")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2884 := z.EncBinary() - _ = yym2884 + yym2977 := z.EncBinary() + _ = yym2977 if false { } else { r.EncodeBool(bool(x.Stdin)) } } } - if yyr2875 || yy2arr2875 { + if yyr2968 || yy2arr2968 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2875[3] { - yym2886 := z.EncBinary() - _ = yym2886 + if yyq2968[3] { + yym2979 := z.EncBinary() + _ = yym2979 if false { } else { r.EncodeBool(bool(x.Stdout)) @@ -36234,23 +37560,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq2875[3] { + if yyq2968[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("stdout")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2887 := z.EncBinary() - _ = yym2887 + yym2980 := z.EncBinary() + _ = yym2980 if false { } else { r.EncodeBool(bool(x.Stdout)) } } } - if yyr2875 || yy2arr2875 { + if yyr2968 || yy2arr2968 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2875[4] { - yym2889 := z.EncBinary() - _ = yym2889 + if yyq2968[4] { + yym2982 := z.EncBinary() + _ = yym2982 if false { } else { r.EncodeBool(bool(x.Stderr)) @@ -36259,23 +37585,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq2875[4] { + if yyq2968[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("stderr")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2890 := z.EncBinary() - _ = yym2890 + yym2983 := z.EncBinary() + _ = yym2983 if false { } else { r.EncodeBool(bool(x.Stderr)) } } } - if yyr2875 || yy2arr2875 { + if yyr2968 || yy2arr2968 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2875[5] { - yym2892 := z.EncBinary() - _ = yym2892 + if yyq2968[5] { + yym2985 := z.EncBinary() + _ = yym2985 if false { } else { r.EncodeBool(bool(x.TTY)) @@ -36284,23 +37610,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq2875[5] { + if yyq2968[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("tty")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2893 := z.EncBinary() - _ = yym2893 + yym2986 := z.EncBinary() + _ = yym2986 if false { } else { r.EncodeBool(bool(x.TTY)) } } } - if yyr2875 || yy2arr2875 { + if yyr2968 || yy2arr2968 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2875[6] { - yym2895 := z.EncBinary() - _ = yym2895 + if yyq2968[6] { + yym2988 := z.EncBinary() + _ = yym2988 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Container)) @@ -36309,19 +37635,19 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2875[6] { + if yyq2968[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("container")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2896 := z.EncBinary() - _ = yym2896 + yym2989 := z.EncBinary() + _ = yym2989 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Container)) } } } - if yyr2875 || yy2arr2875 { + if yyr2968 || yy2arr2968 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -36334,25 +37660,25 @@ func (x *PodAttachOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2897 := z.DecBinary() - _ = yym2897 + yym2990 := z.DecBinary() + _ = yym2990 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2898 := r.ContainerType() - if yyct2898 == codecSelferValueTypeMap1234 { - yyl2898 := r.ReadMapStart() - if yyl2898 == 0 { + yyct2991 := r.ContainerType() + if yyct2991 == codecSelferValueTypeMap1234 { + yyl2991 := r.ReadMapStart() + if yyl2991 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2898, d) + x.codecDecodeSelfFromMap(yyl2991, d) } - } else if yyct2898 == codecSelferValueTypeArray1234 { - yyl2898 := r.ReadArrayStart() - if yyl2898 == 0 { + } else if yyct2991 == codecSelferValueTypeArray1234 { + yyl2991 := r.ReadArrayStart() + if yyl2991 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2898, d) + x.codecDecodeSelfFromArray(yyl2991, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -36364,12 +37690,12 @@ func (x *PodAttachOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2899Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2899Slc - var yyhl2899 bool = l >= 0 - for yyj2899 := 0; ; yyj2899++ { - if yyhl2899 { - if yyj2899 >= l { + var yys2992Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2992Slc + var yyhl2992 bool = l >= 0 + for yyj2992 := 0; ; yyj2992++ { + if yyhl2992 { + if yyj2992 >= l { break } } else { @@ -36378,10 +37704,10 @@ func (x *PodAttachOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2899Slc = r.DecodeBytes(yys2899Slc, true, true) - yys2899 := string(yys2899Slc) + yys2992Slc = r.DecodeBytes(yys2992Slc, true, true) + yys2992 := string(yys2992Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2899 { + switch yys2992 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -36425,9 +37751,9 @@ func (x *PodAttachOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Container = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys2899) - } // end switch yys2899 - } // end for yyj2899 + z.DecStructFieldNotFound(-1, yys2992) + } // end switch yys2992 + } // end for yyj2992 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -36435,16 +37761,16 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2907 int - var yyb2907 bool - var yyhl2907 bool = l >= 0 - yyj2907++ - if yyhl2907 { - yyb2907 = yyj2907 > l + var yyj3000 int + var yyb3000 bool + var yyhl3000 bool = l >= 0 + yyj3000++ + if yyhl3000 { + yyb3000 = yyj3000 > l } else { - yyb2907 = r.CheckBreak() + yyb3000 = r.CheckBreak() } - if yyb2907 { + if yyb3000 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36454,13 +37780,13 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Kind = string(r.DecodeString()) } - yyj2907++ - if yyhl2907 { - yyb2907 = yyj2907 > l + yyj3000++ + if yyhl3000 { + yyb3000 = yyj3000 > l } else { - yyb2907 = r.CheckBreak() + yyb3000 = r.CheckBreak() } - if yyb2907 { + if yyb3000 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36470,13 +37796,13 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.APIVersion = string(r.DecodeString()) } - yyj2907++ - if yyhl2907 { - yyb2907 = yyj2907 > l + yyj3000++ + if yyhl3000 { + yyb3000 = yyj3000 > l } else { - yyb2907 = r.CheckBreak() + yyb3000 = r.CheckBreak() } - if yyb2907 { + if yyb3000 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36486,13 +37812,13 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Stdin = bool(r.DecodeBool()) } - yyj2907++ - if yyhl2907 { - yyb2907 = yyj2907 > l + yyj3000++ + if yyhl3000 { + yyb3000 = yyj3000 > l } else { - yyb2907 = r.CheckBreak() + yyb3000 = r.CheckBreak() } - if yyb2907 { + if yyb3000 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36502,13 +37828,13 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Stdout = bool(r.DecodeBool()) } - yyj2907++ - if yyhl2907 { - yyb2907 = yyj2907 > l + yyj3000++ + if yyhl3000 { + yyb3000 = yyj3000 > l } else { - yyb2907 = r.CheckBreak() + yyb3000 = r.CheckBreak() } - if yyb2907 { + if yyb3000 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36518,13 +37844,13 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Stderr = bool(r.DecodeBool()) } - yyj2907++ - if yyhl2907 { - yyb2907 = yyj2907 > l + yyj3000++ + if yyhl3000 { + yyb3000 = yyj3000 > l } else { - yyb2907 = r.CheckBreak() + yyb3000 = r.CheckBreak() } - if yyb2907 { + if yyb3000 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36534,13 +37860,13 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.TTY = bool(r.DecodeBool()) } - yyj2907++ - if yyhl2907 { - yyb2907 = yyj2907 > l + yyj3000++ + if yyhl3000 { + yyb3000 = yyj3000 > l } else { - yyb2907 = r.CheckBreak() + yyb3000 = r.CheckBreak() } - if yyb2907 { + if yyb3000 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36551,17 +37877,17 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) x.Container = string(r.DecodeString()) } for { - yyj2907++ - if yyhl2907 { - yyb2907 = yyj2907 > l + yyj3000++ + if yyhl3000 { + yyb3000 = yyj3000 > l } else { - yyb2907 = r.CheckBreak() + yyb3000 = r.CheckBreak() } - if yyb2907 { + if yyb3000 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2907-1, "") + z.DecStructFieldNotFound(yyj3000-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -36573,36 +37899,36 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2915 := z.EncBinary() - _ = yym2915 + yym3008 := z.EncBinary() + _ = yym3008 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2916 := !z.EncBinary() - yy2arr2916 := z.EncBasicHandle().StructToArray - var yyq2916 [8]bool - _, _, _ = yysep2916, yyq2916, yy2arr2916 - const yyr2916 bool = false - yyq2916[0] = x.Kind != "" - yyq2916[1] = x.APIVersion != "" - var yynn2916 int - if yyr2916 || yy2arr2916 { + yysep3009 := !z.EncBinary() + yy2arr3009 := z.EncBasicHandle().StructToArray + var yyq3009 [8]bool + _, _, _ = yysep3009, yyq3009, yy2arr3009 + const yyr3009 bool = false + yyq3009[0] = x.Kind != "" + yyq3009[1] = x.APIVersion != "" + var yynn3009 int + if yyr3009 || yy2arr3009 { r.EncodeArrayStart(8) } else { - yynn2916 = 6 - for _, b := range yyq2916 { + yynn3009 = 6 + for _, b := range yyq3009 { if b { - yynn2916++ + yynn3009++ } } - r.EncodeMapStart(yynn2916) - yynn2916 = 0 + r.EncodeMapStart(yynn3009) + yynn3009 = 0 } - if yyr2916 || yy2arr2916 { + if yyr3009 || yy2arr3009 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2916[0] { - yym2918 := z.EncBinary() - _ = yym2918 + if yyq3009[0] { + yym3011 := z.EncBinary() + _ = yym3011 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -36611,23 +37937,23 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2916[0] { + if yyq3009[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2919 := z.EncBinary() - _ = yym2919 + yym3012 := z.EncBinary() + _ = yym3012 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2916 || yy2arr2916 { + if yyr3009 || yy2arr3009 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2916[1] { - yym2921 := z.EncBinary() - _ = yym2921 + if yyq3009[1] { + yym3014 := z.EncBinary() + _ = yym3014 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -36636,22 +37962,22 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2916[1] { + if yyq3009[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2922 := z.EncBinary() - _ = yym2922 + yym3015 := z.EncBinary() + _ = yym3015 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2916 || yy2arr2916 { + if yyr3009 || yy2arr3009 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2924 := z.EncBinary() - _ = yym2924 + yym3017 := z.EncBinary() + _ = yym3017 if false { } else { r.EncodeBool(bool(x.Stdin)) @@ -36660,17 +37986,17 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Stdin")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2925 := z.EncBinary() - _ = yym2925 + yym3018 := z.EncBinary() + _ = yym3018 if false { } else { r.EncodeBool(bool(x.Stdin)) } } - if yyr2916 || yy2arr2916 { + if yyr3009 || yy2arr3009 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2927 := z.EncBinary() - _ = yym2927 + yym3020 := z.EncBinary() + _ = yym3020 if false { } else { r.EncodeBool(bool(x.Stdout)) @@ -36679,17 +38005,17 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Stdout")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2928 := z.EncBinary() - _ = yym2928 + yym3021 := z.EncBinary() + _ = yym3021 if false { } else { r.EncodeBool(bool(x.Stdout)) } } - if yyr2916 || yy2arr2916 { + if yyr3009 || yy2arr3009 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2930 := z.EncBinary() - _ = yym2930 + yym3023 := z.EncBinary() + _ = yym3023 if false { } else { r.EncodeBool(bool(x.Stderr)) @@ -36698,17 +38024,17 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Stderr")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2931 := z.EncBinary() - _ = yym2931 + yym3024 := z.EncBinary() + _ = yym3024 if false { } else { r.EncodeBool(bool(x.Stderr)) } } - if yyr2916 || yy2arr2916 { + if yyr3009 || yy2arr3009 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2933 := z.EncBinary() - _ = yym2933 + yym3026 := z.EncBinary() + _ = yym3026 if false { } else { r.EncodeBool(bool(x.TTY)) @@ -36717,17 +38043,17 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("TTY")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2934 := z.EncBinary() - _ = yym2934 + yym3027 := z.EncBinary() + _ = yym3027 if false { } else { r.EncodeBool(bool(x.TTY)) } } - if yyr2916 || yy2arr2916 { + if yyr3009 || yy2arr3009 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2936 := z.EncBinary() - _ = yym2936 + yym3029 := z.EncBinary() + _ = yym3029 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Container)) @@ -36736,20 +38062,20 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Container")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2937 := z.EncBinary() - _ = yym2937 + yym3030 := z.EncBinary() + _ = yym3030 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Container)) } } - if yyr2916 || yy2arr2916 { + if yyr3009 || yy2arr3009 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Command == nil { r.EncodeNil() } else { - yym2939 := z.EncBinary() - _ = yym2939 + yym3032 := z.EncBinary() + _ = yym3032 if false { } else { z.F.EncSliceStringV(x.Command, false, e) @@ -36762,15 +38088,15 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x.Command == nil { r.EncodeNil() } else { - yym2940 := z.EncBinary() - _ = yym2940 + yym3033 := z.EncBinary() + _ = yym3033 if false { } else { z.F.EncSliceStringV(x.Command, false, e) } } } - if yyr2916 || yy2arr2916 { + if yyr3009 || yy2arr3009 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -36783,25 +38109,25 @@ func (x *PodExecOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2941 := z.DecBinary() - _ = yym2941 + yym3034 := z.DecBinary() + _ = yym3034 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2942 := r.ContainerType() - if yyct2942 == codecSelferValueTypeMap1234 { - yyl2942 := r.ReadMapStart() - if yyl2942 == 0 { + yyct3035 := r.ContainerType() + if yyct3035 == codecSelferValueTypeMap1234 { + yyl3035 := r.ReadMapStart() + if yyl3035 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2942, d) + x.codecDecodeSelfFromMap(yyl3035, d) } - } else if yyct2942 == codecSelferValueTypeArray1234 { - yyl2942 := r.ReadArrayStart() - if yyl2942 == 0 { + } else if yyct3035 == codecSelferValueTypeArray1234 { + yyl3035 := r.ReadArrayStart() + if yyl3035 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2942, d) + x.codecDecodeSelfFromArray(yyl3035, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -36813,12 +38139,12 @@ func (x *PodExecOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2943Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2943Slc - var yyhl2943 bool = l >= 0 - for yyj2943 := 0; ; yyj2943++ { - if yyhl2943 { - if yyj2943 >= l { + var yys3036Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3036Slc + var yyhl3036 bool = l >= 0 + for yyj3036 := 0; ; yyj3036++ { + if yyhl3036 { + if yyj3036 >= l { break } } else { @@ -36827,10 +38153,10 @@ func (x *PodExecOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2943Slc = r.DecodeBytes(yys2943Slc, true, true) - yys2943 := string(yys2943Slc) + yys3036Slc = r.DecodeBytes(yys3036Slc, true, true) + yys3036 := string(yys3036Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2943 { + switch yys3036 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -36877,18 +38203,18 @@ func (x *PodExecOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Command = nil } else { - yyv2951 := &x.Command - yym2952 := z.DecBinary() - _ = yym2952 + yyv3044 := &x.Command + yym3045 := z.DecBinary() + _ = yym3045 if false { } else { - z.F.DecSliceStringX(yyv2951, false, d) + z.F.DecSliceStringX(yyv3044, false, d) } } default: - z.DecStructFieldNotFound(-1, yys2943) - } // end switch yys2943 - } // end for yyj2943 + z.DecStructFieldNotFound(-1, yys3036) + } // end switch yys3036 + } // end for yyj3036 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -36896,16 +38222,16 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2953 int - var yyb2953 bool - var yyhl2953 bool = l >= 0 - yyj2953++ - if yyhl2953 { - yyb2953 = yyj2953 > l + var yyj3046 int + var yyb3046 bool + var yyhl3046 bool = l >= 0 + yyj3046++ + if yyhl3046 { + yyb3046 = yyj3046 > l } else { - yyb2953 = r.CheckBreak() + yyb3046 = r.CheckBreak() } - if yyb2953 { + if yyb3046 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36915,13 +38241,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2953++ - if yyhl2953 { - yyb2953 = yyj2953 > l + yyj3046++ + if yyhl3046 { + yyb3046 = yyj3046 > l } else { - yyb2953 = r.CheckBreak() + yyb3046 = r.CheckBreak() } - if yyb2953 { + if yyb3046 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36931,13 +38257,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2953++ - if yyhl2953 { - yyb2953 = yyj2953 > l + yyj3046++ + if yyhl3046 { + yyb3046 = yyj3046 > l } else { - yyb2953 = r.CheckBreak() + yyb3046 = r.CheckBreak() } - if yyb2953 { + if yyb3046 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36947,13 +38273,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Stdin = bool(r.DecodeBool()) } - yyj2953++ - if yyhl2953 { - yyb2953 = yyj2953 > l + yyj3046++ + if yyhl3046 { + yyb3046 = yyj3046 > l } else { - yyb2953 = r.CheckBreak() + yyb3046 = r.CheckBreak() } - if yyb2953 { + if yyb3046 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36963,13 +38289,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Stdout = bool(r.DecodeBool()) } - yyj2953++ - if yyhl2953 { - yyb2953 = yyj2953 > l + yyj3046++ + if yyhl3046 { + yyb3046 = yyj3046 > l } else { - yyb2953 = r.CheckBreak() + yyb3046 = r.CheckBreak() } - if yyb2953 { + if yyb3046 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36979,13 +38305,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Stderr = bool(r.DecodeBool()) } - yyj2953++ - if yyhl2953 { - yyb2953 = yyj2953 > l + yyj3046++ + if yyhl3046 { + yyb3046 = yyj3046 > l } else { - yyb2953 = r.CheckBreak() + yyb3046 = r.CheckBreak() } - if yyb2953 { + if yyb3046 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36995,13 +38321,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.TTY = bool(r.DecodeBool()) } - yyj2953++ - if yyhl2953 { - yyb2953 = yyj2953 > l + yyj3046++ + if yyhl3046 { + yyb3046 = yyj3046 > l } else { - yyb2953 = r.CheckBreak() + yyb3046 = r.CheckBreak() } - if yyb2953 { + if yyb3046 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37011,13 +38337,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Container = string(r.DecodeString()) } - yyj2953++ - if yyhl2953 { - yyb2953 = yyj2953 > l + yyj3046++ + if yyhl3046 { + yyb3046 = yyj3046 > l } else { - yyb2953 = r.CheckBreak() + yyb3046 = r.CheckBreak() } - if yyb2953 { + if yyb3046 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37025,26 +38351,26 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Command = nil } else { - yyv2961 := &x.Command - yym2962 := z.DecBinary() - _ = yym2962 + yyv3054 := &x.Command + yym3055 := z.DecBinary() + _ = yym3055 if false { } else { - z.F.DecSliceStringX(yyv2961, false, d) + z.F.DecSliceStringX(yyv3054, false, d) } } for { - yyj2953++ - if yyhl2953 { - yyb2953 = yyj2953 > l + yyj3046++ + if yyhl3046 { + yyb3046 = yyj3046 > l } else { - yyb2953 = r.CheckBreak() + yyb3046 = r.CheckBreak() } - if yyb2953 { + if yyb3046 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2953-1, "") + z.DecStructFieldNotFound(yyj3046-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -37056,36 +38382,36 @@ func (x *PodProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2963 := z.EncBinary() - _ = yym2963 + yym3056 := z.EncBinary() + _ = yym3056 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2964 := !z.EncBinary() - yy2arr2964 := z.EncBasicHandle().StructToArray - var yyq2964 [3]bool - _, _, _ = yysep2964, yyq2964, yy2arr2964 - const yyr2964 bool = false - yyq2964[0] = x.Kind != "" - yyq2964[1] = x.APIVersion != "" - var yynn2964 int - if yyr2964 || yy2arr2964 { + yysep3057 := !z.EncBinary() + yy2arr3057 := z.EncBasicHandle().StructToArray + var yyq3057 [3]bool + _, _, _ = yysep3057, yyq3057, yy2arr3057 + const yyr3057 bool = false + yyq3057[0] = x.Kind != "" + yyq3057[1] = x.APIVersion != "" + var yynn3057 int + if yyr3057 || yy2arr3057 { r.EncodeArrayStart(3) } else { - yynn2964 = 1 - for _, b := range yyq2964 { + yynn3057 = 1 + for _, b := range yyq3057 { if b { - yynn2964++ + yynn3057++ } } - r.EncodeMapStart(yynn2964) - yynn2964 = 0 + r.EncodeMapStart(yynn3057) + yynn3057 = 0 } - if yyr2964 || yy2arr2964 { + if yyr3057 || yy2arr3057 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2964[0] { - yym2966 := z.EncBinary() - _ = yym2966 + if yyq3057[0] { + yym3059 := z.EncBinary() + _ = yym3059 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -37094,23 +38420,23 @@ func (x *PodProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2964[0] { + if yyq3057[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2967 := z.EncBinary() - _ = yym2967 + yym3060 := z.EncBinary() + _ = yym3060 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2964 || yy2arr2964 { + if yyr3057 || yy2arr3057 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2964[1] { - yym2969 := z.EncBinary() - _ = yym2969 + if yyq3057[1] { + yym3062 := z.EncBinary() + _ = yym3062 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -37119,22 +38445,22 @@ func (x *PodProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2964[1] { + if yyq3057[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2970 := z.EncBinary() - _ = yym2970 + yym3063 := z.EncBinary() + _ = yym3063 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2964 || yy2arr2964 { + if yyr3057 || yy2arr3057 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2972 := z.EncBinary() - _ = yym2972 + yym3065 := z.EncBinary() + _ = yym3065 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) @@ -37143,14 +38469,14 @@ func (x *PodProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Path")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2973 := z.EncBinary() - _ = yym2973 + yym3066 := z.EncBinary() + _ = yym3066 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) } } - if yyr2964 || yy2arr2964 { + if yyr3057 || yy2arr3057 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -37163,25 +38489,25 @@ func (x *PodProxyOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2974 := z.DecBinary() - _ = yym2974 + yym3067 := z.DecBinary() + _ = yym3067 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2975 := r.ContainerType() - if yyct2975 == codecSelferValueTypeMap1234 { - yyl2975 := r.ReadMapStart() - if yyl2975 == 0 { + yyct3068 := r.ContainerType() + if yyct3068 == codecSelferValueTypeMap1234 { + yyl3068 := r.ReadMapStart() + if yyl3068 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2975, d) + x.codecDecodeSelfFromMap(yyl3068, d) } - } else if yyct2975 == codecSelferValueTypeArray1234 { - yyl2975 := r.ReadArrayStart() - if yyl2975 == 0 { + } else if yyct3068 == codecSelferValueTypeArray1234 { + yyl3068 := r.ReadArrayStart() + if yyl3068 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2975, d) + x.codecDecodeSelfFromArray(yyl3068, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -37193,12 +38519,12 @@ func (x *PodProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2976Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2976Slc - var yyhl2976 bool = l >= 0 - for yyj2976 := 0; ; yyj2976++ { - if yyhl2976 { - if yyj2976 >= l { + var yys3069Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3069Slc + var yyhl3069 bool = l >= 0 + for yyj3069 := 0; ; yyj3069++ { + if yyhl3069 { + if yyj3069 >= l { break } } else { @@ -37207,10 +38533,10 @@ func (x *PodProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2976Slc = r.DecodeBytes(yys2976Slc, true, true) - yys2976 := string(yys2976Slc) + yys3069Slc = r.DecodeBytes(yys3069Slc, true, true) + yys3069 := string(yys3069Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2976 { + switch yys3069 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -37230,9 +38556,9 @@ func (x *PodProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Path = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys2976) - } // end switch yys2976 - } // end for yyj2976 + z.DecStructFieldNotFound(-1, yys3069) + } // end switch yys3069 + } // end for yyj3069 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -37240,16 +38566,16 @@ func (x *PodProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2980 int - var yyb2980 bool - var yyhl2980 bool = l >= 0 - yyj2980++ - if yyhl2980 { - yyb2980 = yyj2980 > l + var yyj3073 int + var yyb3073 bool + var yyhl3073 bool = l >= 0 + yyj3073++ + if yyhl3073 { + yyb3073 = yyj3073 > l } else { - yyb2980 = r.CheckBreak() + yyb3073 = r.CheckBreak() } - if yyb2980 { + if yyb3073 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37259,13 +38585,13 @@ func (x *PodProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Kind = string(r.DecodeString()) } - yyj2980++ - if yyhl2980 { - yyb2980 = yyj2980 > l + yyj3073++ + if yyhl3073 { + yyb3073 = yyj3073 > l } else { - yyb2980 = r.CheckBreak() + yyb3073 = r.CheckBreak() } - if yyb2980 { + if yyb3073 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37275,13 +38601,13 @@ func (x *PodProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.APIVersion = string(r.DecodeString()) } - yyj2980++ - if yyhl2980 { - yyb2980 = yyj2980 > l + yyj3073++ + if yyhl3073 { + yyb3073 = yyj3073 > l } else { - yyb2980 = r.CheckBreak() + yyb3073 = r.CheckBreak() } - if yyb2980 { + if yyb3073 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37292,17 +38618,17 @@ func (x *PodProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) x.Path = string(r.DecodeString()) } for { - yyj2980++ - if yyhl2980 { - yyb2980 = yyj2980 > l + yyj3073++ + if yyhl3073 { + yyb3073 = yyj3073 > l } else { - yyb2980 = r.CheckBreak() + yyb3073 = r.CheckBreak() } - if yyb2980 { + if yyb3073 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2980-1, "") + z.DecStructFieldNotFound(yyj3073-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -37314,41 +38640,41 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2984 := z.EncBinary() - _ = yym2984 + yym3077 := z.EncBinary() + _ = yym3077 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2985 := !z.EncBinary() - yy2arr2985 := z.EncBasicHandle().StructToArray - var yyq2985 [7]bool - _, _, _ = yysep2985, yyq2985, yy2arr2985 - const yyr2985 bool = false - yyq2985[0] = x.Kind != "" - yyq2985[1] = x.Namespace != "" - yyq2985[2] = x.Name != "" - yyq2985[3] = x.UID != "" - yyq2985[4] = x.APIVersion != "" - yyq2985[5] = x.ResourceVersion != "" - yyq2985[6] = x.FieldPath != "" - var yynn2985 int - if yyr2985 || yy2arr2985 { + yysep3078 := !z.EncBinary() + yy2arr3078 := z.EncBasicHandle().StructToArray + var yyq3078 [7]bool + _, _, _ = yysep3078, yyq3078, yy2arr3078 + const yyr3078 bool = false + yyq3078[0] = x.Kind != "" + yyq3078[1] = x.Namespace != "" + yyq3078[2] = x.Name != "" + yyq3078[3] = x.UID != "" + yyq3078[4] = x.APIVersion != "" + yyq3078[5] = x.ResourceVersion != "" + yyq3078[6] = x.FieldPath != "" + var yynn3078 int + if yyr3078 || yy2arr3078 { r.EncodeArrayStart(7) } else { - yynn2985 = 0 - for _, b := range yyq2985 { + yynn3078 = 0 + for _, b := range yyq3078 { if b { - yynn2985++ + yynn3078++ } } - r.EncodeMapStart(yynn2985) - yynn2985 = 0 + r.EncodeMapStart(yynn3078) + yynn3078 = 0 } - if yyr2985 || yy2arr2985 { + if yyr3078 || yy2arr3078 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2985[0] { - yym2987 := z.EncBinary() - _ = yym2987 + if yyq3078[0] { + yym3080 := z.EncBinary() + _ = yym3080 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -37357,23 +38683,23 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2985[0] { + if yyq3078[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2988 := z.EncBinary() - _ = yym2988 + yym3081 := z.EncBinary() + _ = yym3081 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2985 || yy2arr2985 { + if yyr3078 || yy2arr3078 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2985[1] { - yym2990 := z.EncBinary() - _ = yym2990 + if yyq3078[1] { + yym3083 := z.EncBinary() + _ = yym3083 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) @@ -37382,23 +38708,23 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2985[1] { + if yyq3078[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("namespace")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2991 := z.EncBinary() - _ = yym2991 + yym3084 := z.EncBinary() + _ = yym3084 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) } } } - if yyr2985 || yy2arr2985 { + if yyr3078 || yy2arr3078 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2985[2] { - yym2993 := z.EncBinary() - _ = yym2993 + if yyq3078[2] { + yym3086 := z.EncBinary() + _ = yym3086 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -37407,23 +38733,23 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2985[2] { + if yyq3078[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2994 := z.EncBinary() - _ = yym2994 + yym3087 := z.EncBinary() + _ = yym3087 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } } - if yyr2985 || yy2arr2985 { + if yyr3078 || yy2arr3078 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2985[3] { - yym2996 := z.EncBinary() - _ = yym2996 + if yyq3078[3] { + yym3089 := z.EncBinary() + _ = yym3089 if false { } else if z.HasExtensions() && z.EncExt(x.UID) { } else { @@ -37433,12 +38759,12 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2985[3] { + if yyq3078[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("uid")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2997 := z.EncBinary() - _ = yym2997 + yym3090 := z.EncBinary() + _ = yym3090 if false { } else if z.HasExtensions() && z.EncExt(x.UID) { } else { @@ -37446,11 +38772,11 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2985 || yy2arr2985 { + if yyr3078 || yy2arr3078 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2985[4] { - yym2999 := z.EncBinary() - _ = yym2999 + if yyq3078[4] { + yym3092 := z.EncBinary() + _ = yym3092 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -37459,23 +38785,23 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2985[4] { + if yyq3078[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3000 := z.EncBinary() - _ = yym3000 + yym3093 := z.EncBinary() + _ = yym3093 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2985 || yy2arr2985 { + if yyr3078 || yy2arr3078 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2985[5] { - yym3002 := z.EncBinary() - _ = yym3002 + if yyq3078[5] { + yym3095 := z.EncBinary() + _ = yym3095 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) @@ -37484,23 +38810,23 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2985[5] { + if yyq3078[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("resourceVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3003 := z.EncBinary() - _ = yym3003 + yym3096 := z.EncBinary() + _ = yym3096 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) } } } - if yyr2985 || yy2arr2985 { + if yyr3078 || yy2arr3078 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2985[6] { - yym3005 := z.EncBinary() - _ = yym3005 + if yyq3078[6] { + yym3098 := z.EncBinary() + _ = yym3098 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FieldPath)) @@ -37509,19 +38835,19 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2985[6] { + if yyq3078[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("fieldPath")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3006 := z.EncBinary() - _ = yym3006 + yym3099 := z.EncBinary() + _ = yym3099 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FieldPath)) } } } - if yyr2985 || yy2arr2985 { + if yyr3078 || yy2arr3078 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -37534,25 +38860,25 @@ func (x *ObjectReference) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3007 := z.DecBinary() - _ = yym3007 + yym3100 := z.DecBinary() + _ = yym3100 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3008 := r.ContainerType() - if yyct3008 == codecSelferValueTypeMap1234 { - yyl3008 := r.ReadMapStart() - if yyl3008 == 0 { + yyct3101 := r.ContainerType() + if yyct3101 == codecSelferValueTypeMap1234 { + yyl3101 := r.ReadMapStart() + if yyl3101 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3008, d) + x.codecDecodeSelfFromMap(yyl3101, d) } - } else if yyct3008 == codecSelferValueTypeArray1234 { - yyl3008 := r.ReadArrayStart() - if yyl3008 == 0 { + } else if yyct3101 == codecSelferValueTypeArray1234 { + yyl3101 := r.ReadArrayStart() + if yyl3101 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3008, d) + x.codecDecodeSelfFromArray(yyl3101, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -37564,12 +38890,12 @@ func (x *ObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3009Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3009Slc - var yyhl3009 bool = l >= 0 - for yyj3009 := 0; ; yyj3009++ { - if yyhl3009 { - if yyj3009 >= l { + var yys3102Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3102Slc + var yyhl3102 bool = l >= 0 + for yyj3102 := 0; ; yyj3102++ { + if yyhl3102 { + if yyj3102 >= l { break } } else { @@ -37578,10 +38904,10 @@ func (x *ObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3009Slc = r.DecodeBytes(yys3009Slc, true, true) - yys3009 := string(yys3009Slc) + yys3102Slc = r.DecodeBytes(yys3102Slc, true, true) + yys3102 := string(yys3102Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3009 { + switch yys3102 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -37625,9 +38951,9 @@ func (x *ObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.FieldPath = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3009) - } // end switch yys3009 - } // end for yyj3009 + z.DecStructFieldNotFound(-1, yys3102) + } // end switch yys3102 + } // end for yyj3102 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -37635,16 +38961,16 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3017 int - var yyb3017 bool - var yyhl3017 bool = l >= 0 - yyj3017++ - if yyhl3017 { - yyb3017 = yyj3017 > l + var yyj3110 int + var yyb3110 bool + var yyhl3110 bool = l >= 0 + yyj3110++ + if yyhl3110 { + yyb3110 = yyj3110 > l } else { - yyb3017 = r.CheckBreak() + yyb3110 = r.CheckBreak() } - if yyb3017 { + if yyb3110 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37654,13 +38980,13 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Kind = string(r.DecodeString()) } - yyj3017++ - if yyhl3017 { - yyb3017 = yyj3017 > l + yyj3110++ + if yyhl3110 { + yyb3110 = yyj3110 > l } else { - yyb3017 = r.CheckBreak() + yyb3110 = r.CheckBreak() } - if yyb3017 { + if yyb3110 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37670,13 +38996,13 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Namespace = string(r.DecodeString()) } - yyj3017++ - if yyhl3017 { - yyb3017 = yyj3017 > l + yyj3110++ + if yyhl3110 { + yyb3110 = yyj3110 > l } else { - yyb3017 = r.CheckBreak() + yyb3110 = r.CheckBreak() } - if yyb3017 { + if yyb3110 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37686,13 +39012,13 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Name = string(r.DecodeString()) } - yyj3017++ - if yyhl3017 { - yyb3017 = yyj3017 > l + yyj3110++ + if yyhl3110 { + yyb3110 = yyj3110 > l } else { - yyb3017 = r.CheckBreak() + yyb3110 = r.CheckBreak() } - if yyb3017 { + if yyb3110 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37702,13 +39028,13 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.UID = pkg1_types.UID(r.DecodeString()) } - yyj3017++ - if yyhl3017 { - yyb3017 = yyj3017 > l + yyj3110++ + if yyhl3110 { + yyb3110 = yyj3110 > l } else { - yyb3017 = r.CheckBreak() + yyb3110 = r.CheckBreak() } - if yyb3017 { + if yyb3110 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37718,13 +39044,13 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.APIVersion = string(r.DecodeString()) } - yyj3017++ - if yyhl3017 { - yyb3017 = yyj3017 > l + yyj3110++ + if yyhl3110 { + yyb3110 = yyj3110 > l } else { - yyb3017 = r.CheckBreak() + yyb3110 = r.CheckBreak() } - if yyb3017 { + if yyb3110 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37734,13 +39060,13 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.ResourceVersion = string(r.DecodeString()) } - yyj3017++ - if yyhl3017 { - yyb3017 = yyj3017 > l + yyj3110++ + if yyhl3110 { + yyb3110 = yyj3110 > l } else { - yyb3017 = r.CheckBreak() + yyb3110 = r.CheckBreak() } - if yyb3017 { + if yyb3110 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37751,17 +39077,17 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) x.FieldPath = string(r.DecodeString()) } for { - yyj3017++ - if yyhl3017 { - yyb3017 = yyj3017 > l + yyj3110++ + if yyhl3110 { + yyb3110 = yyj3110 > l } else { - yyb3017 = r.CheckBreak() + yyb3110 = r.CheckBreak() } - if yyb3017 { + if yyb3110 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3017-1, "") + z.DecStructFieldNotFound(yyj3110-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -37773,33 +39099,33 @@ func (x *LocalObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3025 := z.EncBinary() - _ = yym3025 + yym3118 := z.EncBinary() + _ = yym3118 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3026 := !z.EncBinary() - yy2arr3026 := z.EncBasicHandle().StructToArray - var yyq3026 [1]bool - _, _, _ = yysep3026, yyq3026, yy2arr3026 - const yyr3026 bool = false - var yynn3026 int - if yyr3026 || yy2arr3026 { + yysep3119 := !z.EncBinary() + yy2arr3119 := z.EncBasicHandle().StructToArray + var yyq3119 [1]bool + _, _, _ = yysep3119, yyq3119, yy2arr3119 + const yyr3119 bool = false + var yynn3119 int + if yyr3119 || yy2arr3119 { r.EncodeArrayStart(1) } else { - yynn3026 = 1 - for _, b := range yyq3026 { + yynn3119 = 1 + for _, b := range yyq3119 { if b { - yynn3026++ + yynn3119++ } } - r.EncodeMapStart(yynn3026) - yynn3026 = 0 + r.EncodeMapStart(yynn3119) + yynn3119 = 0 } - if yyr3026 || yy2arr3026 { + if yyr3119 || yy2arr3119 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3028 := z.EncBinary() - _ = yym3028 + yym3121 := z.EncBinary() + _ = yym3121 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -37808,14 +39134,14 @@ func (x *LocalObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3029 := z.EncBinary() - _ = yym3029 + yym3122 := z.EncBinary() + _ = yym3122 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } - if yyr3026 || yy2arr3026 { + if yyr3119 || yy2arr3119 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -37828,25 +39154,25 @@ func (x *LocalObjectReference) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3030 := z.DecBinary() - _ = yym3030 + yym3123 := z.DecBinary() + _ = yym3123 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3031 := r.ContainerType() - if yyct3031 == codecSelferValueTypeMap1234 { - yyl3031 := r.ReadMapStart() - if yyl3031 == 0 { + yyct3124 := r.ContainerType() + if yyct3124 == codecSelferValueTypeMap1234 { + yyl3124 := r.ReadMapStart() + if yyl3124 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3031, d) + x.codecDecodeSelfFromMap(yyl3124, d) } - } else if yyct3031 == codecSelferValueTypeArray1234 { - yyl3031 := r.ReadArrayStart() - if yyl3031 == 0 { + } else if yyct3124 == codecSelferValueTypeArray1234 { + yyl3124 := r.ReadArrayStart() + if yyl3124 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3031, d) + x.codecDecodeSelfFromArray(yyl3124, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -37858,12 +39184,12 @@ func (x *LocalObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3032Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3032Slc - var yyhl3032 bool = l >= 0 - for yyj3032 := 0; ; yyj3032++ { - if yyhl3032 { - if yyj3032 >= l { + var yys3125Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3125Slc + var yyhl3125 bool = l >= 0 + for yyj3125 := 0; ; yyj3125++ { + if yyhl3125 { + if yyj3125 >= l { break } } else { @@ -37872,10 +39198,10 @@ func (x *LocalObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decode } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3032Slc = r.DecodeBytes(yys3032Slc, true, true) - yys3032 := string(yys3032Slc) + yys3125Slc = r.DecodeBytes(yys3125Slc, true, true) + yys3125 := string(yys3125Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3032 { + switch yys3125 { case "Name": if r.TryDecodeAsNil() { x.Name = "" @@ -37883,9 +39209,9 @@ func (x *LocalObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decode x.Name = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3032) - } // end switch yys3032 - } // end for yyj3032 + z.DecStructFieldNotFound(-1, yys3125) + } // end switch yys3125 + } // end for yyj3125 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -37893,16 +39219,16 @@ func (x *LocalObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3034 int - var yyb3034 bool - var yyhl3034 bool = l >= 0 - yyj3034++ - if yyhl3034 { - yyb3034 = yyj3034 > l + var yyj3127 int + var yyb3127 bool + var yyhl3127 bool = l >= 0 + yyj3127++ + if yyhl3127 { + yyb3127 = yyj3127 > l } else { - yyb3034 = r.CheckBreak() + yyb3127 = r.CheckBreak() } - if yyb3034 { + if yyb3127 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37913,17 +39239,17 @@ func (x *LocalObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Deco x.Name = string(r.DecodeString()) } for { - yyj3034++ - if yyhl3034 { - yyb3034 = yyj3034 > l + yyj3127++ + if yyhl3127 { + yyb3127 = yyj3127 > l } else { - yyb3034 = r.CheckBreak() + yyb3127 = r.CheckBreak() } - if yyb3034 { + if yyb3127 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3034-1, "") + z.DecStructFieldNotFound(yyj3127-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -37935,37 +39261,37 @@ func (x *SerializedReference) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3036 := z.EncBinary() - _ = yym3036 + yym3129 := z.EncBinary() + _ = yym3129 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3037 := !z.EncBinary() - yy2arr3037 := z.EncBasicHandle().StructToArray - var yyq3037 [3]bool - _, _, _ = yysep3037, yyq3037, yy2arr3037 - const yyr3037 bool = false - yyq3037[0] = x.Kind != "" - yyq3037[1] = x.APIVersion != "" - yyq3037[2] = true - var yynn3037 int - if yyr3037 || yy2arr3037 { + yysep3130 := !z.EncBinary() + yy2arr3130 := z.EncBasicHandle().StructToArray + var yyq3130 [3]bool + _, _, _ = yysep3130, yyq3130, yy2arr3130 + const yyr3130 bool = false + yyq3130[0] = x.Kind != "" + yyq3130[1] = x.APIVersion != "" + yyq3130[2] = true + var yynn3130 int + if yyr3130 || yy2arr3130 { r.EncodeArrayStart(3) } else { - yynn3037 = 0 - for _, b := range yyq3037 { + yynn3130 = 0 + for _, b := range yyq3130 { if b { - yynn3037++ + yynn3130++ } } - r.EncodeMapStart(yynn3037) - yynn3037 = 0 + r.EncodeMapStart(yynn3130) + yynn3130 = 0 } - if yyr3037 || yy2arr3037 { + if yyr3130 || yy2arr3130 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3037[0] { - yym3039 := z.EncBinary() - _ = yym3039 + if yyq3130[0] { + yym3132 := z.EncBinary() + _ = yym3132 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -37974,23 +39300,23 @@ func (x *SerializedReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3037[0] { + if yyq3130[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3040 := z.EncBinary() - _ = yym3040 + yym3133 := z.EncBinary() + _ = yym3133 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3037 || yy2arr3037 { + if yyr3130 || yy2arr3130 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3037[1] { - yym3042 := z.EncBinary() - _ = yym3042 + if yyq3130[1] { + yym3135 := z.EncBinary() + _ = yym3135 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -37999,36 +39325,36 @@ func (x *SerializedReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3037[1] { + if yyq3130[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3043 := z.EncBinary() - _ = yym3043 + yym3136 := z.EncBinary() + _ = yym3136 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3037 || yy2arr3037 { + if yyr3130 || yy2arr3130 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3037[2] { - yy3045 := &x.Reference - yy3045.CodecEncodeSelf(e) + if yyq3130[2] { + yy3138 := &x.Reference + yy3138.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3037[2] { + if yyq3130[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("reference")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3046 := &x.Reference - yy3046.CodecEncodeSelf(e) + yy3139 := &x.Reference + yy3139.CodecEncodeSelf(e) } } - if yyr3037 || yy2arr3037 { + if yyr3130 || yy2arr3130 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -38041,25 +39367,25 @@ func (x *SerializedReference) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3047 := z.DecBinary() - _ = yym3047 + yym3140 := z.DecBinary() + _ = yym3140 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3048 := r.ContainerType() - if yyct3048 == codecSelferValueTypeMap1234 { - yyl3048 := r.ReadMapStart() - if yyl3048 == 0 { + yyct3141 := r.ContainerType() + if yyct3141 == codecSelferValueTypeMap1234 { + yyl3141 := r.ReadMapStart() + if yyl3141 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3048, d) + x.codecDecodeSelfFromMap(yyl3141, d) } - } else if yyct3048 == codecSelferValueTypeArray1234 { - yyl3048 := r.ReadArrayStart() - if yyl3048 == 0 { + } else if yyct3141 == codecSelferValueTypeArray1234 { + yyl3141 := r.ReadArrayStart() + if yyl3141 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3048, d) + x.codecDecodeSelfFromArray(yyl3141, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -38071,12 +39397,12 @@ func (x *SerializedReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3049Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3049Slc - var yyhl3049 bool = l >= 0 - for yyj3049 := 0; ; yyj3049++ { - if yyhl3049 { - if yyj3049 >= l { + var yys3142Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3142Slc + var yyhl3142 bool = l >= 0 + for yyj3142 := 0; ; yyj3142++ { + if yyhl3142 { + if yyj3142 >= l { break } } else { @@ -38085,10 +39411,10 @@ func (x *SerializedReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3049Slc = r.DecodeBytes(yys3049Slc, true, true) - yys3049 := string(yys3049Slc) + yys3142Slc = r.DecodeBytes(yys3142Slc, true, true) + yys3142 := string(yys3142Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3049 { + switch yys3142 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -38105,13 +39431,13 @@ func (x *SerializedReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Reference = ObjectReference{} } else { - yyv3052 := &x.Reference - yyv3052.CodecDecodeSelf(d) + yyv3145 := &x.Reference + yyv3145.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3049) - } // end switch yys3049 - } // end for yyj3049 + z.DecStructFieldNotFound(-1, yys3142) + } // end switch yys3142 + } // end for yyj3142 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -38119,16 +39445,16 @@ func (x *SerializedReference) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3053 int - var yyb3053 bool - var yyhl3053 bool = l >= 0 - yyj3053++ - if yyhl3053 { - yyb3053 = yyj3053 > l + var yyj3146 int + var yyb3146 bool + var yyhl3146 bool = l >= 0 + yyj3146++ + if yyhl3146 { + yyb3146 = yyj3146 > l } else { - yyb3053 = r.CheckBreak() + yyb3146 = r.CheckBreak() } - if yyb3053 { + if yyb3146 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38138,13 +39464,13 @@ func (x *SerializedReference) codecDecodeSelfFromArray(l int, d *codec1978.Decod } else { x.Kind = string(r.DecodeString()) } - yyj3053++ - if yyhl3053 { - yyb3053 = yyj3053 > l + yyj3146++ + if yyhl3146 { + yyb3146 = yyj3146 > l } else { - yyb3053 = r.CheckBreak() + yyb3146 = r.CheckBreak() } - if yyb3053 { + if yyb3146 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38154,13 +39480,13 @@ func (x *SerializedReference) codecDecodeSelfFromArray(l int, d *codec1978.Decod } else { x.APIVersion = string(r.DecodeString()) } - yyj3053++ - if yyhl3053 { - yyb3053 = yyj3053 > l + yyj3146++ + if yyhl3146 { + yyb3146 = yyj3146 > l } else { - yyb3053 = r.CheckBreak() + yyb3146 = r.CheckBreak() } - if yyb3053 { + if yyb3146 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38168,21 +39494,21 @@ func (x *SerializedReference) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Reference = ObjectReference{} } else { - yyv3056 := &x.Reference - yyv3056.CodecDecodeSelf(d) + yyv3149 := &x.Reference + yyv3149.CodecDecodeSelf(d) } for { - yyj3053++ - if yyhl3053 { - yyb3053 = yyj3053 > l + yyj3146++ + if yyhl3146 { + yyb3146 = yyj3146 > l } else { - yyb3053 = r.CheckBreak() + yyb3146 = r.CheckBreak() } - if yyb3053 { + if yyb3146 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3053-1, "") + z.DecStructFieldNotFound(yyj3146-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -38194,36 +39520,36 @@ func (x *EventSource) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3057 := z.EncBinary() - _ = yym3057 + yym3150 := z.EncBinary() + _ = yym3150 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3058 := !z.EncBinary() - yy2arr3058 := z.EncBasicHandle().StructToArray - var yyq3058 [2]bool - _, _, _ = yysep3058, yyq3058, yy2arr3058 - const yyr3058 bool = false - yyq3058[0] = x.Component != "" - yyq3058[1] = x.Host != "" - var yynn3058 int - if yyr3058 || yy2arr3058 { + yysep3151 := !z.EncBinary() + yy2arr3151 := z.EncBasicHandle().StructToArray + var yyq3151 [2]bool + _, _, _ = yysep3151, yyq3151, yy2arr3151 + const yyr3151 bool = false + yyq3151[0] = x.Component != "" + yyq3151[1] = x.Host != "" + var yynn3151 int + if yyr3151 || yy2arr3151 { r.EncodeArrayStart(2) } else { - yynn3058 = 0 - for _, b := range yyq3058 { + yynn3151 = 0 + for _, b := range yyq3151 { if b { - yynn3058++ + yynn3151++ } } - r.EncodeMapStart(yynn3058) - yynn3058 = 0 + r.EncodeMapStart(yynn3151) + yynn3151 = 0 } - if yyr3058 || yy2arr3058 { + if yyr3151 || yy2arr3151 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3058[0] { - yym3060 := z.EncBinary() - _ = yym3060 + if yyq3151[0] { + yym3153 := z.EncBinary() + _ = yym3153 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Component)) @@ -38232,23 +39558,23 @@ func (x *EventSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3058[0] { + if yyq3151[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("component")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3061 := z.EncBinary() - _ = yym3061 + yym3154 := z.EncBinary() + _ = yym3154 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Component)) } } } - if yyr3058 || yy2arr3058 { + if yyr3151 || yy2arr3151 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3058[1] { - yym3063 := z.EncBinary() - _ = yym3063 + if yyq3151[1] { + yym3156 := z.EncBinary() + _ = yym3156 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Host)) @@ -38257,19 +39583,19 @@ func (x *EventSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3058[1] { + if yyq3151[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("host")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3064 := z.EncBinary() - _ = yym3064 + yym3157 := z.EncBinary() + _ = yym3157 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Host)) } } } - if yyr3058 || yy2arr3058 { + if yyr3151 || yy2arr3151 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -38279,979 +39605,6 @@ func (x *EventSource) CodecEncodeSelf(e *codec1978.Encoder) { } func (x *EventSource) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym3065 := z.DecBinary() - _ = yym3065 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct3066 := r.ContainerType() - if yyct3066 == codecSelferValueTypeMap1234 { - yyl3066 := r.ReadMapStart() - if yyl3066 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl3066, d) - } - } else if yyct3066 == codecSelferValueTypeArray1234 { - yyl3066 := r.ReadArrayStart() - if yyl3066 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl3066, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *EventSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys3067Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3067Slc - var yyhl3067 bool = l >= 0 - for yyj3067 := 0; ; yyj3067++ { - if yyhl3067 { - if yyj3067 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3067Slc = r.DecodeBytes(yys3067Slc, true, true) - yys3067 := string(yys3067Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3067 { - case "component": - if r.TryDecodeAsNil() { - x.Component = "" - } else { - x.Component = string(r.DecodeString()) - } - case "host": - if r.TryDecodeAsNil() { - x.Host = "" - } else { - x.Host = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3067) - } // end switch yys3067 - } // end for yyj3067 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *EventSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj3070 int - var yyb3070 bool - var yyhl3070 bool = l >= 0 - yyj3070++ - if yyhl3070 { - yyb3070 = yyj3070 > l - } else { - yyb3070 = r.CheckBreak() - } - if yyb3070 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Component = "" - } else { - x.Component = string(r.DecodeString()) - } - yyj3070++ - if yyhl3070 { - yyb3070 = yyj3070 > l - } else { - yyb3070 = r.CheckBreak() - } - if yyb3070 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Host = "" - } else { - x.Host = string(r.DecodeString()) - } - for { - yyj3070++ - if yyhl3070 { - yyb3070 = yyj3070 > l - } else { - yyb3070 = r.CheckBreak() - } - if yyb3070 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3070-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym3073 := z.EncBinary() - _ = yym3073 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep3074 := !z.EncBinary() - yy2arr3074 := z.EncBasicHandle().StructToArray - var yyq3074 [11]bool - _, _, _ = yysep3074, yyq3074, yy2arr3074 - const yyr3074 bool = false - yyq3074[0] = x.Kind != "" - yyq3074[1] = x.APIVersion != "" - yyq3074[2] = true - yyq3074[3] = true - yyq3074[4] = x.Reason != "" - yyq3074[5] = x.Message != "" - yyq3074[6] = true - yyq3074[7] = true - yyq3074[8] = true - yyq3074[9] = x.Count != 0 - yyq3074[10] = x.Type != "" - var yynn3074 int - if yyr3074 || yy2arr3074 { - r.EncodeArrayStart(11) - } else { - yynn3074 = 0 - for _, b := range yyq3074 { - if b { - yynn3074++ - } - } - r.EncodeMapStart(yynn3074) - yynn3074 = 0 - } - if yyr3074 || yy2arr3074 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3074[0] { - yym3076 := z.EncBinary() - _ = yym3076 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3074[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3077 := z.EncBinary() - _ = yym3077 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr3074 || yy2arr3074 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3074[1] { - yym3079 := z.EncBinary() - _ = yym3079 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3074[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3080 := z.EncBinary() - _ = yym3080 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr3074 || yy2arr3074 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3074[2] { - yy3082 := &x.ObjectMeta - yy3082.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq3074[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3083 := &x.ObjectMeta - yy3083.CodecEncodeSelf(e) - } - } - if yyr3074 || yy2arr3074 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3074[3] { - yy3085 := &x.InvolvedObject - yy3085.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq3074[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("involvedObject")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3086 := &x.InvolvedObject - yy3086.CodecEncodeSelf(e) - } - } - if yyr3074 || yy2arr3074 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3074[4] { - yym3088 := z.EncBinary() - _ = yym3088 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3074[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("reason")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3089 := z.EncBinary() - _ = yym3089 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) - } - } - } - if yyr3074 || yy2arr3074 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3074[5] { - yym3091 := z.EncBinary() - _ = yym3091 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Message)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3074[5] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("message")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3092 := z.EncBinary() - _ = yym3092 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Message)) - } - } - } - if yyr3074 || yy2arr3074 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3074[6] { - yy3094 := &x.Source - yy3094.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq3074[6] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("source")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3095 := &x.Source - yy3095.CodecEncodeSelf(e) - } - } - if yyr3074 || yy2arr3074 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3074[7] { - yy3097 := &x.FirstTimestamp - yym3098 := z.EncBinary() - _ = yym3098 - if false { - } else if z.HasExtensions() && z.EncExt(yy3097) { - } else if yym3098 { - z.EncBinaryMarshal(yy3097) - } else if !yym3098 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3097) - } else { - z.EncFallback(yy3097) - } - } else { - r.EncodeNil() - } - } else { - if yyq3074[7] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("firstTimestamp")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3099 := &x.FirstTimestamp - yym3100 := z.EncBinary() - _ = yym3100 - if false { - } else if z.HasExtensions() && z.EncExt(yy3099) { - } else if yym3100 { - z.EncBinaryMarshal(yy3099) - } else if !yym3100 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3099) - } else { - z.EncFallback(yy3099) - } - } - } - if yyr3074 || yy2arr3074 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3074[8] { - yy3102 := &x.LastTimestamp - yym3103 := z.EncBinary() - _ = yym3103 - if false { - } else if z.HasExtensions() && z.EncExt(yy3102) { - } else if yym3103 { - z.EncBinaryMarshal(yy3102) - } else if !yym3103 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3102) - } else { - z.EncFallback(yy3102) - } - } else { - r.EncodeNil() - } - } else { - if yyq3074[8] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("lastTimestamp")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3104 := &x.LastTimestamp - yym3105 := z.EncBinary() - _ = yym3105 - if false { - } else if z.HasExtensions() && z.EncExt(yy3104) { - } else if yym3105 { - z.EncBinaryMarshal(yy3104) - } else if !yym3105 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3104) - } else { - z.EncFallback(yy3104) - } - } - } - if yyr3074 || yy2arr3074 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3074[9] { - yym3107 := z.EncBinary() - _ = yym3107 - if false { - } else { - r.EncodeInt(int64(x.Count)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq3074[9] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("count")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3108 := z.EncBinary() - _ = yym3108 - if false { - } else { - r.EncodeInt(int64(x.Count)) - } - } - } - if yyr3074 || yy2arr3074 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3074[10] { - yym3110 := z.EncBinary() - _ = yym3110 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Type)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3074[10] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("type")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3111 := z.EncBinary() - _ = yym3111 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Type)) - } - } - } - if yyr3074 || yy2arr3074 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *Event) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym3112 := z.DecBinary() - _ = yym3112 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct3113 := r.ContainerType() - if yyct3113 == codecSelferValueTypeMap1234 { - yyl3113 := r.ReadMapStart() - if yyl3113 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl3113, d) - } - } else if yyct3113 == codecSelferValueTypeArray1234 { - yyl3113 := r.ReadArrayStart() - if yyl3113 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl3113, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *Event) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys3114Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3114Slc - var yyhl3114 bool = l >= 0 - for yyj3114 := 0; ; yyj3114++ { - if yyhl3114 { - if yyj3114 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3114Slc = r.DecodeBytes(yys3114Slc, true, true) - yys3114 := string(yys3114Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3114 { - 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()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} - } else { - yyv3117 := &x.ObjectMeta - yyv3117.CodecDecodeSelf(d) - } - case "involvedObject": - if r.TryDecodeAsNil() { - x.InvolvedObject = ObjectReference{} - } else { - yyv3118 := &x.InvolvedObject - yyv3118.CodecDecodeSelf(d) - } - case "reason": - if r.TryDecodeAsNil() { - x.Reason = "" - } else { - x.Reason = string(r.DecodeString()) - } - case "message": - if r.TryDecodeAsNil() { - x.Message = "" - } else { - x.Message = string(r.DecodeString()) - } - case "source": - if r.TryDecodeAsNil() { - x.Source = EventSource{} - } else { - yyv3121 := &x.Source - yyv3121.CodecDecodeSelf(d) - } - case "firstTimestamp": - if r.TryDecodeAsNil() { - x.FirstTimestamp = pkg2_unversioned.Time{} - } else { - yyv3122 := &x.FirstTimestamp - yym3123 := z.DecBinary() - _ = yym3123 - if false { - } else if z.HasExtensions() && z.DecExt(yyv3122) { - } else if yym3123 { - z.DecBinaryUnmarshal(yyv3122) - } else if !yym3123 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3122) - } else { - z.DecFallback(yyv3122, false) - } - } - case "lastTimestamp": - if r.TryDecodeAsNil() { - x.LastTimestamp = pkg2_unversioned.Time{} - } else { - yyv3124 := &x.LastTimestamp - yym3125 := z.DecBinary() - _ = yym3125 - if false { - } else if z.HasExtensions() && z.DecExt(yyv3124) { - } else if yym3125 { - z.DecBinaryUnmarshal(yyv3124) - } else if !yym3125 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3124) - } else { - z.DecFallback(yyv3124, false) - } - } - case "count": - if r.TryDecodeAsNil() { - x.Count = 0 - } else { - x.Count = int(r.DecodeInt(codecSelferBitsize1234)) - } - case "type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3114) - } // end switch yys3114 - } // end for yyj3114 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj3128 int - var yyb3128 bool - var yyhl3128 bool = l >= 0 - yyj3128++ - if yyhl3128 { - yyb3128 = yyj3128 > l - } else { - yyb3128 = r.CheckBreak() - } - if yyb3128 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj3128++ - if yyhl3128 { - yyb3128 = yyj3128 > l - } else { - yyb3128 = r.CheckBreak() - } - if yyb3128 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj3128++ - if yyhl3128 { - yyb3128 = yyj3128 > l - } else { - yyb3128 = r.CheckBreak() - } - if yyb3128 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} - } else { - yyv3131 := &x.ObjectMeta - yyv3131.CodecDecodeSelf(d) - } - yyj3128++ - if yyhl3128 { - yyb3128 = yyj3128 > l - } else { - yyb3128 = r.CheckBreak() - } - if yyb3128 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.InvolvedObject = ObjectReference{} - } else { - yyv3132 := &x.InvolvedObject - yyv3132.CodecDecodeSelf(d) - } - yyj3128++ - if yyhl3128 { - yyb3128 = yyj3128 > l - } else { - yyb3128 = r.CheckBreak() - } - if yyb3128 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Reason = "" - } else { - x.Reason = string(r.DecodeString()) - } - yyj3128++ - if yyhl3128 { - yyb3128 = yyj3128 > l - } else { - yyb3128 = r.CheckBreak() - } - if yyb3128 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Message = "" - } else { - x.Message = string(r.DecodeString()) - } - yyj3128++ - if yyhl3128 { - yyb3128 = yyj3128 > l - } else { - yyb3128 = r.CheckBreak() - } - if yyb3128 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Source = EventSource{} - } else { - yyv3135 := &x.Source - yyv3135.CodecDecodeSelf(d) - } - yyj3128++ - if yyhl3128 { - yyb3128 = yyj3128 > l - } else { - yyb3128 = r.CheckBreak() - } - if yyb3128 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.FirstTimestamp = pkg2_unversioned.Time{} - } else { - yyv3136 := &x.FirstTimestamp - yym3137 := z.DecBinary() - _ = yym3137 - if false { - } else if z.HasExtensions() && z.DecExt(yyv3136) { - } else if yym3137 { - z.DecBinaryUnmarshal(yyv3136) - } else if !yym3137 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3136) - } else { - z.DecFallback(yyv3136, false) - } - } - yyj3128++ - if yyhl3128 { - yyb3128 = yyj3128 > l - } else { - yyb3128 = r.CheckBreak() - } - if yyb3128 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.LastTimestamp = pkg2_unversioned.Time{} - } else { - yyv3138 := &x.LastTimestamp - yym3139 := z.DecBinary() - _ = yym3139 - if false { - } else if z.HasExtensions() && z.DecExt(yyv3138) { - } else if yym3139 { - z.DecBinaryUnmarshal(yyv3138) - } else if !yym3139 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3138) - } else { - z.DecFallback(yyv3138, false) - } - } - yyj3128++ - if yyhl3128 { - yyb3128 = yyj3128 > l - } else { - yyb3128 = r.CheckBreak() - } - if yyb3128 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Count = 0 - } else { - x.Count = int(r.DecodeInt(codecSelferBitsize1234)) - } - yyj3128++ - if yyhl3128 { - yyb3128 = yyj3128 > l - } else { - yyb3128 = r.CheckBreak() - } - if yyb3128 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = string(r.DecodeString()) - } - for { - yyj3128++ - if yyhl3128 { - yyb3128 = yyj3128 > l - } else { - yyb3128 = r.CheckBreak() - } - if yyb3128 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3128-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *EventList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym3142 := z.EncBinary() - _ = yym3142 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep3143 := !z.EncBinary() - yy2arr3143 := z.EncBasicHandle().StructToArray - var yyq3143 [4]bool - _, _, _ = yysep3143, yyq3143, yy2arr3143 - const yyr3143 bool = false - yyq3143[0] = x.Kind != "" - yyq3143[1] = x.APIVersion != "" - yyq3143[2] = true - var yynn3143 int - if yyr3143 || yy2arr3143 { - r.EncodeArrayStart(4) - } else { - yynn3143 = 1 - for _, b := range yyq3143 { - if b { - yynn3143++ - } - } - r.EncodeMapStart(yynn3143) - yynn3143 = 0 - } - if yyr3143 || yy2arr3143 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3143[0] { - yym3145 := z.EncBinary() - _ = yym3145 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3143[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3146 := z.EncBinary() - _ = yym3146 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr3143 || yy2arr3143 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3143[1] { - yym3148 := z.EncBinary() - _ = yym3148 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3143[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3149 := z.EncBinary() - _ = yym3149 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr3143 || yy2arr3143 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3143[2] { - yy3151 := &x.ListMeta - yym3152 := z.EncBinary() - _ = yym3152 - if false { - } else if z.HasExtensions() && z.EncExt(yy3151) { - } else { - z.EncFallback(yy3151) - } - } else { - r.EncodeNil() - } - } else { - if yyq3143[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3153 := &x.ListMeta - yym3154 := z.EncBinary() - _ = yym3154 - if false { - } else if z.HasExtensions() && z.EncExt(yy3153) { - } else { - z.EncFallback(yy3153) - } - } - } - if yyr3143 || yy2arr3143 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym3156 := z.EncBinary() - _ = yym3156 - if false { - } else { - h.encSliceEvent(([]Event)(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 { - yym3157 := z.EncBinary() - _ = yym3157 - if false { - } else { - h.encSliceEvent(([]Event)(x.Items), e) - } - } - } - if yyr3143 || yy2arr3143 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *EventList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r @@ -39281,7 +39634,7 @@ func (x *EventList) CodecDecodeSelf(d *codec1978.Decoder) { } } -func (x *EventList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { +func (x *EventSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r @@ -39303,6 +39656,979 @@ func (x *EventList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { yys3160 := string(yys3160Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) switch yys3160 { + case "component": + if r.TryDecodeAsNil() { + x.Component = "" + } else { + x.Component = string(r.DecodeString()) + } + case "host": + if r.TryDecodeAsNil() { + x.Host = "" + } else { + x.Host = string(r.DecodeString()) + } + default: + z.DecStructFieldNotFound(-1, yys3160) + } // end switch yys3160 + } // end for yyj3160 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *EventSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj3163 int + var yyb3163 bool + var yyhl3163 bool = l >= 0 + yyj3163++ + if yyhl3163 { + yyb3163 = yyj3163 > l + } else { + yyb3163 = r.CheckBreak() + } + if yyb3163 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Component = "" + } else { + x.Component = string(r.DecodeString()) + } + yyj3163++ + if yyhl3163 { + yyb3163 = yyj3163 > l + } else { + yyb3163 = r.CheckBreak() + } + if yyb3163 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Host = "" + } else { + x.Host = string(r.DecodeString()) + } + for { + yyj3163++ + if yyhl3163 { + yyb3163 = yyj3163 > l + } else { + yyb3163 = r.CheckBreak() + } + if yyb3163 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj3163-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym3166 := z.EncBinary() + _ = yym3166 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep3167 := !z.EncBinary() + yy2arr3167 := z.EncBasicHandle().StructToArray + var yyq3167 [11]bool + _, _, _ = yysep3167, yyq3167, yy2arr3167 + const yyr3167 bool = false + yyq3167[0] = x.Kind != "" + yyq3167[1] = x.APIVersion != "" + yyq3167[2] = true + yyq3167[3] = true + yyq3167[4] = x.Reason != "" + yyq3167[5] = x.Message != "" + yyq3167[6] = true + yyq3167[7] = true + yyq3167[8] = true + yyq3167[9] = x.Count != 0 + yyq3167[10] = x.Type != "" + var yynn3167 int + if yyr3167 || yy2arr3167 { + r.EncodeArrayStart(11) + } else { + yynn3167 = 0 + for _, b := range yyq3167 { + if b { + yynn3167++ + } + } + r.EncodeMapStart(yynn3167) + yynn3167 = 0 + } + if yyr3167 || yy2arr3167 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3167[0] { + yym3169 := z.EncBinary() + _ = yym3169 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3167[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3170 := z.EncBinary() + _ = yym3170 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr3167 || yy2arr3167 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3167[1] { + yym3172 := z.EncBinary() + _ = yym3172 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3167[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3173 := z.EncBinary() + _ = yym3173 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr3167 || yy2arr3167 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3167[2] { + yy3175 := &x.ObjectMeta + yy3175.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq3167[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy3176 := &x.ObjectMeta + yy3176.CodecEncodeSelf(e) + } + } + if yyr3167 || yy2arr3167 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3167[3] { + yy3178 := &x.InvolvedObject + yy3178.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq3167[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("involvedObject")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy3179 := &x.InvolvedObject + yy3179.CodecEncodeSelf(e) + } + } + if yyr3167 || yy2arr3167 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3167[4] { + yym3181 := z.EncBinary() + _ = yym3181 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3167[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("reason")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3182 := z.EncBinary() + _ = yym3182 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) + } + } + } + if yyr3167 || yy2arr3167 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3167[5] { + yym3184 := z.EncBinary() + _ = yym3184 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Message)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3167[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("message")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3185 := z.EncBinary() + _ = yym3185 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Message)) + } + } + } + if yyr3167 || yy2arr3167 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3167[6] { + yy3187 := &x.Source + yy3187.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq3167[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("source")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy3188 := &x.Source + yy3188.CodecEncodeSelf(e) + } + } + if yyr3167 || yy2arr3167 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3167[7] { + yy3190 := &x.FirstTimestamp + yym3191 := z.EncBinary() + _ = yym3191 + if false { + } else if z.HasExtensions() && z.EncExt(yy3190) { + } else if yym3191 { + z.EncBinaryMarshal(yy3190) + } else if !yym3191 && z.IsJSONHandle() { + z.EncJSONMarshal(yy3190) + } else { + z.EncFallback(yy3190) + } + } else { + r.EncodeNil() + } + } else { + if yyq3167[7] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("firstTimestamp")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy3192 := &x.FirstTimestamp + yym3193 := z.EncBinary() + _ = yym3193 + if false { + } else if z.HasExtensions() && z.EncExt(yy3192) { + } else if yym3193 { + z.EncBinaryMarshal(yy3192) + } else if !yym3193 && z.IsJSONHandle() { + z.EncJSONMarshal(yy3192) + } else { + z.EncFallback(yy3192) + } + } + } + if yyr3167 || yy2arr3167 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3167[8] { + yy3195 := &x.LastTimestamp + yym3196 := z.EncBinary() + _ = yym3196 + if false { + } else if z.HasExtensions() && z.EncExt(yy3195) { + } else if yym3196 { + z.EncBinaryMarshal(yy3195) + } else if !yym3196 && z.IsJSONHandle() { + z.EncJSONMarshal(yy3195) + } else { + z.EncFallback(yy3195) + } + } else { + r.EncodeNil() + } + } else { + if yyq3167[8] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("lastTimestamp")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy3197 := &x.LastTimestamp + yym3198 := z.EncBinary() + _ = yym3198 + if false { + } else if z.HasExtensions() && z.EncExt(yy3197) { + } else if yym3198 { + z.EncBinaryMarshal(yy3197) + } else if !yym3198 && z.IsJSONHandle() { + z.EncJSONMarshal(yy3197) + } else { + z.EncFallback(yy3197) + } + } + } + if yyr3167 || yy2arr3167 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3167[9] { + yym3200 := z.EncBinary() + _ = yym3200 + if false { + } else { + r.EncodeInt(int64(x.Count)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq3167[9] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("count")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3201 := z.EncBinary() + _ = yym3201 + if false { + } else { + r.EncodeInt(int64(x.Count)) + } + } + } + if yyr3167 || yy2arr3167 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3167[10] { + yym3203 := z.EncBinary() + _ = yym3203 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Type)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3167[10] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("type")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3204 := z.EncBinary() + _ = yym3204 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Type)) + } + } + } + if yyr3167 || yy2arr3167 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *Event) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym3205 := z.DecBinary() + _ = yym3205 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct3206 := r.ContainerType() + if yyct3206 == codecSelferValueTypeMap1234 { + yyl3206 := r.ReadMapStart() + if yyl3206 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl3206, d) + } + } else if yyct3206 == codecSelferValueTypeArray1234 { + yyl3206 := r.ReadArrayStart() + if yyl3206 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl3206, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *Event) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3207Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3207Slc + var yyhl3207 bool = l >= 0 + for yyj3207 := 0; ; yyj3207++ { + if yyhl3207 { + if yyj3207 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3207Slc = r.DecodeBytes(yys3207Slc, true, true) + yys3207 := string(yys3207Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3207 { + 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()) + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = ObjectMeta{} + } else { + yyv3210 := &x.ObjectMeta + yyv3210.CodecDecodeSelf(d) + } + case "involvedObject": + if r.TryDecodeAsNil() { + x.InvolvedObject = ObjectReference{} + } else { + yyv3211 := &x.InvolvedObject + yyv3211.CodecDecodeSelf(d) + } + case "reason": + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + x.Reason = string(r.DecodeString()) + } + case "message": + if r.TryDecodeAsNil() { + x.Message = "" + } else { + x.Message = string(r.DecodeString()) + } + case "source": + if r.TryDecodeAsNil() { + x.Source = EventSource{} + } else { + yyv3214 := &x.Source + yyv3214.CodecDecodeSelf(d) + } + case "firstTimestamp": + if r.TryDecodeAsNil() { + x.FirstTimestamp = pkg2_unversioned.Time{} + } else { + yyv3215 := &x.FirstTimestamp + yym3216 := z.DecBinary() + _ = yym3216 + if false { + } else if z.HasExtensions() && z.DecExt(yyv3215) { + } else if yym3216 { + z.DecBinaryUnmarshal(yyv3215) + } else if !yym3216 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3215) + } else { + z.DecFallback(yyv3215, false) + } + } + case "lastTimestamp": + if r.TryDecodeAsNil() { + x.LastTimestamp = pkg2_unversioned.Time{} + } else { + yyv3217 := &x.LastTimestamp + yym3218 := z.DecBinary() + _ = yym3218 + if false { + } else if z.HasExtensions() && z.DecExt(yyv3217) { + } else if yym3218 { + z.DecBinaryUnmarshal(yyv3217) + } else if !yym3218 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3217) + } else { + z.DecFallback(yyv3217, false) + } + } + case "count": + if r.TryDecodeAsNil() { + x.Count = 0 + } else { + x.Count = int(r.DecodeInt(codecSelferBitsize1234)) + } + case "type": + if r.TryDecodeAsNil() { + x.Type = "" + } else { + x.Type = string(r.DecodeString()) + } + default: + z.DecStructFieldNotFound(-1, yys3207) + } // end switch yys3207 + } // end for yyj3207 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj3221 int + var yyb3221 bool + var yyhl3221 bool = l >= 0 + yyj3221++ + if yyhl3221 { + yyb3221 = yyj3221 > l + } else { + yyb3221 = r.CheckBreak() + } + if yyb3221 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj3221++ + if yyhl3221 { + yyb3221 = yyj3221 > l + } else { + yyb3221 = r.CheckBreak() + } + if yyb3221 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + yyj3221++ + if yyhl3221 { + yyb3221 = yyj3221 > l + } else { + yyb3221 = r.CheckBreak() + } + if yyb3221 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = ObjectMeta{} + } else { + yyv3224 := &x.ObjectMeta + yyv3224.CodecDecodeSelf(d) + } + yyj3221++ + if yyhl3221 { + yyb3221 = yyj3221 > l + } else { + yyb3221 = r.CheckBreak() + } + if yyb3221 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.InvolvedObject = ObjectReference{} + } else { + yyv3225 := &x.InvolvedObject + yyv3225.CodecDecodeSelf(d) + } + yyj3221++ + if yyhl3221 { + yyb3221 = yyj3221 > l + } else { + yyb3221 = r.CheckBreak() + } + if yyb3221 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + x.Reason = string(r.DecodeString()) + } + yyj3221++ + if yyhl3221 { + yyb3221 = yyj3221 > l + } else { + yyb3221 = r.CheckBreak() + } + if yyb3221 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Message = "" + } else { + x.Message = string(r.DecodeString()) + } + yyj3221++ + if yyhl3221 { + yyb3221 = yyj3221 > l + } else { + yyb3221 = r.CheckBreak() + } + if yyb3221 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Source = EventSource{} + } else { + yyv3228 := &x.Source + yyv3228.CodecDecodeSelf(d) + } + yyj3221++ + if yyhl3221 { + yyb3221 = yyj3221 > l + } else { + yyb3221 = r.CheckBreak() + } + if yyb3221 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.FirstTimestamp = pkg2_unversioned.Time{} + } else { + yyv3229 := &x.FirstTimestamp + yym3230 := z.DecBinary() + _ = yym3230 + if false { + } else if z.HasExtensions() && z.DecExt(yyv3229) { + } else if yym3230 { + z.DecBinaryUnmarshal(yyv3229) + } else if !yym3230 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3229) + } else { + z.DecFallback(yyv3229, false) + } + } + yyj3221++ + if yyhl3221 { + yyb3221 = yyj3221 > l + } else { + yyb3221 = r.CheckBreak() + } + if yyb3221 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.LastTimestamp = pkg2_unversioned.Time{} + } else { + yyv3231 := &x.LastTimestamp + yym3232 := z.DecBinary() + _ = yym3232 + if false { + } else if z.HasExtensions() && z.DecExt(yyv3231) { + } else if yym3232 { + z.DecBinaryUnmarshal(yyv3231) + } else if !yym3232 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3231) + } else { + z.DecFallback(yyv3231, false) + } + } + yyj3221++ + if yyhl3221 { + yyb3221 = yyj3221 > l + } else { + yyb3221 = r.CheckBreak() + } + if yyb3221 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Count = 0 + } else { + x.Count = int(r.DecodeInt(codecSelferBitsize1234)) + } + yyj3221++ + if yyhl3221 { + yyb3221 = yyj3221 > l + } else { + yyb3221 = r.CheckBreak() + } + if yyb3221 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Type = "" + } else { + x.Type = string(r.DecodeString()) + } + for { + yyj3221++ + if yyhl3221 { + yyb3221 = yyj3221 > l + } else { + yyb3221 = r.CheckBreak() + } + if yyb3221 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj3221-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *EventList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym3235 := z.EncBinary() + _ = yym3235 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep3236 := !z.EncBinary() + yy2arr3236 := z.EncBasicHandle().StructToArray + var yyq3236 [4]bool + _, _, _ = yysep3236, yyq3236, yy2arr3236 + const yyr3236 bool = false + yyq3236[0] = x.Kind != "" + yyq3236[1] = x.APIVersion != "" + yyq3236[2] = true + var yynn3236 int + if yyr3236 || yy2arr3236 { + r.EncodeArrayStart(4) + } else { + yynn3236 = 1 + for _, b := range yyq3236 { + if b { + yynn3236++ + } + } + r.EncodeMapStart(yynn3236) + yynn3236 = 0 + } + if yyr3236 || yy2arr3236 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3236[0] { + yym3238 := z.EncBinary() + _ = yym3238 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3236[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3239 := z.EncBinary() + _ = yym3239 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr3236 || yy2arr3236 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3236[1] { + yym3241 := z.EncBinary() + _ = yym3241 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3236[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3242 := z.EncBinary() + _ = yym3242 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr3236 || yy2arr3236 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3236[2] { + yy3244 := &x.ListMeta + yym3245 := z.EncBinary() + _ = yym3245 + if false { + } else if z.HasExtensions() && z.EncExt(yy3244) { + } else { + z.EncFallback(yy3244) + } + } else { + r.EncodeNil() + } + } else { + if yyq3236[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy3246 := &x.ListMeta + yym3247 := z.EncBinary() + _ = yym3247 + if false { + } else if z.HasExtensions() && z.EncExt(yy3246) { + } else { + z.EncFallback(yy3246) + } + } + } + if yyr3236 || yy2arr3236 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym3249 := z.EncBinary() + _ = yym3249 + if false { + } else { + h.encSliceEvent(([]Event)(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 { + yym3250 := z.EncBinary() + _ = yym3250 + if false { + } else { + h.encSliceEvent(([]Event)(x.Items), e) + } + } + } + if yyr3236 || yy2arr3236 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *EventList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym3251 := z.DecBinary() + _ = yym3251 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct3252 := r.ContainerType() + if yyct3252 == codecSelferValueTypeMap1234 { + yyl3252 := r.ReadMapStart() + if yyl3252 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl3252, d) + } + } else if yyct3252 == codecSelferValueTypeArray1234 { + yyl3252 := r.ReadArrayStart() + if yyl3252 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl3252, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *EventList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3253Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3253Slc + var yyhl3253 bool = l >= 0 + for yyj3253 := 0; ; yyj3253++ { + if yyhl3253 { + if yyj3253 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3253Slc = r.DecodeBytes(yys3253Slc, true, true) + yys3253 := string(yys3253Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3253 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -39319,31 +40645,31 @@ func (x *EventList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3163 := &x.ListMeta - yym3164 := z.DecBinary() - _ = yym3164 + yyv3256 := &x.ListMeta + yym3257 := z.DecBinary() + _ = yym3257 if false { - } else if z.HasExtensions() && z.DecExt(yyv3163) { + } else if z.HasExtensions() && z.DecExt(yyv3256) { } else { - z.DecFallback(yyv3163, false) + z.DecFallback(yyv3256, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3165 := &x.Items - yym3166 := z.DecBinary() - _ = yym3166 + yyv3258 := &x.Items + yym3259 := z.DecBinary() + _ = yym3259 if false { } else { - h.decSliceEvent((*[]Event)(yyv3165), d) + h.decSliceEvent((*[]Event)(yyv3258), d) } } default: - z.DecStructFieldNotFound(-1, yys3160) - } // end switch yys3160 - } // end for yyj3160 + z.DecStructFieldNotFound(-1, yys3253) + } // end switch yys3253 + } // end for yyj3253 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -39351,16 +40677,16 @@ func (x *EventList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3167 int - var yyb3167 bool - var yyhl3167 bool = l >= 0 - yyj3167++ - if yyhl3167 { - yyb3167 = yyj3167 > l + var yyj3260 int + var yyb3260 bool + var yyhl3260 bool = l >= 0 + yyj3260++ + if yyhl3260 { + yyb3260 = yyj3260 > l } else { - yyb3167 = r.CheckBreak() + yyb3260 = r.CheckBreak() } - if yyb3167 { + if yyb3260 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39370,13 +40696,13 @@ func (x *EventList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3167++ - if yyhl3167 { - yyb3167 = yyj3167 > l + yyj3260++ + if yyhl3260 { + yyb3260 = yyj3260 > l } else { - yyb3167 = r.CheckBreak() + yyb3260 = r.CheckBreak() } - if yyb3167 { + if yyb3260 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39386,13 +40712,13 @@ func (x *EventList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3167++ - if yyhl3167 { - yyb3167 = yyj3167 > l + yyj3260++ + if yyhl3260 { + yyb3260 = yyj3260 > l } else { - yyb3167 = r.CheckBreak() + yyb3260 = r.CheckBreak() } - if yyb3167 { + if yyb3260 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39400,22 +40726,22 @@ func (x *EventList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3170 := &x.ListMeta - yym3171 := z.DecBinary() - _ = yym3171 + yyv3263 := &x.ListMeta + yym3264 := z.DecBinary() + _ = yym3264 if false { - } else if z.HasExtensions() && z.DecExt(yyv3170) { + } else if z.HasExtensions() && z.DecExt(yyv3263) { } else { - z.DecFallback(yyv3170, false) + z.DecFallback(yyv3263, false) } } - yyj3167++ - if yyhl3167 { - yyb3167 = yyj3167 > l + yyj3260++ + if yyhl3260 { + yyb3260 = yyj3260 > l } else { - yyb3167 = r.CheckBreak() + yyb3260 = r.CheckBreak() } - if yyb3167 { + if yyb3260 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39423,26 +40749,26 @@ func (x *EventList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3172 := &x.Items - yym3173 := z.DecBinary() - _ = yym3173 + yyv3265 := &x.Items + yym3266 := z.DecBinary() + _ = yym3266 if false { } else { - h.decSliceEvent((*[]Event)(yyv3172), d) + h.decSliceEvent((*[]Event)(yyv3265), d) } } for { - yyj3167++ - if yyhl3167 { - yyb3167 = yyj3167 > l + yyj3260++ + if yyhl3260 { + yyb3260 = yyj3260 > l } else { - yyb3167 = r.CheckBreak() + yyb3260 = r.CheckBreak() } - if yyb3167 { + if yyb3260 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3167-1, "") + z.DecStructFieldNotFound(yyj3260-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -39454,37 +40780,37 @@ func (x *List) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3174 := z.EncBinary() - _ = yym3174 + yym3267 := z.EncBinary() + _ = yym3267 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3175 := !z.EncBinary() - yy2arr3175 := z.EncBasicHandle().StructToArray - var yyq3175 [4]bool - _, _, _ = yysep3175, yyq3175, yy2arr3175 - const yyr3175 bool = false - yyq3175[0] = x.Kind != "" - yyq3175[1] = x.APIVersion != "" - yyq3175[2] = true - var yynn3175 int - if yyr3175 || yy2arr3175 { + yysep3268 := !z.EncBinary() + yy2arr3268 := z.EncBasicHandle().StructToArray + var yyq3268 [4]bool + _, _, _ = yysep3268, yyq3268, yy2arr3268 + const yyr3268 bool = false + yyq3268[0] = x.Kind != "" + yyq3268[1] = x.APIVersion != "" + yyq3268[2] = true + var yynn3268 int + if yyr3268 || yy2arr3268 { r.EncodeArrayStart(4) } else { - yynn3175 = 1 - for _, b := range yyq3175 { + yynn3268 = 1 + for _, b := range yyq3268 { if b { - yynn3175++ + yynn3268++ } } - r.EncodeMapStart(yynn3175) - yynn3175 = 0 + r.EncodeMapStart(yynn3268) + yynn3268 = 0 } - if yyr3175 || yy2arr3175 { + if yyr3268 || yy2arr3268 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3175[0] { - yym3177 := z.EncBinary() - _ = yym3177 + if yyq3268[0] { + yym3270 := z.EncBinary() + _ = yym3270 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -39493,23 +40819,23 @@ func (x *List) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3175[0] { + if yyq3268[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3178 := z.EncBinary() - _ = yym3178 + yym3271 := z.EncBinary() + _ = yym3271 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3175 || yy2arr3175 { + if yyr3268 || yy2arr3268 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3175[1] { - yym3180 := z.EncBinary() - _ = yym3180 + if yyq3268[1] { + yym3273 := z.EncBinary() + _ = yym3273 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -39518,54 +40844,54 @@ func (x *List) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3175[1] { + if yyq3268[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3181 := z.EncBinary() - _ = yym3181 + yym3274 := z.EncBinary() + _ = yym3274 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3175 || yy2arr3175 { + if yyr3268 || yy2arr3268 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3175[2] { - yy3183 := &x.ListMeta - yym3184 := z.EncBinary() - _ = yym3184 + if yyq3268[2] { + yy3276 := &x.ListMeta + yym3277 := z.EncBinary() + _ = yym3277 if false { - } else if z.HasExtensions() && z.EncExt(yy3183) { + } else if z.HasExtensions() && z.EncExt(yy3276) { } else { - z.EncFallback(yy3183) + z.EncFallback(yy3276) } } else { r.EncodeNil() } } else { - if yyq3175[2] { + if yyq3268[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3185 := &x.ListMeta - yym3186 := z.EncBinary() - _ = yym3186 + yy3278 := &x.ListMeta + yym3279 := z.EncBinary() + _ = yym3279 if false { - } else if z.HasExtensions() && z.EncExt(yy3185) { + } else if z.HasExtensions() && z.EncExt(yy3278) { } else { - z.EncFallback(yy3185) + z.EncFallback(yy3278) } } } - if yyr3175 || yy2arr3175 { + if yyr3268 || yy2arr3268 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym3188 := z.EncBinary() - _ = yym3188 + yym3281 := z.EncBinary() + _ = yym3281 if false { } else { h.encSliceruntime_Object(([]pkg8_runtime.Object)(x.Items), e) @@ -39578,15 +40904,15 @@ func (x *List) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym3189 := z.EncBinary() - _ = yym3189 + yym3282 := z.EncBinary() + _ = yym3282 if false { } else { h.encSliceruntime_Object(([]pkg8_runtime.Object)(x.Items), e) } } } - if yyr3175 || yy2arr3175 { + if yyr3268 || yy2arr3268 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -39599,25 +40925,25 @@ func (x *List) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3190 := z.DecBinary() - _ = yym3190 + yym3283 := z.DecBinary() + _ = yym3283 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3191 := r.ContainerType() - if yyct3191 == codecSelferValueTypeMap1234 { - yyl3191 := r.ReadMapStart() - if yyl3191 == 0 { + yyct3284 := r.ContainerType() + if yyct3284 == codecSelferValueTypeMap1234 { + yyl3284 := r.ReadMapStart() + if yyl3284 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3191, d) + x.codecDecodeSelfFromMap(yyl3284, d) } - } else if yyct3191 == codecSelferValueTypeArray1234 { - yyl3191 := r.ReadArrayStart() - if yyl3191 == 0 { + } else if yyct3284 == codecSelferValueTypeArray1234 { + yyl3284 := r.ReadArrayStart() + if yyl3284 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3191, d) + x.codecDecodeSelfFromArray(yyl3284, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -39629,12 +40955,12 @@ func (x *List) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3192Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3192Slc - var yyhl3192 bool = l >= 0 - for yyj3192 := 0; ; yyj3192++ { - if yyhl3192 { - if yyj3192 >= l { + var yys3285Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3285Slc + var yyhl3285 bool = l >= 0 + for yyj3285 := 0; ; yyj3285++ { + if yyhl3285 { + if yyj3285 >= l { break } } else { @@ -39643,10 +40969,10 @@ func (x *List) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3192Slc = r.DecodeBytes(yys3192Slc, true, true) - yys3192 := string(yys3192Slc) + yys3285Slc = r.DecodeBytes(yys3285Slc, true, true) + yys3285 := string(yys3285Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3192 { + switch yys3285 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -39663,31 +40989,31 @@ func (x *List) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3195 := &x.ListMeta - yym3196 := z.DecBinary() - _ = yym3196 + yyv3288 := &x.ListMeta + yym3289 := z.DecBinary() + _ = yym3289 if false { - } else if z.HasExtensions() && z.DecExt(yyv3195) { + } else if z.HasExtensions() && z.DecExt(yyv3288) { } else { - z.DecFallback(yyv3195, false) + z.DecFallback(yyv3288, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3197 := &x.Items - yym3198 := z.DecBinary() - _ = yym3198 + yyv3290 := &x.Items + yym3291 := z.DecBinary() + _ = yym3291 if false { } else { - h.decSliceruntime_Object((*[]pkg8_runtime.Object)(yyv3197), d) + h.decSliceruntime_Object((*[]pkg8_runtime.Object)(yyv3290), d) } } default: - z.DecStructFieldNotFound(-1, yys3192) - } // end switch yys3192 - } // end for yyj3192 + z.DecStructFieldNotFound(-1, yys3285) + } // end switch yys3285 + } // end for yyj3285 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -39695,16 +41021,16 @@ func (x *List) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3199 int - var yyb3199 bool - var yyhl3199 bool = l >= 0 - yyj3199++ - if yyhl3199 { - yyb3199 = yyj3199 > l + var yyj3292 int + var yyb3292 bool + var yyhl3292 bool = l >= 0 + yyj3292++ + if yyhl3292 { + yyb3292 = yyj3292 > l } else { - yyb3199 = r.CheckBreak() + yyb3292 = r.CheckBreak() } - if yyb3199 { + if yyb3292 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39714,13 +41040,13 @@ func (x *List) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3199++ - if yyhl3199 { - yyb3199 = yyj3199 > l + yyj3292++ + if yyhl3292 { + yyb3292 = yyj3292 > l } else { - yyb3199 = r.CheckBreak() + yyb3292 = r.CheckBreak() } - if yyb3199 { + if yyb3292 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39730,13 +41056,13 @@ func (x *List) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3199++ - if yyhl3199 { - yyb3199 = yyj3199 > l + yyj3292++ + if yyhl3292 { + yyb3292 = yyj3292 > l } else { - yyb3199 = r.CheckBreak() + yyb3292 = r.CheckBreak() } - if yyb3199 { + if yyb3292 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39744,22 +41070,22 @@ func (x *List) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3202 := &x.ListMeta - yym3203 := z.DecBinary() - _ = yym3203 + yyv3295 := &x.ListMeta + yym3296 := z.DecBinary() + _ = yym3296 if false { - } else if z.HasExtensions() && z.DecExt(yyv3202) { + } else if z.HasExtensions() && z.DecExt(yyv3295) { } else { - z.DecFallback(yyv3202, false) + z.DecFallback(yyv3295, false) } } - yyj3199++ - if yyhl3199 { - yyb3199 = yyj3199 > l + yyj3292++ + if yyhl3292 { + yyb3292 = yyj3292 > l } else { - yyb3199 = r.CheckBreak() + yyb3292 = r.CheckBreak() } - if yyb3199 { + if yyb3292 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39767,26 +41093,26 @@ func (x *List) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3204 := &x.Items - yym3205 := z.DecBinary() - _ = yym3205 + yyv3297 := &x.Items + yym3298 := z.DecBinary() + _ = yym3298 if false { } else { - h.decSliceruntime_Object((*[]pkg8_runtime.Object)(yyv3204), d) + h.decSliceruntime_Object((*[]pkg8_runtime.Object)(yyv3297), d) } } for { - yyj3199++ - if yyhl3199 { - yyb3199 = yyj3199 > l + yyj3292++ + if yyhl3292 { + yyb3292 = yyj3292 > l } else { - yyb3199 = r.CheckBreak() + yyb3292 = r.CheckBreak() } - if yyb3199 { + if yyb3292 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3199-1, "") + z.DecStructFieldNotFound(yyj3292-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -39795,8 +41121,8 @@ func (x LimitType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym3206 := z.EncBinary() - _ = yym3206 + yym3299 := z.EncBinary() + _ = yym3299 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -39808,8 +41134,8 @@ func (x *LimitType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3207 := z.DecBinary() - _ = yym3207 + yym3300 := z.DecBinary() + _ = yym3300 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -39824,53 +41150,53 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3208 := z.EncBinary() - _ = yym3208 + yym3301 := z.EncBinary() + _ = yym3301 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3209 := !z.EncBinary() - yy2arr3209 := z.EncBasicHandle().StructToArray - var yyq3209 [6]bool - _, _, _ = yysep3209, yyq3209, yy2arr3209 - const yyr3209 bool = false - yyq3209[0] = x.Type != "" - yyq3209[1] = len(x.Max) != 0 - yyq3209[2] = len(x.Min) != 0 - yyq3209[3] = len(x.Default) != 0 - yyq3209[4] = len(x.DefaultRequest) != 0 - yyq3209[5] = len(x.MaxLimitRequestRatio) != 0 - var yynn3209 int - if yyr3209 || yy2arr3209 { + yysep3302 := !z.EncBinary() + yy2arr3302 := z.EncBasicHandle().StructToArray + var yyq3302 [6]bool + _, _, _ = yysep3302, yyq3302, yy2arr3302 + const yyr3302 bool = false + yyq3302[0] = x.Type != "" + yyq3302[1] = len(x.Max) != 0 + yyq3302[2] = len(x.Min) != 0 + yyq3302[3] = len(x.Default) != 0 + yyq3302[4] = len(x.DefaultRequest) != 0 + yyq3302[5] = len(x.MaxLimitRequestRatio) != 0 + var yynn3302 int + if yyr3302 || yy2arr3302 { r.EncodeArrayStart(6) } else { - yynn3209 = 0 - for _, b := range yyq3209 { + yynn3302 = 0 + for _, b := range yyq3302 { if b { - yynn3209++ + yynn3302++ } } - r.EncodeMapStart(yynn3209) - yynn3209 = 0 + r.EncodeMapStart(yynn3302) + yynn3302 = 0 } - if yyr3209 || yy2arr3209 { + if yyr3302 || yy2arr3302 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3209[0] { + if yyq3302[0] { x.Type.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3209[0] { + if yyq3302[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("type")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } } - if yyr3209 || yy2arr3209 { + if yyr3302 || yy2arr3302 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3209[1] { + if yyq3302[1] { if x.Max == nil { r.EncodeNil() } else { @@ -39880,7 +41206,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3209[1] { + if yyq3302[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("max")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -39891,9 +41217,9 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3209 || yy2arr3209 { + if yyr3302 || yy2arr3302 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3209[2] { + if yyq3302[2] { if x.Min == nil { r.EncodeNil() } else { @@ -39903,7 +41229,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3209[2] { + if yyq3302[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("min")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -39914,9 +41240,9 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3209 || yy2arr3209 { + if yyr3302 || yy2arr3302 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3209[3] { + if yyq3302[3] { if x.Default == nil { r.EncodeNil() } else { @@ -39926,7 +41252,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3209[3] { + if yyq3302[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("default")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -39937,9 +41263,9 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3209 || yy2arr3209 { + if yyr3302 || yy2arr3302 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3209[4] { + if yyq3302[4] { if x.DefaultRequest == nil { r.EncodeNil() } else { @@ -39949,7 +41275,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3209[4] { + if yyq3302[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("defaultRequest")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -39960,9 +41286,9 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3209 || yy2arr3209 { + if yyr3302 || yy2arr3302 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3209[5] { + if yyq3302[5] { if x.MaxLimitRequestRatio == nil { r.EncodeNil() } else { @@ -39972,7 +41298,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3209[5] { + if yyq3302[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("maxLimitRequestRatio")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -39983,7 +41309,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3209 || yy2arr3209 { + if yyr3302 || yy2arr3302 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -39996,25 +41322,25 @@ func (x *LimitRangeItem) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3216 := z.DecBinary() - _ = yym3216 + yym3309 := z.DecBinary() + _ = yym3309 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3217 := r.ContainerType() - if yyct3217 == codecSelferValueTypeMap1234 { - yyl3217 := r.ReadMapStart() - if yyl3217 == 0 { + yyct3310 := r.ContainerType() + if yyct3310 == codecSelferValueTypeMap1234 { + yyl3310 := r.ReadMapStart() + if yyl3310 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3217, d) + x.codecDecodeSelfFromMap(yyl3310, d) } - } else if yyct3217 == codecSelferValueTypeArray1234 { - yyl3217 := r.ReadArrayStart() - if yyl3217 == 0 { + } else if yyct3310 == codecSelferValueTypeArray1234 { + yyl3310 := r.ReadArrayStart() + if yyl3310 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3217, d) + x.codecDecodeSelfFromArray(yyl3310, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -40026,12 +41352,12 @@ func (x *LimitRangeItem) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3218Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3218Slc - var yyhl3218 bool = l >= 0 - for yyj3218 := 0; ; yyj3218++ { - if yyhl3218 { - if yyj3218 >= l { + var yys3311Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3311Slc + var yyhl3311 bool = l >= 0 + for yyj3311 := 0; ; yyj3311++ { + if yyhl3311 { + if yyj3311 >= l { break } } else { @@ -40040,10 +41366,10 @@ func (x *LimitRangeItem) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3218Slc = r.DecodeBytes(yys3218Slc, true, true) - yys3218 := string(yys3218Slc) + yys3311Slc = r.DecodeBytes(yys3311Slc, true, true) + yys3311 := string(yys3311Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3218 { + switch yys3311 { case "type": if r.TryDecodeAsNil() { x.Type = "" @@ -40054,41 +41380,41 @@ func (x *LimitRangeItem) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Max = nil } else { - yyv3220 := &x.Max - yyv3220.CodecDecodeSelf(d) + yyv3313 := &x.Max + yyv3313.CodecDecodeSelf(d) } case "min": if r.TryDecodeAsNil() { x.Min = nil } else { - yyv3221 := &x.Min - yyv3221.CodecDecodeSelf(d) + yyv3314 := &x.Min + yyv3314.CodecDecodeSelf(d) } case "default": if r.TryDecodeAsNil() { x.Default = nil } else { - yyv3222 := &x.Default - yyv3222.CodecDecodeSelf(d) + yyv3315 := &x.Default + yyv3315.CodecDecodeSelf(d) } case "defaultRequest": if r.TryDecodeAsNil() { x.DefaultRequest = nil } else { - yyv3223 := &x.DefaultRequest - yyv3223.CodecDecodeSelf(d) + yyv3316 := &x.DefaultRequest + yyv3316.CodecDecodeSelf(d) } case "maxLimitRequestRatio": if r.TryDecodeAsNil() { x.MaxLimitRequestRatio = nil } else { - yyv3224 := &x.MaxLimitRequestRatio - yyv3224.CodecDecodeSelf(d) + yyv3317 := &x.MaxLimitRequestRatio + yyv3317.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3218) - } // end switch yys3218 - } // end for yyj3218 + z.DecStructFieldNotFound(-1, yys3311) + } // end switch yys3311 + } // end for yyj3311 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -40096,16 +41422,16 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3225 int - var yyb3225 bool - var yyhl3225 bool = l >= 0 - yyj3225++ - if yyhl3225 { - yyb3225 = yyj3225 > l + var yyj3318 int + var yyb3318 bool + var yyhl3318 bool = l >= 0 + yyj3318++ + if yyhl3318 { + yyb3318 = yyj3318 > l } else { - yyb3225 = r.CheckBreak() + yyb3318 = r.CheckBreak() } - if yyb3225 { + if yyb3318 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40115,13 +41441,13 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Type = LimitType(r.DecodeString()) } - yyj3225++ - if yyhl3225 { - yyb3225 = yyj3225 > l + yyj3318++ + if yyhl3318 { + yyb3318 = yyj3318 > l } else { - yyb3225 = r.CheckBreak() + yyb3318 = r.CheckBreak() } - if yyb3225 { + if yyb3318 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40129,16 +41455,16 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Max = nil } else { - yyv3227 := &x.Max - yyv3227.CodecDecodeSelf(d) + yyv3320 := &x.Max + yyv3320.CodecDecodeSelf(d) } - yyj3225++ - if yyhl3225 { - yyb3225 = yyj3225 > l + yyj3318++ + if yyhl3318 { + yyb3318 = yyj3318 > l } else { - yyb3225 = r.CheckBreak() + yyb3318 = r.CheckBreak() } - if yyb3225 { + if yyb3318 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40146,16 +41472,16 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Min = nil } else { - yyv3228 := &x.Min - yyv3228.CodecDecodeSelf(d) + yyv3321 := &x.Min + yyv3321.CodecDecodeSelf(d) } - yyj3225++ - if yyhl3225 { - yyb3225 = yyj3225 > l + yyj3318++ + if yyhl3318 { + yyb3318 = yyj3318 > l } else { - yyb3225 = r.CheckBreak() + yyb3318 = r.CheckBreak() } - if yyb3225 { + if yyb3318 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40163,16 +41489,16 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Default = nil } else { - yyv3229 := &x.Default - yyv3229.CodecDecodeSelf(d) + yyv3322 := &x.Default + yyv3322.CodecDecodeSelf(d) } - yyj3225++ - if yyhl3225 { - yyb3225 = yyj3225 > l + yyj3318++ + if yyhl3318 { + yyb3318 = yyj3318 > l } else { - yyb3225 = r.CheckBreak() + yyb3318 = r.CheckBreak() } - if yyb3225 { + if yyb3318 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40180,16 +41506,16 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.DefaultRequest = nil } else { - yyv3230 := &x.DefaultRequest - yyv3230.CodecDecodeSelf(d) + yyv3323 := &x.DefaultRequest + yyv3323.CodecDecodeSelf(d) } - yyj3225++ - if yyhl3225 { - yyb3225 = yyj3225 > l + yyj3318++ + if yyhl3318 { + yyb3318 = yyj3318 > l } else { - yyb3225 = r.CheckBreak() + yyb3318 = r.CheckBreak() } - if yyb3225 { + if yyb3318 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40197,21 +41523,21 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.MaxLimitRequestRatio = nil } else { - yyv3231 := &x.MaxLimitRequestRatio - yyv3231.CodecDecodeSelf(d) + yyv3324 := &x.MaxLimitRequestRatio + yyv3324.CodecDecodeSelf(d) } for { - yyj3225++ - if yyhl3225 { - yyb3225 = yyj3225 > l + yyj3318++ + if yyhl3318 { + yyb3318 = yyj3318 > l } else { - yyb3225 = r.CheckBreak() + yyb3318 = r.CheckBreak() } - if yyb3225 { + if yyb3318 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3225-1, "") + z.DecStructFieldNotFound(yyj3318-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -40223,36 +41549,36 @@ func (x *LimitRangeSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3232 := z.EncBinary() - _ = yym3232 + yym3325 := z.EncBinary() + _ = yym3325 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3233 := !z.EncBinary() - yy2arr3233 := z.EncBasicHandle().StructToArray - var yyq3233 [1]bool - _, _, _ = yysep3233, yyq3233, yy2arr3233 - const yyr3233 bool = false - var yynn3233 int - if yyr3233 || yy2arr3233 { + yysep3326 := !z.EncBinary() + yy2arr3326 := z.EncBasicHandle().StructToArray + var yyq3326 [1]bool + _, _, _ = yysep3326, yyq3326, yy2arr3326 + const yyr3326 bool = false + var yynn3326 int + if yyr3326 || yy2arr3326 { r.EncodeArrayStart(1) } else { - yynn3233 = 1 - for _, b := range yyq3233 { + yynn3326 = 1 + for _, b := range yyq3326 { if b { - yynn3233++ + yynn3326++ } } - r.EncodeMapStart(yynn3233) - yynn3233 = 0 + r.EncodeMapStart(yynn3326) + yynn3326 = 0 } - if yyr3233 || yy2arr3233 { + if yyr3326 || yy2arr3326 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Limits == nil { r.EncodeNil() } else { - yym3235 := z.EncBinary() - _ = yym3235 + yym3328 := z.EncBinary() + _ = yym3328 if false { } else { h.encSliceLimitRangeItem(([]LimitRangeItem)(x.Limits), e) @@ -40265,15 +41591,15 @@ func (x *LimitRangeSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x.Limits == nil { r.EncodeNil() } else { - yym3236 := z.EncBinary() - _ = yym3236 + yym3329 := z.EncBinary() + _ = yym3329 if false { } else { h.encSliceLimitRangeItem(([]LimitRangeItem)(x.Limits), e) } } } - if yyr3233 || yy2arr3233 { + if yyr3326 || yy2arr3326 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -40286,25 +41612,25 @@ func (x *LimitRangeSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3237 := z.DecBinary() - _ = yym3237 + yym3330 := z.DecBinary() + _ = yym3330 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3238 := r.ContainerType() - if yyct3238 == codecSelferValueTypeMap1234 { - yyl3238 := r.ReadMapStart() - if yyl3238 == 0 { + yyct3331 := r.ContainerType() + if yyct3331 == codecSelferValueTypeMap1234 { + yyl3331 := r.ReadMapStart() + if yyl3331 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3238, d) + x.codecDecodeSelfFromMap(yyl3331, d) } - } else if yyct3238 == codecSelferValueTypeArray1234 { - yyl3238 := r.ReadArrayStart() - if yyl3238 == 0 { + } else if yyct3331 == codecSelferValueTypeArray1234 { + yyl3331 := r.ReadArrayStart() + if yyl3331 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3238, d) + x.codecDecodeSelfFromArray(yyl3331, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -40316,12 +41642,12 @@ func (x *LimitRangeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3239Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3239Slc - var yyhl3239 bool = l >= 0 - for yyj3239 := 0; ; yyj3239++ { - if yyhl3239 { - if yyj3239 >= l { + var yys3332Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3332Slc + var yyhl3332 bool = l >= 0 + for yyj3332 := 0; ; yyj3332++ { + if yyhl3332 { + if yyj3332 >= l { break } } else { @@ -40330,26 +41656,26 @@ func (x *LimitRangeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3239Slc = r.DecodeBytes(yys3239Slc, true, true) - yys3239 := string(yys3239Slc) + yys3332Slc = r.DecodeBytes(yys3332Slc, true, true) + yys3332 := string(yys3332Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3239 { + switch yys3332 { case "limits": if r.TryDecodeAsNil() { x.Limits = nil } else { - yyv3240 := &x.Limits - yym3241 := z.DecBinary() - _ = yym3241 + yyv3333 := &x.Limits + yym3334 := z.DecBinary() + _ = yym3334 if false { } else { - h.decSliceLimitRangeItem((*[]LimitRangeItem)(yyv3240), d) + h.decSliceLimitRangeItem((*[]LimitRangeItem)(yyv3333), d) } } default: - z.DecStructFieldNotFound(-1, yys3239) - } // end switch yys3239 - } // end for yyj3239 + z.DecStructFieldNotFound(-1, yys3332) + } // end switch yys3332 + } // end for yyj3332 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -40357,16 +41683,16 @@ func (x *LimitRangeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3242 int - var yyb3242 bool - var yyhl3242 bool = l >= 0 - yyj3242++ - if yyhl3242 { - yyb3242 = yyj3242 > l + var yyj3335 int + var yyb3335 bool + var yyhl3335 bool = l >= 0 + yyj3335++ + if yyhl3335 { + yyb3335 = yyj3335 > l } else { - yyb3242 = r.CheckBreak() + yyb3335 = r.CheckBreak() } - if yyb3242 { + if yyb3335 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40374,26 +41700,26 @@ func (x *LimitRangeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Limits = nil } else { - yyv3243 := &x.Limits - yym3244 := z.DecBinary() - _ = yym3244 + yyv3336 := &x.Limits + yym3337 := z.DecBinary() + _ = yym3337 if false { } else { - h.decSliceLimitRangeItem((*[]LimitRangeItem)(yyv3243), d) + h.decSliceLimitRangeItem((*[]LimitRangeItem)(yyv3336), d) } } for { - yyj3242++ - if yyhl3242 { - yyb3242 = yyj3242 > l + yyj3335++ + if yyhl3335 { + yyb3335 = yyj3335 > l } else { - yyb3242 = r.CheckBreak() + yyb3335 = r.CheckBreak() } - if yyb3242 { + if yyb3335 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3242-1, "") + z.DecStructFieldNotFound(yyj3335-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -40405,38 +41731,38 @@ func (x *LimitRange) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3245 := z.EncBinary() - _ = yym3245 + yym3338 := z.EncBinary() + _ = yym3338 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3246 := !z.EncBinary() - yy2arr3246 := z.EncBasicHandle().StructToArray - var yyq3246 [4]bool - _, _, _ = yysep3246, yyq3246, yy2arr3246 - const yyr3246 bool = false - yyq3246[0] = x.Kind != "" - yyq3246[1] = x.APIVersion != "" - yyq3246[2] = true - yyq3246[3] = true - var yynn3246 int - if yyr3246 || yy2arr3246 { + yysep3339 := !z.EncBinary() + yy2arr3339 := z.EncBasicHandle().StructToArray + var yyq3339 [4]bool + _, _, _ = yysep3339, yyq3339, yy2arr3339 + const yyr3339 bool = false + yyq3339[0] = x.Kind != "" + yyq3339[1] = x.APIVersion != "" + yyq3339[2] = true + yyq3339[3] = true + var yynn3339 int + if yyr3339 || yy2arr3339 { r.EncodeArrayStart(4) } else { - yynn3246 = 0 - for _, b := range yyq3246 { + yynn3339 = 0 + for _, b := range yyq3339 { if b { - yynn3246++ + yynn3339++ } } - r.EncodeMapStart(yynn3246) - yynn3246 = 0 + r.EncodeMapStart(yynn3339) + yynn3339 = 0 } - if yyr3246 || yy2arr3246 { + if yyr3339 || yy2arr3339 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3246[0] { - yym3248 := z.EncBinary() - _ = yym3248 + if yyq3339[0] { + yym3341 := z.EncBinary() + _ = yym3341 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -40445,23 +41771,23 @@ func (x *LimitRange) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3246[0] { + if yyq3339[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3249 := z.EncBinary() - _ = yym3249 + yym3342 := z.EncBinary() + _ = yym3342 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3246 || yy2arr3246 { + if yyr3339 || yy2arr3339 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3246[1] { - yym3251 := z.EncBinary() - _ = yym3251 + if yyq3339[1] { + yym3344 := z.EncBinary() + _ = yym3344 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -40470,53 +41796,53 @@ func (x *LimitRange) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3246[1] { + if yyq3339[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3252 := z.EncBinary() - _ = yym3252 + yym3345 := z.EncBinary() + _ = yym3345 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3246 || yy2arr3246 { + if yyr3339 || yy2arr3339 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3246[2] { - yy3254 := &x.ObjectMeta - yy3254.CodecEncodeSelf(e) + if yyq3339[2] { + yy3347 := &x.ObjectMeta + yy3347.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3246[2] { + if yyq3339[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3255 := &x.ObjectMeta - yy3255.CodecEncodeSelf(e) + yy3348 := &x.ObjectMeta + yy3348.CodecEncodeSelf(e) } } - if yyr3246 || yy2arr3246 { + if yyr3339 || yy2arr3339 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3246[3] { - yy3257 := &x.Spec - yy3257.CodecEncodeSelf(e) + if yyq3339[3] { + yy3350 := &x.Spec + yy3350.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3246[3] { + if yyq3339[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3258 := &x.Spec - yy3258.CodecEncodeSelf(e) + yy3351 := &x.Spec + yy3351.CodecEncodeSelf(e) } } - if yyr3246 || yy2arr3246 { + if yyr3339 || yy2arr3339 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -40529,25 +41855,25 @@ func (x *LimitRange) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3259 := z.DecBinary() - _ = yym3259 + yym3352 := z.DecBinary() + _ = yym3352 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3260 := r.ContainerType() - if yyct3260 == codecSelferValueTypeMap1234 { - yyl3260 := r.ReadMapStart() - if yyl3260 == 0 { + yyct3353 := r.ContainerType() + if yyct3353 == codecSelferValueTypeMap1234 { + yyl3353 := r.ReadMapStart() + if yyl3353 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3260, d) + x.codecDecodeSelfFromMap(yyl3353, d) } - } else if yyct3260 == codecSelferValueTypeArray1234 { - yyl3260 := r.ReadArrayStart() - if yyl3260 == 0 { + } else if yyct3353 == codecSelferValueTypeArray1234 { + yyl3353 := r.ReadArrayStart() + if yyl3353 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3260, d) + x.codecDecodeSelfFromArray(yyl3353, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -40559,12 +41885,12 @@ func (x *LimitRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3261Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3261Slc - var yyhl3261 bool = l >= 0 - for yyj3261 := 0; ; yyj3261++ { - if yyhl3261 { - if yyj3261 >= l { + var yys3354Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3354Slc + var yyhl3354 bool = l >= 0 + for yyj3354 := 0; ; yyj3354++ { + if yyhl3354 { + if yyj3354 >= l { break } } else { @@ -40573,10 +41899,10 @@ func (x *LimitRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3261Slc = r.DecodeBytes(yys3261Slc, true, true) - yys3261 := string(yys3261Slc) + yys3354Slc = r.DecodeBytes(yys3354Slc, true, true) + yys3354 := string(yys3354Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3261 { + switch yys3354 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -40593,20 +41919,20 @@ func (x *LimitRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3264 := &x.ObjectMeta - yyv3264.CodecDecodeSelf(d) + yyv3357 := &x.ObjectMeta + yyv3357.CodecDecodeSelf(d) } case "spec": if r.TryDecodeAsNil() { x.Spec = LimitRangeSpec{} } else { - yyv3265 := &x.Spec - yyv3265.CodecDecodeSelf(d) + yyv3358 := &x.Spec + yyv3358.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3261) - } // end switch yys3261 - } // end for yyj3261 + z.DecStructFieldNotFound(-1, yys3354) + } // end switch yys3354 + } // end for yyj3354 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -40614,16 +41940,16 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3266 int - var yyb3266 bool - var yyhl3266 bool = l >= 0 - yyj3266++ - if yyhl3266 { - yyb3266 = yyj3266 > l + var yyj3359 int + var yyb3359 bool + var yyhl3359 bool = l >= 0 + yyj3359++ + if yyhl3359 { + yyb3359 = yyj3359 > l } else { - yyb3266 = r.CheckBreak() + yyb3359 = r.CheckBreak() } - if yyb3266 { + if yyb3359 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40633,13 +41959,13 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3266++ - if yyhl3266 { - yyb3266 = yyj3266 > l + yyj3359++ + if yyhl3359 { + yyb3359 = yyj3359 > l } else { - yyb3266 = r.CheckBreak() + yyb3359 = r.CheckBreak() } - if yyb3266 { + if yyb3359 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40649,13 +41975,13 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3266++ - if yyhl3266 { - yyb3266 = yyj3266 > l + yyj3359++ + if yyhl3359 { + yyb3359 = yyj3359 > l } else { - yyb3266 = r.CheckBreak() + yyb3359 = r.CheckBreak() } - if yyb3266 { + if yyb3359 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40663,16 +41989,16 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3269 := &x.ObjectMeta - yyv3269.CodecDecodeSelf(d) + yyv3362 := &x.ObjectMeta + yyv3362.CodecDecodeSelf(d) } - yyj3266++ - if yyhl3266 { - yyb3266 = yyj3266 > l + yyj3359++ + if yyhl3359 { + yyb3359 = yyj3359 > l } else { - yyb3266 = r.CheckBreak() + yyb3359 = r.CheckBreak() } - if yyb3266 { + if yyb3359 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40680,21 +42006,21 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = LimitRangeSpec{} } else { - yyv3270 := &x.Spec - yyv3270.CodecDecodeSelf(d) + yyv3363 := &x.Spec + yyv3363.CodecDecodeSelf(d) } for { - yyj3266++ - if yyhl3266 { - yyb3266 = yyj3266 > l + yyj3359++ + if yyhl3359 { + yyb3359 = yyj3359 > l } else { - yyb3266 = r.CheckBreak() + yyb3359 = r.CheckBreak() } - if yyb3266 { + if yyb3359 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3266-1, "") + z.DecStructFieldNotFound(yyj3359-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -40706,37 +42032,37 @@ func (x *LimitRangeList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3271 := z.EncBinary() - _ = yym3271 + yym3364 := z.EncBinary() + _ = yym3364 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3272 := !z.EncBinary() - yy2arr3272 := z.EncBasicHandle().StructToArray - var yyq3272 [4]bool - _, _, _ = yysep3272, yyq3272, yy2arr3272 - const yyr3272 bool = false - yyq3272[0] = x.Kind != "" - yyq3272[1] = x.APIVersion != "" - yyq3272[2] = true - var yynn3272 int - if yyr3272 || yy2arr3272 { + yysep3365 := !z.EncBinary() + yy2arr3365 := z.EncBasicHandle().StructToArray + var yyq3365 [4]bool + _, _, _ = yysep3365, yyq3365, yy2arr3365 + const yyr3365 bool = false + yyq3365[0] = x.Kind != "" + yyq3365[1] = x.APIVersion != "" + yyq3365[2] = true + var yynn3365 int + if yyr3365 || yy2arr3365 { r.EncodeArrayStart(4) } else { - yynn3272 = 1 - for _, b := range yyq3272 { + yynn3365 = 1 + for _, b := range yyq3365 { if b { - yynn3272++ + yynn3365++ } } - r.EncodeMapStart(yynn3272) - yynn3272 = 0 + r.EncodeMapStart(yynn3365) + yynn3365 = 0 } - if yyr3272 || yy2arr3272 { + if yyr3365 || yy2arr3365 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3272[0] { - yym3274 := z.EncBinary() - _ = yym3274 + if yyq3365[0] { + yym3367 := z.EncBinary() + _ = yym3367 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -40745,23 +42071,23 @@ func (x *LimitRangeList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3272[0] { + if yyq3365[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3275 := z.EncBinary() - _ = yym3275 + yym3368 := z.EncBinary() + _ = yym3368 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3272 || yy2arr3272 { + if yyr3365 || yy2arr3365 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3272[1] { - yym3277 := z.EncBinary() - _ = yym3277 + if yyq3365[1] { + yym3370 := z.EncBinary() + _ = yym3370 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -40770,54 +42096,54 @@ func (x *LimitRangeList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3272[1] { + if yyq3365[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3278 := z.EncBinary() - _ = yym3278 + yym3371 := z.EncBinary() + _ = yym3371 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3272 || yy2arr3272 { + if yyr3365 || yy2arr3365 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3272[2] { - yy3280 := &x.ListMeta - yym3281 := z.EncBinary() - _ = yym3281 + if yyq3365[2] { + yy3373 := &x.ListMeta + yym3374 := z.EncBinary() + _ = yym3374 if false { - } else if z.HasExtensions() && z.EncExt(yy3280) { + } else if z.HasExtensions() && z.EncExt(yy3373) { } else { - z.EncFallback(yy3280) + z.EncFallback(yy3373) } } else { r.EncodeNil() } } else { - if yyq3272[2] { + if yyq3365[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3282 := &x.ListMeta - yym3283 := z.EncBinary() - _ = yym3283 + yy3375 := &x.ListMeta + yym3376 := z.EncBinary() + _ = yym3376 if false { - } else if z.HasExtensions() && z.EncExt(yy3282) { + } else if z.HasExtensions() && z.EncExt(yy3375) { } else { - z.EncFallback(yy3282) + z.EncFallback(yy3375) } } } - if yyr3272 || yy2arr3272 { + if yyr3365 || yy2arr3365 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym3285 := z.EncBinary() - _ = yym3285 + yym3378 := z.EncBinary() + _ = yym3378 if false { } else { h.encSliceLimitRange(([]LimitRange)(x.Items), e) @@ -40830,15 +42156,15 @@ func (x *LimitRangeList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym3286 := z.EncBinary() - _ = yym3286 + yym3379 := z.EncBinary() + _ = yym3379 if false { } else { h.encSliceLimitRange(([]LimitRange)(x.Items), e) } } } - if yyr3272 || yy2arr3272 { + if yyr3365 || yy2arr3365 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -40851,25 +42177,25 @@ func (x *LimitRangeList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3287 := z.DecBinary() - _ = yym3287 + yym3380 := z.DecBinary() + _ = yym3380 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3288 := r.ContainerType() - if yyct3288 == codecSelferValueTypeMap1234 { - yyl3288 := r.ReadMapStart() - if yyl3288 == 0 { + yyct3381 := r.ContainerType() + if yyct3381 == codecSelferValueTypeMap1234 { + yyl3381 := r.ReadMapStart() + if yyl3381 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3288, d) + x.codecDecodeSelfFromMap(yyl3381, d) } - } else if yyct3288 == codecSelferValueTypeArray1234 { - yyl3288 := r.ReadArrayStart() - if yyl3288 == 0 { + } else if yyct3381 == codecSelferValueTypeArray1234 { + yyl3381 := r.ReadArrayStart() + if yyl3381 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3288, d) + x.codecDecodeSelfFromArray(yyl3381, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -40881,12 +42207,12 @@ func (x *LimitRangeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3289Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3289Slc - var yyhl3289 bool = l >= 0 - for yyj3289 := 0; ; yyj3289++ { - if yyhl3289 { - if yyj3289 >= l { + var yys3382Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3382Slc + var yyhl3382 bool = l >= 0 + for yyj3382 := 0; ; yyj3382++ { + if yyhl3382 { + if yyj3382 >= l { break } } else { @@ -40895,10 +42221,10 @@ func (x *LimitRangeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3289Slc = r.DecodeBytes(yys3289Slc, true, true) - yys3289 := string(yys3289Slc) + yys3382Slc = r.DecodeBytes(yys3382Slc, true, true) + yys3382 := string(yys3382Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3289 { + switch yys3382 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -40915,31 +42241,31 @@ func (x *LimitRangeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3292 := &x.ListMeta - yym3293 := z.DecBinary() - _ = yym3293 + yyv3385 := &x.ListMeta + yym3386 := z.DecBinary() + _ = yym3386 if false { - } else if z.HasExtensions() && z.DecExt(yyv3292) { + } else if z.HasExtensions() && z.DecExt(yyv3385) { } else { - z.DecFallback(yyv3292, false) + z.DecFallback(yyv3385, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3294 := &x.Items - yym3295 := z.DecBinary() - _ = yym3295 + yyv3387 := &x.Items + yym3388 := z.DecBinary() + _ = yym3388 if false { } else { - h.decSliceLimitRange((*[]LimitRange)(yyv3294), d) + h.decSliceLimitRange((*[]LimitRange)(yyv3387), d) } } default: - z.DecStructFieldNotFound(-1, yys3289) - } // end switch yys3289 - } // end for yyj3289 + z.DecStructFieldNotFound(-1, yys3382) + } // end switch yys3382 + } // end for yyj3382 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -40947,16 +42273,16 @@ func (x *LimitRangeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3296 int - var yyb3296 bool - var yyhl3296 bool = l >= 0 - yyj3296++ - if yyhl3296 { - yyb3296 = yyj3296 > l + var yyj3389 int + var yyb3389 bool + var yyhl3389 bool = l >= 0 + yyj3389++ + if yyhl3389 { + yyb3389 = yyj3389 > l } else { - yyb3296 = r.CheckBreak() + yyb3389 = r.CheckBreak() } - if yyb3296 { + if yyb3389 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40966,13 +42292,13 @@ func (x *LimitRangeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3296++ - if yyhl3296 { - yyb3296 = yyj3296 > l + yyj3389++ + if yyhl3389 { + yyb3389 = yyj3389 > l } else { - yyb3296 = r.CheckBreak() + yyb3389 = r.CheckBreak() } - if yyb3296 { + if yyb3389 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40982,13 +42308,13 @@ func (x *LimitRangeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3296++ - if yyhl3296 { - yyb3296 = yyj3296 > l + yyj3389++ + if yyhl3389 { + yyb3389 = yyj3389 > l } else { - yyb3296 = r.CheckBreak() + yyb3389 = r.CheckBreak() } - if yyb3296 { + if yyb3389 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40996,22 +42322,22 @@ func (x *LimitRangeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3299 := &x.ListMeta - yym3300 := z.DecBinary() - _ = yym3300 + yyv3392 := &x.ListMeta + yym3393 := z.DecBinary() + _ = yym3393 if false { - } else if z.HasExtensions() && z.DecExt(yyv3299) { + } else if z.HasExtensions() && z.DecExt(yyv3392) { } else { - z.DecFallback(yyv3299, false) + z.DecFallback(yyv3392, false) } } - yyj3296++ - if yyhl3296 { - yyb3296 = yyj3296 > l + yyj3389++ + if yyhl3389 { + yyb3389 = yyj3389 > l } else { - yyb3296 = r.CheckBreak() + yyb3389 = r.CheckBreak() } - if yyb3296 { + if yyb3389 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41019,26 +42345,26 @@ func (x *LimitRangeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3301 := &x.Items - yym3302 := z.DecBinary() - _ = yym3302 + yyv3394 := &x.Items + yym3395 := z.DecBinary() + _ = yym3395 if false { } else { - h.decSliceLimitRange((*[]LimitRange)(yyv3301), d) + h.decSliceLimitRange((*[]LimitRange)(yyv3394), d) } } for { - yyj3296++ - if yyhl3296 { - yyb3296 = yyj3296 > l + yyj3389++ + if yyhl3389 { + yyb3389 = yyj3389 > l } else { - yyb3296 = r.CheckBreak() + yyb3389 = r.CheckBreak() } - if yyb3296 { + if yyb3389 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3296-1, "") + z.DecStructFieldNotFound(yyj3389-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -41050,33 +42376,33 @@ func (x *ResourceQuotaSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3303 := z.EncBinary() - _ = yym3303 + yym3396 := z.EncBinary() + _ = yym3396 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3304 := !z.EncBinary() - yy2arr3304 := z.EncBasicHandle().StructToArray - var yyq3304 [1]bool - _, _, _ = yysep3304, yyq3304, yy2arr3304 - const yyr3304 bool = false - yyq3304[0] = len(x.Hard) != 0 - var yynn3304 int - if yyr3304 || yy2arr3304 { + yysep3397 := !z.EncBinary() + yy2arr3397 := z.EncBasicHandle().StructToArray + var yyq3397 [1]bool + _, _, _ = yysep3397, yyq3397, yy2arr3397 + const yyr3397 bool = false + yyq3397[0] = len(x.Hard) != 0 + var yynn3397 int + if yyr3397 || yy2arr3397 { r.EncodeArrayStart(1) } else { - yynn3304 = 0 - for _, b := range yyq3304 { + yynn3397 = 0 + for _, b := range yyq3397 { if b { - yynn3304++ + yynn3397++ } } - r.EncodeMapStart(yynn3304) - yynn3304 = 0 + r.EncodeMapStart(yynn3397) + yynn3397 = 0 } - if yyr3304 || yy2arr3304 { + if yyr3397 || yy2arr3397 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3304[0] { + if yyq3397[0] { if x.Hard == nil { r.EncodeNil() } else { @@ -41086,7 +42412,7 @@ func (x *ResourceQuotaSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3304[0] { + if yyq3397[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hard")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -41097,7 +42423,7 @@ func (x *ResourceQuotaSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3304 || yy2arr3304 { + if yyr3397 || yy2arr3397 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -41110,25 +42436,25 @@ func (x *ResourceQuotaSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3306 := z.DecBinary() - _ = yym3306 + yym3399 := z.DecBinary() + _ = yym3399 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3307 := r.ContainerType() - if yyct3307 == codecSelferValueTypeMap1234 { - yyl3307 := r.ReadMapStart() - if yyl3307 == 0 { + yyct3400 := r.ContainerType() + if yyct3400 == codecSelferValueTypeMap1234 { + yyl3400 := r.ReadMapStart() + if yyl3400 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3307, d) + x.codecDecodeSelfFromMap(yyl3400, d) } - } else if yyct3307 == codecSelferValueTypeArray1234 { - yyl3307 := r.ReadArrayStart() - if yyl3307 == 0 { + } else if yyct3400 == codecSelferValueTypeArray1234 { + yyl3400 := r.ReadArrayStart() + if yyl3400 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3307, d) + x.codecDecodeSelfFromArray(yyl3400, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -41140,12 +42466,12 @@ func (x *ResourceQuotaSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3308Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3308Slc - var yyhl3308 bool = l >= 0 - for yyj3308 := 0; ; yyj3308++ { - if yyhl3308 { - if yyj3308 >= l { + var yys3401Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3401Slc + var yyhl3401 bool = l >= 0 + for yyj3401 := 0; ; yyj3401++ { + if yyhl3401 { + if yyj3401 >= l { break } } else { @@ -41154,21 +42480,21 @@ func (x *ResourceQuotaSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3308Slc = r.DecodeBytes(yys3308Slc, true, true) - yys3308 := string(yys3308Slc) + yys3401Slc = r.DecodeBytes(yys3401Slc, true, true) + yys3401 := string(yys3401Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3308 { + switch yys3401 { case "hard": if r.TryDecodeAsNil() { x.Hard = nil } else { - yyv3309 := &x.Hard - yyv3309.CodecDecodeSelf(d) + yyv3402 := &x.Hard + yyv3402.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3308) - } // end switch yys3308 - } // end for yyj3308 + z.DecStructFieldNotFound(-1, yys3401) + } // end switch yys3401 + } // end for yyj3401 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -41176,16 +42502,16 @@ func (x *ResourceQuotaSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3310 int - var yyb3310 bool - var yyhl3310 bool = l >= 0 - yyj3310++ - if yyhl3310 { - yyb3310 = yyj3310 > l + var yyj3403 int + var yyb3403 bool + var yyhl3403 bool = l >= 0 + yyj3403++ + if yyhl3403 { + yyb3403 = yyj3403 > l } else { - yyb3310 = r.CheckBreak() + yyb3403 = r.CheckBreak() } - if yyb3310 { + if yyb3403 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41193,21 +42519,21 @@ func (x *ResourceQuotaSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Hard = nil } else { - yyv3311 := &x.Hard - yyv3311.CodecDecodeSelf(d) + yyv3404 := &x.Hard + yyv3404.CodecDecodeSelf(d) } for { - yyj3310++ - if yyhl3310 { - yyb3310 = yyj3310 > l + yyj3403++ + if yyhl3403 { + yyb3403 = yyj3403 > l } else { - yyb3310 = r.CheckBreak() + yyb3403 = r.CheckBreak() } - if yyb3310 { + if yyb3403 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3310-1, "") + z.DecStructFieldNotFound(yyj3403-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -41219,34 +42545,34 @@ func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3312 := z.EncBinary() - _ = yym3312 + yym3405 := z.EncBinary() + _ = yym3405 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3313 := !z.EncBinary() - yy2arr3313 := z.EncBasicHandle().StructToArray - var yyq3313 [2]bool - _, _, _ = yysep3313, yyq3313, yy2arr3313 - const yyr3313 bool = false - yyq3313[0] = len(x.Hard) != 0 - yyq3313[1] = len(x.Used) != 0 - var yynn3313 int - if yyr3313 || yy2arr3313 { + yysep3406 := !z.EncBinary() + yy2arr3406 := z.EncBasicHandle().StructToArray + var yyq3406 [2]bool + _, _, _ = yysep3406, yyq3406, yy2arr3406 + const yyr3406 bool = false + yyq3406[0] = len(x.Hard) != 0 + yyq3406[1] = len(x.Used) != 0 + var yynn3406 int + if yyr3406 || yy2arr3406 { r.EncodeArrayStart(2) } else { - yynn3313 = 0 - for _, b := range yyq3313 { + yynn3406 = 0 + for _, b := range yyq3406 { if b { - yynn3313++ + yynn3406++ } } - r.EncodeMapStart(yynn3313) - yynn3313 = 0 + r.EncodeMapStart(yynn3406) + yynn3406 = 0 } - if yyr3313 || yy2arr3313 { + if yyr3406 || yy2arr3406 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3313[0] { + if yyq3406[0] { if x.Hard == nil { r.EncodeNil() } else { @@ -41256,7 +42582,7 @@ func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3313[0] { + if yyq3406[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hard")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -41267,9 +42593,9 @@ func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3313 || yy2arr3313 { + if yyr3406 || yy2arr3406 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3313[1] { + if yyq3406[1] { if x.Used == nil { r.EncodeNil() } else { @@ -41279,7 +42605,7 @@ func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3313[1] { + if yyq3406[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("used")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -41290,7 +42616,7 @@ func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3313 || yy2arr3313 { + if yyr3406 || yy2arr3406 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -41303,25 +42629,25 @@ func (x *ResourceQuotaStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3316 := z.DecBinary() - _ = yym3316 + yym3409 := z.DecBinary() + _ = yym3409 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3317 := r.ContainerType() - if yyct3317 == codecSelferValueTypeMap1234 { - yyl3317 := r.ReadMapStart() - if yyl3317 == 0 { + yyct3410 := r.ContainerType() + if yyct3410 == codecSelferValueTypeMap1234 { + yyl3410 := r.ReadMapStart() + if yyl3410 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3317, d) + x.codecDecodeSelfFromMap(yyl3410, d) } - } else if yyct3317 == codecSelferValueTypeArray1234 { - yyl3317 := r.ReadArrayStart() - if yyl3317 == 0 { + } else if yyct3410 == codecSelferValueTypeArray1234 { + yyl3410 := r.ReadArrayStart() + if yyl3410 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3317, d) + x.codecDecodeSelfFromArray(yyl3410, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -41333,12 +42659,12 @@ func (x *ResourceQuotaStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3318Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3318Slc - var yyhl3318 bool = l >= 0 - for yyj3318 := 0; ; yyj3318++ { - if yyhl3318 { - if yyj3318 >= l { + var yys3411Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3411Slc + var yyhl3411 bool = l >= 0 + for yyj3411 := 0; ; yyj3411++ { + if yyhl3411 { + if yyj3411 >= l { break } } else { @@ -41347,28 +42673,28 @@ func (x *ResourceQuotaStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3318Slc = r.DecodeBytes(yys3318Slc, true, true) - yys3318 := string(yys3318Slc) + yys3411Slc = r.DecodeBytes(yys3411Slc, true, true) + yys3411 := string(yys3411Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3318 { + switch yys3411 { case "hard": if r.TryDecodeAsNil() { x.Hard = nil } else { - yyv3319 := &x.Hard - yyv3319.CodecDecodeSelf(d) + yyv3412 := &x.Hard + yyv3412.CodecDecodeSelf(d) } case "used": if r.TryDecodeAsNil() { x.Used = nil } else { - yyv3320 := &x.Used - yyv3320.CodecDecodeSelf(d) + yyv3413 := &x.Used + yyv3413.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3318) - } // end switch yys3318 - } // end for yyj3318 + z.DecStructFieldNotFound(-1, yys3411) + } // end switch yys3411 + } // end for yyj3411 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -41376,16 +42702,16 @@ func (x *ResourceQuotaStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3321 int - var yyb3321 bool - var yyhl3321 bool = l >= 0 - yyj3321++ - if yyhl3321 { - yyb3321 = yyj3321 > l + var yyj3414 int + var yyb3414 bool + var yyhl3414 bool = l >= 0 + yyj3414++ + if yyhl3414 { + yyb3414 = yyj3414 > l } else { - yyb3321 = r.CheckBreak() + yyb3414 = r.CheckBreak() } - if yyb3321 { + if yyb3414 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41393,16 +42719,16 @@ func (x *ResourceQuotaStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Hard = nil } else { - yyv3322 := &x.Hard - yyv3322.CodecDecodeSelf(d) + yyv3415 := &x.Hard + yyv3415.CodecDecodeSelf(d) } - yyj3321++ - if yyhl3321 { - yyb3321 = yyj3321 > l + yyj3414++ + if yyhl3414 { + yyb3414 = yyj3414 > l } else { - yyb3321 = r.CheckBreak() + yyb3414 = r.CheckBreak() } - if yyb3321 { + if yyb3414 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41410,21 +42736,21 @@ func (x *ResourceQuotaStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Used = nil } else { - yyv3323 := &x.Used - yyv3323.CodecDecodeSelf(d) + yyv3416 := &x.Used + yyv3416.CodecDecodeSelf(d) } for { - yyj3321++ - if yyhl3321 { - yyb3321 = yyj3321 > l + yyj3414++ + if yyhl3414 { + yyb3414 = yyj3414 > l } else { - yyb3321 = r.CheckBreak() + yyb3414 = r.CheckBreak() } - if yyb3321 { + if yyb3414 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3321-1, "") + z.DecStructFieldNotFound(yyj3414-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -41436,39 +42762,39 @@ func (x *ResourceQuota) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3324 := z.EncBinary() - _ = yym3324 + yym3417 := z.EncBinary() + _ = yym3417 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3325 := !z.EncBinary() - yy2arr3325 := z.EncBasicHandle().StructToArray - var yyq3325 [5]bool - _, _, _ = yysep3325, yyq3325, yy2arr3325 - const yyr3325 bool = false - yyq3325[0] = x.Kind != "" - yyq3325[1] = x.APIVersion != "" - yyq3325[2] = true - yyq3325[3] = true - yyq3325[4] = true - var yynn3325 int - if yyr3325 || yy2arr3325 { + yysep3418 := !z.EncBinary() + yy2arr3418 := z.EncBasicHandle().StructToArray + var yyq3418 [5]bool + _, _, _ = yysep3418, yyq3418, yy2arr3418 + const yyr3418 bool = false + yyq3418[0] = x.Kind != "" + yyq3418[1] = x.APIVersion != "" + yyq3418[2] = true + yyq3418[3] = true + yyq3418[4] = true + var yynn3418 int + if yyr3418 || yy2arr3418 { r.EncodeArrayStart(5) } else { - yynn3325 = 0 - for _, b := range yyq3325 { + yynn3418 = 0 + for _, b := range yyq3418 { if b { - yynn3325++ + yynn3418++ } } - r.EncodeMapStart(yynn3325) - yynn3325 = 0 + r.EncodeMapStart(yynn3418) + yynn3418 = 0 } - if yyr3325 || yy2arr3325 { + if yyr3418 || yy2arr3418 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3325[0] { - yym3327 := z.EncBinary() - _ = yym3327 + if yyq3418[0] { + yym3420 := z.EncBinary() + _ = yym3420 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -41477,23 +42803,23 @@ func (x *ResourceQuota) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3325[0] { + if yyq3418[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3328 := z.EncBinary() - _ = yym3328 + yym3421 := z.EncBinary() + _ = yym3421 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3325 || yy2arr3325 { + if yyr3418 || yy2arr3418 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3325[1] { - yym3330 := z.EncBinary() - _ = yym3330 + if yyq3418[1] { + yym3423 := z.EncBinary() + _ = yym3423 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -41502,70 +42828,70 @@ func (x *ResourceQuota) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3325[1] { + if yyq3418[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3331 := z.EncBinary() - _ = yym3331 + yym3424 := z.EncBinary() + _ = yym3424 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3325 || yy2arr3325 { + if yyr3418 || yy2arr3418 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3325[2] { - yy3333 := &x.ObjectMeta - yy3333.CodecEncodeSelf(e) + if yyq3418[2] { + yy3426 := &x.ObjectMeta + yy3426.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3325[2] { + if yyq3418[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3334 := &x.ObjectMeta - yy3334.CodecEncodeSelf(e) + yy3427 := &x.ObjectMeta + yy3427.CodecEncodeSelf(e) } } - if yyr3325 || yy2arr3325 { + if yyr3418 || yy2arr3418 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3325[3] { - yy3336 := &x.Spec - yy3336.CodecEncodeSelf(e) + if yyq3418[3] { + yy3429 := &x.Spec + yy3429.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3325[3] { + if yyq3418[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3337 := &x.Spec - yy3337.CodecEncodeSelf(e) + yy3430 := &x.Spec + yy3430.CodecEncodeSelf(e) } } - if yyr3325 || yy2arr3325 { + if yyr3418 || yy2arr3418 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3325[4] { - yy3339 := &x.Status - yy3339.CodecEncodeSelf(e) + if yyq3418[4] { + yy3432 := &x.Status + yy3432.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3325[4] { + if yyq3418[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3340 := &x.Status - yy3340.CodecEncodeSelf(e) + yy3433 := &x.Status + yy3433.CodecEncodeSelf(e) } } - if yyr3325 || yy2arr3325 { + if yyr3418 || yy2arr3418 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -41578,25 +42904,25 @@ func (x *ResourceQuota) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3341 := z.DecBinary() - _ = yym3341 + yym3434 := z.DecBinary() + _ = yym3434 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3342 := r.ContainerType() - if yyct3342 == codecSelferValueTypeMap1234 { - yyl3342 := r.ReadMapStart() - if yyl3342 == 0 { + yyct3435 := r.ContainerType() + if yyct3435 == codecSelferValueTypeMap1234 { + yyl3435 := r.ReadMapStart() + if yyl3435 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3342, d) + x.codecDecodeSelfFromMap(yyl3435, d) } - } else if yyct3342 == codecSelferValueTypeArray1234 { - yyl3342 := r.ReadArrayStart() - if yyl3342 == 0 { + } else if yyct3435 == codecSelferValueTypeArray1234 { + yyl3435 := r.ReadArrayStart() + if yyl3435 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3342, d) + x.codecDecodeSelfFromArray(yyl3435, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -41608,12 +42934,12 @@ func (x *ResourceQuota) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3343Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3343Slc - var yyhl3343 bool = l >= 0 - for yyj3343 := 0; ; yyj3343++ { - if yyhl3343 { - if yyj3343 >= l { + var yys3436Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3436Slc + var yyhl3436 bool = l >= 0 + for yyj3436 := 0; ; yyj3436++ { + if yyhl3436 { + if yyj3436 >= l { break } } else { @@ -41622,10 +42948,10 @@ func (x *ResourceQuota) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3343Slc = r.DecodeBytes(yys3343Slc, true, true) - yys3343 := string(yys3343Slc) + yys3436Slc = r.DecodeBytes(yys3436Slc, true, true) + yys3436 := string(yys3436Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3343 { + switch yys3436 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -41642,27 +42968,27 @@ func (x *ResourceQuota) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3346 := &x.ObjectMeta - yyv3346.CodecDecodeSelf(d) + yyv3439 := &x.ObjectMeta + yyv3439.CodecDecodeSelf(d) } case "spec": if r.TryDecodeAsNil() { x.Spec = ResourceQuotaSpec{} } else { - yyv3347 := &x.Spec - yyv3347.CodecDecodeSelf(d) + yyv3440 := &x.Spec + yyv3440.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ResourceQuotaStatus{} } else { - yyv3348 := &x.Status - yyv3348.CodecDecodeSelf(d) + yyv3441 := &x.Status + yyv3441.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3343) - } // end switch yys3343 - } // end for yyj3343 + z.DecStructFieldNotFound(-1, yys3436) + } // end switch yys3436 + } // end for yyj3436 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -41670,16 +42996,16 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3349 int - var yyb3349 bool - var yyhl3349 bool = l >= 0 - yyj3349++ - if yyhl3349 { - yyb3349 = yyj3349 > l + var yyj3442 int + var yyb3442 bool + var yyhl3442 bool = l >= 0 + yyj3442++ + if yyhl3442 { + yyb3442 = yyj3442 > l } else { - yyb3349 = r.CheckBreak() + yyb3442 = r.CheckBreak() } - if yyb3349 { + if yyb3442 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41689,13 +43015,13 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3349++ - if yyhl3349 { - yyb3349 = yyj3349 > l + yyj3442++ + if yyhl3442 { + yyb3442 = yyj3442 > l } else { - yyb3349 = r.CheckBreak() + yyb3442 = r.CheckBreak() } - if yyb3349 { + if yyb3442 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41705,13 +43031,13 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3349++ - if yyhl3349 { - yyb3349 = yyj3349 > l + yyj3442++ + if yyhl3442 { + yyb3442 = yyj3442 > l } else { - yyb3349 = r.CheckBreak() + yyb3442 = r.CheckBreak() } - if yyb3349 { + if yyb3442 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41719,16 +43045,16 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3352 := &x.ObjectMeta - yyv3352.CodecDecodeSelf(d) + yyv3445 := &x.ObjectMeta + yyv3445.CodecDecodeSelf(d) } - yyj3349++ - if yyhl3349 { - yyb3349 = yyj3349 > l + yyj3442++ + if yyhl3442 { + yyb3442 = yyj3442 > l } else { - yyb3349 = r.CheckBreak() + yyb3442 = r.CheckBreak() } - if yyb3349 { + if yyb3442 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41736,16 +43062,16 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ResourceQuotaSpec{} } else { - yyv3353 := &x.Spec - yyv3353.CodecDecodeSelf(d) + yyv3446 := &x.Spec + yyv3446.CodecDecodeSelf(d) } - yyj3349++ - if yyhl3349 { - yyb3349 = yyj3349 > l + yyj3442++ + if yyhl3442 { + yyb3442 = yyj3442 > l } else { - yyb3349 = r.CheckBreak() + yyb3442 = r.CheckBreak() } - if yyb3349 { + if yyb3442 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41753,21 +43079,21 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ResourceQuotaStatus{} } else { - yyv3354 := &x.Status - yyv3354.CodecDecodeSelf(d) + yyv3447 := &x.Status + yyv3447.CodecDecodeSelf(d) } for { - yyj3349++ - if yyhl3349 { - yyb3349 = yyj3349 > l + yyj3442++ + if yyhl3442 { + yyb3442 = yyj3442 > l } else { - yyb3349 = r.CheckBreak() + yyb3442 = r.CheckBreak() } - if yyb3349 { + if yyb3442 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3349-1, "") + z.DecStructFieldNotFound(yyj3442-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -41779,37 +43105,37 @@ func (x *ResourceQuotaList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3355 := z.EncBinary() - _ = yym3355 + yym3448 := z.EncBinary() + _ = yym3448 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3356 := !z.EncBinary() - yy2arr3356 := z.EncBasicHandle().StructToArray - var yyq3356 [4]bool - _, _, _ = yysep3356, yyq3356, yy2arr3356 - const yyr3356 bool = false - yyq3356[0] = x.Kind != "" - yyq3356[1] = x.APIVersion != "" - yyq3356[2] = true - var yynn3356 int - if yyr3356 || yy2arr3356 { + yysep3449 := !z.EncBinary() + yy2arr3449 := z.EncBasicHandle().StructToArray + var yyq3449 [4]bool + _, _, _ = yysep3449, yyq3449, yy2arr3449 + const yyr3449 bool = false + yyq3449[0] = x.Kind != "" + yyq3449[1] = x.APIVersion != "" + yyq3449[2] = true + var yynn3449 int + if yyr3449 || yy2arr3449 { r.EncodeArrayStart(4) } else { - yynn3356 = 1 - for _, b := range yyq3356 { + yynn3449 = 1 + for _, b := range yyq3449 { if b { - yynn3356++ + yynn3449++ } } - r.EncodeMapStart(yynn3356) - yynn3356 = 0 + r.EncodeMapStart(yynn3449) + yynn3449 = 0 } - if yyr3356 || yy2arr3356 { + if yyr3449 || yy2arr3449 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3356[0] { - yym3358 := z.EncBinary() - _ = yym3358 + if yyq3449[0] { + yym3451 := z.EncBinary() + _ = yym3451 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -41818,23 +43144,23 @@ func (x *ResourceQuotaList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3356[0] { + if yyq3449[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3359 := z.EncBinary() - _ = yym3359 + yym3452 := z.EncBinary() + _ = yym3452 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3356 || yy2arr3356 { + if yyr3449 || yy2arr3449 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3356[1] { - yym3361 := z.EncBinary() - _ = yym3361 + if yyq3449[1] { + yym3454 := z.EncBinary() + _ = yym3454 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -41843,54 +43169,54 @@ func (x *ResourceQuotaList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3356[1] { + if yyq3449[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3362 := z.EncBinary() - _ = yym3362 + yym3455 := z.EncBinary() + _ = yym3455 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3356 || yy2arr3356 { + if yyr3449 || yy2arr3449 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3356[2] { - yy3364 := &x.ListMeta - yym3365 := z.EncBinary() - _ = yym3365 + if yyq3449[2] { + yy3457 := &x.ListMeta + yym3458 := z.EncBinary() + _ = yym3458 if false { - } else if z.HasExtensions() && z.EncExt(yy3364) { + } else if z.HasExtensions() && z.EncExt(yy3457) { } else { - z.EncFallback(yy3364) + z.EncFallback(yy3457) } } else { r.EncodeNil() } } else { - if yyq3356[2] { + if yyq3449[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3366 := &x.ListMeta - yym3367 := z.EncBinary() - _ = yym3367 + yy3459 := &x.ListMeta + yym3460 := z.EncBinary() + _ = yym3460 if false { - } else if z.HasExtensions() && z.EncExt(yy3366) { + } else if z.HasExtensions() && z.EncExt(yy3459) { } else { - z.EncFallback(yy3366) + z.EncFallback(yy3459) } } } - if yyr3356 || yy2arr3356 { + if yyr3449 || yy2arr3449 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym3369 := z.EncBinary() - _ = yym3369 + yym3462 := z.EncBinary() + _ = yym3462 if false { } else { h.encSliceResourceQuota(([]ResourceQuota)(x.Items), e) @@ -41903,15 +43229,15 @@ func (x *ResourceQuotaList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym3370 := z.EncBinary() - _ = yym3370 + yym3463 := z.EncBinary() + _ = yym3463 if false { } else { h.encSliceResourceQuota(([]ResourceQuota)(x.Items), e) } } } - if yyr3356 || yy2arr3356 { + if yyr3449 || yy2arr3449 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -41924,25 +43250,25 @@ func (x *ResourceQuotaList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3371 := z.DecBinary() - _ = yym3371 + yym3464 := z.DecBinary() + _ = yym3464 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3372 := r.ContainerType() - if yyct3372 == codecSelferValueTypeMap1234 { - yyl3372 := r.ReadMapStart() - if yyl3372 == 0 { + yyct3465 := r.ContainerType() + if yyct3465 == codecSelferValueTypeMap1234 { + yyl3465 := r.ReadMapStart() + if yyl3465 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3372, d) + x.codecDecodeSelfFromMap(yyl3465, d) } - } else if yyct3372 == codecSelferValueTypeArray1234 { - yyl3372 := r.ReadArrayStart() - if yyl3372 == 0 { + } else if yyct3465 == codecSelferValueTypeArray1234 { + yyl3465 := r.ReadArrayStart() + if yyl3465 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3372, d) + x.codecDecodeSelfFromArray(yyl3465, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -41954,12 +43280,12 @@ func (x *ResourceQuotaList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3373Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3373Slc - var yyhl3373 bool = l >= 0 - for yyj3373 := 0; ; yyj3373++ { - if yyhl3373 { - if yyj3373 >= l { + var yys3466Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3466Slc + var yyhl3466 bool = l >= 0 + for yyj3466 := 0; ; yyj3466++ { + if yyhl3466 { + if yyj3466 >= l { break } } else { @@ -41968,10 +43294,10 @@ func (x *ResourceQuotaList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3373Slc = r.DecodeBytes(yys3373Slc, true, true) - yys3373 := string(yys3373Slc) + yys3466Slc = r.DecodeBytes(yys3466Slc, true, true) + yys3466 := string(yys3466Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3373 { + switch yys3466 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -41988,31 +43314,31 @@ func (x *ResourceQuotaList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3376 := &x.ListMeta - yym3377 := z.DecBinary() - _ = yym3377 + yyv3469 := &x.ListMeta + yym3470 := z.DecBinary() + _ = yym3470 if false { - } else if z.HasExtensions() && z.DecExt(yyv3376) { + } else if z.HasExtensions() && z.DecExt(yyv3469) { } else { - z.DecFallback(yyv3376, false) + z.DecFallback(yyv3469, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3378 := &x.Items - yym3379 := z.DecBinary() - _ = yym3379 + yyv3471 := &x.Items + yym3472 := z.DecBinary() + _ = yym3472 if false { } else { - h.decSliceResourceQuota((*[]ResourceQuota)(yyv3378), d) + h.decSliceResourceQuota((*[]ResourceQuota)(yyv3471), d) } } default: - z.DecStructFieldNotFound(-1, yys3373) - } // end switch yys3373 - } // end for yyj3373 + z.DecStructFieldNotFound(-1, yys3466) + } // end switch yys3466 + } // end for yyj3466 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -42020,16 +43346,16 @@ func (x *ResourceQuotaList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3380 int - var yyb3380 bool - var yyhl3380 bool = l >= 0 - yyj3380++ - if yyhl3380 { - yyb3380 = yyj3380 > l + var yyj3473 int + var yyb3473 bool + var yyhl3473 bool = l >= 0 + yyj3473++ + if yyhl3473 { + yyb3473 = yyj3473 > l } else { - yyb3380 = r.CheckBreak() + yyb3473 = r.CheckBreak() } - if yyb3380 { + if yyb3473 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42039,13 +43365,13 @@ func (x *ResourceQuotaList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder } else { x.Kind = string(r.DecodeString()) } - yyj3380++ - if yyhl3380 { - yyb3380 = yyj3380 > l + yyj3473++ + if yyhl3473 { + yyb3473 = yyj3473 > l } else { - yyb3380 = r.CheckBreak() + yyb3473 = r.CheckBreak() } - if yyb3380 { + if yyb3473 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42055,13 +43381,13 @@ func (x *ResourceQuotaList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder } else { x.APIVersion = string(r.DecodeString()) } - yyj3380++ - if yyhl3380 { - yyb3380 = yyj3380 > l + yyj3473++ + if yyhl3473 { + yyb3473 = yyj3473 > l } else { - yyb3380 = r.CheckBreak() + yyb3473 = r.CheckBreak() } - if yyb3380 { + if yyb3473 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42069,22 +43395,22 @@ func (x *ResourceQuotaList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3383 := &x.ListMeta - yym3384 := z.DecBinary() - _ = yym3384 + yyv3476 := &x.ListMeta + yym3477 := z.DecBinary() + _ = yym3477 if false { - } else if z.HasExtensions() && z.DecExt(yyv3383) { + } else if z.HasExtensions() && z.DecExt(yyv3476) { } else { - z.DecFallback(yyv3383, false) + z.DecFallback(yyv3476, false) } } - yyj3380++ - if yyhl3380 { - yyb3380 = yyj3380 > l + yyj3473++ + if yyhl3473 { + yyb3473 = yyj3473 > l } else { - yyb3380 = r.CheckBreak() + yyb3473 = r.CheckBreak() } - if yyb3380 { + if yyb3473 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42092,1093 +43418,31 @@ func (x *ResourceQuotaList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3385 := &x.Items - yym3386 := z.DecBinary() - _ = yym3386 + yyv3478 := &x.Items + yym3479 := z.DecBinary() + _ = yym3479 if false { } else { - h.decSliceResourceQuota((*[]ResourceQuota)(yyv3385), d) + h.decSliceResourceQuota((*[]ResourceQuota)(yyv3478), d) } } for { - yyj3380++ - if yyhl3380 { - yyb3380 = yyj3380 > l + yyj3473++ + if yyhl3473 { + yyb3473 = yyj3473 > l } else { - yyb3380 = r.CheckBreak() + yyb3473 = r.CheckBreak() } - if yyb3380 { + if yyb3473 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3380-1, "") + z.DecStructFieldNotFound(yyj3473-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym3387 := z.EncBinary() - _ = yym3387 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep3388 := !z.EncBinary() - yy2arr3388 := z.EncBasicHandle().StructToArray - var yyq3388 [5]bool - _, _, _ = yysep3388, yyq3388, yy2arr3388 - const yyr3388 bool = false - yyq3388[0] = x.Kind != "" - yyq3388[1] = x.APIVersion != "" - yyq3388[2] = true - yyq3388[3] = len(x.Data) != 0 - yyq3388[4] = x.Type != "" - var yynn3388 int - if yyr3388 || yy2arr3388 { - r.EncodeArrayStart(5) - } else { - yynn3388 = 0 - for _, b := range yyq3388 { - if b { - yynn3388++ - } - } - r.EncodeMapStart(yynn3388) - yynn3388 = 0 - } - if yyr3388 || yy2arr3388 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3388[0] { - yym3390 := z.EncBinary() - _ = yym3390 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3388[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3391 := z.EncBinary() - _ = yym3391 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr3388 || yy2arr3388 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3388[1] { - yym3393 := z.EncBinary() - _ = yym3393 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3388[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3394 := z.EncBinary() - _ = yym3394 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr3388 || yy2arr3388 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3388[2] { - yy3396 := &x.ObjectMeta - yy3396.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq3388[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3397 := &x.ObjectMeta - yy3397.CodecEncodeSelf(e) - } - } - if yyr3388 || yy2arr3388 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3388[3] { - if x.Data == nil { - r.EncodeNil() - } else { - yym3399 := z.EncBinary() - _ = yym3399 - if false { - } else { - h.encMapstringSliceuint8((map[string][]uint8)(x.Data), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq3388[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("data")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Data == nil { - r.EncodeNil() - } else { - yym3400 := z.EncBinary() - _ = yym3400 - if false { - } else { - h.encMapstringSliceuint8((map[string][]uint8)(x.Data), e) - } - } - } - } - if yyr3388 || yy2arr3388 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3388[4] { - x.Type.CodecEncodeSelf(e) - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3388[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("type")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - x.Type.CodecEncodeSelf(e) - } - } - if yyr3388 || yy2arr3388 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *Secret) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym3402 := z.DecBinary() - _ = yym3402 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct3403 := r.ContainerType() - if yyct3403 == codecSelferValueTypeMap1234 { - yyl3403 := r.ReadMapStart() - if yyl3403 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl3403, d) - } - } else if yyct3403 == codecSelferValueTypeArray1234 { - yyl3403 := r.ReadArrayStart() - if yyl3403 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl3403, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *Secret) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys3404Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3404Slc - var yyhl3404 bool = l >= 0 - for yyj3404 := 0; ; yyj3404++ { - if yyhl3404 { - if yyj3404 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3404Slc = r.DecodeBytes(yys3404Slc, true, true) - yys3404 := string(yys3404Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3404 { - 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()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} - } else { - yyv3407 := &x.ObjectMeta - yyv3407.CodecDecodeSelf(d) - } - case "data": - if r.TryDecodeAsNil() { - x.Data = nil - } else { - yyv3408 := &x.Data - yym3409 := z.DecBinary() - _ = yym3409 - if false { - } else { - h.decMapstringSliceuint8((*map[string][]uint8)(yyv3408), d) - } - } - case "type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = SecretType(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3404) - } // end switch yys3404 - } // end for yyj3404 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj3411 int - var yyb3411 bool - var yyhl3411 bool = l >= 0 - yyj3411++ - if yyhl3411 { - yyb3411 = yyj3411 > l - } else { - yyb3411 = r.CheckBreak() - } - if yyb3411 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj3411++ - if yyhl3411 { - yyb3411 = yyj3411 > l - } else { - yyb3411 = r.CheckBreak() - } - if yyb3411 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj3411++ - if yyhl3411 { - yyb3411 = yyj3411 > l - } else { - yyb3411 = r.CheckBreak() - } - if yyb3411 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} - } else { - yyv3414 := &x.ObjectMeta - yyv3414.CodecDecodeSelf(d) - } - yyj3411++ - if yyhl3411 { - yyb3411 = yyj3411 > l - } else { - yyb3411 = r.CheckBreak() - } - if yyb3411 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Data = nil - } else { - yyv3415 := &x.Data - yym3416 := z.DecBinary() - _ = yym3416 - if false { - } else { - h.decMapstringSliceuint8((*map[string][]uint8)(yyv3415), d) - } - } - yyj3411++ - if yyhl3411 { - yyb3411 = yyj3411 > l - } else { - yyb3411 = r.CheckBreak() - } - if yyb3411 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = SecretType(r.DecodeString()) - } - for { - yyj3411++ - if yyhl3411 { - yyb3411 = yyj3411 > l - } else { - yyb3411 = r.CheckBreak() - } - if yyb3411 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3411-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x SecretType) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym3418 := z.EncBinary() - _ = yym3418 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *SecretType) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym3419 := z.DecBinary() - _ = yym3419 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - -func (x *SecretList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym3420 := z.EncBinary() - _ = yym3420 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep3421 := !z.EncBinary() - yy2arr3421 := z.EncBasicHandle().StructToArray - var yyq3421 [4]bool - _, _, _ = yysep3421, yyq3421, yy2arr3421 - const yyr3421 bool = false - yyq3421[0] = x.Kind != "" - yyq3421[1] = x.APIVersion != "" - yyq3421[2] = true - var yynn3421 int - if yyr3421 || yy2arr3421 { - r.EncodeArrayStart(4) - } else { - yynn3421 = 1 - for _, b := range yyq3421 { - if b { - yynn3421++ - } - } - r.EncodeMapStart(yynn3421) - yynn3421 = 0 - } - if yyr3421 || yy2arr3421 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3421[0] { - yym3423 := z.EncBinary() - _ = yym3423 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3421[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3424 := z.EncBinary() - _ = yym3424 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr3421 || yy2arr3421 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3421[1] { - yym3426 := z.EncBinary() - _ = yym3426 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3421[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3427 := z.EncBinary() - _ = yym3427 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr3421 || yy2arr3421 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3421[2] { - yy3429 := &x.ListMeta - yym3430 := z.EncBinary() - _ = yym3430 - if false { - } else if z.HasExtensions() && z.EncExt(yy3429) { - } else { - z.EncFallback(yy3429) - } - } else { - r.EncodeNil() - } - } else { - if yyq3421[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3431 := &x.ListMeta - yym3432 := z.EncBinary() - _ = yym3432 - if false { - } else if z.HasExtensions() && z.EncExt(yy3431) { - } else { - z.EncFallback(yy3431) - } - } - } - if yyr3421 || yy2arr3421 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym3434 := z.EncBinary() - _ = yym3434 - if false { - } else { - h.encSliceSecret(([]Secret)(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 { - yym3435 := z.EncBinary() - _ = yym3435 - if false { - } else { - h.encSliceSecret(([]Secret)(x.Items), e) - } - } - } - if yyr3421 || yy2arr3421 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *SecretList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym3436 := z.DecBinary() - _ = yym3436 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct3437 := r.ContainerType() - if yyct3437 == codecSelferValueTypeMap1234 { - yyl3437 := r.ReadMapStart() - if yyl3437 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl3437, d) - } - } else if yyct3437 == codecSelferValueTypeArray1234 { - yyl3437 := r.ReadArrayStart() - if yyl3437 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl3437, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *SecretList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys3438Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3438Slc - var yyhl3438 bool = l >= 0 - for yyj3438 := 0; ; yyj3438++ { - if yyhl3438 { - if yyj3438 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3438Slc = r.DecodeBytes(yys3438Slc, true, true) - yys3438 := string(yys3438Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3438 { - 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()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} - } else { - yyv3441 := &x.ListMeta - yym3442 := z.DecBinary() - _ = yym3442 - if false { - } else if z.HasExtensions() && z.DecExt(yyv3441) { - } else { - z.DecFallback(yyv3441, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv3443 := &x.Items - yym3444 := z.DecBinary() - _ = yym3444 - if false { - } else { - h.decSliceSecret((*[]Secret)(yyv3443), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3438) - } // end switch yys3438 - } // end for yyj3438 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *SecretList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj3445 int - var yyb3445 bool - var yyhl3445 bool = l >= 0 - yyj3445++ - if yyhl3445 { - yyb3445 = yyj3445 > l - } else { - yyb3445 = r.CheckBreak() - } - if yyb3445 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj3445++ - if yyhl3445 { - yyb3445 = yyj3445 > l - } else { - yyb3445 = r.CheckBreak() - } - if yyb3445 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj3445++ - if yyhl3445 { - yyb3445 = yyj3445 > l - } else { - yyb3445 = r.CheckBreak() - } - if yyb3445 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} - } else { - yyv3448 := &x.ListMeta - yym3449 := z.DecBinary() - _ = yym3449 - if false { - } else if z.HasExtensions() && z.DecExt(yyv3448) { - } else { - z.DecFallback(yyv3448, false) - } - } - yyj3445++ - if yyhl3445 { - yyb3445 = yyj3445 > l - } else { - yyb3445 = r.CheckBreak() - } - if yyb3445 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv3450 := &x.Items - yym3451 := z.DecBinary() - _ = yym3451 - if false { - } else { - h.decSliceSecret((*[]Secret)(yyv3450), d) - } - } - for { - yyj3445++ - if yyhl3445 { - yyb3445 = yyj3445 > l - } else { - yyb3445 = r.CheckBreak() - } - if yyb3445 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3445-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym3452 := z.EncBinary() - _ = yym3452 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep3453 := !z.EncBinary() - yy2arr3453 := z.EncBasicHandle().StructToArray - var yyq3453 [4]bool - _, _, _ = yysep3453, yyq3453, yy2arr3453 - const yyr3453 bool = false - yyq3453[0] = x.Kind != "" - yyq3453[1] = x.APIVersion != "" - yyq3453[2] = true - yyq3453[3] = len(x.Data) != 0 - var yynn3453 int - if yyr3453 || yy2arr3453 { - r.EncodeArrayStart(4) - } else { - yynn3453 = 0 - for _, b := range yyq3453 { - if b { - yynn3453++ - } - } - r.EncodeMapStart(yynn3453) - yynn3453 = 0 - } - if yyr3453 || yy2arr3453 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3453[0] { - yym3455 := z.EncBinary() - _ = yym3455 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3453[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3456 := z.EncBinary() - _ = yym3456 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr3453 || yy2arr3453 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3453[1] { - yym3458 := z.EncBinary() - _ = yym3458 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3453[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3459 := z.EncBinary() - _ = yym3459 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr3453 || yy2arr3453 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3453[2] { - yy3461 := &x.ObjectMeta - yy3461.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq3453[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3462 := &x.ObjectMeta - yy3462.CodecEncodeSelf(e) - } - } - if yyr3453 || yy2arr3453 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3453[3] { - if x.Data == nil { - r.EncodeNil() - } else { - yym3464 := z.EncBinary() - _ = yym3464 - if false { - } else { - z.F.EncMapStringStringV(x.Data, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq3453[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("data")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Data == nil { - r.EncodeNil() - } else { - yym3465 := z.EncBinary() - _ = yym3465 - if false { - } else { - z.F.EncMapStringStringV(x.Data, false, e) - } - } - } - } - if yyr3453 || yy2arr3453 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ConfigMap) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym3466 := z.DecBinary() - _ = yym3466 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct3467 := r.ContainerType() - if yyct3467 == codecSelferValueTypeMap1234 { - yyl3467 := r.ReadMapStart() - if yyl3467 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl3467, d) - } - } else if yyct3467 == codecSelferValueTypeArray1234 { - yyl3467 := r.ReadArrayStart() - if yyl3467 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl3467, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ConfigMap) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys3468Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3468Slc - var yyhl3468 bool = l >= 0 - for yyj3468 := 0; ; yyj3468++ { - if yyhl3468 { - if yyj3468 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3468Slc = r.DecodeBytes(yys3468Slc, true, true) - yys3468 := string(yys3468Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3468 { - 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()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} - } else { - yyv3471 := &x.ObjectMeta - yyv3471.CodecDecodeSelf(d) - } - case "data": - if r.TryDecodeAsNil() { - x.Data = nil - } else { - yyv3472 := &x.Data - yym3473 := z.DecBinary() - _ = yym3473 - if false { - } else { - z.F.DecMapStringStringX(yyv3472, false, d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3468) - } // end switch yys3468 - } // end for yyj3468 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj3474 int - var yyb3474 bool - var yyhl3474 bool = l >= 0 - yyj3474++ - if yyhl3474 { - yyb3474 = yyj3474 > l - } else { - yyb3474 = r.CheckBreak() - } - if yyb3474 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj3474++ - if yyhl3474 { - yyb3474 = yyj3474 > l - } else { - yyb3474 = r.CheckBreak() - } - if yyb3474 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj3474++ - if yyhl3474 { - yyb3474 = yyj3474 > l - } else { - yyb3474 = r.CheckBreak() - } - if yyb3474 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} - } else { - yyv3477 := &x.ObjectMeta - yyv3477.CodecDecodeSelf(d) - } - yyj3474++ - if yyhl3474 { - yyb3474 = yyj3474 > l - } else { - yyb3474 = r.CheckBreak() - } - if yyb3474 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Data = nil - } else { - yyv3478 := &x.Data - yym3479 := z.DecBinary() - _ = yym3479 - if false { - } else { - z.F.DecMapStringStringX(yyv3478, false, d) - } - } - for { - yyj3474++ - if yyhl3474 { - yyb3474 = yyj3474 > l - } else { - yyb3474 = r.CheckBreak() - } - if yyb3474 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3474-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r @@ -43192,16 +43456,17 @@ func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep3481 := !z.EncBinary() yy2arr3481 := z.EncBasicHandle().StructToArray - var yyq3481 [4]bool + var yyq3481 [5]bool _, _, _ = yysep3481, yyq3481, yy2arr3481 const yyr3481 bool = false yyq3481[0] = x.Kind != "" yyq3481[1] = x.APIVersion != "" yyq3481[2] = true - yyq3481[3] = len(x.Items) != 0 + yyq3481[3] = len(x.Data) != 0 + yyq3481[4] = x.Type != "" var yynn3481 int if yyr3481 || yy2arr3481 { - r.EncodeArrayStart(4) + r.EncodeArrayStart(5) } else { yynn3481 = 0 for _, b := range yyq3481 { @@ -43265,14 +43530,8 @@ func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) { if yyr3481 || yy2arr3481 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq3481[2] { - yy3489 := &x.ListMeta - yym3490 := z.EncBinary() - _ = yym3490 - if false { - } else if z.HasExtensions() && z.EncExt(yy3489) { - } else { - z.EncFallback(yy3489) - } + yy3489 := &x.ObjectMeta + yy3489.CodecEncodeSelf(e) } else { r.EncodeNil() } @@ -43281,27 +43540,21 @@ func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3491 := &x.ListMeta - yym3492 := z.EncBinary() - _ = yym3492 - if false { - } else if z.HasExtensions() && z.EncExt(yy3491) { - } else { - z.EncFallback(yy3491) - } + yy3490 := &x.ObjectMeta + yy3490.CodecEncodeSelf(e) } } if yyr3481 || yy2arr3481 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq3481[3] { - if x.Items == nil { + if x.Data == nil { r.EncodeNil() } else { - yym3494 := z.EncBinary() - _ = yym3494 + yym3492 := z.EncBinary() + _ = yym3492 if false { } else { - h.encSliceConfigMap(([]ConfigMap)(x.Items), e) + h.encMapstringSliceuint8((map[string][]uint8)(x.Data), e) } } } else { @@ -43310,20 +43563,35 @@ func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) { } else { if yyq3481[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) + r.EncodeString(codecSelferC_UTF81234, string("data")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { + if x.Data == nil { r.EncodeNil() } else { - yym3495 := z.EncBinary() - _ = yym3495 + yym3493 := z.EncBinary() + _ = yym3493 if false { } else { - h.encSliceConfigMap(([]ConfigMap)(x.Items), e) + h.encMapstringSliceuint8((map[string][]uint8)(x.Data), e) } } } } + if yyr3481 || yy2arr3481 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3481[4] { + x.Type.CodecEncodeSelf(e) + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3481[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("type")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Type.CodecEncodeSelf(e) + } + } if yyr3481 || yy2arr3481 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { @@ -43333,29 +43601,29 @@ func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) { } } -func (x *ConfigMapList) CodecDecodeSelf(d *codec1978.Decoder) { +func (x *Secret) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3496 := z.DecBinary() - _ = yym3496 + yym3495 := z.DecBinary() + _ = yym3495 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3497 := r.ContainerType() - if yyct3497 == codecSelferValueTypeMap1234 { - yyl3497 := r.ReadMapStart() - if yyl3497 == 0 { + yyct3496 := r.ContainerType() + if yyct3496 == codecSelferValueTypeMap1234 { + yyl3496 := r.ReadMapStart() + if yyl3496 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3497, d) + x.codecDecodeSelfFromMap(yyl3496, d) } - } else if yyct3497 == codecSelferValueTypeArray1234 { - yyl3497 := r.ReadArrayStart() - if yyl3497 == 0 { + } else if yyct3496 == codecSelferValueTypeArray1234 { + yyl3496 := r.ReadArrayStart() + if yyl3496 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3497, d) + x.codecDecodeSelfFromArray(yyl3496, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -43363,16 +43631,16 @@ func (x *ConfigMapList) CodecDecodeSelf(d *codec1978.Decoder) { } } -func (x *ConfigMapList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { +func (x *Secret) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3498Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3498Slc - var yyhl3498 bool = l >= 0 - for yyj3498 := 0; ; yyj3498++ { - if yyhl3498 { - if yyj3498 >= l { + var yys3497Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3497Slc + var yyhl3497 bool = l >= 0 + for yyj3497 := 0; ; yyj3497++ { + if yyhl3497 { + if yyj3497 >= l { break } } else { @@ -43381,10 +43649,390 @@ func (x *ConfigMapList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3498Slc = r.DecodeBytes(yys3498Slc, true, true) - yys3498 := string(yys3498Slc) + yys3497Slc = r.DecodeBytes(yys3497Slc, true, true) + yys3497 := string(yys3497Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3498 { + switch yys3497 { + 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()) + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = ObjectMeta{} + } else { + yyv3500 := &x.ObjectMeta + yyv3500.CodecDecodeSelf(d) + } + case "data": + if r.TryDecodeAsNil() { + x.Data = nil + } else { + yyv3501 := &x.Data + yym3502 := z.DecBinary() + _ = yym3502 + if false { + } else { + h.decMapstringSliceuint8((*map[string][]uint8)(yyv3501), d) + } + } + case "type": + if r.TryDecodeAsNil() { + x.Type = "" + } else { + x.Type = SecretType(r.DecodeString()) + } + default: + z.DecStructFieldNotFound(-1, yys3497) + } // end switch yys3497 + } // end for yyj3497 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj3504 int + var yyb3504 bool + var yyhl3504 bool = l >= 0 + yyj3504++ + if yyhl3504 { + yyb3504 = yyj3504 > l + } else { + yyb3504 = r.CheckBreak() + } + if yyb3504 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj3504++ + if yyhl3504 { + yyb3504 = yyj3504 > l + } else { + yyb3504 = r.CheckBreak() + } + if yyb3504 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + yyj3504++ + if yyhl3504 { + yyb3504 = yyj3504 > l + } else { + yyb3504 = r.CheckBreak() + } + if yyb3504 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = ObjectMeta{} + } else { + yyv3507 := &x.ObjectMeta + yyv3507.CodecDecodeSelf(d) + } + yyj3504++ + if yyhl3504 { + yyb3504 = yyj3504 > l + } else { + yyb3504 = r.CheckBreak() + } + if yyb3504 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Data = nil + } else { + yyv3508 := &x.Data + yym3509 := z.DecBinary() + _ = yym3509 + if false { + } else { + h.decMapstringSliceuint8((*map[string][]uint8)(yyv3508), d) + } + } + yyj3504++ + if yyhl3504 { + yyb3504 = yyj3504 > l + } else { + yyb3504 = r.CheckBreak() + } + if yyb3504 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Type = "" + } else { + x.Type = SecretType(r.DecodeString()) + } + for { + yyj3504++ + if yyhl3504 { + yyb3504 = yyj3504 > l + } else { + yyb3504 = r.CheckBreak() + } + if yyb3504 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj3504-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x SecretType) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym3511 := z.EncBinary() + _ = yym3511 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *SecretType) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym3512 := z.DecBinary() + _ = yym3512 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *SecretList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym3513 := z.EncBinary() + _ = yym3513 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep3514 := !z.EncBinary() + yy2arr3514 := z.EncBasicHandle().StructToArray + var yyq3514 [4]bool + _, _, _ = yysep3514, yyq3514, yy2arr3514 + const yyr3514 bool = false + yyq3514[0] = x.Kind != "" + yyq3514[1] = x.APIVersion != "" + yyq3514[2] = true + var yynn3514 int + if yyr3514 || yy2arr3514 { + r.EncodeArrayStart(4) + } else { + yynn3514 = 1 + for _, b := range yyq3514 { + if b { + yynn3514++ + } + } + r.EncodeMapStart(yynn3514) + yynn3514 = 0 + } + if yyr3514 || yy2arr3514 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3514[0] { + yym3516 := z.EncBinary() + _ = yym3516 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3514[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3517 := z.EncBinary() + _ = yym3517 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr3514 || yy2arr3514 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3514[1] { + yym3519 := z.EncBinary() + _ = yym3519 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3514[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3520 := z.EncBinary() + _ = yym3520 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr3514 || yy2arr3514 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3514[2] { + yy3522 := &x.ListMeta + yym3523 := z.EncBinary() + _ = yym3523 + if false { + } else if z.HasExtensions() && z.EncExt(yy3522) { + } else { + z.EncFallback(yy3522) + } + } else { + r.EncodeNil() + } + } else { + if yyq3514[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy3524 := &x.ListMeta + yym3525 := z.EncBinary() + _ = yym3525 + if false { + } else if z.HasExtensions() && z.EncExt(yy3524) { + } else { + z.EncFallback(yy3524) + } + } + } + if yyr3514 || yy2arr3514 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym3527 := z.EncBinary() + _ = yym3527 + if false { + } else { + h.encSliceSecret(([]Secret)(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 { + yym3528 := z.EncBinary() + _ = yym3528 + if false { + } else { + h.encSliceSecret(([]Secret)(x.Items), e) + } + } + } + if yyr3514 || yy2arr3514 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *SecretList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym3529 := z.DecBinary() + _ = yym3529 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct3530 := r.ContainerType() + if yyct3530 == codecSelferValueTypeMap1234 { + yyl3530 := r.ReadMapStart() + if yyl3530 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl3530, d) + } + } else if yyct3530 == codecSelferValueTypeArray1234 { + yyl3530 := r.ReadArrayStart() + if yyl3530 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl3530, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *SecretList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3531Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3531Slc + var yyhl3531 bool = l >= 0 + for yyj3531 := 0; ; yyj3531++ { + if yyhl3531 { + if yyj3531 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3531Slc = r.DecodeBytes(yys3531Slc, true, true) + yys3531 := string(yys3531Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3531 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -43401,48 +44049,48 @@ func (x *ConfigMapList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3501 := &x.ListMeta - yym3502 := z.DecBinary() - _ = yym3502 + yyv3534 := &x.ListMeta + yym3535 := z.DecBinary() + _ = yym3535 if false { - } else if z.HasExtensions() && z.DecExt(yyv3501) { + } else if z.HasExtensions() && z.DecExt(yyv3534) { } else { - z.DecFallback(yyv3501, false) + z.DecFallback(yyv3534, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3503 := &x.Items - yym3504 := z.DecBinary() - _ = yym3504 + yyv3536 := &x.Items + yym3537 := z.DecBinary() + _ = yym3537 if false { } else { - h.decSliceConfigMap((*[]ConfigMap)(yyv3503), d) + h.decSliceSecret((*[]Secret)(yyv3536), d) } } default: - z.DecStructFieldNotFound(-1, yys3498) - } // end switch yys3498 - } // end for yyj3498 + z.DecStructFieldNotFound(-1, yys3531) + } // end switch yys3531 + } // end for yyj3531 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } -func (x *ConfigMapList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { +func (x *SecretList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3505 int - var yyb3505 bool - var yyhl3505 bool = l >= 0 - yyj3505++ - if yyhl3505 { - yyb3505 = yyj3505 > l + var yyj3538 int + var yyb3538 bool + var yyhl3538 bool = l >= 0 + yyj3538++ + if yyhl3538 { + yyb3538 = yyj3538 > l } else { - yyb3505 = r.CheckBreak() + yyb3538 = r.CheckBreak() } - if yyb3505 { + if yyb3538 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43452,13 +44100,13 @@ func (x *ConfigMapList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3505++ - if yyhl3505 { - yyb3505 = yyj3505 > l + yyj3538++ + if yyhl3538 { + yyb3538 = yyj3538 > l } else { - yyb3505 = r.CheckBreak() + yyb3538 = r.CheckBreak() } - if yyb3505 { + if yyb3538 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43468,13 +44116,13 @@ func (x *ConfigMapList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3505++ - if yyhl3505 { - yyb3505 = yyj3505 > l + yyj3538++ + if yyhl3538 { + yyb3538 = yyj3538 > l } else { - yyb3505 = r.CheckBreak() + yyb3538 = r.CheckBreak() } - if yyb3505 { + if yyb3538 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43482,22 +44130,22 @@ func (x *ConfigMapList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3508 := &x.ListMeta - yym3509 := z.DecBinary() - _ = yym3509 + yyv3541 := &x.ListMeta + yym3542 := z.DecBinary() + _ = yym3542 if false { - } else if z.HasExtensions() && z.DecExt(yyv3508) { + } else if z.HasExtensions() && z.DecExt(yyv3541) { } else { - z.DecFallback(yyv3508, false) + z.DecFallback(yyv3541, false) } } - yyj3505++ - if yyhl3505 { - yyb3505 = yyj3505 > l + yyj3538++ + if yyhl3538 { + yyb3538 = yyj3538 > l } else { - yyb3505 = r.CheckBreak() + yyb3538 = r.CheckBreak() } - if yyb3505 { + if yyb3538 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43505,26 +44153,704 @@ func (x *ConfigMapList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3510 := &x.Items - yym3511 := z.DecBinary() - _ = yym3511 + yyv3543 := &x.Items + yym3544 := z.DecBinary() + _ = yym3544 if false { } else { - h.decSliceConfigMap((*[]ConfigMap)(yyv3510), d) + h.decSliceSecret((*[]Secret)(yyv3543), d) } } for { - yyj3505++ - if yyhl3505 { - yyb3505 = yyj3505 > l + yyj3538++ + if yyhl3538 { + yyb3538 = yyj3538 > l } else { - yyb3505 = r.CheckBreak() + yyb3538 = r.CheckBreak() } - if yyb3505 { + if yyb3538 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3505-1, "") + z.DecStructFieldNotFound(yyj3538-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym3545 := z.EncBinary() + _ = yym3545 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep3546 := !z.EncBinary() + yy2arr3546 := z.EncBasicHandle().StructToArray + var yyq3546 [4]bool + _, _, _ = yysep3546, yyq3546, yy2arr3546 + const yyr3546 bool = false + yyq3546[0] = x.Kind != "" + yyq3546[1] = x.APIVersion != "" + yyq3546[2] = true + yyq3546[3] = len(x.Data) != 0 + var yynn3546 int + if yyr3546 || yy2arr3546 { + r.EncodeArrayStart(4) + } else { + yynn3546 = 0 + for _, b := range yyq3546 { + if b { + yynn3546++ + } + } + r.EncodeMapStart(yynn3546) + yynn3546 = 0 + } + if yyr3546 || yy2arr3546 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3546[0] { + yym3548 := z.EncBinary() + _ = yym3548 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3546[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3549 := z.EncBinary() + _ = yym3549 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr3546 || yy2arr3546 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3546[1] { + yym3551 := z.EncBinary() + _ = yym3551 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3546[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3552 := z.EncBinary() + _ = yym3552 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr3546 || yy2arr3546 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3546[2] { + yy3554 := &x.ObjectMeta + yy3554.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq3546[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy3555 := &x.ObjectMeta + yy3555.CodecEncodeSelf(e) + } + } + if yyr3546 || yy2arr3546 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3546[3] { + if x.Data == nil { + r.EncodeNil() + } else { + yym3557 := z.EncBinary() + _ = yym3557 + if false { + } else { + z.F.EncMapStringStringV(x.Data, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq3546[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("data")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Data == nil { + r.EncodeNil() + } else { + yym3558 := z.EncBinary() + _ = yym3558 + if false { + } else { + z.F.EncMapStringStringV(x.Data, false, e) + } + } + } + } + if yyr3546 || yy2arr3546 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ConfigMap) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym3559 := z.DecBinary() + _ = yym3559 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct3560 := r.ContainerType() + if yyct3560 == codecSelferValueTypeMap1234 { + yyl3560 := r.ReadMapStart() + if yyl3560 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl3560, d) + } + } else if yyct3560 == codecSelferValueTypeArray1234 { + yyl3560 := r.ReadArrayStart() + if yyl3560 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl3560, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ConfigMap) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3561Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3561Slc + var yyhl3561 bool = l >= 0 + for yyj3561 := 0; ; yyj3561++ { + if yyhl3561 { + if yyj3561 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3561Slc = r.DecodeBytes(yys3561Slc, true, true) + yys3561 := string(yys3561Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3561 { + 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()) + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = ObjectMeta{} + } else { + yyv3564 := &x.ObjectMeta + yyv3564.CodecDecodeSelf(d) + } + case "data": + if r.TryDecodeAsNil() { + x.Data = nil + } else { + yyv3565 := &x.Data + yym3566 := z.DecBinary() + _ = yym3566 + if false { + } else { + z.F.DecMapStringStringX(yyv3565, false, d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3561) + } // end switch yys3561 + } // end for yyj3561 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj3567 int + var yyb3567 bool + var yyhl3567 bool = l >= 0 + yyj3567++ + if yyhl3567 { + yyb3567 = yyj3567 > l + } else { + yyb3567 = r.CheckBreak() + } + if yyb3567 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj3567++ + if yyhl3567 { + yyb3567 = yyj3567 > l + } else { + yyb3567 = r.CheckBreak() + } + if yyb3567 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + yyj3567++ + if yyhl3567 { + yyb3567 = yyj3567 > l + } else { + yyb3567 = r.CheckBreak() + } + if yyb3567 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = ObjectMeta{} + } else { + yyv3570 := &x.ObjectMeta + yyv3570.CodecDecodeSelf(d) + } + yyj3567++ + if yyhl3567 { + yyb3567 = yyj3567 > l + } else { + yyb3567 = r.CheckBreak() + } + if yyb3567 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Data = nil + } else { + yyv3571 := &x.Data + yym3572 := z.DecBinary() + _ = yym3572 + if false { + } else { + z.F.DecMapStringStringX(yyv3571, false, d) + } + } + for { + yyj3567++ + if yyhl3567 { + yyb3567 = yyj3567 > l + } else { + yyb3567 = r.CheckBreak() + } + if yyb3567 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj3567-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym3573 := z.EncBinary() + _ = yym3573 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep3574 := !z.EncBinary() + yy2arr3574 := z.EncBasicHandle().StructToArray + var yyq3574 [4]bool + _, _, _ = yysep3574, yyq3574, yy2arr3574 + const yyr3574 bool = false + yyq3574[0] = x.Kind != "" + yyq3574[1] = x.APIVersion != "" + yyq3574[2] = true + yyq3574[3] = len(x.Items) != 0 + var yynn3574 int + if yyr3574 || yy2arr3574 { + r.EncodeArrayStart(4) + } else { + yynn3574 = 0 + for _, b := range yyq3574 { + if b { + yynn3574++ + } + } + r.EncodeMapStart(yynn3574) + yynn3574 = 0 + } + if yyr3574 || yy2arr3574 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3574[0] { + yym3576 := z.EncBinary() + _ = yym3576 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3574[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3577 := z.EncBinary() + _ = yym3577 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr3574 || yy2arr3574 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3574[1] { + yym3579 := z.EncBinary() + _ = yym3579 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3574[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3580 := z.EncBinary() + _ = yym3580 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr3574 || yy2arr3574 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3574[2] { + yy3582 := &x.ListMeta + yym3583 := z.EncBinary() + _ = yym3583 + if false { + } else if z.HasExtensions() && z.EncExt(yy3582) { + } else { + z.EncFallback(yy3582) + } + } else { + r.EncodeNil() + } + } else { + if yyq3574[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy3584 := &x.ListMeta + yym3585 := z.EncBinary() + _ = yym3585 + if false { + } else if z.HasExtensions() && z.EncExt(yy3584) { + } else { + z.EncFallback(yy3584) + } + } + } + if yyr3574 || yy2arr3574 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3574[3] { + if x.Items == nil { + r.EncodeNil() + } else { + yym3587 := z.EncBinary() + _ = yym3587 + if false { + } else { + h.encSliceConfigMap(([]ConfigMap)(x.Items), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq3574[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym3588 := z.EncBinary() + _ = yym3588 + if false { + } else { + h.encSliceConfigMap(([]ConfigMap)(x.Items), e) + } + } + } + } + if yyr3574 || yy2arr3574 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ConfigMapList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym3589 := z.DecBinary() + _ = yym3589 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct3590 := r.ContainerType() + if yyct3590 == codecSelferValueTypeMap1234 { + yyl3590 := r.ReadMapStart() + if yyl3590 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl3590, d) + } + } else if yyct3590 == codecSelferValueTypeArray1234 { + yyl3590 := r.ReadArrayStart() + if yyl3590 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl3590, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ConfigMapList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3591Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3591Slc + var yyhl3591 bool = l >= 0 + for yyj3591 := 0; ; yyj3591++ { + if yyhl3591 { + if yyj3591 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3591Slc = r.DecodeBytes(yys3591Slc, true, true) + yys3591 := string(yys3591Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3591 { + 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()) + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg2_unversioned.ListMeta{} + } else { + yyv3594 := &x.ListMeta + yym3595 := z.DecBinary() + _ = yym3595 + if false { + } else if z.HasExtensions() && z.DecExt(yyv3594) { + } else { + z.DecFallback(yyv3594, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv3596 := &x.Items + yym3597 := z.DecBinary() + _ = yym3597 + if false { + } else { + h.decSliceConfigMap((*[]ConfigMap)(yyv3596), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3591) + } // end switch yys3591 + } // end for yyj3591 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ConfigMapList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj3598 int + var yyb3598 bool + var yyhl3598 bool = l >= 0 + yyj3598++ + if yyhl3598 { + yyb3598 = yyj3598 > l + } else { + yyb3598 = r.CheckBreak() + } + if yyb3598 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj3598++ + if yyhl3598 { + yyb3598 = yyj3598 > l + } else { + yyb3598 = r.CheckBreak() + } + if yyb3598 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + yyj3598++ + if yyhl3598 { + yyb3598 = yyj3598 > l + } else { + yyb3598 = r.CheckBreak() + } + if yyb3598 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg2_unversioned.ListMeta{} + } else { + yyv3601 := &x.ListMeta + yym3602 := z.DecBinary() + _ = yym3602 + if false { + } else if z.HasExtensions() && z.DecExt(yyv3601) { + } else { + z.DecFallback(yyv3601, false) + } + } + yyj3598++ + if yyhl3598 { + yyb3598 = yyj3598 > l + } else { + yyb3598 = r.CheckBreak() + } + if yyb3598 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv3603 := &x.Items + yym3604 := z.DecBinary() + _ = yym3604 + if false { + } else { + h.decSliceConfigMap((*[]ConfigMap)(yyv3603), d) + } + } + for { + yyj3598++ + if yyhl3598 { + yyb3598 = yyj3598 > l + } else { + yyb3598 = r.CheckBreak() + } + if yyb3598 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj3598-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -43533,8 +44859,8 @@ func (x PatchType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym3512 := z.EncBinary() - _ = yym3512 + yym3605 := z.EncBinary() + _ = yym3605 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -43546,8 +44872,8 @@ func (x *PatchType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3513 := z.DecBinary() - _ = yym3513 + yym3606 := z.DecBinary() + _ = yym3606 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -43559,8 +44885,8 @@ func (x ComponentConditionType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym3514 := z.EncBinary() - _ = yym3514 + yym3607 := z.EncBinary() + _ = yym3607 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -43572,8 +44898,8 @@ func (x *ComponentConditionType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3515 := z.DecBinary() - _ = yym3515 + yym3608 := z.DecBinary() + _ = yym3608 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -43588,32 +44914,32 @@ func (x *ComponentCondition) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3516 := z.EncBinary() - _ = yym3516 + yym3609 := z.EncBinary() + _ = yym3609 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3517 := !z.EncBinary() - yy2arr3517 := z.EncBasicHandle().StructToArray - var yyq3517 [4]bool - _, _, _ = yysep3517, yyq3517, yy2arr3517 - const yyr3517 bool = false - yyq3517[2] = x.Message != "" - yyq3517[3] = x.Error != "" - var yynn3517 int - if yyr3517 || yy2arr3517 { + yysep3610 := !z.EncBinary() + yy2arr3610 := z.EncBasicHandle().StructToArray + var yyq3610 [4]bool + _, _, _ = yysep3610, yyq3610, yy2arr3610 + const yyr3610 bool = false + yyq3610[2] = x.Message != "" + yyq3610[3] = x.Error != "" + var yynn3610 int + if yyr3610 || yy2arr3610 { r.EncodeArrayStart(4) } else { - yynn3517 = 2 - for _, b := range yyq3517 { + yynn3610 = 2 + for _, b := range yyq3610 { if b { - yynn3517++ + yynn3610++ } } - r.EncodeMapStart(yynn3517) - yynn3517 = 0 + r.EncodeMapStart(yynn3610) + yynn3610 = 0 } - if yyr3517 || yy2arr3517 { + if yyr3610 || yy2arr3610 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Type.CodecEncodeSelf(e) } else { @@ -43622,7 +44948,7 @@ func (x *ComponentCondition) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } - if yyr3517 || yy2arr3517 { + if yyr3610 || yy2arr3610 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Status.CodecEncodeSelf(e) } else { @@ -43631,11 +44957,11 @@ func (x *ComponentCondition) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Status.CodecEncodeSelf(e) } - if yyr3517 || yy2arr3517 { + if yyr3610 || yy2arr3610 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3517[2] { - yym3521 := z.EncBinary() - _ = yym3521 + if yyq3610[2] { + yym3614 := z.EncBinary() + _ = yym3614 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) @@ -43644,23 +44970,23 @@ func (x *ComponentCondition) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3517[2] { + if yyq3610[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("message")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3522 := z.EncBinary() - _ = yym3522 + yym3615 := z.EncBinary() + _ = yym3615 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) } } } - if yyr3517 || yy2arr3517 { + if yyr3610 || yy2arr3610 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3517[3] { - yym3524 := z.EncBinary() - _ = yym3524 + if yyq3610[3] { + yym3617 := z.EncBinary() + _ = yym3617 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Error)) @@ -43669,19 +44995,19 @@ func (x *ComponentCondition) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3517[3] { + if yyq3610[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("error")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3525 := z.EncBinary() - _ = yym3525 + yym3618 := z.EncBinary() + _ = yym3618 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Error)) } } } - if yyr3517 || yy2arr3517 { + if yyr3610 || yy2arr3610 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -43694,25 +45020,25 @@ func (x *ComponentCondition) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3526 := z.DecBinary() - _ = yym3526 + yym3619 := z.DecBinary() + _ = yym3619 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3527 := r.ContainerType() - if yyct3527 == codecSelferValueTypeMap1234 { - yyl3527 := r.ReadMapStart() - if yyl3527 == 0 { + yyct3620 := r.ContainerType() + if yyct3620 == codecSelferValueTypeMap1234 { + yyl3620 := r.ReadMapStart() + if yyl3620 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3527, d) + x.codecDecodeSelfFromMap(yyl3620, d) } - } else if yyct3527 == codecSelferValueTypeArray1234 { - yyl3527 := r.ReadArrayStart() - if yyl3527 == 0 { + } else if yyct3620 == codecSelferValueTypeArray1234 { + yyl3620 := r.ReadArrayStart() + if yyl3620 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3527, d) + x.codecDecodeSelfFromArray(yyl3620, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -43724,12 +45050,12 @@ func (x *ComponentCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3528Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3528Slc - var yyhl3528 bool = l >= 0 - for yyj3528 := 0; ; yyj3528++ { - if yyhl3528 { - if yyj3528 >= l { + var yys3621Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3621Slc + var yyhl3621 bool = l >= 0 + for yyj3621 := 0; ; yyj3621++ { + if yyhl3621 { + if yyj3621 >= l { break } } else { @@ -43738,10 +45064,10 @@ func (x *ComponentCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3528Slc = r.DecodeBytes(yys3528Slc, true, true) - yys3528 := string(yys3528Slc) + yys3621Slc = r.DecodeBytes(yys3621Slc, true, true) + yys3621 := string(yys3621Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3528 { + switch yys3621 { case "type": if r.TryDecodeAsNil() { x.Type = "" @@ -43767,9 +45093,9 @@ func (x *ComponentCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) x.Error = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3528) - } // end switch yys3528 - } // end for yyj3528 + z.DecStructFieldNotFound(-1, yys3621) + } // end switch yys3621 + } // end for yyj3621 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -43777,16 +45103,16 @@ func (x *ComponentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3533 int - var yyb3533 bool - var yyhl3533 bool = l >= 0 - yyj3533++ - if yyhl3533 { - yyb3533 = yyj3533 > l + var yyj3626 int + var yyb3626 bool + var yyhl3626 bool = l >= 0 + yyj3626++ + if yyhl3626 { + yyb3626 = yyj3626 > l } else { - yyb3533 = r.CheckBreak() + yyb3626 = r.CheckBreak() } - if yyb3533 { + if yyb3626 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43796,13 +45122,13 @@ func (x *ComponentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decode } else { x.Type = ComponentConditionType(r.DecodeString()) } - yyj3533++ - if yyhl3533 { - yyb3533 = yyj3533 > l + yyj3626++ + if yyhl3626 { + yyb3626 = yyj3626 > l } else { - yyb3533 = r.CheckBreak() + yyb3626 = r.CheckBreak() } - if yyb3533 { + if yyb3626 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43812,13 +45138,13 @@ func (x *ComponentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decode } else { x.Status = ConditionStatus(r.DecodeString()) } - yyj3533++ - if yyhl3533 { - yyb3533 = yyj3533 > l + yyj3626++ + if yyhl3626 { + yyb3626 = yyj3626 > l } else { - yyb3533 = r.CheckBreak() + yyb3626 = r.CheckBreak() } - if yyb3533 { + if yyb3626 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43828,13 +45154,13 @@ func (x *ComponentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decode } else { x.Message = string(r.DecodeString()) } - yyj3533++ - if yyhl3533 { - yyb3533 = yyj3533 > l + yyj3626++ + if yyhl3626 { + yyb3626 = yyj3626 > l } else { - yyb3533 = r.CheckBreak() + yyb3626 = r.CheckBreak() } - if yyb3533 { + if yyb3626 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43845,17 +45171,17 @@ func (x *ComponentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decode x.Error = string(r.DecodeString()) } for { - yyj3533++ - if yyhl3533 { - yyb3533 = yyj3533 > l + yyj3626++ + if yyhl3626 { + yyb3626 = yyj3626 > l } else { - yyb3533 = r.CheckBreak() + yyb3626 = r.CheckBreak() } - if yyb3533 { + if yyb3626 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3533-1, "") + z.DecStructFieldNotFound(yyj3626-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -43867,38 +45193,38 @@ func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3538 := z.EncBinary() - _ = yym3538 + yym3631 := z.EncBinary() + _ = yym3631 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3539 := !z.EncBinary() - yy2arr3539 := z.EncBasicHandle().StructToArray - var yyq3539 [4]bool - _, _, _ = yysep3539, yyq3539, yy2arr3539 - const yyr3539 bool = false - yyq3539[0] = x.Kind != "" - yyq3539[1] = x.APIVersion != "" - yyq3539[2] = true - yyq3539[3] = len(x.Conditions) != 0 - var yynn3539 int - if yyr3539 || yy2arr3539 { + yysep3632 := !z.EncBinary() + yy2arr3632 := z.EncBasicHandle().StructToArray + var yyq3632 [4]bool + _, _, _ = yysep3632, yyq3632, yy2arr3632 + const yyr3632 bool = false + yyq3632[0] = x.Kind != "" + yyq3632[1] = x.APIVersion != "" + yyq3632[2] = true + yyq3632[3] = len(x.Conditions) != 0 + var yynn3632 int + if yyr3632 || yy2arr3632 { r.EncodeArrayStart(4) } else { - yynn3539 = 0 - for _, b := range yyq3539 { + yynn3632 = 0 + for _, b := range yyq3632 { if b { - yynn3539++ + yynn3632++ } } - r.EncodeMapStart(yynn3539) - yynn3539 = 0 + r.EncodeMapStart(yynn3632) + yynn3632 = 0 } - if yyr3539 || yy2arr3539 { + if yyr3632 || yy2arr3632 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3539[0] { - yym3541 := z.EncBinary() - _ = yym3541 + if yyq3632[0] { + yym3634 := z.EncBinary() + _ = yym3634 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -43907,23 +45233,23 @@ func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3539[0] { + if yyq3632[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3542 := z.EncBinary() - _ = yym3542 + yym3635 := z.EncBinary() + _ = yym3635 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3539 || yy2arr3539 { + if yyr3632 || yy2arr3632 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3539[1] { - yym3544 := z.EncBinary() - _ = yym3544 + if yyq3632[1] { + yym3637 := z.EncBinary() + _ = yym3637 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -43932,43 +45258,43 @@ func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3539[1] { + if yyq3632[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3545 := z.EncBinary() - _ = yym3545 + yym3638 := z.EncBinary() + _ = yym3638 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3539 || yy2arr3539 { + if yyr3632 || yy2arr3632 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3539[2] { - yy3547 := &x.ObjectMeta - yy3547.CodecEncodeSelf(e) + if yyq3632[2] { + yy3640 := &x.ObjectMeta + yy3640.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3539[2] { + if yyq3632[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3548 := &x.ObjectMeta - yy3548.CodecEncodeSelf(e) + yy3641 := &x.ObjectMeta + yy3641.CodecEncodeSelf(e) } } - if yyr3539 || yy2arr3539 { + if yyr3632 || yy2arr3632 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3539[3] { + if yyq3632[3] { if x.Conditions == nil { r.EncodeNil() } else { - yym3550 := z.EncBinary() - _ = yym3550 + yym3643 := z.EncBinary() + _ = yym3643 if false { } else { h.encSliceComponentCondition(([]ComponentCondition)(x.Conditions), e) @@ -43978,15 +45304,15 @@ func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3539[3] { + if yyq3632[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("conditions")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Conditions == nil { r.EncodeNil() } else { - yym3551 := z.EncBinary() - _ = yym3551 + yym3644 := z.EncBinary() + _ = yym3644 if false { } else { h.encSliceComponentCondition(([]ComponentCondition)(x.Conditions), e) @@ -43994,7 +45320,7 @@ func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3539 || yy2arr3539 { + if yyr3632 || yy2arr3632 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -44007,25 +45333,25 @@ func (x *ComponentStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3552 := z.DecBinary() - _ = yym3552 + yym3645 := z.DecBinary() + _ = yym3645 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3553 := r.ContainerType() - if yyct3553 == codecSelferValueTypeMap1234 { - yyl3553 := r.ReadMapStart() - if yyl3553 == 0 { + yyct3646 := r.ContainerType() + if yyct3646 == codecSelferValueTypeMap1234 { + yyl3646 := r.ReadMapStart() + if yyl3646 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3553, d) + x.codecDecodeSelfFromMap(yyl3646, d) } - } else if yyct3553 == codecSelferValueTypeArray1234 { - yyl3553 := r.ReadArrayStart() - if yyl3553 == 0 { + } else if yyct3646 == codecSelferValueTypeArray1234 { + yyl3646 := r.ReadArrayStart() + if yyl3646 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3553, d) + x.codecDecodeSelfFromArray(yyl3646, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -44037,12 +45363,12 @@ func (x *ComponentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3554Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3554Slc - var yyhl3554 bool = l >= 0 - for yyj3554 := 0; ; yyj3554++ { - if yyhl3554 { - if yyj3554 >= l { + var yys3647Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3647Slc + var yyhl3647 bool = l >= 0 + for yyj3647 := 0; ; yyj3647++ { + if yyhl3647 { + if yyj3647 >= l { break } } else { @@ -44051,10 +45377,10 @@ func (x *ComponentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3554Slc = r.DecodeBytes(yys3554Slc, true, true) - yys3554 := string(yys3554Slc) + yys3647Slc = r.DecodeBytes(yys3647Slc, true, true) + yys3647 := string(yys3647Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3554 { + switch yys3647 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -44071,25 +45397,25 @@ func (x *ComponentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3557 := &x.ObjectMeta - yyv3557.CodecDecodeSelf(d) + yyv3650 := &x.ObjectMeta + yyv3650.CodecDecodeSelf(d) } case "conditions": if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv3558 := &x.Conditions - yym3559 := z.DecBinary() - _ = yym3559 + yyv3651 := &x.Conditions + yym3652 := z.DecBinary() + _ = yym3652 if false { } else { - h.decSliceComponentCondition((*[]ComponentCondition)(yyv3558), d) + h.decSliceComponentCondition((*[]ComponentCondition)(yyv3651), d) } } default: - z.DecStructFieldNotFound(-1, yys3554) - } // end switch yys3554 - } // end for yyj3554 + z.DecStructFieldNotFound(-1, yys3647) + } // end switch yys3647 + } // end for yyj3647 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -44097,16 +45423,16 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3560 int - var yyb3560 bool - var yyhl3560 bool = l >= 0 - yyj3560++ - if yyhl3560 { - yyb3560 = yyj3560 > l + var yyj3653 int + var yyb3653 bool + var yyhl3653 bool = l >= 0 + yyj3653++ + if yyhl3653 { + yyb3653 = yyj3653 > l } else { - yyb3560 = r.CheckBreak() + yyb3653 = r.CheckBreak() } - if yyb3560 { + if yyb3653 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44116,13 +45442,13 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Kind = string(r.DecodeString()) } - yyj3560++ - if yyhl3560 { - yyb3560 = yyj3560 > l + yyj3653++ + if yyhl3653 { + yyb3653 = yyj3653 > l } else { - yyb3560 = r.CheckBreak() + yyb3653 = r.CheckBreak() } - if yyb3560 { + if yyb3653 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44132,13 +45458,13 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.APIVersion = string(r.DecodeString()) } - yyj3560++ - if yyhl3560 { - yyb3560 = yyj3560 > l + yyj3653++ + if yyhl3653 { + yyb3653 = yyj3653 > l } else { - yyb3560 = r.CheckBreak() + yyb3653 = r.CheckBreak() } - if yyb3560 { + if yyb3653 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44146,16 +45472,16 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3563 := &x.ObjectMeta - yyv3563.CodecDecodeSelf(d) + yyv3656 := &x.ObjectMeta + yyv3656.CodecDecodeSelf(d) } - yyj3560++ - if yyhl3560 { - yyb3560 = yyj3560 > l + yyj3653++ + if yyhl3653 { + yyb3653 = yyj3653 > l } else { - yyb3560 = r.CheckBreak() + yyb3653 = r.CheckBreak() } - if yyb3560 { + if yyb3653 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44163,26 +45489,26 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv3564 := &x.Conditions - yym3565 := z.DecBinary() - _ = yym3565 + yyv3657 := &x.Conditions + yym3658 := z.DecBinary() + _ = yym3658 if false { } else { - h.decSliceComponentCondition((*[]ComponentCondition)(yyv3564), d) + h.decSliceComponentCondition((*[]ComponentCondition)(yyv3657), d) } } for { - yyj3560++ - if yyhl3560 { - yyb3560 = yyj3560 > l + yyj3653++ + if yyhl3653 { + yyb3653 = yyj3653 > l } else { - yyb3560 = r.CheckBreak() + yyb3653 = r.CheckBreak() } - if yyb3560 { + if yyb3653 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3560-1, "") + z.DecStructFieldNotFound(yyj3653-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -44194,37 +45520,37 @@ func (x *ComponentStatusList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3566 := z.EncBinary() - _ = yym3566 + yym3659 := z.EncBinary() + _ = yym3659 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3567 := !z.EncBinary() - yy2arr3567 := z.EncBasicHandle().StructToArray - var yyq3567 [4]bool - _, _, _ = yysep3567, yyq3567, yy2arr3567 - const yyr3567 bool = false - yyq3567[0] = x.Kind != "" - yyq3567[1] = x.APIVersion != "" - yyq3567[2] = true - var yynn3567 int - if yyr3567 || yy2arr3567 { + yysep3660 := !z.EncBinary() + yy2arr3660 := z.EncBasicHandle().StructToArray + var yyq3660 [4]bool + _, _, _ = yysep3660, yyq3660, yy2arr3660 + const yyr3660 bool = false + yyq3660[0] = x.Kind != "" + yyq3660[1] = x.APIVersion != "" + yyq3660[2] = true + var yynn3660 int + if yyr3660 || yy2arr3660 { r.EncodeArrayStart(4) } else { - yynn3567 = 1 - for _, b := range yyq3567 { + yynn3660 = 1 + for _, b := range yyq3660 { if b { - yynn3567++ + yynn3660++ } } - r.EncodeMapStart(yynn3567) - yynn3567 = 0 + r.EncodeMapStart(yynn3660) + yynn3660 = 0 } - if yyr3567 || yy2arr3567 { + if yyr3660 || yy2arr3660 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3567[0] { - yym3569 := z.EncBinary() - _ = yym3569 + if yyq3660[0] { + yym3662 := z.EncBinary() + _ = yym3662 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -44233,23 +45559,23 @@ func (x *ComponentStatusList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3567[0] { + if yyq3660[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3570 := z.EncBinary() - _ = yym3570 + yym3663 := z.EncBinary() + _ = yym3663 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3567 || yy2arr3567 { + if yyr3660 || yy2arr3660 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3567[1] { - yym3572 := z.EncBinary() - _ = yym3572 + if yyq3660[1] { + yym3665 := z.EncBinary() + _ = yym3665 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -44258,54 +45584,54 @@ func (x *ComponentStatusList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3567[1] { + if yyq3660[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3573 := z.EncBinary() - _ = yym3573 + yym3666 := z.EncBinary() + _ = yym3666 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3567 || yy2arr3567 { + if yyr3660 || yy2arr3660 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3567[2] { - yy3575 := &x.ListMeta - yym3576 := z.EncBinary() - _ = yym3576 + if yyq3660[2] { + yy3668 := &x.ListMeta + yym3669 := z.EncBinary() + _ = yym3669 if false { - } else if z.HasExtensions() && z.EncExt(yy3575) { + } else if z.HasExtensions() && z.EncExt(yy3668) { } else { - z.EncFallback(yy3575) + z.EncFallback(yy3668) } } else { r.EncodeNil() } } else { - if yyq3567[2] { + if yyq3660[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3577 := &x.ListMeta - yym3578 := z.EncBinary() - _ = yym3578 + yy3670 := &x.ListMeta + yym3671 := z.EncBinary() + _ = yym3671 if false { - } else if z.HasExtensions() && z.EncExt(yy3577) { + } else if z.HasExtensions() && z.EncExt(yy3670) { } else { - z.EncFallback(yy3577) + z.EncFallback(yy3670) } } } - if yyr3567 || yy2arr3567 { + if yyr3660 || yy2arr3660 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym3580 := z.EncBinary() - _ = yym3580 + yym3673 := z.EncBinary() + _ = yym3673 if false { } else { h.encSliceComponentStatus(([]ComponentStatus)(x.Items), e) @@ -44318,15 +45644,15 @@ func (x *ComponentStatusList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym3581 := z.EncBinary() - _ = yym3581 + yym3674 := z.EncBinary() + _ = yym3674 if false { } else { h.encSliceComponentStatus(([]ComponentStatus)(x.Items), e) } } } - if yyr3567 || yy2arr3567 { + if yyr3660 || yy2arr3660 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -44339,25 +45665,25 @@ func (x *ComponentStatusList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3582 := z.DecBinary() - _ = yym3582 + yym3675 := z.DecBinary() + _ = yym3675 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3583 := r.ContainerType() - if yyct3583 == codecSelferValueTypeMap1234 { - yyl3583 := r.ReadMapStart() - if yyl3583 == 0 { + yyct3676 := r.ContainerType() + if yyct3676 == codecSelferValueTypeMap1234 { + yyl3676 := r.ReadMapStart() + if yyl3676 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3583, d) + x.codecDecodeSelfFromMap(yyl3676, d) } - } else if yyct3583 == codecSelferValueTypeArray1234 { - yyl3583 := r.ReadArrayStart() - if yyl3583 == 0 { + } else if yyct3676 == codecSelferValueTypeArray1234 { + yyl3676 := r.ReadArrayStart() + if yyl3676 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3583, d) + x.codecDecodeSelfFromArray(yyl3676, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -44369,12 +45695,12 @@ func (x *ComponentStatusList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3584Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3584Slc - var yyhl3584 bool = l >= 0 - for yyj3584 := 0; ; yyj3584++ { - if yyhl3584 { - if yyj3584 >= l { + var yys3677Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3677Slc + var yyhl3677 bool = l >= 0 + for yyj3677 := 0; ; yyj3677++ { + if yyhl3677 { + if yyj3677 >= l { break } } else { @@ -44383,10 +45709,10 @@ func (x *ComponentStatusList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3584Slc = r.DecodeBytes(yys3584Slc, true, true) - yys3584 := string(yys3584Slc) + yys3677Slc = r.DecodeBytes(yys3677Slc, true, true) + yys3677 := string(yys3677Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3584 { + switch yys3677 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -44403,31 +45729,31 @@ func (x *ComponentStatusList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3587 := &x.ListMeta - yym3588 := z.DecBinary() - _ = yym3588 + yyv3680 := &x.ListMeta + yym3681 := z.DecBinary() + _ = yym3681 if false { - } else if z.HasExtensions() && z.DecExt(yyv3587) { + } else if z.HasExtensions() && z.DecExt(yyv3680) { } else { - z.DecFallback(yyv3587, false) + z.DecFallback(yyv3680, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3589 := &x.Items - yym3590 := z.DecBinary() - _ = yym3590 + yyv3682 := &x.Items + yym3683 := z.DecBinary() + _ = yym3683 if false { } else { - h.decSliceComponentStatus((*[]ComponentStatus)(yyv3589), d) + h.decSliceComponentStatus((*[]ComponentStatus)(yyv3682), d) } } default: - z.DecStructFieldNotFound(-1, yys3584) - } // end switch yys3584 - } // end for yyj3584 + z.DecStructFieldNotFound(-1, yys3677) + } // end switch yys3677 + } // end for yyj3677 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -44435,16 +45761,16 @@ func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3591 int - var yyb3591 bool - var yyhl3591 bool = l >= 0 - yyj3591++ - if yyhl3591 { - yyb3591 = yyj3591 > l + var yyj3684 int + var yyb3684 bool + var yyhl3684 bool = l >= 0 + yyj3684++ + if yyhl3684 { + yyb3684 = yyj3684 > l } else { - yyb3591 = r.CheckBreak() + yyb3684 = r.CheckBreak() } - if yyb3591 { + if yyb3684 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44454,13 +45780,13 @@ func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decod } else { x.Kind = string(r.DecodeString()) } - yyj3591++ - if yyhl3591 { - yyb3591 = yyj3591 > l + yyj3684++ + if yyhl3684 { + yyb3684 = yyj3684 > l } else { - yyb3591 = r.CheckBreak() + yyb3684 = r.CheckBreak() } - if yyb3591 { + if yyb3684 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44470,13 +45796,13 @@ func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decod } else { x.APIVersion = string(r.DecodeString()) } - yyj3591++ - if yyhl3591 { - yyb3591 = yyj3591 > l + yyj3684++ + if yyhl3684 { + yyb3684 = yyj3684 > l } else { - yyb3591 = r.CheckBreak() + yyb3684 = r.CheckBreak() } - if yyb3591 { + if yyb3684 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44484,22 +45810,22 @@ func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3594 := &x.ListMeta - yym3595 := z.DecBinary() - _ = yym3595 + yyv3687 := &x.ListMeta + yym3688 := z.DecBinary() + _ = yym3688 if false { - } else if z.HasExtensions() && z.DecExt(yyv3594) { + } else if z.HasExtensions() && z.DecExt(yyv3687) { } else { - z.DecFallback(yyv3594, false) + z.DecFallback(yyv3687, false) } } - yyj3591++ - if yyhl3591 { - yyb3591 = yyj3591 > l + yyj3684++ + if yyhl3684 { + yyb3684 = yyj3684 > l } else { - yyb3591 = r.CheckBreak() + yyb3684 = r.CheckBreak() } - if yyb3591 { + if yyb3684 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44507,26 +45833,26 @@ func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3596 := &x.Items - yym3597 := z.DecBinary() - _ = yym3597 + yyv3689 := &x.Items + yym3690 := z.DecBinary() + _ = yym3690 if false { } else { - h.decSliceComponentStatus((*[]ComponentStatus)(yyv3596), d) + h.decSliceComponentStatus((*[]ComponentStatus)(yyv3689), d) } } for { - yyj3591++ - if yyhl3591 { - yyb3591 = yyj3591 > l + yyj3684++ + if yyhl3684 { + yyb3684 = yyj3684 > l } else { - yyb3591 = r.CheckBreak() + yyb3684 = r.CheckBreak() } - if yyb3591 { + if yyb3684 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3591-1, "") + z.DecStructFieldNotFound(yyj3684-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -44538,37 +45864,37 @@ func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3598 := z.EncBinary() - _ = yym3598 + yym3691 := z.EncBinary() + _ = yym3691 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3599 := !z.EncBinary() - yy2arr3599 := z.EncBasicHandle().StructToArray - var yyq3599 [5]bool - _, _, _ = yysep3599, yyq3599, yy2arr3599 - const yyr3599 bool = false - yyq3599[0] = x.Capabilities != nil - yyq3599[1] = x.Privileged != nil - yyq3599[2] = x.SELinuxOptions != nil - yyq3599[3] = x.RunAsUser != nil - yyq3599[4] = x.RunAsNonRoot != nil - var yynn3599 int - if yyr3599 || yy2arr3599 { + yysep3692 := !z.EncBinary() + yy2arr3692 := z.EncBasicHandle().StructToArray + var yyq3692 [5]bool + _, _, _ = yysep3692, yyq3692, yy2arr3692 + const yyr3692 bool = false + yyq3692[0] = x.Capabilities != nil + yyq3692[1] = x.Privileged != nil + yyq3692[2] = x.SELinuxOptions != nil + yyq3692[3] = x.RunAsUser != nil + yyq3692[4] = x.RunAsNonRoot != nil + var yynn3692 int + if yyr3692 || yy2arr3692 { r.EncodeArrayStart(5) } else { - yynn3599 = 0 - for _, b := range yyq3599 { + yynn3692 = 0 + for _, b := range yyq3692 { if b { - yynn3599++ + yynn3692++ } } - r.EncodeMapStart(yynn3599) - yynn3599 = 0 + r.EncodeMapStart(yynn3692) + yynn3692 = 0 } - if yyr3599 || yy2arr3599 { + if yyr3692 || yy2arr3692 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3599[0] { + if yyq3692[0] { if x.Capabilities == nil { r.EncodeNil() } else { @@ -44578,7 +45904,7 @@ func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3599[0] { + if yyq3692[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("capabilities")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -44589,44 +45915,44 @@ func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3599 || yy2arr3599 { + if yyr3692 || yy2arr3692 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3599[1] { + if yyq3692[1] { if x.Privileged == nil { r.EncodeNil() } else { - yy3602 := *x.Privileged - yym3603 := z.EncBinary() - _ = yym3603 + yy3695 := *x.Privileged + yym3696 := z.EncBinary() + _ = yym3696 if false { } else { - r.EncodeBool(bool(yy3602)) + r.EncodeBool(bool(yy3695)) } } } else { r.EncodeNil() } } else { - if yyq3599[1] { + if yyq3692[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("privileged")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Privileged == nil { r.EncodeNil() } else { - yy3604 := *x.Privileged - yym3605 := z.EncBinary() - _ = yym3605 + yy3697 := *x.Privileged + yym3698 := z.EncBinary() + _ = yym3698 if false { } else { - r.EncodeBool(bool(yy3604)) + r.EncodeBool(bool(yy3697)) } } } } - if yyr3599 || yy2arr3599 { + if yyr3692 || yy2arr3692 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3599[2] { + if yyq3692[2] { if x.SELinuxOptions == nil { r.EncodeNil() } else { @@ -44636,7 +45962,7 @@ func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3599[2] { + if yyq3692[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("seLinuxOptions")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -44647,77 +45973,77 @@ func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3599 || yy2arr3599 { + if yyr3692 || yy2arr3692 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3599[3] { + if yyq3692[3] { if x.RunAsUser == nil { r.EncodeNil() } else { - yy3608 := *x.RunAsUser - yym3609 := z.EncBinary() - _ = yym3609 + yy3701 := *x.RunAsUser + yym3702 := z.EncBinary() + _ = yym3702 if false { } else { - r.EncodeInt(int64(yy3608)) + r.EncodeInt(int64(yy3701)) } } } else { r.EncodeNil() } } else { - if yyq3599[3] { + if yyq3692[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("runAsUser")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.RunAsUser == nil { r.EncodeNil() } else { - yy3610 := *x.RunAsUser - yym3611 := z.EncBinary() - _ = yym3611 + yy3703 := *x.RunAsUser + yym3704 := z.EncBinary() + _ = yym3704 if false { } else { - r.EncodeInt(int64(yy3610)) + r.EncodeInt(int64(yy3703)) } } } } - if yyr3599 || yy2arr3599 { + if yyr3692 || yy2arr3692 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3599[4] { + if yyq3692[4] { if x.RunAsNonRoot == nil { r.EncodeNil() } else { - yy3613 := *x.RunAsNonRoot - yym3614 := z.EncBinary() - _ = yym3614 + yy3706 := *x.RunAsNonRoot + yym3707 := z.EncBinary() + _ = yym3707 if false { } else { - r.EncodeBool(bool(yy3613)) + r.EncodeBool(bool(yy3706)) } } } else { r.EncodeNil() } } else { - if yyq3599[4] { + if yyq3692[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("runAsNonRoot")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.RunAsNonRoot == nil { r.EncodeNil() } else { - yy3615 := *x.RunAsNonRoot - yym3616 := z.EncBinary() - _ = yym3616 + yy3708 := *x.RunAsNonRoot + yym3709 := z.EncBinary() + _ = yym3709 if false { } else { - r.EncodeBool(bool(yy3615)) + r.EncodeBool(bool(yy3708)) } } } } - if yyr3599 || yy2arr3599 { + if yyr3692 || yy2arr3692 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -44730,25 +46056,25 @@ func (x *SecurityContext) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3617 := z.DecBinary() - _ = yym3617 + yym3710 := z.DecBinary() + _ = yym3710 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3618 := r.ContainerType() - if yyct3618 == codecSelferValueTypeMap1234 { - yyl3618 := r.ReadMapStart() - if yyl3618 == 0 { + yyct3711 := r.ContainerType() + if yyct3711 == codecSelferValueTypeMap1234 { + yyl3711 := r.ReadMapStart() + if yyl3711 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3618, d) + x.codecDecodeSelfFromMap(yyl3711, d) } - } else if yyct3618 == codecSelferValueTypeArray1234 { - yyl3618 := r.ReadArrayStart() - if yyl3618 == 0 { + } else if yyct3711 == codecSelferValueTypeArray1234 { + yyl3711 := r.ReadArrayStart() + if yyl3711 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3618, d) + x.codecDecodeSelfFromArray(yyl3711, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -44760,12 +46086,12 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3619Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3619Slc - var yyhl3619 bool = l >= 0 - for yyj3619 := 0; ; yyj3619++ { - if yyhl3619 { - if yyj3619 >= l { + var yys3712Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3712Slc + var yyhl3712 bool = l >= 0 + for yyj3712 := 0; ; yyj3712++ { + if yyhl3712 { + if yyj3712 >= l { break } } else { @@ -44774,10 +46100,10 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3619Slc = r.DecodeBytes(yys3619Slc, true, true) - yys3619 := string(yys3619Slc) + yys3712Slc = r.DecodeBytes(yys3712Slc, true, true) + yys3712 := string(yys3712Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3619 { + switch yys3712 { case "capabilities": if r.TryDecodeAsNil() { if x.Capabilities != nil { @@ -44798,8 +46124,8 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.Privileged == nil { x.Privileged = new(bool) } - yym3622 := z.DecBinary() - _ = yym3622 + yym3715 := z.DecBinary() + _ = yym3715 if false { } else { *((*bool)(x.Privileged)) = r.DecodeBool() @@ -44825,8 +46151,8 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.RunAsUser == nil { x.RunAsUser = new(int64) } - yym3625 := z.DecBinary() - _ = yym3625 + yym3718 := z.DecBinary() + _ = yym3718 if false { } else { *((*int64)(x.RunAsUser)) = int64(r.DecodeInt(64)) @@ -44841,17 +46167,17 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.RunAsNonRoot == nil { x.RunAsNonRoot = new(bool) } - yym3627 := z.DecBinary() - _ = yym3627 + yym3720 := z.DecBinary() + _ = yym3720 if false { } else { *((*bool)(x.RunAsNonRoot)) = r.DecodeBool() } } default: - z.DecStructFieldNotFound(-1, yys3619) - } // end switch yys3619 - } // end for yyj3619 + z.DecStructFieldNotFound(-1, yys3712) + } // end switch yys3712 + } // end for yyj3712 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -44859,16 +46185,16 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3628 int - var yyb3628 bool - var yyhl3628 bool = l >= 0 - yyj3628++ - if yyhl3628 { - yyb3628 = yyj3628 > l + var yyj3721 int + var yyb3721 bool + var yyhl3721 bool = l >= 0 + yyj3721++ + if yyhl3721 { + yyb3721 = yyj3721 > l } else { - yyb3628 = r.CheckBreak() + yyb3721 = r.CheckBreak() } - if yyb3628 { + if yyb3721 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44883,13 +46209,13 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } x.Capabilities.CodecDecodeSelf(d) } - yyj3628++ - if yyhl3628 { - yyb3628 = yyj3628 > l + yyj3721++ + if yyhl3721 { + yyb3721 = yyj3721 > l } else { - yyb3628 = r.CheckBreak() + yyb3721 = r.CheckBreak() } - if yyb3628 { + if yyb3721 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44902,20 +46228,20 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if x.Privileged == nil { x.Privileged = new(bool) } - yym3631 := z.DecBinary() - _ = yym3631 + yym3724 := z.DecBinary() + _ = yym3724 if false { } else { *((*bool)(x.Privileged)) = r.DecodeBool() } } - yyj3628++ - if yyhl3628 { - yyb3628 = yyj3628 > l + yyj3721++ + if yyhl3721 { + yyb3721 = yyj3721 > l } else { - yyb3628 = r.CheckBreak() + yyb3721 = r.CheckBreak() } - if yyb3628 { + if yyb3721 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44930,13 +46256,13 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } x.SELinuxOptions.CodecDecodeSelf(d) } - yyj3628++ - if yyhl3628 { - yyb3628 = yyj3628 > l + yyj3721++ + if yyhl3721 { + yyb3721 = yyj3721 > l } else { - yyb3628 = r.CheckBreak() + yyb3721 = r.CheckBreak() } - if yyb3628 { + if yyb3721 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44949,20 +46275,20 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if x.RunAsUser == nil { x.RunAsUser = new(int64) } - yym3634 := z.DecBinary() - _ = yym3634 + yym3727 := z.DecBinary() + _ = yym3727 if false { } else { *((*int64)(x.RunAsUser)) = int64(r.DecodeInt(64)) } } - yyj3628++ - if yyhl3628 { - yyb3628 = yyj3628 > l + yyj3721++ + if yyhl3721 { + yyb3721 = yyj3721 > l } else { - yyb3628 = r.CheckBreak() + yyb3721 = r.CheckBreak() } - if yyb3628 { + if yyb3721 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44975,25 +46301,25 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if x.RunAsNonRoot == nil { x.RunAsNonRoot = new(bool) } - yym3636 := z.DecBinary() - _ = yym3636 + yym3729 := z.DecBinary() + _ = yym3729 if false { } else { *((*bool)(x.RunAsNonRoot)) = r.DecodeBool() } } for { - yyj3628++ - if yyhl3628 { - yyb3628 = yyj3628 > l + yyj3721++ + if yyhl3721 { + yyb3721 = yyj3721 > l } else { - yyb3628 = r.CheckBreak() + yyb3721 = r.CheckBreak() } - if yyb3628 { + if yyb3721 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3628-1, "") + z.DecStructFieldNotFound(yyj3721-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -45005,38 +46331,38 @@ func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3637 := z.EncBinary() - _ = yym3637 + yym3730 := z.EncBinary() + _ = yym3730 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3638 := !z.EncBinary() - yy2arr3638 := z.EncBasicHandle().StructToArray - var yyq3638 [4]bool - _, _, _ = yysep3638, yyq3638, yy2arr3638 - const yyr3638 bool = false - yyq3638[0] = x.User != "" - yyq3638[1] = x.Role != "" - yyq3638[2] = x.Type != "" - yyq3638[3] = x.Level != "" - var yynn3638 int - if yyr3638 || yy2arr3638 { + yysep3731 := !z.EncBinary() + yy2arr3731 := z.EncBasicHandle().StructToArray + var yyq3731 [4]bool + _, _, _ = yysep3731, yyq3731, yy2arr3731 + const yyr3731 bool = false + yyq3731[0] = x.User != "" + yyq3731[1] = x.Role != "" + yyq3731[2] = x.Type != "" + yyq3731[3] = x.Level != "" + var yynn3731 int + if yyr3731 || yy2arr3731 { r.EncodeArrayStart(4) } else { - yynn3638 = 0 - for _, b := range yyq3638 { + yynn3731 = 0 + for _, b := range yyq3731 { if b { - yynn3638++ + yynn3731++ } } - r.EncodeMapStart(yynn3638) - yynn3638 = 0 + r.EncodeMapStart(yynn3731) + yynn3731 = 0 } - if yyr3638 || yy2arr3638 { + if yyr3731 || yy2arr3731 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3638[0] { - yym3640 := z.EncBinary() - _ = yym3640 + if yyq3731[0] { + yym3733 := z.EncBinary() + _ = yym3733 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.User)) @@ -45045,23 +46371,23 @@ func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3638[0] { + if yyq3731[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("user")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3641 := z.EncBinary() - _ = yym3641 + yym3734 := z.EncBinary() + _ = yym3734 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.User)) } } } - if yyr3638 || yy2arr3638 { + if yyr3731 || yy2arr3731 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3638[1] { - yym3643 := z.EncBinary() - _ = yym3643 + if yyq3731[1] { + yym3736 := z.EncBinary() + _ = yym3736 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Role)) @@ -45070,23 +46396,23 @@ func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3638[1] { + if yyq3731[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("role")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3644 := z.EncBinary() - _ = yym3644 + yym3737 := z.EncBinary() + _ = yym3737 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Role)) } } } - if yyr3638 || yy2arr3638 { + if yyr3731 || yy2arr3731 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3638[2] { - yym3646 := z.EncBinary() - _ = yym3646 + if yyq3731[2] { + yym3739 := z.EncBinary() + _ = yym3739 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Type)) @@ -45095,23 +46421,23 @@ func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3638[2] { + if yyq3731[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("type")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3647 := z.EncBinary() - _ = yym3647 + yym3740 := z.EncBinary() + _ = yym3740 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Type)) } } } - if yyr3638 || yy2arr3638 { + if yyr3731 || yy2arr3731 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3638[3] { - yym3649 := z.EncBinary() - _ = yym3649 + if yyq3731[3] { + yym3742 := z.EncBinary() + _ = yym3742 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Level)) @@ -45120,19 +46446,19 @@ func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3638[3] { + if yyq3731[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("level")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3650 := z.EncBinary() - _ = yym3650 + yym3743 := z.EncBinary() + _ = yym3743 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Level)) } } } - if yyr3638 || yy2arr3638 { + if yyr3731 || yy2arr3731 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -45145,25 +46471,25 @@ func (x *SELinuxOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3651 := z.DecBinary() - _ = yym3651 + yym3744 := z.DecBinary() + _ = yym3744 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3652 := r.ContainerType() - if yyct3652 == codecSelferValueTypeMap1234 { - yyl3652 := r.ReadMapStart() - if yyl3652 == 0 { + yyct3745 := r.ContainerType() + if yyct3745 == codecSelferValueTypeMap1234 { + yyl3745 := r.ReadMapStart() + if yyl3745 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3652, d) + x.codecDecodeSelfFromMap(yyl3745, d) } - } else if yyct3652 == codecSelferValueTypeArray1234 { - yyl3652 := r.ReadArrayStart() - if yyl3652 == 0 { + } else if yyct3745 == codecSelferValueTypeArray1234 { + yyl3745 := r.ReadArrayStart() + if yyl3745 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3652, d) + x.codecDecodeSelfFromArray(yyl3745, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -45175,12 +46501,12 @@ func (x *SELinuxOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3653Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3653Slc - var yyhl3653 bool = l >= 0 - for yyj3653 := 0; ; yyj3653++ { - if yyhl3653 { - if yyj3653 >= l { + var yys3746Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3746Slc + var yyhl3746 bool = l >= 0 + for yyj3746 := 0; ; yyj3746++ { + if yyhl3746 { + if yyj3746 >= l { break } } else { @@ -45189,10 +46515,10 @@ func (x *SELinuxOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3653Slc = r.DecodeBytes(yys3653Slc, true, true) - yys3653 := string(yys3653Slc) + yys3746Slc = r.DecodeBytes(yys3746Slc, true, true) + yys3746 := string(yys3746Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3653 { + switch yys3746 { case "user": if r.TryDecodeAsNil() { x.User = "" @@ -45218,9 +46544,9 @@ func (x *SELinuxOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Level = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3653) - } // end switch yys3653 - } // end for yyj3653 + z.DecStructFieldNotFound(-1, yys3746) + } // end switch yys3746 + } // end for yyj3746 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -45228,16 +46554,16 @@ func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3658 int - var yyb3658 bool - var yyhl3658 bool = l >= 0 - yyj3658++ - if yyhl3658 { - yyb3658 = yyj3658 > l + var yyj3751 int + var yyb3751 bool + var yyhl3751 bool = l >= 0 + yyj3751++ + if yyhl3751 { + yyb3751 = yyj3751 > l } else { - yyb3658 = r.CheckBreak() + yyb3751 = r.CheckBreak() } - if yyb3658 { + if yyb3751 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45247,13 +46573,13 @@ func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.User = string(r.DecodeString()) } - yyj3658++ - if yyhl3658 { - yyb3658 = yyj3658 > l + yyj3751++ + if yyhl3751 { + yyb3751 = yyj3751 > l } else { - yyb3658 = r.CheckBreak() + yyb3751 = r.CheckBreak() } - if yyb3658 { + if yyb3751 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45263,13 +46589,13 @@ func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Role = string(r.DecodeString()) } - yyj3658++ - if yyhl3658 { - yyb3658 = yyj3658 > l + yyj3751++ + if yyhl3751 { + yyb3751 = yyj3751 > l } else { - yyb3658 = r.CheckBreak() + yyb3751 = r.CheckBreak() } - if yyb3658 { + if yyb3751 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45279,13 +46605,13 @@ func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Type = string(r.DecodeString()) } - yyj3658++ - if yyhl3658 { - yyb3658 = yyj3658 > l + yyj3751++ + if yyhl3751 { + yyb3751 = yyj3751 > l } else { - yyb3658 = r.CheckBreak() + yyb3751 = r.CheckBreak() } - if yyb3658 { + if yyb3751 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45296,17 +46622,17 @@ func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Level = string(r.DecodeString()) } for { - yyj3658++ - if yyhl3658 { - yyb3658 = yyj3658 > l + yyj3751++ + if yyhl3751 { + yyb3751 = yyj3751 > l } else { - yyb3658 = r.CheckBreak() + yyb3751 = r.CheckBreak() } - if yyb3658 { + if yyb3751 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3658-1, "") + z.DecStructFieldNotFound(yyj3751-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -45318,37 +46644,37 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3663 := z.EncBinary() - _ = yym3663 + yym3756 := z.EncBinary() + _ = yym3756 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3664 := !z.EncBinary() - yy2arr3664 := z.EncBasicHandle().StructToArray - var yyq3664 [5]bool - _, _, _ = yysep3664, yyq3664, yy2arr3664 - const yyr3664 bool = false - yyq3664[0] = x.Kind != "" - yyq3664[1] = x.APIVersion != "" - yyq3664[2] = true - var yynn3664 int - if yyr3664 || yy2arr3664 { + yysep3757 := !z.EncBinary() + yy2arr3757 := z.EncBasicHandle().StructToArray + var yyq3757 [5]bool + _, _, _ = yysep3757, yyq3757, yy2arr3757 + const yyr3757 bool = false + yyq3757[0] = x.Kind != "" + yyq3757[1] = x.APIVersion != "" + yyq3757[2] = true + var yynn3757 int + if yyr3757 || yy2arr3757 { r.EncodeArrayStart(5) } else { - yynn3664 = 2 - for _, b := range yyq3664 { + yynn3757 = 2 + for _, b := range yyq3757 { if b { - yynn3664++ + yynn3757++ } } - r.EncodeMapStart(yynn3664) - yynn3664 = 0 + r.EncodeMapStart(yynn3757) + yynn3757 = 0 } - if yyr3664 || yy2arr3664 { + if yyr3757 || yy2arr3757 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3664[0] { - yym3666 := z.EncBinary() - _ = yym3666 + if yyq3757[0] { + yym3759 := z.EncBinary() + _ = yym3759 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -45357,23 +46683,23 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3664[0] { + if yyq3757[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3667 := z.EncBinary() - _ = yym3667 + yym3760 := z.EncBinary() + _ = yym3760 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3664 || yy2arr3664 { + if yyr3757 || yy2arr3757 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3664[1] { - yym3669 := z.EncBinary() - _ = yym3669 + if yyq3757[1] { + yym3762 := z.EncBinary() + _ = yym3762 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -45382,39 +46708,39 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3664[1] { + if yyq3757[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3670 := z.EncBinary() - _ = yym3670 + yym3763 := z.EncBinary() + _ = yym3763 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3664 || yy2arr3664 { + if yyr3757 || yy2arr3757 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3664[2] { - yy3672 := &x.ObjectMeta - yy3672.CodecEncodeSelf(e) + if yyq3757[2] { + yy3765 := &x.ObjectMeta + yy3765.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3664[2] { + if yyq3757[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3673 := &x.ObjectMeta - yy3673.CodecEncodeSelf(e) + yy3766 := &x.ObjectMeta + yy3766.CodecEncodeSelf(e) } } - if yyr3664 || yy2arr3664 { + if yyr3757 || yy2arr3757 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3675 := z.EncBinary() - _ = yym3675 + yym3768 := z.EncBinary() + _ = yym3768 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Range)) @@ -45423,20 +46749,20 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("range")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3676 := z.EncBinary() - _ = yym3676 + yym3769 := z.EncBinary() + _ = yym3769 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Range)) } } - if yyr3664 || yy2arr3664 { + if yyr3757 || yy2arr3757 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Data == nil { r.EncodeNil() } else { - yym3678 := z.EncBinary() - _ = yym3678 + yym3771 := z.EncBinary() + _ = yym3771 if false { } else { r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data)) @@ -45449,15 +46775,15 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { if x.Data == nil { r.EncodeNil() } else { - yym3679 := z.EncBinary() - _ = yym3679 + yym3772 := z.EncBinary() + _ = yym3772 if false { } else { r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data)) } } } - if yyr3664 || yy2arr3664 { + if yyr3757 || yy2arr3757 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -45470,25 +46796,25 @@ func (x *RangeAllocation) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3680 := z.DecBinary() - _ = yym3680 + yym3773 := z.DecBinary() + _ = yym3773 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3681 := r.ContainerType() - if yyct3681 == codecSelferValueTypeMap1234 { - yyl3681 := r.ReadMapStart() - if yyl3681 == 0 { + yyct3774 := r.ContainerType() + if yyct3774 == codecSelferValueTypeMap1234 { + yyl3774 := r.ReadMapStart() + if yyl3774 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3681, d) + x.codecDecodeSelfFromMap(yyl3774, d) } - } else if yyct3681 == codecSelferValueTypeArray1234 { - yyl3681 := r.ReadArrayStart() - if yyl3681 == 0 { + } else if yyct3774 == codecSelferValueTypeArray1234 { + yyl3774 := r.ReadArrayStart() + if yyl3774 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3681, d) + x.codecDecodeSelfFromArray(yyl3774, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -45500,12 +46826,12 @@ func (x *RangeAllocation) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3682Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3682Slc - var yyhl3682 bool = l >= 0 - for yyj3682 := 0; ; yyj3682++ { - if yyhl3682 { - if yyj3682 >= l { + var yys3775Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3775Slc + var yyhl3775 bool = l >= 0 + for yyj3775 := 0; ; yyj3775++ { + if yyhl3775 { + if yyj3775 >= l { break } } else { @@ -45514,10 +46840,10 @@ func (x *RangeAllocation) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3682Slc = r.DecodeBytes(yys3682Slc, true, true) - yys3682 := string(yys3682Slc) + yys3775Slc = r.DecodeBytes(yys3775Slc, true, true) + yys3775 := string(yys3775Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3682 { + switch yys3775 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -45534,8 +46860,8 @@ func (x *RangeAllocation) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3685 := &x.ObjectMeta - yyv3685.CodecDecodeSelf(d) + yyv3778 := &x.ObjectMeta + yyv3778.CodecDecodeSelf(d) } case "range": if r.TryDecodeAsNil() { @@ -45547,18 +46873,18 @@ func (x *RangeAllocation) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Data = nil } else { - yyv3687 := &x.Data - yym3688 := z.DecBinary() - _ = yym3688 + yyv3780 := &x.Data + yym3781 := z.DecBinary() + _ = yym3781 if false { } else { - *yyv3687 = r.DecodeBytes(*(*[]byte)(yyv3687), false, false) + *yyv3780 = r.DecodeBytes(*(*[]byte)(yyv3780), false, false) } } default: - z.DecStructFieldNotFound(-1, yys3682) - } // end switch yys3682 - } // end for yyj3682 + z.DecStructFieldNotFound(-1, yys3775) + } // end switch yys3775 + } // end for yyj3775 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -45566,16 +46892,16 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3689 int - var yyb3689 bool - var yyhl3689 bool = l >= 0 - yyj3689++ - if yyhl3689 { - yyb3689 = yyj3689 > l + var yyj3782 int + var yyb3782 bool + var yyhl3782 bool = l >= 0 + yyj3782++ + if yyhl3782 { + yyb3782 = yyj3782 > l } else { - yyb3689 = r.CheckBreak() + yyb3782 = r.CheckBreak() } - if yyb3689 { + if yyb3782 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45585,13 +46911,13 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Kind = string(r.DecodeString()) } - yyj3689++ - if yyhl3689 { - yyb3689 = yyj3689 > l + yyj3782++ + if yyhl3782 { + yyb3782 = yyj3782 > l } else { - yyb3689 = r.CheckBreak() + yyb3782 = r.CheckBreak() } - if yyb3689 { + if yyb3782 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45601,13 +46927,13 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.APIVersion = string(r.DecodeString()) } - yyj3689++ - if yyhl3689 { - yyb3689 = yyj3689 > l + yyj3782++ + if yyhl3782 { + yyb3782 = yyj3782 > l } else { - yyb3689 = r.CheckBreak() + yyb3782 = r.CheckBreak() } - if yyb3689 { + if yyb3782 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45615,16 +46941,16 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3692 := &x.ObjectMeta - yyv3692.CodecDecodeSelf(d) + yyv3785 := &x.ObjectMeta + yyv3785.CodecDecodeSelf(d) } - yyj3689++ - if yyhl3689 { - yyb3689 = yyj3689 > l + yyj3782++ + if yyhl3782 { + yyb3782 = yyj3782 > l } else { - yyb3689 = r.CheckBreak() + yyb3782 = r.CheckBreak() } - if yyb3689 { + if yyb3782 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45634,13 +46960,13 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Range = string(r.DecodeString()) } - yyj3689++ - if yyhl3689 { - yyb3689 = yyj3689 > l + yyj3782++ + if yyhl3782 { + yyb3782 = yyj3782 > l } else { - yyb3689 = r.CheckBreak() + yyb3782 = r.CheckBreak() } - if yyb3689 { + if yyb3782 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45648,26 +46974,26 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Data = nil } else { - yyv3694 := &x.Data - yym3695 := z.DecBinary() - _ = yym3695 + yyv3787 := &x.Data + yym3788 := z.DecBinary() + _ = yym3788 if false { } else { - *yyv3694 = r.DecodeBytes(*(*[]byte)(yyv3694), false, false) + *yyv3787 = r.DecodeBytes(*(*[]byte)(yyv3787), false, false) } } for { - yyj3689++ - if yyhl3689 { - yyb3689 = yyj3689 > l + yyj3782++ + if yyhl3782 { + yyb3782 = yyj3782 > l } else { - yyb3689 = r.CheckBreak() + yyb3782 = r.CheckBreak() } - if yyb3689 { + if yyb3782 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3689-1, "") + z.DecStructFieldNotFound(yyj3782-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -45677,9 +47003,9 @@ func (x codecSelfer1234) encSlicePersistentVolumeAccessMode(v []PersistentVolume z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3696 := range v { + for _, yyv3789 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yyv3696.CodecEncodeSelf(e) + yyv3789.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -45689,75 +47015,75 @@ func (x codecSelfer1234) decSlicePersistentVolumeAccessMode(v *[]PersistentVolum z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3697 := *v - yyh3697, yyl3697 := z.DecSliceHelperStart() - var yyc3697 bool - if yyl3697 == 0 { - if yyv3697 == nil { - yyv3697 = []PersistentVolumeAccessMode{} - yyc3697 = true - } else if len(yyv3697) != 0 { - yyv3697 = yyv3697[:0] - yyc3697 = true + yyv3790 := *v + yyh3790, yyl3790 := z.DecSliceHelperStart() + var yyc3790 bool + if yyl3790 == 0 { + if yyv3790 == nil { + yyv3790 = []PersistentVolumeAccessMode{} + yyc3790 = true + } else if len(yyv3790) != 0 { + yyv3790 = yyv3790[:0] + yyc3790 = true } - } else if yyl3697 > 0 { - var yyrr3697, yyrl3697 int - var yyrt3697 bool - if yyl3697 > cap(yyv3697) { + } else if yyl3790 > 0 { + var yyrr3790, yyrl3790 int + var yyrt3790 bool + if yyl3790 > cap(yyv3790) { - yyrl3697, yyrt3697 = z.DecInferLen(yyl3697, z.DecBasicHandle().MaxInitLen, 16) - if yyrt3697 { - if yyrl3697 <= cap(yyv3697) { - yyv3697 = yyv3697[:yyrl3697] + yyrl3790, yyrt3790 = z.DecInferLen(yyl3790, z.DecBasicHandle().MaxInitLen, 16) + if yyrt3790 { + if yyrl3790 <= cap(yyv3790) { + yyv3790 = yyv3790[:yyrl3790] } else { - yyv3697 = make([]PersistentVolumeAccessMode, yyrl3697) + yyv3790 = make([]PersistentVolumeAccessMode, yyrl3790) } } else { - yyv3697 = make([]PersistentVolumeAccessMode, yyrl3697) + yyv3790 = make([]PersistentVolumeAccessMode, yyrl3790) } - yyc3697 = true - yyrr3697 = len(yyv3697) - } else if yyl3697 != len(yyv3697) { - yyv3697 = yyv3697[:yyl3697] - yyc3697 = true + yyc3790 = true + yyrr3790 = len(yyv3790) + } else if yyl3790 != len(yyv3790) { + yyv3790 = yyv3790[:yyl3790] + yyc3790 = true } - yyj3697 := 0 - for ; yyj3697 < yyrr3697; yyj3697++ { - yyh3697.ElemContainerState(yyj3697) + yyj3790 := 0 + for ; yyj3790 < yyrr3790; yyj3790++ { + yyh3790.ElemContainerState(yyj3790) if r.TryDecodeAsNil() { - yyv3697[yyj3697] = "" + yyv3790[yyj3790] = "" } else { - yyv3697[yyj3697] = PersistentVolumeAccessMode(r.DecodeString()) + yyv3790[yyj3790] = PersistentVolumeAccessMode(r.DecodeString()) } } - if yyrt3697 { - for ; yyj3697 < yyl3697; yyj3697++ { - yyv3697 = append(yyv3697, "") - yyh3697.ElemContainerState(yyj3697) + if yyrt3790 { + for ; yyj3790 < yyl3790; yyj3790++ { + yyv3790 = append(yyv3790, "") + yyh3790.ElemContainerState(yyj3790) if r.TryDecodeAsNil() { - yyv3697[yyj3697] = "" + yyv3790[yyj3790] = "" } else { - yyv3697[yyj3697] = PersistentVolumeAccessMode(r.DecodeString()) + yyv3790[yyj3790] = PersistentVolumeAccessMode(r.DecodeString()) } } } } else { - yyj3697 := 0 - for ; !r.CheckBreak(); yyj3697++ { + yyj3790 := 0 + for ; !r.CheckBreak(); yyj3790++ { - if yyj3697 >= len(yyv3697) { - yyv3697 = append(yyv3697, "") // var yyz3697 PersistentVolumeAccessMode - yyc3697 = true + if yyj3790 >= len(yyv3790) { + yyv3790 = append(yyv3790, "") // var yyz3790 PersistentVolumeAccessMode + yyc3790 = true } - yyh3697.ElemContainerState(yyj3697) - if yyj3697 < len(yyv3697) { + yyh3790.ElemContainerState(yyj3790) + if yyj3790 < len(yyv3790) { if r.TryDecodeAsNil() { - yyv3697[yyj3697] = "" + yyv3790[yyj3790] = "" } else { - yyv3697[yyj3697] = PersistentVolumeAccessMode(r.DecodeString()) + yyv3790[yyj3790] = PersistentVolumeAccessMode(r.DecodeString()) } } else { @@ -45765,17 +47091,17 @@ func (x codecSelfer1234) decSlicePersistentVolumeAccessMode(v *[]PersistentVolum } } - if yyj3697 < len(yyv3697) { - yyv3697 = yyv3697[:yyj3697] - yyc3697 = true - } else if yyj3697 == 0 && yyv3697 == nil { - yyv3697 = []PersistentVolumeAccessMode{} - yyc3697 = true + if yyj3790 < len(yyv3790) { + yyv3790 = yyv3790[:yyj3790] + yyc3790 = true + } else if yyj3790 == 0 && yyv3790 == nil { + yyv3790 = []PersistentVolumeAccessMode{} + yyc3790 = true } } - yyh3697.End() - if yyc3697 { - *v = yyv3697 + yyh3790.End() + if yyc3790 { + *v = yyv3790 } } @@ -45784,10 +47110,10 @@ func (x codecSelfer1234) encSlicePersistentVolume(v []PersistentVolume, e *codec z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3701 := range v { + for _, yyv3794 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3702 := &yyv3701 - yy3702.CodecEncodeSelf(e) + yy3795 := &yyv3794 + yy3795.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -45797,83 +47123,83 @@ func (x codecSelfer1234) decSlicePersistentVolume(v *[]PersistentVolume, d *code z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3703 := *v - yyh3703, yyl3703 := z.DecSliceHelperStart() - var yyc3703 bool - if yyl3703 == 0 { - if yyv3703 == nil { - yyv3703 = []PersistentVolume{} - yyc3703 = true - } else if len(yyv3703) != 0 { - yyv3703 = yyv3703[:0] - yyc3703 = true + yyv3796 := *v + yyh3796, yyl3796 := z.DecSliceHelperStart() + var yyc3796 bool + if yyl3796 == 0 { + if yyv3796 == nil { + yyv3796 = []PersistentVolume{} + yyc3796 = true + } else if len(yyv3796) != 0 { + yyv3796 = yyv3796[:0] + yyc3796 = true } - } else if yyl3703 > 0 { - var yyrr3703, yyrl3703 int - var yyrt3703 bool - if yyl3703 > cap(yyv3703) { + } else if yyl3796 > 0 { + var yyrr3796, yyrl3796 int + var yyrt3796 bool + if yyl3796 > cap(yyv3796) { - yyrg3703 := len(yyv3703) > 0 - yyv23703 := yyv3703 - yyrl3703, yyrt3703 = z.DecInferLen(yyl3703, z.DecBasicHandle().MaxInitLen, 392) - if yyrt3703 { - if yyrl3703 <= cap(yyv3703) { - yyv3703 = yyv3703[:yyrl3703] + yyrg3796 := len(yyv3796) > 0 + yyv23796 := yyv3796 + yyrl3796, yyrt3796 = z.DecInferLen(yyl3796, z.DecBasicHandle().MaxInitLen, 392) + if yyrt3796 { + if yyrl3796 <= cap(yyv3796) { + yyv3796 = yyv3796[:yyrl3796] } else { - yyv3703 = make([]PersistentVolume, yyrl3703) + yyv3796 = make([]PersistentVolume, yyrl3796) } } else { - yyv3703 = make([]PersistentVolume, yyrl3703) + yyv3796 = make([]PersistentVolume, yyrl3796) } - yyc3703 = true - yyrr3703 = len(yyv3703) - if yyrg3703 { - copy(yyv3703, yyv23703) + yyc3796 = true + yyrr3796 = len(yyv3796) + if yyrg3796 { + copy(yyv3796, yyv23796) } - } else if yyl3703 != len(yyv3703) { - yyv3703 = yyv3703[:yyl3703] - yyc3703 = true + } else if yyl3796 != len(yyv3796) { + yyv3796 = yyv3796[:yyl3796] + yyc3796 = true } - yyj3703 := 0 - for ; yyj3703 < yyrr3703; yyj3703++ { - yyh3703.ElemContainerState(yyj3703) + yyj3796 := 0 + for ; yyj3796 < yyrr3796; yyj3796++ { + yyh3796.ElemContainerState(yyj3796) if r.TryDecodeAsNil() { - yyv3703[yyj3703] = PersistentVolume{} + yyv3796[yyj3796] = PersistentVolume{} } else { - yyv3704 := &yyv3703[yyj3703] - yyv3704.CodecDecodeSelf(d) + yyv3797 := &yyv3796[yyj3796] + yyv3797.CodecDecodeSelf(d) } } - if yyrt3703 { - for ; yyj3703 < yyl3703; yyj3703++ { - yyv3703 = append(yyv3703, PersistentVolume{}) - yyh3703.ElemContainerState(yyj3703) + if yyrt3796 { + for ; yyj3796 < yyl3796; yyj3796++ { + yyv3796 = append(yyv3796, PersistentVolume{}) + yyh3796.ElemContainerState(yyj3796) if r.TryDecodeAsNil() { - yyv3703[yyj3703] = PersistentVolume{} + yyv3796[yyj3796] = PersistentVolume{} } else { - yyv3705 := &yyv3703[yyj3703] - yyv3705.CodecDecodeSelf(d) + yyv3798 := &yyv3796[yyj3796] + yyv3798.CodecDecodeSelf(d) } } } } else { - yyj3703 := 0 - for ; !r.CheckBreak(); yyj3703++ { + yyj3796 := 0 + for ; !r.CheckBreak(); yyj3796++ { - if yyj3703 >= len(yyv3703) { - yyv3703 = append(yyv3703, PersistentVolume{}) // var yyz3703 PersistentVolume - yyc3703 = true + if yyj3796 >= len(yyv3796) { + yyv3796 = append(yyv3796, PersistentVolume{}) // var yyz3796 PersistentVolume + yyc3796 = true } - yyh3703.ElemContainerState(yyj3703) - if yyj3703 < len(yyv3703) { + yyh3796.ElemContainerState(yyj3796) + if yyj3796 < len(yyv3796) { if r.TryDecodeAsNil() { - yyv3703[yyj3703] = PersistentVolume{} + yyv3796[yyj3796] = PersistentVolume{} } else { - yyv3706 := &yyv3703[yyj3703] - yyv3706.CodecDecodeSelf(d) + yyv3799 := &yyv3796[yyj3796] + yyv3799.CodecDecodeSelf(d) } } else { @@ -45881,17 +47207,17 @@ func (x codecSelfer1234) decSlicePersistentVolume(v *[]PersistentVolume, d *code } } - if yyj3703 < len(yyv3703) { - yyv3703 = yyv3703[:yyj3703] - yyc3703 = true - } else if yyj3703 == 0 && yyv3703 == nil { - yyv3703 = []PersistentVolume{} - yyc3703 = true + if yyj3796 < len(yyv3796) { + yyv3796 = yyv3796[:yyj3796] + yyc3796 = true + } else if yyj3796 == 0 && yyv3796 == nil { + yyv3796 = []PersistentVolume{} + yyc3796 = true } } - yyh3703.End() - if yyc3703 { - *v = yyv3703 + yyh3796.End() + if yyc3796 { + *v = yyv3796 } } @@ -45900,10 +47226,10 @@ func (x codecSelfer1234) encSlicePersistentVolumeClaim(v []PersistentVolumeClaim z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3707 := range v { + for _, yyv3800 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3708 := &yyv3707 - yy3708.CodecEncodeSelf(e) + yy3801 := &yyv3800 + yy3801.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -45913,83 +47239,83 @@ func (x codecSelfer1234) decSlicePersistentVolumeClaim(v *[]PersistentVolumeClai z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3709 := *v - yyh3709, yyl3709 := z.DecSliceHelperStart() - var yyc3709 bool - if yyl3709 == 0 { - if yyv3709 == nil { - yyv3709 = []PersistentVolumeClaim{} - yyc3709 = true - } else if len(yyv3709) != 0 { - yyv3709 = yyv3709[:0] - yyc3709 = true + yyv3802 := *v + yyh3802, yyl3802 := z.DecSliceHelperStart() + var yyc3802 bool + if yyl3802 == 0 { + if yyv3802 == nil { + yyv3802 = []PersistentVolumeClaim{} + yyc3802 = true + } else if len(yyv3802) != 0 { + yyv3802 = yyv3802[:0] + yyc3802 = true } - } else if yyl3709 > 0 { - var yyrr3709, yyrl3709 int - var yyrt3709 bool - if yyl3709 > cap(yyv3709) { + } else if yyl3802 > 0 { + var yyrr3802, yyrl3802 int + var yyrt3802 bool + if yyl3802 > cap(yyv3802) { - yyrg3709 := len(yyv3709) > 0 - yyv23709 := yyv3709 - yyrl3709, yyrt3709 = z.DecInferLen(yyl3709, z.DecBasicHandle().MaxInitLen, 296) - if yyrt3709 { - if yyrl3709 <= cap(yyv3709) { - yyv3709 = yyv3709[:yyrl3709] + yyrg3802 := len(yyv3802) > 0 + yyv23802 := yyv3802 + yyrl3802, yyrt3802 = z.DecInferLen(yyl3802, z.DecBasicHandle().MaxInitLen, 296) + if yyrt3802 { + if yyrl3802 <= cap(yyv3802) { + yyv3802 = yyv3802[:yyrl3802] } else { - yyv3709 = make([]PersistentVolumeClaim, yyrl3709) + yyv3802 = make([]PersistentVolumeClaim, yyrl3802) } } else { - yyv3709 = make([]PersistentVolumeClaim, yyrl3709) + yyv3802 = make([]PersistentVolumeClaim, yyrl3802) } - yyc3709 = true - yyrr3709 = len(yyv3709) - if yyrg3709 { - copy(yyv3709, yyv23709) + yyc3802 = true + yyrr3802 = len(yyv3802) + if yyrg3802 { + copy(yyv3802, yyv23802) } - } else if yyl3709 != len(yyv3709) { - yyv3709 = yyv3709[:yyl3709] - yyc3709 = true + } else if yyl3802 != len(yyv3802) { + yyv3802 = yyv3802[:yyl3802] + yyc3802 = true } - yyj3709 := 0 - for ; yyj3709 < yyrr3709; yyj3709++ { - yyh3709.ElemContainerState(yyj3709) + yyj3802 := 0 + for ; yyj3802 < yyrr3802; yyj3802++ { + yyh3802.ElemContainerState(yyj3802) if r.TryDecodeAsNil() { - yyv3709[yyj3709] = PersistentVolumeClaim{} + yyv3802[yyj3802] = PersistentVolumeClaim{} } else { - yyv3710 := &yyv3709[yyj3709] - yyv3710.CodecDecodeSelf(d) + yyv3803 := &yyv3802[yyj3802] + yyv3803.CodecDecodeSelf(d) } } - if yyrt3709 { - for ; yyj3709 < yyl3709; yyj3709++ { - yyv3709 = append(yyv3709, PersistentVolumeClaim{}) - yyh3709.ElemContainerState(yyj3709) + if yyrt3802 { + for ; yyj3802 < yyl3802; yyj3802++ { + yyv3802 = append(yyv3802, PersistentVolumeClaim{}) + yyh3802.ElemContainerState(yyj3802) if r.TryDecodeAsNil() { - yyv3709[yyj3709] = PersistentVolumeClaim{} + yyv3802[yyj3802] = PersistentVolumeClaim{} } else { - yyv3711 := &yyv3709[yyj3709] - yyv3711.CodecDecodeSelf(d) + yyv3804 := &yyv3802[yyj3802] + yyv3804.CodecDecodeSelf(d) } } } } else { - yyj3709 := 0 - for ; !r.CheckBreak(); yyj3709++ { + yyj3802 := 0 + for ; !r.CheckBreak(); yyj3802++ { - if yyj3709 >= len(yyv3709) { - yyv3709 = append(yyv3709, PersistentVolumeClaim{}) // var yyz3709 PersistentVolumeClaim - yyc3709 = true + if yyj3802 >= len(yyv3802) { + yyv3802 = append(yyv3802, PersistentVolumeClaim{}) // var yyz3802 PersistentVolumeClaim + yyc3802 = true } - yyh3709.ElemContainerState(yyj3709) - if yyj3709 < len(yyv3709) { + yyh3802.ElemContainerState(yyj3802) + if yyj3802 < len(yyv3802) { if r.TryDecodeAsNil() { - yyv3709[yyj3709] = PersistentVolumeClaim{} + yyv3802[yyj3802] = PersistentVolumeClaim{} } else { - yyv3712 := &yyv3709[yyj3709] - yyv3712.CodecDecodeSelf(d) + yyv3805 := &yyv3802[yyj3802] + yyv3805.CodecDecodeSelf(d) } } else { @@ -45997,17 +47323,17 @@ func (x codecSelfer1234) decSlicePersistentVolumeClaim(v *[]PersistentVolumeClai } } - if yyj3709 < len(yyv3709) { - yyv3709 = yyv3709[:yyj3709] - yyc3709 = true - } else if yyj3709 == 0 && yyv3709 == nil { - yyv3709 = []PersistentVolumeClaim{} - yyc3709 = true + if yyj3802 < len(yyv3802) { + yyv3802 = yyv3802[:yyj3802] + yyc3802 = true + } else if yyj3802 == 0 && yyv3802 == nil { + yyv3802 = []PersistentVolumeClaim{} + yyc3802 = true } } - yyh3709.End() - if yyc3709 { - *v = yyv3709 + yyh3802.End() + if yyc3802 { + *v = yyv3802 } } @@ -46016,10 +47342,10 @@ func (x codecSelfer1234) encSliceDownwardAPIVolumeFile(v []DownwardAPIVolumeFile z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3713 := range v { + for _, yyv3806 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3714 := &yyv3713 - yy3714.CodecEncodeSelf(e) + yy3807 := &yyv3806 + yy3807.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46029,83 +47355,83 @@ func (x codecSelfer1234) decSliceDownwardAPIVolumeFile(v *[]DownwardAPIVolumeFil z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3715 := *v - yyh3715, yyl3715 := z.DecSliceHelperStart() - var yyc3715 bool - if yyl3715 == 0 { - if yyv3715 == nil { - yyv3715 = []DownwardAPIVolumeFile{} - yyc3715 = true - } else if len(yyv3715) != 0 { - yyv3715 = yyv3715[:0] - yyc3715 = true + yyv3808 := *v + yyh3808, yyl3808 := z.DecSliceHelperStart() + var yyc3808 bool + if yyl3808 == 0 { + if yyv3808 == nil { + yyv3808 = []DownwardAPIVolumeFile{} + yyc3808 = true + } else if len(yyv3808) != 0 { + yyv3808 = yyv3808[:0] + yyc3808 = true } - } else if yyl3715 > 0 { - var yyrr3715, yyrl3715 int - var yyrt3715 bool - if yyl3715 > cap(yyv3715) { + } else if yyl3808 > 0 { + var yyrr3808, yyrl3808 int + var yyrt3808 bool + if yyl3808 > cap(yyv3808) { - yyrg3715 := len(yyv3715) > 0 - yyv23715 := yyv3715 - yyrl3715, yyrt3715 = z.DecInferLen(yyl3715, z.DecBasicHandle().MaxInitLen, 48) - if yyrt3715 { - if yyrl3715 <= cap(yyv3715) { - yyv3715 = yyv3715[:yyrl3715] + yyrg3808 := len(yyv3808) > 0 + yyv23808 := yyv3808 + yyrl3808, yyrt3808 = z.DecInferLen(yyl3808, z.DecBasicHandle().MaxInitLen, 48) + if yyrt3808 { + if yyrl3808 <= cap(yyv3808) { + yyv3808 = yyv3808[:yyrl3808] } else { - yyv3715 = make([]DownwardAPIVolumeFile, yyrl3715) + yyv3808 = make([]DownwardAPIVolumeFile, yyrl3808) } } else { - yyv3715 = make([]DownwardAPIVolumeFile, yyrl3715) + yyv3808 = make([]DownwardAPIVolumeFile, yyrl3808) } - yyc3715 = true - yyrr3715 = len(yyv3715) - if yyrg3715 { - copy(yyv3715, yyv23715) + yyc3808 = true + yyrr3808 = len(yyv3808) + if yyrg3808 { + copy(yyv3808, yyv23808) } - } else if yyl3715 != len(yyv3715) { - yyv3715 = yyv3715[:yyl3715] - yyc3715 = true + } else if yyl3808 != len(yyv3808) { + yyv3808 = yyv3808[:yyl3808] + yyc3808 = true } - yyj3715 := 0 - for ; yyj3715 < yyrr3715; yyj3715++ { - yyh3715.ElemContainerState(yyj3715) + yyj3808 := 0 + for ; yyj3808 < yyrr3808; yyj3808++ { + yyh3808.ElemContainerState(yyj3808) if r.TryDecodeAsNil() { - yyv3715[yyj3715] = DownwardAPIVolumeFile{} + yyv3808[yyj3808] = DownwardAPIVolumeFile{} } else { - yyv3716 := &yyv3715[yyj3715] - yyv3716.CodecDecodeSelf(d) + yyv3809 := &yyv3808[yyj3808] + yyv3809.CodecDecodeSelf(d) } } - if yyrt3715 { - for ; yyj3715 < yyl3715; yyj3715++ { - yyv3715 = append(yyv3715, DownwardAPIVolumeFile{}) - yyh3715.ElemContainerState(yyj3715) + if yyrt3808 { + for ; yyj3808 < yyl3808; yyj3808++ { + yyv3808 = append(yyv3808, DownwardAPIVolumeFile{}) + yyh3808.ElemContainerState(yyj3808) if r.TryDecodeAsNil() { - yyv3715[yyj3715] = DownwardAPIVolumeFile{} + yyv3808[yyj3808] = DownwardAPIVolumeFile{} } else { - yyv3717 := &yyv3715[yyj3715] - yyv3717.CodecDecodeSelf(d) + yyv3810 := &yyv3808[yyj3808] + yyv3810.CodecDecodeSelf(d) } } } } else { - yyj3715 := 0 - for ; !r.CheckBreak(); yyj3715++ { + yyj3808 := 0 + for ; !r.CheckBreak(); yyj3808++ { - if yyj3715 >= len(yyv3715) { - yyv3715 = append(yyv3715, DownwardAPIVolumeFile{}) // var yyz3715 DownwardAPIVolumeFile - yyc3715 = true + if yyj3808 >= len(yyv3808) { + yyv3808 = append(yyv3808, DownwardAPIVolumeFile{}) // var yyz3808 DownwardAPIVolumeFile + yyc3808 = true } - yyh3715.ElemContainerState(yyj3715) - if yyj3715 < len(yyv3715) { + yyh3808.ElemContainerState(yyj3808) + if yyj3808 < len(yyv3808) { if r.TryDecodeAsNil() { - yyv3715[yyj3715] = DownwardAPIVolumeFile{} + yyv3808[yyj3808] = DownwardAPIVolumeFile{} } else { - yyv3718 := &yyv3715[yyj3715] - yyv3718.CodecDecodeSelf(d) + yyv3811 := &yyv3808[yyj3808] + yyv3811.CodecDecodeSelf(d) } } else { @@ -46113,17 +47439,17 @@ func (x codecSelfer1234) decSliceDownwardAPIVolumeFile(v *[]DownwardAPIVolumeFil } } - if yyj3715 < len(yyv3715) { - yyv3715 = yyv3715[:yyj3715] - yyc3715 = true - } else if yyj3715 == 0 && yyv3715 == nil { - yyv3715 = []DownwardAPIVolumeFile{} - yyc3715 = true + if yyj3808 < len(yyv3808) { + yyv3808 = yyv3808[:yyj3808] + yyc3808 = true + } else if yyj3808 == 0 && yyv3808 == nil { + yyv3808 = []DownwardAPIVolumeFile{} + yyc3808 = true } } - yyh3715.End() - if yyc3715 { - *v = yyv3715 + yyh3808.End() + if yyc3808 { + *v = yyv3808 } } @@ -46132,9 +47458,9 @@ func (x codecSelfer1234) encSliceCapability(v []Capability, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3719 := range v { + for _, yyv3812 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yyv3719.CodecEncodeSelf(e) + yyv3812.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46144,75 +47470,75 @@ func (x codecSelfer1234) decSliceCapability(v *[]Capability, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3720 := *v - yyh3720, yyl3720 := z.DecSliceHelperStart() - var yyc3720 bool - if yyl3720 == 0 { - if yyv3720 == nil { - yyv3720 = []Capability{} - yyc3720 = true - } else if len(yyv3720) != 0 { - yyv3720 = yyv3720[:0] - yyc3720 = true + yyv3813 := *v + yyh3813, yyl3813 := z.DecSliceHelperStart() + var yyc3813 bool + if yyl3813 == 0 { + if yyv3813 == nil { + yyv3813 = []Capability{} + yyc3813 = true + } else if len(yyv3813) != 0 { + yyv3813 = yyv3813[:0] + yyc3813 = true } - } else if yyl3720 > 0 { - var yyrr3720, yyrl3720 int - var yyrt3720 bool - if yyl3720 > cap(yyv3720) { + } else if yyl3813 > 0 { + var yyrr3813, yyrl3813 int + var yyrt3813 bool + if yyl3813 > cap(yyv3813) { - yyrl3720, yyrt3720 = z.DecInferLen(yyl3720, z.DecBasicHandle().MaxInitLen, 16) - if yyrt3720 { - if yyrl3720 <= cap(yyv3720) { - yyv3720 = yyv3720[:yyrl3720] + yyrl3813, yyrt3813 = z.DecInferLen(yyl3813, z.DecBasicHandle().MaxInitLen, 16) + if yyrt3813 { + if yyrl3813 <= cap(yyv3813) { + yyv3813 = yyv3813[:yyrl3813] } else { - yyv3720 = make([]Capability, yyrl3720) + yyv3813 = make([]Capability, yyrl3813) } } else { - yyv3720 = make([]Capability, yyrl3720) + yyv3813 = make([]Capability, yyrl3813) } - yyc3720 = true - yyrr3720 = len(yyv3720) - } else if yyl3720 != len(yyv3720) { - yyv3720 = yyv3720[:yyl3720] - yyc3720 = true + yyc3813 = true + yyrr3813 = len(yyv3813) + } else if yyl3813 != len(yyv3813) { + yyv3813 = yyv3813[:yyl3813] + yyc3813 = true } - yyj3720 := 0 - for ; yyj3720 < yyrr3720; yyj3720++ { - yyh3720.ElemContainerState(yyj3720) + yyj3813 := 0 + for ; yyj3813 < yyrr3813; yyj3813++ { + yyh3813.ElemContainerState(yyj3813) if r.TryDecodeAsNil() { - yyv3720[yyj3720] = "" + yyv3813[yyj3813] = "" } else { - yyv3720[yyj3720] = Capability(r.DecodeString()) + yyv3813[yyj3813] = Capability(r.DecodeString()) } } - if yyrt3720 { - for ; yyj3720 < yyl3720; yyj3720++ { - yyv3720 = append(yyv3720, "") - yyh3720.ElemContainerState(yyj3720) + if yyrt3813 { + for ; yyj3813 < yyl3813; yyj3813++ { + yyv3813 = append(yyv3813, "") + yyh3813.ElemContainerState(yyj3813) if r.TryDecodeAsNil() { - yyv3720[yyj3720] = "" + yyv3813[yyj3813] = "" } else { - yyv3720[yyj3720] = Capability(r.DecodeString()) + yyv3813[yyj3813] = Capability(r.DecodeString()) } } } } else { - yyj3720 := 0 - for ; !r.CheckBreak(); yyj3720++ { + yyj3813 := 0 + for ; !r.CheckBreak(); yyj3813++ { - if yyj3720 >= len(yyv3720) { - yyv3720 = append(yyv3720, "") // var yyz3720 Capability - yyc3720 = true + if yyj3813 >= len(yyv3813) { + yyv3813 = append(yyv3813, "") // var yyz3813 Capability + yyc3813 = true } - yyh3720.ElemContainerState(yyj3720) - if yyj3720 < len(yyv3720) { + yyh3813.ElemContainerState(yyj3813) + if yyj3813 < len(yyv3813) { if r.TryDecodeAsNil() { - yyv3720[yyj3720] = "" + yyv3813[yyj3813] = "" } else { - yyv3720[yyj3720] = Capability(r.DecodeString()) + yyv3813[yyj3813] = Capability(r.DecodeString()) } } else { @@ -46220,17 +47546,17 @@ func (x codecSelfer1234) decSliceCapability(v *[]Capability, d *codec1978.Decode } } - if yyj3720 < len(yyv3720) { - yyv3720 = yyv3720[:yyj3720] - yyc3720 = true - } else if yyj3720 == 0 && yyv3720 == nil { - yyv3720 = []Capability{} - yyc3720 = true + if yyj3813 < len(yyv3813) { + yyv3813 = yyv3813[:yyj3813] + yyc3813 = true + } else if yyj3813 == 0 && yyv3813 == nil { + yyv3813 = []Capability{} + yyc3813 = true } } - yyh3720.End() - if yyc3720 { - *v = yyv3720 + yyh3813.End() + if yyc3813 { + *v = yyv3813 } } @@ -46239,10 +47565,10 @@ func (x codecSelfer1234) encSliceContainerPort(v []ContainerPort, e *codec1978.E z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3724 := range v { + for _, yyv3817 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3725 := &yyv3724 - yy3725.CodecEncodeSelf(e) + yy3818 := &yyv3817 + yy3818.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46252,83 +47578,83 @@ func (x codecSelfer1234) decSliceContainerPort(v *[]ContainerPort, d *codec1978. z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3726 := *v - yyh3726, yyl3726 := z.DecSliceHelperStart() - var yyc3726 bool - if yyl3726 == 0 { - if yyv3726 == nil { - yyv3726 = []ContainerPort{} - yyc3726 = true - } else if len(yyv3726) != 0 { - yyv3726 = yyv3726[:0] - yyc3726 = true + yyv3819 := *v + yyh3819, yyl3819 := z.DecSliceHelperStart() + var yyc3819 bool + if yyl3819 == 0 { + if yyv3819 == nil { + yyv3819 = []ContainerPort{} + yyc3819 = true + } else if len(yyv3819) != 0 { + yyv3819 = yyv3819[:0] + yyc3819 = true } - } else if yyl3726 > 0 { - var yyrr3726, yyrl3726 int - var yyrt3726 bool - if yyl3726 > cap(yyv3726) { + } else if yyl3819 > 0 { + var yyrr3819, yyrl3819 int + var yyrt3819 bool + if yyl3819 > cap(yyv3819) { - yyrg3726 := len(yyv3726) > 0 - yyv23726 := yyv3726 - yyrl3726, yyrt3726 = z.DecInferLen(yyl3726, z.DecBasicHandle().MaxInitLen, 64) - if yyrt3726 { - if yyrl3726 <= cap(yyv3726) { - yyv3726 = yyv3726[:yyrl3726] + yyrg3819 := len(yyv3819) > 0 + yyv23819 := yyv3819 + yyrl3819, yyrt3819 = z.DecInferLen(yyl3819, z.DecBasicHandle().MaxInitLen, 64) + if yyrt3819 { + if yyrl3819 <= cap(yyv3819) { + yyv3819 = yyv3819[:yyrl3819] } else { - yyv3726 = make([]ContainerPort, yyrl3726) + yyv3819 = make([]ContainerPort, yyrl3819) } } else { - yyv3726 = make([]ContainerPort, yyrl3726) + yyv3819 = make([]ContainerPort, yyrl3819) } - yyc3726 = true - yyrr3726 = len(yyv3726) - if yyrg3726 { - copy(yyv3726, yyv23726) + yyc3819 = true + yyrr3819 = len(yyv3819) + if yyrg3819 { + copy(yyv3819, yyv23819) } - } else if yyl3726 != len(yyv3726) { - yyv3726 = yyv3726[:yyl3726] - yyc3726 = true + } else if yyl3819 != len(yyv3819) { + yyv3819 = yyv3819[:yyl3819] + yyc3819 = true } - yyj3726 := 0 - for ; yyj3726 < yyrr3726; yyj3726++ { - yyh3726.ElemContainerState(yyj3726) + yyj3819 := 0 + for ; yyj3819 < yyrr3819; yyj3819++ { + yyh3819.ElemContainerState(yyj3819) if r.TryDecodeAsNil() { - yyv3726[yyj3726] = ContainerPort{} + yyv3819[yyj3819] = ContainerPort{} } else { - yyv3727 := &yyv3726[yyj3726] - yyv3727.CodecDecodeSelf(d) + yyv3820 := &yyv3819[yyj3819] + yyv3820.CodecDecodeSelf(d) } } - if yyrt3726 { - for ; yyj3726 < yyl3726; yyj3726++ { - yyv3726 = append(yyv3726, ContainerPort{}) - yyh3726.ElemContainerState(yyj3726) + if yyrt3819 { + for ; yyj3819 < yyl3819; yyj3819++ { + yyv3819 = append(yyv3819, ContainerPort{}) + yyh3819.ElemContainerState(yyj3819) if r.TryDecodeAsNil() { - yyv3726[yyj3726] = ContainerPort{} + yyv3819[yyj3819] = ContainerPort{} } else { - yyv3728 := &yyv3726[yyj3726] - yyv3728.CodecDecodeSelf(d) + yyv3821 := &yyv3819[yyj3819] + yyv3821.CodecDecodeSelf(d) } } } } else { - yyj3726 := 0 - for ; !r.CheckBreak(); yyj3726++ { + yyj3819 := 0 + for ; !r.CheckBreak(); yyj3819++ { - if yyj3726 >= len(yyv3726) { - yyv3726 = append(yyv3726, ContainerPort{}) // var yyz3726 ContainerPort - yyc3726 = true + if yyj3819 >= len(yyv3819) { + yyv3819 = append(yyv3819, ContainerPort{}) // var yyz3819 ContainerPort + yyc3819 = true } - yyh3726.ElemContainerState(yyj3726) - if yyj3726 < len(yyv3726) { + yyh3819.ElemContainerState(yyj3819) + if yyj3819 < len(yyv3819) { if r.TryDecodeAsNil() { - yyv3726[yyj3726] = ContainerPort{} + yyv3819[yyj3819] = ContainerPort{} } else { - yyv3729 := &yyv3726[yyj3726] - yyv3729.CodecDecodeSelf(d) + yyv3822 := &yyv3819[yyj3819] + yyv3822.CodecDecodeSelf(d) } } else { @@ -46336,17 +47662,17 @@ func (x codecSelfer1234) decSliceContainerPort(v *[]ContainerPort, d *codec1978. } } - if yyj3726 < len(yyv3726) { - yyv3726 = yyv3726[:yyj3726] - yyc3726 = true - } else if yyj3726 == 0 && yyv3726 == nil { - yyv3726 = []ContainerPort{} - yyc3726 = true + if yyj3819 < len(yyv3819) { + yyv3819 = yyv3819[:yyj3819] + yyc3819 = true + } else if yyj3819 == 0 && yyv3819 == nil { + yyv3819 = []ContainerPort{} + yyc3819 = true } } - yyh3726.End() - if yyc3726 { - *v = yyv3726 + yyh3819.End() + if yyc3819 { + *v = yyv3819 } } @@ -46355,10 +47681,10 @@ func (x codecSelfer1234) encSliceEnvVar(v []EnvVar, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3730 := range v { + for _, yyv3823 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3731 := &yyv3730 - yy3731.CodecEncodeSelf(e) + yy3824 := &yyv3823 + yy3824.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46368,83 +47694,83 @@ func (x codecSelfer1234) decSliceEnvVar(v *[]EnvVar, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3732 := *v - yyh3732, yyl3732 := z.DecSliceHelperStart() - var yyc3732 bool - if yyl3732 == 0 { - if yyv3732 == nil { - yyv3732 = []EnvVar{} - yyc3732 = true - } else if len(yyv3732) != 0 { - yyv3732 = yyv3732[:0] - yyc3732 = true + yyv3825 := *v + yyh3825, yyl3825 := z.DecSliceHelperStart() + var yyc3825 bool + if yyl3825 == 0 { + if yyv3825 == nil { + yyv3825 = []EnvVar{} + yyc3825 = true + } else if len(yyv3825) != 0 { + yyv3825 = yyv3825[:0] + yyc3825 = true } - } else if yyl3732 > 0 { - var yyrr3732, yyrl3732 int - var yyrt3732 bool - if yyl3732 > cap(yyv3732) { + } else if yyl3825 > 0 { + var yyrr3825, yyrl3825 int + var yyrt3825 bool + if yyl3825 > cap(yyv3825) { - yyrg3732 := len(yyv3732) > 0 - yyv23732 := yyv3732 - yyrl3732, yyrt3732 = z.DecInferLen(yyl3732, z.DecBasicHandle().MaxInitLen, 40) - if yyrt3732 { - if yyrl3732 <= cap(yyv3732) { - yyv3732 = yyv3732[:yyrl3732] + yyrg3825 := len(yyv3825) > 0 + yyv23825 := yyv3825 + yyrl3825, yyrt3825 = z.DecInferLen(yyl3825, z.DecBasicHandle().MaxInitLen, 40) + if yyrt3825 { + if yyrl3825 <= cap(yyv3825) { + yyv3825 = yyv3825[:yyrl3825] } else { - yyv3732 = make([]EnvVar, yyrl3732) + yyv3825 = make([]EnvVar, yyrl3825) } } else { - yyv3732 = make([]EnvVar, yyrl3732) + yyv3825 = make([]EnvVar, yyrl3825) } - yyc3732 = true - yyrr3732 = len(yyv3732) - if yyrg3732 { - copy(yyv3732, yyv23732) + yyc3825 = true + yyrr3825 = len(yyv3825) + if yyrg3825 { + copy(yyv3825, yyv23825) } - } else if yyl3732 != len(yyv3732) { - yyv3732 = yyv3732[:yyl3732] - yyc3732 = true + } else if yyl3825 != len(yyv3825) { + yyv3825 = yyv3825[:yyl3825] + yyc3825 = true } - yyj3732 := 0 - for ; yyj3732 < yyrr3732; yyj3732++ { - yyh3732.ElemContainerState(yyj3732) + yyj3825 := 0 + for ; yyj3825 < yyrr3825; yyj3825++ { + yyh3825.ElemContainerState(yyj3825) if r.TryDecodeAsNil() { - yyv3732[yyj3732] = EnvVar{} + yyv3825[yyj3825] = EnvVar{} } else { - yyv3733 := &yyv3732[yyj3732] - yyv3733.CodecDecodeSelf(d) + yyv3826 := &yyv3825[yyj3825] + yyv3826.CodecDecodeSelf(d) } } - if yyrt3732 { - for ; yyj3732 < yyl3732; yyj3732++ { - yyv3732 = append(yyv3732, EnvVar{}) - yyh3732.ElemContainerState(yyj3732) + if yyrt3825 { + for ; yyj3825 < yyl3825; yyj3825++ { + yyv3825 = append(yyv3825, EnvVar{}) + yyh3825.ElemContainerState(yyj3825) if r.TryDecodeAsNil() { - yyv3732[yyj3732] = EnvVar{} + yyv3825[yyj3825] = EnvVar{} } else { - yyv3734 := &yyv3732[yyj3732] - yyv3734.CodecDecodeSelf(d) + yyv3827 := &yyv3825[yyj3825] + yyv3827.CodecDecodeSelf(d) } } } } else { - yyj3732 := 0 - for ; !r.CheckBreak(); yyj3732++ { + yyj3825 := 0 + for ; !r.CheckBreak(); yyj3825++ { - if yyj3732 >= len(yyv3732) { - yyv3732 = append(yyv3732, EnvVar{}) // var yyz3732 EnvVar - yyc3732 = true + if yyj3825 >= len(yyv3825) { + yyv3825 = append(yyv3825, EnvVar{}) // var yyz3825 EnvVar + yyc3825 = true } - yyh3732.ElemContainerState(yyj3732) - if yyj3732 < len(yyv3732) { + yyh3825.ElemContainerState(yyj3825) + if yyj3825 < len(yyv3825) { if r.TryDecodeAsNil() { - yyv3732[yyj3732] = EnvVar{} + yyv3825[yyj3825] = EnvVar{} } else { - yyv3735 := &yyv3732[yyj3732] - yyv3735.CodecDecodeSelf(d) + yyv3828 := &yyv3825[yyj3825] + yyv3828.CodecDecodeSelf(d) } } else { @@ -46452,17 +47778,17 @@ func (x codecSelfer1234) decSliceEnvVar(v *[]EnvVar, d *codec1978.Decoder) { } } - if yyj3732 < len(yyv3732) { - yyv3732 = yyv3732[:yyj3732] - yyc3732 = true - } else if yyj3732 == 0 && yyv3732 == nil { - yyv3732 = []EnvVar{} - yyc3732 = true + if yyj3825 < len(yyv3825) { + yyv3825 = yyv3825[:yyj3825] + yyc3825 = true + } else if yyj3825 == 0 && yyv3825 == nil { + yyv3825 = []EnvVar{} + yyc3825 = true } } - yyh3732.End() - if yyc3732 { - *v = yyv3732 + yyh3825.End() + if yyc3825 { + *v = yyv3825 } } @@ -46471,10 +47797,10 @@ func (x codecSelfer1234) encSliceVolumeMount(v []VolumeMount, e *codec1978.Encod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3736 := range v { + for _, yyv3829 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3737 := &yyv3736 - yy3737.CodecEncodeSelf(e) + yy3830 := &yyv3829 + yy3830.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46484,83 +47810,83 @@ func (x codecSelfer1234) decSliceVolumeMount(v *[]VolumeMount, d *codec1978.Deco z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3738 := *v - yyh3738, yyl3738 := z.DecSliceHelperStart() - var yyc3738 bool - if yyl3738 == 0 { - if yyv3738 == nil { - yyv3738 = []VolumeMount{} - yyc3738 = true - } else if len(yyv3738) != 0 { - yyv3738 = yyv3738[:0] - yyc3738 = true + yyv3831 := *v + yyh3831, yyl3831 := z.DecSliceHelperStart() + var yyc3831 bool + if yyl3831 == 0 { + if yyv3831 == nil { + yyv3831 = []VolumeMount{} + yyc3831 = true + } else if len(yyv3831) != 0 { + yyv3831 = yyv3831[:0] + yyc3831 = true } - } else if yyl3738 > 0 { - var yyrr3738, yyrl3738 int - var yyrt3738 bool - if yyl3738 > cap(yyv3738) { + } else if yyl3831 > 0 { + var yyrr3831, yyrl3831 int + var yyrt3831 bool + if yyl3831 > cap(yyv3831) { - yyrg3738 := len(yyv3738) > 0 - yyv23738 := yyv3738 - yyrl3738, yyrt3738 = z.DecInferLen(yyl3738, z.DecBasicHandle().MaxInitLen, 40) - if yyrt3738 { - if yyrl3738 <= cap(yyv3738) { - yyv3738 = yyv3738[:yyrl3738] + yyrg3831 := len(yyv3831) > 0 + yyv23831 := yyv3831 + yyrl3831, yyrt3831 = z.DecInferLen(yyl3831, z.DecBasicHandle().MaxInitLen, 40) + if yyrt3831 { + if yyrl3831 <= cap(yyv3831) { + yyv3831 = yyv3831[:yyrl3831] } else { - yyv3738 = make([]VolumeMount, yyrl3738) + yyv3831 = make([]VolumeMount, yyrl3831) } } else { - yyv3738 = make([]VolumeMount, yyrl3738) + yyv3831 = make([]VolumeMount, yyrl3831) } - yyc3738 = true - yyrr3738 = len(yyv3738) - if yyrg3738 { - copy(yyv3738, yyv23738) + yyc3831 = true + yyrr3831 = len(yyv3831) + if yyrg3831 { + copy(yyv3831, yyv23831) } - } else if yyl3738 != len(yyv3738) { - yyv3738 = yyv3738[:yyl3738] - yyc3738 = true + } else if yyl3831 != len(yyv3831) { + yyv3831 = yyv3831[:yyl3831] + yyc3831 = true } - yyj3738 := 0 - for ; yyj3738 < yyrr3738; yyj3738++ { - yyh3738.ElemContainerState(yyj3738) + yyj3831 := 0 + for ; yyj3831 < yyrr3831; yyj3831++ { + yyh3831.ElemContainerState(yyj3831) if r.TryDecodeAsNil() { - yyv3738[yyj3738] = VolumeMount{} + yyv3831[yyj3831] = VolumeMount{} } else { - yyv3739 := &yyv3738[yyj3738] - yyv3739.CodecDecodeSelf(d) + yyv3832 := &yyv3831[yyj3831] + yyv3832.CodecDecodeSelf(d) } } - if yyrt3738 { - for ; yyj3738 < yyl3738; yyj3738++ { - yyv3738 = append(yyv3738, VolumeMount{}) - yyh3738.ElemContainerState(yyj3738) + if yyrt3831 { + for ; yyj3831 < yyl3831; yyj3831++ { + yyv3831 = append(yyv3831, VolumeMount{}) + yyh3831.ElemContainerState(yyj3831) if r.TryDecodeAsNil() { - yyv3738[yyj3738] = VolumeMount{} + yyv3831[yyj3831] = VolumeMount{} } else { - yyv3740 := &yyv3738[yyj3738] - yyv3740.CodecDecodeSelf(d) + yyv3833 := &yyv3831[yyj3831] + yyv3833.CodecDecodeSelf(d) } } } } else { - yyj3738 := 0 - for ; !r.CheckBreak(); yyj3738++ { + yyj3831 := 0 + for ; !r.CheckBreak(); yyj3831++ { - if yyj3738 >= len(yyv3738) { - yyv3738 = append(yyv3738, VolumeMount{}) // var yyz3738 VolumeMount - yyc3738 = true + if yyj3831 >= len(yyv3831) { + yyv3831 = append(yyv3831, VolumeMount{}) // var yyz3831 VolumeMount + yyc3831 = true } - yyh3738.ElemContainerState(yyj3738) - if yyj3738 < len(yyv3738) { + yyh3831.ElemContainerState(yyj3831) + if yyj3831 < len(yyv3831) { if r.TryDecodeAsNil() { - yyv3738[yyj3738] = VolumeMount{} + yyv3831[yyj3831] = VolumeMount{} } else { - yyv3741 := &yyv3738[yyj3738] - yyv3741.CodecDecodeSelf(d) + yyv3834 := &yyv3831[yyj3831] + yyv3834.CodecDecodeSelf(d) } } else { @@ -46568,17 +47894,17 @@ func (x codecSelfer1234) decSliceVolumeMount(v *[]VolumeMount, d *codec1978.Deco } } - if yyj3738 < len(yyv3738) { - yyv3738 = yyv3738[:yyj3738] - yyc3738 = true - } else if yyj3738 == 0 && yyv3738 == nil { - yyv3738 = []VolumeMount{} - yyc3738 = true + if yyj3831 < len(yyv3831) { + yyv3831 = yyv3831[:yyj3831] + yyc3831 = true + } else if yyj3831 == 0 && yyv3831 == nil { + yyv3831 = []VolumeMount{} + yyc3831 = true } } - yyh3738.End() - if yyc3738 { - *v = yyv3738 + yyh3831.End() + if yyc3831 { + *v = yyv3831 } } @@ -46587,10 +47913,10 @@ func (x codecSelfer1234) encSlicePod(v []Pod, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3742 := range v { + for _, yyv3835 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3743 := &yyv3742 - yy3743.CodecEncodeSelf(e) + yy3836 := &yyv3835 + yy3836.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46600,83 +47926,83 @@ func (x codecSelfer1234) decSlicePod(v *[]Pod, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3744 := *v - yyh3744, yyl3744 := z.DecSliceHelperStart() - var yyc3744 bool - if yyl3744 == 0 { - if yyv3744 == nil { - yyv3744 = []Pod{} - yyc3744 = true - } else if len(yyv3744) != 0 { - yyv3744 = yyv3744[:0] - yyc3744 = true + yyv3837 := *v + yyh3837, yyl3837 := z.DecSliceHelperStart() + var yyc3837 bool + if yyl3837 == 0 { + if yyv3837 == nil { + yyv3837 = []Pod{} + yyc3837 = true + } else if len(yyv3837) != 0 { + yyv3837 = yyv3837[:0] + yyc3837 = true } - } else if yyl3744 > 0 { - var yyrr3744, yyrl3744 int - var yyrt3744 bool - if yyl3744 > cap(yyv3744) { + } else if yyl3837 > 0 { + var yyrr3837, yyrl3837 int + var yyrt3837 bool + if yyl3837 > cap(yyv3837) { - yyrg3744 := len(yyv3744) > 0 - yyv23744 := yyv3744 - yyrl3744, yyrt3744 = z.DecInferLen(yyl3744, z.DecBasicHandle().MaxInitLen, 496) - if yyrt3744 { - if yyrl3744 <= cap(yyv3744) { - yyv3744 = yyv3744[:yyrl3744] + yyrg3837 := len(yyv3837) > 0 + yyv23837 := yyv3837 + yyrl3837, yyrt3837 = z.DecInferLen(yyl3837, z.DecBasicHandle().MaxInitLen, 496) + if yyrt3837 { + if yyrl3837 <= cap(yyv3837) { + yyv3837 = yyv3837[:yyrl3837] } else { - yyv3744 = make([]Pod, yyrl3744) + yyv3837 = make([]Pod, yyrl3837) } } else { - yyv3744 = make([]Pod, yyrl3744) + yyv3837 = make([]Pod, yyrl3837) } - yyc3744 = true - yyrr3744 = len(yyv3744) - if yyrg3744 { - copy(yyv3744, yyv23744) + yyc3837 = true + yyrr3837 = len(yyv3837) + if yyrg3837 { + copy(yyv3837, yyv23837) } - } else if yyl3744 != len(yyv3744) { - yyv3744 = yyv3744[:yyl3744] - yyc3744 = true + } else if yyl3837 != len(yyv3837) { + yyv3837 = yyv3837[:yyl3837] + yyc3837 = true } - yyj3744 := 0 - for ; yyj3744 < yyrr3744; yyj3744++ { - yyh3744.ElemContainerState(yyj3744) + yyj3837 := 0 + for ; yyj3837 < yyrr3837; yyj3837++ { + yyh3837.ElemContainerState(yyj3837) if r.TryDecodeAsNil() { - yyv3744[yyj3744] = Pod{} + yyv3837[yyj3837] = Pod{} } else { - yyv3745 := &yyv3744[yyj3744] - yyv3745.CodecDecodeSelf(d) + yyv3838 := &yyv3837[yyj3837] + yyv3838.CodecDecodeSelf(d) } } - if yyrt3744 { - for ; yyj3744 < yyl3744; yyj3744++ { - yyv3744 = append(yyv3744, Pod{}) - yyh3744.ElemContainerState(yyj3744) + if yyrt3837 { + for ; yyj3837 < yyl3837; yyj3837++ { + yyv3837 = append(yyv3837, Pod{}) + yyh3837.ElemContainerState(yyj3837) if r.TryDecodeAsNil() { - yyv3744[yyj3744] = Pod{} + yyv3837[yyj3837] = Pod{} } else { - yyv3746 := &yyv3744[yyj3744] - yyv3746.CodecDecodeSelf(d) + yyv3839 := &yyv3837[yyj3837] + yyv3839.CodecDecodeSelf(d) } } } } else { - yyj3744 := 0 - for ; !r.CheckBreak(); yyj3744++ { + yyj3837 := 0 + for ; !r.CheckBreak(); yyj3837++ { - if yyj3744 >= len(yyv3744) { - yyv3744 = append(yyv3744, Pod{}) // var yyz3744 Pod - yyc3744 = true + if yyj3837 >= len(yyv3837) { + yyv3837 = append(yyv3837, Pod{}) // var yyz3837 Pod + yyc3837 = true } - yyh3744.ElemContainerState(yyj3744) - if yyj3744 < len(yyv3744) { + yyh3837.ElemContainerState(yyj3837) + if yyj3837 < len(yyv3837) { if r.TryDecodeAsNil() { - yyv3744[yyj3744] = Pod{} + yyv3837[yyj3837] = Pod{} } else { - yyv3747 := &yyv3744[yyj3744] - yyv3747.CodecDecodeSelf(d) + yyv3840 := &yyv3837[yyj3837] + yyv3840.CodecDecodeSelf(d) } } else { @@ -46684,17 +48010,365 @@ func (x codecSelfer1234) decSlicePod(v *[]Pod, d *codec1978.Decoder) { } } - if yyj3744 < len(yyv3744) { - yyv3744 = yyv3744[:yyj3744] - yyc3744 = true - } else if yyj3744 == 0 && yyv3744 == nil { - yyv3744 = []Pod{} - yyc3744 = true + if yyj3837 < len(yyv3837) { + yyv3837 = yyv3837[:yyj3837] + yyc3837 = true + } else if yyj3837 == 0 && yyv3837 == nil { + yyv3837 = []Pod{} + yyc3837 = true } } - yyh3744.End() - if yyc3744 { - *v = yyv3744 + yyh3837.End() + if yyc3837 { + *v = yyv3837 + } +} + +func (x codecSelfer1234) encSliceNodeSelectorTerm(v []NodeSelectorTerm, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3841 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3842 := &yyv3841 + yy3842.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceNodeSelectorTerm(v *[]NodeSelectorTerm, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3843 := *v + yyh3843, yyl3843 := z.DecSliceHelperStart() + var yyc3843 bool + if yyl3843 == 0 { + if yyv3843 == nil { + yyv3843 = []NodeSelectorTerm{} + yyc3843 = true + } else if len(yyv3843) != 0 { + yyv3843 = yyv3843[:0] + yyc3843 = true + } + } else if yyl3843 > 0 { + var yyrr3843, yyrl3843 int + var yyrt3843 bool + if yyl3843 > cap(yyv3843) { + + yyrg3843 := len(yyv3843) > 0 + yyv23843 := yyv3843 + yyrl3843, yyrt3843 = z.DecInferLen(yyl3843, z.DecBasicHandle().MaxInitLen, 24) + if yyrt3843 { + if yyrl3843 <= cap(yyv3843) { + yyv3843 = yyv3843[:yyrl3843] + } else { + yyv3843 = make([]NodeSelectorTerm, yyrl3843) + } + } else { + yyv3843 = make([]NodeSelectorTerm, yyrl3843) + } + yyc3843 = true + yyrr3843 = len(yyv3843) + if yyrg3843 { + copy(yyv3843, yyv23843) + } + } else if yyl3843 != len(yyv3843) { + yyv3843 = yyv3843[:yyl3843] + yyc3843 = true + } + yyj3843 := 0 + for ; yyj3843 < yyrr3843; yyj3843++ { + yyh3843.ElemContainerState(yyj3843) + if r.TryDecodeAsNil() { + yyv3843[yyj3843] = NodeSelectorTerm{} + } else { + yyv3844 := &yyv3843[yyj3843] + yyv3844.CodecDecodeSelf(d) + } + + } + if yyrt3843 { + for ; yyj3843 < yyl3843; yyj3843++ { + yyv3843 = append(yyv3843, NodeSelectorTerm{}) + yyh3843.ElemContainerState(yyj3843) + if r.TryDecodeAsNil() { + yyv3843[yyj3843] = NodeSelectorTerm{} + } else { + yyv3845 := &yyv3843[yyj3843] + yyv3845.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3843 := 0 + for ; !r.CheckBreak(); yyj3843++ { + + if yyj3843 >= len(yyv3843) { + yyv3843 = append(yyv3843, NodeSelectorTerm{}) // var yyz3843 NodeSelectorTerm + yyc3843 = true + } + yyh3843.ElemContainerState(yyj3843) + if yyj3843 < len(yyv3843) { + if r.TryDecodeAsNil() { + yyv3843[yyj3843] = NodeSelectorTerm{} + } else { + yyv3846 := &yyv3843[yyj3843] + yyv3846.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3843 < len(yyv3843) { + yyv3843 = yyv3843[:yyj3843] + yyc3843 = true + } else if yyj3843 == 0 && yyv3843 == nil { + yyv3843 = []NodeSelectorTerm{} + yyc3843 = true + } + } + yyh3843.End() + if yyc3843 { + *v = yyv3843 + } +} + +func (x codecSelfer1234) encSliceNodeSelectorRequirement(v []NodeSelectorRequirement, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3847 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3848 := &yyv3847 + yy3848.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceNodeSelectorRequirement(v *[]NodeSelectorRequirement, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3849 := *v + yyh3849, yyl3849 := z.DecSliceHelperStart() + var yyc3849 bool + if yyl3849 == 0 { + if yyv3849 == nil { + yyv3849 = []NodeSelectorRequirement{} + yyc3849 = true + } else if len(yyv3849) != 0 { + yyv3849 = yyv3849[:0] + yyc3849 = true + } + } else if yyl3849 > 0 { + var yyrr3849, yyrl3849 int + var yyrt3849 bool + if yyl3849 > cap(yyv3849) { + + yyrg3849 := len(yyv3849) > 0 + yyv23849 := yyv3849 + yyrl3849, yyrt3849 = z.DecInferLen(yyl3849, z.DecBasicHandle().MaxInitLen, 56) + if yyrt3849 { + if yyrl3849 <= cap(yyv3849) { + yyv3849 = yyv3849[:yyrl3849] + } else { + yyv3849 = make([]NodeSelectorRequirement, yyrl3849) + } + } else { + yyv3849 = make([]NodeSelectorRequirement, yyrl3849) + } + yyc3849 = true + yyrr3849 = len(yyv3849) + if yyrg3849 { + copy(yyv3849, yyv23849) + } + } else if yyl3849 != len(yyv3849) { + yyv3849 = yyv3849[:yyl3849] + yyc3849 = true + } + yyj3849 := 0 + for ; yyj3849 < yyrr3849; yyj3849++ { + yyh3849.ElemContainerState(yyj3849) + if r.TryDecodeAsNil() { + yyv3849[yyj3849] = NodeSelectorRequirement{} + } else { + yyv3850 := &yyv3849[yyj3849] + yyv3850.CodecDecodeSelf(d) + } + + } + if yyrt3849 { + for ; yyj3849 < yyl3849; yyj3849++ { + yyv3849 = append(yyv3849, NodeSelectorRequirement{}) + yyh3849.ElemContainerState(yyj3849) + if r.TryDecodeAsNil() { + yyv3849[yyj3849] = NodeSelectorRequirement{} + } else { + yyv3851 := &yyv3849[yyj3849] + yyv3851.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3849 := 0 + for ; !r.CheckBreak(); yyj3849++ { + + if yyj3849 >= len(yyv3849) { + yyv3849 = append(yyv3849, NodeSelectorRequirement{}) // var yyz3849 NodeSelectorRequirement + yyc3849 = true + } + yyh3849.ElemContainerState(yyj3849) + if yyj3849 < len(yyv3849) { + if r.TryDecodeAsNil() { + yyv3849[yyj3849] = NodeSelectorRequirement{} + } else { + yyv3852 := &yyv3849[yyj3849] + yyv3852.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3849 < len(yyv3849) { + yyv3849 = yyv3849[:yyj3849] + yyc3849 = true + } else if yyj3849 == 0 && yyv3849 == nil { + yyv3849 = []NodeSelectorRequirement{} + yyc3849 = true + } + } + yyh3849.End() + if yyc3849 { + *v = yyv3849 + } +} + +func (x codecSelfer1234) encSlicePreferredSchedulingTerm(v []PreferredSchedulingTerm, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3853 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3854 := &yyv3853 + yy3854.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSlicePreferredSchedulingTerm(v *[]PreferredSchedulingTerm, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3855 := *v + yyh3855, yyl3855 := z.DecSliceHelperStart() + var yyc3855 bool + if yyl3855 == 0 { + if yyv3855 == nil { + yyv3855 = []PreferredSchedulingTerm{} + yyc3855 = true + } else if len(yyv3855) != 0 { + yyv3855 = yyv3855[:0] + yyc3855 = true + } + } else if yyl3855 > 0 { + var yyrr3855, yyrl3855 int + var yyrt3855 bool + if yyl3855 > cap(yyv3855) { + + yyrg3855 := len(yyv3855) > 0 + yyv23855 := yyv3855 + yyrl3855, yyrt3855 = z.DecInferLen(yyl3855, z.DecBasicHandle().MaxInitLen, 32) + if yyrt3855 { + if yyrl3855 <= cap(yyv3855) { + yyv3855 = yyv3855[:yyrl3855] + } else { + yyv3855 = make([]PreferredSchedulingTerm, yyrl3855) + } + } else { + yyv3855 = make([]PreferredSchedulingTerm, yyrl3855) + } + yyc3855 = true + yyrr3855 = len(yyv3855) + if yyrg3855 { + copy(yyv3855, yyv23855) + } + } else if yyl3855 != len(yyv3855) { + yyv3855 = yyv3855[:yyl3855] + yyc3855 = true + } + yyj3855 := 0 + for ; yyj3855 < yyrr3855; yyj3855++ { + yyh3855.ElemContainerState(yyj3855) + if r.TryDecodeAsNil() { + yyv3855[yyj3855] = PreferredSchedulingTerm{} + } else { + yyv3856 := &yyv3855[yyj3855] + yyv3856.CodecDecodeSelf(d) + } + + } + if yyrt3855 { + for ; yyj3855 < yyl3855; yyj3855++ { + yyv3855 = append(yyv3855, PreferredSchedulingTerm{}) + yyh3855.ElemContainerState(yyj3855) + if r.TryDecodeAsNil() { + yyv3855[yyj3855] = PreferredSchedulingTerm{} + } else { + yyv3857 := &yyv3855[yyj3855] + yyv3857.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3855 := 0 + for ; !r.CheckBreak(); yyj3855++ { + + if yyj3855 >= len(yyv3855) { + yyv3855 = append(yyv3855, PreferredSchedulingTerm{}) // var yyz3855 PreferredSchedulingTerm + yyc3855 = true + } + yyh3855.ElemContainerState(yyj3855) + if yyj3855 < len(yyv3855) { + if r.TryDecodeAsNil() { + yyv3855[yyj3855] = PreferredSchedulingTerm{} + } else { + yyv3858 := &yyv3855[yyj3855] + yyv3858.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3855 < len(yyv3855) { + yyv3855 = yyv3855[:yyj3855] + yyc3855 = true + } else if yyj3855 == 0 && yyv3855 == nil { + yyv3855 = []PreferredSchedulingTerm{} + yyc3855 = true + } + } + yyh3855.End() + if yyc3855 { + *v = yyv3855 } } @@ -46703,10 +48377,10 @@ func (x codecSelfer1234) encSliceVolume(v []Volume, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3748 := range v { + for _, yyv3859 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3749 := &yyv3748 - yy3749.CodecEncodeSelf(e) + yy3860 := &yyv3859 + yy3860.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46716,83 +48390,83 @@ func (x codecSelfer1234) decSliceVolume(v *[]Volume, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3750 := *v - yyh3750, yyl3750 := z.DecSliceHelperStart() - var yyc3750 bool - if yyl3750 == 0 { - if yyv3750 == nil { - yyv3750 = []Volume{} - yyc3750 = true - } else if len(yyv3750) != 0 { - yyv3750 = yyv3750[:0] - yyc3750 = true + yyv3861 := *v + yyh3861, yyl3861 := z.DecSliceHelperStart() + var yyc3861 bool + if yyl3861 == 0 { + if yyv3861 == nil { + yyv3861 = []Volume{} + yyc3861 = true + } else if len(yyv3861) != 0 { + yyv3861 = yyv3861[:0] + yyc3861 = true } - } else if yyl3750 > 0 { - var yyrr3750, yyrl3750 int - var yyrt3750 bool - if yyl3750 > cap(yyv3750) { + } else if yyl3861 > 0 { + var yyrr3861, yyrl3861 int + var yyrt3861 bool + if yyl3861 > cap(yyv3861) { - yyrg3750 := len(yyv3750) > 0 - yyv23750 := yyv3750 - yyrl3750, yyrt3750 = z.DecInferLen(yyl3750, z.DecBasicHandle().MaxInitLen, 152) - if yyrt3750 { - if yyrl3750 <= cap(yyv3750) { - yyv3750 = yyv3750[:yyrl3750] + yyrg3861 := len(yyv3861) > 0 + yyv23861 := yyv3861 + yyrl3861, yyrt3861 = z.DecInferLen(yyl3861, z.DecBasicHandle().MaxInitLen, 152) + if yyrt3861 { + if yyrl3861 <= cap(yyv3861) { + yyv3861 = yyv3861[:yyrl3861] } else { - yyv3750 = make([]Volume, yyrl3750) + yyv3861 = make([]Volume, yyrl3861) } } else { - yyv3750 = make([]Volume, yyrl3750) + yyv3861 = make([]Volume, yyrl3861) } - yyc3750 = true - yyrr3750 = len(yyv3750) - if yyrg3750 { - copy(yyv3750, yyv23750) + yyc3861 = true + yyrr3861 = len(yyv3861) + if yyrg3861 { + copy(yyv3861, yyv23861) } - } else if yyl3750 != len(yyv3750) { - yyv3750 = yyv3750[:yyl3750] - yyc3750 = true + } else if yyl3861 != len(yyv3861) { + yyv3861 = yyv3861[:yyl3861] + yyc3861 = true } - yyj3750 := 0 - for ; yyj3750 < yyrr3750; yyj3750++ { - yyh3750.ElemContainerState(yyj3750) + yyj3861 := 0 + for ; yyj3861 < yyrr3861; yyj3861++ { + yyh3861.ElemContainerState(yyj3861) if r.TryDecodeAsNil() { - yyv3750[yyj3750] = Volume{} + yyv3861[yyj3861] = Volume{} } else { - yyv3751 := &yyv3750[yyj3750] - yyv3751.CodecDecodeSelf(d) + yyv3862 := &yyv3861[yyj3861] + yyv3862.CodecDecodeSelf(d) } } - if yyrt3750 { - for ; yyj3750 < yyl3750; yyj3750++ { - yyv3750 = append(yyv3750, Volume{}) - yyh3750.ElemContainerState(yyj3750) + if yyrt3861 { + for ; yyj3861 < yyl3861; yyj3861++ { + yyv3861 = append(yyv3861, Volume{}) + yyh3861.ElemContainerState(yyj3861) if r.TryDecodeAsNil() { - yyv3750[yyj3750] = Volume{} + yyv3861[yyj3861] = Volume{} } else { - yyv3752 := &yyv3750[yyj3750] - yyv3752.CodecDecodeSelf(d) + yyv3863 := &yyv3861[yyj3861] + yyv3863.CodecDecodeSelf(d) } } } } else { - yyj3750 := 0 - for ; !r.CheckBreak(); yyj3750++ { + yyj3861 := 0 + for ; !r.CheckBreak(); yyj3861++ { - if yyj3750 >= len(yyv3750) { - yyv3750 = append(yyv3750, Volume{}) // var yyz3750 Volume - yyc3750 = true + if yyj3861 >= len(yyv3861) { + yyv3861 = append(yyv3861, Volume{}) // var yyz3861 Volume + yyc3861 = true } - yyh3750.ElemContainerState(yyj3750) - if yyj3750 < len(yyv3750) { + yyh3861.ElemContainerState(yyj3861) + if yyj3861 < len(yyv3861) { if r.TryDecodeAsNil() { - yyv3750[yyj3750] = Volume{} + yyv3861[yyj3861] = Volume{} } else { - yyv3753 := &yyv3750[yyj3750] - yyv3753.CodecDecodeSelf(d) + yyv3864 := &yyv3861[yyj3861] + yyv3864.CodecDecodeSelf(d) } } else { @@ -46800,17 +48474,17 @@ func (x codecSelfer1234) decSliceVolume(v *[]Volume, d *codec1978.Decoder) { } } - if yyj3750 < len(yyv3750) { - yyv3750 = yyv3750[:yyj3750] - yyc3750 = true - } else if yyj3750 == 0 && yyv3750 == nil { - yyv3750 = []Volume{} - yyc3750 = true + if yyj3861 < len(yyv3861) { + yyv3861 = yyv3861[:yyj3861] + yyc3861 = true + } else if yyj3861 == 0 && yyv3861 == nil { + yyv3861 = []Volume{} + yyc3861 = true } } - yyh3750.End() - if yyc3750 { - *v = yyv3750 + yyh3861.End() + if yyc3861 { + *v = yyv3861 } } @@ -46819,10 +48493,10 @@ func (x codecSelfer1234) encSliceContainer(v []Container, e *codec1978.Encoder) z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3754 := range v { + for _, yyv3865 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3755 := &yyv3754 - yy3755.CodecEncodeSelf(e) + yy3866 := &yyv3865 + yy3866.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46832,83 +48506,83 @@ func (x codecSelfer1234) decSliceContainer(v *[]Container, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3756 := *v - yyh3756, yyl3756 := z.DecSliceHelperStart() - var yyc3756 bool - if yyl3756 == 0 { - if yyv3756 == nil { - yyv3756 = []Container{} - yyc3756 = true - } else if len(yyv3756) != 0 { - yyv3756 = yyv3756[:0] - yyc3756 = true + yyv3867 := *v + yyh3867, yyl3867 := z.DecSliceHelperStart() + var yyc3867 bool + if yyl3867 == 0 { + if yyv3867 == nil { + yyv3867 = []Container{} + yyc3867 = true + } else if len(yyv3867) != 0 { + yyv3867 = yyv3867[:0] + yyc3867 = true } - } else if yyl3756 > 0 { - var yyrr3756, yyrl3756 int - var yyrt3756 bool - if yyl3756 > cap(yyv3756) { + } else if yyl3867 > 0 { + var yyrr3867, yyrl3867 int + var yyrt3867 bool + if yyl3867 > cap(yyv3867) { - yyrg3756 := len(yyv3756) > 0 - yyv23756 := yyv3756 - yyrl3756, yyrt3756 = z.DecInferLen(yyl3756, z.DecBasicHandle().MaxInitLen, 256) - if yyrt3756 { - if yyrl3756 <= cap(yyv3756) { - yyv3756 = yyv3756[:yyrl3756] + yyrg3867 := len(yyv3867) > 0 + yyv23867 := yyv3867 + yyrl3867, yyrt3867 = z.DecInferLen(yyl3867, z.DecBasicHandle().MaxInitLen, 256) + if yyrt3867 { + if yyrl3867 <= cap(yyv3867) { + yyv3867 = yyv3867[:yyrl3867] } else { - yyv3756 = make([]Container, yyrl3756) + yyv3867 = make([]Container, yyrl3867) } } else { - yyv3756 = make([]Container, yyrl3756) + yyv3867 = make([]Container, yyrl3867) } - yyc3756 = true - yyrr3756 = len(yyv3756) - if yyrg3756 { - copy(yyv3756, yyv23756) + yyc3867 = true + yyrr3867 = len(yyv3867) + if yyrg3867 { + copy(yyv3867, yyv23867) } - } else if yyl3756 != len(yyv3756) { - yyv3756 = yyv3756[:yyl3756] - yyc3756 = true + } else if yyl3867 != len(yyv3867) { + yyv3867 = yyv3867[:yyl3867] + yyc3867 = true } - yyj3756 := 0 - for ; yyj3756 < yyrr3756; yyj3756++ { - yyh3756.ElemContainerState(yyj3756) + yyj3867 := 0 + for ; yyj3867 < yyrr3867; yyj3867++ { + yyh3867.ElemContainerState(yyj3867) if r.TryDecodeAsNil() { - yyv3756[yyj3756] = Container{} + yyv3867[yyj3867] = Container{} } else { - yyv3757 := &yyv3756[yyj3756] - yyv3757.CodecDecodeSelf(d) + yyv3868 := &yyv3867[yyj3867] + yyv3868.CodecDecodeSelf(d) } } - if yyrt3756 { - for ; yyj3756 < yyl3756; yyj3756++ { - yyv3756 = append(yyv3756, Container{}) - yyh3756.ElemContainerState(yyj3756) + if yyrt3867 { + for ; yyj3867 < yyl3867; yyj3867++ { + yyv3867 = append(yyv3867, Container{}) + yyh3867.ElemContainerState(yyj3867) if r.TryDecodeAsNil() { - yyv3756[yyj3756] = Container{} + yyv3867[yyj3867] = Container{} } else { - yyv3758 := &yyv3756[yyj3756] - yyv3758.CodecDecodeSelf(d) + yyv3869 := &yyv3867[yyj3867] + yyv3869.CodecDecodeSelf(d) } } } } else { - yyj3756 := 0 - for ; !r.CheckBreak(); yyj3756++ { + yyj3867 := 0 + for ; !r.CheckBreak(); yyj3867++ { - if yyj3756 >= len(yyv3756) { - yyv3756 = append(yyv3756, Container{}) // var yyz3756 Container - yyc3756 = true + if yyj3867 >= len(yyv3867) { + yyv3867 = append(yyv3867, Container{}) // var yyz3867 Container + yyc3867 = true } - yyh3756.ElemContainerState(yyj3756) - if yyj3756 < len(yyv3756) { + yyh3867.ElemContainerState(yyj3867) + if yyj3867 < len(yyv3867) { if r.TryDecodeAsNil() { - yyv3756[yyj3756] = Container{} + yyv3867[yyj3867] = Container{} } else { - yyv3759 := &yyv3756[yyj3756] - yyv3759.CodecDecodeSelf(d) + yyv3870 := &yyv3867[yyj3867] + yyv3870.CodecDecodeSelf(d) } } else { @@ -46916,17 +48590,17 @@ func (x codecSelfer1234) decSliceContainer(v *[]Container, d *codec1978.Decoder) } } - if yyj3756 < len(yyv3756) { - yyv3756 = yyv3756[:yyj3756] - yyc3756 = true - } else if yyj3756 == 0 && yyv3756 == nil { - yyv3756 = []Container{} - yyc3756 = true + if yyj3867 < len(yyv3867) { + yyv3867 = yyv3867[:yyj3867] + yyc3867 = true + } else if yyj3867 == 0 && yyv3867 == nil { + yyv3867 = []Container{} + yyc3867 = true } } - yyh3756.End() - if yyc3756 { - *v = yyv3756 + yyh3867.End() + if yyc3867 { + *v = yyv3867 } } @@ -46935,10 +48609,10 @@ func (x codecSelfer1234) encSliceLocalObjectReference(v []LocalObjectReference, z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3760 := range v { + for _, yyv3871 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3761 := &yyv3760 - yy3761.CodecEncodeSelf(e) + yy3872 := &yyv3871 + yy3872.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46948,83 +48622,83 @@ func (x codecSelfer1234) decSliceLocalObjectReference(v *[]LocalObjectReference, z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3762 := *v - yyh3762, yyl3762 := z.DecSliceHelperStart() - var yyc3762 bool - if yyl3762 == 0 { - if yyv3762 == nil { - yyv3762 = []LocalObjectReference{} - yyc3762 = true - } else if len(yyv3762) != 0 { - yyv3762 = yyv3762[:0] - yyc3762 = true + yyv3873 := *v + yyh3873, yyl3873 := z.DecSliceHelperStart() + var yyc3873 bool + if yyl3873 == 0 { + if yyv3873 == nil { + yyv3873 = []LocalObjectReference{} + yyc3873 = true + } else if len(yyv3873) != 0 { + yyv3873 = yyv3873[:0] + yyc3873 = true } - } else if yyl3762 > 0 { - var yyrr3762, yyrl3762 int - var yyrt3762 bool - if yyl3762 > cap(yyv3762) { + } else if yyl3873 > 0 { + var yyrr3873, yyrl3873 int + var yyrt3873 bool + if yyl3873 > cap(yyv3873) { - yyrg3762 := len(yyv3762) > 0 - yyv23762 := yyv3762 - yyrl3762, yyrt3762 = z.DecInferLen(yyl3762, z.DecBasicHandle().MaxInitLen, 16) - if yyrt3762 { - if yyrl3762 <= cap(yyv3762) { - yyv3762 = yyv3762[:yyrl3762] + yyrg3873 := len(yyv3873) > 0 + yyv23873 := yyv3873 + yyrl3873, yyrt3873 = z.DecInferLen(yyl3873, z.DecBasicHandle().MaxInitLen, 16) + if yyrt3873 { + if yyrl3873 <= cap(yyv3873) { + yyv3873 = yyv3873[:yyrl3873] } else { - yyv3762 = make([]LocalObjectReference, yyrl3762) + yyv3873 = make([]LocalObjectReference, yyrl3873) } } else { - yyv3762 = make([]LocalObjectReference, yyrl3762) + yyv3873 = make([]LocalObjectReference, yyrl3873) } - yyc3762 = true - yyrr3762 = len(yyv3762) - if yyrg3762 { - copy(yyv3762, yyv23762) + yyc3873 = true + yyrr3873 = len(yyv3873) + if yyrg3873 { + copy(yyv3873, yyv23873) } - } else if yyl3762 != len(yyv3762) { - yyv3762 = yyv3762[:yyl3762] - yyc3762 = true + } else if yyl3873 != len(yyv3873) { + yyv3873 = yyv3873[:yyl3873] + yyc3873 = true } - yyj3762 := 0 - for ; yyj3762 < yyrr3762; yyj3762++ { - yyh3762.ElemContainerState(yyj3762) + yyj3873 := 0 + for ; yyj3873 < yyrr3873; yyj3873++ { + yyh3873.ElemContainerState(yyj3873) if r.TryDecodeAsNil() { - yyv3762[yyj3762] = LocalObjectReference{} + yyv3873[yyj3873] = LocalObjectReference{} } else { - yyv3763 := &yyv3762[yyj3762] - yyv3763.CodecDecodeSelf(d) + yyv3874 := &yyv3873[yyj3873] + yyv3874.CodecDecodeSelf(d) } } - if yyrt3762 { - for ; yyj3762 < yyl3762; yyj3762++ { - yyv3762 = append(yyv3762, LocalObjectReference{}) - yyh3762.ElemContainerState(yyj3762) + if yyrt3873 { + for ; yyj3873 < yyl3873; yyj3873++ { + yyv3873 = append(yyv3873, LocalObjectReference{}) + yyh3873.ElemContainerState(yyj3873) if r.TryDecodeAsNil() { - yyv3762[yyj3762] = LocalObjectReference{} + yyv3873[yyj3873] = LocalObjectReference{} } else { - yyv3764 := &yyv3762[yyj3762] - yyv3764.CodecDecodeSelf(d) + yyv3875 := &yyv3873[yyj3873] + yyv3875.CodecDecodeSelf(d) } } } } else { - yyj3762 := 0 - for ; !r.CheckBreak(); yyj3762++ { + yyj3873 := 0 + for ; !r.CheckBreak(); yyj3873++ { - if yyj3762 >= len(yyv3762) { - yyv3762 = append(yyv3762, LocalObjectReference{}) // var yyz3762 LocalObjectReference - yyc3762 = true + if yyj3873 >= len(yyv3873) { + yyv3873 = append(yyv3873, LocalObjectReference{}) // var yyz3873 LocalObjectReference + yyc3873 = true } - yyh3762.ElemContainerState(yyj3762) - if yyj3762 < len(yyv3762) { + yyh3873.ElemContainerState(yyj3873) + if yyj3873 < len(yyv3873) { if r.TryDecodeAsNil() { - yyv3762[yyj3762] = LocalObjectReference{} + yyv3873[yyj3873] = LocalObjectReference{} } else { - yyv3765 := &yyv3762[yyj3762] - yyv3765.CodecDecodeSelf(d) + yyv3876 := &yyv3873[yyj3873] + yyv3876.CodecDecodeSelf(d) } } else { @@ -47032,17 +48706,17 @@ func (x codecSelfer1234) decSliceLocalObjectReference(v *[]LocalObjectReference, } } - if yyj3762 < len(yyv3762) { - yyv3762 = yyv3762[:yyj3762] - yyc3762 = true - } else if yyj3762 == 0 && yyv3762 == nil { - yyv3762 = []LocalObjectReference{} - yyc3762 = true + if yyj3873 < len(yyv3873) { + yyv3873 = yyv3873[:yyj3873] + yyc3873 = true + } else if yyj3873 == 0 && yyv3873 == nil { + yyv3873 = []LocalObjectReference{} + yyc3873 = true } } - yyh3762.End() - if yyc3762 { - *v = yyv3762 + yyh3873.End() + if yyc3873 { + *v = yyv3873 } } @@ -47051,10 +48725,10 @@ func (x codecSelfer1234) encSlicePodCondition(v []PodCondition, e *codec1978.Enc z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3766 := range v { + for _, yyv3877 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3767 := &yyv3766 - yy3767.CodecEncodeSelf(e) + yy3878 := &yyv3877 + yy3878.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -47064,2097 +48738,12 @@ func (x codecSelfer1234) decSlicePodCondition(v *[]PodCondition, d *codec1978.De z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3768 := *v - yyh3768, yyl3768 := z.DecSliceHelperStart() - var yyc3768 bool - if yyl3768 == 0 { - if yyv3768 == nil { - yyv3768 = []PodCondition{} - yyc3768 = true - } else if len(yyv3768) != 0 { - yyv3768 = yyv3768[:0] - yyc3768 = true - } - } else if yyl3768 > 0 { - var yyrr3768, yyrl3768 int - var yyrt3768 bool - if yyl3768 > cap(yyv3768) { - - yyrg3768 := len(yyv3768) > 0 - yyv23768 := yyv3768 - yyrl3768, yyrt3768 = z.DecInferLen(yyl3768, z.DecBasicHandle().MaxInitLen, 112) - if yyrt3768 { - if yyrl3768 <= cap(yyv3768) { - yyv3768 = yyv3768[:yyrl3768] - } else { - yyv3768 = make([]PodCondition, yyrl3768) - } - } else { - yyv3768 = make([]PodCondition, yyrl3768) - } - yyc3768 = true - yyrr3768 = len(yyv3768) - if yyrg3768 { - copy(yyv3768, yyv23768) - } - } else if yyl3768 != len(yyv3768) { - yyv3768 = yyv3768[:yyl3768] - yyc3768 = true - } - yyj3768 := 0 - for ; yyj3768 < yyrr3768; yyj3768++ { - yyh3768.ElemContainerState(yyj3768) - if r.TryDecodeAsNil() { - yyv3768[yyj3768] = PodCondition{} - } else { - yyv3769 := &yyv3768[yyj3768] - yyv3769.CodecDecodeSelf(d) - } - - } - if yyrt3768 { - for ; yyj3768 < yyl3768; yyj3768++ { - yyv3768 = append(yyv3768, PodCondition{}) - yyh3768.ElemContainerState(yyj3768) - if r.TryDecodeAsNil() { - yyv3768[yyj3768] = PodCondition{} - } else { - yyv3770 := &yyv3768[yyj3768] - yyv3770.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3768 := 0 - for ; !r.CheckBreak(); yyj3768++ { - - if yyj3768 >= len(yyv3768) { - yyv3768 = append(yyv3768, PodCondition{}) // var yyz3768 PodCondition - yyc3768 = true - } - yyh3768.ElemContainerState(yyj3768) - if yyj3768 < len(yyv3768) { - if r.TryDecodeAsNil() { - yyv3768[yyj3768] = PodCondition{} - } else { - yyv3771 := &yyv3768[yyj3768] - yyv3771.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3768 < len(yyv3768) { - yyv3768 = yyv3768[:yyj3768] - yyc3768 = true - } else if yyj3768 == 0 && yyv3768 == nil { - yyv3768 = []PodCondition{} - yyc3768 = true - } - } - yyh3768.End() - if yyc3768 { - *v = yyv3768 - } -} - -func (x codecSelfer1234) encSliceContainerStatus(v []ContainerStatus, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3772 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3773 := &yyv3772 - yy3773.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceContainerStatus(v *[]ContainerStatus, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3774 := *v - yyh3774, yyl3774 := z.DecSliceHelperStart() - var yyc3774 bool - if yyl3774 == 0 { - if yyv3774 == nil { - yyv3774 = []ContainerStatus{} - yyc3774 = true - } else if len(yyv3774) != 0 { - yyv3774 = yyv3774[:0] - yyc3774 = true - } - } else if yyl3774 > 0 { - var yyrr3774, yyrl3774 int - var yyrt3774 bool - if yyl3774 > cap(yyv3774) { - - yyrg3774 := len(yyv3774) > 0 - yyv23774 := yyv3774 - yyrl3774, yyrt3774 = z.DecInferLen(yyl3774, z.DecBasicHandle().MaxInitLen, 128) - if yyrt3774 { - if yyrl3774 <= cap(yyv3774) { - yyv3774 = yyv3774[:yyrl3774] - } else { - yyv3774 = make([]ContainerStatus, yyrl3774) - } - } else { - yyv3774 = make([]ContainerStatus, yyrl3774) - } - yyc3774 = true - yyrr3774 = len(yyv3774) - if yyrg3774 { - copy(yyv3774, yyv23774) - } - } else if yyl3774 != len(yyv3774) { - yyv3774 = yyv3774[:yyl3774] - yyc3774 = true - } - yyj3774 := 0 - for ; yyj3774 < yyrr3774; yyj3774++ { - yyh3774.ElemContainerState(yyj3774) - if r.TryDecodeAsNil() { - yyv3774[yyj3774] = ContainerStatus{} - } else { - yyv3775 := &yyv3774[yyj3774] - yyv3775.CodecDecodeSelf(d) - } - - } - if yyrt3774 { - for ; yyj3774 < yyl3774; yyj3774++ { - yyv3774 = append(yyv3774, ContainerStatus{}) - yyh3774.ElemContainerState(yyj3774) - if r.TryDecodeAsNil() { - yyv3774[yyj3774] = ContainerStatus{} - } else { - yyv3776 := &yyv3774[yyj3774] - yyv3776.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3774 := 0 - for ; !r.CheckBreak(); yyj3774++ { - - if yyj3774 >= len(yyv3774) { - yyv3774 = append(yyv3774, ContainerStatus{}) // var yyz3774 ContainerStatus - yyc3774 = true - } - yyh3774.ElemContainerState(yyj3774) - if yyj3774 < len(yyv3774) { - if r.TryDecodeAsNil() { - yyv3774[yyj3774] = ContainerStatus{} - } else { - yyv3777 := &yyv3774[yyj3774] - yyv3777.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3774 < len(yyv3774) { - yyv3774 = yyv3774[:yyj3774] - yyc3774 = true - } else if yyj3774 == 0 && yyv3774 == nil { - yyv3774 = []ContainerStatus{} - yyc3774 = true - } - } - yyh3774.End() - if yyc3774 { - *v = yyv3774 - } -} - -func (x codecSelfer1234) encSlicePodTemplate(v []PodTemplate, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3778 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3779 := &yyv3778 - yy3779.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSlicePodTemplate(v *[]PodTemplate, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3780 := *v - yyh3780, yyl3780 := z.DecSliceHelperStart() - var yyc3780 bool - if yyl3780 == 0 { - if yyv3780 == nil { - yyv3780 = []PodTemplate{} - yyc3780 = true - } else if len(yyv3780) != 0 { - yyv3780 = yyv3780[:0] - yyc3780 = true - } - } else if yyl3780 > 0 { - var yyrr3780, yyrl3780 int - var yyrt3780 bool - if yyl3780 > cap(yyv3780) { - - yyrg3780 := len(yyv3780) > 0 - yyv23780 := yyv3780 - yyrl3780, yyrt3780 = z.DecInferLen(yyl3780, z.DecBasicHandle().MaxInitLen, 520) - if yyrt3780 { - if yyrl3780 <= cap(yyv3780) { - yyv3780 = yyv3780[:yyrl3780] - } else { - yyv3780 = make([]PodTemplate, yyrl3780) - } - } else { - yyv3780 = make([]PodTemplate, yyrl3780) - } - yyc3780 = true - yyrr3780 = len(yyv3780) - if yyrg3780 { - copy(yyv3780, yyv23780) - } - } else if yyl3780 != len(yyv3780) { - yyv3780 = yyv3780[:yyl3780] - yyc3780 = true - } - yyj3780 := 0 - for ; yyj3780 < yyrr3780; yyj3780++ { - yyh3780.ElemContainerState(yyj3780) - if r.TryDecodeAsNil() { - yyv3780[yyj3780] = PodTemplate{} - } else { - yyv3781 := &yyv3780[yyj3780] - yyv3781.CodecDecodeSelf(d) - } - - } - if yyrt3780 { - for ; yyj3780 < yyl3780; yyj3780++ { - yyv3780 = append(yyv3780, PodTemplate{}) - yyh3780.ElemContainerState(yyj3780) - if r.TryDecodeAsNil() { - yyv3780[yyj3780] = PodTemplate{} - } else { - yyv3782 := &yyv3780[yyj3780] - yyv3782.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3780 := 0 - for ; !r.CheckBreak(); yyj3780++ { - - if yyj3780 >= len(yyv3780) { - yyv3780 = append(yyv3780, PodTemplate{}) // var yyz3780 PodTemplate - yyc3780 = true - } - yyh3780.ElemContainerState(yyj3780) - if yyj3780 < len(yyv3780) { - if r.TryDecodeAsNil() { - yyv3780[yyj3780] = PodTemplate{} - } else { - yyv3783 := &yyv3780[yyj3780] - yyv3783.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3780 < len(yyv3780) { - yyv3780 = yyv3780[:yyj3780] - yyc3780 = true - } else if yyj3780 == 0 && yyv3780 == nil { - yyv3780 = []PodTemplate{} - yyc3780 = true - } - } - yyh3780.End() - if yyc3780 { - *v = yyv3780 - } -} - -func (x codecSelfer1234) encSliceReplicationController(v []ReplicationController, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3784 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3785 := &yyv3784 - yy3785.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceReplicationController(v *[]ReplicationController, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3786 := *v - yyh3786, yyl3786 := z.DecSliceHelperStart() - var yyc3786 bool - if yyl3786 == 0 { - if yyv3786 == nil { - yyv3786 = []ReplicationController{} - yyc3786 = true - } else if len(yyv3786) != 0 { - yyv3786 = yyv3786[:0] - yyc3786 = true - } - } else if yyl3786 > 0 { - var yyrr3786, yyrl3786 int - var yyrt3786 bool - if yyl3786 > cap(yyv3786) { - - yyrg3786 := len(yyv3786) > 0 - yyv23786 := yyv3786 - yyrl3786, yyrt3786 = z.DecInferLen(yyl3786, z.DecBasicHandle().MaxInitLen, 232) - if yyrt3786 { - if yyrl3786 <= cap(yyv3786) { - yyv3786 = yyv3786[:yyrl3786] - } else { - yyv3786 = make([]ReplicationController, yyrl3786) - } - } else { - yyv3786 = make([]ReplicationController, yyrl3786) - } - yyc3786 = true - yyrr3786 = len(yyv3786) - if yyrg3786 { - copy(yyv3786, yyv23786) - } - } else if yyl3786 != len(yyv3786) { - yyv3786 = yyv3786[:yyl3786] - yyc3786 = true - } - yyj3786 := 0 - for ; yyj3786 < yyrr3786; yyj3786++ { - yyh3786.ElemContainerState(yyj3786) - if r.TryDecodeAsNil() { - yyv3786[yyj3786] = ReplicationController{} - } else { - yyv3787 := &yyv3786[yyj3786] - yyv3787.CodecDecodeSelf(d) - } - - } - if yyrt3786 { - for ; yyj3786 < yyl3786; yyj3786++ { - yyv3786 = append(yyv3786, ReplicationController{}) - yyh3786.ElemContainerState(yyj3786) - if r.TryDecodeAsNil() { - yyv3786[yyj3786] = ReplicationController{} - } else { - yyv3788 := &yyv3786[yyj3786] - yyv3788.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3786 := 0 - for ; !r.CheckBreak(); yyj3786++ { - - if yyj3786 >= len(yyv3786) { - yyv3786 = append(yyv3786, ReplicationController{}) // var yyz3786 ReplicationController - yyc3786 = true - } - yyh3786.ElemContainerState(yyj3786) - if yyj3786 < len(yyv3786) { - if r.TryDecodeAsNil() { - yyv3786[yyj3786] = ReplicationController{} - } else { - yyv3789 := &yyv3786[yyj3786] - yyv3789.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3786 < len(yyv3786) { - yyv3786 = yyv3786[:yyj3786] - yyc3786 = true - } else if yyj3786 == 0 && yyv3786 == nil { - yyv3786 = []ReplicationController{} - yyc3786 = true - } - } - yyh3786.End() - if yyc3786 { - *v = yyv3786 - } -} - -func (x codecSelfer1234) encSliceService(v []Service, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3790 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3791 := &yyv3790 - yy3791.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceService(v *[]Service, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3792 := *v - yyh3792, yyl3792 := z.DecSliceHelperStart() - var yyc3792 bool - if yyl3792 == 0 { - if yyv3792 == nil { - yyv3792 = []Service{} - yyc3792 = true - } else if len(yyv3792) != 0 { - yyv3792 = yyv3792[:0] - yyc3792 = true - } - } else if yyl3792 > 0 { - var yyrr3792, yyrl3792 int - var yyrt3792 bool - if yyl3792 > cap(yyv3792) { - - yyrg3792 := len(yyv3792) > 0 - yyv23792 := yyv3792 - yyrl3792, yyrt3792 = z.DecInferLen(yyl3792, z.DecBasicHandle().MaxInitLen, 336) - if yyrt3792 { - if yyrl3792 <= cap(yyv3792) { - yyv3792 = yyv3792[:yyrl3792] - } else { - yyv3792 = make([]Service, yyrl3792) - } - } else { - yyv3792 = make([]Service, yyrl3792) - } - yyc3792 = true - yyrr3792 = len(yyv3792) - if yyrg3792 { - copy(yyv3792, yyv23792) - } - } else if yyl3792 != len(yyv3792) { - yyv3792 = yyv3792[:yyl3792] - yyc3792 = true - } - yyj3792 := 0 - for ; yyj3792 < yyrr3792; yyj3792++ { - yyh3792.ElemContainerState(yyj3792) - if r.TryDecodeAsNil() { - yyv3792[yyj3792] = Service{} - } else { - yyv3793 := &yyv3792[yyj3792] - yyv3793.CodecDecodeSelf(d) - } - - } - if yyrt3792 { - for ; yyj3792 < yyl3792; yyj3792++ { - yyv3792 = append(yyv3792, Service{}) - yyh3792.ElemContainerState(yyj3792) - if r.TryDecodeAsNil() { - yyv3792[yyj3792] = Service{} - } else { - yyv3794 := &yyv3792[yyj3792] - yyv3794.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3792 := 0 - for ; !r.CheckBreak(); yyj3792++ { - - if yyj3792 >= len(yyv3792) { - yyv3792 = append(yyv3792, Service{}) // var yyz3792 Service - yyc3792 = true - } - yyh3792.ElemContainerState(yyj3792) - if yyj3792 < len(yyv3792) { - if r.TryDecodeAsNil() { - yyv3792[yyj3792] = Service{} - } else { - yyv3795 := &yyv3792[yyj3792] - yyv3795.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3792 < len(yyv3792) { - yyv3792 = yyv3792[:yyj3792] - yyc3792 = true - } else if yyj3792 == 0 && yyv3792 == nil { - yyv3792 = []Service{} - yyc3792 = true - } - } - yyh3792.End() - if yyc3792 { - *v = yyv3792 - } -} - -func (x codecSelfer1234) encSliceLoadBalancerIngress(v []LoadBalancerIngress, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3796 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3797 := &yyv3796 - yy3797.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceLoadBalancerIngress(v *[]LoadBalancerIngress, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3798 := *v - yyh3798, yyl3798 := z.DecSliceHelperStart() - var yyc3798 bool - if yyl3798 == 0 { - if yyv3798 == nil { - yyv3798 = []LoadBalancerIngress{} - yyc3798 = true - } else if len(yyv3798) != 0 { - yyv3798 = yyv3798[:0] - yyc3798 = true - } - } else if yyl3798 > 0 { - var yyrr3798, yyrl3798 int - var yyrt3798 bool - if yyl3798 > cap(yyv3798) { - - yyrg3798 := len(yyv3798) > 0 - yyv23798 := yyv3798 - yyrl3798, yyrt3798 = z.DecInferLen(yyl3798, z.DecBasicHandle().MaxInitLen, 32) - if yyrt3798 { - if yyrl3798 <= cap(yyv3798) { - yyv3798 = yyv3798[:yyrl3798] - } else { - yyv3798 = make([]LoadBalancerIngress, yyrl3798) - } - } else { - yyv3798 = make([]LoadBalancerIngress, yyrl3798) - } - yyc3798 = true - yyrr3798 = len(yyv3798) - if yyrg3798 { - copy(yyv3798, yyv23798) - } - } else if yyl3798 != len(yyv3798) { - yyv3798 = yyv3798[:yyl3798] - yyc3798 = true - } - yyj3798 := 0 - for ; yyj3798 < yyrr3798; yyj3798++ { - yyh3798.ElemContainerState(yyj3798) - if r.TryDecodeAsNil() { - yyv3798[yyj3798] = LoadBalancerIngress{} - } else { - yyv3799 := &yyv3798[yyj3798] - yyv3799.CodecDecodeSelf(d) - } - - } - if yyrt3798 { - for ; yyj3798 < yyl3798; yyj3798++ { - yyv3798 = append(yyv3798, LoadBalancerIngress{}) - yyh3798.ElemContainerState(yyj3798) - if r.TryDecodeAsNil() { - yyv3798[yyj3798] = LoadBalancerIngress{} - } else { - yyv3800 := &yyv3798[yyj3798] - yyv3800.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3798 := 0 - for ; !r.CheckBreak(); yyj3798++ { - - if yyj3798 >= len(yyv3798) { - yyv3798 = append(yyv3798, LoadBalancerIngress{}) // var yyz3798 LoadBalancerIngress - yyc3798 = true - } - yyh3798.ElemContainerState(yyj3798) - if yyj3798 < len(yyv3798) { - if r.TryDecodeAsNil() { - yyv3798[yyj3798] = LoadBalancerIngress{} - } else { - yyv3801 := &yyv3798[yyj3798] - yyv3801.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3798 < len(yyv3798) { - yyv3798 = yyv3798[:yyj3798] - yyc3798 = true - } else if yyj3798 == 0 && yyv3798 == nil { - yyv3798 = []LoadBalancerIngress{} - yyc3798 = true - } - } - yyh3798.End() - if yyc3798 { - *v = yyv3798 - } -} - -func (x codecSelfer1234) encSliceServicePort(v []ServicePort, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3802 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3803 := &yyv3802 - yy3803.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceServicePort(v *[]ServicePort, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3804 := *v - yyh3804, yyl3804 := z.DecSliceHelperStart() - var yyc3804 bool - if yyl3804 == 0 { - if yyv3804 == nil { - yyv3804 = []ServicePort{} - yyc3804 = true - } else if len(yyv3804) != 0 { - yyv3804 = yyv3804[:0] - yyc3804 = true - } - } else if yyl3804 > 0 { - var yyrr3804, yyrl3804 int - var yyrt3804 bool - if yyl3804 > cap(yyv3804) { - - yyrg3804 := len(yyv3804) > 0 - yyv23804 := yyv3804 - yyrl3804, yyrt3804 = z.DecInferLen(yyl3804, z.DecBasicHandle().MaxInitLen, 80) - if yyrt3804 { - if yyrl3804 <= cap(yyv3804) { - yyv3804 = yyv3804[:yyrl3804] - } else { - yyv3804 = make([]ServicePort, yyrl3804) - } - } else { - yyv3804 = make([]ServicePort, yyrl3804) - } - yyc3804 = true - yyrr3804 = len(yyv3804) - if yyrg3804 { - copy(yyv3804, yyv23804) - } - } else if yyl3804 != len(yyv3804) { - yyv3804 = yyv3804[:yyl3804] - yyc3804 = true - } - yyj3804 := 0 - for ; yyj3804 < yyrr3804; yyj3804++ { - yyh3804.ElemContainerState(yyj3804) - if r.TryDecodeAsNil() { - yyv3804[yyj3804] = ServicePort{} - } else { - yyv3805 := &yyv3804[yyj3804] - yyv3805.CodecDecodeSelf(d) - } - - } - if yyrt3804 { - for ; yyj3804 < yyl3804; yyj3804++ { - yyv3804 = append(yyv3804, ServicePort{}) - yyh3804.ElemContainerState(yyj3804) - if r.TryDecodeAsNil() { - yyv3804[yyj3804] = ServicePort{} - } else { - yyv3806 := &yyv3804[yyj3804] - yyv3806.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3804 := 0 - for ; !r.CheckBreak(); yyj3804++ { - - if yyj3804 >= len(yyv3804) { - yyv3804 = append(yyv3804, ServicePort{}) // var yyz3804 ServicePort - yyc3804 = true - } - yyh3804.ElemContainerState(yyj3804) - if yyj3804 < len(yyv3804) { - if r.TryDecodeAsNil() { - yyv3804[yyj3804] = ServicePort{} - } else { - yyv3807 := &yyv3804[yyj3804] - yyv3807.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3804 < len(yyv3804) { - yyv3804 = yyv3804[:yyj3804] - yyc3804 = true - } else if yyj3804 == 0 && yyv3804 == nil { - yyv3804 = []ServicePort{} - yyc3804 = true - } - } - yyh3804.End() - if yyc3804 { - *v = yyv3804 - } -} - -func (x codecSelfer1234) encSliceObjectReference(v []ObjectReference, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3808 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3809 := &yyv3808 - yy3809.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceObjectReference(v *[]ObjectReference, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3810 := *v - yyh3810, yyl3810 := z.DecSliceHelperStart() - var yyc3810 bool - if yyl3810 == 0 { - if yyv3810 == nil { - yyv3810 = []ObjectReference{} - yyc3810 = true - } else if len(yyv3810) != 0 { - yyv3810 = yyv3810[:0] - yyc3810 = true - } - } else if yyl3810 > 0 { - var yyrr3810, yyrl3810 int - var yyrt3810 bool - if yyl3810 > cap(yyv3810) { - - yyrg3810 := len(yyv3810) > 0 - yyv23810 := yyv3810 - yyrl3810, yyrt3810 = z.DecInferLen(yyl3810, z.DecBasicHandle().MaxInitLen, 112) - if yyrt3810 { - if yyrl3810 <= cap(yyv3810) { - yyv3810 = yyv3810[:yyrl3810] - } else { - yyv3810 = make([]ObjectReference, yyrl3810) - } - } else { - yyv3810 = make([]ObjectReference, yyrl3810) - } - yyc3810 = true - yyrr3810 = len(yyv3810) - if yyrg3810 { - copy(yyv3810, yyv23810) - } - } else if yyl3810 != len(yyv3810) { - yyv3810 = yyv3810[:yyl3810] - yyc3810 = true - } - yyj3810 := 0 - for ; yyj3810 < yyrr3810; yyj3810++ { - yyh3810.ElemContainerState(yyj3810) - if r.TryDecodeAsNil() { - yyv3810[yyj3810] = ObjectReference{} - } else { - yyv3811 := &yyv3810[yyj3810] - yyv3811.CodecDecodeSelf(d) - } - - } - if yyrt3810 { - for ; yyj3810 < yyl3810; yyj3810++ { - yyv3810 = append(yyv3810, ObjectReference{}) - yyh3810.ElemContainerState(yyj3810) - if r.TryDecodeAsNil() { - yyv3810[yyj3810] = ObjectReference{} - } else { - yyv3812 := &yyv3810[yyj3810] - yyv3812.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3810 := 0 - for ; !r.CheckBreak(); yyj3810++ { - - if yyj3810 >= len(yyv3810) { - yyv3810 = append(yyv3810, ObjectReference{}) // var yyz3810 ObjectReference - yyc3810 = true - } - yyh3810.ElemContainerState(yyj3810) - if yyj3810 < len(yyv3810) { - if r.TryDecodeAsNil() { - yyv3810[yyj3810] = ObjectReference{} - } else { - yyv3813 := &yyv3810[yyj3810] - yyv3813.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3810 < len(yyv3810) { - yyv3810 = yyv3810[:yyj3810] - yyc3810 = true - } else if yyj3810 == 0 && yyv3810 == nil { - yyv3810 = []ObjectReference{} - yyc3810 = true - } - } - yyh3810.End() - if yyc3810 { - *v = yyv3810 - } -} - -func (x codecSelfer1234) encSliceServiceAccount(v []ServiceAccount, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3814 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3815 := &yyv3814 - yy3815.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceServiceAccount(v *[]ServiceAccount, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3816 := *v - yyh3816, yyl3816 := z.DecSliceHelperStart() - var yyc3816 bool - if yyl3816 == 0 { - if yyv3816 == nil { - yyv3816 = []ServiceAccount{} - yyc3816 = true - } else if len(yyv3816) != 0 { - yyv3816 = yyv3816[:0] - yyc3816 = true - } - } else if yyl3816 > 0 { - var yyrr3816, yyrl3816 int - var yyrt3816 bool - if yyl3816 > cap(yyv3816) { - - yyrg3816 := len(yyv3816) > 0 - yyv23816 := yyv3816 - yyrl3816, yyrt3816 = z.DecInferLen(yyl3816, z.DecBasicHandle().MaxInitLen, 240) - if yyrt3816 { - if yyrl3816 <= cap(yyv3816) { - yyv3816 = yyv3816[:yyrl3816] - } else { - yyv3816 = make([]ServiceAccount, yyrl3816) - } - } else { - yyv3816 = make([]ServiceAccount, yyrl3816) - } - yyc3816 = true - yyrr3816 = len(yyv3816) - if yyrg3816 { - copy(yyv3816, yyv23816) - } - } else if yyl3816 != len(yyv3816) { - yyv3816 = yyv3816[:yyl3816] - yyc3816 = true - } - yyj3816 := 0 - for ; yyj3816 < yyrr3816; yyj3816++ { - yyh3816.ElemContainerState(yyj3816) - if r.TryDecodeAsNil() { - yyv3816[yyj3816] = ServiceAccount{} - } else { - yyv3817 := &yyv3816[yyj3816] - yyv3817.CodecDecodeSelf(d) - } - - } - if yyrt3816 { - for ; yyj3816 < yyl3816; yyj3816++ { - yyv3816 = append(yyv3816, ServiceAccount{}) - yyh3816.ElemContainerState(yyj3816) - if r.TryDecodeAsNil() { - yyv3816[yyj3816] = ServiceAccount{} - } else { - yyv3818 := &yyv3816[yyj3816] - yyv3818.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3816 := 0 - for ; !r.CheckBreak(); yyj3816++ { - - if yyj3816 >= len(yyv3816) { - yyv3816 = append(yyv3816, ServiceAccount{}) // var yyz3816 ServiceAccount - yyc3816 = true - } - yyh3816.ElemContainerState(yyj3816) - if yyj3816 < len(yyv3816) { - if r.TryDecodeAsNil() { - yyv3816[yyj3816] = ServiceAccount{} - } else { - yyv3819 := &yyv3816[yyj3816] - yyv3819.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3816 < len(yyv3816) { - yyv3816 = yyv3816[:yyj3816] - yyc3816 = true - } else if yyj3816 == 0 && yyv3816 == nil { - yyv3816 = []ServiceAccount{} - yyc3816 = true - } - } - yyh3816.End() - if yyc3816 { - *v = yyv3816 - } -} - -func (x codecSelfer1234) encSliceEndpointSubset(v []EndpointSubset, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3820 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3821 := &yyv3820 - yy3821.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceEndpointSubset(v *[]EndpointSubset, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3822 := *v - yyh3822, yyl3822 := z.DecSliceHelperStart() - var yyc3822 bool - if yyl3822 == 0 { - if yyv3822 == nil { - yyv3822 = []EndpointSubset{} - yyc3822 = true - } else if len(yyv3822) != 0 { - yyv3822 = yyv3822[:0] - yyc3822 = true - } - } else if yyl3822 > 0 { - var yyrr3822, yyrl3822 int - var yyrt3822 bool - if yyl3822 > cap(yyv3822) { - - yyrg3822 := len(yyv3822) > 0 - yyv23822 := yyv3822 - yyrl3822, yyrt3822 = z.DecInferLen(yyl3822, z.DecBasicHandle().MaxInitLen, 72) - if yyrt3822 { - if yyrl3822 <= cap(yyv3822) { - yyv3822 = yyv3822[:yyrl3822] - } else { - yyv3822 = make([]EndpointSubset, yyrl3822) - } - } else { - yyv3822 = make([]EndpointSubset, yyrl3822) - } - yyc3822 = true - yyrr3822 = len(yyv3822) - if yyrg3822 { - copy(yyv3822, yyv23822) - } - } else if yyl3822 != len(yyv3822) { - yyv3822 = yyv3822[:yyl3822] - yyc3822 = true - } - yyj3822 := 0 - for ; yyj3822 < yyrr3822; yyj3822++ { - yyh3822.ElemContainerState(yyj3822) - if r.TryDecodeAsNil() { - yyv3822[yyj3822] = EndpointSubset{} - } else { - yyv3823 := &yyv3822[yyj3822] - yyv3823.CodecDecodeSelf(d) - } - - } - if yyrt3822 { - for ; yyj3822 < yyl3822; yyj3822++ { - yyv3822 = append(yyv3822, EndpointSubset{}) - yyh3822.ElemContainerState(yyj3822) - if r.TryDecodeAsNil() { - yyv3822[yyj3822] = EndpointSubset{} - } else { - yyv3824 := &yyv3822[yyj3822] - yyv3824.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3822 := 0 - for ; !r.CheckBreak(); yyj3822++ { - - if yyj3822 >= len(yyv3822) { - yyv3822 = append(yyv3822, EndpointSubset{}) // var yyz3822 EndpointSubset - yyc3822 = true - } - yyh3822.ElemContainerState(yyj3822) - if yyj3822 < len(yyv3822) { - if r.TryDecodeAsNil() { - yyv3822[yyj3822] = EndpointSubset{} - } else { - yyv3825 := &yyv3822[yyj3822] - yyv3825.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3822 < len(yyv3822) { - yyv3822 = yyv3822[:yyj3822] - yyc3822 = true - } else if yyj3822 == 0 && yyv3822 == nil { - yyv3822 = []EndpointSubset{} - yyc3822 = true - } - } - yyh3822.End() - if yyc3822 { - *v = yyv3822 - } -} - -func (x codecSelfer1234) encSliceEndpointAddress(v []EndpointAddress, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3826 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3827 := &yyv3826 - yy3827.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceEndpointAddress(v *[]EndpointAddress, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3828 := *v - yyh3828, yyl3828 := z.DecSliceHelperStart() - var yyc3828 bool - if yyl3828 == 0 { - if yyv3828 == nil { - yyv3828 = []EndpointAddress{} - yyc3828 = true - } else if len(yyv3828) != 0 { - yyv3828 = yyv3828[:0] - yyc3828 = true - } - } else if yyl3828 > 0 { - var yyrr3828, yyrl3828 int - var yyrt3828 bool - if yyl3828 > cap(yyv3828) { - - yyrg3828 := len(yyv3828) > 0 - yyv23828 := yyv3828 - yyrl3828, yyrt3828 = z.DecInferLen(yyl3828, z.DecBasicHandle().MaxInitLen, 24) - if yyrt3828 { - if yyrl3828 <= cap(yyv3828) { - yyv3828 = yyv3828[:yyrl3828] - } else { - yyv3828 = make([]EndpointAddress, yyrl3828) - } - } else { - yyv3828 = make([]EndpointAddress, yyrl3828) - } - yyc3828 = true - yyrr3828 = len(yyv3828) - if yyrg3828 { - copy(yyv3828, yyv23828) - } - } else if yyl3828 != len(yyv3828) { - yyv3828 = yyv3828[:yyl3828] - yyc3828 = true - } - yyj3828 := 0 - for ; yyj3828 < yyrr3828; yyj3828++ { - yyh3828.ElemContainerState(yyj3828) - if r.TryDecodeAsNil() { - yyv3828[yyj3828] = EndpointAddress{} - } else { - yyv3829 := &yyv3828[yyj3828] - yyv3829.CodecDecodeSelf(d) - } - - } - if yyrt3828 { - for ; yyj3828 < yyl3828; yyj3828++ { - yyv3828 = append(yyv3828, EndpointAddress{}) - yyh3828.ElemContainerState(yyj3828) - if r.TryDecodeAsNil() { - yyv3828[yyj3828] = EndpointAddress{} - } else { - yyv3830 := &yyv3828[yyj3828] - yyv3830.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3828 := 0 - for ; !r.CheckBreak(); yyj3828++ { - - if yyj3828 >= len(yyv3828) { - yyv3828 = append(yyv3828, EndpointAddress{}) // var yyz3828 EndpointAddress - yyc3828 = true - } - yyh3828.ElemContainerState(yyj3828) - if yyj3828 < len(yyv3828) { - if r.TryDecodeAsNil() { - yyv3828[yyj3828] = EndpointAddress{} - } else { - yyv3831 := &yyv3828[yyj3828] - yyv3831.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3828 < len(yyv3828) { - yyv3828 = yyv3828[:yyj3828] - yyc3828 = true - } else if yyj3828 == 0 && yyv3828 == nil { - yyv3828 = []EndpointAddress{} - yyc3828 = true - } - } - yyh3828.End() - if yyc3828 { - *v = yyv3828 - } -} - -func (x codecSelfer1234) encSliceEndpointPort(v []EndpointPort, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3832 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3833 := &yyv3832 - yy3833.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceEndpointPort(v *[]EndpointPort, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3834 := *v - yyh3834, yyl3834 := z.DecSliceHelperStart() - var yyc3834 bool - if yyl3834 == 0 { - if yyv3834 == nil { - yyv3834 = []EndpointPort{} - yyc3834 = true - } else if len(yyv3834) != 0 { - yyv3834 = yyv3834[:0] - yyc3834 = true - } - } else if yyl3834 > 0 { - var yyrr3834, yyrl3834 int - var yyrt3834 bool - if yyl3834 > cap(yyv3834) { - - yyrg3834 := len(yyv3834) > 0 - yyv23834 := yyv3834 - yyrl3834, yyrt3834 = z.DecInferLen(yyl3834, z.DecBasicHandle().MaxInitLen, 40) - if yyrt3834 { - if yyrl3834 <= cap(yyv3834) { - yyv3834 = yyv3834[:yyrl3834] - } else { - yyv3834 = make([]EndpointPort, yyrl3834) - } - } else { - yyv3834 = make([]EndpointPort, yyrl3834) - } - yyc3834 = true - yyrr3834 = len(yyv3834) - if yyrg3834 { - copy(yyv3834, yyv23834) - } - } else if yyl3834 != len(yyv3834) { - yyv3834 = yyv3834[:yyl3834] - yyc3834 = true - } - yyj3834 := 0 - for ; yyj3834 < yyrr3834; yyj3834++ { - yyh3834.ElemContainerState(yyj3834) - if r.TryDecodeAsNil() { - yyv3834[yyj3834] = EndpointPort{} - } else { - yyv3835 := &yyv3834[yyj3834] - yyv3835.CodecDecodeSelf(d) - } - - } - if yyrt3834 { - for ; yyj3834 < yyl3834; yyj3834++ { - yyv3834 = append(yyv3834, EndpointPort{}) - yyh3834.ElemContainerState(yyj3834) - if r.TryDecodeAsNil() { - yyv3834[yyj3834] = EndpointPort{} - } else { - yyv3836 := &yyv3834[yyj3834] - yyv3836.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3834 := 0 - for ; !r.CheckBreak(); yyj3834++ { - - if yyj3834 >= len(yyv3834) { - yyv3834 = append(yyv3834, EndpointPort{}) // var yyz3834 EndpointPort - yyc3834 = true - } - yyh3834.ElemContainerState(yyj3834) - if yyj3834 < len(yyv3834) { - if r.TryDecodeAsNil() { - yyv3834[yyj3834] = EndpointPort{} - } else { - yyv3837 := &yyv3834[yyj3834] - yyv3837.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3834 < len(yyv3834) { - yyv3834 = yyv3834[:yyj3834] - yyc3834 = true - } else if yyj3834 == 0 && yyv3834 == nil { - yyv3834 = []EndpointPort{} - yyc3834 = true - } - } - yyh3834.End() - if yyc3834 { - *v = yyv3834 - } -} - -func (x codecSelfer1234) encSliceEndpoints(v []Endpoints, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3838 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3839 := &yyv3838 - yy3839.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceEndpoints(v *[]Endpoints, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3840 := *v - yyh3840, yyl3840 := z.DecSliceHelperStart() - var yyc3840 bool - if yyl3840 == 0 { - if yyv3840 == nil { - yyv3840 = []Endpoints{} - yyc3840 = true - } else if len(yyv3840) != 0 { - yyv3840 = yyv3840[:0] - yyc3840 = true - } - } else if yyl3840 > 0 { - var yyrr3840, yyrl3840 int - var yyrt3840 bool - if yyl3840 > cap(yyv3840) { - - yyrg3840 := len(yyv3840) > 0 - yyv23840 := yyv3840 - yyrl3840, yyrt3840 = z.DecInferLen(yyl3840, z.DecBasicHandle().MaxInitLen, 216) - if yyrt3840 { - if yyrl3840 <= cap(yyv3840) { - yyv3840 = yyv3840[:yyrl3840] - } else { - yyv3840 = make([]Endpoints, yyrl3840) - } - } else { - yyv3840 = make([]Endpoints, yyrl3840) - } - yyc3840 = true - yyrr3840 = len(yyv3840) - if yyrg3840 { - copy(yyv3840, yyv23840) - } - } else if yyl3840 != len(yyv3840) { - yyv3840 = yyv3840[:yyl3840] - yyc3840 = true - } - yyj3840 := 0 - for ; yyj3840 < yyrr3840; yyj3840++ { - yyh3840.ElemContainerState(yyj3840) - if r.TryDecodeAsNil() { - yyv3840[yyj3840] = Endpoints{} - } else { - yyv3841 := &yyv3840[yyj3840] - yyv3841.CodecDecodeSelf(d) - } - - } - if yyrt3840 { - for ; yyj3840 < yyl3840; yyj3840++ { - yyv3840 = append(yyv3840, Endpoints{}) - yyh3840.ElemContainerState(yyj3840) - if r.TryDecodeAsNil() { - yyv3840[yyj3840] = Endpoints{} - } else { - yyv3842 := &yyv3840[yyj3840] - yyv3842.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3840 := 0 - for ; !r.CheckBreak(); yyj3840++ { - - if yyj3840 >= len(yyv3840) { - yyv3840 = append(yyv3840, Endpoints{}) // var yyz3840 Endpoints - yyc3840 = true - } - yyh3840.ElemContainerState(yyj3840) - if yyj3840 < len(yyv3840) { - if r.TryDecodeAsNil() { - yyv3840[yyj3840] = Endpoints{} - } else { - yyv3843 := &yyv3840[yyj3840] - yyv3843.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3840 < len(yyv3840) { - yyv3840 = yyv3840[:yyj3840] - yyc3840 = true - } else if yyj3840 == 0 && yyv3840 == nil { - yyv3840 = []Endpoints{} - yyc3840 = true - } - } - yyh3840.End() - if yyc3840 { - *v = yyv3840 - } -} - -func (x codecSelfer1234) encSliceNodeCondition(v []NodeCondition, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3844 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3845 := &yyv3844 - yy3845.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceNodeCondition(v *[]NodeCondition, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3846 := *v - yyh3846, yyl3846 := z.DecSliceHelperStart() - var yyc3846 bool - if yyl3846 == 0 { - if yyv3846 == nil { - yyv3846 = []NodeCondition{} - yyc3846 = true - } else if len(yyv3846) != 0 { - yyv3846 = yyv3846[:0] - yyc3846 = true - } - } else if yyl3846 > 0 { - var yyrr3846, yyrl3846 int - var yyrt3846 bool - if yyl3846 > cap(yyv3846) { - - yyrg3846 := len(yyv3846) > 0 - yyv23846 := yyv3846 - yyrl3846, yyrt3846 = z.DecInferLen(yyl3846, z.DecBasicHandle().MaxInitLen, 112) - if yyrt3846 { - if yyrl3846 <= cap(yyv3846) { - yyv3846 = yyv3846[:yyrl3846] - } else { - yyv3846 = make([]NodeCondition, yyrl3846) - } - } else { - yyv3846 = make([]NodeCondition, yyrl3846) - } - yyc3846 = true - yyrr3846 = len(yyv3846) - if yyrg3846 { - copy(yyv3846, yyv23846) - } - } else if yyl3846 != len(yyv3846) { - yyv3846 = yyv3846[:yyl3846] - yyc3846 = true - } - yyj3846 := 0 - for ; yyj3846 < yyrr3846; yyj3846++ { - yyh3846.ElemContainerState(yyj3846) - if r.TryDecodeAsNil() { - yyv3846[yyj3846] = NodeCondition{} - } else { - yyv3847 := &yyv3846[yyj3846] - yyv3847.CodecDecodeSelf(d) - } - - } - if yyrt3846 { - for ; yyj3846 < yyl3846; yyj3846++ { - yyv3846 = append(yyv3846, NodeCondition{}) - yyh3846.ElemContainerState(yyj3846) - if r.TryDecodeAsNil() { - yyv3846[yyj3846] = NodeCondition{} - } else { - yyv3848 := &yyv3846[yyj3846] - yyv3848.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3846 := 0 - for ; !r.CheckBreak(); yyj3846++ { - - if yyj3846 >= len(yyv3846) { - yyv3846 = append(yyv3846, NodeCondition{}) // var yyz3846 NodeCondition - yyc3846 = true - } - yyh3846.ElemContainerState(yyj3846) - if yyj3846 < len(yyv3846) { - if r.TryDecodeAsNil() { - yyv3846[yyj3846] = NodeCondition{} - } else { - yyv3849 := &yyv3846[yyj3846] - yyv3849.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3846 < len(yyv3846) { - yyv3846 = yyv3846[:yyj3846] - yyc3846 = true - } else if yyj3846 == 0 && yyv3846 == nil { - yyv3846 = []NodeCondition{} - yyc3846 = true - } - } - yyh3846.End() - if yyc3846 { - *v = yyv3846 - } -} - -func (x codecSelfer1234) encSliceNodeAddress(v []NodeAddress, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3850 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3851 := &yyv3850 - yy3851.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceNodeAddress(v *[]NodeAddress, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3852 := *v - yyh3852, yyl3852 := z.DecSliceHelperStart() - var yyc3852 bool - if yyl3852 == 0 { - if yyv3852 == nil { - yyv3852 = []NodeAddress{} - yyc3852 = true - } else if len(yyv3852) != 0 { - yyv3852 = yyv3852[:0] - yyc3852 = true - } - } else if yyl3852 > 0 { - var yyrr3852, yyrl3852 int - var yyrt3852 bool - if yyl3852 > cap(yyv3852) { - - yyrg3852 := len(yyv3852) > 0 - yyv23852 := yyv3852 - yyrl3852, yyrt3852 = z.DecInferLen(yyl3852, z.DecBasicHandle().MaxInitLen, 32) - if yyrt3852 { - if yyrl3852 <= cap(yyv3852) { - yyv3852 = yyv3852[:yyrl3852] - } else { - yyv3852 = make([]NodeAddress, yyrl3852) - } - } else { - yyv3852 = make([]NodeAddress, yyrl3852) - } - yyc3852 = true - yyrr3852 = len(yyv3852) - if yyrg3852 { - copy(yyv3852, yyv23852) - } - } else if yyl3852 != len(yyv3852) { - yyv3852 = yyv3852[:yyl3852] - yyc3852 = true - } - yyj3852 := 0 - for ; yyj3852 < yyrr3852; yyj3852++ { - yyh3852.ElemContainerState(yyj3852) - if r.TryDecodeAsNil() { - yyv3852[yyj3852] = NodeAddress{} - } else { - yyv3853 := &yyv3852[yyj3852] - yyv3853.CodecDecodeSelf(d) - } - - } - if yyrt3852 { - for ; yyj3852 < yyl3852; yyj3852++ { - yyv3852 = append(yyv3852, NodeAddress{}) - yyh3852.ElemContainerState(yyj3852) - if r.TryDecodeAsNil() { - yyv3852[yyj3852] = NodeAddress{} - } else { - yyv3854 := &yyv3852[yyj3852] - yyv3854.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3852 := 0 - for ; !r.CheckBreak(); yyj3852++ { - - if yyj3852 >= len(yyv3852) { - yyv3852 = append(yyv3852, NodeAddress{}) // var yyz3852 NodeAddress - yyc3852 = true - } - yyh3852.ElemContainerState(yyj3852) - if yyj3852 < len(yyv3852) { - if r.TryDecodeAsNil() { - yyv3852[yyj3852] = NodeAddress{} - } else { - yyv3855 := &yyv3852[yyj3852] - yyv3855.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3852 < len(yyv3852) { - yyv3852 = yyv3852[:yyj3852] - yyc3852 = true - } else if yyj3852 == 0 && yyv3852 == nil { - yyv3852 = []NodeAddress{} - yyc3852 = true - } - } - yyh3852.End() - if yyc3852 { - *v = yyv3852 - } -} - -func (x codecSelfer1234) encSliceContainerImage(v []ContainerImage, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3856 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3857 := &yyv3856 - yy3857.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceContainerImage(v *[]ContainerImage, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3858 := *v - yyh3858, yyl3858 := z.DecSliceHelperStart() - var yyc3858 bool - if yyl3858 == 0 { - if yyv3858 == nil { - yyv3858 = []ContainerImage{} - yyc3858 = true - } else if len(yyv3858) != 0 { - yyv3858 = yyv3858[:0] - yyc3858 = true - } - } else if yyl3858 > 0 { - var yyrr3858, yyrl3858 int - var yyrt3858 bool - if yyl3858 > cap(yyv3858) { - - yyrg3858 := len(yyv3858) > 0 - yyv23858 := yyv3858 - yyrl3858, yyrt3858 = z.DecInferLen(yyl3858, z.DecBasicHandle().MaxInitLen, 32) - if yyrt3858 { - if yyrl3858 <= cap(yyv3858) { - yyv3858 = yyv3858[:yyrl3858] - } else { - yyv3858 = make([]ContainerImage, yyrl3858) - } - } else { - yyv3858 = make([]ContainerImage, yyrl3858) - } - yyc3858 = true - yyrr3858 = len(yyv3858) - if yyrg3858 { - copy(yyv3858, yyv23858) - } - } else if yyl3858 != len(yyv3858) { - yyv3858 = yyv3858[:yyl3858] - yyc3858 = true - } - yyj3858 := 0 - for ; yyj3858 < yyrr3858; yyj3858++ { - yyh3858.ElemContainerState(yyj3858) - if r.TryDecodeAsNil() { - yyv3858[yyj3858] = ContainerImage{} - } else { - yyv3859 := &yyv3858[yyj3858] - yyv3859.CodecDecodeSelf(d) - } - - } - if yyrt3858 { - for ; yyj3858 < yyl3858; yyj3858++ { - yyv3858 = append(yyv3858, ContainerImage{}) - yyh3858.ElemContainerState(yyj3858) - if r.TryDecodeAsNil() { - yyv3858[yyj3858] = ContainerImage{} - } else { - yyv3860 := &yyv3858[yyj3858] - yyv3860.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3858 := 0 - for ; !r.CheckBreak(); yyj3858++ { - - if yyj3858 >= len(yyv3858) { - yyv3858 = append(yyv3858, ContainerImage{}) // var yyz3858 ContainerImage - yyc3858 = true - } - yyh3858.ElemContainerState(yyj3858) - if yyj3858 < len(yyv3858) { - if r.TryDecodeAsNil() { - yyv3858[yyj3858] = ContainerImage{} - } else { - yyv3861 := &yyv3858[yyj3858] - yyv3861.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3858 < len(yyv3858) { - yyv3858 = yyv3858[:yyj3858] - yyc3858 = true - } else if yyj3858 == 0 && yyv3858 == nil { - yyv3858 = []ContainerImage{} - yyc3858 = true - } - } - yyh3858.End() - if yyc3858 { - *v = yyv3858 - } -} - -func (x codecSelfer1234) encResourceList(v ResourceList, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeMapStart(len(v)) - for yyk3862, yyv3862 := range v { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - yyk3862.CodecEncodeSelf(e) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3863 := &yyv3862 - yym3864 := z.EncBinary() - _ = yym3864 - if false { - } else if z.HasExtensions() && z.EncExt(yy3863) { - } else if !yym3864 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3863) - } else { - z.EncFallback(yy3863) - } - } - z.EncSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x codecSelfer1234) decResourceList(v *ResourceList, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3865 := *v - yyl3865 := r.ReadMapStart() - yybh3865 := z.DecBasicHandle() - if yyv3865 == nil { - yyrl3865, _ := z.DecInferLen(yyl3865, yybh3865.MaxInitLen, 40) - yyv3865 = make(map[ResourceName]pkg3_resource.Quantity, yyrl3865) - *v = yyv3865 - } - var yymk3865 ResourceName - var yymv3865 pkg3_resource.Quantity - var yymg3865 bool - if yybh3865.MapValueReset { - yymg3865 = true - } - if yyl3865 > 0 { - for yyj3865 := 0; yyj3865 < yyl3865; yyj3865++ { - z.DecSendContainerState(codecSelfer_containerMapKey1234) - if r.TryDecodeAsNil() { - yymk3865 = "" - } else { - yymk3865 = ResourceName(r.DecodeString()) - } - - if yymg3865 { - yymv3865 = yyv3865[yymk3865] - } else { - yymv3865 = pkg3_resource.Quantity{} - } - z.DecSendContainerState(codecSelfer_containerMapValue1234) - if r.TryDecodeAsNil() { - yymv3865 = pkg3_resource.Quantity{} - } else { - yyv3867 := &yymv3865 - yym3868 := z.DecBinary() - _ = yym3868 - if false { - } else if z.HasExtensions() && z.DecExt(yyv3867) { - } else if !yym3868 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3867) - } else { - z.DecFallback(yyv3867, false) - } - } - - if yyv3865 != nil { - yyv3865[yymk3865] = yymv3865 - } - } - } else if yyl3865 < 0 { - for yyj3865 := 0; !r.CheckBreak(); yyj3865++ { - z.DecSendContainerState(codecSelfer_containerMapKey1234) - if r.TryDecodeAsNil() { - yymk3865 = "" - } else { - yymk3865 = ResourceName(r.DecodeString()) - } - - if yymg3865 { - yymv3865 = yyv3865[yymk3865] - } else { - yymv3865 = pkg3_resource.Quantity{} - } - z.DecSendContainerState(codecSelfer_containerMapValue1234) - if r.TryDecodeAsNil() { - yymv3865 = pkg3_resource.Quantity{} - } else { - yyv3870 := &yymv3865 - yym3871 := z.DecBinary() - _ = yym3871 - if false { - } else if z.HasExtensions() && z.DecExt(yyv3870) { - } else if !yym3871 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3870) - } else { - z.DecFallback(yyv3870, false) - } - } - - if yyv3865 != nil { - yyv3865[yymk3865] = yymv3865 - } - } - } // else len==0: TODO: Should we clear map entries? - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x codecSelfer1234) encSliceNode(v []Node, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3872 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3873 := &yyv3872 - yy3873.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceNode(v *[]Node, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3874 := *v - yyh3874, yyl3874 := z.DecSliceHelperStart() - var yyc3874 bool - if yyl3874 == 0 { - if yyv3874 == nil { - yyv3874 = []Node{} - yyc3874 = true - } else if len(yyv3874) != 0 { - yyv3874 = yyv3874[:0] - yyc3874 = true - } - } else if yyl3874 > 0 { - var yyrr3874, yyrl3874 int - var yyrt3874 bool - if yyl3874 > cap(yyv3874) { - - yyrg3874 := len(yyv3874) > 0 - yyv23874 := yyv3874 - yyrl3874, yyrt3874 = z.DecInferLen(yyl3874, z.DecBasicHandle().MaxInitLen, 488) - if yyrt3874 { - if yyrl3874 <= cap(yyv3874) { - yyv3874 = yyv3874[:yyrl3874] - } else { - yyv3874 = make([]Node, yyrl3874) - } - } else { - yyv3874 = make([]Node, yyrl3874) - } - yyc3874 = true - yyrr3874 = len(yyv3874) - if yyrg3874 { - copy(yyv3874, yyv23874) - } - } else if yyl3874 != len(yyv3874) { - yyv3874 = yyv3874[:yyl3874] - yyc3874 = true - } - yyj3874 := 0 - for ; yyj3874 < yyrr3874; yyj3874++ { - yyh3874.ElemContainerState(yyj3874) - if r.TryDecodeAsNil() { - yyv3874[yyj3874] = Node{} - } else { - yyv3875 := &yyv3874[yyj3874] - yyv3875.CodecDecodeSelf(d) - } - - } - if yyrt3874 { - for ; yyj3874 < yyl3874; yyj3874++ { - yyv3874 = append(yyv3874, Node{}) - yyh3874.ElemContainerState(yyj3874) - if r.TryDecodeAsNil() { - yyv3874[yyj3874] = Node{} - } else { - yyv3876 := &yyv3874[yyj3874] - yyv3876.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3874 := 0 - for ; !r.CheckBreak(); yyj3874++ { - - if yyj3874 >= len(yyv3874) { - yyv3874 = append(yyv3874, Node{}) // var yyz3874 Node - yyc3874 = true - } - yyh3874.ElemContainerState(yyj3874) - if yyj3874 < len(yyv3874) { - if r.TryDecodeAsNil() { - yyv3874[yyj3874] = Node{} - } else { - yyv3877 := &yyv3874[yyj3874] - yyv3877.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3874 < len(yyv3874) { - yyv3874 = yyv3874[:yyj3874] - yyc3874 = true - } else if yyj3874 == 0 && yyv3874 == nil { - yyv3874 = []Node{} - yyc3874 = true - } - } - yyh3874.End() - if yyc3874 { - *v = yyv3874 - } -} - -func (x codecSelfer1234) encSliceFinalizerName(v []FinalizerName, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3878 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yyv3878.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceFinalizerName(v *[]FinalizerName, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yyv3879 := *v yyh3879, yyl3879 := z.DecSliceHelperStart() var yyc3879 bool if yyl3879 == 0 { if yyv3879 == nil { - yyv3879 = []FinalizerName{} + yyv3879 = []PodCondition{} yyc3879 = true } else if len(yyv3879) != 0 { yyv3879 = yyv3879[:0] @@ -49165,18 +48754,23 @@ func (x codecSelfer1234) decSliceFinalizerName(v *[]FinalizerName, d *codec1978. var yyrt3879 bool if yyl3879 > cap(yyv3879) { - yyrl3879, yyrt3879 = z.DecInferLen(yyl3879, z.DecBasicHandle().MaxInitLen, 16) + yyrg3879 := len(yyv3879) > 0 + yyv23879 := yyv3879 + yyrl3879, yyrt3879 = z.DecInferLen(yyl3879, z.DecBasicHandle().MaxInitLen, 112) if yyrt3879 { if yyrl3879 <= cap(yyv3879) { yyv3879 = yyv3879[:yyrl3879] } else { - yyv3879 = make([]FinalizerName, yyrl3879) + yyv3879 = make([]PodCondition, yyrl3879) } } else { - yyv3879 = make([]FinalizerName, yyrl3879) + yyv3879 = make([]PodCondition, yyrl3879) } yyc3879 = true yyrr3879 = len(yyv3879) + if yyrg3879 { + copy(yyv3879, yyv23879) + } } else if yyl3879 != len(yyv3879) { yyv3879 = yyv3879[:yyl3879] yyc3879 = true @@ -49185,20 +48779,22 @@ func (x codecSelfer1234) decSliceFinalizerName(v *[]FinalizerName, d *codec1978. for ; yyj3879 < yyrr3879; yyj3879++ { yyh3879.ElemContainerState(yyj3879) if r.TryDecodeAsNil() { - yyv3879[yyj3879] = "" + yyv3879[yyj3879] = PodCondition{} } else { - yyv3879[yyj3879] = FinalizerName(r.DecodeString()) + yyv3880 := &yyv3879[yyj3879] + yyv3880.CodecDecodeSelf(d) } } if yyrt3879 { for ; yyj3879 < yyl3879; yyj3879++ { - yyv3879 = append(yyv3879, "") + yyv3879 = append(yyv3879, PodCondition{}) yyh3879.ElemContainerState(yyj3879) if r.TryDecodeAsNil() { - yyv3879[yyj3879] = "" + yyv3879[yyj3879] = PodCondition{} } else { - yyv3879[yyj3879] = FinalizerName(r.DecodeString()) + yyv3881 := &yyv3879[yyj3879] + yyv3881.CodecDecodeSelf(d) } } @@ -49209,15 +48805,16 @@ func (x codecSelfer1234) decSliceFinalizerName(v *[]FinalizerName, d *codec1978. for ; !r.CheckBreak(); yyj3879++ { if yyj3879 >= len(yyv3879) { - yyv3879 = append(yyv3879, "") // var yyz3879 FinalizerName + yyv3879 = append(yyv3879, PodCondition{}) // var yyz3879 PodCondition yyc3879 = true } yyh3879.ElemContainerState(yyj3879) if yyj3879 < len(yyv3879) { if r.TryDecodeAsNil() { - yyv3879[yyj3879] = "" + yyv3879[yyj3879] = PodCondition{} } else { - yyv3879[yyj3879] = FinalizerName(r.DecodeString()) + yyv3882 := &yyv3879[yyj3879] + yyv3882.CodecDecodeSelf(d) } } else { @@ -49229,7 +48826,7 @@ func (x codecSelfer1234) decSliceFinalizerName(v *[]FinalizerName, d *codec1978. yyv3879 = yyv3879[:yyj3879] yyc3879 = true } else if yyj3879 == 0 && yyv3879 == nil { - yyv3879 = []FinalizerName{} + yyv3879 = []PodCondition{} yyc3879 = true } } @@ -49239,7 +48836,7 @@ func (x codecSelfer1234) decSliceFinalizerName(v *[]FinalizerName, d *codec1978. } } -func (x codecSelfer1234) encSliceNamespace(v []Namespace, e *codec1978.Encoder) { +func (x codecSelfer1234) encSliceContainerStatus(v []ContainerStatus, e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r @@ -49252,7 +48849,7 @@ func (x codecSelfer1234) encSliceNamespace(v []Namespace, e *codec1978.Encoder) z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x codecSelfer1234) decSliceNamespace(v *[]Namespace, d *codec1978.Decoder) { +func (x codecSelfer1234) decSliceContainerStatus(v *[]ContainerStatus, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r @@ -49262,7 +48859,7 @@ func (x codecSelfer1234) decSliceNamespace(v *[]Namespace, d *codec1978.Decoder) var yyc3885 bool if yyl3885 == 0 { if yyv3885 == nil { - yyv3885 = []Namespace{} + yyv3885 = []ContainerStatus{} yyc3885 = true } else if len(yyv3885) != 0 { yyv3885 = yyv3885[:0] @@ -49275,15 +48872,15 @@ func (x codecSelfer1234) decSliceNamespace(v *[]Namespace, d *codec1978.Decoder) yyrg3885 := len(yyv3885) > 0 yyv23885 := yyv3885 - yyrl3885, yyrt3885 = z.DecInferLen(yyl3885, z.DecBasicHandle().MaxInitLen, 232) + yyrl3885, yyrt3885 = z.DecInferLen(yyl3885, z.DecBasicHandle().MaxInitLen, 128) if yyrt3885 { if yyrl3885 <= cap(yyv3885) { yyv3885 = yyv3885[:yyrl3885] } else { - yyv3885 = make([]Namespace, yyrl3885) + yyv3885 = make([]ContainerStatus, yyrl3885) } } else { - yyv3885 = make([]Namespace, yyrl3885) + yyv3885 = make([]ContainerStatus, yyrl3885) } yyc3885 = true yyrr3885 = len(yyv3885) @@ -49298,7 +48895,7 @@ func (x codecSelfer1234) decSliceNamespace(v *[]Namespace, d *codec1978.Decoder) for ; yyj3885 < yyrr3885; yyj3885++ { yyh3885.ElemContainerState(yyj3885) if r.TryDecodeAsNil() { - yyv3885[yyj3885] = Namespace{} + yyv3885[yyj3885] = ContainerStatus{} } else { yyv3886 := &yyv3885[yyj3885] yyv3886.CodecDecodeSelf(d) @@ -49307,10 +48904,10 @@ func (x codecSelfer1234) decSliceNamespace(v *[]Namespace, d *codec1978.Decoder) } if yyrt3885 { for ; yyj3885 < yyl3885; yyj3885++ { - yyv3885 = append(yyv3885, Namespace{}) + yyv3885 = append(yyv3885, ContainerStatus{}) yyh3885.ElemContainerState(yyj3885) if r.TryDecodeAsNil() { - yyv3885[yyj3885] = Namespace{} + yyv3885[yyj3885] = ContainerStatus{} } else { yyv3887 := &yyv3885[yyj3885] yyv3887.CodecDecodeSelf(d) @@ -49324,13 +48921,13 @@ func (x codecSelfer1234) decSliceNamespace(v *[]Namespace, d *codec1978.Decoder) for ; !r.CheckBreak(); yyj3885++ { if yyj3885 >= len(yyv3885) { - yyv3885 = append(yyv3885, Namespace{}) // var yyz3885 Namespace + yyv3885 = append(yyv3885, ContainerStatus{}) // var yyz3885 ContainerStatus yyc3885 = true } yyh3885.ElemContainerState(yyj3885) if yyj3885 < len(yyv3885) { if r.TryDecodeAsNil() { - yyv3885[yyj3885] = Namespace{} + yyv3885[yyj3885] = ContainerStatus{} } else { yyv3888 := &yyv3885[yyj3885] yyv3888.CodecDecodeSelf(d) @@ -49345,7 +48942,7 @@ func (x codecSelfer1234) decSliceNamespace(v *[]Namespace, d *codec1978.Decoder) yyv3885 = yyv3885[:yyj3885] yyc3885 = true } else if yyj3885 == 0 && yyv3885 == nil { - yyv3885 = []Namespace{} + yyv3885 = []ContainerStatus{} yyc3885 = true } } @@ -49355,7 +48952,7 @@ func (x codecSelfer1234) decSliceNamespace(v *[]Namespace, d *codec1978.Decoder) } } -func (x codecSelfer1234) encSliceEvent(v []Event, e *codec1978.Encoder) { +func (x codecSelfer1234) encSlicePodTemplate(v []PodTemplate, e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r @@ -49368,7 +48965,7 @@ func (x codecSelfer1234) encSliceEvent(v []Event, e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x codecSelfer1234) decSliceEvent(v *[]Event, d *codec1978.Decoder) { +func (x codecSelfer1234) decSlicePodTemplate(v *[]PodTemplate, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r @@ -49378,7 +48975,7 @@ func (x codecSelfer1234) decSliceEvent(v *[]Event, d *codec1978.Decoder) { var yyc3891 bool if yyl3891 == 0 { if yyv3891 == nil { - yyv3891 = []Event{} + yyv3891 = []PodTemplate{} yyc3891 = true } else if len(yyv3891) != 0 { yyv3891 = yyv3891[:0] @@ -49391,15 +48988,15 @@ func (x codecSelfer1234) decSliceEvent(v *[]Event, d *codec1978.Decoder) { yyrg3891 := len(yyv3891) > 0 yyv23891 := yyv3891 - yyrl3891, yyrt3891 = z.DecInferLen(yyl3891, z.DecBasicHandle().MaxInitLen, 440) + yyrl3891, yyrt3891 = z.DecInferLen(yyl3891, z.DecBasicHandle().MaxInitLen, 520) if yyrt3891 { if yyrl3891 <= cap(yyv3891) { yyv3891 = yyv3891[:yyrl3891] } else { - yyv3891 = make([]Event, yyrl3891) + yyv3891 = make([]PodTemplate, yyrl3891) } } else { - yyv3891 = make([]Event, yyrl3891) + yyv3891 = make([]PodTemplate, yyrl3891) } yyc3891 = true yyrr3891 = len(yyv3891) @@ -49414,7 +49011,7 @@ func (x codecSelfer1234) decSliceEvent(v *[]Event, d *codec1978.Decoder) { for ; yyj3891 < yyrr3891; yyj3891++ { yyh3891.ElemContainerState(yyj3891) if r.TryDecodeAsNil() { - yyv3891[yyj3891] = Event{} + yyv3891[yyj3891] = PodTemplate{} } else { yyv3892 := &yyv3891[yyj3891] yyv3892.CodecDecodeSelf(d) @@ -49423,10 +49020,10 @@ func (x codecSelfer1234) decSliceEvent(v *[]Event, d *codec1978.Decoder) { } if yyrt3891 { for ; yyj3891 < yyl3891; yyj3891++ { - yyv3891 = append(yyv3891, Event{}) + yyv3891 = append(yyv3891, PodTemplate{}) yyh3891.ElemContainerState(yyj3891) if r.TryDecodeAsNil() { - yyv3891[yyj3891] = Event{} + yyv3891[yyj3891] = PodTemplate{} } else { yyv3893 := &yyv3891[yyj3891] yyv3893.CodecDecodeSelf(d) @@ -49440,13 +49037,13 @@ func (x codecSelfer1234) decSliceEvent(v *[]Event, d *codec1978.Decoder) { for ; !r.CheckBreak(); yyj3891++ { if yyj3891 >= len(yyv3891) { - yyv3891 = append(yyv3891, Event{}) // var yyz3891 Event + yyv3891 = append(yyv3891, PodTemplate{}) // var yyz3891 PodTemplate yyc3891 = true } yyh3891.ElemContainerState(yyj3891) if yyj3891 < len(yyv3891) { if r.TryDecodeAsNil() { - yyv3891[yyj3891] = Event{} + yyv3891[yyj3891] = PodTemplate{} } else { yyv3894 := &yyv3891[yyj3891] yyv3894.CodecDecodeSelf(d) @@ -49461,7 +49058,7 @@ func (x codecSelfer1234) decSliceEvent(v *[]Event, d *codec1978.Decoder) { yyv3891 = yyv3891[:yyj3891] yyc3891 = true } else if yyj3891 == 0 && yyv3891 == nil { - yyv3891 = []Event{} + yyv3891 = []PodTemplate{} yyc3891 = true } } @@ -49471,29 +49068,20 @@ func (x codecSelfer1234) decSliceEvent(v *[]Event, d *codec1978.Decoder) { } } -func (x codecSelfer1234) encSliceruntime_Object(v []pkg8_runtime.Object, e *codec1978.Encoder) { +func (x codecSelfer1234) encSliceReplicationController(v []ReplicationController, e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) for _, yyv3895 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyv3895 == nil { - r.EncodeNil() - } else { - yym3896 := z.EncBinary() - _ = yym3896 - if false { - } else if z.HasExtensions() && z.EncExt(yyv3895) { - } else { - z.EncFallback(yyv3895) - } - } + yy3896 := &yyv3895 + yy3896.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x codecSelfer1234) decSliceruntime_Object(v *[]pkg8_runtime.Object, d *codec1978.Decoder) { +func (x codecSelfer1234) decSliceReplicationController(v *[]ReplicationController, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r @@ -49503,7 +49091,7 @@ func (x codecSelfer1234) decSliceruntime_Object(v *[]pkg8_runtime.Object, d *cod var yyc3897 bool if yyl3897 == 0 { if yyv3897 == nil { - yyv3897 = []pkg8_runtime.Object{} + yyv3897 = []ReplicationController{} yyc3897 = true } else if len(yyv3897) != 0 { yyv3897 = yyv3897[:0] @@ -49516,15 +49104,15 @@ func (x codecSelfer1234) decSliceruntime_Object(v *[]pkg8_runtime.Object, d *cod yyrg3897 := len(yyv3897) > 0 yyv23897 := yyv3897 - yyrl3897, yyrt3897 = z.DecInferLen(yyl3897, z.DecBasicHandle().MaxInitLen, 16) + yyrl3897, yyrt3897 = z.DecInferLen(yyl3897, z.DecBasicHandle().MaxInitLen, 232) if yyrt3897 { if yyrl3897 <= cap(yyv3897) { yyv3897 = yyv3897[:yyrl3897] } else { - yyv3897 = make([]pkg8_runtime.Object, yyrl3897) + yyv3897 = make([]ReplicationController, yyrl3897) } } else { - yyv3897 = make([]pkg8_runtime.Object, yyrl3897) + yyv3897 = make([]ReplicationController, yyrl3897) } yyc3897 = true yyrr3897 = len(yyv3897) @@ -49539,34 +49127,22 @@ func (x codecSelfer1234) decSliceruntime_Object(v *[]pkg8_runtime.Object, d *cod for ; yyj3897 < yyrr3897; yyj3897++ { yyh3897.ElemContainerState(yyj3897) if r.TryDecodeAsNil() { - yyv3897[yyj3897] = nil + yyv3897[yyj3897] = ReplicationController{} } else { yyv3898 := &yyv3897[yyj3897] - yym3899 := z.DecBinary() - _ = yym3899 - if false { - } else if z.HasExtensions() && z.DecExt(yyv3898) { - } else { - z.DecFallback(yyv3898, true) - } + yyv3898.CodecDecodeSelf(d) } } if yyrt3897 { for ; yyj3897 < yyl3897; yyj3897++ { - yyv3897 = append(yyv3897, nil) + yyv3897 = append(yyv3897, ReplicationController{}) yyh3897.ElemContainerState(yyj3897) if r.TryDecodeAsNil() { - yyv3897[yyj3897] = nil + yyv3897[yyj3897] = ReplicationController{} } else { - yyv3900 := &yyv3897[yyj3897] - yym3901 := z.DecBinary() - _ = yym3901 - if false { - } else if z.HasExtensions() && z.DecExt(yyv3900) { - } else { - z.DecFallback(yyv3900, true) - } + yyv3899 := &yyv3897[yyj3897] + yyv3899.CodecDecodeSelf(d) } } @@ -49577,22 +49153,16 @@ func (x codecSelfer1234) decSliceruntime_Object(v *[]pkg8_runtime.Object, d *cod for ; !r.CheckBreak(); yyj3897++ { if yyj3897 >= len(yyv3897) { - yyv3897 = append(yyv3897, nil) // var yyz3897 pkg8_runtime.Object + yyv3897 = append(yyv3897, ReplicationController{}) // var yyz3897 ReplicationController yyc3897 = true } yyh3897.ElemContainerState(yyj3897) if yyj3897 < len(yyv3897) { if r.TryDecodeAsNil() { - yyv3897[yyj3897] = nil + yyv3897[yyj3897] = ReplicationController{} } else { - yyv3902 := &yyv3897[yyj3897] - yym3903 := z.DecBinary() - _ = yym3903 - if false { - } else if z.HasExtensions() && z.DecExt(yyv3902) { - } else { - z.DecFallback(yyv3902, true) - } + yyv3900 := &yyv3897[yyj3897] + yyv3900.CodecDecodeSelf(d) } } else { @@ -49604,7 +49174,7 @@ func (x codecSelfer1234) decSliceruntime_Object(v *[]pkg8_runtime.Object, d *cod yyv3897 = yyv3897[:yyj3897] yyc3897 = true } else if yyj3897 == 0 && yyv3897 == nil { - yyv3897 = []pkg8_runtime.Object{} + yyv3897 = []ReplicationController{} yyc3897 = true } } @@ -49614,15 +49184,2119 @@ func (x codecSelfer1234) decSliceruntime_Object(v *[]pkg8_runtime.Object, d *cod } } +func (x codecSelfer1234) encSliceService(v []Service, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3901 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3902 := &yyv3901 + yy3902.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceService(v *[]Service, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3903 := *v + yyh3903, yyl3903 := z.DecSliceHelperStart() + var yyc3903 bool + if yyl3903 == 0 { + if yyv3903 == nil { + yyv3903 = []Service{} + yyc3903 = true + } else if len(yyv3903) != 0 { + yyv3903 = yyv3903[:0] + yyc3903 = true + } + } else if yyl3903 > 0 { + var yyrr3903, yyrl3903 int + var yyrt3903 bool + if yyl3903 > cap(yyv3903) { + + yyrg3903 := len(yyv3903) > 0 + yyv23903 := yyv3903 + yyrl3903, yyrt3903 = z.DecInferLen(yyl3903, z.DecBasicHandle().MaxInitLen, 336) + if yyrt3903 { + if yyrl3903 <= cap(yyv3903) { + yyv3903 = yyv3903[:yyrl3903] + } else { + yyv3903 = make([]Service, yyrl3903) + } + } else { + yyv3903 = make([]Service, yyrl3903) + } + yyc3903 = true + yyrr3903 = len(yyv3903) + if yyrg3903 { + copy(yyv3903, yyv23903) + } + } else if yyl3903 != len(yyv3903) { + yyv3903 = yyv3903[:yyl3903] + yyc3903 = true + } + yyj3903 := 0 + for ; yyj3903 < yyrr3903; yyj3903++ { + yyh3903.ElemContainerState(yyj3903) + if r.TryDecodeAsNil() { + yyv3903[yyj3903] = Service{} + } else { + yyv3904 := &yyv3903[yyj3903] + yyv3904.CodecDecodeSelf(d) + } + + } + if yyrt3903 { + for ; yyj3903 < yyl3903; yyj3903++ { + yyv3903 = append(yyv3903, Service{}) + yyh3903.ElemContainerState(yyj3903) + if r.TryDecodeAsNil() { + yyv3903[yyj3903] = Service{} + } else { + yyv3905 := &yyv3903[yyj3903] + yyv3905.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3903 := 0 + for ; !r.CheckBreak(); yyj3903++ { + + if yyj3903 >= len(yyv3903) { + yyv3903 = append(yyv3903, Service{}) // var yyz3903 Service + yyc3903 = true + } + yyh3903.ElemContainerState(yyj3903) + if yyj3903 < len(yyv3903) { + if r.TryDecodeAsNil() { + yyv3903[yyj3903] = Service{} + } else { + yyv3906 := &yyv3903[yyj3903] + yyv3906.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3903 < len(yyv3903) { + yyv3903 = yyv3903[:yyj3903] + yyc3903 = true + } else if yyj3903 == 0 && yyv3903 == nil { + yyv3903 = []Service{} + yyc3903 = true + } + } + yyh3903.End() + if yyc3903 { + *v = yyv3903 + } +} + +func (x codecSelfer1234) encSliceLoadBalancerIngress(v []LoadBalancerIngress, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3907 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3908 := &yyv3907 + yy3908.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceLoadBalancerIngress(v *[]LoadBalancerIngress, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3909 := *v + yyh3909, yyl3909 := z.DecSliceHelperStart() + var yyc3909 bool + if yyl3909 == 0 { + if yyv3909 == nil { + yyv3909 = []LoadBalancerIngress{} + yyc3909 = true + } else if len(yyv3909) != 0 { + yyv3909 = yyv3909[:0] + yyc3909 = true + } + } else if yyl3909 > 0 { + var yyrr3909, yyrl3909 int + var yyrt3909 bool + if yyl3909 > cap(yyv3909) { + + yyrg3909 := len(yyv3909) > 0 + yyv23909 := yyv3909 + yyrl3909, yyrt3909 = z.DecInferLen(yyl3909, z.DecBasicHandle().MaxInitLen, 32) + if yyrt3909 { + if yyrl3909 <= cap(yyv3909) { + yyv3909 = yyv3909[:yyrl3909] + } else { + yyv3909 = make([]LoadBalancerIngress, yyrl3909) + } + } else { + yyv3909 = make([]LoadBalancerIngress, yyrl3909) + } + yyc3909 = true + yyrr3909 = len(yyv3909) + if yyrg3909 { + copy(yyv3909, yyv23909) + } + } else if yyl3909 != len(yyv3909) { + yyv3909 = yyv3909[:yyl3909] + yyc3909 = true + } + yyj3909 := 0 + for ; yyj3909 < yyrr3909; yyj3909++ { + yyh3909.ElemContainerState(yyj3909) + if r.TryDecodeAsNil() { + yyv3909[yyj3909] = LoadBalancerIngress{} + } else { + yyv3910 := &yyv3909[yyj3909] + yyv3910.CodecDecodeSelf(d) + } + + } + if yyrt3909 { + for ; yyj3909 < yyl3909; yyj3909++ { + yyv3909 = append(yyv3909, LoadBalancerIngress{}) + yyh3909.ElemContainerState(yyj3909) + if r.TryDecodeAsNil() { + yyv3909[yyj3909] = LoadBalancerIngress{} + } else { + yyv3911 := &yyv3909[yyj3909] + yyv3911.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3909 := 0 + for ; !r.CheckBreak(); yyj3909++ { + + if yyj3909 >= len(yyv3909) { + yyv3909 = append(yyv3909, LoadBalancerIngress{}) // var yyz3909 LoadBalancerIngress + yyc3909 = true + } + yyh3909.ElemContainerState(yyj3909) + if yyj3909 < len(yyv3909) { + if r.TryDecodeAsNil() { + yyv3909[yyj3909] = LoadBalancerIngress{} + } else { + yyv3912 := &yyv3909[yyj3909] + yyv3912.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3909 < len(yyv3909) { + yyv3909 = yyv3909[:yyj3909] + yyc3909 = true + } else if yyj3909 == 0 && yyv3909 == nil { + yyv3909 = []LoadBalancerIngress{} + yyc3909 = true + } + } + yyh3909.End() + if yyc3909 { + *v = yyv3909 + } +} + +func (x codecSelfer1234) encSliceServicePort(v []ServicePort, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3913 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3914 := &yyv3913 + yy3914.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceServicePort(v *[]ServicePort, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3915 := *v + yyh3915, yyl3915 := z.DecSliceHelperStart() + var yyc3915 bool + if yyl3915 == 0 { + if yyv3915 == nil { + yyv3915 = []ServicePort{} + yyc3915 = true + } else if len(yyv3915) != 0 { + yyv3915 = yyv3915[:0] + yyc3915 = true + } + } else if yyl3915 > 0 { + var yyrr3915, yyrl3915 int + var yyrt3915 bool + if yyl3915 > cap(yyv3915) { + + yyrg3915 := len(yyv3915) > 0 + yyv23915 := yyv3915 + yyrl3915, yyrt3915 = z.DecInferLen(yyl3915, z.DecBasicHandle().MaxInitLen, 80) + if yyrt3915 { + if yyrl3915 <= cap(yyv3915) { + yyv3915 = yyv3915[:yyrl3915] + } else { + yyv3915 = make([]ServicePort, yyrl3915) + } + } else { + yyv3915 = make([]ServicePort, yyrl3915) + } + yyc3915 = true + yyrr3915 = len(yyv3915) + if yyrg3915 { + copy(yyv3915, yyv23915) + } + } else if yyl3915 != len(yyv3915) { + yyv3915 = yyv3915[:yyl3915] + yyc3915 = true + } + yyj3915 := 0 + for ; yyj3915 < yyrr3915; yyj3915++ { + yyh3915.ElemContainerState(yyj3915) + if r.TryDecodeAsNil() { + yyv3915[yyj3915] = ServicePort{} + } else { + yyv3916 := &yyv3915[yyj3915] + yyv3916.CodecDecodeSelf(d) + } + + } + if yyrt3915 { + for ; yyj3915 < yyl3915; yyj3915++ { + yyv3915 = append(yyv3915, ServicePort{}) + yyh3915.ElemContainerState(yyj3915) + if r.TryDecodeAsNil() { + yyv3915[yyj3915] = ServicePort{} + } else { + yyv3917 := &yyv3915[yyj3915] + yyv3917.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3915 := 0 + for ; !r.CheckBreak(); yyj3915++ { + + if yyj3915 >= len(yyv3915) { + yyv3915 = append(yyv3915, ServicePort{}) // var yyz3915 ServicePort + yyc3915 = true + } + yyh3915.ElemContainerState(yyj3915) + if yyj3915 < len(yyv3915) { + if r.TryDecodeAsNil() { + yyv3915[yyj3915] = ServicePort{} + } else { + yyv3918 := &yyv3915[yyj3915] + yyv3918.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3915 < len(yyv3915) { + yyv3915 = yyv3915[:yyj3915] + yyc3915 = true + } else if yyj3915 == 0 && yyv3915 == nil { + yyv3915 = []ServicePort{} + yyc3915 = true + } + } + yyh3915.End() + if yyc3915 { + *v = yyv3915 + } +} + +func (x codecSelfer1234) encSliceObjectReference(v []ObjectReference, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3919 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3920 := &yyv3919 + yy3920.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceObjectReference(v *[]ObjectReference, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3921 := *v + yyh3921, yyl3921 := z.DecSliceHelperStart() + var yyc3921 bool + if yyl3921 == 0 { + if yyv3921 == nil { + yyv3921 = []ObjectReference{} + yyc3921 = true + } else if len(yyv3921) != 0 { + yyv3921 = yyv3921[:0] + yyc3921 = true + } + } else if yyl3921 > 0 { + var yyrr3921, yyrl3921 int + var yyrt3921 bool + if yyl3921 > cap(yyv3921) { + + yyrg3921 := len(yyv3921) > 0 + yyv23921 := yyv3921 + yyrl3921, yyrt3921 = z.DecInferLen(yyl3921, z.DecBasicHandle().MaxInitLen, 112) + if yyrt3921 { + if yyrl3921 <= cap(yyv3921) { + yyv3921 = yyv3921[:yyrl3921] + } else { + yyv3921 = make([]ObjectReference, yyrl3921) + } + } else { + yyv3921 = make([]ObjectReference, yyrl3921) + } + yyc3921 = true + yyrr3921 = len(yyv3921) + if yyrg3921 { + copy(yyv3921, yyv23921) + } + } else if yyl3921 != len(yyv3921) { + yyv3921 = yyv3921[:yyl3921] + yyc3921 = true + } + yyj3921 := 0 + for ; yyj3921 < yyrr3921; yyj3921++ { + yyh3921.ElemContainerState(yyj3921) + if r.TryDecodeAsNil() { + yyv3921[yyj3921] = ObjectReference{} + } else { + yyv3922 := &yyv3921[yyj3921] + yyv3922.CodecDecodeSelf(d) + } + + } + if yyrt3921 { + for ; yyj3921 < yyl3921; yyj3921++ { + yyv3921 = append(yyv3921, ObjectReference{}) + yyh3921.ElemContainerState(yyj3921) + if r.TryDecodeAsNil() { + yyv3921[yyj3921] = ObjectReference{} + } else { + yyv3923 := &yyv3921[yyj3921] + yyv3923.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3921 := 0 + for ; !r.CheckBreak(); yyj3921++ { + + if yyj3921 >= len(yyv3921) { + yyv3921 = append(yyv3921, ObjectReference{}) // var yyz3921 ObjectReference + yyc3921 = true + } + yyh3921.ElemContainerState(yyj3921) + if yyj3921 < len(yyv3921) { + if r.TryDecodeAsNil() { + yyv3921[yyj3921] = ObjectReference{} + } else { + yyv3924 := &yyv3921[yyj3921] + yyv3924.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3921 < len(yyv3921) { + yyv3921 = yyv3921[:yyj3921] + yyc3921 = true + } else if yyj3921 == 0 && yyv3921 == nil { + yyv3921 = []ObjectReference{} + yyc3921 = true + } + } + yyh3921.End() + if yyc3921 { + *v = yyv3921 + } +} + +func (x codecSelfer1234) encSliceServiceAccount(v []ServiceAccount, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3925 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3926 := &yyv3925 + yy3926.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceServiceAccount(v *[]ServiceAccount, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3927 := *v + yyh3927, yyl3927 := z.DecSliceHelperStart() + var yyc3927 bool + if yyl3927 == 0 { + if yyv3927 == nil { + yyv3927 = []ServiceAccount{} + yyc3927 = true + } else if len(yyv3927) != 0 { + yyv3927 = yyv3927[:0] + yyc3927 = true + } + } else if yyl3927 > 0 { + var yyrr3927, yyrl3927 int + var yyrt3927 bool + if yyl3927 > cap(yyv3927) { + + yyrg3927 := len(yyv3927) > 0 + yyv23927 := yyv3927 + yyrl3927, yyrt3927 = z.DecInferLen(yyl3927, z.DecBasicHandle().MaxInitLen, 240) + if yyrt3927 { + if yyrl3927 <= cap(yyv3927) { + yyv3927 = yyv3927[:yyrl3927] + } else { + yyv3927 = make([]ServiceAccount, yyrl3927) + } + } else { + yyv3927 = make([]ServiceAccount, yyrl3927) + } + yyc3927 = true + yyrr3927 = len(yyv3927) + if yyrg3927 { + copy(yyv3927, yyv23927) + } + } else if yyl3927 != len(yyv3927) { + yyv3927 = yyv3927[:yyl3927] + yyc3927 = true + } + yyj3927 := 0 + for ; yyj3927 < yyrr3927; yyj3927++ { + yyh3927.ElemContainerState(yyj3927) + if r.TryDecodeAsNil() { + yyv3927[yyj3927] = ServiceAccount{} + } else { + yyv3928 := &yyv3927[yyj3927] + yyv3928.CodecDecodeSelf(d) + } + + } + if yyrt3927 { + for ; yyj3927 < yyl3927; yyj3927++ { + yyv3927 = append(yyv3927, ServiceAccount{}) + yyh3927.ElemContainerState(yyj3927) + if r.TryDecodeAsNil() { + yyv3927[yyj3927] = ServiceAccount{} + } else { + yyv3929 := &yyv3927[yyj3927] + yyv3929.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3927 := 0 + for ; !r.CheckBreak(); yyj3927++ { + + if yyj3927 >= len(yyv3927) { + yyv3927 = append(yyv3927, ServiceAccount{}) // var yyz3927 ServiceAccount + yyc3927 = true + } + yyh3927.ElemContainerState(yyj3927) + if yyj3927 < len(yyv3927) { + if r.TryDecodeAsNil() { + yyv3927[yyj3927] = ServiceAccount{} + } else { + yyv3930 := &yyv3927[yyj3927] + yyv3930.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3927 < len(yyv3927) { + yyv3927 = yyv3927[:yyj3927] + yyc3927 = true + } else if yyj3927 == 0 && yyv3927 == nil { + yyv3927 = []ServiceAccount{} + yyc3927 = true + } + } + yyh3927.End() + if yyc3927 { + *v = yyv3927 + } +} + +func (x codecSelfer1234) encSliceEndpointSubset(v []EndpointSubset, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3931 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3932 := &yyv3931 + yy3932.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceEndpointSubset(v *[]EndpointSubset, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3933 := *v + yyh3933, yyl3933 := z.DecSliceHelperStart() + var yyc3933 bool + if yyl3933 == 0 { + if yyv3933 == nil { + yyv3933 = []EndpointSubset{} + yyc3933 = true + } else if len(yyv3933) != 0 { + yyv3933 = yyv3933[:0] + yyc3933 = true + } + } else if yyl3933 > 0 { + var yyrr3933, yyrl3933 int + var yyrt3933 bool + if yyl3933 > cap(yyv3933) { + + yyrg3933 := len(yyv3933) > 0 + yyv23933 := yyv3933 + yyrl3933, yyrt3933 = z.DecInferLen(yyl3933, z.DecBasicHandle().MaxInitLen, 72) + if yyrt3933 { + if yyrl3933 <= cap(yyv3933) { + yyv3933 = yyv3933[:yyrl3933] + } else { + yyv3933 = make([]EndpointSubset, yyrl3933) + } + } else { + yyv3933 = make([]EndpointSubset, yyrl3933) + } + yyc3933 = true + yyrr3933 = len(yyv3933) + if yyrg3933 { + copy(yyv3933, yyv23933) + } + } else if yyl3933 != len(yyv3933) { + yyv3933 = yyv3933[:yyl3933] + yyc3933 = true + } + yyj3933 := 0 + for ; yyj3933 < yyrr3933; yyj3933++ { + yyh3933.ElemContainerState(yyj3933) + if r.TryDecodeAsNil() { + yyv3933[yyj3933] = EndpointSubset{} + } else { + yyv3934 := &yyv3933[yyj3933] + yyv3934.CodecDecodeSelf(d) + } + + } + if yyrt3933 { + for ; yyj3933 < yyl3933; yyj3933++ { + yyv3933 = append(yyv3933, EndpointSubset{}) + yyh3933.ElemContainerState(yyj3933) + if r.TryDecodeAsNil() { + yyv3933[yyj3933] = EndpointSubset{} + } else { + yyv3935 := &yyv3933[yyj3933] + yyv3935.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3933 := 0 + for ; !r.CheckBreak(); yyj3933++ { + + if yyj3933 >= len(yyv3933) { + yyv3933 = append(yyv3933, EndpointSubset{}) // var yyz3933 EndpointSubset + yyc3933 = true + } + yyh3933.ElemContainerState(yyj3933) + if yyj3933 < len(yyv3933) { + if r.TryDecodeAsNil() { + yyv3933[yyj3933] = EndpointSubset{} + } else { + yyv3936 := &yyv3933[yyj3933] + yyv3936.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3933 < len(yyv3933) { + yyv3933 = yyv3933[:yyj3933] + yyc3933 = true + } else if yyj3933 == 0 && yyv3933 == nil { + yyv3933 = []EndpointSubset{} + yyc3933 = true + } + } + yyh3933.End() + if yyc3933 { + *v = yyv3933 + } +} + +func (x codecSelfer1234) encSliceEndpointAddress(v []EndpointAddress, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3937 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3938 := &yyv3937 + yy3938.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceEndpointAddress(v *[]EndpointAddress, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3939 := *v + yyh3939, yyl3939 := z.DecSliceHelperStart() + var yyc3939 bool + if yyl3939 == 0 { + if yyv3939 == nil { + yyv3939 = []EndpointAddress{} + yyc3939 = true + } else if len(yyv3939) != 0 { + yyv3939 = yyv3939[:0] + yyc3939 = true + } + } else if yyl3939 > 0 { + var yyrr3939, yyrl3939 int + var yyrt3939 bool + if yyl3939 > cap(yyv3939) { + + yyrg3939 := len(yyv3939) > 0 + yyv23939 := yyv3939 + yyrl3939, yyrt3939 = z.DecInferLen(yyl3939, z.DecBasicHandle().MaxInitLen, 24) + if yyrt3939 { + if yyrl3939 <= cap(yyv3939) { + yyv3939 = yyv3939[:yyrl3939] + } else { + yyv3939 = make([]EndpointAddress, yyrl3939) + } + } else { + yyv3939 = make([]EndpointAddress, yyrl3939) + } + yyc3939 = true + yyrr3939 = len(yyv3939) + if yyrg3939 { + copy(yyv3939, yyv23939) + } + } else if yyl3939 != len(yyv3939) { + yyv3939 = yyv3939[:yyl3939] + yyc3939 = true + } + yyj3939 := 0 + for ; yyj3939 < yyrr3939; yyj3939++ { + yyh3939.ElemContainerState(yyj3939) + if r.TryDecodeAsNil() { + yyv3939[yyj3939] = EndpointAddress{} + } else { + yyv3940 := &yyv3939[yyj3939] + yyv3940.CodecDecodeSelf(d) + } + + } + if yyrt3939 { + for ; yyj3939 < yyl3939; yyj3939++ { + yyv3939 = append(yyv3939, EndpointAddress{}) + yyh3939.ElemContainerState(yyj3939) + if r.TryDecodeAsNil() { + yyv3939[yyj3939] = EndpointAddress{} + } else { + yyv3941 := &yyv3939[yyj3939] + yyv3941.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3939 := 0 + for ; !r.CheckBreak(); yyj3939++ { + + if yyj3939 >= len(yyv3939) { + yyv3939 = append(yyv3939, EndpointAddress{}) // var yyz3939 EndpointAddress + yyc3939 = true + } + yyh3939.ElemContainerState(yyj3939) + if yyj3939 < len(yyv3939) { + if r.TryDecodeAsNil() { + yyv3939[yyj3939] = EndpointAddress{} + } else { + yyv3942 := &yyv3939[yyj3939] + yyv3942.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3939 < len(yyv3939) { + yyv3939 = yyv3939[:yyj3939] + yyc3939 = true + } else if yyj3939 == 0 && yyv3939 == nil { + yyv3939 = []EndpointAddress{} + yyc3939 = true + } + } + yyh3939.End() + if yyc3939 { + *v = yyv3939 + } +} + +func (x codecSelfer1234) encSliceEndpointPort(v []EndpointPort, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3943 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3944 := &yyv3943 + yy3944.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceEndpointPort(v *[]EndpointPort, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3945 := *v + yyh3945, yyl3945 := z.DecSliceHelperStart() + var yyc3945 bool + if yyl3945 == 0 { + if yyv3945 == nil { + yyv3945 = []EndpointPort{} + yyc3945 = true + } else if len(yyv3945) != 0 { + yyv3945 = yyv3945[:0] + yyc3945 = true + } + } else if yyl3945 > 0 { + var yyrr3945, yyrl3945 int + var yyrt3945 bool + if yyl3945 > cap(yyv3945) { + + yyrg3945 := len(yyv3945) > 0 + yyv23945 := yyv3945 + yyrl3945, yyrt3945 = z.DecInferLen(yyl3945, z.DecBasicHandle().MaxInitLen, 40) + if yyrt3945 { + if yyrl3945 <= cap(yyv3945) { + yyv3945 = yyv3945[:yyrl3945] + } else { + yyv3945 = make([]EndpointPort, yyrl3945) + } + } else { + yyv3945 = make([]EndpointPort, yyrl3945) + } + yyc3945 = true + yyrr3945 = len(yyv3945) + if yyrg3945 { + copy(yyv3945, yyv23945) + } + } else if yyl3945 != len(yyv3945) { + yyv3945 = yyv3945[:yyl3945] + yyc3945 = true + } + yyj3945 := 0 + for ; yyj3945 < yyrr3945; yyj3945++ { + yyh3945.ElemContainerState(yyj3945) + if r.TryDecodeAsNil() { + yyv3945[yyj3945] = EndpointPort{} + } else { + yyv3946 := &yyv3945[yyj3945] + yyv3946.CodecDecodeSelf(d) + } + + } + if yyrt3945 { + for ; yyj3945 < yyl3945; yyj3945++ { + yyv3945 = append(yyv3945, EndpointPort{}) + yyh3945.ElemContainerState(yyj3945) + if r.TryDecodeAsNil() { + yyv3945[yyj3945] = EndpointPort{} + } else { + yyv3947 := &yyv3945[yyj3945] + yyv3947.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3945 := 0 + for ; !r.CheckBreak(); yyj3945++ { + + if yyj3945 >= len(yyv3945) { + yyv3945 = append(yyv3945, EndpointPort{}) // var yyz3945 EndpointPort + yyc3945 = true + } + yyh3945.ElemContainerState(yyj3945) + if yyj3945 < len(yyv3945) { + if r.TryDecodeAsNil() { + yyv3945[yyj3945] = EndpointPort{} + } else { + yyv3948 := &yyv3945[yyj3945] + yyv3948.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3945 < len(yyv3945) { + yyv3945 = yyv3945[:yyj3945] + yyc3945 = true + } else if yyj3945 == 0 && yyv3945 == nil { + yyv3945 = []EndpointPort{} + yyc3945 = true + } + } + yyh3945.End() + if yyc3945 { + *v = yyv3945 + } +} + +func (x codecSelfer1234) encSliceEndpoints(v []Endpoints, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3949 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3950 := &yyv3949 + yy3950.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceEndpoints(v *[]Endpoints, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3951 := *v + yyh3951, yyl3951 := z.DecSliceHelperStart() + var yyc3951 bool + if yyl3951 == 0 { + if yyv3951 == nil { + yyv3951 = []Endpoints{} + yyc3951 = true + } else if len(yyv3951) != 0 { + yyv3951 = yyv3951[:0] + yyc3951 = true + } + } else if yyl3951 > 0 { + var yyrr3951, yyrl3951 int + var yyrt3951 bool + if yyl3951 > cap(yyv3951) { + + yyrg3951 := len(yyv3951) > 0 + yyv23951 := yyv3951 + yyrl3951, yyrt3951 = z.DecInferLen(yyl3951, z.DecBasicHandle().MaxInitLen, 216) + if yyrt3951 { + if yyrl3951 <= cap(yyv3951) { + yyv3951 = yyv3951[:yyrl3951] + } else { + yyv3951 = make([]Endpoints, yyrl3951) + } + } else { + yyv3951 = make([]Endpoints, yyrl3951) + } + yyc3951 = true + yyrr3951 = len(yyv3951) + if yyrg3951 { + copy(yyv3951, yyv23951) + } + } else if yyl3951 != len(yyv3951) { + yyv3951 = yyv3951[:yyl3951] + yyc3951 = true + } + yyj3951 := 0 + for ; yyj3951 < yyrr3951; yyj3951++ { + yyh3951.ElemContainerState(yyj3951) + if r.TryDecodeAsNil() { + yyv3951[yyj3951] = Endpoints{} + } else { + yyv3952 := &yyv3951[yyj3951] + yyv3952.CodecDecodeSelf(d) + } + + } + if yyrt3951 { + for ; yyj3951 < yyl3951; yyj3951++ { + yyv3951 = append(yyv3951, Endpoints{}) + yyh3951.ElemContainerState(yyj3951) + if r.TryDecodeAsNil() { + yyv3951[yyj3951] = Endpoints{} + } else { + yyv3953 := &yyv3951[yyj3951] + yyv3953.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3951 := 0 + for ; !r.CheckBreak(); yyj3951++ { + + if yyj3951 >= len(yyv3951) { + yyv3951 = append(yyv3951, Endpoints{}) // var yyz3951 Endpoints + yyc3951 = true + } + yyh3951.ElemContainerState(yyj3951) + if yyj3951 < len(yyv3951) { + if r.TryDecodeAsNil() { + yyv3951[yyj3951] = Endpoints{} + } else { + yyv3954 := &yyv3951[yyj3951] + yyv3954.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3951 < len(yyv3951) { + yyv3951 = yyv3951[:yyj3951] + yyc3951 = true + } else if yyj3951 == 0 && yyv3951 == nil { + yyv3951 = []Endpoints{} + yyc3951 = true + } + } + yyh3951.End() + if yyc3951 { + *v = yyv3951 + } +} + +func (x codecSelfer1234) encSliceNodeCondition(v []NodeCondition, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3955 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3956 := &yyv3955 + yy3956.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceNodeCondition(v *[]NodeCondition, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3957 := *v + yyh3957, yyl3957 := z.DecSliceHelperStart() + var yyc3957 bool + if yyl3957 == 0 { + if yyv3957 == nil { + yyv3957 = []NodeCondition{} + yyc3957 = true + } else if len(yyv3957) != 0 { + yyv3957 = yyv3957[:0] + yyc3957 = true + } + } else if yyl3957 > 0 { + var yyrr3957, yyrl3957 int + var yyrt3957 bool + if yyl3957 > cap(yyv3957) { + + yyrg3957 := len(yyv3957) > 0 + yyv23957 := yyv3957 + yyrl3957, yyrt3957 = z.DecInferLen(yyl3957, z.DecBasicHandle().MaxInitLen, 112) + if yyrt3957 { + if yyrl3957 <= cap(yyv3957) { + yyv3957 = yyv3957[:yyrl3957] + } else { + yyv3957 = make([]NodeCondition, yyrl3957) + } + } else { + yyv3957 = make([]NodeCondition, yyrl3957) + } + yyc3957 = true + yyrr3957 = len(yyv3957) + if yyrg3957 { + copy(yyv3957, yyv23957) + } + } else if yyl3957 != len(yyv3957) { + yyv3957 = yyv3957[:yyl3957] + yyc3957 = true + } + yyj3957 := 0 + for ; yyj3957 < yyrr3957; yyj3957++ { + yyh3957.ElemContainerState(yyj3957) + if r.TryDecodeAsNil() { + yyv3957[yyj3957] = NodeCondition{} + } else { + yyv3958 := &yyv3957[yyj3957] + yyv3958.CodecDecodeSelf(d) + } + + } + if yyrt3957 { + for ; yyj3957 < yyl3957; yyj3957++ { + yyv3957 = append(yyv3957, NodeCondition{}) + yyh3957.ElemContainerState(yyj3957) + if r.TryDecodeAsNil() { + yyv3957[yyj3957] = NodeCondition{} + } else { + yyv3959 := &yyv3957[yyj3957] + yyv3959.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3957 := 0 + for ; !r.CheckBreak(); yyj3957++ { + + if yyj3957 >= len(yyv3957) { + yyv3957 = append(yyv3957, NodeCondition{}) // var yyz3957 NodeCondition + yyc3957 = true + } + yyh3957.ElemContainerState(yyj3957) + if yyj3957 < len(yyv3957) { + if r.TryDecodeAsNil() { + yyv3957[yyj3957] = NodeCondition{} + } else { + yyv3960 := &yyv3957[yyj3957] + yyv3960.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3957 < len(yyv3957) { + yyv3957 = yyv3957[:yyj3957] + yyc3957 = true + } else if yyj3957 == 0 && yyv3957 == nil { + yyv3957 = []NodeCondition{} + yyc3957 = true + } + } + yyh3957.End() + if yyc3957 { + *v = yyv3957 + } +} + +func (x codecSelfer1234) encSliceNodeAddress(v []NodeAddress, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3961 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3962 := &yyv3961 + yy3962.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceNodeAddress(v *[]NodeAddress, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3963 := *v + yyh3963, yyl3963 := z.DecSliceHelperStart() + var yyc3963 bool + if yyl3963 == 0 { + if yyv3963 == nil { + yyv3963 = []NodeAddress{} + yyc3963 = true + } else if len(yyv3963) != 0 { + yyv3963 = yyv3963[:0] + yyc3963 = true + } + } else if yyl3963 > 0 { + var yyrr3963, yyrl3963 int + var yyrt3963 bool + if yyl3963 > cap(yyv3963) { + + yyrg3963 := len(yyv3963) > 0 + yyv23963 := yyv3963 + yyrl3963, yyrt3963 = z.DecInferLen(yyl3963, z.DecBasicHandle().MaxInitLen, 32) + if yyrt3963 { + if yyrl3963 <= cap(yyv3963) { + yyv3963 = yyv3963[:yyrl3963] + } else { + yyv3963 = make([]NodeAddress, yyrl3963) + } + } else { + yyv3963 = make([]NodeAddress, yyrl3963) + } + yyc3963 = true + yyrr3963 = len(yyv3963) + if yyrg3963 { + copy(yyv3963, yyv23963) + } + } else if yyl3963 != len(yyv3963) { + yyv3963 = yyv3963[:yyl3963] + yyc3963 = true + } + yyj3963 := 0 + for ; yyj3963 < yyrr3963; yyj3963++ { + yyh3963.ElemContainerState(yyj3963) + if r.TryDecodeAsNil() { + yyv3963[yyj3963] = NodeAddress{} + } else { + yyv3964 := &yyv3963[yyj3963] + yyv3964.CodecDecodeSelf(d) + } + + } + if yyrt3963 { + for ; yyj3963 < yyl3963; yyj3963++ { + yyv3963 = append(yyv3963, NodeAddress{}) + yyh3963.ElemContainerState(yyj3963) + if r.TryDecodeAsNil() { + yyv3963[yyj3963] = NodeAddress{} + } else { + yyv3965 := &yyv3963[yyj3963] + yyv3965.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3963 := 0 + for ; !r.CheckBreak(); yyj3963++ { + + if yyj3963 >= len(yyv3963) { + yyv3963 = append(yyv3963, NodeAddress{}) // var yyz3963 NodeAddress + yyc3963 = true + } + yyh3963.ElemContainerState(yyj3963) + if yyj3963 < len(yyv3963) { + if r.TryDecodeAsNil() { + yyv3963[yyj3963] = NodeAddress{} + } else { + yyv3966 := &yyv3963[yyj3963] + yyv3966.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3963 < len(yyv3963) { + yyv3963 = yyv3963[:yyj3963] + yyc3963 = true + } else if yyj3963 == 0 && yyv3963 == nil { + yyv3963 = []NodeAddress{} + yyc3963 = true + } + } + yyh3963.End() + if yyc3963 { + *v = yyv3963 + } +} + +func (x codecSelfer1234) encSliceContainerImage(v []ContainerImage, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3967 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3968 := &yyv3967 + yy3968.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceContainerImage(v *[]ContainerImage, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3969 := *v + yyh3969, yyl3969 := z.DecSliceHelperStart() + var yyc3969 bool + if yyl3969 == 0 { + if yyv3969 == nil { + yyv3969 = []ContainerImage{} + yyc3969 = true + } else if len(yyv3969) != 0 { + yyv3969 = yyv3969[:0] + yyc3969 = true + } + } else if yyl3969 > 0 { + var yyrr3969, yyrl3969 int + var yyrt3969 bool + if yyl3969 > cap(yyv3969) { + + yyrg3969 := len(yyv3969) > 0 + yyv23969 := yyv3969 + yyrl3969, yyrt3969 = z.DecInferLen(yyl3969, z.DecBasicHandle().MaxInitLen, 32) + if yyrt3969 { + if yyrl3969 <= cap(yyv3969) { + yyv3969 = yyv3969[:yyrl3969] + } else { + yyv3969 = make([]ContainerImage, yyrl3969) + } + } else { + yyv3969 = make([]ContainerImage, yyrl3969) + } + yyc3969 = true + yyrr3969 = len(yyv3969) + if yyrg3969 { + copy(yyv3969, yyv23969) + } + } else if yyl3969 != len(yyv3969) { + yyv3969 = yyv3969[:yyl3969] + yyc3969 = true + } + yyj3969 := 0 + for ; yyj3969 < yyrr3969; yyj3969++ { + yyh3969.ElemContainerState(yyj3969) + if r.TryDecodeAsNil() { + yyv3969[yyj3969] = ContainerImage{} + } else { + yyv3970 := &yyv3969[yyj3969] + yyv3970.CodecDecodeSelf(d) + } + + } + if yyrt3969 { + for ; yyj3969 < yyl3969; yyj3969++ { + yyv3969 = append(yyv3969, ContainerImage{}) + yyh3969.ElemContainerState(yyj3969) + if r.TryDecodeAsNil() { + yyv3969[yyj3969] = ContainerImage{} + } else { + yyv3971 := &yyv3969[yyj3969] + yyv3971.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3969 := 0 + for ; !r.CheckBreak(); yyj3969++ { + + if yyj3969 >= len(yyv3969) { + yyv3969 = append(yyv3969, ContainerImage{}) // var yyz3969 ContainerImage + yyc3969 = true + } + yyh3969.ElemContainerState(yyj3969) + if yyj3969 < len(yyv3969) { + if r.TryDecodeAsNil() { + yyv3969[yyj3969] = ContainerImage{} + } else { + yyv3972 := &yyv3969[yyj3969] + yyv3972.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3969 < len(yyv3969) { + yyv3969 = yyv3969[:yyj3969] + yyc3969 = true + } else if yyj3969 == 0 && yyv3969 == nil { + yyv3969 = []ContainerImage{} + yyc3969 = true + } + } + yyh3969.End() + if yyc3969 { + *v = yyv3969 + } +} + +func (x codecSelfer1234) encResourceList(v ResourceList, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeMapStart(len(v)) + for yyk3973, yyv3973 := range v { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + yyk3973.CodecEncodeSelf(e) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy3974 := &yyv3973 + yym3975 := z.EncBinary() + _ = yym3975 + if false { + } else if z.HasExtensions() && z.EncExt(yy3974) { + } else if !yym3975 && z.IsJSONHandle() { + z.EncJSONMarshal(yy3974) + } else { + z.EncFallback(yy3974) + } + } + z.EncSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x codecSelfer1234) decResourceList(v *ResourceList, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3976 := *v + yyl3976 := r.ReadMapStart() + yybh3976 := z.DecBasicHandle() + if yyv3976 == nil { + yyrl3976, _ := z.DecInferLen(yyl3976, yybh3976.MaxInitLen, 40) + yyv3976 = make(map[ResourceName]pkg3_resource.Quantity, yyrl3976) + *v = yyv3976 + } + var yymk3976 ResourceName + var yymv3976 pkg3_resource.Quantity + var yymg3976 bool + if yybh3976.MapValueReset { + yymg3976 = true + } + if yyl3976 > 0 { + for yyj3976 := 0; yyj3976 < yyl3976; yyj3976++ { + z.DecSendContainerState(codecSelfer_containerMapKey1234) + if r.TryDecodeAsNil() { + yymk3976 = "" + } else { + yymk3976 = ResourceName(r.DecodeString()) + } + + if yymg3976 { + yymv3976 = yyv3976[yymk3976] + } else { + yymv3976 = pkg3_resource.Quantity{} + } + z.DecSendContainerState(codecSelfer_containerMapValue1234) + if r.TryDecodeAsNil() { + yymv3976 = pkg3_resource.Quantity{} + } else { + yyv3978 := &yymv3976 + yym3979 := z.DecBinary() + _ = yym3979 + if false { + } else if z.HasExtensions() && z.DecExt(yyv3978) { + } else if !yym3979 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3978) + } else { + z.DecFallback(yyv3978, false) + } + } + + if yyv3976 != nil { + yyv3976[yymk3976] = yymv3976 + } + } + } else if yyl3976 < 0 { + for yyj3976 := 0; !r.CheckBreak(); yyj3976++ { + z.DecSendContainerState(codecSelfer_containerMapKey1234) + if r.TryDecodeAsNil() { + yymk3976 = "" + } else { + yymk3976 = ResourceName(r.DecodeString()) + } + + if yymg3976 { + yymv3976 = yyv3976[yymk3976] + } else { + yymv3976 = pkg3_resource.Quantity{} + } + z.DecSendContainerState(codecSelfer_containerMapValue1234) + if r.TryDecodeAsNil() { + yymv3976 = pkg3_resource.Quantity{} + } else { + yyv3981 := &yymv3976 + yym3982 := z.DecBinary() + _ = yym3982 + if false { + } else if z.HasExtensions() && z.DecExt(yyv3981) { + } else if !yym3982 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3981) + } else { + z.DecFallback(yyv3981, false) + } + } + + if yyv3976 != nil { + yyv3976[yymk3976] = yymv3976 + } + } + } // else len==0: TODO: Should we clear map entries? + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x codecSelfer1234) encSliceNode(v []Node, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3983 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3984 := &yyv3983 + yy3984.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceNode(v *[]Node, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3985 := *v + yyh3985, yyl3985 := z.DecSliceHelperStart() + var yyc3985 bool + if yyl3985 == 0 { + if yyv3985 == nil { + yyv3985 = []Node{} + yyc3985 = true + } else if len(yyv3985) != 0 { + yyv3985 = yyv3985[:0] + yyc3985 = true + } + } else if yyl3985 > 0 { + var yyrr3985, yyrl3985 int + var yyrt3985 bool + if yyl3985 > cap(yyv3985) { + + yyrg3985 := len(yyv3985) > 0 + yyv23985 := yyv3985 + yyrl3985, yyrt3985 = z.DecInferLen(yyl3985, z.DecBasicHandle().MaxInitLen, 488) + if yyrt3985 { + if yyrl3985 <= cap(yyv3985) { + yyv3985 = yyv3985[:yyrl3985] + } else { + yyv3985 = make([]Node, yyrl3985) + } + } else { + yyv3985 = make([]Node, yyrl3985) + } + yyc3985 = true + yyrr3985 = len(yyv3985) + if yyrg3985 { + copy(yyv3985, yyv23985) + } + } else if yyl3985 != len(yyv3985) { + yyv3985 = yyv3985[:yyl3985] + yyc3985 = true + } + yyj3985 := 0 + for ; yyj3985 < yyrr3985; yyj3985++ { + yyh3985.ElemContainerState(yyj3985) + if r.TryDecodeAsNil() { + yyv3985[yyj3985] = Node{} + } else { + yyv3986 := &yyv3985[yyj3985] + yyv3986.CodecDecodeSelf(d) + } + + } + if yyrt3985 { + for ; yyj3985 < yyl3985; yyj3985++ { + yyv3985 = append(yyv3985, Node{}) + yyh3985.ElemContainerState(yyj3985) + if r.TryDecodeAsNil() { + yyv3985[yyj3985] = Node{} + } else { + yyv3987 := &yyv3985[yyj3985] + yyv3987.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3985 := 0 + for ; !r.CheckBreak(); yyj3985++ { + + if yyj3985 >= len(yyv3985) { + yyv3985 = append(yyv3985, Node{}) // var yyz3985 Node + yyc3985 = true + } + yyh3985.ElemContainerState(yyj3985) + if yyj3985 < len(yyv3985) { + if r.TryDecodeAsNil() { + yyv3985[yyj3985] = Node{} + } else { + yyv3988 := &yyv3985[yyj3985] + yyv3988.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3985 < len(yyv3985) { + yyv3985 = yyv3985[:yyj3985] + yyc3985 = true + } else if yyj3985 == 0 && yyv3985 == nil { + yyv3985 = []Node{} + yyc3985 = true + } + } + yyh3985.End() + if yyc3985 { + *v = yyv3985 + } +} + +func (x codecSelfer1234) encSliceFinalizerName(v []FinalizerName, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3989 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yyv3989.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceFinalizerName(v *[]FinalizerName, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3990 := *v + yyh3990, yyl3990 := z.DecSliceHelperStart() + var yyc3990 bool + if yyl3990 == 0 { + if yyv3990 == nil { + yyv3990 = []FinalizerName{} + yyc3990 = true + } else if len(yyv3990) != 0 { + yyv3990 = yyv3990[:0] + yyc3990 = true + } + } else if yyl3990 > 0 { + var yyrr3990, yyrl3990 int + var yyrt3990 bool + if yyl3990 > cap(yyv3990) { + + yyrl3990, yyrt3990 = z.DecInferLen(yyl3990, z.DecBasicHandle().MaxInitLen, 16) + if yyrt3990 { + if yyrl3990 <= cap(yyv3990) { + yyv3990 = yyv3990[:yyrl3990] + } else { + yyv3990 = make([]FinalizerName, yyrl3990) + } + } else { + yyv3990 = make([]FinalizerName, yyrl3990) + } + yyc3990 = true + yyrr3990 = len(yyv3990) + } else if yyl3990 != len(yyv3990) { + yyv3990 = yyv3990[:yyl3990] + yyc3990 = true + } + yyj3990 := 0 + for ; yyj3990 < yyrr3990; yyj3990++ { + yyh3990.ElemContainerState(yyj3990) + if r.TryDecodeAsNil() { + yyv3990[yyj3990] = "" + } else { + yyv3990[yyj3990] = FinalizerName(r.DecodeString()) + } + + } + if yyrt3990 { + for ; yyj3990 < yyl3990; yyj3990++ { + yyv3990 = append(yyv3990, "") + yyh3990.ElemContainerState(yyj3990) + if r.TryDecodeAsNil() { + yyv3990[yyj3990] = "" + } else { + yyv3990[yyj3990] = FinalizerName(r.DecodeString()) + } + + } + } + + } else { + yyj3990 := 0 + for ; !r.CheckBreak(); yyj3990++ { + + if yyj3990 >= len(yyv3990) { + yyv3990 = append(yyv3990, "") // var yyz3990 FinalizerName + yyc3990 = true + } + yyh3990.ElemContainerState(yyj3990) + if yyj3990 < len(yyv3990) { + if r.TryDecodeAsNil() { + yyv3990[yyj3990] = "" + } else { + yyv3990[yyj3990] = FinalizerName(r.DecodeString()) + } + + } else { + z.DecSwallow() + } + + } + if yyj3990 < len(yyv3990) { + yyv3990 = yyv3990[:yyj3990] + yyc3990 = true + } else if yyj3990 == 0 && yyv3990 == nil { + yyv3990 = []FinalizerName{} + yyc3990 = true + } + } + yyh3990.End() + if yyc3990 { + *v = yyv3990 + } +} + +func (x codecSelfer1234) encSliceNamespace(v []Namespace, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3994 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3995 := &yyv3994 + yy3995.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceNamespace(v *[]Namespace, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3996 := *v + yyh3996, yyl3996 := z.DecSliceHelperStart() + var yyc3996 bool + if yyl3996 == 0 { + if yyv3996 == nil { + yyv3996 = []Namespace{} + yyc3996 = true + } else if len(yyv3996) != 0 { + yyv3996 = yyv3996[:0] + yyc3996 = true + } + } else if yyl3996 > 0 { + var yyrr3996, yyrl3996 int + var yyrt3996 bool + if yyl3996 > cap(yyv3996) { + + yyrg3996 := len(yyv3996) > 0 + yyv23996 := yyv3996 + yyrl3996, yyrt3996 = z.DecInferLen(yyl3996, z.DecBasicHandle().MaxInitLen, 232) + if yyrt3996 { + if yyrl3996 <= cap(yyv3996) { + yyv3996 = yyv3996[:yyrl3996] + } else { + yyv3996 = make([]Namespace, yyrl3996) + } + } else { + yyv3996 = make([]Namespace, yyrl3996) + } + yyc3996 = true + yyrr3996 = len(yyv3996) + if yyrg3996 { + copy(yyv3996, yyv23996) + } + } else if yyl3996 != len(yyv3996) { + yyv3996 = yyv3996[:yyl3996] + yyc3996 = true + } + yyj3996 := 0 + for ; yyj3996 < yyrr3996; yyj3996++ { + yyh3996.ElemContainerState(yyj3996) + if r.TryDecodeAsNil() { + yyv3996[yyj3996] = Namespace{} + } else { + yyv3997 := &yyv3996[yyj3996] + yyv3997.CodecDecodeSelf(d) + } + + } + if yyrt3996 { + for ; yyj3996 < yyl3996; yyj3996++ { + yyv3996 = append(yyv3996, Namespace{}) + yyh3996.ElemContainerState(yyj3996) + if r.TryDecodeAsNil() { + yyv3996[yyj3996] = Namespace{} + } else { + yyv3998 := &yyv3996[yyj3996] + yyv3998.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3996 := 0 + for ; !r.CheckBreak(); yyj3996++ { + + if yyj3996 >= len(yyv3996) { + yyv3996 = append(yyv3996, Namespace{}) // var yyz3996 Namespace + yyc3996 = true + } + yyh3996.ElemContainerState(yyj3996) + if yyj3996 < len(yyv3996) { + if r.TryDecodeAsNil() { + yyv3996[yyj3996] = Namespace{} + } else { + yyv3999 := &yyv3996[yyj3996] + yyv3999.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3996 < len(yyv3996) { + yyv3996 = yyv3996[:yyj3996] + yyc3996 = true + } else if yyj3996 == 0 && yyv3996 == nil { + yyv3996 = []Namespace{} + yyc3996 = true + } + } + yyh3996.End() + if yyc3996 { + *v = yyv3996 + } +} + +func (x codecSelfer1234) encSliceEvent(v []Event, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv4000 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy4001 := &yyv4000 + yy4001.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceEvent(v *[]Event, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv4002 := *v + yyh4002, yyl4002 := z.DecSliceHelperStart() + var yyc4002 bool + if yyl4002 == 0 { + if yyv4002 == nil { + yyv4002 = []Event{} + yyc4002 = true + } else if len(yyv4002) != 0 { + yyv4002 = yyv4002[:0] + yyc4002 = true + } + } else if yyl4002 > 0 { + var yyrr4002, yyrl4002 int + var yyrt4002 bool + if yyl4002 > cap(yyv4002) { + + yyrg4002 := len(yyv4002) > 0 + yyv24002 := yyv4002 + yyrl4002, yyrt4002 = z.DecInferLen(yyl4002, z.DecBasicHandle().MaxInitLen, 440) + if yyrt4002 { + if yyrl4002 <= cap(yyv4002) { + yyv4002 = yyv4002[:yyrl4002] + } else { + yyv4002 = make([]Event, yyrl4002) + } + } else { + yyv4002 = make([]Event, yyrl4002) + } + yyc4002 = true + yyrr4002 = len(yyv4002) + if yyrg4002 { + copy(yyv4002, yyv24002) + } + } else if yyl4002 != len(yyv4002) { + yyv4002 = yyv4002[:yyl4002] + yyc4002 = true + } + yyj4002 := 0 + for ; yyj4002 < yyrr4002; yyj4002++ { + yyh4002.ElemContainerState(yyj4002) + if r.TryDecodeAsNil() { + yyv4002[yyj4002] = Event{} + } else { + yyv4003 := &yyv4002[yyj4002] + yyv4003.CodecDecodeSelf(d) + } + + } + if yyrt4002 { + for ; yyj4002 < yyl4002; yyj4002++ { + yyv4002 = append(yyv4002, Event{}) + yyh4002.ElemContainerState(yyj4002) + if r.TryDecodeAsNil() { + yyv4002[yyj4002] = Event{} + } else { + yyv4004 := &yyv4002[yyj4002] + yyv4004.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj4002 := 0 + for ; !r.CheckBreak(); yyj4002++ { + + if yyj4002 >= len(yyv4002) { + yyv4002 = append(yyv4002, Event{}) // var yyz4002 Event + yyc4002 = true + } + yyh4002.ElemContainerState(yyj4002) + if yyj4002 < len(yyv4002) { + if r.TryDecodeAsNil() { + yyv4002[yyj4002] = Event{} + } else { + yyv4005 := &yyv4002[yyj4002] + yyv4005.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj4002 < len(yyv4002) { + yyv4002 = yyv4002[:yyj4002] + yyc4002 = true + } else if yyj4002 == 0 && yyv4002 == nil { + yyv4002 = []Event{} + yyc4002 = true + } + } + yyh4002.End() + if yyc4002 { + *v = yyv4002 + } +} + +func (x codecSelfer1234) encSliceruntime_Object(v []pkg8_runtime.Object, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv4006 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyv4006 == nil { + r.EncodeNil() + } else { + yym4007 := z.EncBinary() + _ = yym4007 + if false { + } else if z.HasExtensions() && z.EncExt(yyv4006) { + } else { + z.EncFallback(yyv4006) + } + } + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceruntime_Object(v *[]pkg8_runtime.Object, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv4008 := *v + yyh4008, yyl4008 := z.DecSliceHelperStart() + var yyc4008 bool + if yyl4008 == 0 { + if yyv4008 == nil { + yyv4008 = []pkg8_runtime.Object{} + yyc4008 = true + } else if len(yyv4008) != 0 { + yyv4008 = yyv4008[:0] + yyc4008 = true + } + } else if yyl4008 > 0 { + var yyrr4008, yyrl4008 int + var yyrt4008 bool + if yyl4008 > cap(yyv4008) { + + yyrg4008 := len(yyv4008) > 0 + yyv24008 := yyv4008 + yyrl4008, yyrt4008 = z.DecInferLen(yyl4008, z.DecBasicHandle().MaxInitLen, 16) + if yyrt4008 { + if yyrl4008 <= cap(yyv4008) { + yyv4008 = yyv4008[:yyrl4008] + } else { + yyv4008 = make([]pkg8_runtime.Object, yyrl4008) + } + } else { + yyv4008 = make([]pkg8_runtime.Object, yyrl4008) + } + yyc4008 = true + yyrr4008 = len(yyv4008) + if yyrg4008 { + copy(yyv4008, yyv24008) + } + } else if yyl4008 != len(yyv4008) { + yyv4008 = yyv4008[:yyl4008] + yyc4008 = true + } + yyj4008 := 0 + for ; yyj4008 < yyrr4008; yyj4008++ { + yyh4008.ElemContainerState(yyj4008) + if r.TryDecodeAsNil() { + yyv4008[yyj4008] = nil + } else { + yyv4009 := &yyv4008[yyj4008] + yym4010 := z.DecBinary() + _ = yym4010 + if false { + } else if z.HasExtensions() && z.DecExt(yyv4009) { + } else { + z.DecFallback(yyv4009, true) + } + } + + } + if yyrt4008 { + for ; yyj4008 < yyl4008; yyj4008++ { + yyv4008 = append(yyv4008, nil) + yyh4008.ElemContainerState(yyj4008) + if r.TryDecodeAsNil() { + yyv4008[yyj4008] = nil + } else { + yyv4011 := &yyv4008[yyj4008] + yym4012 := z.DecBinary() + _ = yym4012 + if false { + } else if z.HasExtensions() && z.DecExt(yyv4011) { + } else { + z.DecFallback(yyv4011, true) + } + } + + } + } + + } else { + yyj4008 := 0 + for ; !r.CheckBreak(); yyj4008++ { + + if yyj4008 >= len(yyv4008) { + yyv4008 = append(yyv4008, nil) // var yyz4008 pkg8_runtime.Object + yyc4008 = true + } + yyh4008.ElemContainerState(yyj4008) + if yyj4008 < len(yyv4008) { + if r.TryDecodeAsNil() { + yyv4008[yyj4008] = nil + } else { + yyv4013 := &yyv4008[yyj4008] + yym4014 := z.DecBinary() + _ = yym4014 + if false { + } else if z.HasExtensions() && z.DecExt(yyv4013) { + } else { + z.DecFallback(yyv4013, true) + } + } + + } else { + z.DecSwallow() + } + + } + if yyj4008 < len(yyv4008) { + yyv4008 = yyv4008[:yyj4008] + yyc4008 = true + } else if yyj4008 == 0 && yyv4008 == nil { + yyv4008 = []pkg8_runtime.Object{} + yyc4008 = true + } + } + yyh4008.End() + if yyc4008 { + *v = yyv4008 + } +} + func (x codecSelfer1234) encSliceLimitRangeItem(v []LimitRangeItem, e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3904 := range v { + for _, yyv4015 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3905 := &yyv3904 - yy3905.CodecEncodeSelf(e) + yy4016 := &yyv4015 + yy4016.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -49632,83 +51306,83 @@ func (x codecSelfer1234) decSliceLimitRangeItem(v *[]LimitRangeItem, d *codec197 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3906 := *v - yyh3906, yyl3906 := z.DecSliceHelperStart() - var yyc3906 bool - if yyl3906 == 0 { - if yyv3906 == nil { - yyv3906 = []LimitRangeItem{} - yyc3906 = true - } else if len(yyv3906) != 0 { - yyv3906 = yyv3906[:0] - yyc3906 = true + yyv4017 := *v + yyh4017, yyl4017 := z.DecSliceHelperStart() + var yyc4017 bool + if yyl4017 == 0 { + if yyv4017 == nil { + yyv4017 = []LimitRangeItem{} + yyc4017 = true + } else if len(yyv4017) != 0 { + yyv4017 = yyv4017[:0] + yyc4017 = true } - } else if yyl3906 > 0 { - var yyrr3906, yyrl3906 int - var yyrt3906 bool - if yyl3906 > cap(yyv3906) { + } else if yyl4017 > 0 { + var yyrr4017, yyrl4017 int + var yyrt4017 bool + if yyl4017 > cap(yyv4017) { - yyrg3906 := len(yyv3906) > 0 - yyv23906 := yyv3906 - yyrl3906, yyrt3906 = z.DecInferLen(yyl3906, z.DecBasicHandle().MaxInitLen, 56) - if yyrt3906 { - if yyrl3906 <= cap(yyv3906) { - yyv3906 = yyv3906[:yyrl3906] + yyrg4017 := len(yyv4017) > 0 + yyv24017 := yyv4017 + yyrl4017, yyrt4017 = z.DecInferLen(yyl4017, z.DecBasicHandle().MaxInitLen, 56) + if yyrt4017 { + if yyrl4017 <= cap(yyv4017) { + yyv4017 = yyv4017[:yyrl4017] } else { - yyv3906 = make([]LimitRangeItem, yyrl3906) + yyv4017 = make([]LimitRangeItem, yyrl4017) } } else { - yyv3906 = make([]LimitRangeItem, yyrl3906) + yyv4017 = make([]LimitRangeItem, yyrl4017) } - yyc3906 = true - yyrr3906 = len(yyv3906) - if yyrg3906 { - copy(yyv3906, yyv23906) + yyc4017 = true + yyrr4017 = len(yyv4017) + if yyrg4017 { + copy(yyv4017, yyv24017) } - } else if yyl3906 != len(yyv3906) { - yyv3906 = yyv3906[:yyl3906] - yyc3906 = true + } else if yyl4017 != len(yyv4017) { + yyv4017 = yyv4017[:yyl4017] + yyc4017 = true } - yyj3906 := 0 - for ; yyj3906 < yyrr3906; yyj3906++ { - yyh3906.ElemContainerState(yyj3906) + yyj4017 := 0 + for ; yyj4017 < yyrr4017; yyj4017++ { + yyh4017.ElemContainerState(yyj4017) if r.TryDecodeAsNil() { - yyv3906[yyj3906] = LimitRangeItem{} + yyv4017[yyj4017] = LimitRangeItem{} } else { - yyv3907 := &yyv3906[yyj3906] - yyv3907.CodecDecodeSelf(d) + yyv4018 := &yyv4017[yyj4017] + yyv4018.CodecDecodeSelf(d) } } - if yyrt3906 { - for ; yyj3906 < yyl3906; yyj3906++ { - yyv3906 = append(yyv3906, LimitRangeItem{}) - yyh3906.ElemContainerState(yyj3906) + if yyrt4017 { + for ; yyj4017 < yyl4017; yyj4017++ { + yyv4017 = append(yyv4017, LimitRangeItem{}) + yyh4017.ElemContainerState(yyj4017) if r.TryDecodeAsNil() { - yyv3906[yyj3906] = LimitRangeItem{} + yyv4017[yyj4017] = LimitRangeItem{} } else { - yyv3908 := &yyv3906[yyj3906] - yyv3908.CodecDecodeSelf(d) + yyv4019 := &yyv4017[yyj4017] + yyv4019.CodecDecodeSelf(d) } } } } else { - yyj3906 := 0 - for ; !r.CheckBreak(); yyj3906++ { + yyj4017 := 0 + for ; !r.CheckBreak(); yyj4017++ { - if yyj3906 >= len(yyv3906) { - yyv3906 = append(yyv3906, LimitRangeItem{}) // var yyz3906 LimitRangeItem - yyc3906 = true + if yyj4017 >= len(yyv4017) { + yyv4017 = append(yyv4017, LimitRangeItem{}) // var yyz4017 LimitRangeItem + yyc4017 = true } - yyh3906.ElemContainerState(yyj3906) - if yyj3906 < len(yyv3906) { + yyh4017.ElemContainerState(yyj4017) + if yyj4017 < len(yyv4017) { if r.TryDecodeAsNil() { - yyv3906[yyj3906] = LimitRangeItem{} + yyv4017[yyj4017] = LimitRangeItem{} } else { - yyv3909 := &yyv3906[yyj3906] - yyv3909.CodecDecodeSelf(d) + yyv4020 := &yyv4017[yyj4017] + yyv4020.CodecDecodeSelf(d) } } else { @@ -49716,17 +51390,17 @@ func (x codecSelfer1234) decSliceLimitRangeItem(v *[]LimitRangeItem, d *codec197 } } - if yyj3906 < len(yyv3906) { - yyv3906 = yyv3906[:yyj3906] - yyc3906 = true - } else if yyj3906 == 0 && yyv3906 == nil { - yyv3906 = []LimitRangeItem{} - yyc3906 = true + if yyj4017 < len(yyv4017) { + yyv4017 = yyv4017[:yyj4017] + yyc4017 = true + } else if yyj4017 == 0 && yyv4017 == nil { + yyv4017 = []LimitRangeItem{} + yyc4017 = true } } - yyh3906.End() - if yyc3906 { - *v = yyv3906 + yyh4017.End() + if yyc4017 { + *v = yyv4017 } } @@ -49735,10 +51409,10 @@ func (x codecSelfer1234) encSliceLimitRange(v []LimitRange, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3910 := range v { + for _, yyv4021 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3911 := &yyv3910 - yy3911.CodecEncodeSelf(e) + yy4022 := &yyv4021 + yy4022.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -49748,83 +51422,83 @@ func (x codecSelfer1234) decSliceLimitRange(v *[]LimitRange, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3912 := *v - yyh3912, yyl3912 := z.DecSliceHelperStart() - var yyc3912 bool - if yyl3912 == 0 { - if yyv3912 == nil { - yyv3912 = []LimitRange{} - yyc3912 = true - } else if len(yyv3912) != 0 { - yyv3912 = yyv3912[:0] - yyc3912 = true + yyv4023 := *v + yyh4023, yyl4023 := z.DecSliceHelperStart() + var yyc4023 bool + if yyl4023 == 0 { + if yyv4023 == nil { + yyv4023 = []LimitRange{} + yyc4023 = true + } else if len(yyv4023) != 0 { + yyv4023 = yyv4023[:0] + yyc4023 = true } - } else if yyl3912 > 0 { - var yyrr3912, yyrl3912 int - var yyrt3912 bool - if yyl3912 > cap(yyv3912) { + } else if yyl4023 > 0 { + var yyrr4023, yyrl4023 int + var yyrt4023 bool + if yyl4023 > cap(yyv4023) { - yyrg3912 := len(yyv3912) > 0 - yyv23912 := yyv3912 - yyrl3912, yyrt3912 = z.DecInferLen(yyl3912, z.DecBasicHandle().MaxInitLen, 216) - if yyrt3912 { - if yyrl3912 <= cap(yyv3912) { - yyv3912 = yyv3912[:yyrl3912] + yyrg4023 := len(yyv4023) > 0 + yyv24023 := yyv4023 + yyrl4023, yyrt4023 = z.DecInferLen(yyl4023, z.DecBasicHandle().MaxInitLen, 216) + if yyrt4023 { + if yyrl4023 <= cap(yyv4023) { + yyv4023 = yyv4023[:yyrl4023] } else { - yyv3912 = make([]LimitRange, yyrl3912) + yyv4023 = make([]LimitRange, yyrl4023) } } else { - yyv3912 = make([]LimitRange, yyrl3912) + yyv4023 = make([]LimitRange, yyrl4023) } - yyc3912 = true - yyrr3912 = len(yyv3912) - if yyrg3912 { - copy(yyv3912, yyv23912) + yyc4023 = true + yyrr4023 = len(yyv4023) + if yyrg4023 { + copy(yyv4023, yyv24023) } - } else if yyl3912 != len(yyv3912) { - yyv3912 = yyv3912[:yyl3912] - yyc3912 = true + } else if yyl4023 != len(yyv4023) { + yyv4023 = yyv4023[:yyl4023] + yyc4023 = true } - yyj3912 := 0 - for ; yyj3912 < yyrr3912; yyj3912++ { - yyh3912.ElemContainerState(yyj3912) + yyj4023 := 0 + for ; yyj4023 < yyrr4023; yyj4023++ { + yyh4023.ElemContainerState(yyj4023) if r.TryDecodeAsNil() { - yyv3912[yyj3912] = LimitRange{} + yyv4023[yyj4023] = LimitRange{} } else { - yyv3913 := &yyv3912[yyj3912] - yyv3913.CodecDecodeSelf(d) + yyv4024 := &yyv4023[yyj4023] + yyv4024.CodecDecodeSelf(d) } } - if yyrt3912 { - for ; yyj3912 < yyl3912; yyj3912++ { - yyv3912 = append(yyv3912, LimitRange{}) - yyh3912.ElemContainerState(yyj3912) + if yyrt4023 { + for ; yyj4023 < yyl4023; yyj4023++ { + yyv4023 = append(yyv4023, LimitRange{}) + yyh4023.ElemContainerState(yyj4023) if r.TryDecodeAsNil() { - yyv3912[yyj3912] = LimitRange{} + yyv4023[yyj4023] = LimitRange{} } else { - yyv3914 := &yyv3912[yyj3912] - yyv3914.CodecDecodeSelf(d) + yyv4025 := &yyv4023[yyj4023] + yyv4025.CodecDecodeSelf(d) } } } } else { - yyj3912 := 0 - for ; !r.CheckBreak(); yyj3912++ { + yyj4023 := 0 + for ; !r.CheckBreak(); yyj4023++ { - if yyj3912 >= len(yyv3912) { - yyv3912 = append(yyv3912, LimitRange{}) // var yyz3912 LimitRange - yyc3912 = true + if yyj4023 >= len(yyv4023) { + yyv4023 = append(yyv4023, LimitRange{}) // var yyz4023 LimitRange + yyc4023 = true } - yyh3912.ElemContainerState(yyj3912) - if yyj3912 < len(yyv3912) { + yyh4023.ElemContainerState(yyj4023) + if yyj4023 < len(yyv4023) { if r.TryDecodeAsNil() { - yyv3912[yyj3912] = LimitRange{} + yyv4023[yyj4023] = LimitRange{} } else { - yyv3915 := &yyv3912[yyj3912] - yyv3915.CodecDecodeSelf(d) + yyv4026 := &yyv4023[yyj4023] + yyv4026.CodecDecodeSelf(d) } } else { @@ -49832,17 +51506,17 @@ func (x codecSelfer1234) decSliceLimitRange(v *[]LimitRange, d *codec1978.Decode } } - if yyj3912 < len(yyv3912) { - yyv3912 = yyv3912[:yyj3912] - yyc3912 = true - } else if yyj3912 == 0 && yyv3912 == nil { - yyv3912 = []LimitRange{} - yyc3912 = true + if yyj4023 < len(yyv4023) { + yyv4023 = yyv4023[:yyj4023] + yyc4023 = true + } else if yyj4023 == 0 && yyv4023 == nil { + yyv4023 = []LimitRange{} + yyc4023 = true } } - yyh3912.End() - if yyc3912 { - *v = yyv3912 + yyh4023.End() + if yyc4023 { + *v = yyv4023 } } @@ -49851,10 +51525,10 @@ func (x codecSelfer1234) encSliceResourceQuota(v []ResourceQuota, e *codec1978.E z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3916 := range v { + for _, yyv4027 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3917 := &yyv3916 - yy3917.CodecEncodeSelf(e) + yy4028 := &yyv4027 + yy4028.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -49864,83 +51538,83 @@ func (x codecSelfer1234) decSliceResourceQuota(v *[]ResourceQuota, d *codec1978. z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3918 := *v - yyh3918, yyl3918 := z.DecSliceHelperStart() - var yyc3918 bool - if yyl3918 == 0 { - if yyv3918 == nil { - yyv3918 = []ResourceQuota{} - yyc3918 = true - } else if len(yyv3918) != 0 { - yyv3918 = yyv3918[:0] - yyc3918 = true + yyv4029 := *v + yyh4029, yyl4029 := z.DecSliceHelperStart() + var yyc4029 bool + if yyl4029 == 0 { + if yyv4029 == nil { + yyv4029 = []ResourceQuota{} + yyc4029 = true + } else if len(yyv4029) != 0 { + yyv4029 = yyv4029[:0] + yyc4029 = true } - } else if yyl3918 > 0 { - var yyrr3918, yyrl3918 int - var yyrt3918 bool - if yyl3918 > cap(yyv3918) { + } else if yyl4029 > 0 { + var yyrr4029, yyrl4029 int + var yyrt4029 bool + if yyl4029 > cap(yyv4029) { - yyrg3918 := len(yyv3918) > 0 - yyv23918 := yyv3918 - yyrl3918, yyrt3918 = z.DecInferLen(yyl3918, z.DecBasicHandle().MaxInitLen, 216) - if yyrt3918 { - if yyrl3918 <= cap(yyv3918) { - yyv3918 = yyv3918[:yyrl3918] + yyrg4029 := len(yyv4029) > 0 + yyv24029 := yyv4029 + yyrl4029, yyrt4029 = z.DecInferLen(yyl4029, z.DecBasicHandle().MaxInitLen, 216) + if yyrt4029 { + if yyrl4029 <= cap(yyv4029) { + yyv4029 = yyv4029[:yyrl4029] } else { - yyv3918 = make([]ResourceQuota, yyrl3918) + yyv4029 = make([]ResourceQuota, yyrl4029) } } else { - yyv3918 = make([]ResourceQuota, yyrl3918) + yyv4029 = make([]ResourceQuota, yyrl4029) } - yyc3918 = true - yyrr3918 = len(yyv3918) - if yyrg3918 { - copy(yyv3918, yyv23918) + yyc4029 = true + yyrr4029 = len(yyv4029) + if yyrg4029 { + copy(yyv4029, yyv24029) } - } else if yyl3918 != len(yyv3918) { - yyv3918 = yyv3918[:yyl3918] - yyc3918 = true + } else if yyl4029 != len(yyv4029) { + yyv4029 = yyv4029[:yyl4029] + yyc4029 = true } - yyj3918 := 0 - for ; yyj3918 < yyrr3918; yyj3918++ { - yyh3918.ElemContainerState(yyj3918) + yyj4029 := 0 + for ; yyj4029 < yyrr4029; yyj4029++ { + yyh4029.ElemContainerState(yyj4029) if r.TryDecodeAsNil() { - yyv3918[yyj3918] = ResourceQuota{} + yyv4029[yyj4029] = ResourceQuota{} } else { - yyv3919 := &yyv3918[yyj3918] - yyv3919.CodecDecodeSelf(d) + yyv4030 := &yyv4029[yyj4029] + yyv4030.CodecDecodeSelf(d) } } - if yyrt3918 { - for ; yyj3918 < yyl3918; yyj3918++ { - yyv3918 = append(yyv3918, ResourceQuota{}) - yyh3918.ElemContainerState(yyj3918) + if yyrt4029 { + for ; yyj4029 < yyl4029; yyj4029++ { + yyv4029 = append(yyv4029, ResourceQuota{}) + yyh4029.ElemContainerState(yyj4029) if r.TryDecodeAsNil() { - yyv3918[yyj3918] = ResourceQuota{} + yyv4029[yyj4029] = ResourceQuota{} } else { - yyv3920 := &yyv3918[yyj3918] - yyv3920.CodecDecodeSelf(d) + yyv4031 := &yyv4029[yyj4029] + yyv4031.CodecDecodeSelf(d) } } } } else { - yyj3918 := 0 - for ; !r.CheckBreak(); yyj3918++ { + yyj4029 := 0 + for ; !r.CheckBreak(); yyj4029++ { - if yyj3918 >= len(yyv3918) { - yyv3918 = append(yyv3918, ResourceQuota{}) // var yyz3918 ResourceQuota - yyc3918 = true + if yyj4029 >= len(yyv4029) { + yyv4029 = append(yyv4029, ResourceQuota{}) // var yyz4029 ResourceQuota + yyc4029 = true } - yyh3918.ElemContainerState(yyj3918) - if yyj3918 < len(yyv3918) { + yyh4029.ElemContainerState(yyj4029) + if yyj4029 < len(yyv4029) { if r.TryDecodeAsNil() { - yyv3918[yyj3918] = ResourceQuota{} + yyv4029[yyj4029] = ResourceQuota{} } else { - yyv3921 := &yyv3918[yyj3918] - yyv3921.CodecDecodeSelf(d) + yyv4032 := &yyv4029[yyj4029] + yyv4032.CodecDecodeSelf(d) } } else { @@ -49948,17 +51622,17 @@ func (x codecSelfer1234) decSliceResourceQuota(v *[]ResourceQuota, d *codec1978. } } - if yyj3918 < len(yyv3918) { - yyv3918 = yyv3918[:yyj3918] - yyc3918 = true - } else if yyj3918 == 0 && yyv3918 == nil { - yyv3918 = []ResourceQuota{} - yyc3918 = true + if yyj4029 < len(yyv4029) { + yyv4029 = yyv4029[:yyj4029] + yyc4029 = true + } else if yyj4029 == 0 && yyv4029 == nil { + yyv4029 = []ResourceQuota{} + yyc4029 = true } } - yyh3918.End() - if yyc3918 { - *v = yyv3918 + yyh4029.End() + if yyc4029 { + *v = yyv4029 } } @@ -49967,23 +51641,23 @@ func (x codecSelfer1234) encMapstringSliceuint8(v map[string][]uint8, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeMapStart(len(v)) - for yyk3922, yyv3922 := range v { + for yyk4033, yyv4033 := range v { z.EncSendContainerState(codecSelfer_containerMapKey1234) - yym3923 := z.EncBinary() - _ = yym3923 + yym4034 := z.EncBinary() + _ = yym4034 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(yyk3922)) + r.EncodeString(codecSelferC_UTF81234, string(yyk4033)) } z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyv3922 == nil { + if yyv4033 == nil { r.EncodeNil() } else { - yym3924 := z.EncBinary() - _ = yym3924 + yym4035 := z.EncBinary() + _ = yym4035 if false { } else { - r.EncodeStringBytes(codecSelferC_RAW1234, []byte(yyv3922)) + r.EncodeStringBytes(codecSelferC_RAW1234, []byte(yyv4033)) } } } @@ -49995,80 +51669,80 @@ func (x codecSelfer1234) decMapstringSliceuint8(v *map[string][]uint8, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3925 := *v - yyl3925 := r.ReadMapStart() - yybh3925 := z.DecBasicHandle() - if yyv3925 == nil { - yyrl3925, _ := z.DecInferLen(yyl3925, yybh3925.MaxInitLen, 40) - yyv3925 = make(map[string][]uint8, yyrl3925) - *v = yyv3925 + yyv4036 := *v + yyl4036 := r.ReadMapStart() + yybh4036 := z.DecBasicHandle() + if yyv4036 == nil { + yyrl4036, _ := z.DecInferLen(yyl4036, yybh4036.MaxInitLen, 40) + yyv4036 = make(map[string][]uint8, yyrl4036) + *v = yyv4036 } - var yymk3925 string - var yymv3925 []uint8 - var yymg3925 bool - if yybh3925.MapValueReset { - yymg3925 = true + var yymk4036 string + var yymv4036 []uint8 + var yymg4036 bool + if yybh4036.MapValueReset { + yymg4036 = true } - if yyl3925 > 0 { - for yyj3925 := 0; yyj3925 < yyl3925; yyj3925++ { + if yyl4036 > 0 { + for yyj4036 := 0; yyj4036 < yyl4036; yyj4036++ { z.DecSendContainerState(codecSelfer_containerMapKey1234) if r.TryDecodeAsNil() { - yymk3925 = "" + yymk4036 = "" } else { - yymk3925 = string(r.DecodeString()) + yymk4036 = string(r.DecodeString()) } - if yymg3925 { - yymv3925 = yyv3925[yymk3925] + if yymg4036 { + yymv4036 = yyv4036[yymk4036] } else { - yymv3925 = nil + yymv4036 = nil } z.DecSendContainerState(codecSelfer_containerMapValue1234) if r.TryDecodeAsNil() { - yymv3925 = nil + yymv4036 = nil } else { - yyv3927 := &yymv3925 - yym3928 := z.DecBinary() - _ = yym3928 + yyv4038 := &yymv4036 + yym4039 := z.DecBinary() + _ = yym4039 if false { } else { - *yyv3927 = r.DecodeBytes(*(*[]byte)(yyv3927), false, false) + *yyv4038 = r.DecodeBytes(*(*[]byte)(yyv4038), false, false) } } - if yyv3925 != nil { - yyv3925[yymk3925] = yymv3925 + if yyv4036 != nil { + yyv4036[yymk4036] = yymv4036 } } - } else if yyl3925 < 0 { - for yyj3925 := 0; !r.CheckBreak(); yyj3925++ { + } else if yyl4036 < 0 { + for yyj4036 := 0; !r.CheckBreak(); yyj4036++ { z.DecSendContainerState(codecSelfer_containerMapKey1234) if r.TryDecodeAsNil() { - yymk3925 = "" + yymk4036 = "" } else { - yymk3925 = string(r.DecodeString()) + yymk4036 = string(r.DecodeString()) } - if yymg3925 { - yymv3925 = yyv3925[yymk3925] + if yymg4036 { + yymv4036 = yyv4036[yymk4036] } else { - yymv3925 = nil + yymv4036 = nil } z.DecSendContainerState(codecSelfer_containerMapValue1234) if r.TryDecodeAsNil() { - yymv3925 = nil + yymv4036 = nil } else { - yyv3930 := &yymv3925 - yym3931 := z.DecBinary() - _ = yym3931 + yyv4041 := &yymv4036 + yym4042 := z.DecBinary() + _ = yym4042 if false { } else { - *yyv3930 = r.DecodeBytes(*(*[]byte)(yyv3930), false, false) + *yyv4041 = r.DecodeBytes(*(*[]byte)(yyv4041), false, false) } } - if yyv3925 != nil { - yyv3925[yymk3925] = yymv3925 + if yyv4036 != nil { + yyv4036[yymk4036] = yymv4036 } } } // else len==0: TODO: Should we clear map entries? @@ -50080,10 +51754,10 @@ func (x codecSelfer1234) encSliceSecret(v []Secret, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3932 := range v { + for _, yyv4043 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3933 := &yyv3932 - yy3933.CodecEncodeSelf(e) + yy4044 := &yyv4043 + yy4044.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -50093,83 +51767,83 @@ func (x codecSelfer1234) decSliceSecret(v *[]Secret, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3934 := *v - yyh3934, yyl3934 := z.DecSliceHelperStart() - var yyc3934 bool - if yyl3934 == 0 { - if yyv3934 == nil { - yyv3934 = []Secret{} - yyc3934 = true - } else if len(yyv3934) != 0 { - yyv3934 = yyv3934[:0] - yyc3934 = true + yyv4045 := *v + yyh4045, yyl4045 := z.DecSliceHelperStart() + var yyc4045 bool + if yyl4045 == 0 { + if yyv4045 == nil { + yyv4045 = []Secret{} + yyc4045 = true + } else if len(yyv4045) != 0 { + yyv4045 = yyv4045[:0] + yyc4045 = true } - } else if yyl3934 > 0 { - var yyrr3934, yyrl3934 int - var yyrt3934 bool - if yyl3934 > cap(yyv3934) { + } else if yyl4045 > 0 { + var yyrr4045, yyrl4045 int + var yyrt4045 bool + if yyl4045 > cap(yyv4045) { - yyrg3934 := len(yyv3934) > 0 - yyv23934 := yyv3934 - yyrl3934, yyrt3934 = z.DecInferLen(yyl3934, z.DecBasicHandle().MaxInitLen, 216) - if yyrt3934 { - if yyrl3934 <= cap(yyv3934) { - yyv3934 = yyv3934[:yyrl3934] + yyrg4045 := len(yyv4045) > 0 + yyv24045 := yyv4045 + yyrl4045, yyrt4045 = z.DecInferLen(yyl4045, z.DecBasicHandle().MaxInitLen, 216) + if yyrt4045 { + if yyrl4045 <= cap(yyv4045) { + yyv4045 = yyv4045[:yyrl4045] } else { - yyv3934 = make([]Secret, yyrl3934) + yyv4045 = make([]Secret, yyrl4045) } } else { - yyv3934 = make([]Secret, yyrl3934) + yyv4045 = make([]Secret, yyrl4045) } - yyc3934 = true - yyrr3934 = len(yyv3934) - if yyrg3934 { - copy(yyv3934, yyv23934) + yyc4045 = true + yyrr4045 = len(yyv4045) + if yyrg4045 { + copy(yyv4045, yyv24045) } - } else if yyl3934 != len(yyv3934) { - yyv3934 = yyv3934[:yyl3934] - yyc3934 = true + } else if yyl4045 != len(yyv4045) { + yyv4045 = yyv4045[:yyl4045] + yyc4045 = true } - yyj3934 := 0 - for ; yyj3934 < yyrr3934; yyj3934++ { - yyh3934.ElemContainerState(yyj3934) + yyj4045 := 0 + for ; yyj4045 < yyrr4045; yyj4045++ { + yyh4045.ElemContainerState(yyj4045) if r.TryDecodeAsNil() { - yyv3934[yyj3934] = Secret{} + yyv4045[yyj4045] = Secret{} } else { - yyv3935 := &yyv3934[yyj3934] - yyv3935.CodecDecodeSelf(d) + yyv4046 := &yyv4045[yyj4045] + yyv4046.CodecDecodeSelf(d) } } - if yyrt3934 { - for ; yyj3934 < yyl3934; yyj3934++ { - yyv3934 = append(yyv3934, Secret{}) - yyh3934.ElemContainerState(yyj3934) + if yyrt4045 { + for ; yyj4045 < yyl4045; yyj4045++ { + yyv4045 = append(yyv4045, Secret{}) + yyh4045.ElemContainerState(yyj4045) if r.TryDecodeAsNil() { - yyv3934[yyj3934] = Secret{} + yyv4045[yyj4045] = Secret{} } else { - yyv3936 := &yyv3934[yyj3934] - yyv3936.CodecDecodeSelf(d) + yyv4047 := &yyv4045[yyj4045] + yyv4047.CodecDecodeSelf(d) } } } } else { - yyj3934 := 0 - for ; !r.CheckBreak(); yyj3934++ { + yyj4045 := 0 + for ; !r.CheckBreak(); yyj4045++ { - if yyj3934 >= len(yyv3934) { - yyv3934 = append(yyv3934, Secret{}) // var yyz3934 Secret - yyc3934 = true + if yyj4045 >= len(yyv4045) { + yyv4045 = append(yyv4045, Secret{}) // var yyz4045 Secret + yyc4045 = true } - yyh3934.ElemContainerState(yyj3934) - if yyj3934 < len(yyv3934) { + yyh4045.ElemContainerState(yyj4045) + if yyj4045 < len(yyv4045) { if r.TryDecodeAsNil() { - yyv3934[yyj3934] = Secret{} + yyv4045[yyj4045] = Secret{} } else { - yyv3937 := &yyv3934[yyj3934] - yyv3937.CodecDecodeSelf(d) + yyv4048 := &yyv4045[yyj4045] + yyv4048.CodecDecodeSelf(d) } } else { @@ -50177,17 +51851,17 @@ func (x codecSelfer1234) decSliceSecret(v *[]Secret, d *codec1978.Decoder) { } } - if yyj3934 < len(yyv3934) { - yyv3934 = yyv3934[:yyj3934] - yyc3934 = true - } else if yyj3934 == 0 && yyv3934 == nil { - yyv3934 = []Secret{} - yyc3934 = true + if yyj4045 < len(yyv4045) { + yyv4045 = yyv4045[:yyj4045] + yyc4045 = true + } else if yyj4045 == 0 && yyv4045 == nil { + yyv4045 = []Secret{} + yyc4045 = true } } - yyh3934.End() - if yyc3934 { - *v = yyv3934 + yyh4045.End() + if yyc4045 { + *v = yyv4045 } } @@ -50196,10 +51870,10 @@ func (x codecSelfer1234) encSliceConfigMap(v []ConfigMap, e *codec1978.Encoder) z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3938 := range v { + for _, yyv4049 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3939 := &yyv3938 - yy3939.CodecEncodeSelf(e) + yy4050 := &yyv4049 + yy4050.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -50209,83 +51883,83 @@ func (x codecSelfer1234) decSliceConfigMap(v *[]ConfigMap, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3940 := *v - yyh3940, yyl3940 := z.DecSliceHelperStart() - var yyc3940 bool - if yyl3940 == 0 { - if yyv3940 == nil { - yyv3940 = []ConfigMap{} - yyc3940 = true - } else if len(yyv3940) != 0 { - yyv3940 = yyv3940[:0] - yyc3940 = true + yyv4051 := *v + yyh4051, yyl4051 := z.DecSliceHelperStart() + var yyc4051 bool + if yyl4051 == 0 { + if yyv4051 == nil { + yyv4051 = []ConfigMap{} + yyc4051 = true + } else if len(yyv4051) != 0 { + yyv4051 = yyv4051[:0] + yyc4051 = true } - } else if yyl3940 > 0 { - var yyrr3940, yyrl3940 int - var yyrt3940 bool - if yyl3940 > cap(yyv3940) { + } else if yyl4051 > 0 { + var yyrr4051, yyrl4051 int + var yyrt4051 bool + if yyl4051 > cap(yyv4051) { - yyrg3940 := len(yyv3940) > 0 - yyv23940 := yyv3940 - yyrl3940, yyrt3940 = z.DecInferLen(yyl3940, z.DecBasicHandle().MaxInitLen, 200) - if yyrt3940 { - if yyrl3940 <= cap(yyv3940) { - yyv3940 = yyv3940[:yyrl3940] + yyrg4051 := len(yyv4051) > 0 + yyv24051 := yyv4051 + yyrl4051, yyrt4051 = z.DecInferLen(yyl4051, z.DecBasicHandle().MaxInitLen, 200) + if yyrt4051 { + if yyrl4051 <= cap(yyv4051) { + yyv4051 = yyv4051[:yyrl4051] } else { - yyv3940 = make([]ConfigMap, yyrl3940) + yyv4051 = make([]ConfigMap, yyrl4051) } } else { - yyv3940 = make([]ConfigMap, yyrl3940) + yyv4051 = make([]ConfigMap, yyrl4051) } - yyc3940 = true - yyrr3940 = len(yyv3940) - if yyrg3940 { - copy(yyv3940, yyv23940) + yyc4051 = true + yyrr4051 = len(yyv4051) + if yyrg4051 { + copy(yyv4051, yyv24051) } - } else if yyl3940 != len(yyv3940) { - yyv3940 = yyv3940[:yyl3940] - yyc3940 = true + } else if yyl4051 != len(yyv4051) { + yyv4051 = yyv4051[:yyl4051] + yyc4051 = true } - yyj3940 := 0 - for ; yyj3940 < yyrr3940; yyj3940++ { - yyh3940.ElemContainerState(yyj3940) + yyj4051 := 0 + for ; yyj4051 < yyrr4051; yyj4051++ { + yyh4051.ElemContainerState(yyj4051) if r.TryDecodeAsNil() { - yyv3940[yyj3940] = ConfigMap{} + yyv4051[yyj4051] = ConfigMap{} } else { - yyv3941 := &yyv3940[yyj3940] - yyv3941.CodecDecodeSelf(d) + yyv4052 := &yyv4051[yyj4051] + yyv4052.CodecDecodeSelf(d) } } - if yyrt3940 { - for ; yyj3940 < yyl3940; yyj3940++ { - yyv3940 = append(yyv3940, ConfigMap{}) - yyh3940.ElemContainerState(yyj3940) + if yyrt4051 { + for ; yyj4051 < yyl4051; yyj4051++ { + yyv4051 = append(yyv4051, ConfigMap{}) + yyh4051.ElemContainerState(yyj4051) if r.TryDecodeAsNil() { - yyv3940[yyj3940] = ConfigMap{} + yyv4051[yyj4051] = ConfigMap{} } else { - yyv3942 := &yyv3940[yyj3940] - yyv3942.CodecDecodeSelf(d) + yyv4053 := &yyv4051[yyj4051] + yyv4053.CodecDecodeSelf(d) } } } } else { - yyj3940 := 0 - for ; !r.CheckBreak(); yyj3940++ { + yyj4051 := 0 + for ; !r.CheckBreak(); yyj4051++ { - if yyj3940 >= len(yyv3940) { - yyv3940 = append(yyv3940, ConfigMap{}) // var yyz3940 ConfigMap - yyc3940 = true + if yyj4051 >= len(yyv4051) { + yyv4051 = append(yyv4051, ConfigMap{}) // var yyz4051 ConfigMap + yyc4051 = true } - yyh3940.ElemContainerState(yyj3940) - if yyj3940 < len(yyv3940) { + yyh4051.ElemContainerState(yyj4051) + if yyj4051 < len(yyv4051) { if r.TryDecodeAsNil() { - yyv3940[yyj3940] = ConfigMap{} + yyv4051[yyj4051] = ConfigMap{} } else { - yyv3943 := &yyv3940[yyj3940] - yyv3943.CodecDecodeSelf(d) + yyv4054 := &yyv4051[yyj4051] + yyv4054.CodecDecodeSelf(d) } } else { @@ -50293,17 +51967,17 @@ func (x codecSelfer1234) decSliceConfigMap(v *[]ConfigMap, d *codec1978.Decoder) } } - if yyj3940 < len(yyv3940) { - yyv3940 = yyv3940[:yyj3940] - yyc3940 = true - } else if yyj3940 == 0 && yyv3940 == nil { - yyv3940 = []ConfigMap{} - yyc3940 = true + if yyj4051 < len(yyv4051) { + yyv4051 = yyv4051[:yyj4051] + yyc4051 = true + } else if yyj4051 == 0 && yyv4051 == nil { + yyv4051 = []ConfigMap{} + yyc4051 = true } } - yyh3940.End() - if yyc3940 { - *v = yyv3940 + yyh4051.End() + if yyc4051 { + *v = yyv4051 } } @@ -50312,10 +51986,10 @@ func (x codecSelfer1234) encSliceComponentCondition(v []ComponentCondition, e *c z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3944 := range v { + for _, yyv4055 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3945 := &yyv3944 - yy3945.CodecEncodeSelf(e) + yy4056 := &yyv4055 + yy4056.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -50325,83 +51999,83 @@ func (x codecSelfer1234) decSliceComponentCondition(v *[]ComponentCondition, d * z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3946 := *v - yyh3946, yyl3946 := z.DecSliceHelperStart() - var yyc3946 bool - if yyl3946 == 0 { - if yyv3946 == nil { - yyv3946 = []ComponentCondition{} - yyc3946 = true - } else if len(yyv3946) != 0 { - yyv3946 = yyv3946[:0] - yyc3946 = true + yyv4057 := *v + yyh4057, yyl4057 := z.DecSliceHelperStart() + var yyc4057 bool + if yyl4057 == 0 { + if yyv4057 == nil { + yyv4057 = []ComponentCondition{} + yyc4057 = true + } else if len(yyv4057) != 0 { + yyv4057 = yyv4057[:0] + yyc4057 = true } - } else if yyl3946 > 0 { - var yyrr3946, yyrl3946 int - var yyrt3946 bool - if yyl3946 > cap(yyv3946) { + } else if yyl4057 > 0 { + var yyrr4057, yyrl4057 int + var yyrt4057 bool + if yyl4057 > cap(yyv4057) { - yyrg3946 := len(yyv3946) > 0 - yyv23946 := yyv3946 - yyrl3946, yyrt3946 = z.DecInferLen(yyl3946, z.DecBasicHandle().MaxInitLen, 64) - if yyrt3946 { - if yyrl3946 <= cap(yyv3946) { - yyv3946 = yyv3946[:yyrl3946] + yyrg4057 := len(yyv4057) > 0 + yyv24057 := yyv4057 + yyrl4057, yyrt4057 = z.DecInferLen(yyl4057, z.DecBasicHandle().MaxInitLen, 64) + if yyrt4057 { + if yyrl4057 <= cap(yyv4057) { + yyv4057 = yyv4057[:yyrl4057] } else { - yyv3946 = make([]ComponentCondition, yyrl3946) + yyv4057 = make([]ComponentCondition, yyrl4057) } } else { - yyv3946 = make([]ComponentCondition, yyrl3946) + yyv4057 = make([]ComponentCondition, yyrl4057) } - yyc3946 = true - yyrr3946 = len(yyv3946) - if yyrg3946 { - copy(yyv3946, yyv23946) + yyc4057 = true + yyrr4057 = len(yyv4057) + if yyrg4057 { + copy(yyv4057, yyv24057) } - } else if yyl3946 != len(yyv3946) { - yyv3946 = yyv3946[:yyl3946] - yyc3946 = true + } else if yyl4057 != len(yyv4057) { + yyv4057 = yyv4057[:yyl4057] + yyc4057 = true } - yyj3946 := 0 - for ; yyj3946 < yyrr3946; yyj3946++ { - yyh3946.ElemContainerState(yyj3946) + yyj4057 := 0 + for ; yyj4057 < yyrr4057; yyj4057++ { + yyh4057.ElemContainerState(yyj4057) if r.TryDecodeAsNil() { - yyv3946[yyj3946] = ComponentCondition{} + yyv4057[yyj4057] = ComponentCondition{} } else { - yyv3947 := &yyv3946[yyj3946] - yyv3947.CodecDecodeSelf(d) + yyv4058 := &yyv4057[yyj4057] + yyv4058.CodecDecodeSelf(d) } } - if yyrt3946 { - for ; yyj3946 < yyl3946; yyj3946++ { - yyv3946 = append(yyv3946, ComponentCondition{}) - yyh3946.ElemContainerState(yyj3946) + if yyrt4057 { + for ; yyj4057 < yyl4057; yyj4057++ { + yyv4057 = append(yyv4057, ComponentCondition{}) + yyh4057.ElemContainerState(yyj4057) if r.TryDecodeAsNil() { - yyv3946[yyj3946] = ComponentCondition{} + yyv4057[yyj4057] = ComponentCondition{} } else { - yyv3948 := &yyv3946[yyj3946] - yyv3948.CodecDecodeSelf(d) + yyv4059 := &yyv4057[yyj4057] + yyv4059.CodecDecodeSelf(d) } } } } else { - yyj3946 := 0 - for ; !r.CheckBreak(); yyj3946++ { + yyj4057 := 0 + for ; !r.CheckBreak(); yyj4057++ { - if yyj3946 >= len(yyv3946) { - yyv3946 = append(yyv3946, ComponentCondition{}) // var yyz3946 ComponentCondition - yyc3946 = true + if yyj4057 >= len(yyv4057) { + yyv4057 = append(yyv4057, ComponentCondition{}) // var yyz4057 ComponentCondition + yyc4057 = true } - yyh3946.ElemContainerState(yyj3946) - if yyj3946 < len(yyv3946) { + yyh4057.ElemContainerState(yyj4057) + if yyj4057 < len(yyv4057) { if r.TryDecodeAsNil() { - yyv3946[yyj3946] = ComponentCondition{} + yyv4057[yyj4057] = ComponentCondition{} } else { - yyv3949 := &yyv3946[yyj3946] - yyv3949.CodecDecodeSelf(d) + yyv4060 := &yyv4057[yyj4057] + yyv4060.CodecDecodeSelf(d) } } else { @@ -50409,17 +52083,17 @@ func (x codecSelfer1234) decSliceComponentCondition(v *[]ComponentCondition, d * } } - if yyj3946 < len(yyv3946) { - yyv3946 = yyv3946[:yyj3946] - yyc3946 = true - } else if yyj3946 == 0 && yyv3946 == nil { - yyv3946 = []ComponentCondition{} - yyc3946 = true + if yyj4057 < len(yyv4057) { + yyv4057 = yyv4057[:yyj4057] + yyc4057 = true + } else if yyj4057 == 0 && yyv4057 == nil { + yyv4057 = []ComponentCondition{} + yyc4057 = true } } - yyh3946.End() - if yyc3946 { - *v = yyv3946 + yyh4057.End() + if yyc4057 { + *v = yyv4057 } } @@ -50428,10 +52102,10 @@ func (x codecSelfer1234) encSliceComponentStatus(v []ComponentStatus, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3950 := range v { + for _, yyv4061 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3951 := &yyv3950 - yy3951.CodecEncodeSelf(e) + yy4062 := &yyv4061 + yy4062.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -50441,83 +52115,83 @@ func (x codecSelfer1234) decSliceComponentStatus(v *[]ComponentStatus, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3952 := *v - yyh3952, yyl3952 := z.DecSliceHelperStart() - var yyc3952 bool - if yyl3952 == 0 { - if yyv3952 == nil { - yyv3952 = []ComponentStatus{} - yyc3952 = true - } else if len(yyv3952) != 0 { - yyv3952 = yyv3952[:0] - yyc3952 = true + yyv4063 := *v + yyh4063, yyl4063 := z.DecSliceHelperStart() + var yyc4063 bool + if yyl4063 == 0 { + if yyv4063 == nil { + yyv4063 = []ComponentStatus{} + yyc4063 = true + } else if len(yyv4063) != 0 { + yyv4063 = yyv4063[:0] + yyc4063 = true } - } else if yyl3952 > 0 { - var yyrr3952, yyrl3952 int - var yyrt3952 bool - if yyl3952 > cap(yyv3952) { + } else if yyl4063 > 0 { + var yyrr4063, yyrl4063 int + var yyrt4063 bool + if yyl4063 > cap(yyv4063) { - yyrg3952 := len(yyv3952) > 0 - yyv23952 := yyv3952 - yyrl3952, yyrt3952 = z.DecInferLen(yyl3952, z.DecBasicHandle().MaxInitLen, 216) - if yyrt3952 { - if yyrl3952 <= cap(yyv3952) { - yyv3952 = yyv3952[:yyrl3952] + yyrg4063 := len(yyv4063) > 0 + yyv24063 := yyv4063 + yyrl4063, yyrt4063 = z.DecInferLen(yyl4063, z.DecBasicHandle().MaxInitLen, 216) + if yyrt4063 { + if yyrl4063 <= cap(yyv4063) { + yyv4063 = yyv4063[:yyrl4063] } else { - yyv3952 = make([]ComponentStatus, yyrl3952) + yyv4063 = make([]ComponentStatus, yyrl4063) } } else { - yyv3952 = make([]ComponentStatus, yyrl3952) + yyv4063 = make([]ComponentStatus, yyrl4063) } - yyc3952 = true - yyrr3952 = len(yyv3952) - if yyrg3952 { - copy(yyv3952, yyv23952) + yyc4063 = true + yyrr4063 = len(yyv4063) + if yyrg4063 { + copy(yyv4063, yyv24063) } - } else if yyl3952 != len(yyv3952) { - yyv3952 = yyv3952[:yyl3952] - yyc3952 = true + } else if yyl4063 != len(yyv4063) { + yyv4063 = yyv4063[:yyl4063] + yyc4063 = true } - yyj3952 := 0 - for ; yyj3952 < yyrr3952; yyj3952++ { - yyh3952.ElemContainerState(yyj3952) + yyj4063 := 0 + for ; yyj4063 < yyrr4063; yyj4063++ { + yyh4063.ElemContainerState(yyj4063) if r.TryDecodeAsNil() { - yyv3952[yyj3952] = ComponentStatus{} + yyv4063[yyj4063] = ComponentStatus{} } else { - yyv3953 := &yyv3952[yyj3952] - yyv3953.CodecDecodeSelf(d) + yyv4064 := &yyv4063[yyj4063] + yyv4064.CodecDecodeSelf(d) } } - if yyrt3952 { - for ; yyj3952 < yyl3952; yyj3952++ { - yyv3952 = append(yyv3952, ComponentStatus{}) - yyh3952.ElemContainerState(yyj3952) + if yyrt4063 { + for ; yyj4063 < yyl4063; yyj4063++ { + yyv4063 = append(yyv4063, ComponentStatus{}) + yyh4063.ElemContainerState(yyj4063) if r.TryDecodeAsNil() { - yyv3952[yyj3952] = ComponentStatus{} + yyv4063[yyj4063] = ComponentStatus{} } else { - yyv3954 := &yyv3952[yyj3952] - yyv3954.CodecDecodeSelf(d) + yyv4065 := &yyv4063[yyj4063] + yyv4065.CodecDecodeSelf(d) } } } } else { - yyj3952 := 0 - for ; !r.CheckBreak(); yyj3952++ { + yyj4063 := 0 + for ; !r.CheckBreak(); yyj4063++ { - if yyj3952 >= len(yyv3952) { - yyv3952 = append(yyv3952, ComponentStatus{}) // var yyz3952 ComponentStatus - yyc3952 = true + if yyj4063 >= len(yyv4063) { + yyv4063 = append(yyv4063, ComponentStatus{}) // var yyz4063 ComponentStatus + yyc4063 = true } - yyh3952.ElemContainerState(yyj3952) - if yyj3952 < len(yyv3952) { + yyh4063.ElemContainerState(yyj4063) + if yyj4063 < len(yyv4063) { if r.TryDecodeAsNil() { - yyv3952[yyj3952] = ComponentStatus{} + yyv4063[yyj4063] = ComponentStatus{} } else { - yyv3955 := &yyv3952[yyj3952] - yyv3955.CodecDecodeSelf(d) + yyv4066 := &yyv4063[yyj4063] + yyv4066.CodecDecodeSelf(d) } } else { @@ -50525,16 +52199,16 @@ func (x codecSelfer1234) decSliceComponentStatus(v *[]ComponentStatus, d *codec1 } } - if yyj3952 < len(yyv3952) { - yyv3952 = yyv3952[:yyj3952] - yyc3952 = true - } else if yyj3952 == 0 && yyv3952 == nil { - yyv3952 = []ComponentStatus{} - yyc3952 = true + if yyj4063 < len(yyv4063) { + yyv4063 = yyv4063[:yyj4063] + yyc4063 = true + } else if yyj4063 == 0 && yyv4063 == nil { + yyv4063 = []ComponentStatus{} + yyc4063 = true } } - yyh3952.End() - if yyc3952 { - *v = yyv3952 + yyh4063.End() + if yyc4063 { + *v = yyv4063 } } diff --git a/pkg/api/types.go b/pkg/api/types.go index b722057f33c..1d09bffeb51 100644 --- a/pkg/api/types.go +++ b/pkg/api/types.go @@ -1043,6 +1043,93 @@ const ( DNSDefault DNSPolicy = "Default" ) +// A node selector represents the union of the results of one or more label queries +// over a set of nodes; that is, it represents the OR of the selectors represented +// by the node selector terms. +type NodeSelector struct { + //Required. A list of node selector terms. The terms are ORed. + NodeSelectorTerms []NodeSelectorTerm `json:"nodeSelectorTerms"` +} + +// A null or empty node selector term matches no objects. +type NodeSelectorTerm struct { + //Required. A list of node selector requirements. The requirements are ANDed. + MatchExpressions []NodeSelectorRequirement `json:"matchExpressions"` +} + +// A node selector requirement is a selector that contains values, a key, and an operator +// that relates the key and values. +type NodeSelectorRequirement struct { + // The label key that the selector applies to. + Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key"` + // Represents a key's relationship to a set of values. + // Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + Operator NodeSelectorOperator `json:"operator"` + // An array of string values. If the operator is In or NotIn, + // the values array must be non-empty. If the operator is Exists or DoesNotExist, + // the values array must be empty. If the operator is Gt or Lt, the values + // array must have a single element, which will be interpreted as an integer. + // This array is replaced during a strategic merge patch. + Values []string `json:"values,omitempty"` +} + +// A node selector operator is the set of operators that can be used in +// a node selector requirement. +type NodeSelectorOperator string + +const ( + NodeSelectorOpIn NodeSelectorOperator = "In" + NodeSelectorOpNotIn NodeSelectorOperator = "NotIn" + NodeSelectorOpExists NodeSelectorOperator = "Exists" + NodeSelectorOpDoesNotExist NodeSelectorOperator = "DoesNotExist" + NodeSelectorOpGt NodeSelectorOperator = "Gt" + NodeSelectorOpLt NodeSelectorOperator = "Lt" +) + +// Affinity is a group of affinity scheduling requirements. +type Affinity struct { + // Describes node affinity scheduling requirements for the pod. + NodeAffinity *NodeAffinity `json:"nodeAffinity,omitempty"` +} + +// Node affinity is a group of node affinity scheduling requirements. +// If RequiredDuringSchedulingRequiredDuringExecution and +// RequiredDuringSchedulingIgnoredDuringExecution are both set, +// then both node selectors must be satisfied. +type NodeAffinity struct { + // If the affinity requirements specified by this field are not met at + // scheduling time, the pod will not be scheduled onto the node. + // If the affinity requirements specified by this field cease to be met + // at some point during pod execution (e.g. due to an update), the system + // will try to eventually evict the pod from its node. + RequiredDuringSchedulingRequiredDuringExecution *NodeSelector `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` + // If the affinity requirements specified by this field are not met at + // scheduling time, the pod will not be scheduled onto the node. + // If the affinity requirements specified by this field cease to be met + // at some point during pod execution (e.g. due to an update), the system + // may or may not try to eventually evict the pod from its node. + RequiredDuringSchedulingIgnoredDuringExecution *NodeSelector `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"` + // The scheduler will prefer to schedule pods to nodes that satisfy + // the affinity expressions specified by this field, but it may choose + // a node that violates one or more of the expressions. The node that is + // most preferred is the one with the greatest sum of weights, i.e. + // for each node that meets all of the scheduling requirements (resource + // request, requiredDuringScheduling affinity expressions, etc.), + // compute a sum by iterating through the elements of this field and adding + // "weight" to the sum if the node matches the corresponding matchExpressions; the + // node(s) with the highest sum are the most preferred. + PreferredDuringSchedulingIgnoredDuringExecution []PreferredSchedulingTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty"` +} + +// An empty preferred scheduling term matches all objects with implicit weight 0 +// (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). +type PreferredSchedulingTerm struct { + // Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. + Weight int `json:"weight"` + // A node selector term, associated with the corresponding weight. + Preference NodeSelectorTerm `json:"preference"` +} + // PodSpec is a description of a pod type PodSpec struct { Volumes []Volume `json:"volumes"` diff --git a/pkg/api/v1/types.generated.go b/pkg/api/v1/types.generated.go index 2efd94f0580..b76bd65e31e 100644 --- a/pkg/api/v1/types.generated.go +++ b/pkg/api/v1/types.generated.go @@ -19828,7 +19828,7 @@ func (x *DNSPolicy) CodecDecodeSelf(d *codec1978.Decoder) { } } -func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { +func (x *NodeSelector) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r @@ -19842,26 +19842,12 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep1455 := !z.EncBinary() yy2arr1455 := z.EncBasicHandle().StructToArray - var yyq1455 [15]bool + var yyq1455 [1]bool _, _, _ = yysep1455, yyq1455, yy2arr1455 const yyr1455 bool = false - yyq1455[0] = len(x.Volumes) != 0 - yyq1455[2] = x.RestartPolicy != "" - yyq1455[3] = x.TerminationGracePeriodSeconds != nil - yyq1455[4] = x.ActiveDeadlineSeconds != nil - yyq1455[5] = x.DNSPolicy != "" - yyq1455[6] = len(x.NodeSelector) != 0 - yyq1455[7] = x.ServiceAccountName != "" - yyq1455[8] = x.DeprecatedServiceAccount != "" - yyq1455[9] = x.NodeName != "" - yyq1455[10] = x.HostNetwork != false - yyq1455[11] = x.HostPID != false - yyq1455[12] = x.HostIPC != false - yyq1455[13] = x.SecurityContext != nil - yyq1455[14] = len(x.ImagePullSecrets) != 0 var yynn1455 int if yyr1455 || yy2arr1455 { - r.EncodeArrayStart(15) + r.EncodeArrayStart(1) } else { yynn1455 = 1 for _, b := range yyq1455 { @@ -19874,400 +19860,28 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr1455 || yy2arr1455 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1455[0] { - if x.Volumes == nil { - r.EncodeNil() - } else { - yym1457 := z.EncBinary() - _ = yym1457 - if false { - } else { - h.encSliceVolume(([]Volume)(x.Volumes), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1455[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("volumes")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Volumes == nil { - r.EncodeNil() - } else { - yym1458 := z.EncBinary() - _ = yym1458 - if false { - } else { - h.encSliceVolume(([]Volume)(x.Volumes), e) - } - } - } - } - if yyr1455 || yy2arr1455 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Containers == nil { + if x.NodeSelectorTerms == nil { r.EncodeNil() } else { - yym1460 := z.EncBinary() - _ = yym1460 + yym1457 := z.EncBinary() + _ = yym1457 if false { } else { - h.encSliceContainer(([]Container)(x.Containers), e) + h.encSliceNodeSelectorTerm(([]NodeSelectorTerm)(x.NodeSelectorTerms), e) } } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("containers")) + r.EncodeString(codecSelferC_UTF81234, string("nodeSelectorTerms")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Containers == nil { + if x.NodeSelectorTerms == nil { r.EncodeNil() } else { - yym1461 := z.EncBinary() - _ = yym1461 + yym1458 := z.EncBinary() + _ = yym1458 if false { } else { - h.encSliceContainer(([]Container)(x.Containers), e) - } - } - } - if yyr1455 || yy2arr1455 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1455[2] { - x.RestartPolicy.CodecEncodeSelf(e) - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1455[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("restartPolicy")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - x.RestartPolicy.CodecEncodeSelf(e) - } - } - if yyr1455 || yy2arr1455 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1455[3] { - if x.TerminationGracePeriodSeconds == nil { - r.EncodeNil() - } else { - yy1464 := *x.TerminationGracePeriodSeconds - yym1465 := z.EncBinary() - _ = yym1465 - if false { - } else { - r.EncodeInt(int64(yy1464)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1455[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("terminationGracePeriodSeconds")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.TerminationGracePeriodSeconds == nil { - r.EncodeNil() - } else { - yy1466 := *x.TerminationGracePeriodSeconds - yym1467 := z.EncBinary() - _ = yym1467 - if false { - } else { - r.EncodeInt(int64(yy1466)) - } - } - } - } - if yyr1455 || yy2arr1455 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1455[4] { - if x.ActiveDeadlineSeconds == nil { - r.EncodeNil() - } else { - yy1469 := *x.ActiveDeadlineSeconds - yym1470 := z.EncBinary() - _ = yym1470 - if false { - } else { - r.EncodeInt(int64(yy1469)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1455[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("activeDeadlineSeconds")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.ActiveDeadlineSeconds == nil { - r.EncodeNil() - } else { - yy1471 := *x.ActiveDeadlineSeconds - yym1472 := z.EncBinary() - _ = yym1472 - if false { - } else { - r.EncodeInt(int64(yy1471)) - } - } - } - } - if yyr1455 || yy2arr1455 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1455[5] { - x.DNSPolicy.CodecEncodeSelf(e) - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1455[5] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("dnsPolicy")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - x.DNSPolicy.CodecEncodeSelf(e) - } - } - if yyr1455 || yy2arr1455 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1455[6] { - if x.NodeSelector == nil { - r.EncodeNil() - } else { - yym1475 := z.EncBinary() - _ = yym1475 - if false { - } else { - z.F.EncMapStringStringV(x.NodeSelector, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1455[6] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("nodeSelector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.NodeSelector == nil { - r.EncodeNil() - } else { - yym1476 := z.EncBinary() - _ = yym1476 - if false { - } else { - z.F.EncMapStringStringV(x.NodeSelector, false, e) - } - } - } - } - if yyr1455 || yy2arr1455 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1455[7] { - yym1478 := z.EncBinary() - _ = yym1478 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountName)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1455[7] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("serviceAccountName")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1479 := z.EncBinary() - _ = yym1479 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountName)) - } - } - } - if yyr1455 || yy2arr1455 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1455[8] { - yym1481 := z.EncBinary() - _ = yym1481 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.DeprecatedServiceAccount)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1455[8] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("serviceAccount")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1482 := z.EncBinary() - _ = yym1482 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.DeprecatedServiceAccount)) - } - } - } - if yyr1455 || yy2arr1455 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1455[9] { - yym1484 := z.EncBinary() - _ = yym1484 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.NodeName)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1455[9] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("nodeName")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1485 := z.EncBinary() - _ = yym1485 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.NodeName)) - } - } - } - if yyr1455 || yy2arr1455 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1455[10] { - yym1487 := z.EncBinary() - _ = yym1487 - if false { - } else { - r.EncodeBool(bool(x.HostNetwork)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq1455[10] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("hostNetwork")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1488 := z.EncBinary() - _ = yym1488 - if false { - } else { - r.EncodeBool(bool(x.HostNetwork)) - } - } - } - if yyr1455 || yy2arr1455 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1455[11] { - yym1490 := z.EncBinary() - _ = yym1490 - if false { - } else { - r.EncodeBool(bool(x.HostPID)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq1455[11] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("hostPID")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1491 := z.EncBinary() - _ = yym1491 - if false { - } else { - r.EncodeBool(bool(x.HostPID)) - } - } - } - if yyr1455 || yy2arr1455 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1455[12] { - yym1493 := z.EncBinary() - _ = yym1493 - if false { - } else { - r.EncodeBool(bool(x.HostIPC)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq1455[12] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("hostIPC")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1494 := z.EncBinary() - _ = yym1494 - if false { - } else { - r.EncodeBool(bool(x.HostIPC)) - } - } - } - if yyr1455 || yy2arr1455 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1455[13] { - if x.SecurityContext == nil { - r.EncodeNil() - } else { - x.SecurityContext.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } else { - if yyq1455[13] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("securityContext")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.SecurityContext == nil { - r.EncodeNil() - } else { - x.SecurityContext.CodecEncodeSelf(e) - } - } - } - if yyr1455 || yy2arr1455 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1455[14] { - if x.ImagePullSecrets == nil { - r.EncodeNil() - } else { - yym1497 := z.EncBinary() - _ = yym1497 - if false { - } else { - h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1455[14] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("imagePullSecrets")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.ImagePullSecrets == nil { - r.EncodeNil() - } else { - yym1498 := z.EncBinary() - _ = yym1498 - if false { - } else { - h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e) - } + h.encSliceNodeSelectorTerm(([]NodeSelectorTerm)(x.NodeSelectorTerms), e) } } } @@ -20280,29 +19894,1741 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } +func (x *NodeSelector) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1459 := z.DecBinary() + _ = yym1459 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1460 := r.ContainerType() + if yyct1460 == codecSelferValueTypeMap1234 { + yyl1460 := r.ReadMapStart() + if yyl1460 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1460, d) + } + } else if yyct1460 == codecSelferValueTypeArray1234 { + yyl1460 := r.ReadArrayStart() + if yyl1460 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1460, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *NodeSelector) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1461Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1461Slc + var yyhl1461 bool = l >= 0 + for yyj1461 := 0; ; yyj1461++ { + if yyhl1461 { + if yyj1461 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1461Slc = r.DecodeBytes(yys1461Slc, true, true) + yys1461 := string(yys1461Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1461 { + case "nodeSelectorTerms": + if r.TryDecodeAsNil() { + x.NodeSelectorTerms = nil + } else { + yyv1462 := &x.NodeSelectorTerms + yym1463 := z.DecBinary() + _ = yym1463 + if false { + } else { + h.decSliceNodeSelectorTerm((*[]NodeSelectorTerm)(yyv1462), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys1461) + } // end switch yys1461 + } // end for yyj1461 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *NodeSelector) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1464 int + var yyb1464 bool + var yyhl1464 bool = l >= 0 + yyj1464++ + if yyhl1464 { + yyb1464 = yyj1464 > l + } else { + yyb1464 = r.CheckBreak() + } + if yyb1464 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.NodeSelectorTerms = nil + } else { + yyv1465 := &x.NodeSelectorTerms + yym1466 := z.DecBinary() + _ = yym1466 + if false { + } else { + h.decSliceNodeSelectorTerm((*[]NodeSelectorTerm)(yyv1465), d) + } + } + for { + yyj1464++ + if yyhl1464 { + yyb1464 = yyj1464 > l + } else { + yyb1464 = r.CheckBreak() + } + if yyb1464 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1464-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *NodeSelectorTerm) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1467 := z.EncBinary() + _ = yym1467 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1468 := !z.EncBinary() + yy2arr1468 := z.EncBasicHandle().StructToArray + var yyq1468 [1]bool + _, _, _ = yysep1468, yyq1468, yy2arr1468 + const yyr1468 bool = false + var yynn1468 int + if yyr1468 || yy2arr1468 { + r.EncodeArrayStart(1) + } else { + yynn1468 = 1 + for _, b := range yyq1468 { + if b { + yynn1468++ + } + } + r.EncodeMapStart(yynn1468) + yynn1468 = 0 + } + if yyr1468 || yy2arr1468 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.MatchExpressions == nil { + r.EncodeNil() + } else { + yym1470 := z.EncBinary() + _ = yym1470 + if false { + } else { + h.encSliceNodeSelectorRequirement(([]NodeSelectorRequirement)(x.MatchExpressions), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("matchExpressions")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.MatchExpressions == nil { + r.EncodeNil() + } else { + yym1471 := z.EncBinary() + _ = yym1471 + if false { + } else { + h.encSliceNodeSelectorRequirement(([]NodeSelectorRequirement)(x.MatchExpressions), e) + } + } + } + if yyr1468 || yy2arr1468 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *NodeSelectorTerm) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1472 := z.DecBinary() + _ = yym1472 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1473 := r.ContainerType() + if yyct1473 == codecSelferValueTypeMap1234 { + yyl1473 := r.ReadMapStart() + if yyl1473 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1473, d) + } + } else if yyct1473 == codecSelferValueTypeArray1234 { + yyl1473 := r.ReadArrayStart() + if yyl1473 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1473, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *NodeSelectorTerm) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1474Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1474Slc + var yyhl1474 bool = l >= 0 + for yyj1474 := 0; ; yyj1474++ { + if yyhl1474 { + if yyj1474 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1474Slc = r.DecodeBytes(yys1474Slc, true, true) + yys1474 := string(yys1474Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1474 { + case "matchExpressions": + if r.TryDecodeAsNil() { + x.MatchExpressions = nil + } else { + yyv1475 := &x.MatchExpressions + yym1476 := z.DecBinary() + _ = yym1476 + if false { + } else { + h.decSliceNodeSelectorRequirement((*[]NodeSelectorRequirement)(yyv1475), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys1474) + } // end switch yys1474 + } // end for yyj1474 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *NodeSelectorTerm) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1477 int + var yyb1477 bool + var yyhl1477 bool = l >= 0 + yyj1477++ + if yyhl1477 { + yyb1477 = yyj1477 > l + } else { + yyb1477 = r.CheckBreak() + } + if yyb1477 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.MatchExpressions = nil + } else { + yyv1478 := &x.MatchExpressions + yym1479 := z.DecBinary() + _ = yym1479 + if false { + } else { + h.decSliceNodeSelectorRequirement((*[]NodeSelectorRequirement)(yyv1478), d) + } + } + for { + yyj1477++ + if yyhl1477 { + yyb1477 = yyj1477 > l + } else { + yyb1477 = r.CheckBreak() + } + if yyb1477 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1477-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *NodeSelectorRequirement) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1480 := z.EncBinary() + _ = yym1480 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1481 := !z.EncBinary() + yy2arr1481 := z.EncBasicHandle().StructToArray + var yyq1481 [3]bool + _, _, _ = yysep1481, yyq1481, yy2arr1481 + const yyr1481 bool = false + yyq1481[2] = len(x.Values) != 0 + var yynn1481 int + if yyr1481 || yy2arr1481 { + r.EncodeArrayStart(3) + } else { + yynn1481 = 2 + for _, b := range yyq1481 { + if b { + yynn1481++ + } + } + r.EncodeMapStart(yynn1481) + yynn1481 = 0 + } + if yyr1481 || yy2arr1481 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym1483 := z.EncBinary() + _ = yym1483 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Key)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("key")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1484 := z.EncBinary() + _ = yym1484 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Key)) + } + } + if yyr1481 || yy2arr1481 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + x.Operator.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("operator")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Operator.CodecEncodeSelf(e) + } + if yyr1481 || yy2arr1481 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1481[2] { + if x.Values == nil { + r.EncodeNil() + } else { + yym1487 := z.EncBinary() + _ = yym1487 + if false { + } else { + z.F.EncSliceStringV(x.Values, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq1481[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("values")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Values == nil { + r.EncodeNil() + } else { + yym1488 := z.EncBinary() + _ = yym1488 + if false { + } else { + z.F.EncSliceStringV(x.Values, false, e) + } + } + } + } + if yyr1481 || yy2arr1481 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *NodeSelectorRequirement) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1489 := z.DecBinary() + _ = yym1489 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1490 := r.ContainerType() + if yyct1490 == codecSelferValueTypeMap1234 { + yyl1490 := r.ReadMapStart() + if yyl1490 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1490, d) + } + } else if yyct1490 == codecSelferValueTypeArray1234 { + yyl1490 := r.ReadArrayStart() + if yyl1490 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1490, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *NodeSelectorRequirement) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1491Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1491Slc + var yyhl1491 bool = l >= 0 + for yyj1491 := 0; ; yyj1491++ { + if yyhl1491 { + if yyj1491 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1491Slc = r.DecodeBytes(yys1491Slc, true, true) + yys1491 := string(yys1491Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1491 { + case "key": + if r.TryDecodeAsNil() { + x.Key = "" + } else { + x.Key = string(r.DecodeString()) + } + case "operator": + if r.TryDecodeAsNil() { + x.Operator = "" + } else { + x.Operator = NodeSelectorOperator(r.DecodeString()) + } + case "values": + if r.TryDecodeAsNil() { + x.Values = nil + } else { + yyv1494 := &x.Values + yym1495 := z.DecBinary() + _ = yym1495 + if false { + } else { + z.F.DecSliceStringX(yyv1494, false, d) + } + } + default: + z.DecStructFieldNotFound(-1, yys1491) + } // end switch yys1491 + } // end for yyj1491 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *NodeSelectorRequirement) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1496 int + var yyb1496 bool + var yyhl1496 bool = l >= 0 + yyj1496++ + if yyhl1496 { + yyb1496 = yyj1496 > l + } else { + yyb1496 = r.CheckBreak() + } + if yyb1496 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Key = "" + } else { + x.Key = string(r.DecodeString()) + } + yyj1496++ + if yyhl1496 { + yyb1496 = yyj1496 > l + } else { + yyb1496 = r.CheckBreak() + } + if yyb1496 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Operator = "" + } else { + x.Operator = NodeSelectorOperator(r.DecodeString()) + } + yyj1496++ + if yyhl1496 { + yyb1496 = yyj1496 > l + } else { + yyb1496 = r.CheckBreak() + } + if yyb1496 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Values = nil + } else { + yyv1499 := &x.Values + yym1500 := z.DecBinary() + _ = yym1500 + if false { + } else { + z.F.DecSliceStringX(yyv1499, false, d) + } + } + for { + yyj1496++ + if yyhl1496 { + yyb1496 = yyj1496 > l + } else { + yyb1496 = r.CheckBreak() + } + if yyb1496 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1496-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x NodeSelectorOperator) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1501 := z.EncBinary() + _ = yym1501 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *NodeSelectorOperator) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1502 := z.DecBinary() + _ = yym1502 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *Affinity) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1503 := z.EncBinary() + _ = yym1503 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1504 := !z.EncBinary() + yy2arr1504 := z.EncBasicHandle().StructToArray + var yyq1504 [1]bool + _, _, _ = yysep1504, yyq1504, yy2arr1504 + const yyr1504 bool = false + yyq1504[0] = x.NodeAffinity != nil + var yynn1504 int + if yyr1504 || yy2arr1504 { + r.EncodeArrayStart(1) + } else { + yynn1504 = 0 + for _, b := range yyq1504 { + if b { + yynn1504++ + } + } + r.EncodeMapStart(yynn1504) + yynn1504 = 0 + } + if yyr1504 || yy2arr1504 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1504[0] { + if x.NodeAffinity == nil { + r.EncodeNil() + } else { + x.NodeAffinity.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq1504[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("nodeAffinity")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.NodeAffinity == nil { + r.EncodeNil() + } else { + x.NodeAffinity.CodecEncodeSelf(e) + } + } + } + if yyr1504 || yy2arr1504 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *Affinity) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1506 := z.DecBinary() + _ = yym1506 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1507 := r.ContainerType() + if yyct1507 == codecSelferValueTypeMap1234 { + yyl1507 := r.ReadMapStart() + if yyl1507 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1507, d) + } + } else if yyct1507 == codecSelferValueTypeArray1234 { + yyl1507 := r.ReadArrayStart() + if yyl1507 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1507, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *Affinity) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1508Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1508Slc + var yyhl1508 bool = l >= 0 + for yyj1508 := 0; ; yyj1508++ { + if yyhl1508 { + if yyj1508 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1508Slc = r.DecodeBytes(yys1508Slc, true, true) + yys1508 := string(yys1508Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1508 { + case "nodeAffinity": + if r.TryDecodeAsNil() { + if x.NodeAffinity != nil { + x.NodeAffinity = nil + } + } else { + if x.NodeAffinity == nil { + x.NodeAffinity = new(NodeAffinity) + } + x.NodeAffinity.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys1508) + } // end switch yys1508 + } // end for yyj1508 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *Affinity) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1510 int + var yyb1510 bool + var yyhl1510 bool = l >= 0 + yyj1510++ + if yyhl1510 { + yyb1510 = yyj1510 > l + } else { + yyb1510 = r.CheckBreak() + } + if yyb1510 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.NodeAffinity != nil { + x.NodeAffinity = nil + } + } else { + if x.NodeAffinity == nil { + x.NodeAffinity = new(NodeAffinity) + } + x.NodeAffinity.CodecDecodeSelf(d) + } + for { + yyj1510++ + if yyhl1510 { + yyb1510 = yyj1510 > l + } else { + yyb1510 = r.CheckBreak() + } + if yyb1510 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1510-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *NodeAffinity) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1512 := z.EncBinary() + _ = yym1512 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1513 := !z.EncBinary() + yy2arr1513 := z.EncBasicHandle().StructToArray + var yyq1513 [3]bool + _, _, _ = yysep1513, yyq1513, yy2arr1513 + const yyr1513 bool = false + yyq1513[0] = x.RequiredDuringSchedulingRequiredDuringExecution != nil + yyq1513[1] = x.RequiredDuringSchedulingIgnoredDuringExecution != nil + yyq1513[2] = len(x.PreferredDuringSchedulingIgnoredDuringExecution) != 0 + var yynn1513 int + if yyr1513 || yy2arr1513 { + r.EncodeArrayStart(3) + } else { + yynn1513 = 0 + for _, b := range yyq1513 { + if b { + yynn1513++ + } + } + r.EncodeMapStart(yynn1513) + yynn1513 = 0 + } + if yyr1513 || yy2arr1513 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1513[0] { + if x.RequiredDuringSchedulingRequiredDuringExecution == nil { + r.EncodeNil() + } else { + x.RequiredDuringSchedulingRequiredDuringExecution.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq1513[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("requiredDuringSchedulingRequiredDuringExecution")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.RequiredDuringSchedulingRequiredDuringExecution == nil { + r.EncodeNil() + } else { + x.RequiredDuringSchedulingRequiredDuringExecution.CodecEncodeSelf(e) + } + } + } + if yyr1513 || yy2arr1513 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1513[1] { + if x.RequiredDuringSchedulingIgnoredDuringExecution == nil { + r.EncodeNil() + } else { + x.RequiredDuringSchedulingIgnoredDuringExecution.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq1513[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("requiredDuringSchedulingIgnoredDuringExecution")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.RequiredDuringSchedulingIgnoredDuringExecution == nil { + r.EncodeNil() + } else { + x.RequiredDuringSchedulingIgnoredDuringExecution.CodecEncodeSelf(e) + } + } + } + if yyr1513 || yy2arr1513 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1513[2] { + if x.PreferredDuringSchedulingIgnoredDuringExecution == nil { + r.EncodeNil() + } else { + yym1517 := z.EncBinary() + _ = yym1517 + if false { + } else { + h.encSlicePreferredSchedulingTerm(([]PreferredSchedulingTerm)(x.PreferredDuringSchedulingIgnoredDuringExecution), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq1513[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("preferredDuringSchedulingIgnoredDuringExecution")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.PreferredDuringSchedulingIgnoredDuringExecution == nil { + r.EncodeNil() + } else { + yym1518 := z.EncBinary() + _ = yym1518 + if false { + } else { + h.encSlicePreferredSchedulingTerm(([]PreferredSchedulingTerm)(x.PreferredDuringSchedulingIgnoredDuringExecution), e) + } + } + } + } + if yyr1513 || yy2arr1513 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *NodeAffinity) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1519 := z.DecBinary() + _ = yym1519 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1520 := r.ContainerType() + if yyct1520 == codecSelferValueTypeMap1234 { + yyl1520 := r.ReadMapStart() + if yyl1520 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1520, d) + } + } else if yyct1520 == codecSelferValueTypeArray1234 { + yyl1520 := r.ReadArrayStart() + if yyl1520 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1520, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *NodeAffinity) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1521Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1521Slc + var yyhl1521 bool = l >= 0 + for yyj1521 := 0; ; yyj1521++ { + if yyhl1521 { + if yyj1521 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1521Slc = r.DecodeBytes(yys1521Slc, true, true) + yys1521 := string(yys1521Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1521 { + case "requiredDuringSchedulingRequiredDuringExecution": + if r.TryDecodeAsNil() { + if x.RequiredDuringSchedulingRequiredDuringExecution != nil { + x.RequiredDuringSchedulingRequiredDuringExecution = nil + } + } else { + if x.RequiredDuringSchedulingRequiredDuringExecution == nil { + x.RequiredDuringSchedulingRequiredDuringExecution = new(NodeSelector) + } + x.RequiredDuringSchedulingRequiredDuringExecution.CodecDecodeSelf(d) + } + case "requiredDuringSchedulingIgnoredDuringExecution": + if r.TryDecodeAsNil() { + if x.RequiredDuringSchedulingIgnoredDuringExecution != nil { + x.RequiredDuringSchedulingIgnoredDuringExecution = nil + } + } else { + if x.RequiredDuringSchedulingIgnoredDuringExecution == nil { + x.RequiredDuringSchedulingIgnoredDuringExecution = new(NodeSelector) + } + x.RequiredDuringSchedulingIgnoredDuringExecution.CodecDecodeSelf(d) + } + case "preferredDuringSchedulingIgnoredDuringExecution": + if r.TryDecodeAsNil() { + x.PreferredDuringSchedulingIgnoredDuringExecution = nil + } else { + yyv1524 := &x.PreferredDuringSchedulingIgnoredDuringExecution + yym1525 := z.DecBinary() + _ = yym1525 + if false { + } else { + h.decSlicePreferredSchedulingTerm((*[]PreferredSchedulingTerm)(yyv1524), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys1521) + } // end switch yys1521 + } // end for yyj1521 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *NodeAffinity) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1526 int + var yyb1526 bool + var yyhl1526 bool = l >= 0 + yyj1526++ + if yyhl1526 { + yyb1526 = yyj1526 > l + } else { + yyb1526 = r.CheckBreak() + } + if yyb1526 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.RequiredDuringSchedulingRequiredDuringExecution != nil { + x.RequiredDuringSchedulingRequiredDuringExecution = nil + } + } else { + if x.RequiredDuringSchedulingRequiredDuringExecution == nil { + x.RequiredDuringSchedulingRequiredDuringExecution = new(NodeSelector) + } + x.RequiredDuringSchedulingRequiredDuringExecution.CodecDecodeSelf(d) + } + yyj1526++ + if yyhl1526 { + yyb1526 = yyj1526 > l + } else { + yyb1526 = r.CheckBreak() + } + if yyb1526 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.RequiredDuringSchedulingIgnoredDuringExecution != nil { + x.RequiredDuringSchedulingIgnoredDuringExecution = nil + } + } else { + if x.RequiredDuringSchedulingIgnoredDuringExecution == nil { + x.RequiredDuringSchedulingIgnoredDuringExecution = new(NodeSelector) + } + x.RequiredDuringSchedulingIgnoredDuringExecution.CodecDecodeSelf(d) + } + yyj1526++ + if yyhl1526 { + yyb1526 = yyj1526 > l + } else { + yyb1526 = r.CheckBreak() + } + if yyb1526 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.PreferredDuringSchedulingIgnoredDuringExecution = nil + } else { + yyv1529 := &x.PreferredDuringSchedulingIgnoredDuringExecution + yym1530 := z.DecBinary() + _ = yym1530 + if false { + } else { + h.decSlicePreferredSchedulingTerm((*[]PreferredSchedulingTerm)(yyv1529), d) + } + } + for { + yyj1526++ + if yyhl1526 { + yyb1526 = yyj1526 > l + } else { + yyb1526 = r.CheckBreak() + } + if yyb1526 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1526-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *PreferredSchedulingTerm) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1531 := z.EncBinary() + _ = yym1531 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1532 := !z.EncBinary() + yy2arr1532 := z.EncBasicHandle().StructToArray + var yyq1532 [2]bool + _, _, _ = yysep1532, yyq1532, yy2arr1532 + const yyr1532 bool = false + var yynn1532 int + if yyr1532 || yy2arr1532 { + r.EncodeArrayStart(2) + } else { + yynn1532 = 2 + for _, b := range yyq1532 { + if b { + yynn1532++ + } + } + r.EncodeMapStart(yynn1532) + yynn1532 = 0 + } + if yyr1532 || yy2arr1532 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym1534 := z.EncBinary() + _ = yym1534 + if false { + } else { + r.EncodeInt(int64(x.Weight)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("weight")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1535 := z.EncBinary() + _ = yym1535 + if false { + } else { + r.EncodeInt(int64(x.Weight)) + } + } + if yyr1532 || yy2arr1532 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy1537 := &x.Preference + yy1537.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("preference")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy1538 := &x.Preference + yy1538.CodecEncodeSelf(e) + } + if yyr1532 || yy2arr1532 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *PreferredSchedulingTerm) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1539 := z.DecBinary() + _ = yym1539 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1540 := r.ContainerType() + if yyct1540 == codecSelferValueTypeMap1234 { + yyl1540 := r.ReadMapStart() + if yyl1540 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1540, d) + } + } else if yyct1540 == codecSelferValueTypeArray1234 { + yyl1540 := r.ReadArrayStart() + if yyl1540 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1540, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *PreferredSchedulingTerm) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1541Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1541Slc + var yyhl1541 bool = l >= 0 + for yyj1541 := 0; ; yyj1541++ { + if yyhl1541 { + if yyj1541 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1541Slc = r.DecodeBytes(yys1541Slc, true, true) + yys1541 := string(yys1541Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1541 { + case "weight": + if r.TryDecodeAsNil() { + x.Weight = 0 + } else { + x.Weight = int(r.DecodeInt(codecSelferBitsize1234)) + } + case "preference": + if r.TryDecodeAsNil() { + x.Preference = NodeSelectorTerm{} + } else { + yyv1543 := &x.Preference + yyv1543.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys1541) + } // end switch yys1541 + } // end for yyj1541 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *PreferredSchedulingTerm) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1544 int + var yyb1544 bool + var yyhl1544 bool = l >= 0 + yyj1544++ + if yyhl1544 { + yyb1544 = yyj1544 > l + } else { + yyb1544 = r.CheckBreak() + } + if yyb1544 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Weight = 0 + } else { + x.Weight = int(r.DecodeInt(codecSelferBitsize1234)) + } + yyj1544++ + if yyhl1544 { + yyb1544 = yyj1544 > l + } else { + yyb1544 = r.CheckBreak() + } + if yyb1544 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Preference = NodeSelectorTerm{} + } else { + yyv1546 := &x.Preference + yyv1546.CodecDecodeSelf(d) + } + for { + yyj1544++ + if yyhl1544 { + yyb1544 = yyj1544 > l + } else { + yyb1544 = r.CheckBreak() + } + if yyb1544 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1544-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1547 := z.EncBinary() + _ = yym1547 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1548 := !z.EncBinary() + yy2arr1548 := z.EncBasicHandle().StructToArray + var yyq1548 [15]bool + _, _, _ = yysep1548, yyq1548, yy2arr1548 + const yyr1548 bool = false + yyq1548[0] = len(x.Volumes) != 0 + yyq1548[2] = x.RestartPolicy != "" + yyq1548[3] = x.TerminationGracePeriodSeconds != nil + yyq1548[4] = x.ActiveDeadlineSeconds != nil + yyq1548[5] = x.DNSPolicy != "" + yyq1548[6] = len(x.NodeSelector) != 0 + yyq1548[7] = x.ServiceAccountName != "" + yyq1548[8] = x.DeprecatedServiceAccount != "" + yyq1548[9] = x.NodeName != "" + yyq1548[10] = x.HostNetwork != false + yyq1548[11] = x.HostPID != false + yyq1548[12] = x.HostIPC != false + yyq1548[13] = x.SecurityContext != nil + yyq1548[14] = len(x.ImagePullSecrets) != 0 + var yynn1548 int + if yyr1548 || yy2arr1548 { + r.EncodeArrayStart(15) + } else { + yynn1548 = 1 + for _, b := range yyq1548 { + if b { + yynn1548++ + } + } + r.EncodeMapStart(yynn1548) + yynn1548 = 0 + } + if yyr1548 || yy2arr1548 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1548[0] { + if x.Volumes == nil { + r.EncodeNil() + } else { + yym1550 := z.EncBinary() + _ = yym1550 + if false { + } else { + h.encSliceVolume(([]Volume)(x.Volumes), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq1548[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("volumes")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Volumes == nil { + r.EncodeNil() + } else { + yym1551 := z.EncBinary() + _ = yym1551 + if false { + } else { + h.encSliceVolume(([]Volume)(x.Volumes), e) + } + } + } + } + if yyr1548 || yy2arr1548 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Containers == nil { + r.EncodeNil() + } else { + yym1553 := z.EncBinary() + _ = yym1553 + if false { + } else { + h.encSliceContainer(([]Container)(x.Containers), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("containers")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Containers == nil { + r.EncodeNil() + } else { + yym1554 := z.EncBinary() + _ = yym1554 + if false { + } else { + h.encSliceContainer(([]Container)(x.Containers), e) + } + } + } + if yyr1548 || yy2arr1548 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1548[2] { + x.RestartPolicy.CodecEncodeSelf(e) + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq1548[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("restartPolicy")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.RestartPolicy.CodecEncodeSelf(e) + } + } + if yyr1548 || yy2arr1548 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1548[3] { + if x.TerminationGracePeriodSeconds == nil { + r.EncodeNil() + } else { + yy1557 := *x.TerminationGracePeriodSeconds + yym1558 := z.EncBinary() + _ = yym1558 + if false { + } else { + r.EncodeInt(int64(yy1557)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq1548[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("terminationGracePeriodSeconds")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.TerminationGracePeriodSeconds == nil { + r.EncodeNil() + } else { + yy1559 := *x.TerminationGracePeriodSeconds + yym1560 := z.EncBinary() + _ = yym1560 + if false { + } else { + r.EncodeInt(int64(yy1559)) + } + } + } + } + if yyr1548 || yy2arr1548 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1548[4] { + if x.ActiveDeadlineSeconds == nil { + r.EncodeNil() + } else { + yy1562 := *x.ActiveDeadlineSeconds + yym1563 := z.EncBinary() + _ = yym1563 + if false { + } else { + r.EncodeInt(int64(yy1562)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq1548[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("activeDeadlineSeconds")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.ActiveDeadlineSeconds == nil { + r.EncodeNil() + } else { + yy1564 := *x.ActiveDeadlineSeconds + yym1565 := z.EncBinary() + _ = yym1565 + if false { + } else { + r.EncodeInt(int64(yy1564)) + } + } + } + } + if yyr1548 || yy2arr1548 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1548[5] { + x.DNSPolicy.CodecEncodeSelf(e) + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq1548[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("dnsPolicy")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.DNSPolicy.CodecEncodeSelf(e) + } + } + if yyr1548 || yy2arr1548 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1548[6] { + if x.NodeSelector == nil { + r.EncodeNil() + } else { + yym1568 := z.EncBinary() + _ = yym1568 + if false { + } else { + z.F.EncMapStringStringV(x.NodeSelector, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq1548[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("nodeSelector")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.NodeSelector == nil { + r.EncodeNil() + } else { + yym1569 := z.EncBinary() + _ = yym1569 + if false { + } else { + z.F.EncMapStringStringV(x.NodeSelector, false, e) + } + } + } + } + if yyr1548 || yy2arr1548 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1548[7] { + yym1571 := z.EncBinary() + _ = yym1571 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountName)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq1548[7] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("serviceAccountName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1572 := z.EncBinary() + _ = yym1572 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountName)) + } + } + } + if yyr1548 || yy2arr1548 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1548[8] { + yym1574 := z.EncBinary() + _ = yym1574 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.DeprecatedServiceAccount)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq1548[8] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("serviceAccount")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1575 := z.EncBinary() + _ = yym1575 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.DeprecatedServiceAccount)) + } + } + } + if yyr1548 || yy2arr1548 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1548[9] { + yym1577 := z.EncBinary() + _ = yym1577 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.NodeName)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq1548[9] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("nodeName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1578 := z.EncBinary() + _ = yym1578 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.NodeName)) + } + } + } + if yyr1548 || yy2arr1548 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1548[10] { + yym1580 := z.EncBinary() + _ = yym1580 + if false { + } else { + r.EncodeBool(bool(x.HostNetwork)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq1548[10] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("hostNetwork")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1581 := z.EncBinary() + _ = yym1581 + if false { + } else { + r.EncodeBool(bool(x.HostNetwork)) + } + } + } + if yyr1548 || yy2arr1548 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1548[11] { + yym1583 := z.EncBinary() + _ = yym1583 + if false { + } else { + r.EncodeBool(bool(x.HostPID)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq1548[11] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("hostPID")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1584 := z.EncBinary() + _ = yym1584 + if false { + } else { + r.EncodeBool(bool(x.HostPID)) + } + } + } + if yyr1548 || yy2arr1548 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1548[12] { + yym1586 := z.EncBinary() + _ = yym1586 + if false { + } else { + r.EncodeBool(bool(x.HostIPC)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq1548[12] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("hostIPC")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1587 := z.EncBinary() + _ = yym1587 + if false { + } else { + r.EncodeBool(bool(x.HostIPC)) + } + } + } + if yyr1548 || yy2arr1548 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1548[13] { + if x.SecurityContext == nil { + r.EncodeNil() + } else { + x.SecurityContext.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq1548[13] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("securityContext")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.SecurityContext == nil { + r.EncodeNil() + } else { + x.SecurityContext.CodecEncodeSelf(e) + } + } + } + if yyr1548 || yy2arr1548 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1548[14] { + if x.ImagePullSecrets == nil { + r.EncodeNil() + } else { + yym1590 := z.EncBinary() + _ = yym1590 + if false { + } else { + h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq1548[14] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("imagePullSecrets")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.ImagePullSecrets == nil { + r.EncodeNil() + } else { + yym1591 := z.EncBinary() + _ = yym1591 + if false { + } else { + h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e) + } + } + } + } + if yyr1548 || yy2arr1548 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + func (x *PodSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1499 := z.DecBinary() - _ = yym1499 + yym1592 := z.DecBinary() + _ = yym1592 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1500 := r.ContainerType() - if yyct1500 == codecSelferValueTypeMap1234 { - yyl1500 := r.ReadMapStart() - if yyl1500 == 0 { + yyct1593 := r.ContainerType() + if yyct1593 == codecSelferValueTypeMap1234 { + yyl1593 := r.ReadMapStart() + if yyl1593 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1500, d) + x.codecDecodeSelfFromMap(yyl1593, d) } - } else if yyct1500 == codecSelferValueTypeArray1234 { - yyl1500 := r.ReadArrayStart() - if yyl1500 == 0 { + } else if yyct1593 == codecSelferValueTypeArray1234 { + yyl1593 := r.ReadArrayStart() + if yyl1593 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1500, d) + x.codecDecodeSelfFromArray(yyl1593, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -20314,12 +21640,12 @@ func (x *PodSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1501Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1501Slc - var yyhl1501 bool = l >= 0 - for yyj1501 := 0; ; yyj1501++ { - if yyhl1501 { - if yyj1501 >= l { + var yys1594Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1594Slc + var yyhl1594 bool = l >= 0 + for yyj1594 := 0; ; yyj1594++ { + if yyhl1594 { + if yyj1594 >= l { break } } else { @@ -20328,32 +21654,32 @@ func (x *PodSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1501Slc = r.DecodeBytes(yys1501Slc, true, true) - yys1501 := string(yys1501Slc) + yys1594Slc = r.DecodeBytes(yys1594Slc, true, true) + yys1594 := string(yys1594Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1501 { + switch yys1594 { case "volumes": if r.TryDecodeAsNil() { x.Volumes = nil } else { - yyv1502 := &x.Volumes - yym1503 := z.DecBinary() - _ = yym1503 + yyv1595 := &x.Volumes + yym1596 := z.DecBinary() + _ = yym1596 if false { } else { - h.decSliceVolume((*[]Volume)(yyv1502), d) + h.decSliceVolume((*[]Volume)(yyv1595), d) } } case "containers": if r.TryDecodeAsNil() { x.Containers = nil } else { - yyv1504 := &x.Containers - yym1505 := z.DecBinary() - _ = yym1505 + yyv1597 := &x.Containers + yym1598 := z.DecBinary() + _ = yym1598 if false { } else { - h.decSliceContainer((*[]Container)(yyv1504), d) + h.decSliceContainer((*[]Container)(yyv1597), d) } } case "restartPolicy": @@ -20371,8 +21697,8 @@ func (x *PodSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.TerminationGracePeriodSeconds == nil { x.TerminationGracePeriodSeconds = new(int64) } - yym1508 := z.DecBinary() - _ = yym1508 + yym1601 := z.DecBinary() + _ = yym1601 if false { } else { *((*int64)(x.TerminationGracePeriodSeconds)) = int64(r.DecodeInt(64)) @@ -20387,8 +21713,8 @@ func (x *PodSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.ActiveDeadlineSeconds == nil { x.ActiveDeadlineSeconds = new(int64) } - yym1510 := z.DecBinary() - _ = yym1510 + yym1603 := z.DecBinary() + _ = yym1603 if false { } else { *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64)) @@ -20404,12 +21730,12 @@ func (x *PodSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.NodeSelector = nil } else { - yyv1512 := &x.NodeSelector - yym1513 := z.DecBinary() - _ = yym1513 + yyv1605 := &x.NodeSelector + yym1606 := z.DecBinary() + _ = yym1606 if false { } else { - z.F.DecMapStringStringX(yyv1512, false, d) + z.F.DecMapStringStringX(yyv1605, false, d) } } case "serviceAccountName": @@ -20463,18 +21789,18 @@ func (x *PodSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ImagePullSecrets = nil } else { - yyv1521 := &x.ImagePullSecrets - yym1522 := z.DecBinary() - _ = yym1522 + yyv1614 := &x.ImagePullSecrets + yym1615 := z.DecBinary() + _ = yym1615 if false { } else { - h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv1521), d) + h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv1614), d) } } default: - z.DecStructFieldNotFound(-1, yys1501) - } // end switch yys1501 - } // end for yyj1501 + z.DecStructFieldNotFound(-1, yys1594) + } // end switch yys1594 + } // end for yyj1594 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -20482,16 +21808,16 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1523 int - var yyb1523 bool - var yyhl1523 bool = l >= 0 - yyj1523++ - if yyhl1523 { - yyb1523 = yyj1523 > l + var yyj1616 int + var yyb1616 bool + var yyhl1616 bool = l >= 0 + yyj1616++ + if yyhl1616 { + yyb1616 = yyj1616 > l } else { - yyb1523 = r.CheckBreak() + yyb1616 = r.CheckBreak() } - if yyb1523 { + if yyb1616 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20499,21 +21825,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Volumes = nil } else { - yyv1524 := &x.Volumes - yym1525 := z.DecBinary() - _ = yym1525 + yyv1617 := &x.Volumes + yym1618 := z.DecBinary() + _ = yym1618 if false { } else { - h.decSliceVolume((*[]Volume)(yyv1524), d) + h.decSliceVolume((*[]Volume)(yyv1617), d) } } - yyj1523++ - if yyhl1523 { - yyb1523 = yyj1523 > l + yyj1616++ + if yyhl1616 { + yyb1616 = yyj1616 > l } else { - yyb1523 = r.CheckBreak() + yyb1616 = r.CheckBreak() } - if yyb1523 { + if yyb1616 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20521,21 +21847,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Containers = nil } else { - yyv1526 := &x.Containers - yym1527 := z.DecBinary() - _ = yym1527 + yyv1619 := &x.Containers + yym1620 := z.DecBinary() + _ = yym1620 if false { } else { - h.decSliceContainer((*[]Container)(yyv1526), d) + h.decSliceContainer((*[]Container)(yyv1619), d) } } - yyj1523++ - if yyhl1523 { - yyb1523 = yyj1523 > l + yyj1616++ + if yyhl1616 { + yyb1616 = yyj1616 > l } else { - yyb1523 = r.CheckBreak() + yyb1616 = r.CheckBreak() } - if yyb1523 { + if yyb1616 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20545,13 +21871,13 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.RestartPolicy = RestartPolicy(r.DecodeString()) } - yyj1523++ - if yyhl1523 { - yyb1523 = yyj1523 > l + yyj1616++ + if yyhl1616 { + yyb1616 = yyj1616 > l } else { - yyb1523 = r.CheckBreak() + yyb1616 = r.CheckBreak() } - if yyb1523 { + if yyb1616 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20564,20 +21890,20 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.TerminationGracePeriodSeconds == nil { x.TerminationGracePeriodSeconds = new(int64) } - yym1530 := z.DecBinary() - _ = yym1530 + yym1623 := z.DecBinary() + _ = yym1623 if false { } else { *((*int64)(x.TerminationGracePeriodSeconds)) = int64(r.DecodeInt(64)) } } - yyj1523++ - if yyhl1523 { - yyb1523 = yyj1523 > l + yyj1616++ + if yyhl1616 { + yyb1616 = yyj1616 > l } else { - yyb1523 = r.CheckBreak() + yyb1616 = r.CheckBreak() } - if yyb1523 { + if yyb1616 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20590,20 +21916,20 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.ActiveDeadlineSeconds == nil { x.ActiveDeadlineSeconds = new(int64) } - yym1532 := z.DecBinary() - _ = yym1532 + yym1625 := z.DecBinary() + _ = yym1625 if false { } else { *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64)) } } - yyj1523++ - if yyhl1523 { - yyb1523 = yyj1523 > l + yyj1616++ + if yyhl1616 { + yyb1616 = yyj1616 > l } else { - yyb1523 = r.CheckBreak() + yyb1616 = r.CheckBreak() } - if yyb1523 { + if yyb1616 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20613,13 +21939,13 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.DNSPolicy = DNSPolicy(r.DecodeString()) } - yyj1523++ - if yyhl1523 { - yyb1523 = yyj1523 > l + yyj1616++ + if yyhl1616 { + yyb1616 = yyj1616 > l } else { - yyb1523 = r.CheckBreak() + yyb1616 = r.CheckBreak() } - if yyb1523 { + if yyb1616 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20627,21 +21953,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.NodeSelector = nil } else { - yyv1534 := &x.NodeSelector - yym1535 := z.DecBinary() - _ = yym1535 + yyv1627 := &x.NodeSelector + yym1628 := z.DecBinary() + _ = yym1628 if false { } else { - z.F.DecMapStringStringX(yyv1534, false, d) + z.F.DecMapStringStringX(yyv1627, false, d) } } - yyj1523++ - if yyhl1523 { - yyb1523 = yyj1523 > l + yyj1616++ + if yyhl1616 { + yyb1616 = yyj1616 > l } else { - yyb1523 = r.CheckBreak() + yyb1616 = r.CheckBreak() } - if yyb1523 { + if yyb1616 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20651,13 +21977,13 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.ServiceAccountName = string(r.DecodeString()) } - yyj1523++ - if yyhl1523 { - yyb1523 = yyj1523 > l + yyj1616++ + if yyhl1616 { + yyb1616 = yyj1616 > l } else { - yyb1523 = r.CheckBreak() + yyb1616 = r.CheckBreak() } - if yyb1523 { + if yyb1616 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20667,13 +21993,13 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.DeprecatedServiceAccount = string(r.DecodeString()) } - yyj1523++ - if yyhl1523 { - yyb1523 = yyj1523 > l + yyj1616++ + if yyhl1616 { + yyb1616 = yyj1616 > l } else { - yyb1523 = r.CheckBreak() + yyb1616 = r.CheckBreak() } - if yyb1523 { + if yyb1616 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20683,13 +22009,13 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.NodeName = string(r.DecodeString()) } - yyj1523++ - if yyhl1523 { - yyb1523 = yyj1523 > l + yyj1616++ + if yyhl1616 { + yyb1616 = yyj1616 > l } else { - yyb1523 = r.CheckBreak() + yyb1616 = r.CheckBreak() } - if yyb1523 { + if yyb1616 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20699,13 +22025,13 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.HostNetwork = bool(r.DecodeBool()) } - yyj1523++ - if yyhl1523 { - yyb1523 = yyj1523 > l + yyj1616++ + if yyhl1616 { + yyb1616 = yyj1616 > l } else { - yyb1523 = r.CheckBreak() + yyb1616 = r.CheckBreak() } - if yyb1523 { + if yyb1616 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20715,13 +22041,13 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.HostPID = bool(r.DecodeBool()) } - yyj1523++ - if yyhl1523 { - yyb1523 = yyj1523 > l + yyj1616++ + if yyhl1616 { + yyb1616 = yyj1616 > l } else { - yyb1523 = r.CheckBreak() + yyb1616 = r.CheckBreak() } - if yyb1523 { + if yyb1616 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20731,13 +22057,13 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.HostIPC = bool(r.DecodeBool()) } - yyj1523++ - if yyhl1523 { - yyb1523 = yyj1523 > l + yyj1616++ + if yyhl1616 { + yyb1616 = yyj1616 > l } else { - yyb1523 = r.CheckBreak() + yyb1616 = r.CheckBreak() } - if yyb1523 { + if yyb1616 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20752,13 +22078,13 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.SecurityContext.CodecDecodeSelf(d) } - yyj1523++ - if yyhl1523 { - yyb1523 = yyj1523 > l + yyj1616++ + if yyhl1616 { + yyb1616 = yyj1616 > l } else { - yyb1523 = r.CheckBreak() + yyb1616 = r.CheckBreak() } - if yyb1523 { + if yyb1616 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20766,26 +22092,26 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ImagePullSecrets = nil } else { - yyv1543 := &x.ImagePullSecrets - yym1544 := z.DecBinary() - _ = yym1544 + yyv1636 := &x.ImagePullSecrets + yym1637 := z.DecBinary() + _ = yym1637 if false { } else { - h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv1543), d) + h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv1636), d) } } for { - yyj1523++ - if yyhl1523 { - yyb1523 = yyj1523 > l + yyj1616++ + if yyhl1616 { + yyb1616 = yyj1616 > l } else { - yyb1523 = r.CheckBreak() + yyb1616 = r.CheckBreak() } - if yyb1523 { + if yyb1616 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1523-1, "") + z.DecStructFieldNotFound(yyj1616-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -20797,37 +22123,37 @@ func (x *PodSecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1545 := z.EncBinary() - _ = yym1545 + yym1638 := z.EncBinary() + _ = yym1638 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1546 := !z.EncBinary() - yy2arr1546 := z.EncBasicHandle().StructToArray - var yyq1546 [5]bool - _, _, _ = yysep1546, yyq1546, yy2arr1546 - const yyr1546 bool = false - yyq1546[0] = x.SELinuxOptions != nil - yyq1546[1] = x.RunAsUser != nil - yyq1546[2] = x.RunAsNonRoot != nil - yyq1546[3] = len(x.SupplementalGroups) != 0 - yyq1546[4] = x.FSGroup != nil - var yynn1546 int - if yyr1546 || yy2arr1546 { + yysep1639 := !z.EncBinary() + yy2arr1639 := z.EncBasicHandle().StructToArray + var yyq1639 [5]bool + _, _, _ = yysep1639, yyq1639, yy2arr1639 + const yyr1639 bool = false + yyq1639[0] = x.SELinuxOptions != nil + yyq1639[1] = x.RunAsUser != nil + yyq1639[2] = x.RunAsNonRoot != nil + yyq1639[3] = len(x.SupplementalGroups) != 0 + yyq1639[4] = x.FSGroup != nil + var yynn1639 int + if yyr1639 || yy2arr1639 { r.EncodeArrayStart(5) } else { - yynn1546 = 0 - for _, b := range yyq1546 { + yynn1639 = 0 + for _, b := range yyq1639 { if b { - yynn1546++ + yynn1639++ } } - r.EncodeMapStart(yynn1546) - yynn1546 = 0 + r.EncodeMapStart(yynn1639) + yynn1639 = 0 } - if yyr1546 || yy2arr1546 { + if yyr1639 || yy2arr1639 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1546[0] { + if yyq1639[0] { if x.SELinuxOptions == nil { r.EncodeNil() } else { @@ -20837,7 +22163,7 @@ func (x *PodSecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1546[0] { + if yyq1639[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("seLinuxOptions")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -20848,84 +22174,84 @@ func (x *PodSecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1546 || yy2arr1546 { + if yyr1639 || yy2arr1639 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1546[1] { + if yyq1639[1] { if x.RunAsUser == nil { r.EncodeNil() } else { - yy1549 := *x.RunAsUser - yym1550 := z.EncBinary() - _ = yym1550 + yy1642 := *x.RunAsUser + yym1643 := z.EncBinary() + _ = yym1643 if false { } else { - r.EncodeInt(int64(yy1549)) + r.EncodeInt(int64(yy1642)) } } } else { r.EncodeNil() } } else { - if yyq1546[1] { + if yyq1639[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("runAsUser")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.RunAsUser == nil { r.EncodeNil() } else { - yy1551 := *x.RunAsUser - yym1552 := z.EncBinary() - _ = yym1552 + yy1644 := *x.RunAsUser + yym1645 := z.EncBinary() + _ = yym1645 if false { } else { - r.EncodeInt(int64(yy1551)) + r.EncodeInt(int64(yy1644)) } } } } - if yyr1546 || yy2arr1546 { + if yyr1639 || yy2arr1639 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1546[2] { + if yyq1639[2] { if x.RunAsNonRoot == nil { r.EncodeNil() } else { - yy1554 := *x.RunAsNonRoot - yym1555 := z.EncBinary() - _ = yym1555 + yy1647 := *x.RunAsNonRoot + yym1648 := z.EncBinary() + _ = yym1648 if false { } else { - r.EncodeBool(bool(yy1554)) + r.EncodeBool(bool(yy1647)) } } } else { r.EncodeNil() } } else { - if yyq1546[2] { + if yyq1639[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("runAsNonRoot")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.RunAsNonRoot == nil { r.EncodeNil() } else { - yy1556 := *x.RunAsNonRoot - yym1557 := z.EncBinary() - _ = yym1557 + yy1649 := *x.RunAsNonRoot + yym1650 := z.EncBinary() + _ = yym1650 if false { } else { - r.EncodeBool(bool(yy1556)) + r.EncodeBool(bool(yy1649)) } } } } - if yyr1546 || yy2arr1546 { + if yyr1639 || yy2arr1639 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1546[3] { + if yyq1639[3] { if x.SupplementalGroups == nil { r.EncodeNil() } else { - yym1559 := z.EncBinary() - _ = yym1559 + yym1652 := z.EncBinary() + _ = yym1652 if false { } else { z.F.EncSliceInt64V(x.SupplementalGroups, false, e) @@ -20935,15 +22261,15 @@ func (x *PodSecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1546[3] { + if yyq1639[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("supplementalGroups")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.SupplementalGroups == nil { r.EncodeNil() } else { - yym1560 := z.EncBinary() - _ = yym1560 + yym1653 := z.EncBinary() + _ = yym1653 if false { } else { z.F.EncSliceInt64V(x.SupplementalGroups, false, e) @@ -20951,42 +22277,42 @@ func (x *PodSecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1546 || yy2arr1546 { + if yyr1639 || yy2arr1639 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1546[4] { + if yyq1639[4] { if x.FSGroup == nil { r.EncodeNil() } else { - yy1562 := *x.FSGroup - yym1563 := z.EncBinary() - _ = yym1563 + yy1655 := *x.FSGroup + yym1656 := z.EncBinary() + _ = yym1656 if false { } else { - r.EncodeInt(int64(yy1562)) + r.EncodeInt(int64(yy1655)) } } } else { r.EncodeNil() } } else { - if yyq1546[4] { + if yyq1639[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("fsGroup")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.FSGroup == nil { r.EncodeNil() } else { - yy1564 := *x.FSGroup - yym1565 := z.EncBinary() - _ = yym1565 + yy1657 := *x.FSGroup + yym1658 := z.EncBinary() + _ = yym1658 if false { } else { - r.EncodeInt(int64(yy1564)) + r.EncodeInt(int64(yy1657)) } } } } - if yyr1546 || yy2arr1546 { + if yyr1639 || yy2arr1639 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -20999,25 +22325,25 @@ func (x *PodSecurityContext) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1566 := z.DecBinary() - _ = yym1566 + yym1659 := z.DecBinary() + _ = yym1659 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1567 := r.ContainerType() - if yyct1567 == codecSelferValueTypeMap1234 { - yyl1567 := r.ReadMapStart() - if yyl1567 == 0 { + yyct1660 := r.ContainerType() + if yyct1660 == codecSelferValueTypeMap1234 { + yyl1660 := r.ReadMapStart() + if yyl1660 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1567, d) + x.codecDecodeSelfFromMap(yyl1660, d) } - } else if yyct1567 == codecSelferValueTypeArray1234 { - yyl1567 := r.ReadArrayStart() - if yyl1567 == 0 { + } else if yyct1660 == codecSelferValueTypeArray1234 { + yyl1660 := r.ReadArrayStart() + if yyl1660 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1567, d) + x.codecDecodeSelfFromArray(yyl1660, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -21029,12 +22355,12 @@ func (x *PodSecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1568Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1568Slc - var yyhl1568 bool = l >= 0 - for yyj1568 := 0; ; yyj1568++ { - if yyhl1568 { - if yyj1568 >= l { + var yys1661Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1661Slc + var yyhl1661 bool = l >= 0 + for yyj1661 := 0; ; yyj1661++ { + if yyhl1661 { + if yyj1661 >= l { break } } else { @@ -21043,10 +22369,10 @@ func (x *PodSecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1568Slc = r.DecodeBytes(yys1568Slc, true, true) - yys1568 := string(yys1568Slc) + yys1661Slc = r.DecodeBytes(yys1661Slc, true, true) + yys1661 := string(yys1661Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1568 { + switch yys1661 { case "seLinuxOptions": if r.TryDecodeAsNil() { if x.SELinuxOptions != nil { @@ -21067,8 +22393,8 @@ func (x *PodSecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) if x.RunAsUser == nil { x.RunAsUser = new(int64) } - yym1571 := z.DecBinary() - _ = yym1571 + yym1664 := z.DecBinary() + _ = yym1664 if false { } else { *((*int64)(x.RunAsUser)) = int64(r.DecodeInt(64)) @@ -21083,8 +22409,8 @@ func (x *PodSecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) if x.RunAsNonRoot == nil { x.RunAsNonRoot = new(bool) } - yym1573 := z.DecBinary() - _ = yym1573 + yym1666 := z.DecBinary() + _ = yym1666 if false { } else { *((*bool)(x.RunAsNonRoot)) = r.DecodeBool() @@ -21094,12 +22420,12 @@ func (x *PodSecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.SupplementalGroups = nil } else { - yyv1574 := &x.SupplementalGroups - yym1575 := z.DecBinary() - _ = yym1575 + yyv1667 := &x.SupplementalGroups + yym1668 := z.DecBinary() + _ = yym1668 if false { } else { - z.F.DecSliceInt64X(yyv1574, false, d) + z.F.DecSliceInt64X(yyv1667, false, d) } } case "fsGroup": @@ -21111,17 +22437,17 @@ func (x *PodSecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) if x.FSGroup == nil { x.FSGroup = new(int64) } - yym1577 := z.DecBinary() - _ = yym1577 + yym1670 := z.DecBinary() + _ = yym1670 if false { } else { *((*int64)(x.FSGroup)) = int64(r.DecodeInt(64)) } } default: - z.DecStructFieldNotFound(-1, yys1568) - } // end switch yys1568 - } // end for yyj1568 + z.DecStructFieldNotFound(-1, yys1661) + } // end switch yys1661 + } // end for yyj1661 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -21129,16 +22455,16 @@ func (x *PodSecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1578 int - var yyb1578 bool - var yyhl1578 bool = l >= 0 - yyj1578++ - if yyhl1578 { - yyb1578 = yyj1578 > l + var yyj1671 int + var yyb1671 bool + var yyhl1671 bool = l >= 0 + yyj1671++ + if yyhl1671 { + yyb1671 = yyj1671 > l } else { - yyb1578 = r.CheckBreak() + yyb1671 = r.CheckBreak() } - if yyb1578 { + if yyb1671 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21153,13 +22479,13 @@ func (x *PodSecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decode } x.SELinuxOptions.CodecDecodeSelf(d) } - yyj1578++ - if yyhl1578 { - yyb1578 = yyj1578 > l + yyj1671++ + if yyhl1671 { + yyb1671 = yyj1671 > l } else { - yyb1578 = r.CheckBreak() + yyb1671 = r.CheckBreak() } - if yyb1578 { + if yyb1671 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21172,20 +22498,20 @@ func (x *PodSecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decode if x.RunAsUser == nil { x.RunAsUser = new(int64) } - yym1581 := z.DecBinary() - _ = yym1581 + yym1674 := z.DecBinary() + _ = yym1674 if false { } else { *((*int64)(x.RunAsUser)) = int64(r.DecodeInt(64)) } } - yyj1578++ - if yyhl1578 { - yyb1578 = yyj1578 > l + yyj1671++ + if yyhl1671 { + yyb1671 = yyj1671 > l } else { - yyb1578 = r.CheckBreak() + yyb1671 = r.CheckBreak() } - if yyb1578 { + if yyb1671 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21198,20 +22524,20 @@ func (x *PodSecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decode if x.RunAsNonRoot == nil { x.RunAsNonRoot = new(bool) } - yym1583 := z.DecBinary() - _ = yym1583 + yym1676 := z.DecBinary() + _ = yym1676 if false { } else { *((*bool)(x.RunAsNonRoot)) = r.DecodeBool() } } - yyj1578++ - if yyhl1578 { - yyb1578 = yyj1578 > l + yyj1671++ + if yyhl1671 { + yyb1671 = yyj1671 > l } else { - yyb1578 = r.CheckBreak() + yyb1671 = r.CheckBreak() } - if yyb1578 { + if yyb1671 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21219,21 +22545,21 @@ func (x *PodSecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.SupplementalGroups = nil } else { - yyv1584 := &x.SupplementalGroups - yym1585 := z.DecBinary() - _ = yym1585 + yyv1677 := &x.SupplementalGroups + yym1678 := z.DecBinary() + _ = yym1678 if false { } else { - z.F.DecSliceInt64X(yyv1584, false, d) + z.F.DecSliceInt64X(yyv1677, false, d) } } - yyj1578++ - if yyhl1578 { - yyb1578 = yyj1578 > l + yyj1671++ + if yyhl1671 { + yyb1671 = yyj1671 > l } else { - yyb1578 = r.CheckBreak() + yyb1671 = r.CheckBreak() } - if yyb1578 { + if yyb1671 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21246,25 +22572,25 @@ func (x *PodSecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decode if x.FSGroup == nil { x.FSGroup = new(int64) } - yym1587 := z.DecBinary() - _ = yym1587 + yym1680 := z.DecBinary() + _ = yym1680 if false { } else { *((*int64)(x.FSGroup)) = int64(r.DecodeInt(64)) } } for { - yyj1578++ - if yyhl1578 { - yyb1578 = yyj1578 > l + yyj1671++ + if yyhl1671 { + yyb1671 = yyj1671 > l } else { - yyb1578 = r.CheckBreak() + yyb1671 = r.CheckBreak() } - if yyb1578 { + if yyb1671 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1578-1, "") + z.DecStructFieldNotFound(yyj1671-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -21276,60 +22602,60 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1588 := z.EncBinary() - _ = yym1588 + yym1681 := z.EncBinary() + _ = yym1681 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1589 := !z.EncBinary() - yy2arr1589 := z.EncBasicHandle().StructToArray - var yyq1589 [8]bool - _, _, _ = yysep1589, yyq1589, yy2arr1589 - const yyr1589 bool = false - yyq1589[0] = x.Phase != "" - yyq1589[1] = len(x.Conditions) != 0 - yyq1589[2] = x.Message != "" - yyq1589[3] = x.Reason != "" - yyq1589[4] = x.HostIP != "" - yyq1589[5] = x.PodIP != "" - yyq1589[6] = x.StartTime != nil - yyq1589[7] = len(x.ContainerStatuses) != 0 - var yynn1589 int - if yyr1589 || yy2arr1589 { + yysep1682 := !z.EncBinary() + yy2arr1682 := z.EncBasicHandle().StructToArray + var yyq1682 [8]bool + _, _, _ = yysep1682, yyq1682, yy2arr1682 + const yyr1682 bool = false + yyq1682[0] = x.Phase != "" + yyq1682[1] = len(x.Conditions) != 0 + yyq1682[2] = x.Message != "" + yyq1682[3] = x.Reason != "" + yyq1682[4] = x.HostIP != "" + yyq1682[5] = x.PodIP != "" + yyq1682[6] = x.StartTime != nil + yyq1682[7] = len(x.ContainerStatuses) != 0 + var yynn1682 int + if yyr1682 || yy2arr1682 { r.EncodeArrayStart(8) } else { - yynn1589 = 0 - for _, b := range yyq1589 { + yynn1682 = 0 + for _, b := range yyq1682 { if b { - yynn1589++ + yynn1682++ } } - r.EncodeMapStart(yynn1589) - yynn1589 = 0 + r.EncodeMapStart(yynn1682) + yynn1682 = 0 } - if yyr1589 || yy2arr1589 { + if yyr1682 || yy2arr1682 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1589[0] { + if yyq1682[0] { x.Phase.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1589[0] { + if yyq1682[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("phase")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Phase.CodecEncodeSelf(e) } } - if yyr1589 || yy2arr1589 { + if yyr1682 || yy2arr1682 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1589[1] { + if yyq1682[1] { if x.Conditions == nil { r.EncodeNil() } else { - yym1592 := z.EncBinary() - _ = yym1592 + yym1685 := z.EncBinary() + _ = yym1685 if false { } else { h.encSlicePodCondition(([]PodCondition)(x.Conditions), e) @@ -21339,15 +22665,15 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1589[1] { + if yyq1682[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("conditions")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Conditions == nil { r.EncodeNil() } else { - yym1593 := z.EncBinary() - _ = yym1593 + yym1686 := z.EncBinary() + _ = yym1686 if false { } else { h.encSlicePodCondition(([]PodCondition)(x.Conditions), e) @@ -21355,11 +22681,11 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1589 || yy2arr1589 { + if yyr1682 || yy2arr1682 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1589[2] { - yym1595 := z.EncBinary() - _ = yym1595 + if yyq1682[2] { + yym1688 := z.EncBinary() + _ = yym1688 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) @@ -21368,23 +22694,23 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1589[2] { + if yyq1682[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("message")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1596 := z.EncBinary() - _ = yym1596 + yym1689 := z.EncBinary() + _ = yym1689 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) } } } - if yyr1589 || yy2arr1589 { + if yyr1682 || yy2arr1682 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1589[3] { - yym1598 := z.EncBinary() - _ = yym1598 + if yyq1682[3] { + yym1691 := z.EncBinary() + _ = yym1691 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) @@ -21393,23 +22719,23 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1589[3] { + if yyq1682[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("reason")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1599 := z.EncBinary() - _ = yym1599 + yym1692 := z.EncBinary() + _ = yym1692 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) } } } - if yyr1589 || yy2arr1589 { + if yyr1682 || yy2arr1682 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1589[4] { - yym1601 := z.EncBinary() - _ = yym1601 + if yyq1682[4] { + yym1694 := z.EncBinary() + _ = yym1694 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.HostIP)) @@ -21418,23 +22744,23 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1589[4] { + if yyq1682[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hostIP")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1602 := z.EncBinary() - _ = yym1602 + yym1695 := z.EncBinary() + _ = yym1695 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.HostIP)) } } } - if yyr1589 || yy2arr1589 { + if yyr1682 || yy2arr1682 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1589[5] { - yym1604 := z.EncBinary() - _ = yym1604 + if yyq1682[5] { + yym1697 := z.EncBinary() + _ = yym1697 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodIP)) @@ -21443,31 +22769,31 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1589[5] { + if yyq1682[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podIP")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1605 := z.EncBinary() - _ = yym1605 + yym1698 := z.EncBinary() + _ = yym1698 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodIP)) } } } - if yyr1589 || yy2arr1589 { + if yyr1682 || yy2arr1682 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1589[6] { + if yyq1682[6] { if x.StartTime == nil { r.EncodeNil() } else { - yym1607 := z.EncBinary() - _ = yym1607 + yym1700 := z.EncBinary() + _ = yym1700 if false { } else if z.HasExtensions() && z.EncExt(x.StartTime) { - } else if yym1607 { + } else if yym1700 { z.EncBinaryMarshal(x.StartTime) - } else if !yym1607 && z.IsJSONHandle() { + } else if !yym1700 && z.IsJSONHandle() { z.EncJSONMarshal(x.StartTime) } else { z.EncFallback(x.StartTime) @@ -21477,20 +22803,20 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1589[6] { + if yyq1682[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("startTime")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.StartTime == nil { r.EncodeNil() } else { - yym1608 := z.EncBinary() - _ = yym1608 + yym1701 := z.EncBinary() + _ = yym1701 if false { } else if z.HasExtensions() && z.EncExt(x.StartTime) { - } else if yym1608 { + } else if yym1701 { z.EncBinaryMarshal(x.StartTime) - } else if !yym1608 && z.IsJSONHandle() { + } else if !yym1701 && z.IsJSONHandle() { z.EncJSONMarshal(x.StartTime) } else { z.EncFallback(x.StartTime) @@ -21498,14 +22824,14 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1589 || yy2arr1589 { + if yyr1682 || yy2arr1682 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1589[7] { + if yyq1682[7] { if x.ContainerStatuses == nil { r.EncodeNil() } else { - yym1610 := z.EncBinary() - _ = yym1610 + yym1703 := z.EncBinary() + _ = yym1703 if false { } else { h.encSliceContainerStatus(([]ContainerStatus)(x.ContainerStatuses), e) @@ -21515,15 +22841,15 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1589[7] { + if yyq1682[7] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("containerStatuses")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.ContainerStatuses == nil { r.EncodeNil() } else { - yym1611 := z.EncBinary() - _ = yym1611 + yym1704 := z.EncBinary() + _ = yym1704 if false { } else { h.encSliceContainerStatus(([]ContainerStatus)(x.ContainerStatuses), e) @@ -21531,7 +22857,7 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1589 || yy2arr1589 { + if yyr1682 || yy2arr1682 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -21544,25 +22870,25 @@ func (x *PodStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1612 := z.DecBinary() - _ = yym1612 + yym1705 := z.DecBinary() + _ = yym1705 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1613 := r.ContainerType() - if yyct1613 == codecSelferValueTypeMap1234 { - yyl1613 := r.ReadMapStart() - if yyl1613 == 0 { + yyct1706 := r.ContainerType() + if yyct1706 == codecSelferValueTypeMap1234 { + yyl1706 := r.ReadMapStart() + if yyl1706 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1613, d) + x.codecDecodeSelfFromMap(yyl1706, d) } - } else if yyct1613 == codecSelferValueTypeArray1234 { - yyl1613 := r.ReadArrayStart() - if yyl1613 == 0 { + } else if yyct1706 == codecSelferValueTypeArray1234 { + yyl1706 := r.ReadArrayStart() + if yyl1706 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1613, d) + x.codecDecodeSelfFromArray(yyl1706, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -21574,12 +22900,12 @@ func (x *PodStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1614Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1614Slc - var yyhl1614 bool = l >= 0 - for yyj1614 := 0; ; yyj1614++ { - if yyhl1614 { - if yyj1614 >= l { + var yys1707Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1707Slc + var yyhl1707 bool = l >= 0 + for yyj1707 := 0; ; yyj1707++ { + if yyhl1707 { + if yyj1707 >= l { break } } else { @@ -21588,10 +22914,10 @@ func (x *PodStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1614Slc = r.DecodeBytes(yys1614Slc, true, true) - yys1614 := string(yys1614Slc) + yys1707Slc = r.DecodeBytes(yys1707Slc, true, true) + yys1707 := string(yys1707Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1614 { + switch yys1707 { case "phase": if r.TryDecodeAsNil() { x.Phase = "" @@ -21602,12 +22928,12 @@ func (x *PodStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv1616 := &x.Conditions - yym1617 := z.DecBinary() - _ = yym1617 + yyv1709 := &x.Conditions + yym1710 := z.DecBinary() + _ = yym1710 if false { } else { - h.decSlicePodCondition((*[]PodCondition)(yyv1616), d) + h.decSlicePodCondition((*[]PodCondition)(yyv1709), d) } } case "message": @@ -21643,13 +22969,13 @@ func (x *PodStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.StartTime == nil { x.StartTime = new(pkg2_unversioned.Time) } - yym1623 := z.DecBinary() - _ = yym1623 + yym1716 := z.DecBinary() + _ = yym1716 if false { } else if z.HasExtensions() && z.DecExt(x.StartTime) { - } else if yym1623 { + } else if yym1716 { z.DecBinaryUnmarshal(x.StartTime) - } else if !yym1623 && z.IsJSONHandle() { + } else if !yym1716 && z.IsJSONHandle() { z.DecJSONUnmarshal(x.StartTime) } else { z.DecFallback(x.StartTime, false) @@ -21659,18 +22985,18 @@ func (x *PodStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ContainerStatuses = nil } else { - yyv1624 := &x.ContainerStatuses - yym1625 := z.DecBinary() - _ = yym1625 + yyv1717 := &x.ContainerStatuses + yym1718 := z.DecBinary() + _ = yym1718 if false { } else { - h.decSliceContainerStatus((*[]ContainerStatus)(yyv1624), d) + h.decSliceContainerStatus((*[]ContainerStatus)(yyv1717), d) } } default: - z.DecStructFieldNotFound(-1, yys1614) - } // end switch yys1614 - } // end for yyj1614 + z.DecStructFieldNotFound(-1, yys1707) + } // end switch yys1707 + } // end for yyj1707 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -21678,16 +23004,16 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1626 int - var yyb1626 bool - var yyhl1626 bool = l >= 0 - yyj1626++ - if yyhl1626 { - yyb1626 = yyj1626 > l + var yyj1719 int + var yyb1719 bool + var yyhl1719 bool = l >= 0 + yyj1719++ + if yyhl1719 { + yyb1719 = yyj1719 > l } else { - yyb1626 = r.CheckBreak() + yyb1719 = r.CheckBreak() } - if yyb1626 { + if yyb1719 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21697,13 +23023,13 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Phase = PodPhase(r.DecodeString()) } - yyj1626++ - if yyhl1626 { - yyb1626 = yyj1626 > l + yyj1719++ + if yyhl1719 { + yyb1719 = yyj1719 > l } else { - yyb1626 = r.CheckBreak() + yyb1719 = r.CheckBreak() } - if yyb1626 { + if yyb1719 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21711,21 +23037,21 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv1628 := &x.Conditions - yym1629 := z.DecBinary() - _ = yym1629 + yyv1721 := &x.Conditions + yym1722 := z.DecBinary() + _ = yym1722 if false { } else { - h.decSlicePodCondition((*[]PodCondition)(yyv1628), d) + h.decSlicePodCondition((*[]PodCondition)(yyv1721), d) } } - yyj1626++ - if yyhl1626 { - yyb1626 = yyj1626 > l + yyj1719++ + if yyhl1719 { + yyb1719 = yyj1719 > l } else { - yyb1626 = r.CheckBreak() + yyb1719 = r.CheckBreak() } - if yyb1626 { + if yyb1719 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21735,13 +23061,13 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Message = string(r.DecodeString()) } - yyj1626++ - if yyhl1626 { - yyb1626 = yyj1626 > l + yyj1719++ + if yyhl1719 { + yyb1719 = yyj1719 > l } else { - yyb1626 = r.CheckBreak() + yyb1719 = r.CheckBreak() } - if yyb1626 { + if yyb1719 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21751,13 +23077,13 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Reason = string(r.DecodeString()) } - yyj1626++ - if yyhl1626 { - yyb1626 = yyj1626 > l + yyj1719++ + if yyhl1719 { + yyb1719 = yyj1719 > l } else { - yyb1626 = r.CheckBreak() + yyb1719 = r.CheckBreak() } - if yyb1626 { + if yyb1719 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21767,13 +23093,13 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.HostIP = string(r.DecodeString()) } - yyj1626++ - if yyhl1626 { - yyb1626 = yyj1626 > l + yyj1719++ + if yyhl1719 { + yyb1719 = yyj1719 > l } else { - yyb1626 = r.CheckBreak() + yyb1719 = r.CheckBreak() } - if yyb1626 { + if yyb1719 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21783,13 +23109,13 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.PodIP = string(r.DecodeString()) } - yyj1626++ - if yyhl1626 { - yyb1626 = yyj1626 > l + yyj1719++ + if yyhl1719 { + yyb1719 = yyj1719 > l } else { - yyb1626 = r.CheckBreak() + yyb1719 = r.CheckBreak() } - if yyb1626 { + if yyb1719 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21802,25 +23128,25 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.StartTime == nil { x.StartTime = new(pkg2_unversioned.Time) } - yym1635 := z.DecBinary() - _ = yym1635 + yym1728 := z.DecBinary() + _ = yym1728 if false { } else if z.HasExtensions() && z.DecExt(x.StartTime) { - } else if yym1635 { + } else if yym1728 { z.DecBinaryUnmarshal(x.StartTime) - } else if !yym1635 && z.IsJSONHandle() { + } else if !yym1728 && z.IsJSONHandle() { z.DecJSONUnmarshal(x.StartTime) } else { z.DecFallback(x.StartTime, false) } } - yyj1626++ - if yyhl1626 { - yyb1626 = yyj1626 > l + yyj1719++ + if yyhl1719 { + yyb1719 = yyj1719 > l } else { - yyb1626 = r.CheckBreak() + yyb1719 = r.CheckBreak() } - if yyb1626 { + if yyb1719 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21828,26 +23154,26 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ContainerStatuses = nil } else { - yyv1636 := &x.ContainerStatuses - yym1637 := z.DecBinary() - _ = yym1637 + yyv1729 := &x.ContainerStatuses + yym1730 := z.DecBinary() + _ = yym1730 if false { } else { - h.decSliceContainerStatus((*[]ContainerStatus)(yyv1636), d) + h.decSliceContainerStatus((*[]ContainerStatus)(yyv1729), d) } } for { - yyj1626++ - if yyhl1626 { - yyb1626 = yyj1626 > l + yyj1719++ + if yyhl1719 { + yyb1719 = yyj1719 > l } else { - yyb1626 = r.CheckBreak() + yyb1719 = r.CheckBreak() } - if yyb1626 { + if yyb1719 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1626-1, "") + z.DecStructFieldNotFound(yyj1719-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -21859,38 +23185,38 @@ func (x *PodStatusResult) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1638 := z.EncBinary() - _ = yym1638 + yym1731 := z.EncBinary() + _ = yym1731 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1639 := !z.EncBinary() - yy2arr1639 := z.EncBasicHandle().StructToArray - var yyq1639 [4]bool - _, _, _ = yysep1639, yyq1639, yy2arr1639 - const yyr1639 bool = false - yyq1639[0] = x.Kind != "" - yyq1639[1] = x.APIVersion != "" - yyq1639[2] = true - yyq1639[3] = true - var yynn1639 int - if yyr1639 || yy2arr1639 { + yysep1732 := !z.EncBinary() + yy2arr1732 := z.EncBasicHandle().StructToArray + var yyq1732 [4]bool + _, _, _ = yysep1732, yyq1732, yy2arr1732 + const yyr1732 bool = false + yyq1732[0] = x.Kind != "" + yyq1732[1] = x.APIVersion != "" + yyq1732[2] = true + yyq1732[3] = true + var yynn1732 int + if yyr1732 || yy2arr1732 { r.EncodeArrayStart(4) } else { - yynn1639 = 0 - for _, b := range yyq1639 { + yynn1732 = 0 + for _, b := range yyq1732 { if b { - yynn1639++ + yynn1732++ } } - r.EncodeMapStart(yynn1639) - yynn1639 = 0 + r.EncodeMapStart(yynn1732) + yynn1732 = 0 } - if yyr1639 || yy2arr1639 { + if yyr1732 || yy2arr1732 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1639[0] { - yym1641 := z.EncBinary() - _ = yym1641 + if yyq1732[0] { + yym1734 := z.EncBinary() + _ = yym1734 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -21899,23 +23225,23 @@ func (x *PodStatusResult) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1639[0] { + if yyq1732[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1642 := z.EncBinary() - _ = yym1642 + yym1735 := z.EncBinary() + _ = yym1735 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr1639 || yy2arr1639 { + if yyr1732 || yy2arr1732 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1639[1] { - yym1644 := z.EncBinary() - _ = yym1644 + if yyq1732[1] { + yym1737 := z.EncBinary() + _ = yym1737 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -21924,53 +23250,53 @@ func (x *PodStatusResult) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1639[1] { + if yyq1732[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1645 := z.EncBinary() - _ = yym1645 + yym1738 := z.EncBinary() + _ = yym1738 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr1639 || yy2arr1639 { + if yyr1732 || yy2arr1732 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1639[2] { - yy1647 := &x.ObjectMeta - yy1647.CodecEncodeSelf(e) + if yyq1732[2] { + yy1740 := &x.ObjectMeta + yy1740.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1639[2] { + if yyq1732[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1648 := &x.ObjectMeta - yy1648.CodecEncodeSelf(e) + yy1741 := &x.ObjectMeta + yy1741.CodecEncodeSelf(e) } } - if yyr1639 || yy2arr1639 { + if yyr1732 || yy2arr1732 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1639[3] { - yy1650 := &x.Status - yy1650.CodecEncodeSelf(e) + if yyq1732[3] { + yy1743 := &x.Status + yy1743.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1639[3] { + if yyq1732[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1651 := &x.Status - yy1651.CodecEncodeSelf(e) + yy1744 := &x.Status + yy1744.CodecEncodeSelf(e) } } - if yyr1639 || yy2arr1639 { + if yyr1732 || yy2arr1732 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -21983,25 +23309,25 @@ func (x *PodStatusResult) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1652 := z.DecBinary() - _ = yym1652 + yym1745 := z.DecBinary() + _ = yym1745 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1653 := r.ContainerType() - if yyct1653 == codecSelferValueTypeMap1234 { - yyl1653 := r.ReadMapStart() - if yyl1653 == 0 { + yyct1746 := r.ContainerType() + if yyct1746 == codecSelferValueTypeMap1234 { + yyl1746 := r.ReadMapStart() + if yyl1746 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1653, d) + x.codecDecodeSelfFromMap(yyl1746, d) } - } else if yyct1653 == codecSelferValueTypeArray1234 { - yyl1653 := r.ReadArrayStart() - if yyl1653 == 0 { + } else if yyct1746 == codecSelferValueTypeArray1234 { + yyl1746 := r.ReadArrayStart() + if yyl1746 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1653, d) + x.codecDecodeSelfFromArray(yyl1746, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -22013,12 +23339,12 @@ func (x *PodStatusResult) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1654Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1654Slc - var yyhl1654 bool = l >= 0 - for yyj1654 := 0; ; yyj1654++ { - if yyhl1654 { - if yyj1654 >= l { + var yys1747Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1747Slc + var yyhl1747 bool = l >= 0 + for yyj1747 := 0; ; yyj1747++ { + if yyhl1747 { + if yyj1747 >= l { break } } else { @@ -22027,10 +23353,10 @@ func (x *PodStatusResult) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1654Slc = r.DecodeBytes(yys1654Slc, true, true) - yys1654 := string(yys1654Slc) + yys1747Slc = r.DecodeBytes(yys1747Slc, true, true) + yys1747 := string(yys1747Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1654 { + switch yys1747 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -22047,20 +23373,20 @@ func (x *PodStatusResult) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv1657 := &x.ObjectMeta - yyv1657.CodecDecodeSelf(d) + yyv1750 := &x.ObjectMeta + yyv1750.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = PodStatus{} } else { - yyv1658 := &x.Status - yyv1658.CodecDecodeSelf(d) + yyv1751 := &x.Status + yyv1751.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys1654) - } // end switch yys1654 - } // end for yyj1654 + z.DecStructFieldNotFound(-1, yys1747) + } // end switch yys1747 + } // end for yyj1747 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -22068,16 +23394,16 @@ func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1659 int - var yyb1659 bool - var yyhl1659 bool = l >= 0 - yyj1659++ - if yyhl1659 { - yyb1659 = yyj1659 > l + var yyj1752 int + var yyb1752 bool + var yyhl1752 bool = l >= 0 + yyj1752++ + if yyhl1752 { + yyb1752 = yyj1752 > l } else { - yyb1659 = r.CheckBreak() + yyb1752 = r.CheckBreak() } - if yyb1659 { + if yyb1752 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22087,13 +23413,13 @@ func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Kind = string(r.DecodeString()) } - yyj1659++ - if yyhl1659 { - yyb1659 = yyj1659 > l + yyj1752++ + if yyhl1752 { + yyb1752 = yyj1752 > l } else { - yyb1659 = r.CheckBreak() + yyb1752 = r.CheckBreak() } - if yyb1659 { + if yyb1752 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22103,13 +23429,13 @@ func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.APIVersion = string(r.DecodeString()) } - yyj1659++ - if yyhl1659 { - yyb1659 = yyj1659 > l + yyj1752++ + if yyhl1752 { + yyb1752 = yyj1752 > l } else { - yyb1659 = r.CheckBreak() + yyb1752 = r.CheckBreak() } - if yyb1659 { + if yyb1752 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22117,16 +23443,16 @@ func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv1662 := &x.ObjectMeta - yyv1662.CodecDecodeSelf(d) + yyv1755 := &x.ObjectMeta + yyv1755.CodecDecodeSelf(d) } - yyj1659++ - if yyhl1659 { - yyb1659 = yyj1659 > l + yyj1752++ + if yyhl1752 { + yyb1752 = yyj1752 > l } else { - yyb1659 = r.CheckBreak() + yyb1752 = r.CheckBreak() } - if yyb1659 { + if yyb1752 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22134,21 +23460,21 @@ func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Status = PodStatus{} } else { - yyv1663 := &x.Status - yyv1663.CodecDecodeSelf(d) + yyv1756 := &x.Status + yyv1756.CodecDecodeSelf(d) } for { - yyj1659++ - if yyhl1659 { - yyb1659 = yyj1659 > l + yyj1752++ + if yyhl1752 { + yyb1752 = yyj1752 > l } else { - yyb1659 = r.CheckBreak() + yyb1752 = r.CheckBreak() } - if yyb1659 { + if yyb1752 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1659-1, "") + z.DecStructFieldNotFound(yyj1752-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -22160,39 +23486,39 @@ func (x *Pod) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1664 := z.EncBinary() - _ = yym1664 + yym1757 := z.EncBinary() + _ = yym1757 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1665 := !z.EncBinary() - yy2arr1665 := z.EncBasicHandle().StructToArray - var yyq1665 [5]bool - _, _, _ = yysep1665, yyq1665, yy2arr1665 - const yyr1665 bool = false - yyq1665[0] = x.Kind != "" - yyq1665[1] = x.APIVersion != "" - yyq1665[2] = true - yyq1665[3] = true - yyq1665[4] = true - var yynn1665 int - if yyr1665 || yy2arr1665 { + yysep1758 := !z.EncBinary() + yy2arr1758 := z.EncBasicHandle().StructToArray + var yyq1758 [5]bool + _, _, _ = yysep1758, yyq1758, yy2arr1758 + const yyr1758 bool = false + yyq1758[0] = x.Kind != "" + yyq1758[1] = x.APIVersion != "" + yyq1758[2] = true + yyq1758[3] = true + yyq1758[4] = true + var yynn1758 int + if yyr1758 || yy2arr1758 { r.EncodeArrayStart(5) } else { - yynn1665 = 0 - for _, b := range yyq1665 { + yynn1758 = 0 + for _, b := range yyq1758 { if b { - yynn1665++ + yynn1758++ } } - r.EncodeMapStart(yynn1665) - yynn1665 = 0 + r.EncodeMapStart(yynn1758) + yynn1758 = 0 } - if yyr1665 || yy2arr1665 { + if yyr1758 || yy2arr1758 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1665[0] { - yym1667 := z.EncBinary() - _ = yym1667 + if yyq1758[0] { + yym1760 := z.EncBinary() + _ = yym1760 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -22201,23 +23527,23 @@ func (x *Pod) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1665[0] { + if yyq1758[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1668 := z.EncBinary() - _ = yym1668 + yym1761 := z.EncBinary() + _ = yym1761 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr1665 || yy2arr1665 { + if yyr1758 || yy2arr1758 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1665[1] { - yym1670 := z.EncBinary() - _ = yym1670 + if yyq1758[1] { + yym1763 := z.EncBinary() + _ = yym1763 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -22226,70 +23552,70 @@ func (x *Pod) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1665[1] { + if yyq1758[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1671 := z.EncBinary() - _ = yym1671 + yym1764 := z.EncBinary() + _ = yym1764 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr1665 || yy2arr1665 { + if yyr1758 || yy2arr1758 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1665[2] { - yy1673 := &x.ObjectMeta - yy1673.CodecEncodeSelf(e) + if yyq1758[2] { + yy1766 := &x.ObjectMeta + yy1766.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1665[2] { + if yyq1758[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1674 := &x.ObjectMeta - yy1674.CodecEncodeSelf(e) + yy1767 := &x.ObjectMeta + yy1767.CodecEncodeSelf(e) } } - if yyr1665 || yy2arr1665 { + if yyr1758 || yy2arr1758 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1665[3] { - yy1676 := &x.Spec - yy1676.CodecEncodeSelf(e) + if yyq1758[3] { + yy1769 := &x.Spec + yy1769.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1665[3] { + if yyq1758[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1677 := &x.Spec - yy1677.CodecEncodeSelf(e) + yy1770 := &x.Spec + yy1770.CodecEncodeSelf(e) } } - if yyr1665 || yy2arr1665 { + if yyr1758 || yy2arr1758 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1665[4] { - yy1679 := &x.Status - yy1679.CodecEncodeSelf(e) + if yyq1758[4] { + yy1772 := &x.Status + yy1772.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1665[4] { + if yyq1758[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1680 := &x.Status - yy1680.CodecEncodeSelf(e) + yy1773 := &x.Status + yy1773.CodecEncodeSelf(e) } } - if yyr1665 || yy2arr1665 { + if yyr1758 || yy2arr1758 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -22302,25 +23628,25 @@ func (x *Pod) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1681 := z.DecBinary() - _ = yym1681 + yym1774 := z.DecBinary() + _ = yym1774 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1682 := r.ContainerType() - if yyct1682 == codecSelferValueTypeMap1234 { - yyl1682 := r.ReadMapStart() - if yyl1682 == 0 { + yyct1775 := r.ContainerType() + if yyct1775 == codecSelferValueTypeMap1234 { + yyl1775 := r.ReadMapStart() + if yyl1775 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1682, d) + x.codecDecodeSelfFromMap(yyl1775, d) } - } else if yyct1682 == codecSelferValueTypeArray1234 { - yyl1682 := r.ReadArrayStart() - if yyl1682 == 0 { + } else if yyct1775 == codecSelferValueTypeArray1234 { + yyl1775 := r.ReadArrayStart() + if yyl1775 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1682, d) + x.codecDecodeSelfFromArray(yyl1775, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -22332,12 +23658,12 @@ func (x *Pod) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1683Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1683Slc - var yyhl1683 bool = l >= 0 - for yyj1683 := 0; ; yyj1683++ { - if yyhl1683 { - if yyj1683 >= l { + var yys1776Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1776Slc + var yyhl1776 bool = l >= 0 + for yyj1776 := 0; ; yyj1776++ { + if yyhl1776 { + if yyj1776 >= l { break } } else { @@ -22346,10 +23672,10 @@ func (x *Pod) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1683Slc = r.DecodeBytes(yys1683Slc, true, true) - yys1683 := string(yys1683Slc) + yys1776Slc = r.DecodeBytes(yys1776Slc, true, true) + yys1776 := string(yys1776Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1683 { + switch yys1776 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -22366,27 +23692,27 @@ func (x *Pod) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv1686 := &x.ObjectMeta - yyv1686.CodecDecodeSelf(d) + yyv1779 := &x.ObjectMeta + yyv1779.CodecDecodeSelf(d) } case "spec": if r.TryDecodeAsNil() { x.Spec = PodSpec{} } else { - yyv1687 := &x.Spec - yyv1687.CodecDecodeSelf(d) + yyv1780 := &x.Spec + yyv1780.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = PodStatus{} } else { - yyv1688 := &x.Status - yyv1688.CodecDecodeSelf(d) + yyv1781 := &x.Status + yyv1781.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys1683) - } // end switch yys1683 - } // end for yyj1683 + z.DecStructFieldNotFound(-1, yys1776) + } // end switch yys1776 + } // end for yyj1776 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -22394,16 +23720,16 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1689 int - var yyb1689 bool - var yyhl1689 bool = l >= 0 - yyj1689++ - if yyhl1689 { - yyb1689 = yyj1689 > l + var yyj1782 int + var yyb1782 bool + var yyhl1782 bool = l >= 0 + yyj1782++ + if yyhl1782 { + yyb1782 = yyj1782 > l } else { - yyb1689 = r.CheckBreak() + yyb1782 = r.CheckBreak() } - if yyb1689 { + if yyb1782 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22413,13 +23739,13 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj1689++ - if yyhl1689 { - yyb1689 = yyj1689 > l + yyj1782++ + if yyhl1782 { + yyb1782 = yyj1782 > l } else { - yyb1689 = r.CheckBreak() + yyb1782 = r.CheckBreak() } - if yyb1689 { + if yyb1782 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22429,13 +23755,13 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj1689++ - if yyhl1689 { - yyb1689 = yyj1689 > l + yyj1782++ + if yyhl1782 { + yyb1782 = yyj1782 > l } else { - yyb1689 = r.CheckBreak() + yyb1782 = r.CheckBreak() } - if yyb1689 { + if yyb1782 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22443,16 +23769,16 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv1692 := &x.ObjectMeta - yyv1692.CodecDecodeSelf(d) + yyv1785 := &x.ObjectMeta + yyv1785.CodecDecodeSelf(d) } - yyj1689++ - if yyhl1689 { - yyb1689 = yyj1689 > l + yyj1782++ + if yyhl1782 { + yyb1782 = yyj1782 > l } else { - yyb1689 = r.CheckBreak() + yyb1782 = r.CheckBreak() } - if yyb1689 { + if yyb1782 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22460,16 +23786,16 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = PodSpec{} } else { - yyv1693 := &x.Spec - yyv1693.CodecDecodeSelf(d) + yyv1786 := &x.Spec + yyv1786.CodecDecodeSelf(d) } - yyj1689++ - if yyhl1689 { - yyb1689 = yyj1689 > l + yyj1782++ + if yyhl1782 { + yyb1782 = yyj1782 > l } else { - yyb1689 = r.CheckBreak() + yyb1782 = r.CheckBreak() } - if yyb1689 { + if yyb1782 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22477,21 +23803,21 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = PodStatus{} } else { - yyv1694 := &x.Status - yyv1694.CodecDecodeSelf(d) + yyv1787 := &x.Status + yyv1787.CodecDecodeSelf(d) } for { - yyj1689++ - if yyhl1689 { - yyb1689 = yyj1689 > l + yyj1782++ + if yyhl1782 { + yyb1782 = yyj1782 > l } else { - yyb1689 = r.CheckBreak() + yyb1782 = r.CheckBreak() } - if yyb1689 { + if yyb1782 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1689-1, "") + z.DecStructFieldNotFound(yyj1782-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -22503,37 +23829,37 @@ func (x *PodList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1695 := z.EncBinary() - _ = yym1695 + yym1788 := z.EncBinary() + _ = yym1788 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1696 := !z.EncBinary() - yy2arr1696 := z.EncBasicHandle().StructToArray - var yyq1696 [4]bool - _, _, _ = yysep1696, yyq1696, yy2arr1696 - const yyr1696 bool = false - yyq1696[0] = x.Kind != "" - yyq1696[1] = x.APIVersion != "" - yyq1696[2] = true - var yynn1696 int - if yyr1696 || yy2arr1696 { + yysep1789 := !z.EncBinary() + yy2arr1789 := z.EncBasicHandle().StructToArray + var yyq1789 [4]bool + _, _, _ = yysep1789, yyq1789, yy2arr1789 + const yyr1789 bool = false + yyq1789[0] = x.Kind != "" + yyq1789[1] = x.APIVersion != "" + yyq1789[2] = true + var yynn1789 int + if yyr1789 || yy2arr1789 { r.EncodeArrayStart(4) } else { - yynn1696 = 1 - for _, b := range yyq1696 { + yynn1789 = 1 + for _, b := range yyq1789 { if b { - yynn1696++ + yynn1789++ } } - r.EncodeMapStart(yynn1696) - yynn1696 = 0 + r.EncodeMapStart(yynn1789) + yynn1789 = 0 } - if yyr1696 || yy2arr1696 { + if yyr1789 || yy2arr1789 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1696[0] { - yym1698 := z.EncBinary() - _ = yym1698 + if yyq1789[0] { + yym1791 := z.EncBinary() + _ = yym1791 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -22542,23 +23868,23 @@ func (x *PodList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1696[0] { + if yyq1789[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1699 := z.EncBinary() - _ = yym1699 + yym1792 := z.EncBinary() + _ = yym1792 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr1696 || yy2arr1696 { + if yyr1789 || yy2arr1789 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1696[1] { - yym1701 := z.EncBinary() - _ = yym1701 + if yyq1789[1] { + yym1794 := z.EncBinary() + _ = yym1794 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -22567,54 +23893,54 @@ func (x *PodList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1696[1] { + if yyq1789[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1702 := z.EncBinary() - _ = yym1702 + yym1795 := z.EncBinary() + _ = yym1795 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr1696 || yy2arr1696 { + if yyr1789 || yy2arr1789 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1696[2] { - yy1704 := &x.ListMeta - yym1705 := z.EncBinary() - _ = yym1705 + if yyq1789[2] { + yy1797 := &x.ListMeta + yym1798 := z.EncBinary() + _ = yym1798 if false { - } else if z.HasExtensions() && z.EncExt(yy1704) { + } else if z.HasExtensions() && z.EncExt(yy1797) { } else { - z.EncFallback(yy1704) + z.EncFallback(yy1797) } } else { r.EncodeNil() } } else { - if yyq1696[2] { + if yyq1789[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1706 := &x.ListMeta - yym1707 := z.EncBinary() - _ = yym1707 + yy1799 := &x.ListMeta + yym1800 := z.EncBinary() + _ = yym1800 if false { - } else if z.HasExtensions() && z.EncExt(yy1706) { + } else if z.HasExtensions() && z.EncExt(yy1799) { } else { - z.EncFallback(yy1706) + z.EncFallback(yy1799) } } } - if yyr1696 || yy2arr1696 { + if yyr1789 || yy2arr1789 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym1709 := z.EncBinary() - _ = yym1709 + yym1802 := z.EncBinary() + _ = yym1802 if false { } else { h.encSlicePod(([]Pod)(x.Items), e) @@ -22627,15 +23953,15 @@ func (x *PodList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym1710 := z.EncBinary() - _ = yym1710 + yym1803 := z.EncBinary() + _ = yym1803 if false { } else { h.encSlicePod(([]Pod)(x.Items), e) } } } - if yyr1696 || yy2arr1696 { + if yyr1789 || yy2arr1789 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -22648,25 +23974,25 @@ func (x *PodList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1711 := z.DecBinary() - _ = yym1711 + yym1804 := z.DecBinary() + _ = yym1804 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1712 := r.ContainerType() - if yyct1712 == codecSelferValueTypeMap1234 { - yyl1712 := r.ReadMapStart() - if yyl1712 == 0 { + yyct1805 := r.ContainerType() + if yyct1805 == codecSelferValueTypeMap1234 { + yyl1805 := r.ReadMapStart() + if yyl1805 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1712, d) + x.codecDecodeSelfFromMap(yyl1805, d) } - } else if yyct1712 == codecSelferValueTypeArray1234 { - yyl1712 := r.ReadArrayStart() - if yyl1712 == 0 { + } else if yyct1805 == codecSelferValueTypeArray1234 { + yyl1805 := r.ReadArrayStart() + if yyl1805 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1712, d) + x.codecDecodeSelfFromArray(yyl1805, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -22678,12 +24004,12 @@ func (x *PodList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1713Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1713Slc - var yyhl1713 bool = l >= 0 - for yyj1713 := 0; ; yyj1713++ { - if yyhl1713 { - if yyj1713 >= l { + var yys1806Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1806Slc + var yyhl1806 bool = l >= 0 + for yyj1806 := 0; ; yyj1806++ { + if yyhl1806 { + if yyj1806 >= l { break } } else { @@ -22692,10 +24018,10 @@ func (x *PodList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1713Slc = r.DecodeBytes(yys1713Slc, true, true) - yys1713 := string(yys1713Slc) + yys1806Slc = r.DecodeBytes(yys1806Slc, true, true) + yys1806 := string(yys1806Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1713 { + switch yys1806 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -22712,31 +24038,31 @@ func (x *PodList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv1716 := &x.ListMeta - yym1717 := z.DecBinary() - _ = yym1717 + yyv1809 := &x.ListMeta + yym1810 := z.DecBinary() + _ = yym1810 if false { - } else if z.HasExtensions() && z.DecExt(yyv1716) { + } else if z.HasExtensions() && z.DecExt(yyv1809) { } else { - z.DecFallback(yyv1716, false) + z.DecFallback(yyv1809, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv1718 := &x.Items - yym1719 := z.DecBinary() - _ = yym1719 + yyv1811 := &x.Items + yym1812 := z.DecBinary() + _ = yym1812 if false { } else { - h.decSlicePod((*[]Pod)(yyv1718), d) + h.decSlicePod((*[]Pod)(yyv1811), d) } } default: - z.DecStructFieldNotFound(-1, yys1713) - } // end switch yys1713 - } // end for yyj1713 + z.DecStructFieldNotFound(-1, yys1806) + } // end switch yys1806 + } // end for yyj1806 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -22744,16 +24070,16 @@ func (x *PodList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1720 int - var yyb1720 bool - var yyhl1720 bool = l >= 0 - yyj1720++ - if yyhl1720 { - yyb1720 = yyj1720 > l + var yyj1813 int + var yyb1813 bool + var yyhl1813 bool = l >= 0 + yyj1813++ + if yyhl1813 { + yyb1813 = yyj1813 > l } else { - yyb1720 = r.CheckBreak() + yyb1813 = r.CheckBreak() } - if yyb1720 { + if yyb1813 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22763,13 +24089,13 @@ func (x *PodList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj1720++ - if yyhl1720 { - yyb1720 = yyj1720 > l + yyj1813++ + if yyhl1813 { + yyb1813 = yyj1813 > l } else { - yyb1720 = r.CheckBreak() + yyb1813 = r.CheckBreak() } - if yyb1720 { + if yyb1813 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22779,13 +24105,13 @@ func (x *PodList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj1720++ - if yyhl1720 { - yyb1720 = yyj1720 > l + yyj1813++ + if yyhl1813 { + yyb1813 = yyj1813 > l } else { - yyb1720 = r.CheckBreak() + yyb1813 = r.CheckBreak() } - if yyb1720 { + if yyb1813 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22793,22 +24119,22 @@ func (x *PodList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv1723 := &x.ListMeta - yym1724 := z.DecBinary() - _ = yym1724 + yyv1816 := &x.ListMeta + yym1817 := z.DecBinary() + _ = yym1817 if false { - } else if z.HasExtensions() && z.DecExt(yyv1723) { + } else if z.HasExtensions() && z.DecExt(yyv1816) { } else { - z.DecFallback(yyv1723, false) + z.DecFallback(yyv1816, false) } } - yyj1720++ - if yyhl1720 { - yyb1720 = yyj1720 > l + yyj1813++ + if yyhl1813 { + yyb1813 = yyj1813 > l } else { - yyb1720 = r.CheckBreak() + yyb1813 = r.CheckBreak() } - if yyb1720 { + if yyb1813 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22816,26 +24142,26 @@ func (x *PodList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv1725 := &x.Items - yym1726 := z.DecBinary() - _ = yym1726 + yyv1818 := &x.Items + yym1819 := z.DecBinary() + _ = yym1819 if false { } else { - h.decSlicePod((*[]Pod)(yyv1725), d) + h.decSlicePod((*[]Pod)(yyv1818), d) } } for { - yyj1720++ - if yyhl1720 { - yyb1720 = yyj1720 > l + yyj1813++ + if yyhl1813 { + yyb1813 = yyj1813 > l } else { - yyb1720 = r.CheckBreak() + yyb1813 = r.CheckBreak() } - if yyb1720 { + if yyb1813 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1720-1, "") + z.DecStructFieldNotFound(yyj1813-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -22847,66 +24173,66 @@ func (x *PodTemplateSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1727 := z.EncBinary() - _ = yym1727 + yym1820 := z.EncBinary() + _ = yym1820 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1728 := !z.EncBinary() - yy2arr1728 := z.EncBasicHandle().StructToArray - var yyq1728 [2]bool - _, _, _ = yysep1728, yyq1728, yy2arr1728 - const yyr1728 bool = false - yyq1728[0] = true - yyq1728[1] = true - var yynn1728 int - if yyr1728 || yy2arr1728 { + yysep1821 := !z.EncBinary() + yy2arr1821 := z.EncBasicHandle().StructToArray + var yyq1821 [2]bool + _, _, _ = yysep1821, yyq1821, yy2arr1821 + const yyr1821 bool = false + yyq1821[0] = true + yyq1821[1] = true + var yynn1821 int + if yyr1821 || yy2arr1821 { r.EncodeArrayStart(2) } else { - yynn1728 = 0 - for _, b := range yyq1728 { + yynn1821 = 0 + for _, b := range yyq1821 { if b { - yynn1728++ + yynn1821++ } } - r.EncodeMapStart(yynn1728) - yynn1728 = 0 + r.EncodeMapStart(yynn1821) + yynn1821 = 0 } - if yyr1728 || yy2arr1728 { + if yyr1821 || yy2arr1821 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1728[0] { - yy1730 := &x.ObjectMeta - yy1730.CodecEncodeSelf(e) + if yyq1821[0] { + yy1823 := &x.ObjectMeta + yy1823.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1728[0] { + if yyq1821[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1731 := &x.ObjectMeta - yy1731.CodecEncodeSelf(e) + yy1824 := &x.ObjectMeta + yy1824.CodecEncodeSelf(e) } } - if yyr1728 || yy2arr1728 { + if yyr1821 || yy2arr1821 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1728[1] { - yy1733 := &x.Spec - yy1733.CodecEncodeSelf(e) + if yyq1821[1] { + yy1826 := &x.Spec + yy1826.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1728[1] { + if yyq1821[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1734 := &x.Spec - yy1734.CodecEncodeSelf(e) + yy1827 := &x.Spec + yy1827.CodecEncodeSelf(e) } } - if yyr1728 || yy2arr1728 { + if yyr1821 || yy2arr1821 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -22919,25 +24245,25 @@ func (x *PodTemplateSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1735 := z.DecBinary() - _ = yym1735 + yym1828 := z.DecBinary() + _ = yym1828 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1736 := r.ContainerType() - if yyct1736 == codecSelferValueTypeMap1234 { - yyl1736 := r.ReadMapStart() - if yyl1736 == 0 { + yyct1829 := r.ContainerType() + if yyct1829 == codecSelferValueTypeMap1234 { + yyl1829 := r.ReadMapStart() + if yyl1829 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1736, d) + x.codecDecodeSelfFromMap(yyl1829, d) } - } else if yyct1736 == codecSelferValueTypeArray1234 { - yyl1736 := r.ReadArrayStart() - if yyl1736 == 0 { + } else if yyct1829 == codecSelferValueTypeArray1234 { + yyl1829 := r.ReadArrayStart() + if yyl1829 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1736, d) + x.codecDecodeSelfFromArray(yyl1829, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -22949,12 +24275,12 @@ func (x *PodTemplateSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1737Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1737Slc - var yyhl1737 bool = l >= 0 - for yyj1737 := 0; ; yyj1737++ { - if yyhl1737 { - if yyj1737 >= l { + var yys1830Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1830Slc + var yyhl1830 bool = l >= 0 + for yyj1830 := 0; ; yyj1830++ { + if yyhl1830 { + if yyj1830 >= l { break } } else { @@ -22963,28 +24289,28 @@ func (x *PodTemplateSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1737Slc = r.DecodeBytes(yys1737Slc, true, true) - yys1737 := string(yys1737Slc) + yys1830Slc = r.DecodeBytes(yys1830Slc, true, true) + yys1830 := string(yys1830Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1737 { + switch yys1830 { case "metadata": if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv1738 := &x.ObjectMeta - yyv1738.CodecDecodeSelf(d) + yyv1831 := &x.ObjectMeta + yyv1831.CodecDecodeSelf(d) } case "spec": if r.TryDecodeAsNil() { x.Spec = PodSpec{} } else { - yyv1739 := &x.Spec - yyv1739.CodecDecodeSelf(d) + yyv1832 := &x.Spec + yyv1832.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys1737) - } // end switch yys1737 - } // end for yyj1737 + z.DecStructFieldNotFound(-1, yys1830) + } // end switch yys1830 + } // end for yyj1830 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -22992,16 +24318,16 @@ func (x *PodTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1740 int - var yyb1740 bool - var yyhl1740 bool = l >= 0 - yyj1740++ - if yyhl1740 { - yyb1740 = yyj1740 > l + var yyj1833 int + var yyb1833 bool + var yyhl1833 bool = l >= 0 + yyj1833++ + if yyhl1833 { + yyb1833 = yyj1833 > l } else { - yyb1740 = r.CheckBreak() + yyb1833 = r.CheckBreak() } - if yyb1740 { + if yyb1833 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23009,16 +24335,16 @@ func (x *PodTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv1741 := &x.ObjectMeta - yyv1741.CodecDecodeSelf(d) + yyv1834 := &x.ObjectMeta + yyv1834.CodecDecodeSelf(d) } - yyj1740++ - if yyhl1740 { - yyb1740 = yyj1740 > l + yyj1833++ + if yyhl1833 { + yyb1833 = yyj1833 > l } else { - yyb1740 = r.CheckBreak() + yyb1833 = r.CheckBreak() } - if yyb1740 { + if yyb1833 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23026,21 +24352,21 @@ func (x *PodTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Spec = PodSpec{} } else { - yyv1742 := &x.Spec - yyv1742.CodecDecodeSelf(d) + yyv1835 := &x.Spec + yyv1835.CodecDecodeSelf(d) } for { - yyj1740++ - if yyhl1740 { - yyb1740 = yyj1740 > l + yyj1833++ + if yyhl1833 { + yyb1833 = yyj1833 > l } else { - yyb1740 = r.CheckBreak() + yyb1833 = r.CheckBreak() } - if yyb1740 { + if yyb1833 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1740-1, "") + z.DecStructFieldNotFound(yyj1833-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -23052,38 +24378,38 @@ func (x *PodTemplate) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1743 := z.EncBinary() - _ = yym1743 + yym1836 := z.EncBinary() + _ = yym1836 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1744 := !z.EncBinary() - yy2arr1744 := z.EncBasicHandle().StructToArray - var yyq1744 [4]bool - _, _, _ = yysep1744, yyq1744, yy2arr1744 - const yyr1744 bool = false - yyq1744[0] = x.Kind != "" - yyq1744[1] = x.APIVersion != "" - yyq1744[2] = true - yyq1744[3] = true - var yynn1744 int - if yyr1744 || yy2arr1744 { + yysep1837 := !z.EncBinary() + yy2arr1837 := z.EncBasicHandle().StructToArray + var yyq1837 [4]bool + _, _, _ = yysep1837, yyq1837, yy2arr1837 + const yyr1837 bool = false + yyq1837[0] = x.Kind != "" + yyq1837[1] = x.APIVersion != "" + yyq1837[2] = true + yyq1837[3] = true + var yynn1837 int + if yyr1837 || yy2arr1837 { r.EncodeArrayStart(4) } else { - yynn1744 = 0 - for _, b := range yyq1744 { + yynn1837 = 0 + for _, b := range yyq1837 { if b { - yynn1744++ + yynn1837++ } } - r.EncodeMapStart(yynn1744) - yynn1744 = 0 + r.EncodeMapStart(yynn1837) + yynn1837 = 0 } - if yyr1744 || yy2arr1744 { + if yyr1837 || yy2arr1837 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1744[0] { - yym1746 := z.EncBinary() - _ = yym1746 + if yyq1837[0] { + yym1839 := z.EncBinary() + _ = yym1839 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -23092,23 +24418,23 @@ func (x *PodTemplate) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1744[0] { + if yyq1837[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1747 := z.EncBinary() - _ = yym1747 + yym1840 := z.EncBinary() + _ = yym1840 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr1744 || yy2arr1744 { + if yyr1837 || yy2arr1837 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1744[1] { - yym1749 := z.EncBinary() - _ = yym1749 + if yyq1837[1] { + yym1842 := z.EncBinary() + _ = yym1842 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -23117,53 +24443,53 @@ func (x *PodTemplate) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1744[1] { + if yyq1837[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1750 := z.EncBinary() - _ = yym1750 + yym1843 := z.EncBinary() + _ = yym1843 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr1744 || yy2arr1744 { + if yyr1837 || yy2arr1837 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1744[2] { - yy1752 := &x.ObjectMeta - yy1752.CodecEncodeSelf(e) + if yyq1837[2] { + yy1845 := &x.ObjectMeta + yy1845.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1744[2] { + if yyq1837[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1753 := &x.ObjectMeta - yy1753.CodecEncodeSelf(e) + yy1846 := &x.ObjectMeta + yy1846.CodecEncodeSelf(e) } } - if yyr1744 || yy2arr1744 { + if yyr1837 || yy2arr1837 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1744[3] { - yy1755 := &x.Template - yy1755.CodecEncodeSelf(e) + if yyq1837[3] { + yy1848 := &x.Template + yy1848.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1744[3] { + if yyq1837[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("template")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1756 := &x.Template - yy1756.CodecEncodeSelf(e) + yy1849 := &x.Template + yy1849.CodecEncodeSelf(e) } } - if yyr1744 || yy2arr1744 { + if yyr1837 || yy2arr1837 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -23176,25 +24502,25 @@ func (x *PodTemplate) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1757 := z.DecBinary() - _ = yym1757 + yym1850 := z.DecBinary() + _ = yym1850 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1758 := r.ContainerType() - if yyct1758 == codecSelferValueTypeMap1234 { - yyl1758 := r.ReadMapStart() - if yyl1758 == 0 { + yyct1851 := r.ContainerType() + if yyct1851 == codecSelferValueTypeMap1234 { + yyl1851 := r.ReadMapStart() + if yyl1851 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1758, d) + x.codecDecodeSelfFromMap(yyl1851, d) } - } else if yyct1758 == codecSelferValueTypeArray1234 { - yyl1758 := r.ReadArrayStart() - if yyl1758 == 0 { + } else if yyct1851 == codecSelferValueTypeArray1234 { + yyl1851 := r.ReadArrayStart() + if yyl1851 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1758, d) + x.codecDecodeSelfFromArray(yyl1851, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -23206,12 +24532,12 @@ func (x *PodTemplate) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1759Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1759Slc - var yyhl1759 bool = l >= 0 - for yyj1759 := 0; ; yyj1759++ { - if yyhl1759 { - if yyj1759 >= l { + var yys1852Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1852Slc + var yyhl1852 bool = l >= 0 + for yyj1852 := 0; ; yyj1852++ { + if yyhl1852 { + if yyj1852 >= l { break } } else { @@ -23220,10 +24546,10 @@ func (x *PodTemplate) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1759Slc = r.DecodeBytes(yys1759Slc, true, true) - yys1759 := string(yys1759Slc) + yys1852Slc = r.DecodeBytes(yys1852Slc, true, true) + yys1852 := string(yys1852Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1759 { + switch yys1852 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -23240,20 +24566,20 @@ func (x *PodTemplate) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv1762 := &x.ObjectMeta - yyv1762.CodecDecodeSelf(d) + yyv1855 := &x.ObjectMeta + yyv1855.CodecDecodeSelf(d) } case "template": if r.TryDecodeAsNil() { x.Template = PodTemplateSpec{} } else { - yyv1763 := &x.Template - yyv1763.CodecDecodeSelf(d) + yyv1856 := &x.Template + yyv1856.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys1759) - } // end switch yys1759 - } // end for yyj1759 + z.DecStructFieldNotFound(-1, yys1852) + } // end switch yys1852 + } // end for yyj1852 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -23261,16 +24587,16 @@ func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1764 int - var yyb1764 bool - var yyhl1764 bool = l >= 0 - yyj1764++ - if yyhl1764 { - yyb1764 = yyj1764 > l + var yyj1857 int + var yyb1857 bool + var yyhl1857 bool = l >= 0 + yyj1857++ + if yyhl1857 { + yyb1857 = yyj1857 > l } else { - yyb1764 = r.CheckBreak() + yyb1857 = r.CheckBreak() } - if yyb1764 { + if yyb1857 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23280,13 +24606,13 @@ func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj1764++ - if yyhl1764 { - yyb1764 = yyj1764 > l + yyj1857++ + if yyhl1857 { + yyb1857 = yyj1857 > l } else { - yyb1764 = r.CheckBreak() + yyb1857 = r.CheckBreak() } - if yyb1764 { + if yyb1857 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23296,13 +24622,13 @@ func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj1764++ - if yyhl1764 { - yyb1764 = yyj1764 > l + yyj1857++ + if yyhl1857 { + yyb1857 = yyj1857 > l } else { - yyb1764 = r.CheckBreak() + yyb1857 = r.CheckBreak() } - if yyb1764 { + if yyb1857 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23310,16 +24636,16 @@ func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv1767 := &x.ObjectMeta - yyv1767.CodecDecodeSelf(d) + yyv1860 := &x.ObjectMeta + yyv1860.CodecDecodeSelf(d) } - yyj1764++ - if yyhl1764 { - yyb1764 = yyj1764 > l + yyj1857++ + if yyhl1857 { + yyb1857 = yyj1857 > l } else { - yyb1764 = r.CheckBreak() + yyb1857 = r.CheckBreak() } - if yyb1764 { + if yyb1857 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23327,21 +24653,21 @@ func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Template = PodTemplateSpec{} } else { - yyv1768 := &x.Template - yyv1768.CodecDecodeSelf(d) + yyv1861 := &x.Template + yyv1861.CodecDecodeSelf(d) } for { - yyj1764++ - if yyhl1764 { - yyb1764 = yyj1764 > l + yyj1857++ + if yyhl1857 { + yyb1857 = yyj1857 > l } else { - yyb1764 = r.CheckBreak() + yyb1857 = r.CheckBreak() } - if yyb1764 { + if yyb1857 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1764-1, "") + z.DecStructFieldNotFound(yyj1857-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -23353,37 +24679,37 @@ func (x *PodTemplateList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1769 := z.EncBinary() - _ = yym1769 + yym1862 := z.EncBinary() + _ = yym1862 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1770 := !z.EncBinary() - yy2arr1770 := z.EncBasicHandle().StructToArray - var yyq1770 [4]bool - _, _, _ = yysep1770, yyq1770, yy2arr1770 - const yyr1770 bool = false - yyq1770[0] = x.Kind != "" - yyq1770[1] = x.APIVersion != "" - yyq1770[2] = true - var yynn1770 int - if yyr1770 || yy2arr1770 { + yysep1863 := !z.EncBinary() + yy2arr1863 := z.EncBasicHandle().StructToArray + var yyq1863 [4]bool + _, _, _ = yysep1863, yyq1863, yy2arr1863 + const yyr1863 bool = false + yyq1863[0] = x.Kind != "" + yyq1863[1] = x.APIVersion != "" + yyq1863[2] = true + var yynn1863 int + if yyr1863 || yy2arr1863 { r.EncodeArrayStart(4) } else { - yynn1770 = 1 - for _, b := range yyq1770 { + yynn1863 = 1 + for _, b := range yyq1863 { if b { - yynn1770++ + yynn1863++ } } - r.EncodeMapStart(yynn1770) - yynn1770 = 0 + r.EncodeMapStart(yynn1863) + yynn1863 = 0 } - if yyr1770 || yy2arr1770 { + if yyr1863 || yy2arr1863 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1770[0] { - yym1772 := z.EncBinary() - _ = yym1772 + if yyq1863[0] { + yym1865 := z.EncBinary() + _ = yym1865 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -23392,23 +24718,23 @@ func (x *PodTemplateList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1770[0] { + if yyq1863[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1773 := z.EncBinary() - _ = yym1773 + yym1866 := z.EncBinary() + _ = yym1866 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr1770 || yy2arr1770 { + if yyr1863 || yy2arr1863 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1770[1] { - yym1775 := z.EncBinary() - _ = yym1775 + if yyq1863[1] { + yym1868 := z.EncBinary() + _ = yym1868 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -23417,54 +24743,54 @@ func (x *PodTemplateList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1770[1] { + if yyq1863[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1776 := z.EncBinary() - _ = yym1776 + yym1869 := z.EncBinary() + _ = yym1869 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr1770 || yy2arr1770 { + if yyr1863 || yy2arr1863 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1770[2] { - yy1778 := &x.ListMeta - yym1779 := z.EncBinary() - _ = yym1779 + if yyq1863[2] { + yy1871 := &x.ListMeta + yym1872 := z.EncBinary() + _ = yym1872 if false { - } else if z.HasExtensions() && z.EncExt(yy1778) { + } else if z.HasExtensions() && z.EncExt(yy1871) { } else { - z.EncFallback(yy1778) + z.EncFallback(yy1871) } } else { r.EncodeNil() } } else { - if yyq1770[2] { + if yyq1863[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1780 := &x.ListMeta - yym1781 := z.EncBinary() - _ = yym1781 + yy1873 := &x.ListMeta + yym1874 := z.EncBinary() + _ = yym1874 if false { - } else if z.HasExtensions() && z.EncExt(yy1780) { + } else if z.HasExtensions() && z.EncExt(yy1873) { } else { - z.EncFallback(yy1780) + z.EncFallback(yy1873) } } } - if yyr1770 || yy2arr1770 { + if yyr1863 || yy2arr1863 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym1783 := z.EncBinary() - _ = yym1783 + yym1876 := z.EncBinary() + _ = yym1876 if false { } else { h.encSlicePodTemplate(([]PodTemplate)(x.Items), e) @@ -23477,15 +24803,15 @@ func (x *PodTemplateList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym1784 := z.EncBinary() - _ = yym1784 + yym1877 := z.EncBinary() + _ = yym1877 if false { } else { h.encSlicePodTemplate(([]PodTemplate)(x.Items), e) } } } - if yyr1770 || yy2arr1770 { + if yyr1863 || yy2arr1863 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -23498,25 +24824,25 @@ func (x *PodTemplateList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1785 := z.DecBinary() - _ = yym1785 + yym1878 := z.DecBinary() + _ = yym1878 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1786 := r.ContainerType() - if yyct1786 == codecSelferValueTypeMap1234 { - yyl1786 := r.ReadMapStart() - if yyl1786 == 0 { + yyct1879 := r.ContainerType() + if yyct1879 == codecSelferValueTypeMap1234 { + yyl1879 := r.ReadMapStart() + if yyl1879 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1786, d) + x.codecDecodeSelfFromMap(yyl1879, d) } - } else if yyct1786 == codecSelferValueTypeArray1234 { - yyl1786 := r.ReadArrayStart() - if yyl1786 == 0 { + } else if yyct1879 == codecSelferValueTypeArray1234 { + yyl1879 := r.ReadArrayStart() + if yyl1879 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1786, d) + x.codecDecodeSelfFromArray(yyl1879, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -23528,12 +24854,12 @@ func (x *PodTemplateList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1787Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1787Slc - var yyhl1787 bool = l >= 0 - for yyj1787 := 0; ; yyj1787++ { - if yyhl1787 { - if yyj1787 >= l { + var yys1880Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1880Slc + var yyhl1880 bool = l >= 0 + for yyj1880 := 0; ; yyj1880++ { + if yyhl1880 { + if yyj1880 >= l { break } } else { @@ -23542,10 +24868,10 @@ func (x *PodTemplateList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1787Slc = r.DecodeBytes(yys1787Slc, true, true) - yys1787 := string(yys1787Slc) + yys1880Slc = r.DecodeBytes(yys1880Slc, true, true) + yys1880 := string(yys1880Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1787 { + switch yys1880 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -23562,31 +24888,31 @@ func (x *PodTemplateList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv1790 := &x.ListMeta - yym1791 := z.DecBinary() - _ = yym1791 + yyv1883 := &x.ListMeta + yym1884 := z.DecBinary() + _ = yym1884 if false { - } else if z.HasExtensions() && z.DecExt(yyv1790) { + } else if z.HasExtensions() && z.DecExt(yyv1883) { } else { - z.DecFallback(yyv1790, false) + z.DecFallback(yyv1883, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv1792 := &x.Items - yym1793 := z.DecBinary() - _ = yym1793 + yyv1885 := &x.Items + yym1886 := z.DecBinary() + _ = yym1886 if false { } else { - h.decSlicePodTemplate((*[]PodTemplate)(yyv1792), d) + h.decSlicePodTemplate((*[]PodTemplate)(yyv1885), d) } } default: - z.DecStructFieldNotFound(-1, yys1787) - } // end switch yys1787 - } // end for yyj1787 + z.DecStructFieldNotFound(-1, yys1880) + } // end switch yys1880 + } // end for yyj1880 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -23594,16 +24920,16 @@ func (x *PodTemplateList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1794 int - var yyb1794 bool - var yyhl1794 bool = l >= 0 - yyj1794++ - if yyhl1794 { - yyb1794 = yyj1794 > l + var yyj1887 int + var yyb1887 bool + var yyhl1887 bool = l >= 0 + yyj1887++ + if yyhl1887 { + yyb1887 = yyj1887 > l } else { - yyb1794 = r.CheckBreak() + yyb1887 = r.CheckBreak() } - if yyb1794 { + if yyb1887 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23613,13 +24939,13 @@ func (x *PodTemplateList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Kind = string(r.DecodeString()) } - yyj1794++ - if yyhl1794 { - yyb1794 = yyj1794 > l + yyj1887++ + if yyhl1887 { + yyb1887 = yyj1887 > l } else { - yyb1794 = r.CheckBreak() + yyb1887 = r.CheckBreak() } - if yyb1794 { + if yyb1887 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23629,13 +24955,13 @@ func (x *PodTemplateList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.APIVersion = string(r.DecodeString()) } - yyj1794++ - if yyhl1794 { - yyb1794 = yyj1794 > l + yyj1887++ + if yyhl1887 { + yyb1887 = yyj1887 > l } else { - yyb1794 = r.CheckBreak() + yyb1887 = r.CheckBreak() } - if yyb1794 { + if yyb1887 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23643,22 +24969,22 @@ func (x *PodTemplateList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv1797 := &x.ListMeta - yym1798 := z.DecBinary() - _ = yym1798 + yyv1890 := &x.ListMeta + yym1891 := z.DecBinary() + _ = yym1891 if false { - } else if z.HasExtensions() && z.DecExt(yyv1797) { + } else if z.HasExtensions() && z.DecExt(yyv1890) { } else { - z.DecFallback(yyv1797, false) + z.DecFallback(yyv1890, false) } } - yyj1794++ - if yyhl1794 { - yyb1794 = yyj1794 > l + yyj1887++ + if yyhl1887 { + yyb1887 = yyj1887 > l } else { - yyb1794 = r.CheckBreak() + yyb1887 = r.CheckBreak() } - if yyb1794 { + if yyb1887 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23666,26 +24992,26 @@ func (x *PodTemplateList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Items = nil } else { - yyv1799 := &x.Items - yym1800 := z.DecBinary() - _ = yym1800 + yyv1892 := &x.Items + yym1893 := z.DecBinary() + _ = yym1893 if false { } else { - h.decSlicePodTemplate((*[]PodTemplate)(yyv1799), d) + h.decSlicePodTemplate((*[]PodTemplate)(yyv1892), d) } } for { - yyj1794++ - if yyhl1794 { - yyb1794 = yyj1794 > l + yyj1887++ + if yyhl1887 { + yyb1887 = yyj1887 > l } else { - yyb1794 = r.CheckBreak() + yyb1887 = r.CheckBreak() } - if yyb1794 { + if yyb1887 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1794-1, "") + z.DecStructFieldNotFound(yyj1887-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -23697,75 +25023,75 @@ func (x *ReplicationControllerSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1801 := z.EncBinary() - _ = yym1801 + yym1894 := z.EncBinary() + _ = yym1894 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1802 := !z.EncBinary() - yy2arr1802 := z.EncBasicHandle().StructToArray - var yyq1802 [3]bool - _, _, _ = yysep1802, yyq1802, yy2arr1802 - const yyr1802 bool = false - yyq1802[0] = x.Replicas != nil - yyq1802[1] = len(x.Selector) != 0 - yyq1802[2] = x.Template != nil - var yynn1802 int - if yyr1802 || yy2arr1802 { + yysep1895 := !z.EncBinary() + yy2arr1895 := z.EncBasicHandle().StructToArray + var yyq1895 [3]bool + _, _, _ = yysep1895, yyq1895, yy2arr1895 + const yyr1895 bool = false + yyq1895[0] = x.Replicas != nil + yyq1895[1] = len(x.Selector) != 0 + yyq1895[2] = x.Template != nil + var yynn1895 int + if yyr1895 || yy2arr1895 { r.EncodeArrayStart(3) } else { - yynn1802 = 0 - for _, b := range yyq1802 { + yynn1895 = 0 + for _, b := range yyq1895 { if b { - yynn1802++ + yynn1895++ } } - r.EncodeMapStart(yynn1802) - yynn1802 = 0 + r.EncodeMapStart(yynn1895) + yynn1895 = 0 } - if yyr1802 || yy2arr1802 { + if yyr1895 || yy2arr1895 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1802[0] { + if yyq1895[0] { if x.Replicas == nil { r.EncodeNil() } else { - yy1804 := *x.Replicas - yym1805 := z.EncBinary() - _ = yym1805 + yy1897 := *x.Replicas + yym1898 := z.EncBinary() + _ = yym1898 if false { } else { - r.EncodeInt(int64(yy1804)) + r.EncodeInt(int64(yy1897)) } } } else { r.EncodeNil() } } else { - if yyq1802[0] { + if yyq1895[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("replicas")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Replicas == nil { r.EncodeNil() } else { - yy1806 := *x.Replicas - yym1807 := z.EncBinary() - _ = yym1807 + yy1899 := *x.Replicas + yym1900 := z.EncBinary() + _ = yym1900 if false { } else { - r.EncodeInt(int64(yy1806)) + r.EncodeInt(int64(yy1899)) } } } } - if yyr1802 || yy2arr1802 { + if yyr1895 || yy2arr1895 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1802[1] { + if yyq1895[1] { if x.Selector == nil { r.EncodeNil() } else { - yym1809 := z.EncBinary() - _ = yym1809 + yym1902 := z.EncBinary() + _ = yym1902 if false { } else { z.F.EncMapStringStringV(x.Selector, false, e) @@ -23775,15 +25101,15 @@ func (x *ReplicationControllerSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1802[1] { + if yyq1895[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("selector")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Selector == nil { r.EncodeNil() } else { - yym1810 := z.EncBinary() - _ = yym1810 + yym1903 := z.EncBinary() + _ = yym1903 if false { } else { z.F.EncMapStringStringV(x.Selector, false, e) @@ -23791,9 +25117,9 @@ func (x *ReplicationControllerSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1802 || yy2arr1802 { + if yyr1895 || yy2arr1895 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1802[2] { + if yyq1895[2] { if x.Template == nil { r.EncodeNil() } else { @@ -23803,7 +25129,7 @@ func (x *ReplicationControllerSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1802[2] { + if yyq1895[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("template")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -23814,7 +25140,7 @@ func (x *ReplicationControllerSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1802 || yy2arr1802 { + if yyr1895 || yy2arr1895 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -23827,25 +25153,25 @@ func (x *ReplicationControllerSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1812 := z.DecBinary() - _ = yym1812 + yym1905 := z.DecBinary() + _ = yym1905 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1813 := r.ContainerType() - if yyct1813 == codecSelferValueTypeMap1234 { - yyl1813 := r.ReadMapStart() - if yyl1813 == 0 { + yyct1906 := r.ContainerType() + if yyct1906 == codecSelferValueTypeMap1234 { + yyl1906 := r.ReadMapStart() + if yyl1906 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1813, d) + x.codecDecodeSelfFromMap(yyl1906, d) } - } else if yyct1813 == codecSelferValueTypeArray1234 { - yyl1813 := r.ReadArrayStart() - if yyl1813 == 0 { + } else if yyct1906 == codecSelferValueTypeArray1234 { + yyl1906 := r.ReadArrayStart() + if yyl1906 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1813, d) + x.codecDecodeSelfFromArray(yyl1906, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -23857,12 +25183,12 @@ func (x *ReplicationControllerSpec) codecDecodeSelfFromMap(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1814Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1814Slc - var yyhl1814 bool = l >= 0 - for yyj1814 := 0; ; yyj1814++ { - if yyhl1814 { - if yyj1814 >= l { + var yys1907Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1907Slc + var yyhl1907 bool = l >= 0 + for yyj1907 := 0; ; yyj1907++ { + if yyhl1907 { + if yyj1907 >= l { break } } else { @@ -23871,10 +25197,10 @@ func (x *ReplicationControllerSpec) codecDecodeSelfFromMap(l int, d *codec1978.D } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1814Slc = r.DecodeBytes(yys1814Slc, true, true) - yys1814 := string(yys1814Slc) + yys1907Slc = r.DecodeBytes(yys1907Slc, true, true) + yys1907 := string(yys1907Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1814 { + switch yys1907 { case "replicas": if r.TryDecodeAsNil() { if x.Replicas != nil { @@ -23884,8 +25210,8 @@ func (x *ReplicationControllerSpec) codecDecodeSelfFromMap(l int, d *codec1978.D if x.Replicas == nil { x.Replicas = new(int32) } - yym1816 := z.DecBinary() - _ = yym1816 + yym1909 := z.DecBinary() + _ = yym1909 if false { } else { *((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) @@ -23895,12 +25221,12 @@ func (x *ReplicationControllerSpec) codecDecodeSelfFromMap(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Selector = nil } else { - yyv1817 := &x.Selector - yym1818 := z.DecBinary() - _ = yym1818 + yyv1910 := &x.Selector + yym1911 := z.DecBinary() + _ = yym1911 if false { } else { - z.F.DecMapStringStringX(yyv1817, false, d) + z.F.DecMapStringStringX(yyv1910, false, d) } } case "template": @@ -23915,9 +25241,9 @@ func (x *ReplicationControllerSpec) codecDecodeSelfFromMap(l int, d *codec1978.D x.Template.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys1814) - } // end switch yys1814 - } // end for yyj1814 + z.DecStructFieldNotFound(-1, yys1907) + } // end switch yys1907 + } // end for yyj1907 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -23925,16 +25251,16 @@ func (x *ReplicationControllerSpec) codecDecodeSelfFromArray(l int, d *codec1978 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1820 int - var yyb1820 bool - var yyhl1820 bool = l >= 0 - yyj1820++ - if yyhl1820 { - yyb1820 = yyj1820 > l + var yyj1913 int + var yyb1913 bool + var yyhl1913 bool = l >= 0 + yyj1913++ + if yyhl1913 { + yyb1913 = yyj1913 > l } else { - yyb1820 = r.CheckBreak() + yyb1913 = r.CheckBreak() } - if yyb1820 { + if yyb1913 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23947,20 +25273,20 @@ func (x *ReplicationControllerSpec) codecDecodeSelfFromArray(l int, d *codec1978 if x.Replicas == nil { x.Replicas = new(int32) } - yym1822 := z.DecBinary() - _ = yym1822 + yym1915 := z.DecBinary() + _ = yym1915 if false { } else { *((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) } } - yyj1820++ - if yyhl1820 { - yyb1820 = yyj1820 > l + yyj1913++ + if yyhl1913 { + yyb1913 = yyj1913 > l } else { - yyb1820 = r.CheckBreak() + yyb1913 = r.CheckBreak() } - if yyb1820 { + if yyb1913 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23968,21 +25294,21 @@ func (x *ReplicationControllerSpec) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.Selector = nil } else { - yyv1823 := &x.Selector - yym1824 := z.DecBinary() - _ = yym1824 + yyv1916 := &x.Selector + yym1917 := z.DecBinary() + _ = yym1917 if false { } else { - z.F.DecMapStringStringX(yyv1823, false, d) + z.F.DecMapStringStringX(yyv1916, false, d) } } - yyj1820++ - if yyhl1820 { - yyb1820 = yyj1820 > l + yyj1913++ + if yyhl1913 { + yyb1913 = yyj1913 > l } else { - yyb1820 = r.CheckBreak() + yyb1913 = r.CheckBreak() } - if yyb1820 { + if yyb1913 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23998,17 +25324,17 @@ func (x *ReplicationControllerSpec) codecDecodeSelfFromArray(l int, d *codec1978 x.Template.CodecDecodeSelf(d) } for { - yyj1820++ - if yyhl1820 { - yyb1820 = yyj1820 > l + yyj1913++ + if yyhl1913 { + yyb1913 = yyj1913 > l } else { - yyb1820 = r.CheckBreak() + yyb1913 = r.CheckBreak() } - if yyb1820 { + if yyb1913 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1820-1, "") + z.DecStructFieldNotFound(yyj1913-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -24020,34 +25346,34 @@ func (x *ReplicationControllerStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1826 := z.EncBinary() - _ = yym1826 + yym1919 := z.EncBinary() + _ = yym1919 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1827 := !z.EncBinary() - yy2arr1827 := z.EncBasicHandle().StructToArray - var yyq1827 [2]bool - _, _, _ = yysep1827, yyq1827, yy2arr1827 - const yyr1827 bool = false - yyq1827[1] = x.ObservedGeneration != 0 - var yynn1827 int - if yyr1827 || yy2arr1827 { + yysep1920 := !z.EncBinary() + yy2arr1920 := z.EncBasicHandle().StructToArray + var yyq1920 [2]bool + _, _, _ = yysep1920, yyq1920, yy2arr1920 + const yyr1920 bool = false + yyq1920[1] = x.ObservedGeneration != 0 + var yynn1920 int + if yyr1920 || yy2arr1920 { r.EncodeArrayStart(2) } else { - yynn1827 = 1 - for _, b := range yyq1827 { + yynn1920 = 1 + for _, b := range yyq1920 { if b { - yynn1827++ + yynn1920++ } } - r.EncodeMapStart(yynn1827) - yynn1827 = 0 + r.EncodeMapStart(yynn1920) + yynn1920 = 0 } - if yyr1827 || yy2arr1827 { + if yyr1920 || yy2arr1920 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1829 := z.EncBinary() - _ = yym1829 + yym1922 := z.EncBinary() + _ = yym1922 if false { } else { r.EncodeInt(int64(x.Replicas)) @@ -24056,18 +25382,18 @@ func (x *ReplicationControllerStatus) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("replicas")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1830 := z.EncBinary() - _ = yym1830 + yym1923 := z.EncBinary() + _ = yym1923 if false { } else { r.EncodeInt(int64(x.Replicas)) } } - if yyr1827 || yy2arr1827 { + if yyr1920 || yy2arr1920 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1827[1] { - yym1832 := z.EncBinary() - _ = yym1832 + if yyq1920[1] { + yym1925 := z.EncBinary() + _ = yym1925 if false { } else { r.EncodeInt(int64(x.ObservedGeneration)) @@ -24076,19 +25402,19 @@ func (x *ReplicationControllerStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq1827[1] { + if yyq1920[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("observedGeneration")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1833 := z.EncBinary() - _ = yym1833 + yym1926 := z.EncBinary() + _ = yym1926 if false { } else { r.EncodeInt(int64(x.ObservedGeneration)) } } } - if yyr1827 || yy2arr1827 { + if yyr1920 || yy2arr1920 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -24101,25 +25427,25 @@ func (x *ReplicationControllerStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1834 := z.DecBinary() - _ = yym1834 + yym1927 := z.DecBinary() + _ = yym1927 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1835 := r.ContainerType() - if yyct1835 == codecSelferValueTypeMap1234 { - yyl1835 := r.ReadMapStart() - if yyl1835 == 0 { + yyct1928 := r.ContainerType() + if yyct1928 == codecSelferValueTypeMap1234 { + yyl1928 := r.ReadMapStart() + if yyl1928 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1835, d) + x.codecDecodeSelfFromMap(yyl1928, d) } - } else if yyct1835 == codecSelferValueTypeArray1234 { - yyl1835 := r.ReadArrayStart() - if yyl1835 == 0 { + } else if yyct1928 == codecSelferValueTypeArray1234 { + yyl1928 := r.ReadArrayStart() + if yyl1928 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1835, d) + x.codecDecodeSelfFromArray(yyl1928, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -24131,12 +25457,12 @@ func (x *ReplicationControllerStatus) codecDecodeSelfFromMap(l int, d *codec1978 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1836Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1836Slc - var yyhl1836 bool = l >= 0 - for yyj1836 := 0; ; yyj1836++ { - if yyhl1836 { - if yyj1836 >= l { + var yys1929Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1929Slc + var yyhl1929 bool = l >= 0 + for yyj1929 := 0; ; yyj1929++ { + if yyhl1929 { + if yyj1929 >= l { break } } else { @@ -24145,10 +25471,10 @@ func (x *ReplicationControllerStatus) codecDecodeSelfFromMap(l int, d *codec1978 } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1836Slc = r.DecodeBytes(yys1836Slc, true, true) - yys1836 := string(yys1836Slc) + yys1929Slc = r.DecodeBytes(yys1929Slc, true, true) + yys1929 := string(yys1929Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1836 { + switch yys1929 { case "replicas": if r.TryDecodeAsNil() { x.Replicas = 0 @@ -24162,9 +25488,9 @@ func (x *ReplicationControllerStatus) codecDecodeSelfFromMap(l int, d *codec1978 x.ObservedGeneration = int64(r.DecodeInt(64)) } default: - z.DecStructFieldNotFound(-1, yys1836) - } // end switch yys1836 - } // end for yyj1836 + z.DecStructFieldNotFound(-1, yys1929) + } // end switch yys1929 + } // end for yyj1929 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -24172,16 +25498,16 @@ func (x *ReplicationControllerStatus) codecDecodeSelfFromArray(l int, d *codec19 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1839 int - var yyb1839 bool - var yyhl1839 bool = l >= 0 - yyj1839++ - if yyhl1839 { - yyb1839 = yyj1839 > l + var yyj1932 int + var yyb1932 bool + var yyhl1932 bool = l >= 0 + yyj1932++ + if yyhl1932 { + yyb1932 = yyj1932 > l } else { - yyb1839 = r.CheckBreak() + yyb1932 = r.CheckBreak() } - if yyb1839 { + if yyb1932 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24191,13 +25517,13 @@ func (x *ReplicationControllerStatus) codecDecodeSelfFromArray(l int, d *codec19 } else { x.Replicas = int32(r.DecodeInt(32)) } - yyj1839++ - if yyhl1839 { - yyb1839 = yyj1839 > l + yyj1932++ + if yyhl1932 { + yyb1932 = yyj1932 > l } else { - yyb1839 = r.CheckBreak() + yyb1932 = r.CheckBreak() } - if yyb1839 { + if yyb1932 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24208,17 +25534,17 @@ func (x *ReplicationControllerStatus) codecDecodeSelfFromArray(l int, d *codec19 x.ObservedGeneration = int64(r.DecodeInt(64)) } for { - yyj1839++ - if yyhl1839 { - yyb1839 = yyj1839 > l + yyj1932++ + if yyhl1932 { + yyb1932 = yyj1932 > l } else { - yyb1839 = r.CheckBreak() + yyb1932 = r.CheckBreak() } - if yyb1839 { + if yyb1932 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1839-1, "") + z.DecStructFieldNotFound(yyj1932-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -24230,39 +25556,39 @@ func (x *ReplicationController) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1842 := z.EncBinary() - _ = yym1842 + yym1935 := z.EncBinary() + _ = yym1935 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1843 := !z.EncBinary() - yy2arr1843 := z.EncBasicHandle().StructToArray - var yyq1843 [5]bool - _, _, _ = yysep1843, yyq1843, yy2arr1843 - const yyr1843 bool = false - yyq1843[0] = x.Kind != "" - yyq1843[1] = x.APIVersion != "" - yyq1843[2] = true - yyq1843[3] = true - yyq1843[4] = true - var yynn1843 int - if yyr1843 || yy2arr1843 { + yysep1936 := !z.EncBinary() + yy2arr1936 := z.EncBasicHandle().StructToArray + var yyq1936 [5]bool + _, _, _ = yysep1936, yyq1936, yy2arr1936 + const yyr1936 bool = false + yyq1936[0] = x.Kind != "" + yyq1936[1] = x.APIVersion != "" + yyq1936[2] = true + yyq1936[3] = true + yyq1936[4] = true + var yynn1936 int + if yyr1936 || yy2arr1936 { r.EncodeArrayStart(5) } else { - yynn1843 = 0 - for _, b := range yyq1843 { + yynn1936 = 0 + for _, b := range yyq1936 { if b { - yynn1843++ + yynn1936++ } } - r.EncodeMapStart(yynn1843) - yynn1843 = 0 + r.EncodeMapStart(yynn1936) + yynn1936 = 0 } - if yyr1843 || yy2arr1843 { + if yyr1936 || yy2arr1936 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1843[0] { - yym1845 := z.EncBinary() - _ = yym1845 + if yyq1936[0] { + yym1938 := z.EncBinary() + _ = yym1938 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -24271,23 +25597,23 @@ func (x *ReplicationController) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1843[0] { + if yyq1936[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1846 := z.EncBinary() - _ = yym1846 + yym1939 := z.EncBinary() + _ = yym1939 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr1843 || yy2arr1843 { + if yyr1936 || yy2arr1936 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1843[1] { - yym1848 := z.EncBinary() - _ = yym1848 + if yyq1936[1] { + yym1941 := z.EncBinary() + _ = yym1941 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -24296,70 +25622,70 @@ func (x *ReplicationController) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1843[1] { + if yyq1936[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1849 := z.EncBinary() - _ = yym1849 + yym1942 := z.EncBinary() + _ = yym1942 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr1843 || yy2arr1843 { + if yyr1936 || yy2arr1936 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1843[2] { - yy1851 := &x.ObjectMeta - yy1851.CodecEncodeSelf(e) + if yyq1936[2] { + yy1944 := &x.ObjectMeta + yy1944.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1843[2] { + if yyq1936[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1852 := &x.ObjectMeta - yy1852.CodecEncodeSelf(e) + yy1945 := &x.ObjectMeta + yy1945.CodecEncodeSelf(e) } } - if yyr1843 || yy2arr1843 { + if yyr1936 || yy2arr1936 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1843[3] { - yy1854 := &x.Spec - yy1854.CodecEncodeSelf(e) + if yyq1936[3] { + yy1947 := &x.Spec + yy1947.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1843[3] { + if yyq1936[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1855 := &x.Spec - yy1855.CodecEncodeSelf(e) + yy1948 := &x.Spec + yy1948.CodecEncodeSelf(e) } } - if yyr1843 || yy2arr1843 { + if yyr1936 || yy2arr1936 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1843[4] { - yy1857 := &x.Status - yy1857.CodecEncodeSelf(e) + if yyq1936[4] { + yy1950 := &x.Status + yy1950.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1843[4] { + if yyq1936[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1858 := &x.Status - yy1858.CodecEncodeSelf(e) + yy1951 := &x.Status + yy1951.CodecEncodeSelf(e) } } - if yyr1843 || yy2arr1843 { + if yyr1936 || yy2arr1936 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -24372,25 +25698,25 @@ func (x *ReplicationController) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1859 := z.DecBinary() - _ = yym1859 + yym1952 := z.DecBinary() + _ = yym1952 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1860 := r.ContainerType() - if yyct1860 == codecSelferValueTypeMap1234 { - yyl1860 := r.ReadMapStart() - if yyl1860 == 0 { + yyct1953 := r.ContainerType() + if yyct1953 == codecSelferValueTypeMap1234 { + yyl1953 := r.ReadMapStart() + if yyl1953 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1860, d) + x.codecDecodeSelfFromMap(yyl1953, d) } - } else if yyct1860 == codecSelferValueTypeArray1234 { - yyl1860 := r.ReadArrayStart() - if yyl1860 == 0 { + } else if yyct1953 == codecSelferValueTypeArray1234 { + yyl1953 := r.ReadArrayStart() + if yyl1953 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1860, d) + x.codecDecodeSelfFromArray(yyl1953, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -24402,12 +25728,12 @@ func (x *ReplicationController) codecDecodeSelfFromMap(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1861Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1861Slc - var yyhl1861 bool = l >= 0 - for yyj1861 := 0; ; yyj1861++ { - if yyhl1861 { - if yyj1861 >= l { + var yys1954Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1954Slc + var yyhl1954 bool = l >= 0 + for yyj1954 := 0; ; yyj1954++ { + if yyhl1954 { + if yyj1954 >= l { break } } else { @@ -24416,10 +25742,10 @@ func (x *ReplicationController) codecDecodeSelfFromMap(l int, d *codec1978.Decod } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1861Slc = r.DecodeBytes(yys1861Slc, true, true) - yys1861 := string(yys1861Slc) + yys1954Slc = r.DecodeBytes(yys1954Slc, true, true) + yys1954 := string(yys1954Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1861 { + switch yys1954 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -24436,27 +25762,27 @@ func (x *ReplicationController) codecDecodeSelfFromMap(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv1864 := &x.ObjectMeta - yyv1864.CodecDecodeSelf(d) + yyv1957 := &x.ObjectMeta + yyv1957.CodecDecodeSelf(d) } case "spec": if r.TryDecodeAsNil() { x.Spec = ReplicationControllerSpec{} } else { - yyv1865 := &x.Spec - yyv1865.CodecDecodeSelf(d) + yyv1958 := &x.Spec + yyv1958.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ReplicationControllerStatus{} } else { - yyv1866 := &x.Status - yyv1866.CodecDecodeSelf(d) + yyv1959 := &x.Status + yyv1959.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys1861) - } // end switch yys1861 - } // end for yyj1861 + z.DecStructFieldNotFound(-1, yys1954) + } // end switch yys1954 + } // end for yyj1954 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -24464,16 +25790,16 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1867 int - var yyb1867 bool - var yyhl1867 bool = l >= 0 - yyj1867++ - if yyhl1867 { - yyb1867 = yyj1867 > l + var yyj1960 int + var yyb1960 bool + var yyhl1960 bool = l >= 0 + yyj1960++ + if yyhl1960 { + yyb1960 = yyj1960 > l } else { - yyb1867 = r.CheckBreak() + yyb1960 = r.CheckBreak() } - if yyb1867 { + if yyb1960 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24483,13 +25809,13 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec } else { x.Kind = string(r.DecodeString()) } - yyj1867++ - if yyhl1867 { - yyb1867 = yyj1867 > l + yyj1960++ + if yyhl1960 { + yyb1960 = yyj1960 > l } else { - yyb1867 = r.CheckBreak() + yyb1960 = r.CheckBreak() } - if yyb1867 { + if yyb1960 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24499,13 +25825,13 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec } else { x.APIVersion = string(r.DecodeString()) } - yyj1867++ - if yyhl1867 { - yyb1867 = yyj1867 > l + yyj1960++ + if yyhl1960 { + yyb1960 = yyj1960 > l } else { - yyb1867 = r.CheckBreak() + yyb1960 = r.CheckBreak() } - if yyb1867 { + if yyb1960 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24513,16 +25839,16 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv1870 := &x.ObjectMeta - yyv1870.CodecDecodeSelf(d) + yyv1963 := &x.ObjectMeta + yyv1963.CodecDecodeSelf(d) } - yyj1867++ - if yyhl1867 { - yyb1867 = yyj1867 > l + yyj1960++ + if yyhl1960 { + yyb1960 = yyj1960 > l } else { - yyb1867 = r.CheckBreak() + yyb1960 = r.CheckBreak() } - if yyb1867 { + if yyb1960 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24530,16 +25856,16 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Spec = ReplicationControllerSpec{} } else { - yyv1871 := &x.Spec - yyv1871.CodecDecodeSelf(d) + yyv1964 := &x.Spec + yyv1964.CodecDecodeSelf(d) } - yyj1867++ - if yyhl1867 { - yyb1867 = yyj1867 > l + yyj1960++ + if yyhl1960 { + yyb1960 = yyj1960 > l } else { - yyb1867 = r.CheckBreak() + yyb1960 = r.CheckBreak() } - if yyb1867 { + if yyb1960 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24547,21 +25873,21 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Status = ReplicationControllerStatus{} } else { - yyv1872 := &x.Status - yyv1872.CodecDecodeSelf(d) + yyv1965 := &x.Status + yyv1965.CodecDecodeSelf(d) } for { - yyj1867++ - if yyhl1867 { - yyb1867 = yyj1867 > l + yyj1960++ + if yyhl1960 { + yyb1960 = yyj1960 > l } else { - yyb1867 = r.CheckBreak() + yyb1960 = r.CheckBreak() } - if yyb1867 { + if yyb1960 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1867-1, "") + z.DecStructFieldNotFound(yyj1960-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -24573,37 +25899,37 @@ func (x *ReplicationControllerList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1873 := z.EncBinary() - _ = yym1873 + yym1966 := z.EncBinary() + _ = yym1966 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1874 := !z.EncBinary() - yy2arr1874 := z.EncBasicHandle().StructToArray - var yyq1874 [4]bool - _, _, _ = yysep1874, yyq1874, yy2arr1874 - const yyr1874 bool = false - yyq1874[0] = x.Kind != "" - yyq1874[1] = x.APIVersion != "" - yyq1874[2] = true - var yynn1874 int - if yyr1874 || yy2arr1874 { + yysep1967 := !z.EncBinary() + yy2arr1967 := z.EncBasicHandle().StructToArray + var yyq1967 [4]bool + _, _, _ = yysep1967, yyq1967, yy2arr1967 + const yyr1967 bool = false + yyq1967[0] = x.Kind != "" + yyq1967[1] = x.APIVersion != "" + yyq1967[2] = true + var yynn1967 int + if yyr1967 || yy2arr1967 { r.EncodeArrayStart(4) } else { - yynn1874 = 1 - for _, b := range yyq1874 { + yynn1967 = 1 + for _, b := range yyq1967 { if b { - yynn1874++ + yynn1967++ } } - r.EncodeMapStart(yynn1874) - yynn1874 = 0 + r.EncodeMapStart(yynn1967) + yynn1967 = 0 } - if yyr1874 || yy2arr1874 { + if yyr1967 || yy2arr1967 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1874[0] { - yym1876 := z.EncBinary() - _ = yym1876 + if yyq1967[0] { + yym1969 := z.EncBinary() + _ = yym1969 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -24612,23 +25938,23 @@ func (x *ReplicationControllerList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1874[0] { + if yyq1967[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1877 := z.EncBinary() - _ = yym1877 + yym1970 := z.EncBinary() + _ = yym1970 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr1874 || yy2arr1874 { + if yyr1967 || yy2arr1967 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1874[1] { - yym1879 := z.EncBinary() - _ = yym1879 + if yyq1967[1] { + yym1972 := z.EncBinary() + _ = yym1972 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -24637,54 +25963,54 @@ func (x *ReplicationControllerList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1874[1] { + if yyq1967[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1880 := z.EncBinary() - _ = yym1880 + yym1973 := z.EncBinary() + _ = yym1973 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr1874 || yy2arr1874 { + if yyr1967 || yy2arr1967 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1874[2] { - yy1882 := &x.ListMeta - yym1883 := z.EncBinary() - _ = yym1883 + if yyq1967[2] { + yy1975 := &x.ListMeta + yym1976 := z.EncBinary() + _ = yym1976 if false { - } else if z.HasExtensions() && z.EncExt(yy1882) { + } else if z.HasExtensions() && z.EncExt(yy1975) { } else { - z.EncFallback(yy1882) + z.EncFallback(yy1975) } } else { r.EncodeNil() } } else { - if yyq1874[2] { + if yyq1967[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1884 := &x.ListMeta - yym1885 := z.EncBinary() - _ = yym1885 + yy1977 := &x.ListMeta + yym1978 := z.EncBinary() + _ = yym1978 if false { - } else if z.HasExtensions() && z.EncExt(yy1884) { + } else if z.HasExtensions() && z.EncExt(yy1977) { } else { - z.EncFallback(yy1884) + z.EncFallback(yy1977) } } } - if yyr1874 || yy2arr1874 { + if yyr1967 || yy2arr1967 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym1887 := z.EncBinary() - _ = yym1887 + yym1980 := z.EncBinary() + _ = yym1980 if false { } else { h.encSliceReplicationController(([]ReplicationController)(x.Items), e) @@ -24697,15 +26023,15 @@ func (x *ReplicationControllerList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym1888 := z.EncBinary() - _ = yym1888 + yym1981 := z.EncBinary() + _ = yym1981 if false { } else { h.encSliceReplicationController(([]ReplicationController)(x.Items), e) } } } - if yyr1874 || yy2arr1874 { + if yyr1967 || yy2arr1967 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -24718,25 +26044,25 @@ func (x *ReplicationControllerList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1889 := z.DecBinary() - _ = yym1889 + yym1982 := z.DecBinary() + _ = yym1982 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1890 := r.ContainerType() - if yyct1890 == codecSelferValueTypeMap1234 { - yyl1890 := r.ReadMapStart() - if yyl1890 == 0 { + yyct1983 := r.ContainerType() + if yyct1983 == codecSelferValueTypeMap1234 { + yyl1983 := r.ReadMapStart() + if yyl1983 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1890, d) + x.codecDecodeSelfFromMap(yyl1983, d) } - } else if yyct1890 == codecSelferValueTypeArray1234 { - yyl1890 := r.ReadArrayStart() - if yyl1890 == 0 { + } else if yyct1983 == codecSelferValueTypeArray1234 { + yyl1983 := r.ReadArrayStart() + if yyl1983 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1890, d) + x.codecDecodeSelfFromArray(yyl1983, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -24748,12 +26074,12 @@ func (x *ReplicationControllerList) codecDecodeSelfFromMap(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1891Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1891Slc - var yyhl1891 bool = l >= 0 - for yyj1891 := 0; ; yyj1891++ { - if yyhl1891 { - if yyj1891 >= l { + var yys1984Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1984Slc + var yyhl1984 bool = l >= 0 + for yyj1984 := 0; ; yyj1984++ { + if yyhl1984 { + if yyj1984 >= l { break } } else { @@ -24762,10 +26088,10 @@ func (x *ReplicationControllerList) codecDecodeSelfFromMap(l int, d *codec1978.D } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1891Slc = r.DecodeBytes(yys1891Slc, true, true) - yys1891 := string(yys1891Slc) + yys1984Slc = r.DecodeBytes(yys1984Slc, true, true) + yys1984 := string(yys1984Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1891 { + switch yys1984 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -24782,31 +26108,31 @@ func (x *ReplicationControllerList) codecDecodeSelfFromMap(l int, d *codec1978.D if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv1894 := &x.ListMeta - yym1895 := z.DecBinary() - _ = yym1895 + yyv1987 := &x.ListMeta + yym1988 := z.DecBinary() + _ = yym1988 if false { - } else if z.HasExtensions() && z.DecExt(yyv1894) { + } else if z.HasExtensions() && z.DecExt(yyv1987) { } else { - z.DecFallback(yyv1894, false) + z.DecFallback(yyv1987, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv1896 := &x.Items - yym1897 := z.DecBinary() - _ = yym1897 + yyv1989 := &x.Items + yym1990 := z.DecBinary() + _ = yym1990 if false { } else { - h.decSliceReplicationController((*[]ReplicationController)(yyv1896), d) + h.decSliceReplicationController((*[]ReplicationController)(yyv1989), d) } } default: - z.DecStructFieldNotFound(-1, yys1891) - } // end switch yys1891 - } // end for yyj1891 + z.DecStructFieldNotFound(-1, yys1984) + } // end switch yys1984 + } // end for yyj1984 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -24814,16 +26140,16 @@ func (x *ReplicationControllerList) codecDecodeSelfFromArray(l int, d *codec1978 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1898 int - var yyb1898 bool - var yyhl1898 bool = l >= 0 - yyj1898++ - if yyhl1898 { - yyb1898 = yyj1898 > l + var yyj1991 int + var yyb1991 bool + var yyhl1991 bool = l >= 0 + yyj1991++ + if yyhl1991 { + yyb1991 = yyj1991 > l } else { - yyb1898 = r.CheckBreak() + yyb1991 = r.CheckBreak() } - if yyb1898 { + if yyb1991 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24833,13 +26159,13 @@ func (x *ReplicationControllerList) codecDecodeSelfFromArray(l int, d *codec1978 } else { x.Kind = string(r.DecodeString()) } - yyj1898++ - if yyhl1898 { - yyb1898 = yyj1898 > l + yyj1991++ + if yyhl1991 { + yyb1991 = yyj1991 > l } else { - yyb1898 = r.CheckBreak() + yyb1991 = r.CheckBreak() } - if yyb1898 { + if yyb1991 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24849,13 +26175,13 @@ func (x *ReplicationControllerList) codecDecodeSelfFromArray(l int, d *codec1978 } else { x.APIVersion = string(r.DecodeString()) } - yyj1898++ - if yyhl1898 { - yyb1898 = yyj1898 > l + yyj1991++ + if yyhl1991 { + yyb1991 = yyj1991 > l } else { - yyb1898 = r.CheckBreak() + yyb1991 = r.CheckBreak() } - if yyb1898 { + if yyb1991 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24863,22 +26189,22 @@ func (x *ReplicationControllerList) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv1901 := &x.ListMeta - yym1902 := z.DecBinary() - _ = yym1902 + yyv1994 := &x.ListMeta + yym1995 := z.DecBinary() + _ = yym1995 if false { - } else if z.HasExtensions() && z.DecExt(yyv1901) { + } else if z.HasExtensions() && z.DecExt(yyv1994) { } else { - z.DecFallback(yyv1901, false) + z.DecFallback(yyv1994, false) } } - yyj1898++ - if yyhl1898 { - yyb1898 = yyj1898 > l + yyj1991++ + if yyhl1991 { + yyb1991 = yyj1991 > l } else { - yyb1898 = r.CheckBreak() + yyb1991 = r.CheckBreak() } - if yyb1898 { + if yyb1991 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24886,26 +26212,26 @@ func (x *ReplicationControllerList) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.Items = nil } else { - yyv1903 := &x.Items - yym1904 := z.DecBinary() - _ = yym1904 + yyv1996 := &x.Items + yym1997 := z.DecBinary() + _ = yym1997 if false { } else { - h.decSliceReplicationController((*[]ReplicationController)(yyv1903), d) + h.decSliceReplicationController((*[]ReplicationController)(yyv1996), d) } } for { - yyj1898++ - if yyhl1898 { - yyb1898 = yyj1898 > l + yyj1991++ + if yyhl1991 { + yyb1991 = yyj1991 > l } else { - yyb1898 = r.CheckBreak() + yyb1991 = r.CheckBreak() } - if yyb1898 { + if yyb1991 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1898-1, "") + z.DecStructFieldNotFound(yyj1991-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -24914,8 +26240,8 @@ func (x ServiceAffinity) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym1905 := z.EncBinary() - _ = yym1905 + yym1998 := z.EncBinary() + _ = yym1998 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -24927,8 +26253,8 @@ func (x *ServiceAffinity) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1906 := z.DecBinary() - _ = yym1906 + yym1999 := z.DecBinary() + _ = yym1999 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -24940,8 +26266,8 @@ func (x ServiceType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym1907 := z.EncBinary() - _ = yym1907 + yym2000 := z.EncBinary() + _ = yym2000 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -24953,8 +26279,8 @@ func (x *ServiceType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1908 := z.DecBinary() - _ = yym1908 + yym2001 := z.DecBinary() + _ = yym2001 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -24969,48 +26295,48 @@ func (x *ServiceStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1909 := z.EncBinary() - _ = yym1909 + yym2002 := z.EncBinary() + _ = yym2002 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1910 := !z.EncBinary() - yy2arr1910 := z.EncBasicHandle().StructToArray - var yyq1910 [1]bool - _, _, _ = yysep1910, yyq1910, yy2arr1910 - const yyr1910 bool = false - yyq1910[0] = true - var yynn1910 int - if yyr1910 || yy2arr1910 { + yysep2003 := !z.EncBinary() + yy2arr2003 := z.EncBasicHandle().StructToArray + var yyq2003 [1]bool + _, _, _ = yysep2003, yyq2003, yy2arr2003 + const yyr2003 bool = false + yyq2003[0] = true + var yynn2003 int + if yyr2003 || yy2arr2003 { r.EncodeArrayStart(1) } else { - yynn1910 = 0 - for _, b := range yyq1910 { + yynn2003 = 0 + for _, b := range yyq2003 { if b { - yynn1910++ + yynn2003++ } } - r.EncodeMapStart(yynn1910) - yynn1910 = 0 + r.EncodeMapStart(yynn2003) + yynn2003 = 0 } - if yyr1910 || yy2arr1910 { + if yyr2003 || yy2arr2003 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1910[0] { - yy1912 := &x.LoadBalancer - yy1912.CodecEncodeSelf(e) + if yyq2003[0] { + yy2005 := &x.LoadBalancer + yy2005.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1910[0] { + if yyq2003[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("loadBalancer")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1913 := &x.LoadBalancer - yy1913.CodecEncodeSelf(e) + yy2006 := &x.LoadBalancer + yy2006.CodecEncodeSelf(e) } } - if yyr1910 || yy2arr1910 { + if yyr2003 || yy2arr2003 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -25023,25 +26349,25 @@ func (x *ServiceStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1914 := z.DecBinary() - _ = yym1914 + yym2007 := z.DecBinary() + _ = yym2007 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1915 := r.ContainerType() - if yyct1915 == codecSelferValueTypeMap1234 { - yyl1915 := r.ReadMapStart() - if yyl1915 == 0 { + yyct2008 := r.ContainerType() + if yyct2008 == codecSelferValueTypeMap1234 { + yyl2008 := r.ReadMapStart() + if yyl2008 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1915, d) + x.codecDecodeSelfFromMap(yyl2008, d) } - } else if yyct1915 == codecSelferValueTypeArray1234 { - yyl1915 := r.ReadArrayStart() - if yyl1915 == 0 { + } else if yyct2008 == codecSelferValueTypeArray1234 { + yyl2008 := r.ReadArrayStart() + if yyl2008 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1915, d) + x.codecDecodeSelfFromArray(yyl2008, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -25053,12 +26379,12 @@ func (x *ServiceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1916Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1916Slc - var yyhl1916 bool = l >= 0 - for yyj1916 := 0; ; yyj1916++ { - if yyhl1916 { - if yyj1916 >= l { + var yys2009Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2009Slc + var yyhl2009 bool = l >= 0 + for yyj2009 := 0; ; yyj2009++ { + if yyhl2009 { + if yyj2009 >= l { break } } else { @@ -25067,21 +26393,21 @@ func (x *ServiceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1916Slc = r.DecodeBytes(yys1916Slc, true, true) - yys1916 := string(yys1916Slc) + yys2009Slc = r.DecodeBytes(yys2009Slc, true, true) + yys2009 := string(yys2009Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1916 { + switch yys2009 { case "loadBalancer": if r.TryDecodeAsNil() { x.LoadBalancer = LoadBalancerStatus{} } else { - yyv1917 := &x.LoadBalancer - yyv1917.CodecDecodeSelf(d) + yyv2010 := &x.LoadBalancer + yyv2010.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys1916) - } // end switch yys1916 - } // end for yyj1916 + z.DecStructFieldNotFound(-1, yys2009) + } // end switch yys2009 + } // end for yyj2009 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -25089,16 +26415,16 @@ func (x *ServiceStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1918 int - var yyb1918 bool - var yyhl1918 bool = l >= 0 - yyj1918++ - if yyhl1918 { - yyb1918 = yyj1918 > l + var yyj2011 int + var yyb2011 bool + var yyhl2011 bool = l >= 0 + yyj2011++ + if yyhl2011 { + yyb2011 = yyj2011 > l } else { - yyb1918 = r.CheckBreak() + yyb2011 = r.CheckBreak() } - if yyb1918 { + if yyb2011 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -25106,21 +26432,21 @@ func (x *ServiceStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.LoadBalancer = LoadBalancerStatus{} } else { - yyv1919 := &x.LoadBalancer - yyv1919.CodecDecodeSelf(d) + yyv2012 := &x.LoadBalancer + yyv2012.CodecDecodeSelf(d) } for { - yyj1918++ - if yyhl1918 { - yyb1918 = yyj1918 > l + yyj2011++ + if yyhl2011 { + yyb2011 = yyj2011 > l } else { - yyb1918 = r.CheckBreak() + yyb2011 = r.CheckBreak() } - if yyb1918 { + if yyb2011 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1918-1, "") + z.DecStructFieldNotFound(yyj2011-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -25132,38 +26458,38 @@ func (x *LoadBalancerStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1920 := z.EncBinary() - _ = yym1920 + yym2013 := z.EncBinary() + _ = yym2013 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1921 := !z.EncBinary() - yy2arr1921 := z.EncBasicHandle().StructToArray - var yyq1921 [1]bool - _, _, _ = yysep1921, yyq1921, yy2arr1921 - const yyr1921 bool = false - yyq1921[0] = len(x.Ingress) != 0 - var yynn1921 int - if yyr1921 || yy2arr1921 { + yysep2014 := !z.EncBinary() + yy2arr2014 := z.EncBasicHandle().StructToArray + var yyq2014 [1]bool + _, _, _ = yysep2014, yyq2014, yy2arr2014 + const yyr2014 bool = false + yyq2014[0] = len(x.Ingress) != 0 + var yynn2014 int + if yyr2014 || yy2arr2014 { r.EncodeArrayStart(1) } else { - yynn1921 = 0 - for _, b := range yyq1921 { + yynn2014 = 0 + for _, b := range yyq2014 { if b { - yynn1921++ + yynn2014++ } } - r.EncodeMapStart(yynn1921) - yynn1921 = 0 + r.EncodeMapStart(yynn2014) + yynn2014 = 0 } - if yyr1921 || yy2arr1921 { + if yyr2014 || yy2arr2014 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1921[0] { + if yyq2014[0] { if x.Ingress == nil { r.EncodeNil() } else { - yym1923 := z.EncBinary() - _ = yym1923 + yym2016 := z.EncBinary() + _ = yym2016 if false { } else { h.encSliceLoadBalancerIngress(([]LoadBalancerIngress)(x.Ingress), e) @@ -25173,15 +26499,15 @@ func (x *LoadBalancerStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1921[0] { + if yyq2014[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("ingress")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Ingress == nil { r.EncodeNil() } else { - yym1924 := z.EncBinary() - _ = yym1924 + yym2017 := z.EncBinary() + _ = yym2017 if false { } else { h.encSliceLoadBalancerIngress(([]LoadBalancerIngress)(x.Ingress), e) @@ -25189,7 +26515,7 @@ func (x *LoadBalancerStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1921 || yy2arr1921 { + if yyr2014 || yy2arr2014 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -25202,25 +26528,25 @@ func (x *LoadBalancerStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1925 := z.DecBinary() - _ = yym1925 + yym2018 := z.DecBinary() + _ = yym2018 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1926 := r.ContainerType() - if yyct1926 == codecSelferValueTypeMap1234 { - yyl1926 := r.ReadMapStart() - if yyl1926 == 0 { + yyct2019 := r.ContainerType() + if yyct2019 == codecSelferValueTypeMap1234 { + yyl2019 := r.ReadMapStart() + if yyl2019 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1926, d) + x.codecDecodeSelfFromMap(yyl2019, d) } - } else if yyct1926 == codecSelferValueTypeArray1234 { - yyl1926 := r.ReadArrayStart() - if yyl1926 == 0 { + } else if yyct2019 == codecSelferValueTypeArray1234 { + yyl2019 := r.ReadArrayStart() + if yyl2019 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1926, d) + x.codecDecodeSelfFromArray(yyl2019, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -25232,12 +26558,12 @@ func (x *LoadBalancerStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1927Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1927Slc - var yyhl1927 bool = l >= 0 - for yyj1927 := 0; ; yyj1927++ { - if yyhl1927 { - if yyj1927 >= l { + var yys2020Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2020Slc + var yyhl2020 bool = l >= 0 + for yyj2020 := 0; ; yyj2020++ { + if yyhl2020 { + if yyj2020 >= l { break } } else { @@ -25246,26 +26572,26 @@ func (x *LoadBalancerStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1927Slc = r.DecodeBytes(yys1927Slc, true, true) - yys1927 := string(yys1927Slc) + yys2020Slc = r.DecodeBytes(yys2020Slc, true, true) + yys2020 := string(yys2020Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1927 { + switch yys2020 { case "ingress": if r.TryDecodeAsNil() { x.Ingress = nil } else { - yyv1928 := &x.Ingress - yym1929 := z.DecBinary() - _ = yym1929 + yyv2021 := &x.Ingress + yym2022 := z.DecBinary() + _ = yym2022 if false { } else { - h.decSliceLoadBalancerIngress((*[]LoadBalancerIngress)(yyv1928), d) + h.decSliceLoadBalancerIngress((*[]LoadBalancerIngress)(yyv2021), d) } } default: - z.DecStructFieldNotFound(-1, yys1927) - } // end switch yys1927 - } // end for yyj1927 + z.DecStructFieldNotFound(-1, yys2020) + } // end switch yys2020 + } // end for yyj2020 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -25273,16 +26599,16 @@ func (x *LoadBalancerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1930 int - var yyb1930 bool - var yyhl1930 bool = l >= 0 - yyj1930++ - if yyhl1930 { - yyb1930 = yyj1930 > l + var yyj2023 int + var yyb2023 bool + var yyhl2023 bool = l >= 0 + yyj2023++ + if yyhl2023 { + yyb2023 = yyj2023 > l } else { - yyb1930 = r.CheckBreak() + yyb2023 = r.CheckBreak() } - if yyb1930 { + if yyb2023 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -25290,26 +26616,26 @@ func (x *LoadBalancerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Ingress = nil } else { - yyv1931 := &x.Ingress - yym1932 := z.DecBinary() - _ = yym1932 + yyv2024 := &x.Ingress + yym2025 := z.DecBinary() + _ = yym2025 if false { } else { - h.decSliceLoadBalancerIngress((*[]LoadBalancerIngress)(yyv1931), d) + h.decSliceLoadBalancerIngress((*[]LoadBalancerIngress)(yyv2024), d) } } for { - yyj1930++ - if yyhl1930 { - yyb1930 = yyj1930 > l + yyj2023++ + if yyhl2023 { + yyb2023 = yyj2023 > l } else { - yyb1930 = r.CheckBreak() + yyb2023 = r.CheckBreak() } - if yyb1930 { + if yyb2023 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1930-1, "") + z.DecStructFieldNotFound(yyj2023-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -25321,36 +26647,36 @@ func (x *LoadBalancerIngress) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1933 := z.EncBinary() - _ = yym1933 + yym2026 := z.EncBinary() + _ = yym2026 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1934 := !z.EncBinary() - yy2arr1934 := z.EncBasicHandle().StructToArray - var yyq1934 [2]bool - _, _, _ = yysep1934, yyq1934, yy2arr1934 - const yyr1934 bool = false - yyq1934[0] = x.IP != "" - yyq1934[1] = x.Hostname != "" - var yynn1934 int - if yyr1934 || yy2arr1934 { + yysep2027 := !z.EncBinary() + yy2arr2027 := z.EncBasicHandle().StructToArray + var yyq2027 [2]bool + _, _, _ = yysep2027, yyq2027, yy2arr2027 + const yyr2027 bool = false + yyq2027[0] = x.IP != "" + yyq2027[1] = x.Hostname != "" + var yynn2027 int + if yyr2027 || yy2arr2027 { r.EncodeArrayStart(2) } else { - yynn1934 = 0 - for _, b := range yyq1934 { + yynn2027 = 0 + for _, b := range yyq2027 { if b { - yynn1934++ + yynn2027++ } } - r.EncodeMapStart(yynn1934) - yynn1934 = 0 + r.EncodeMapStart(yynn2027) + yynn2027 = 0 } - if yyr1934 || yy2arr1934 { + if yyr2027 || yy2arr2027 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1934[0] { - yym1936 := z.EncBinary() - _ = yym1936 + if yyq2027[0] { + yym2029 := z.EncBinary() + _ = yym2029 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.IP)) @@ -25359,23 +26685,23 @@ func (x *LoadBalancerIngress) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1934[0] { + if yyq2027[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("ip")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1937 := z.EncBinary() - _ = yym1937 + yym2030 := z.EncBinary() + _ = yym2030 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.IP)) } } } - if yyr1934 || yy2arr1934 { + if yyr2027 || yy2arr2027 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1934[1] { - yym1939 := z.EncBinary() - _ = yym1939 + if yyq2027[1] { + yym2032 := z.EncBinary() + _ = yym2032 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Hostname)) @@ -25384,19 +26710,19 @@ func (x *LoadBalancerIngress) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1934[1] { + if yyq2027[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hostname")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1940 := z.EncBinary() - _ = yym1940 + yym2033 := z.EncBinary() + _ = yym2033 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Hostname)) } } } - if yyr1934 || yy2arr1934 { + if yyr2027 || yy2arr2027 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -25409,25 +26735,25 @@ func (x *LoadBalancerIngress) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1941 := z.DecBinary() - _ = yym1941 + yym2034 := z.DecBinary() + _ = yym2034 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1942 := r.ContainerType() - if yyct1942 == codecSelferValueTypeMap1234 { - yyl1942 := r.ReadMapStart() - if yyl1942 == 0 { + yyct2035 := r.ContainerType() + if yyct2035 == codecSelferValueTypeMap1234 { + yyl2035 := r.ReadMapStart() + if yyl2035 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1942, d) + x.codecDecodeSelfFromMap(yyl2035, d) } - } else if yyct1942 == codecSelferValueTypeArray1234 { - yyl1942 := r.ReadArrayStart() - if yyl1942 == 0 { + } else if yyct2035 == codecSelferValueTypeArray1234 { + yyl2035 := r.ReadArrayStart() + if yyl2035 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1942, d) + x.codecDecodeSelfFromArray(yyl2035, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -25439,12 +26765,12 @@ func (x *LoadBalancerIngress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1943Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1943Slc - var yyhl1943 bool = l >= 0 - for yyj1943 := 0; ; yyj1943++ { - if yyhl1943 { - if yyj1943 >= l { + var yys2036Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2036Slc + var yyhl2036 bool = l >= 0 + for yyj2036 := 0; ; yyj2036++ { + if yyhl2036 { + if yyj2036 >= l { break } } else { @@ -25453,10 +26779,10 @@ func (x *LoadBalancerIngress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1943Slc = r.DecodeBytes(yys1943Slc, true, true) - yys1943 := string(yys1943Slc) + yys2036Slc = r.DecodeBytes(yys2036Slc, true, true) + yys2036 := string(yys2036Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1943 { + switch yys2036 { case "ip": if r.TryDecodeAsNil() { x.IP = "" @@ -25470,9 +26796,9 @@ func (x *LoadBalancerIngress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder x.Hostname = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys1943) - } // end switch yys1943 - } // end for yyj1943 + z.DecStructFieldNotFound(-1, yys2036) + } // end switch yys2036 + } // end for yyj2036 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -25480,16 +26806,16 @@ func (x *LoadBalancerIngress) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1946 int - var yyb1946 bool - var yyhl1946 bool = l >= 0 - yyj1946++ - if yyhl1946 { - yyb1946 = yyj1946 > l + var yyj2039 int + var yyb2039 bool + var yyhl2039 bool = l >= 0 + yyj2039++ + if yyhl2039 { + yyb2039 = yyj2039 > l } else { - yyb1946 = r.CheckBreak() + yyb2039 = r.CheckBreak() } - if yyb1946 { + if yyb2039 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -25499,13 +26825,13 @@ func (x *LoadBalancerIngress) codecDecodeSelfFromArray(l int, d *codec1978.Decod } else { x.IP = string(r.DecodeString()) } - yyj1946++ - if yyhl1946 { - yyb1946 = yyj1946 > l + yyj2039++ + if yyhl2039 { + yyb2039 = yyj2039 > l } else { - yyb1946 = r.CheckBreak() + yyb2039 = r.CheckBreak() } - if yyb1946 { + if yyb2039 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -25516,17 +26842,17 @@ func (x *LoadBalancerIngress) codecDecodeSelfFromArray(l int, d *codec1978.Decod x.Hostname = string(r.DecodeString()) } for { - yyj1946++ - if yyhl1946 { - yyb1946 = yyj1946 > l + yyj2039++ + if yyhl2039 { + yyb2039 = yyj2039 > l } else { - yyb1946 = r.CheckBreak() + yyb2039 = r.CheckBreak() } - if yyb1946 { + if yyb2039 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1946-1, "") + z.DecStructFieldNotFound(yyj2039-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -25538,43 +26864,43 @@ func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1949 := z.EncBinary() - _ = yym1949 + yym2042 := z.EncBinary() + _ = yym2042 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1950 := !z.EncBinary() - yy2arr1950 := z.EncBasicHandle().StructToArray - var yyq1950 [8]bool - _, _, _ = yysep1950, yyq1950, yy2arr1950 - const yyr1950 bool = false - yyq1950[1] = len(x.Selector) != 0 - yyq1950[2] = x.ClusterIP != "" - yyq1950[3] = x.Type != "" - yyq1950[4] = len(x.ExternalIPs) != 0 - yyq1950[5] = len(x.DeprecatedPublicIPs) != 0 - yyq1950[6] = x.SessionAffinity != "" - yyq1950[7] = x.LoadBalancerIP != "" - var yynn1950 int - if yyr1950 || yy2arr1950 { + yysep2043 := !z.EncBinary() + yy2arr2043 := z.EncBasicHandle().StructToArray + var yyq2043 [8]bool + _, _, _ = yysep2043, yyq2043, yy2arr2043 + const yyr2043 bool = false + yyq2043[1] = len(x.Selector) != 0 + yyq2043[2] = x.ClusterIP != "" + yyq2043[3] = x.Type != "" + yyq2043[4] = len(x.ExternalIPs) != 0 + yyq2043[5] = len(x.DeprecatedPublicIPs) != 0 + yyq2043[6] = x.SessionAffinity != "" + yyq2043[7] = x.LoadBalancerIP != "" + var yynn2043 int + if yyr2043 || yy2arr2043 { r.EncodeArrayStart(8) } else { - yynn1950 = 1 - for _, b := range yyq1950 { + yynn2043 = 1 + for _, b := range yyq2043 { if b { - yynn1950++ + yynn2043++ } } - r.EncodeMapStart(yynn1950) - yynn1950 = 0 + r.EncodeMapStart(yynn2043) + yynn2043 = 0 } - if yyr1950 || yy2arr1950 { + if yyr2043 || yy2arr2043 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Ports == nil { r.EncodeNil() } else { - yym1952 := z.EncBinary() - _ = yym1952 + yym2045 := z.EncBinary() + _ = yym2045 if false { } else { h.encSliceServicePort(([]ServicePort)(x.Ports), e) @@ -25587,22 +26913,22 @@ func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x.Ports == nil { r.EncodeNil() } else { - yym1953 := z.EncBinary() - _ = yym1953 + yym2046 := z.EncBinary() + _ = yym2046 if false { } else { h.encSliceServicePort(([]ServicePort)(x.Ports), e) } } } - if yyr1950 || yy2arr1950 { + if yyr2043 || yy2arr2043 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1950[1] { + if yyq2043[1] { if x.Selector == nil { r.EncodeNil() } else { - yym1955 := z.EncBinary() - _ = yym1955 + yym2048 := z.EncBinary() + _ = yym2048 if false { } else { z.F.EncMapStringStringV(x.Selector, false, e) @@ -25612,15 +26938,15 @@ func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1950[1] { + if yyq2043[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("selector")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Selector == nil { r.EncodeNil() } else { - yym1956 := z.EncBinary() - _ = yym1956 + yym2049 := z.EncBinary() + _ = yym2049 if false { } else { z.F.EncMapStringStringV(x.Selector, false, e) @@ -25628,11 +26954,11 @@ func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1950 || yy2arr1950 { + if yyr2043 || yy2arr2043 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1950[2] { - yym1958 := z.EncBinary() - _ = yym1958 + if yyq2043[2] { + yym2051 := z.EncBinary() + _ = yym2051 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ClusterIP)) @@ -25641,41 +26967,41 @@ func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1950[2] { + if yyq2043[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("clusterIP")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1959 := z.EncBinary() - _ = yym1959 + yym2052 := z.EncBinary() + _ = yym2052 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ClusterIP)) } } } - if yyr1950 || yy2arr1950 { + if yyr2043 || yy2arr2043 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1950[3] { + if yyq2043[3] { x.Type.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1950[3] { + if yyq2043[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("type")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } } - if yyr1950 || yy2arr1950 { + if yyr2043 || yy2arr2043 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1950[4] { + if yyq2043[4] { if x.ExternalIPs == nil { r.EncodeNil() } else { - yym1962 := z.EncBinary() - _ = yym1962 + yym2055 := z.EncBinary() + _ = yym2055 if false { } else { z.F.EncSliceStringV(x.ExternalIPs, false, e) @@ -25685,15 +27011,15 @@ func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1950[4] { + if yyq2043[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("externalIPs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.ExternalIPs == nil { r.EncodeNil() } else { - yym1963 := z.EncBinary() - _ = yym1963 + yym2056 := z.EncBinary() + _ = yym2056 if false { } else { z.F.EncSliceStringV(x.ExternalIPs, false, e) @@ -25701,14 +27027,14 @@ func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1950 || yy2arr1950 { + if yyr2043 || yy2arr2043 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1950[5] { + if yyq2043[5] { if x.DeprecatedPublicIPs == nil { r.EncodeNil() } else { - yym1965 := z.EncBinary() - _ = yym1965 + yym2058 := z.EncBinary() + _ = yym2058 if false { } else { z.F.EncSliceStringV(x.DeprecatedPublicIPs, false, e) @@ -25718,15 +27044,15 @@ func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1950[5] { + if yyq2043[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("deprecatedPublicIPs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.DeprecatedPublicIPs == nil { r.EncodeNil() } else { - yym1966 := z.EncBinary() - _ = yym1966 + yym2059 := z.EncBinary() + _ = yym2059 if false { } else { z.F.EncSliceStringV(x.DeprecatedPublicIPs, false, e) @@ -25734,26 +27060,26 @@ func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1950 || yy2arr1950 { + if yyr2043 || yy2arr2043 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1950[6] { + if yyq2043[6] { x.SessionAffinity.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1950[6] { + if yyq2043[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("sessionAffinity")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.SessionAffinity.CodecEncodeSelf(e) } } - if yyr1950 || yy2arr1950 { + if yyr2043 || yy2arr2043 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1950[7] { - yym1969 := z.EncBinary() - _ = yym1969 + if yyq2043[7] { + yym2062 := z.EncBinary() + _ = yym2062 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.LoadBalancerIP)) @@ -25762,19 +27088,19 @@ func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1950[7] { + if yyq2043[7] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("loadBalancerIP")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1970 := z.EncBinary() - _ = yym1970 + yym2063 := z.EncBinary() + _ = yym2063 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.LoadBalancerIP)) } } } - if yyr1950 || yy2arr1950 { + if yyr2043 || yy2arr2043 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -25787,25 +27113,25 @@ func (x *ServiceSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1971 := z.DecBinary() - _ = yym1971 + yym2064 := z.DecBinary() + _ = yym2064 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1972 := r.ContainerType() - if yyct1972 == codecSelferValueTypeMap1234 { - yyl1972 := r.ReadMapStart() - if yyl1972 == 0 { + yyct2065 := r.ContainerType() + if yyct2065 == codecSelferValueTypeMap1234 { + yyl2065 := r.ReadMapStart() + if yyl2065 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1972, d) + x.codecDecodeSelfFromMap(yyl2065, d) } - } else if yyct1972 == codecSelferValueTypeArray1234 { - yyl1972 := r.ReadArrayStart() - if yyl1972 == 0 { + } else if yyct2065 == codecSelferValueTypeArray1234 { + yyl2065 := r.ReadArrayStart() + if yyl2065 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1972, d) + x.codecDecodeSelfFromArray(yyl2065, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -25817,12 +27143,12 @@ func (x *ServiceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1973Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1973Slc - var yyhl1973 bool = l >= 0 - for yyj1973 := 0; ; yyj1973++ { - if yyhl1973 { - if yyj1973 >= l { + var yys2066Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2066Slc + var yyhl2066 bool = l >= 0 + for yyj2066 := 0; ; yyj2066++ { + if yyhl2066 { + if yyj2066 >= l { break } } else { @@ -25831,32 +27157,32 @@ func (x *ServiceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1973Slc = r.DecodeBytes(yys1973Slc, true, true) - yys1973 := string(yys1973Slc) + yys2066Slc = r.DecodeBytes(yys2066Slc, true, true) + yys2066 := string(yys2066Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1973 { + switch yys2066 { case "ports": if r.TryDecodeAsNil() { x.Ports = nil } else { - yyv1974 := &x.Ports - yym1975 := z.DecBinary() - _ = yym1975 + yyv2067 := &x.Ports + yym2068 := z.DecBinary() + _ = yym2068 if false { } else { - h.decSliceServicePort((*[]ServicePort)(yyv1974), d) + h.decSliceServicePort((*[]ServicePort)(yyv2067), d) } } case "selector": if r.TryDecodeAsNil() { x.Selector = nil } else { - yyv1976 := &x.Selector - yym1977 := z.DecBinary() - _ = yym1977 + yyv2069 := &x.Selector + yym2070 := z.DecBinary() + _ = yym2070 if false { } else { - z.F.DecMapStringStringX(yyv1976, false, d) + z.F.DecMapStringStringX(yyv2069, false, d) } } case "clusterIP": @@ -25875,24 +27201,24 @@ func (x *ServiceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ExternalIPs = nil } else { - yyv1980 := &x.ExternalIPs - yym1981 := z.DecBinary() - _ = yym1981 + yyv2073 := &x.ExternalIPs + yym2074 := z.DecBinary() + _ = yym2074 if false { } else { - z.F.DecSliceStringX(yyv1980, false, d) + z.F.DecSliceStringX(yyv2073, false, d) } } case "deprecatedPublicIPs": if r.TryDecodeAsNil() { x.DeprecatedPublicIPs = nil } else { - yyv1982 := &x.DeprecatedPublicIPs - yym1983 := z.DecBinary() - _ = yym1983 + yyv2075 := &x.DeprecatedPublicIPs + yym2076 := z.DecBinary() + _ = yym2076 if false { } else { - z.F.DecSliceStringX(yyv1982, false, d) + z.F.DecSliceStringX(yyv2075, false, d) } } case "sessionAffinity": @@ -25908,9 +27234,9 @@ func (x *ServiceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.LoadBalancerIP = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys1973) - } // end switch yys1973 - } // end for yyj1973 + z.DecStructFieldNotFound(-1, yys2066) + } // end switch yys2066 + } // end for yyj2066 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -25918,16 +27244,16 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1986 int - var yyb1986 bool - var yyhl1986 bool = l >= 0 - yyj1986++ - if yyhl1986 { - yyb1986 = yyj1986 > l + var yyj2079 int + var yyb2079 bool + var yyhl2079 bool = l >= 0 + yyj2079++ + if yyhl2079 { + yyb2079 = yyj2079 > l } else { - yyb1986 = r.CheckBreak() + yyb2079 = r.CheckBreak() } - if yyb1986 { + if yyb2079 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -25935,21 +27261,21 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Ports = nil } else { - yyv1987 := &x.Ports - yym1988 := z.DecBinary() - _ = yym1988 + yyv2080 := &x.Ports + yym2081 := z.DecBinary() + _ = yym2081 if false { } else { - h.decSliceServicePort((*[]ServicePort)(yyv1987), d) + h.decSliceServicePort((*[]ServicePort)(yyv2080), d) } } - yyj1986++ - if yyhl1986 { - yyb1986 = yyj1986 > l + yyj2079++ + if yyhl2079 { + yyb2079 = yyj2079 > l } else { - yyb1986 = r.CheckBreak() + yyb2079 = r.CheckBreak() } - if yyb1986 { + if yyb2079 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -25957,21 +27283,21 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Selector = nil } else { - yyv1989 := &x.Selector - yym1990 := z.DecBinary() - _ = yym1990 + yyv2082 := &x.Selector + yym2083 := z.DecBinary() + _ = yym2083 if false { } else { - z.F.DecMapStringStringX(yyv1989, false, d) + z.F.DecMapStringStringX(yyv2082, false, d) } } - yyj1986++ - if yyhl1986 { - yyb1986 = yyj1986 > l + yyj2079++ + if yyhl2079 { + yyb2079 = yyj2079 > l } else { - yyb1986 = r.CheckBreak() + yyb2079 = r.CheckBreak() } - if yyb1986 { + if yyb2079 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -25981,13 +27307,13 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.ClusterIP = string(r.DecodeString()) } - yyj1986++ - if yyhl1986 { - yyb1986 = yyj1986 > l + yyj2079++ + if yyhl2079 { + yyb2079 = yyj2079 > l } else { - yyb1986 = r.CheckBreak() + yyb2079 = r.CheckBreak() } - if yyb1986 { + if yyb2079 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -25997,13 +27323,13 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Type = ServiceType(r.DecodeString()) } - yyj1986++ - if yyhl1986 { - yyb1986 = yyj1986 > l + yyj2079++ + if yyhl2079 { + yyb2079 = yyj2079 > l } else { - yyb1986 = r.CheckBreak() + yyb2079 = r.CheckBreak() } - if yyb1986 { + if yyb2079 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26011,21 +27337,21 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ExternalIPs = nil } else { - yyv1993 := &x.ExternalIPs - yym1994 := z.DecBinary() - _ = yym1994 + yyv2086 := &x.ExternalIPs + yym2087 := z.DecBinary() + _ = yym2087 if false { } else { - z.F.DecSliceStringX(yyv1993, false, d) + z.F.DecSliceStringX(yyv2086, false, d) } } - yyj1986++ - if yyhl1986 { - yyb1986 = yyj1986 > l + yyj2079++ + if yyhl2079 { + yyb2079 = yyj2079 > l } else { - yyb1986 = r.CheckBreak() + yyb2079 = r.CheckBreak() } - if yyb1986 { + if yyb2079 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26033,21 +27359,21 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.DeprecatedPublicIPs = nil } else { - yyv1995 := &x.DeprecatedPublicIPs - yym1996 := z.DecBinary() - _ = yym1996 + yyv2088 := &x.DeprecatedPublicIPs + yym2089 := z.DecBinary() + _ = yym2089 if false { } else { - z.F.DecSliceStringX(yyv1995, false, d) + z.F.DecSliceStringX(yyv2088, false, d) } } - yyj1986++ - if yyhl1986 { - yyb1986 = yyj1986 > l + yyj2079++ + if yyhl2079 { + yyb2079 = yyj2079 > l } else { - yyb1986 = r.CheckBreak() + yyb2079 = r.CheckBreak() } - if yyb1986 { + if yyb2079 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26057,13 +27383,13 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.SessionAffinity = ServiceAffinity(r.DecodeString()) } - yyj1986++ - if yyhl1986 { - yyb1986 = yyj1986 > l + yyj2079++ + if yyhl2079 { + yyb2079 = yyj2079 > l } else { - yyb1986 = r.CheckBreak() + yyb2079 = r.CheckBreak() } - if yyb1986 { + if yyb2079 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26074,17 +27400,17 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.LoadBalancerIP = string(r.DecodeString()) } for { - yyj1986++ - if yyhl1986 { - yyb1986 = yyj1986 > l + yyj2079++ + if yyhl2079 { + yyb2079 = yyj2079 > l } else { - yyb1986 = r.CheckBreak() + yyb2079 = r.CheckBreak() } - if yyb1986 { + if yyb2079 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1986-1, "") + z.DecStructFieldNotFound(yyj2079-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -26096,38 +27422,38 @@ func (x *ServicePort) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1999 := z.EncBinary() - _ = yym1999 + yym2092 := z.EncBinary() + _ = yym2092 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2000 := !z.EncBinary() - yy2arr2000 := z.EncBasicHandle().StructToArray - var yyq2000 [5]bool - _, _, _ = yysep2000, yyq2000, yy2arr2000 - const yyr2000 bool = false - yyq2000[0] = x.Name != "" - yyq2000[1] = x.Protocol != "" - yyq2000[3] = true - yyq2000[4] = x.NodePort != 0 - var yynn2000 int - if yyr2000 || yy2arr2000 { + yysep2093 := !z.EncBinary() + yy2arr2093 := z.EncBasicHandle().StructToArray + var yyq2093 [5]bool + _, _, _ = yysep2093, yyq2093, yy2arr2093 + const yyr2093 bool = false + yyq2093[0] = x.Name != "" + yyq2093[1] = x.Protocol != "" + yyq2093[3] = true + yyq2093[4] = x.NodePort != 0 + var yynn2093 int + if yyr2093 || yy2arr2093 { r.EncodeArrayStart(5) } else { - yynn2000 = 1 - for _, b := range yyq2000 { + yynn2093 = 1 + for _, b := range yyq2093 { if b { - yynn2000++ + yynn2093++ } } - r.EncodeMapStart(yynn2000) - yynn2000 = 0 + r.EncodeMapStart(yynn2093) + yynn2093 = 0 } - if yyr2000 || yy2arr2000 { + if yyr2093 || yy2arr2093 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2000[0] { - yym2002 := z.EncBinary() - _ = yym2002 + if yyq2093[0] { + yym2095 := z.EncBinary() + _ = yym2095 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -26136,37 +27462,37 @@ func (x *ServicePort) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2000[0] { + if yyq2093[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2003 := z.EncBinary() - _ = yym2003 + yym2096 := z.EncBinary() + _ = yym2096 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } } - if yyr2000 || yy2arr2000 { + if yyr2093 || yy2arr2093 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2000[1] { + if yyq2093[1] { x.Protocol.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2000[1] { + if yyq2093[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("protocol")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Protocol.CodecEncodeSelf(e) } } - if yyr2000 || yy2arr2000 { + if yyr2093 || yy2arr2093 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2006 := z.EncBinary() - _ = yym2006 + yym2099 := z.EncBinary() + _ = yym2099 if false { } else { r.EncodeInt(int64(x.Port)) @@ -26175,51 +27501,51 @@ func (x *ServicePort) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("port")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2007 := z.EncBinary() - _ = yym2007 + yym2100 := z.EncBinary() + _ = yym2100 if false { } else { r.EncodeInt(int64(x.Port)) } } - if yyr2000 || yy2arr2000 { + if yyr2093 || yy2arr2093 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2000[3] { - yy2009 := &x.TargetPort - yym2010 := z.EncBinary() - _ = yym2010 + if yyq2093[3] { + yy2102 := &x.TargetPort + yym2103 := z.EncBinary() + _ = yym2103 if false { - } else if z.HasExtensions() && z.EncExt(yy2009) { - } else if !yym2010 && z.IsJSONHandle() { - z.EncJSONMarshal(yy2009) + } else if z.HasExtensions() && z.EncExt(yy2102) { + } else if !yym2103 && z.IsJSONHandle() { + z.EncJSONMarshal(yy2102) } else { - z.EncFallback(yy2009) + z.EncFallback(yy2102) } } else { r.EncodeNil() } } else { - if yyq2000[3] { + if yyq2093[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("targetPort")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2011 := &x.TargetPort - yym2012 := z.EncBinary() - _ = yym2012 + yy2104 := &x.TargetPort + yym2105 := z.EncBinary() + _ = yym2105 if false { - } else if z.HasExtensions() && z.EncExt(yy2011) { - } else if !yym2012 && z.IsJSONHandle() { - z.EncJSONMarshal(yy2011) + } else if z.HasExtensions() && z.EncExt(yy2104) { + } else if !yym2105 && z.IsJSONHandle() { + z.EncJSONMarshal(yy2104) } else { - z.EncFallback(yy2011) + z.EncFallback(yy2104) } } } - if yyr2000 || yy2arr2000 { + if yyr2093 || yy2arr2093 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2000[4] { - yym2014 := z.EncBinary() - _ = yym2014 + if yyq2093[4] { + yym2107 := z.EncBinary() + _ = yym2107 if false { } else { r.EncodeInt(int64(x.NodePort)) @@ -26228,19 +27554,19 @@ func (x *ServicePort) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq2000[4] { + if yyq2093[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nodePort")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2015 := z.EncBinary() - _ = yym2015 + yym2108 := z.EncBinary() + _ = yym2108 if false { } else { r.EncodeInt(int64(x.NodePort)) } } } - if yyr2000 || yy2arr2000 { + if yyr2093 || yy2arr2093 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -26253,25 +27579,25 @@ func (x *ServicePort) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2016 := z.DecBinary() - _ = yym2016 + yym2109 := z.DecBinary() + _ = yym2109 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2017 := r.ContainerType() - if yyct2017 == codecSelferValueTypeMap1234 { - yyl2017 := r.ReadMapStart() - if yyl2017 == 0 { + yyct2110 := r.ContainerType() + if yyct2110 == codecSelferValueTypeMap1234 { + yyl2110 := r.ReadMapStart() + if yyl2110 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2017, d) + x.codecDecodeSelfFromMap(yyl2110, d) } - } else if yyct2017 == codecSelferValueTypeArray1234 { - yyl2017 := r.ReadArrayStart() - if yyl2017 == 0 { + } else if yyct2110 == codecSelferValueTypeArray1234 { + yyl2110 := r.ReadArrayStart() + if yyl2110 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2017, d) + x.codecDecodeSelfFromArray(yyl2110, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -26283,12 +27609,12 @@ func (x *ServicePort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2018Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2018Slc - var yyhl2018 bool = l >= 0 - for yyj2018 := 0; ; yyj2018++ { - if yyhl2018 { - if yyj2018 >= l { + var yys2111Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2111Slc + var yyhl2111 bool = l >= 0 + for yyj2111 := 0; ; yyj2111++ { + if yyhl2111 { + if yyj2111 >= l { break } } else { @@ -26297,10 +27623,10 @@ func (x *ServicePort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2018Slc = r.DecodeBytes(yys2018Slc, true, true) - yys2018 := string(yys2018Slc) + yys2111Slc = r.DecodeBytes(yys2111Slc, true, true) + yys2111 := string(yys2111Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2018 { + switch yys2111 { case "name": if r.TryDecodeAsNil() { x.Name = "" @@ -26323,15 +27649,15 @@ func (x *ServicePort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.TargetPort = pkg5_intstr.IntOrString{} } else { - yyv2022 := &x.TargetPort - yym2023 := z.DecBinary() - _ = yym2023 + yyv2115 := &x.TargetPort + yym2116 := z.DecBinary() + _ = yym2116 if false { - } else if z.HasExtensions() && z.DecExt(yyv2022) { - } else if !yym2023 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv2022) + } else if z.HasExtensions() && z.DecExt(yyv2115) { + } else if !yym2116 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv2115) } else { - z.DecFallback(yyv2022, false) + z.DecFallback(yyv2115, false) } } case "nodePort": @@ -26341,9 +27667,9 @@ func (x *ServicePort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.NodePort = int32(r.DecodeInt(32)) } default: - z.DecStructFieldNotFound(-1, yys2018) - } // end switch yys2018 - } // end for yyj2018 + z.DecStructFieldNotFound(-1, yys2111) + } // end switch yys2111 + } // end for yyj2111 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -26351,16 +27677,16 @@ func (x *ServicePort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2025 int - var yyb2025 bool - var yyhl2025 bool = l >= 0 - yyj2025++ - if yyhl2025 { - yyb2025 = yyj2025 > l + var yyj2118 int + var yyb2118 bool + var yyhl2118 bool = l >= 0 + yyj2118++ + if yyhl2118 { + yyb2118 = yyj2118 > l } else { - yyb2025 = r.CheckBreak() + yyb2118 = r.CheckBreak() } - if yyb2025 { + if yyb2118 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26370,13 +27696,13 @@ func (x *ServicePort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Name = string(r.DecodeString()) } - yyj2025++ - if yyhl2025 { - yyb2025 = yyj2025 > l + yyj2118++ + if yyhl2118 { + yyb2118 = yyj2118 > l } else { - yyb2025 = r.CheckBreak() + yyb2118 = r.CheckBreak() } - if yyb2025 { + if yyb2118 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26386,13 +27712,13 @@ func (x *ServicePort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Protocol = Protocol(r.DecodeString()) } - yyj2025++ - if yyhl2025 { - yyb2025 = yyj2025 > l + yyj2118++ + if yyhl2118 { + yyb2118 = yyj2118 > l } else { - yyb2025 = r.CheckBreak() + yyb2118 = r.CheckBreak() } - if yyb2025 { + if yyb2118 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26402,13 +27728,13 @@ func (x *ServicePort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Port = int32(r.DecodeInt(32)) } - yyj2025++ - if yyhl2025 { - yyb2025 = yyj2025 > l + yyj2118++ + if yyhl2118 { + yyb2118 = yyj2118 > l } else { - yyb2025 = r.CheckBreak() + yyb2118 = r.CheckBreak() } - if yyb2025 { + if yyb2118 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26416,24 +27742,24 @@ func (x *ServicePort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.TargetPort = pkg5_intstr.IntOrString{} } else { - yyv2029 := &x.TargetPort - yym2030 := z.DecBinary() - _ = yym2030 + yyv2122 := &x.TargetPort + yym2123 := z.DecBinary() + _ = yym2123 if false { - } else if z.HasExtensions() && z.DecExt(yyv2029) { - } else if !yym2030 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv2029) + } else if z.HasExtensions() && z.DecExt(yyv2122) { + } else if !yym2123 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv2122) } else { - z.DecFallback(yyv2029, false) + z.DecFallback(yyv2122, false) } } - yyj2025++ - if yyhl2025 { - yyb2025 = yyj2025 > l + yyj2118++ + if yyhl2118 { + yyb2118 = yyj2118 > l } else { - yyb2025 = r.CheckBreak() + yyb2118 = r.CheckBreak() } - if yyb2025 { + if yyb2118 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26444,17 +27770,17 @@ func (x *ServicePort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.NodePort = int32(r.DecodeInt(32)) } for { - yyj2025++ - if yyhl2025 { - yyb2025 = yyj2025 > l + yyj2118++ + if yyhl2118 { + yyb2118 = yyj2118 > l } else { - yyb2025 = r.CheckBreak() + yyb2118 = r.CheckBreak() } - if yyb2025 { + if yyb2118 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2025-1, "") + z.DecStructFieldNotFound(yyj2118-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -26466,39 +27792,39 @@ func (x *Service) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2032 := z.EncBinary() - _ = yym2032 + yym2125 := z.EncBinary() + _ = yym2125 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2033 := !z.EncBinary() - yy2arr2033 := z.EncBasicHandle().StructToArray - var yyq2033 [5]bool - _, _, _ = yysep2033, yyq2033, yy2arr2033 - const yyr2033 bool = false - yyq2033[0] = x.Kind != "" - yyq2033[1] = x.APIVersion != "" - yyq2033[2] = true - yyq2033[3] = true - yyq2033[4] = true - var yynn2033 int - if yyr2033 || yy2arr2033 { + yysep2126 := !z.EncBinary() + yy2arr2126 := z.EncBasicHandle().StructToArray + var yyq2126 [5]bool + _, _, _ = yysep2126, yyq2126, yy2arr2126 + const yyr2126 bool = false + yyq2126[0] = x.Kind != "" + yyq2126[1] = x.APIVersion != "" + yyq2126[2] = true + yyq2126[3] = true + yyq2126[4] = true + var yynn2126 int + if yyr2126 || yy2arr2126 { r.EncodeArrayStart(5) } else { - yynn2033 = 0 - for _, b := range yyq2033 { + yynn2126 = 0 + for _, b := range yyq2126 { if b { - yynn2033++ + yynn2126++ } } - r.EncodeMapStart(yynn2033) - yynn2033 = 0 + r.EncodeMapStart(yynn2126) + yynn2126 = 0 } - if yyr2033 || yy2arr2033 { + if yyr2126 || yy2arr2126 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2033[0] { - yym2035 := z.EncBinary() - _ = yym2035 + if yyq2126[0] { + yym2128 := z.EncBinary() + _ = yym2128 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -26507,23 +27833,23 @@ func (x *Service) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2033[0] { + if yyq2126[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2036 := z.EncBinary() - _ = yym2036 + yym2129 := z.EncBinary() + _ = yym2129 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2033 || yy2arr2033 { + if yyr2126 || yy2arr2126 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2033[1] { - yym2038 := z.EncBinary() - _ = yym2038 + if yyq2126[1] { + yym2131 := z.EncBinary() + _ = yym2131 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -26532,70 +27858,70 @@ func (x *Service) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2033[1] { + if yyq2126[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2039 := z.EncBinary() - _ = yym2039 + yym2132 := z.EncBinary() + _ = yym2132 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2033 || yy2arr2033 { + if yyr2126 || yy2arr2126 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2033[2] { - yy2041 := &x.ObjectMeta - yy2041.CodecEncodeSelf(e) + if yyq2126[2] { + yy2134 := &x.ObjectMeta + yy2134.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2033[2] { + if yyq2126[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2042 := &x.ObjectMeta - yy2042.CodecEncodeSelf(e) + yy2135 := &x.ObjectMeta + yy2135.CodecEncodeSelf(e) } } - if yyr2033 || yy2arr2033 { + if yyr2126 || yy2arr2126 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2033[3] { - yy2044 := &x.Spec - yy2044.CodecEncodeSelf(e) + if yyq2126[3] { + yy2137 := &x.Spec + yy2137.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2033[3] { + if yyq2126[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2045 := &x.Spec - yy2045.CodecEncodeSelf(e) + yy2138 := &x.Spec + yy2138.CodecEncodeSelf(e) } } - if yyr2033 || yy2arr2033 { + if yyr2126 || yy2arr2126 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2033[4] { - yy2047 := &x.Status - yy2047.CodecEncodeSelf(e) + if yyq2126[4] { + yy2140 := &x.Status + yy2140.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2033[4] { + if yyq2126[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2048 := &x.Status - yy2048.CodecEncodeSelf(e) + yy2141 := &x.Status + yy2141.CodecEncodeSelf(e) } } - if yyr2033 || yy2arr2033 { + if yyr2126 || yy2arr2126 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -26608,25 +27934,25 @@ func (x *Service) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2049 := z.DecBinary() - _ = yym2049 + yym2142 := z.DecBinary() + _ = yym2142 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2050 := r.ContainerType() - if yyct2050 == codecSelferValueTypeMap1234 { - yyl2050 := r.ReadMapStart() - if yyl2050 == 0 { + yyct2143 := r.ContainerType() + if yyct2143 == codecSelferValueTypeMap1234 { + yyl2143 := r.ReadMapStart() + if yyl2143 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2050, d) + x.codecDecodeSelfFromMap(yyl2143, d) } - } else if yyct2050 == codecSelferValueTypeArray1234 { - yyl2050 := r.ReadArrayStart() - if yyl2050 == 0 { + } else if yyct2143 == codecSelferValueTypeArray1234 { + yyl2143 := r.ReadArrayStart() + if yyl2143 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2050, d) + x.codecDecodeSelfFromArray(yyl2143, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -26638,12 +27964,12 @@ func (x *Service) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2051Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2051Slc - var yyhl2051 bool = l >= 0 - for yyj2051 := 0; ; yyj2051++ { - if yyhl2051 { - if yyj2051 >= l { + var yys2144Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2144Slc + var yyhl2144 bool = l >= 0 + for yyj2144 := 0; ; yyj2144++ { + if yyhl2144 { + if yyj2144 >= l { break } } else { @@ -26652,10 +27978,10 @@ func (x *Service) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2051Slc = r.DecodeBytes(yys2051Slc, true, true) - yys2051 := string(yys2051Slc) + yys2144Slc = r.DecodeBytes(yys2144Slc, true, true) + yys2144 := string(yys2144Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2051 { + switch yys2144 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -26672,27 +27998,27 @@ func (x *Service) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv2054 := &x.ObjectMeta - yyv2054.CodecDecodeSelf(d) + yyv2147 := &x.ObjectMeta + yyv2147.CodecDecodeSelf(d) } case "spec": if r.TryDecodeAsNil() { x.Spec = ServiceSpec{} } else { - yyv2055 := &x.Spec - yyv2055.CodecDecodeSelf(d) + yyv2148 := &x.Spec + yyv2148.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ServiceStatus{} } else { - yyv2056 := &x.Status - yyv2056.CodecDecodeSelf(d) + yyv2149 := &x.Status + yyv2149.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2051) - } // end switch yys2051 - } // end for yyj2051 + z.DecStructFieldNotFound(-1, yys2144) + } // end switch yys2144 + } // end for yyj2144 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -26700,16 +28026,16 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2057 int - var yyb2057 bool - var yyhl2057 bool = l >= 0 - yyj2057++ - if yyhl2057 { - yyb2057 = yyj2057 > l + var yyj2150 int + var yyb2150 bool + var yyhl2150 bool = l >= 0 + yyj2150++ + if yyhl2150 { + yyb2150 = yyj2150 > l } else { - yyb2057 = r.CheckBreak() + yyb2150 = r.CheckBreak() } - if yyb2057 { + if yyb2150 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26719,13 +28045,13 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2057++ - if yyhl2057 { - yyb2057 = yyj2057 > l + yyj2150++ + if yyhl2150 { + yyb2150 = yyj2150 > l } else { - yyb2057 = r.CheckBreak() + yyb2150 = r.CheckBreak() } - if yyb2057 { + if yyb2150 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26735,13 +28061,13 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2057++ - if yyhl2057 { - yyb2057 = yyj2057 > l + yyj2150++ + if yyhl2150 { + yyb2150 = yyj2150 > l } else { - yyb2057 = r.CheckBreak() + yyb2150 = r.CheckBreak() } - if yyb2057 { + if yyb2150 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26749,16 +28075,16 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv2060 := &x.ObjectMeta - yyv2060.CodecDecodeSelf(d) + yyv2153 := &x.ObjectMeta + yyv2153.CodecDecodeSelf(d) } - yyj2057++ - if yyhl2057 { - yyb2057 = yyj2057 > l + yyj2150++ + if yyhl2150 { + yyb2150 = yyj2150 > l } else { - yyb2057 = r.CheckBreak() + yyb2150 = r.CheckBreak() } - if yyb2057 { + if yyb2150 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26766,16 +28092,16 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ServiceSpec{} } else { - yyv2061 := &x.Spec - yyv2061.CodecDecodeSelf(d) + yyv2154 := &x.Spec + yyv2154.CodecDecodeSelf(d) } - yyj2057++ - if yyhl2057 { - yyb2057 = yyj2057 > l + yyj2150++ + if yyhl2150 { + yyb2150 = yyj2150 > l } else { - yyb2057 = r.CheckBreak() + yyb2150 = r.CheckBreak() } - if yyb2057 { + if yyb2150 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26783,21 +28109,21 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ServiceStatus{} } else { - yyv2062 := &x.Status - yyv2062.CodecDecodeSelf(d) + yyv2155 := &x.Status + yyv2155.CodecDecodeSelf(d) } for { - yyj2057++ - if yyhl2057 { - yyb2057 = yyj2057 > l + yyj2150++ + if yyhl2150 { + yyb2150 = yyj2150 > l } else { - yyb2057 = r.CheckBreak() + yyb2150 = r.CheckBreak() } - if yyb2057 { + if yyb2150 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2057-1, "") + z.DecStructFieldNotFound(yyj2150-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -26809,37 +28135,37 @@ func (x *ServiceList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2063 := z.EncBinary() - _ = yym2063 + yym2156 := z.EncBinary() + _ = yym2156 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2064 := !z.EncBinary() - yy2arr2064 := z.EncBasicHandle().StructToArray - var yyq2064 [4]bool - _, _, _ = yysep2064, yyq2064, yy2arr2064 - const yyr2064 bool = false - yyq2064[0] = x.Kind != "" - yyq2064[1] = x.APIVersion != "" - yyq2064[2] = true - var yynn2064 int - if yyr2064 || yy2arr2064 { + yysep2157 := !z.EncBinary() + yy2arr2157 := z.EncBasicHandle().StructToArray + var yyq2157 [4]bool + _, _, _ = yysep2157, yyq2157, yy2arr2157 + const yyr2157 bool = false + yyq2157[0] = x.Kind != "" + yyq2157[1] = x.APIVersion != "" + yyq2157[2] = true + var yynn2157 int + if yyr2157 || yy2arr2157 { r.EncodeArrayStart(4) } else { - yynn2064 = 1 - for _, b := range yyq2064 { + yynn2157 = 1 + for _, b := range yyq2157 { if b { - yynn2064++ + yynn2157++ } } - r.EncodeMapStart(yynn2064) - yynn2064 = 0 + r.EncodeMapStart(yynn2157) + yynn2157 = 0 } - if yyr2064 || yy2arr2064 { + if yyr2157 || yy2arr2157 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2064[0] { - yym2066 := z.EncBinary() - _ = yym2066 + if yyq2157[0] { + yym2159 := z.EncBinary() + _ = yym2159 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -26848,23 +28174,23 @@ func (x *ServiceList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2064[0] { + if yyq2157[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2067 := z.EncBinary() - _ = yym2067 + yym2160 := z.EncBinary() + _ = yym2160 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2064 || yy2arr2064 { + if yyr2157 || yy2arr2157 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2064[1] { - yym2069 := z.EncBinary() - _ = yym2069 + if yyq2157[1] { + yym2162 := z.EncBinary() + _ = yym2162 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -26873,54 +28199,54 @@ func (x *ServiceList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2064[1] { + if yyq2157[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2070 := z.EncBinary() - _ = yym2070 + yym2163 := z.EncBinary() + _ = yym2163 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2064 || yy2arr2064 { + if yyr2157 || yy2arr2157 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2064[2] { - yy2072 := &x.ListMeta - yym2073 := z.EncBinary() - _ = yym2073 + if yyq2157[2] { + yy2165 := &x.ListMeta + yym2166 := z.EncBinary() + _ = yym2166 if false { - } else if z.HasExtensions() && z.EncExt(yy2072) { + } else if z.HasExtensions() && z.EncExt(yy2165) { } else { - z.EncFallback(yy2072) + z.EncFallback(yy2165) } } else { r.EncodeNil() } } else { - if yyq2064[2] { + if yyq2157[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2074 := &x.ListMeta - yym2075 := z.EncBinary() - _ = yym2075 + yy2167 := &x.ListMeta + yym2168 := z.EncBinary() + _ = yym2168 if false { - } else if z.HasExtensions() && z.EncExt(yy2074) { + } else if z.HasExtensions() && z.EncExt(yy2167) { } else { - z.EncFallback(yy2074) + z.EncFallback(yy2167) } } } - if yyr2064 || yy2arr2064 { + if yyr2157 || yy2arr2157 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym2077 := z.EncBinary() - _ = yym2077 + yym2170 := z.EncBinary() + _ = yym2170 if false { } else { h.encSliceService(([]Service)(x.Items), e) @@ -26933,15 +28259,15 @@ func (x *ServiceList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym2078 := z.EncBinary() - _ = yym2078 + yym2171 := z.EncBinary() + _ = yym2171 if false { } else { h.encSliceService(([]Service)(x.Items), e) } } } - if yyr2064 || yy2arr2064 { + if yyr2157 || yy2arr2157 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -26954,25 +28280,25 @@ func (x *ServiceList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2079 := z.DecBinary() - _ = yym2079 + yym2172 := z.DecBinary() + _ = yym2172 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2080 := r.ContainerType() - if yyct2080 == codecSelferValueTypeMap1234 { - yyl2080 := r.ReadMapStart() - if yyl2080 == 0 { + yyct2173 := r.ContainerType() + if yyct2173 == codecSelferValueTypeMap1234 { + yyl2173 := r.ReadMapStart() + if yyl2173 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2080, d) + x.codecDecodeSelfFromMap(yyl2173, d) } - } else if yyct2080 == codecSelferValueTypeArray1234 { - yyl2080 := r.ReadArrayStart() - if yyl2080 == 0 { + } else if yyct2173 == codecSelferValueTypeArray1234 { + yyl2173 := r.ReadArrayStart() + if yyl2173 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2080, d) + x.codecDecodeSelfFromArray(yyl2173, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -26984,12 +28310,12 @@ func (x *ServiceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2081Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2081Slc - var yyhl2081 bool = l >= 0 - for yyj2081 := 0; ; yyj2081++ { - if yyhl2081 { - if yyj2081 >= l { + var yys2174Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2174Slc + var yyhl2174 bool = l >= 0 + for yyj2174 := 0; ; yyj2174++ { + if yyhl2174 { + if yyj2174 >= l { break } } else { @@ -26998,10 +28324,10 @@ func (x *ServiceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2081Slc = r.DecodeBytes(yys2081Slc, true, true) - yys2081 := string(yys2081Slc) + yys2174Slc = r.DecodeBytes(yys2174Slc, true, true) + yys2174 := string(yys2174Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2081 { + switch yys2174 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -27018,31 +28344,31 @@ func (x *ServiceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv2084 := &x.ListMeta - yym2085 := z.DecBinary() - _ = yym2085 + yyv2177 := &x.ListMeta + yym2178 := z.DecBinary() + _ = yym2178 if false { - } else if z.HasExtensions() && z.DecExt(yyv2084) { + } else if z.HasExtensions() && z.DecExt(yyv2177) { } else { - z.DecFallback(yyv2084, false) + z.DecFallback(yyv2177, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2086 := &x.Items - yym2087 := z.DecBinary() - _ = yym2087 + yyv2179 := &x.Items + yym2180 := z.DecBinary() + _ = yym2180 if false { } else { - h.decSliceService((*[]Service)(yyv2086), d) + h.decSliceService((*[]Service)(yyv2179), d) } } default: - z.DecStructFieldNotFound(-1, yys2081) - } // end switch yys2081 - } // end for yyj2081 + z.DecStructFieldNotFound(-1, yys2174) + } // end switch yys2174 + } // end for yyj2174 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -27050,16 +28376,16 @@ func (x *ServiceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2088 int - var yyb2088 bool - var yyhl2088 bool = l >= 0 - yyj2088++ - if yyhl2088 { - yyb2088 = yyj2088 > l + var yyj2181 int + var yyb2181 bool + var yyhl2181 bool = l >= 0 + yyj2181++ + if yyhl2181 { + yyb2181 = yyj2181 > l } else { - yyb2088 = r.CheckBreak() + yyb2181 = r.CheckBreak() } - if yyb2088 { + if yyb2181 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27069,13 +28395,13 @@ func (x *ServiceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2088++ - if yyhl2088 { - yyb2088 = yyj2088 > l + yyj2181++ + if yyhl2181 { + yyb2181 = yyj2181 > l } else { - yyb2088 = r.CheckBreak() + yyb2181 = r.CheckBreak() } - if yyb2088 { + if yyb2181 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27085,13 +28411,13 @@ func (x *ServiceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2088++ - if yyhl2088 { - yyb2088 = yyj2088 > l + yyj2181++ + if yyhl2181 { + yyb2181 = yyj2181 > l } else { - yyb2088 = r.CheckBreak() + yyb2181 = r.CheckBreak() } - if yyb2088 { + if yyb2181 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27099,22 +28425,22 @@ func (x *ServiceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv2091 := &x.ListMeta - yym2092 := z.DecBinary() - _ = yym2092 + yyv2184 := &x.ListMeta + yym2185 := z.DecBinary() + _ = yym2185 if false { - } else if z.HasExtensions() && z.DecExt(yyv2091) { + } else if z.HasExtensions() && z.DecExt(yyv2184) { } else { - z.DecFallback(yyv2091, false) + z.DecFallback(yyv2184, false) } } - yyj2088++ - if yyhl2088 { - yyb2088 = yyj2088 > l + yyj2181++ + if yyhl2181 { + yyb2181 = yyj2181 > l } else { - yyb2088 = r.CheckBreak() + yyb2181 = r.CheckBreak() } - if yyb2088 { + if yyb2181 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27122,26 +28448,26 @@ func (x *ServiceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2093 := &x.Items - yym2094 := z.DecBinary() - _ = yym2094 + yyv2186 := &x.Items + yym2187 := z.DecBinary() + _ = yym2187 if false { } else { - h.decSliceService((*[]Service)(yyv2093), d) + h.decSliceService((*[]Service)(yyv2186), d) } } for { - yyj2088++ - if yyhl2088 { - yyb2088 = yyj2088 > l + yyj2181++ + if yyhl2181 { + yyb2181 = yyj2181 > l } else { - yyb2088 = r.CheckBreak() + yyb2181 = r.CheckBreak() } - if yyb2088 { + if yyb2181 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2088-1, "") + z.DecStructFieldNotFound(yyj2181-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -27153,39 +28479,39 @@ func (x *ServiceAccount) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2095 := z.EncBinary() - _ = yym2095 + yym2188 := z.EncBinary() + _ = yym2188 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2096 := !z.EncBinary() - yy2arr2096 := z.EncBasicHandle().StructToArray - var yyq2096 [5]bool - _, _, _ = yysep2096, yyq2096, yy2arr2096 - const yyr2096 bool = false - yyq2096[0] = x.Kind != "" - yyq2096[1] = x.APIVersion != "" - yyq2096[2] = true - yyq2096[3] = len(x.Secrets) != 0 - yyq2096[4] = len(x.ImagePullSecrets) != 0 - var yynn2096 int - if yyr2096 || yy2arr2096 { + yysep2189 := !z.EncBinary() + yy2arr2189 := z.EncBasicHandle().StructToArray + var yyq2189 [5]bool + _, _, _ = yysep2189, yyq2189, yy2arr2189 + const yyr2189 bool = false + yyq2189[0] = x.Kind != "" + yyq2189[1] = x.APIVersion != "" + yyq2189[2] = true + yyq2189[3] = len(x.Secrets) != 0 + yyq2189[4] = len(x.ImagePullSecrets) != 0 + var yynn2189 int + if yyr2189 || yy2arr2189 { r.EncodeArrayStart(5) } else { - yynn2096 = 0 - for _, b := range yyq2096 { + yynn2189 = 0 + for _, b := range yyq2189 { if b { - yynn2096++ + yynn2189++ } } - r.EncodeMapStart(yynn2096) - yynn2096 = 0 + r.EncodeMapStart(yynn2189) + yynn2189 = 0 } - if yyr2096 || yy2arr2096 { + if yyr2189 || yy2arr2189 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2096[0] { - yym2098 := z.EncBinary() - _ = yym2098 + if yyq2189[0] { + yym2191 := z.EncBinary() + _ = yym2191 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -27194,23 +28520,23 @@ func (x *ServiceAccount) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2096[0] { + if yyq2189[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2099 := z.EncBinary() - _ = yym2099 + yym2192 := z.EncBinary() + _ = yym2192 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2096 || yy2arr2096 { + if yyr2189 || yy2arr2189 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2096[1] { - yym2101 := z.EncBinary() - _ = yym2101 + if yyq2189[1] { + yym2194 := z.EncBinary() + _ = yym2194 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -27219,43 +28545,43 @@ func (x *ServiceAccount) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2096[1] { + if yyq2189[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2102 := z.EncBinary() - _ = yym2102 + yym2195 := z.EncBinary() + _ = yym2195 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2096 || yy2arr2096 { + if yyr2189 || yy2arr2189 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2096[2] { - yy2104 := &x.ObjectMeta - yy2104.CodecEncodeSelf(e) + if yyq2189[2] { + yy2197 := &x.ObjectMeta + yy2197.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2096[2] { + if yyq2189[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2105 := &x.ObjectMeta - yy2105.CodecEncodeSelf(e) + yy2198 := &x.ObjectMeta + yy2198.CodecEncodeSelf(e) } } - if yyr2096 || yy2arr2096 { + if yyr2189 || yy2arr2189 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2096[3] { + if yyq2189[3] { if x.Secrets == nil { r.EncodeNil() } else { - yym2107 := z.EncBinary() - _ = yym2107 + yym2200 := z.EncBinary() + _ = yym2200 if false { } else { h.encSliceObjectReference(([]ObjectReference)(x.Secrets), e) @@ -27265,15 +28591,15 @@ func (x *ServiceAccount) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2096[3] { + if yyq2189[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("secrets")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Secrets == nil { r.EncodeNil() } else { - yym2108 := z.EncBinary() - _ = yym2108 + yym2201 := z.EncBinary() + _ = yym2201 if false { } else { h.encSliceObjectReference(([]ObjectReference)(x.Secrets), e) @@ -27281,14 +28607,14 @@ func (x *ServiceAccount) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2096 || yy2arr2096 { + if yyr2189 || yy2arr2189 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2096[4] { + if yyq2189[4] { if x.ImagePullSecrets == nil { r.EncodeNil() } else { - yym2110 := z.EncBinary() - _ = yym2110 + yym2203 := z.EncBinary() + _ = yym2203 if false { } else { h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e) @@ -27298,15 +28624,15 @@ func (x *ServiceAccount) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2096[4] { + if yyq2189[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("imagePullSecrets")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.ImagePullSecrets == nil { r.EncodeNil() } else { - yym2111 := z.EncBinary() - _ = yym2111 + yym2204 := z.EncBinary() + _ = yym2204 if false { } else { h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e) @@ -27314,7 +28640,7 @@ func (x *ServiceAccount) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2096 || yy2arr2096 { + if yyr2189 || yy2arr2189 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -27327,25 +28653,25 @@ func (x *ServiceAccount) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2112 := z.DecBinary() - _ = yym2112 + yym2205 := z.DecBinary() + _ = yym2205 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2113 := r.ContainerType() - if yyct2113 == codecSelferValueTypeMap1234 { - yyl2113 := r.ReadMapStart() - if yyl2113 == 0 { + yyct2206 := r.ContainerType() + if yyct2206 == codecSelferValueTypeMap1234 { + yyl2206 := r.ReadMapStart() + if yyl2206 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2113, d) + x.codecDecodeSelfFromMap(yyl2206, d) } - } else if yyct2113 == codecSelferValueTypeArray1234 { - yyl2113 := r.ReadArrayStart() - if yyl2113 == 0 { + } else if yyct2206 == codecSelferValueTypeArray1234 { + yyl2206 := r.ReadArrayStart() + if yyl2206 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2113, d) + x.codecDecodeSelfFromArray(yyl2206, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -27357,12 +28683,12 @@ func (x *ServiceAccount) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2114Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2114Slc - var yyhl2114 bool = l >= 0 - for yyj2114 := 0; ; yyj2114++ { - if yyhl2114 { - if yyj2114 >= l { + var yys2207Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2207Slc + var yyhl2207 bool = l >= 0 + for yyj2207 := 0; ; yyj2207++ { + if yyhl2207 { + if yyj2207 >= l { break } } else { @@ -27371,10 +28697,10 @@ func (x *ServiceAccount) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2114Slc = r.DecodeBytes(yys2114Slc, true, true) - yys2114 := string(yys2114Slc) + yys2207Slc = r.DecodeBytes(yys2207Slc, true, true) + yys2207 := string(yys2207Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2114 { + switch yys2207 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -27391,37 +28717,37 @@ func (x *ServiceAccount) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv2117 := &x.ObjectMeta - yyv2117.CodecDecodeSelf(d) + yyv2210 := &x.ObjectMeta + yyv2210.CodecDecodeSelf(d) } case "secrets": if r.TryDecodeAsNil() { x.Secrets = nil } else { - yyv2118 := &x.Secrets - yym2119 := z.DecBinary() - _ = yym2119 + yyv2211 := &x.Secrets + yym2212 := z.DecBinary() + _ = yym2212 if false { } else { - h.decSliceObjectReference((*[]ObjectReference)(yyv2118), d) + h.decSliceObjectReference((*[]ObjectReference)(yyv2211), d) } } case "imagePullSecrets": if r.TryDecodeAsNil() { x.ImagePullSecrets = nil } else { - yyv2120 := &x.ImagePullSecrets - yym2121 := z.DecBinary() - _ = yym2121 + yyv2213 := &x.ImagePullSecrets + yym2214 := z.DecBinary() + _ = yym2214 if false { } else { - h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv2120), d) + h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv2213), d) } } default: - z.DecStructFieldNotFound(-1, yys2114) - } // end switch yys2114 - } // end for yyj2114 + z.DecStructFieldNotFound(-1, yys2207) + } // end switch yys2207 + } // end for yyj2207 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -27429,16 +28755,16 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2122 int - var yyb2122 bool - var yyhl2122 bool = l >= 0 - yyj2122++ - if yyhl2122 { - yyb2122 = yyj2122 > l + var yyj2215 int + var yyb2215 bool + var yyhl2215 bool = l >= 0 + yyj2215++ + if yyhl2215 { + yyb2215 = yyj2215 > l } else { - yyb2122 = r.CheckBreak() + yyb2215 = r.CheckBreak() } - if yyb2122 { + if yyb2215 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27448,13 +28774,13 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2122++ - if yyhl2122 { - yyb2122 = yyj2122 > l + yyj2215++ + if yyhl2215 { + yyb2215 = yyj2215 > l } else { - yyb2122 = r.CheckBreak() + yyb2215 = r.CheckBreak() } - if yyb2122 { + if yyb2215 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27464,13 +28790,13 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2122++ - if yyhl2122 { - yyb2122 = yyj2122 > l + yyj2215++ + if yyhl2215 { + yyb2215 = yyj2215 > l } else { - yyb2122 = r.CheckBreak() + yyb2215 = r.CheckBreak() } - if yyb2122 { + if yyb2215 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27478,16 +28804,16 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv2125 := &x.ObjectMeta - yyv2125.CodecDecodeSelf(d) + yyv2218 := &x.ObjectMeta + yyv2218.CodecDecodeSelf(d) } - yyj2122++ - if yyhl2122 { - yyb2122 = yyj2122 > l + yyj2215++ + if yyhl2215 { + yyb2215 = yyj2215 > l } else { - yyb2122 = r.CheckBreak() + yyb2215 = r.CheckBreak() } - if yyb2122 { + if yyb2215 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27495,21 +28821,21 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Secrets = nil } else { - yyv2126 := &x.Secrets - yym2127 := z.DecBinary() - _ = yym2127 + yyv2219 := &x.Secrets + yym2220 := z.DecBinary() + _ = yym2220 if false { } else { - h.decSliceObjectReference((*[]ObjectReference)(yyv2126), d) + h.decSliceObjectReference((*[]ObjectReference)(yyv2219), d) } } - yyj2122++ - if yyhl2122 { - yyb2122 = yyj2122 > l + yyj2215++ + if yyhl2215 { + yyb2215 = yyj2215 > l } else { - yyb2122 = r.CheckBreak() + yyb2215 = r.CheckBreak() } - if yyb2122 { + if yyb2215 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27517,26 +28843,26 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ImagePullSecrets = nil } else { - yyv2128 := &x.ImagePullSecrets - yym2129 := z.DecBinary() - _ = yym2129 + yyv2221 := &x.ImagePullSecrets + yym2222 := z.DecBinary() + _ = yym2222 if false { } else { - h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv2128), d) + h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv2221), d) } } for { - yyj2122++ - if yyhl2122 { - yyb2122 = yyj2122 > l + yyj2215++ + if yyhl2215 { + yyb2215 = yyj2215 > l } else { - yyb2122 = r.CheckBreak() + yyb2215 = r.CheckBreak() } - if yyb2122 { + if yyb2215 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2122-1, "") + z.DecStructFieldNotFound(yyj2215-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -27548,37 +28874,37 @@ func (x *ServiceAccountList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2130 := z.EncBinary() - _ = yym2130 + yym2223 := z.EncBinary() + _ = yym2223 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2131 := !z.EncBinary() - yy2arr2131 := z.EncBasicHandle().StructToArray - var yyq2131 [4]bool - _, _, _ = yysep2131, yyq2131, yy2arr2131 - const yyr2131 bool = false - yyq2131[0] = x.Kind != "" - yyq2131[1] = x.APIVersion != "" - yyq2131[2] = true - var yynn2131 int - if yyr2131 || yy2arr2131 { + yysep2224 := !z.EncBinary() + yy2arr2224 := z.EncBasicHandle().StructToArray + var yyq2224 [4]bool + _, _, _ = yysep2224, yyq2224, yy2arr2224 + const yyr2224 bool = false + yyq2224[0] = x.Kind != "" + yyq2224[1] = x.APIVersion != "" + yyq2224[2] = true + var yynn2224 int + if yyr2224 || yy2arr2224 { r.EncodeArrayStart(4) } else { - yynn2131 = 1 - for _, b := range yyq2131 { + yynn2224 = 1 + for _, b := range yyq2224 { if b { - yynn2131++ + yynn2224++ } } - r.EncodeMapStart(yynn2131) - yynn2131 = 0 + r.EncodeMapStart(yynn2224) + yynn2224 = 0 } - if yyr2131 || yy2arr2131 { + if yyr2224 || yy2arr2224 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2131[0] { - yym2133 := z.EncBinary() - _ = yym2133 + if yyq2224[0] { + yym2226 := z.EncBinary() + _ = yym2226 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -27587,23 +28913,23 @@ func (x *ServiceAccountList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2131[0] { + if yyq2224[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2134 := z.EncBinary() - _ = yym2134 + yym2227 := z.EncBinary() + _ = yym2227 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2131 || yy2arr2131 { + if yyr2224 || yy2arr2224 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2131[1] { - yym2136 := z.EncBinary() - _ = yym2136 + if yyq2224[1] { + yym2229 := z.EncBinary() + _ = yym2229 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -27612,54 +28938,54 @@ func (x *ServiceAccountList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2131[1] { + if yyq2224[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2137 := z.EncBinary() - _ = yym2137 + yym2230 := z.EncBinary() + _ = yym2230 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2131 || yy2arr2131 { + if yyr2224 || yy2arr2224 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2131[2] { - yy2139 := &x.ListMeta - yym2140 := z.EncBinary() - _ = yym2140 + if yyq2224[2] { + yy2232 := &x.ListMeta + yym2233 := z.EncBinary() + _ = yym2233 if false { - } else if z.HasExtensions() && z.EncExt(yy2139) { + } else if z.HasExtensions() && z.EncExt(yy2232) { } else { - z.EncFallback(yy2139) + z.EncFallback(yy2232) } } else { r.EncodeNil() } } else { - if yyq2131[2] { + if yyq2224[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2141 := &x.ListMeta - yym2142 := z.EncBinary() - _ = yym2142 + yy2234 := &x.ListMeta + yym2235 := z.EncBinary() + _ = yym2235 if false { - } else if z.HasExtensions() && z.EncExt(yy2141) { + } else if z.HasExtensions() && z.EncExt(yy2234) { } else { - z.EncFallback(yy2141) + z.EncFallback(yy2234) } } } - if yyr2131 || yy2arr2131 { + if yyr2224 || yy2arr2224 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym2144 := z.EncBinary() - _ = yym2144 + yym2237 := z.EncBinary() + _ = yym2237 if false { } else { h.encSliceServiceAccount(([]ServiceAccount)(x.Items), e) @@ -27672,15 +28998,15 @@ func (x *ServiceAccountList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym2145 := z.EncBinary() - _ = yym2145 + yym2238 := z.EncBinary() + _ = yym2238 if false { } else { h.encSliceServiceAccount(([]ServiceAccount)(x.Items), e) } } } - if yyr2131 || yy2arr2131 { + if yyr2224 || yy2arr2224 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -27693,25 +29019,25 @@ func (x *ServiceAccountList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2146 := z.DecBinary() - _ = yym2146 + yym2239 := z.DecBinary() + _ = yym2239 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2147 := r.ContainerType() - if yyct2147 == codecSelferValueTypeMap1234 { - yyl2147 := r.ReadMapStart() - if yyl2147 == 0 { + yyct2240 := r.ContainerType() + if yyct2240 == codecSelferValueTypeMap1234 { + yyl2240 := r.ReadMapStart() + if yyl2240 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2147, d) + x.codecDecodeSelfFromMap(yyl2240, d) } - } else if yyct2147 == codecSelferValueTypeArray1234 { - yyl2147 := r.ReadArrayStart() - if yyl2147 == 0 { + } else if yyct2240 == codecSelferValueTypeArray1234 { + yyl2240 := r.ReadArrayStart() + if yyl2240 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2147, d) + x.codecDecodeSelfFromArray(yyl2240, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -27723,12 +29049,12 @@ func (x *ServiceAccountList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2148Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2148Slc - var yyhl2148 bool = l >= 0 - for yyj2148 := 0; ; yyj2148++ { - if yyhl2148 { - if yyj2148 >= l { + var yys2241Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2241Slc + var yyhl2241 bool = l >= 0 + for yyj2241 := 0; ; yyj2241++ { + if yyhl2241 { + if yyj2241 >= l { break } } else { @@ -27737,10 +29063,10 @@ func (x *ServiceAccountList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2148Slc = r.DecodeBytes(yys2148Slc, true, true) - yys2148 := string(yys2148Slc) + yys2241Slc = r.DecodeBytes(yys2241Slc, true, true) + yys2241 := string(yys2241Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2148 { + switch yys2241 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -27757,31 +29083,31 @@ func (x *ServiceAccountList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv2151 := &x.ListMeta - yym2152 := z.DecBinary() - _ = yym2152 + yyv2244 := &x.ListMeta + yym2245 := z.DecBinary() + _ = yym2245 if false { - } else if z.HasExtensions() && z.DecExt(yyv2151) { + } else if z.HasExtensions() && z.DecExt(yyv2244) { } else { - z.DecFallback(yyv2151, false) + z.DecFallback(yyv2244, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2153 := &x.Items - yym2154 := z.DecBinary() - _ = yym2154 + yyv2246 := &x.Items + yym2247 := z.DecBinary() + _ = yym2247 if false { } else { - h.decSliceServiceAccount((*[]ServiceAccount)(yyv2153), d) + h.decSliceServiceAccount((*[]ServiceAccount)(yyv2246), d) } } default: - z.DecStructFieldNotFound(-1, yys2148) - } // end switch yys2148 - } // end for yyj2148 + z.DecStructFieldNotFound(-1, yys2241) + } // end switch yys2241 + } // end for yyj2241 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -27789,16 +29115,16 @@ func (x *ServiceAccountList) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2155 int - var yyb2155 bool - var yyhl2155 bool = l >= 0 - yyj2155++ - if yyhl2155 { - yyb2155 = yyj2155 > l + var yyj2248 int + var yyb2248 bool + var yyhl2248 bool = l >= 0 + yyj2248++ + if yyhl2248 { + yyb2248 = yyj2248 > l } else { - yyb2155 = r.CheckBreak() + yyb2248 = r.CheckBreak() } - if yyb2155 { + if yyb2248 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27808,13 +29134,13 @@ func (x *ServiceAccountList) codecDecodeSelfFromArray(l int, d *codec1978.Decode } else { x.Kind = string(r.DecodeString()) } - yyj2155++ - if yyhl2155 { - yyb2155 = yyj2155 > l + yyj2248++ + if yyhl2248 { + yyb2248 = yyj2248 > l } else { - yyb2155 = r.CheckBreak() + yyb2248 = r.CheckBreak() } - if yyb2155 { + if yyb2248 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27824,13 +29150,13 @@ func (x *ServiceAccountList) codecDecodeSelfFromArray(l int, d *codec1978.Decode } else { x.APIVersion = string(r.DecodeString()) } - yyj2155++ - if yyhl2155 { - yyb2155 = yyj2155 > l + yyj2248++ + if yyhl2248 { + yyb2248 = yyj2248 > l } else { - yyb2155 = r.CheckBreak() + yyb2248 = r.CheckBreak() } - if yyb2155 { + if yyb2248 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27838,22 +29164,22 @@ func (x *ServiceAccountList) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv2158 := &x.ListMeta - yym2159 := z.DecBinary() - _ = yym2159 + yyv2251 := &x.ListMeta + yym2252 := z.DecBinary() + _ = yym2252 if false { - } else if z.HasExtensions() && z.DecExt(yyv2158) { + } else if z.HasExtensions() && z.DecExt(yyv2251) { } else { - z.DecFallback(yyv2158, false) + z.DecFallback(yyv2251, false) } } - yyj2155++ - if yyhl2155 { - yyb2155 = yyj2155 > l + yyj2248++ + if yyhl2248 { + yyb2248 = yyj2248 > l } else { - yyb2155 = r.CheckBreak() + yyb2248 = r.CheckBreak() } - if yyb2155 { + if yyb2248 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27861,26 +29187,26 @@ func (x *ServiceAccountList) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2160 := &x.Items - yym2161 := z.DecBinary() - _ = yym2161 + yyv2253 := &x.Items + yym2254 := z.DecBinary() + _ = yym2254 if false { } else { - h.decSliceServiceAccount((*[]ServiceAccount)(yyv2160), d) + h.decSliceServiceAccount((*[]ServiceAccount)(yyv2253), d) } } for { - yyj2155++ - if yyhl2155 { - yyb2155 = yyj2155 > l + yyj2248++ + if yyhl2248 { + yyb2248 = yyj2248 > l } else { - yyb2155 = r.CheckBreak() + yyb2248 = r.CheckBreak() } - if yyb2155 { + if yyb2248 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2155-1, "") + z.DecStructFieldNotFound(yyj2248-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -27892,37 +29218,37 @@ func (x *Endpoints) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2162 := z.EncBinary() - _ = yym2162 + yym2255 := z.EncBinary() + _ = yym2255 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2163 := !z.EncBinary() - yy2arr2163 := z.EncBasicHandle().StructToArray - var yyq2163 [4]bool - _, _, _ = yysep2163, yyq2163, yy2arr2163 - const yyr2163 bool = false - yyq2163[0] = x.Kind != "" - yyq2163[1] = x.APIVersion != "" - yyq2163[2] = true - var yynn2163 int - if yyr2163 || yy2arr2163 { + yysep2256 := !z.EncBinary() + yy2arr2256 := z.EncBasicHandle().StructToArray + var yyq2256 [4]bool + _, _, _ = yysep2256, yyq2256, yy2arr2256 + const yyr2256 bool = false + yyq2256[0] = x.Kind != "" + yyq2256[1] = x.APIVersion != "" + yyq2256[2] = true + var yynn2256 int + if yyr2256 || yy2arr2256 { r.EncodeArrayStart(4) } else { - yynn2163 = 1 - for _, b := range yyq2163 { + yynn2256 = 1 + for _, b := range yyq2256 { if b { - yynn2163++ + yynn2256++ } } - r.EncodeMapStart(yynn2163) - yynn2163 = 0 + r.EncodeMapStart(yynn2256) + yynn2256 = 0 } - if yyr2163 || yy2arr2163 { + if yyr2256 || yy2arr2256 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2163[0] { - yym2165 := z.EncBinary() - _ = yym2165 + if yyq2256[0] { + yym2258 := z.EncBinary() + _ = yym2258 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -27931,23 +29257,23 @@ func (x *Endpoints) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2163[0] { + if yyq2256[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2166 := z.EncBinary() - _ = yym2166 + yym2259 := z.EncBinary() + _ = yym2259 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2163 || yy2arr2163 { + if yyr2256 || yy2arr2256 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2163[1] { - yym2168 := z.EncBinary() - _ = yym2168 + if yyq2256[1] { + yym2261 := z.EncBinary() + _ = yym2261 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -27956,42 +29282,42 @@ func (x *Endpoints) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2163[1] { + if yyq2256[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2169 := z.EncBinary() - _ = yym2169 + yym2262 := z.EncBinary() + _ = yym2262 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2163 || yy2arr2163 { + if yyr2256 || yy2arr2256 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2163[2] { - yy2171 := &x.ObjectMeta - yy2171.CodecEncodeSelf(e) + if yyq2256[2] { + yy2264 := &x.ObjectMeta + yy2264.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2163[2] { + if yyq2256[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2172 := &x.ObjectMeta - yy2172.CodecEncodeSelf(e) + yy2265 := &x.ObjectMeta + yy2265.CodecEncodeSelf(e) } } - if yyr2163 || yy2arr2163 { + if yyr2256 || yy2arr2256 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Subsets == nil { r.EncodeNil() } else { - yym2174 := z.EncBinary() - _ = yym2174 + yym2267 := z.EncBinary() + _ = yym2267 if false { } else { h.encSliceEndpointSubset(([]EndpointSubset)(x.Subsets), e) @@ -28004,15 +29330,15 @@ func (x *Endpoints) CodecEncodeSelf(e *codec1978.Encoder) { if x.Subsets == nil { r.EncodeNil() } else { - yym2175 := z.EncBinary() - _ = yym2175 + yym2268 := z.EncBinary() + _ = yym2268 if false { } else { h.encSliceEndpointSubset(([]EndpointSubset)(x.Subsets), e) } } } - if yyr2163 || yy2arr2163 { + if yyr2256 || yy2arr2256 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -28025,25 +29351,25 @@ func (x *Endpoints) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2176 := z.DecBinary() - _ = yym2176 + yym2269 := z.DecBinary() + _ = yym2269 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2177 := r.ContainerType() - if yyct2177 == codecSelferValueTypeMap1234 { - yyl2177 := r.ReadMapStart() - if yyl2177 == 0 { + yyct2270 := r.ContainerType() + if yyct2270 == codecSelferValueTypeMap1234 { + yyl2270 := r.ReadMapStart() + if yyl2270 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2177, d) + x.codecDecodeSelfFromMap(yyl2270, d) } - } else if yyct2177 == codecSelferValueTypeArray1234 { - yyl2177 := r.ReadArrayStart() - if yyl2177 == 0 { + } else if yyct2270 == codecSelferValueTypeArray1234 { + yyl2270 := r.ReadArrayStart() + if yyl2270 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2177, d) + x.codecDecodeSelfFromArray(yyl2270, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -28055,12 +29381,12 @@ func (x *Endpoints) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2178Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2178Slc - var yyhl2178 bool = l >= 0 - for yyj2178 := 0; ; yyj2178++ { - if yyhl2178 { - if yyj2178 >= l { + var yys2271Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2271Slc + var yyhl2271 bool = l >= 0 + for yyj2271 := 0; ; yyj2271++ { + if yyhl2271 { + if yyj2271 >= l { break } } else { @@ -28069,10 +29395,10 @@ func (x *Endpoints) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2178Slc = r.DecodeBytes(yys2178Slc, true, true) - yys2178 := string(yys2178Slc) + yys2271Slc = r.DecodeBytes(yys2271Slc, true, true) + yys2271 := string(yys2271Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2178 { + switch yys2271 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -28089,25 +29415,25 @@ func (x *Endpoints) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv2181 := &x.ObjectMeta - yyv2181.CodecDecodeSelf(d) + yyv2274 := &x.ObjectMeta + yyv2274.CodecDecodeSelf(d) } case "subsets": if r.TryDecodeAsNil() { x.Subsets = nil } else { - yyv2182 := &x.Subsets - yym2183 := z.DecBinary() - _ = yym2183 + yyv2275 := &x.Subsets + yym2276 := z.DecBinary() + _ = yym2276 if false { } else { - h.decSliceEndpointSubset((*[]EndpointSubset)(yyv2182), d) + h.decSliceEndpointSubset((*[]EndpointSubset)(yyv2275), d) } } default: - z.DecStructFieldNotFound(-1, yys2178) - } // end switch yys2178 - } // end for yyj2178 + z.DecStructFieldNotFound(-1, yys2271) + } // end switch yys2271 + } // end for yyj2271 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -28115,16 +29441,16 @@ func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2184 int - var yyb2184 bool - var yyhl2184 bool = l >= 0 - yyj2184++ - if yyhl2184 { - yyb2184 = yyj2184 > l + var yyj2277 int + var yyb2277 bool + var yyhl2277 bool = l >= 0 + yyj2277++ + if yyhl2277 { + yyb2277 = yyj2277 > l } else { - yyb2184 = r.CheckBreak() + yyb2277 = r.CheckBreak() } - if yyb2184 { + if yyb2277 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28134,13 +29460,13 @@ func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2184++ - if yyhl2184 { - yyb2184 = yyj2184 > l + yyj2277++ + if yyhl2277 { + yyb2277 = yyj2277 > l } else { - yyb2184 = r.CheckBreak() + yyb2277 = r.CheckBreak() } - if yyb2184 { + if yyb2277 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28150,13 +29476,13 @@ func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2184++ - if yyhl2184 { - yyb2184 = yyj2184 > l + yyj2277++ + if yyhl2277 { + yyb2277 = yyj2277 > l } else { - yyb2184 = r.CheckBreak() + yyb2277 = r.CheckBreak() } - if yyb2184 { + if yyb2277 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28164,16 +29490,16 @@ func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv2187 := &x.ObjectMeta - yyv2187.CodecDecodeSelf(d) + yyv2280 := &x.ObjectMeta + yyv2280.CodecDecodeSelf(d) } - yyj2184++ - if yyhl2184 { - yyb2184 = yyj2184 > l + yyj2277++ + if yyhl2277 { + yyb2277 = yyj2277 > l } else { - yyb2184 = r.CheckBreak() + yyb2277 = r.CheckBreak() } - if yyb2184 { + if yyb2277 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28181,26 +29507,26 @@ func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Subsets = nil } else { - yyv2188 := &x.Subsets - yym2189 := z.DecBinary() - _ = yym2189 + yyv2281 := &x.Subsets + yym2282 := z.DecBinary() + _ = yym2282 if false { } else { - h.decSliceEndpointSubset((*[]EndpointSubset)(yyv2188), d) + h.decSliceEndpointSubset((*[]EndpointSubset)(yyv2281), d) } } for { - yyj2184++ - if yyhl2184 { - yyb2184 = yyj2184 > l + yyj2277++ + if yyhl2277 { + yyb2277 = yyj2277 > l } else { - yyb2184 = r.CheckBreak() + yyb2277 = r.CheckBreak() } - if yyb2184 { + if yyb2277 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2184-1, "") + z.DecStructFieldNotFound(yyj2277-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -28212,40 +29538,40 @@ func (x *EndpointSubset) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2190 := z.EncBinary() - _ = yym2190 + yym2283 := z.EncBinary() + _ = yym2283 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2191 := !z.EncBinary() - yy2arr2191 := z.EncBasicHandle().StructToArray - var yyq2191 [3]bool - _, _, _ = yysep2191, yyq2191, yy2arr2191 - const yyr2191 bool = false - yyq2191[0] = len(x.Addresses) != 0 - yyq2191[1] = len(x.NotReadyAddresses) != 0 - yyq2191[2] = len(x.Ports) != 0 - var yynn2191 int - if yyr2191 || yy2arr2191 { + yysep2284 := !z.EncBinary() + yy2arr2284 := z.EncBasicHandle().StructToArray + var yyq2284 [3]bool + _, _, _ = yysep2284, yyq2284, yy2arr2284 + const yyr2284 bool = false + yyq2284[0] = len(x.Addresses) != 0 + yyq2284[1] = len(x.NotReadyAddresses) != 0 + yyq2284[2] = len(x.Ports) != 0 + var yynn2284 int + if yyr2284 || yy2arr2284 { r.EncodeArrayStart(3) } else { - yynn2191 = 0 - for _, b := range yyq2191 { + yynn2284 = 0 + for _, b := range yyq2284 { if b { - yynn2191++ + yynn2284++ } } - r.EncodeMapStart(yynn2191) - yynn2191 = 0 + r.EncodeMapStart(yynn2284) + yynn2284 = 0 } - if yyr2191 || yy2arr2191 { + if yyr2284 || yy2arr2284 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2191[0] { + if yyq2284[0] { if x.Addresses == nil { r.EncodeNil() } else { - yym2193 := z.EncBinary() - _ = yym2193 + yym2286 := z.EncBinary() + _ = yym2286 if false { } else { h.encSliceEndpointAddress(([]EndpointAddress)(x.Addresses), e) @@ -28255,15 +29581,15 @@ func (x *EndpointSubset) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2191[0] { + if yyq2284[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("addresses")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Addresses == nil { r.EncodeNil() } else { - yym2194 := z.EncBinary() - _ = yym2194 + yym2287 := z.EncBinary() + _ = yym2287 if false { } else { h.encSliceEndpointAddress(([]EndpointAddress)(x.Addresses), e) @@ -28271,14 +29597,14 @@ func (x *EndpointSubset) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2191 || yy2arr2191 { + if yyr2284 || yy2arr2284 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2191[1] { + if yyq2284[1] { if x.NotReadyAddresses == nil { r.EncodeNil() } else { - yym2196 := z.EncBinary() - _ = yym2196 + yym2289 := z.EncBinary() + _ = yym2289 if false { } else { h.encSliceEndpointAddress(([]EndpointAddress)(x.NotReadyAddresses), e) @@ -28288,15 +29614,15 @@ func (x *EndpointSubset) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2191[1] { + if yyq2284[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("notReadyAddresses")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.NotReadyAddresses == nil { r.EncodeNil() } else { - yym2197 := z.EncBinary() - _ = yym2197 + yym2290 := z.EncBinary() + _ = yym2290 if false { } else { h.encSliceEndpointAddress(([]EndpointAddress)(x.NotReadyAddresses), e) @@ -28304,14 +29630,14 @@ func (x *EndpointSubset) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2191 || yy2arr2191 { + if yyr2284 || yy2arr2284 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2191[2] { + if yyq2284[2] { if x.Ports == nil { r.EncodeNil() } else { - yym2199 := z.EncBinary() - _ = yym2199 + yym2292 := z.EncBinary() + _ = yym2292 if false { } else { h.encSliceEndpointPort(([]EndpointPort)(x.Ports), e) @@ -28321,15 +29647,15 @@ func (x *EndpointSubset) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2191[2] { + if yyq2284[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("ports")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Ports == nil { r.EncodeNil() } else { - yym2200 := z.EncBinary() - _ = yym2200 + yym2293 := z.EncBinary() + _ = yym2293 if false { } else { h.encSliceEndpointPort(([]EndpointPort)(x.Ports), e) @@ -28337,7 +29663,7 @@ func (x *EndpointSubset) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2191 || yy2arr2191 { + if yyr2284 || yy2arr2284 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -28350,25 +29676,25 @@ func (x *EndpointSubset) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2201 := z.DecBinary() - _ = yym2201 + yym2294 := z.DecBinary() + _ = yym2294 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2202 := r.ContainerType() - if yyct2202 == codecSelferValueTypeMap1234 { - yyl2202 := r.ReadMapStart() - if yyl2202 == 0 { + yyct2295 := r.ContainerType() + if yyct2295 == codecSelferValueTypeMap1234 { + yyl2295 := r.ReadMapStart() + if yyl2295 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2202, d) + x.codecDecodeSelfFromMap(yyl2295, d) } - } else if yyct2202 == codecSelferValueTypeArray1234 { - yyl2202 := r.ReadArrayStart() - if yyl2202 == 0 { + } else if yyct2295 == codecSelferValueTypeArray1234 { + yyl2295 := r.ReadArrayStart() + if yyl2295 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2202, d) + x.codecDecodeSelfFromArray(yyl2295, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -28380,12 +29706,12 @@ func (x *EndpointSubset) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2203Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2203Slc - var yyhl2203 bool = l >= 0 - for yyj2203 := 0; ; yyj2203++ { - if yyhl2203 { - if yyj2203 >= l { + var yys2296Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2296Slc + var yyhl2296 bool = l >= 0 + for yyj2296 := 0; ; yyj2296++ { + if yyhl2296 { + if yyj2296 >= l { break } } else { @@ -28394,50 +29720,50 @@ func (x *EndpointSubset) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2203Slc = r.DecodeBytes(yys2203Slc, true, true) - yys2203 := string(yys2203Slc) + yys2296Slc = r.DecodeBytes(yys2296Slc, true, true) + yys2296 := string(yys2296Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2203 { + switch yys2296 { case "addresses": if r.TryDecodeAsNil() { x.Addresses = nil } else { - yyv2204 := &x.Addresses - yym2205 := z.DecBinary() - _ = yym2205 + yyv2297 := &x.Addresses + yym2298 := z.DecBinary() + _ = yym2298 if false { } else { - h.decSliceEndpointAddress((*[]EndpointAddress)(yyv2204), d) + h.decSliceEndpointAddress((*[]EndpointAddress)(yyv2297), d) } } case "notReadyAddresses": if r.TryDecodeAsNil() { x.NotReadyAddresses = nil } else { - yyv2206 := &x.NotReadyAddresses - yym2207 := z.DecBinary() - _ = yym2207 + yyv2299 := &x.NotReadyAddresses + yym2300 := z.DecBinary() + _ = yym2300 if false { } else { - h.decSliceEndpointAddress((*[]EndpointAddress)(yyv2206), d) + h.decSliceEndpointAddress((*[]EndpointAddress)(yyv2299), d) } } case "ports": if r.TryDecodeAsNil() { x.Ports = nil } else { - yyv2208 := &x.Ports - yym2209 := z.DecBinary() - _ = yym2209 + yyv2301 := &x.Ports + yym2302 := z.DecBinary() + _ = yym2302 if false { } else { - h.decSliceEndpointPort((*[]EndpointPort)(yyv2208), d) + h.decSliceEndpointPort((*[]EndpointPort)(yyv2301), d) } } default: - z.DecStructFieldNotFound(-1, yys2203) - } // end switch yys2203 - } // end for yyj2203 + z.DecStructFieldNotFound(-1, yys2296) + } // end switch yys2296 + } // end for yyj2296 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -28445,16 +29771,16 @@ func (x *EndpointSubset) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2210 int - var yyb2210 bool - var yyhl2210 bool = l >= 0 - yyj2210++ - if yyhl2210 { - yyb2210 = yyj2210 > l + var yyj2303 int + var yyb2303 bool + var yyhl2303 bool = l >= 0 + yyj2303++ + if yyhl2303 { + yyb2303 = yyj2303 > l } else { - yyb2210 = r.CheckBreak() + yyb2303 = r.CheckBreak() } - if yyb2210 { + if yyb2303 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28462,21 +29788,21 @@ func (x *EndpointSubset) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Addresses = nil } else { - yyv2211 := &x.Addresses - yym2212 := z.DecBinary() - _ = yym2212 + yyv2304 := &x.Addresses + yym2305 := z.DecBinary() + _ = yym2305 if false { } else { - h.decSliceEndpointAddress((*[]EndpointAddress)(yyv2211), d) + h.decSliceEndpointAddress((*[]EndpointAddress)(yyv2304), d) } } - yyj2210++ - if yyhl2210 { - yyb2210 = yyj2210 > l + yyj2303++ + if yyhl2303 { + yyb2303 = yyj2303 > l } else { - yyb2210 = r.CheckBreak() + yyb2303 = r.CheckBreak() } - if yyb2210 { + if yyb2303 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28484,21 +29810,21 @@ func (x *EndpointSubset) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.NotReadyAddresses = nil } else { - yyv2213 := &x.NotReadyAddresses - yym2214 := z.DecBinary() - _ = yym2214 + yyv2306 := &x.NotReadyAddresses + yym2307 := z.DecBinary() + _ = yym2307 if false { } else { - h.decSliceEndpointAddress((*[]EndpointAddress)(yyv2213), d) + h.decSliceEndpointAddress((*[]EndpointAddress)(yyv2306), d) } } - yyj2210++ - if yyhl2210 { - yyb2210 = yyj2210 > l + yyj2303++ + if yyhl2303 { + yyb2303 = yyj2303 > l } else { - yyb2210 = r.CheckBreak() + yyb2303 = r.CheckBreak() } - if yyb2210 { + if yyb2303 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28506,26 +29832,26 @@ func (x *EndpointSubset) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Ports = nil } else { - yyv2215 := &x.Ports - yym2216 := z.DecBinary() - _ = yym2216 + yyv2308 := &x.Ports + yym2309 := z.DecBinary() + _ = yym2309 if false { } else { - h.decSliceEndpointPort((*[]EndpointPort)(yyv2215), d) + h.decSliceEndpointPort((*[]EndpointPort)(yyv2308), d) } } for { - yyj2210++ - if yyhl2210 { - yyb2210 = yyj2210 > l + yyj2303++ + if yyhl2303 { + yyb2303 = yyj2303 > l } else { - yyb2210 = r.CheckBreak() + yyb2303 = r.CheckBreak() } - if yyb2210 { + if yyb2303 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2210-1, "") + z.DecStructFieldNotFound(yyj2303-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -28537,34 +29863,34 @@ func (x *EndpointAddress) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2217 := z.EncBinary() - _ = yym2217 + yym2310 := z.EncBinary() + _ = yym2310 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2218 := !z.EncBinary() - yy2arr2218 := z.EncBasicHandle().StructToArray - var yyq2218 [2]bool - _, _, _ = yysep2218, yyq2218, yy2arr2218 - const yyr2218 bool = false - yyq2218[1] = x.TargetRef != nil - var yynn2218 int - if yyr2218 || yy2arr2218 { + yysep2311 := !z.EncBinary() + yy2arr2311 := z.EncBasicHandle().StructToArray + var yyq2311 [2]bool + _, _, _ = yysep2311, yyq2311, yy2arr2311 + const yyr2311 bool = false + yyq2311[1] = x.TargetRef != nil + var yynn2311 int + if yyr2311 || yy2arr2311 { r.EncodeArrayStart(2) } else { - yynn2218 = 1 - for _, b := range yyq2218 { + yynn2311 = 1 + for _, b := range yyq2311 { if b { - yynn2218++ + yynn2311++ } } - r.EncodeMapStart(yynn2218) - yynn2218 = 0 + r.EncodeMapStart(yynn2311) + yynn2311 = 0 } - if yyr2218 || yy2arr2218 { + if yyr2311 || yy2arr2311 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2220 := z.EncBinary() - _ = yym2220 + yym2313 := z.EncBinary() + _ = yym2313 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.IP)) @@ -28573,16 +29899,16 @@ func (x *EndpointAddress) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("ip")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2221 := z.EncBinary() - _ = yym2221 + yym2314 := z.EncBinary() + _ = yym2314 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.IP)) } } - if yyr2218 || yy2arr2218 { + if yyr2311 || yy2arr2311 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2218[1] { + if yyq2311[1] { if x.TargetRef == nil { r.EncodeNil() } else { @@ -28592,7 +29918,7 @@ func (x *EndpointAddress) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2218[1] { + if yyq2311[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("targetRef")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -28603,7 +29929,7 @@ func (x *EndpointAddress) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2218 || yy2arr2218 { + if yyr2311 || yy2arr2311 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -28616,25 +29942,25 @@ func (x *EndpointAddress) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2223 := z.DecBinary() - _ = yym2223 + yym2316 := z.DecBinary() + _ = yym2316 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2224 := r.ContainerType() - if yyct2224 == codecSelferValueTypeMap1234 { - yyl2224 := r.ReadMapStart() - if yyl2224 == 0 { + yyct2317 := r.ContainerType() + if yyct2317 == codecSelferValueTypeMap1234 { + yyl2317 := r.ReadMapStart() + if yyl2317 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2224, d) + x.codecDecodeSelfFromMap(yyl2317, d) } - } else if yyct2224 == codecSelferValueTypeArray1234 { - yyl2224 := r.ReadArrayStart() - if yyl2224 == 0 { + } else if yyct2317 == codecSelferValueTypeArray1234 { + yyl2317 := r.ReadArrayStart() + if yyl2317 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2224, d) + x.codecDecodeSelfFromArray(yyl2317, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -28646,12 +29972,12 @@ func (x *EndpointAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2225Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2225Slc - var yyhl2225 bool = l >= 0 - for yyj2225 := 0; ; yyj2225++ { - if yyhl2225 { - if yyj2225 >= l { + var yys2318Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2318Slc + var yyhl2318 bool = l >= 0 + for yyj2318 := 0; ; yyj2318++ { + if yyhl2318 { + if yyj2318 >= l { break } } else { @@ -28660,10 +29986,10 @@ func (x *EndpointAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2225Slc = r.DecodeBytes(yys2225Slc, true, true) - yys2225 := string(yys2225Slc) + yys2318Slc = r.DecodeBytes(yys2318Slc, true, true) + yys2318 := string(yys2318Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2225 { + switch yys2318 { case "ip": if r.TryDecodeAsNil() { x.IP = "" @@ -28682,9 +30008,9 @@ func (x *EndpointAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.TargetRef.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2225) - } // end switch yys2225 - } // end for yyj2225 + z.DecStructFieldNotFound(-1, yys2318) + } // end switch yys2318 + } // end for yyj2318 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -28692,16 +30018,16 @@ func (x *EndpointAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2228 int - var yyb2228 bool - var yyhl2228 bool = l >= 0 - yyj2228++ - if yyhl2228 { - yyb2228 = yyj2228 > l + var yyj2321 int + var yyb2321 bool + var yyhl2321 bool = l >= 0 + yyj2321++ + if yyhl2321 { + yyb2321 = yyj2321 > l } else { - yyb2228 = r.CheckBreak() + yyb2321 = r.CheckBreak() } - if yyb2228 { + if yyb2321 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28711,13 +30037,13 @@ func (x *EndpointAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.IP = string(r.DecodeString()) } - yyj2228++ - if yyhl2228 { - yyb2228 = yyj2228 > l + yyj2321++ + if yyhl2321 { + yyb2321 = yyj2321 > l } else { - yyb2228 = r.CheckBreak() + yyb2321 = r.CheckBreak() } - if yyb2228 { + if yyb2321 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28733,17 +30059,17 @@ func (x *EndpointAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) x.TargetRef.CodecDecodeSelf(d) } for { - yyj2228++ - if yyhl2228 { - yyb2228 = yyj2228 > l + yyj2321++ + if yyhl2321 { + yyb2321 = yyj2321 > l } else { - yyb2228 = r.CheckBreak() + yyb2321 = r.CheckBreak() } - if yyb2228 { + if yyb2321 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2228-1, "") + z.DecStructFieldNotFound(yyj2321-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -28755,36 +30081,36 @@ func (x *EndpointPort) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2231 := z.EncBinary() - _ = yym2231 + yym2324 := z.EncBinary() + _ = yym2324 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2232 := !z.EncBinary() - yy2arr2232 := z.EncBasicHandle().StructToArray - var yyq2232 [3]bool - _, _, _ = yysep2232, yyq2232, yy2arr2232 - const yyr2232 bool = false - yyq2232[0] = x.Name != "" - yyq2232[2] = x.Protocol != "" - var yynn2232 int - if yyr2232 || yy2arr2232 { + yysep2325 := !z.EncBinary() + yy2arr2325 := z.EncBasicHandle().StructToArray + var yyq2325 [3]bool + _, _, _ = yysep2325, yyq2325, yy2arr2325 + const yyr2325 bool = false + yyq2325[0] = x.Name != "" + yyq2325[2] = x.Protocol != "" + var yynn2325 int + if yyr2325 || yy2arr2325 { r.EncodeArrayStart(3) } else { - yynn2232 = 1 - for _, b := range yyq2232 { + yynn2325 = 1 + for _, b := range yyq2325 { if b { - yynn2232++ + yynn2325++ } } - r.EncodeMapStart(yynn2232) - yynn2232 = 0 + r.EncodeMapStart(yynn2325) + yynn2325 = 0 } - if yyr2232 || yy2arr2232 { + if yyr2325 || yy2arr2325 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2232[0] { - yym2234 := z.EncBinary() - _ = yym2234 + if yyq2325[0] { + yym2327 := z.EncBinary() + _ = yym2327 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -28793,22 +30119,22 @@ func (x *EndpointPort) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2232[0] { + if yyq2325[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2235 := z.EncBinary() - _ = yym2235 + yym2328 := z.EncBinary() + _ = yym2328 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } } - if yyr2232 || yy2arr2232 { + if yyr2325 || yy2arr2325 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2237 := z.EncBinary() - _ = yym2237 + yym2330 := z.EncBinary() + _ = yym2330 if false { } else { r.EncodeInt(int64(x.Port)) @@ -28817,29 +30143,29 @@ func (x *EndpointPort) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("port")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2238 := z.EncBinary() - _ = yym2238 + yym2331 := z.EncBinary() + _ = yym2331 if false { } else { r.EncodeInt(int64(x.Port)) } } - if yyr2232 || yy2arr2232 { + if yyr2325 || yy2arr2325 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2232[2] { + if yyq2325[2] { x.Protocol.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2232[2] { + if yyq2325[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("protocol")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Protocol.CodecEncodeSelf(e) } } - if yyr2232 || yy2arr2232 { + if yyr2325 || yy2arr2325 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -28852,25 +30178,25 @@ func (x *EndpointPort) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2240 := z.DecBinary() - _ = yym2240 + yym2333 := z.DecBinary() + _ = yym2333 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2241 := r.ContainerType() - if yyct2241 == codecSelferValueTypeMap1234 { - yyl2241 := r.ReadMapStart() - if yyl2241 == 0 { + yyct2334 := r.ContainerType() + if yyct2334 == codecSelferValueTypeMap1234 { + yyl2334 := r.ReadMapStart() + if yyl2334 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2241, d) + x.codecDecodeSelfFromMap(yyl2334, d) } - } else if yyct2241 == codecSelferValueTypeArray1234 { - yyl2241 := r.ReadArrayStart() - if yyl2241 == 0 { + } else if yyct2334 == codecSelferValueTypeArray1234 { + yyl2334 := r.ReadArrayStart() + if yyl2334 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2241, d) + x.codecDecodeSelfFromArray(yyl2334, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -28882,12 +30208,12 @@ func (x *EndpointPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2242Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2242Slc - var yyhl2242 bool = l >= 0 - for yyj2242 := 0; ; yyj2242++ { - if yyhl2242 { - if yyj2242 >= l { + var yys2335Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2335Slc + var yyhl2335 bool = l >= 0 + for yyj2335 := 0; ; yyj2335++ { + if yyhl2335 { + if yyj2335 >= l { break } } else { @@ -28896,10 +30222,10 @@ func (x *EndpointPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2242Slc = r.DecodeBytes(yys2242Slc, true, true) - yys2242 := string(yys2242Slc) + yys2335Slc = r.DecodeBytes(yys2335Slc, true, true) + yys2335 := string(yys2335Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2242 { + switch yys2335 { case "name": if r.TryDecodeAsNil() { x.Name = "" @@ -28919,9 +30245,9 @@ func (x *EndpointPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Protocol = Protocol(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys2242) - } // end switch yys2242 - } // end for yyj2242 + z.DecStructFieldNotFound(-1, yys2335) + } // end switch yys2335 + } // end for yyj2335 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -28929,16 +30255,16 @@ func (x *EndpointPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2246 int - var yyb2246 bool - var yyhl2246 bool = l >= 0 - yyj2246++ - if yyhl2246 { - yyb2246 = yyj2246 > l + var yyj2339 int + var yyb2339 bool + var yyhl2339 bool = l >= 0 + yyj2339++ + if yyhl2339 { + yyb2339 = yyj2339 > l } else { - yyb2246 = r.CheckBreak() + yyb2339 = r.CheckBreak() } - if yyb2246 { + if yyb2339 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28948,13 +30274,13 @@ func (x *EndpointPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Name = string(r.DecodeString()) } - yyj2246++ - if yyhl2246 { - yyb2246 = yyj2246 > l + yyj2339++ + if yyhl2339 { + yyb2339 = yyj2339 > l } else { - yyb2246 = r.CheckBreak() + yyb2339 = r.CheckBreak() } - if yyb2246 { + if yyb2339 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28964,13 +30290,13 @@ func (x *EndpointPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Port = int32(r.DecodeInt(32)) } - yyj2246++ - if yyhl2246 { - yyb2246 = yyj2246 > l + yyj2339++ + if yyhl2339 { + yyb2339 = yyj2339 > l } else { - yyb2246 = r.CheckBreak() + yyb2339 = r.CheckBreak() } - if yyb2246 { + if yyb2339 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28981,17 +30307,17 @@ func (x *EndpointPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Protocol = Protocol(r.DecodeString()) } for { - yyj2246++ - if yyhl2246 { - yyb2246 = yyj2246 > l + yyj2339++ + if yyhl2339 { + yyb2339 = yyj2339 > l } else { - yyb2246 = r.CheckBreak() + yyb2339 = r.CheckBreak() } - if yyb2246 { + if yyb2339 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2246-1, "") + z.DecStructFieldNotFound(yyj2339-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -29003,37 +30329,37 @@ func (x *EndpointsList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2250 := z.EncBinary() - _ = yym2250 + yym2343 := z.EncBinary() + _ = yym2343 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2251 := !z.EncBinary() - yy2arr2251 := z.EncBasicHandle().StructToArray - var yyq2251 [4]bool - _, _, _ = yysep2251, yyq2251, yy2arr2251 - const yyr2251 bool = false - yyq2251[0] = x.Kind != "" - yyq2251[1] = x.APIVersion != "" - yyq2251[2] = true - var yynn2251 int - if yyr2251 || yy2arr2251 { + yysep2344 := !z.EncBinary() + yy2arr2344 := z.EncBasicHandle().StructToArray + var yyq2344 [4]bool + _, _, _ = yysep2344, yyq2344, yy2arr2344 + const yyr2344 bool = false + yyq2344[0] = x.Kind != "" + yyq2344[1] = x.APIVersion != "" + yyq2344[2] = true + var yynn2344 int + if yyr2344 || yy2arr2344 { r.EncodeArrayStart(4) } else { - yynn2251 = 1 - for _, b := range yyq2251 { + yynn2344 = 1 + for _, b := range yyq2344 { if b { - yynn2251++ + yynn2344++ } } - r.EncodeMapStart(yynn2251) - yynn2251 = 0 + r.EncodeMapStart(yynn2344) + yynn2344 = 0 } - if yyr2251 || yy2arr2251 { + if yyr2344 || yy2arr2344 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2251[0] { - yym2253 := z.EncBinary() - _ = yym2253 + if yyq2344[0] { + yym2346 := z.EncBinary() + _ = yym2346 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -29042,23 +30368,23 @@ func (x *EndpointsList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2251[0] { + if yyq2344[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2254 := z.EncBinary() - _ = yym2254 + yym2347 := z.EncBinary() + _ = yym2347 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2251 || yy2arr2251 { + if yyr2344 || yy2arr2344 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2251[1] { - yym2256 := z.EncBinary() - _ = yym2256 + if yyq2344[1] { + yym2349 := z.EncBinary() + _ = yym2349 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -29067,54 +30393,54 @@ func (x *EndpointsList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2251[1] { + if yyq2344[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2257 := z.EncBinary() - _ = yym2257 + yym2350 := z.EncBinary() + _ = yym2350 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2251 || yy2arr2251 { + if yyr2344 || yy2arr2344 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2251[2] { - yy2259 := &x.ListMeta - yym2260 := z.EncBinary() - _ = yym2260 + if yyq2344[2] { + yy2352 := &x.ListMeta + yym2353 := z.EncBinary() + _ = yym2353 if false { - } else if z.HasExtensions() && z.EncExt(yy2259) { + } else if z.HasExtensions() && z.EncExt(yy2352) { } else { - z.EncFallback(yy2259) + z.EncFallback(yy2352) } } else { r.EncodeNil() } } else { - if yyq2251[2] { + if yyq2344[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2261 := &x.ListMeta - yym2262 := z.EncBinary() - _ = yym2262 + yy2354 := &x.ListMeta + yym2355 := z.EncBinary() + _ = yym2355 if false { - } else if z.HasExtensions() && z.EncExt(yy2261) { + } else if z.HasExtensions() && z.EncExt(yy2354) { } else { - z.EncFallback(yy2261) + z.EncFallback(yy2354) } } } - if yyr2251 || yy2arr2251 { + if yyr2344 || yy2arr2344 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym2264 := z.EncBinary() - _ = yym2264 + yym2357 := z.EncBinary() + _ = yym2357 if false { } else { h.encSliceEndpoints(([]Endpoints)(x.Items), e) @@ -29127,15 +30453,15 @@ func (x *EndpointsList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym2265 := z.EncBinary() - _ = yym2265 + yym2358 := z.EncBinary() + _ = yym2358 if false { } else { h.encSliceEndpoints(([]Endpoints)(x.Items), e) } } } - if yyr2251 || yy2arr2251 { + if yyr2344 || yy2arr2344 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -29148,25 +30474,25 @@ func (x *EndpointsList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2266 := z.DecBinary() - _ = yym2266 + yym2359 := z.DecBinary() + _ = yym2359 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2267 := r.ContainerType() - if yyct2267 == codecSelferValueTypeMap1234 { - yyl2267 := r.ReadMapStart() - if yyl2267 == 0 { + yyct2360 := r.ContainerType() + if yyct2360 == codecSelferValueTypeMap1234 { + yyl2360 := r.ReadMapStart() + if yyl2360 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2267, d) + x.codecDecodeSelfFromMap(yyl2360, d) } - } else if yyct2267 == codecSelferValueTypeArray1234 { - yyl2267 := r.ReadArrayStart() - if yyl2267 == 0 { + } else if yyct2360 == codecSelferValueTypeArray1234 { + yyl2360 := r.ReadArrayStart() + if yyl2360 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2267, d) + x.codecDecodeSelfFromArray(yyl2360, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -29178,12 +30504,12 @@ func (x *EndpointsList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2268Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2268Slc - var yyhl2268 bool = l >= 0 - for yyj2268 := 0; ; yyj2268++ { - if yyhl2268 { - if yyj2268 >= l { + var yys2361Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2361Slc + var yyhl2361 bool = l >= 0 + for yyj2361 := 0; ; yyj2361++ { + if yyhl2361 { + if yyj2361 >= l { break } } else { @@ -29192,10 +30518,10 @@ func (x *EndpointsList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2268Slc = r.DecodeBytes(yys2268Slc, true, true) - yys2268 := string(yys2268Slc) + yys2361Slc = r.DecodeBytes(yys2361Slc, true, true) + yys2361 := string(yys2361Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2268 { + switch yys2361 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -29212,31 +30538,31 @@ func (x *EndpointsList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv2271 := &x.ListMeta - yym2272 := z.DecBinary() - _ = yym2272 + yyv2364 := &x.ListMeta + yym2365 := z.DecBinary() + _ = yym2365 if false { - } else if z.HasExtensions() && z.DecExt(yyv2271) { + } else if z.HasExtensions() && z.DecExt(yyv2364) { } else { - z.DecFallback(yyv2271, false) + z.DecFallback(yyv2364, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2273 := &x.Items - yym2274 := z.DecBinary() - _ = yym2274 + yyv2366 := &x.Items + yym2367 := z.DecBinary() + _ = yym2367 if false { } else { - h.decSliceEndpoints((*[]Endpoints)(yyv2273), d) + h.decSliceEndpoints((*[]Endpoints)(yyv2366), d) } } default: - z.DecStructFieldNotFound(-1, yys2268) - } // end switch yys2268 - } // end for yyj2268 + z.DecStructFieldNotFound(-1, yys2361) + } // end switch yys2361 + } // end for yyj2361 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -29244,16 +30570,16 @@ func (x *EndpointsList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2275 int - var yyb2275 bool - var yyhl2275 bool = l >= 0 - yyj2275++ - if yyhl2275 { - yyb2275 = yyj2275 > l + var yyj2368 int + var yyb2368 bool + var yyhl2368 bool = l >= 0 + yyj2368++ + if yyhl2368 { + yyb2368 = yyj2368 > l } else { - yyb2275 = r.CheckBreak() + yyb2368 = r.CheckBreak() } - if yyb2275 { + if yyb2368 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29263,13 +30589,13 @@ func (x *EndpointsList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2275++ - if yyhl2275 { - yyb2275 = yyj2275 > l + yyj2368++ + if yyhl2368 { + yyb2368 = yyj2368 > l } else { - yyb2275 = r.CheckBreak() + yyb2368 = r.CheckBreak() } - if yyb2275 { + if yyb2368 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29279,13 +30605,13 @@ func (x *EndpointsList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2275++ - if yyhl2275 { - yyb2275 = yyj2275 > l + yyj2368++ + if yyhl2368 { + yyb2368 = yyj2368 > l } else { - yyb2275 = r.CheckBreak() + yyb2368 = r.CheckBreak() } - if yyb2275 { + if yyb2368 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29293,22 +30619,22 @@ func (x *EndpointsList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv2278 := &x.ListMeta - yym2279 := z.DecBinary() - _ = yym2279 + yyv2371 := &x.ListMeta + yym2372 := z.DecBinary() + _ = yym2372 if false { - } else if z.HasExtensions() && z.DecExt(yyv2278) { + } else if z.HasExtensions() && z.DecExt(yyv2371) { } else { - z.DecFallback(yyv2278, false) + z.DecFallback(yyv2371, false) } } - yyj2275++ - if yyhl2275 { - yyb2275 = yyj2275 > l + yyj2368++ + if yyhl2368 { + yyb2368 = yyj2368 > l } else { - yyb2275 = r.CheckBreak() + yyb2368 = r.CheckBreak() } - if yyb2275 { + if yyb2368 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29316,26 +30642,26 @@ func (x *EndpointsList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2280 := &x.Items - yym2281 := z.DecBinary() - _ = yym2281 + yyv2373 := &x.Items + yym2374 := z.DecBinary() + _ = yym2374 if false { } else { - h.decSliceEndpoints((*[]Endpoints)(yyv2280), d) + h.decSliceEndpoints((*[]Endpoints)(yyv2373), d) } } for { - yyj2275++ - if yyhl2275 { - yyb2275 = yyj2275 > l + yyj2368++ + if yyhl2368 { + yyb2368 = yyj2368 > l } else { - yyb2275 = r.CheckBreak() + yyb2368 = r.CheckBreak() } - if yyb2275 { + if yyb2368 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2275-1, "") + z.DecStructFieldNotFound(yyj2368-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -29347,38 +30673,38 @@ func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2282 := z.EncBinary() - _ = yym2282 + yym2375 := z.EncBinary() + _ = yym2375 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2283 := !z.EncBinary() - yy2arr2283 := z.EncBasicHandle().StructToArray - var yyq2283 [4]bool - _, _, _ = yysep2283, yyq2283, yy2arr2283 - const yyr2283 bool = false - yyq2283[0] = x.PodCIDR != "" - yyq2283[1] = x.ExternalID != "" - yyq2283[2] = x.ProviderID != "" - yyq2283[3] = x.Unschedulable != false - var yynn2283 int - if yyr2283 || yy2arr2283 { + yysep2376 := !z.EncBinary() + yy2arr2376 := z.EncBasicHandle().StructToArray + var yyq2376 [4]bool + _, _, _ = yysep2376, yyq2376, yy2arr2376 + const yyr2376 bool = false + yyq2376[0] = x.PodCIDR != "" + yyq2376[1] = x.ExternalID != "" + yyq2376[2] = x.ProviderID != "" + yyq2376[3] = x.Unschedulable != false + var yynn2376 int + if yyr2376 || yy2arr2376 { r.EncodeArrayStart(4) } else { - yynn2283 = 0 - for _, b := range yyq2283 { + yynn2376 = 0 + for _, b := range yyq2376 { if b { - yynn2283++ + yynn2376++ } } - r.EncodeMapStart(yynn2283) - yynn2283 = 0 + r.EncodeMapStart(yynn2376) + yynn2376 = 0 } - if yyr2283 || yy2arr2283 { + if yyr2376 || yy2arr2376 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2283[0] { - yym2285 := z.EncBinary() - _ = yym2285 + if yyq2376[0] { + yym2378 := z.EncBinary() + _ = yym2378 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodCIDR)) @@ -29387,23 +30713,23 @@ func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2283[0] { + if yyq2376[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podCIDR")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2286 := z.EncBinary() - _ = yym2286 + yym2379 := z.EncBinary() + _ = yym2379 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodCIDR)) } } } - if yyr2283 || yy2arr2283 { + if yyr2376 || yy2arr2376 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2283[1] { - yym2288 := z.EncBinary() - _ = yym2288 + if yyq2376[1] { + yym2381 := z.EncBinary() + _ = yym2381 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ExternalID)) @@ -29412,23 +30738,23 @@ func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2283[1] { + if yyq2376[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("externalID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2289 := z.EncBinary() - _ = yym2289 + yym2382 := z.EncBinary() + _ = yym2382 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ExternalID)) } } } - if yyr2283 || yy2arr2283 { + if yyr2376 || yy2arr2376 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2283[2] { - yym2291 := z.EncBinary() - _ = yym2291 + if yyq2376[2] { + yym2384 := z.EncBinary() + _ = yym2384 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ProviderID)) @@ -29437,23 +30763,23 @@ func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2283[2] { + if yyq2376[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("providerID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2292 := z.EncBinary() - _ = yym2292 + yym2385 := z.EncBinary() + _ = yym2385 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ProviderID)) } } } - if yyr2283 || yy2arr2283 { + if yyr2376 || yy2arr2376 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2283[3] { - yym2294 := z.EncBinary() - _ = yym2294 + if yyq2376[3] { + yym2387 := z.EncBinary() + _ = yym2387 if false { } else { r.EncodeBool(bool(x.Unschedulable)) @@ -29462,19 +30788,19 @@ func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq2283[3] { + if yyq2376[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("unschedulable")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2295 := z.EncBinary() - _ = yym2295 + yym2388 := z.EncBinary() + _ = yym2388 if false { } else { r.EncodeBool(bool(x.Unschedulable)) } } } - if yyr2283 || yy2arr2283 { + if yyr2376 || yy2arr2376 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -29487,25 +30813,25 @@ func (x *NodeSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2296 := z.DecBinary() - _ = yym2296 + yym2389 := z.DecBinary() + _ = yym2389 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2297 := r.ContainerType() - if yyct2297 == codecSelferValueTypeMap1234 { - yyl2297 := r.ReadMapStart() - if yyl2297 == 0 { + yyct2390 := r.ContainerType() + if yyct2390 == codecSelferValueTypeMap1234 { + yyl2390 := r.ReadMapStart() + if yyl2390 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2297, d) + x.codecDecodeSelfFromMap(yyl2390, d) } - } else if yyct2297 == codecSelferValueTypeArray1234 { - yyl2297 := r.ReadArrayStart() - if yyl2297 == 0 { + } else if yyct2390 == codecSelferValueTypeArray1234 { + yyl2390 := r.ReadArrayStart() + if yyl2390 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2297, d) + x.codecDecodeSelfFromArray(yyl2390, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -29517,12 +30843,12 @@ func (x *NodeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2298Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2298Slc - var yyhl2298 bool = l >= 0 - for yyj2298 := 0; ; yyj2298++ { - if yyhl2298 { - if yyj2298 >= l { + var yys2391Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2391Slc + var yyhl2391 bool = l >= 0 + for yyj2391 := 0; ; yyj2391++ { + if yyhl2391 { + if yyj2391 >= l { break } } else { @@ -29531,10 +30857,10 @@ func (x *NodeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2298Slc = r.DecodeBytes(yys2298Slc, true, true) - yys2298 := string(yys2298Slc) + yys2391Slc = r.DecodeBytes(yys2391Slc, true, true) + yys2391 := string(yys2391Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2298 { + switch yys2391 { case "podCIDR": if r.TryDecodeAsNil() { x.PodCIDR = "" @@ -29560,9 +30886,9 @@ func (x *NodeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Unschedulable = bool(r.DecodeBool()) } default: - z.DecStructFieldNotFound(-1, yys2298) - } // end switch yys2298 - } // end for yyj2298 + z.DecStructFieldNotFound(-1, yys2391) + } // end switch yys2391 + } // end for yyj2391 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -29570,16 +30896,16 @@ func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2303 int - var yyb2303 bool - var yyhl2303 bool = l >= 0 - yyj2303++ - if yyhl2303 { - yyb2303 = yyj2303 > l + var yyj2396 int + var yyb2396 bool + var yyhl2396 bool = l >= 0 + yyj2396++ + if yyhl2396 { + yyb2396 = yyj2396 > l } else { - yyb2303 = r.CheckBreak() + yyb2396 = r.CheckBreak() } - if yyb2303 { + if yyb2396 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29589,13 +30915,13 @@ func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.PodCIDR = string(r.DecodeString()) } - yyj2303++ - if yyhl2303 { - yyb2303 = yyj2303 > l + yyj2396++ + if yyhl2396 { + yyb2396 = yyj2396 > l } else { - yyb2303 = r.CheckBreak() + yyb2396 = r.CheckBreak() } - if yyb2303 { + if yyb2396 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29605,13 +30931,13 @@ func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.ExternalID = string(r.DecodeString()) } - yyj2303++ - if yyhl2303 { - yyb2303 = yyj2303 > l + yyj2396++ + if yyhl2396 { + yyb2396 = yyj2396 > l } else { - yyb2303 = r.CheckBreak() + yyb2396 = r.CheckBreak() } - if yyb2303 { + if yyb2396 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29621,13 +30947,13 @@ func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.ProviderID = string(r.DecodeString()) } - yyj2303++ - if yyhl2303 { - yyb2303 = yyj2303 > l + yyj2396++ + if yyhl2396 { + yyb2396 = yyj2396 > l } else { - yyb2303 = r.CheckBreak() + yyb2396 = r.CheckBreak() } - if yyb2303 { + if yyb2396 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29638,17 +30964,17 @@ func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Unschedulable = bool(r.DecodeBool()) } for { - yyj2303++ - if yyhl2303 { - yyb2303 = yyj2303 > l + yyj2396++ + if yyhl2396 { + yyb2396 = yyj2396 > l } else { - yyb2303 = r.CheckBreak() + yyb2396 = r.CheckBreak() } - if yyb2303 { + if yyb2396 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2303-1, "") + z.DecStructFieldNotFound(yyj2396-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -29660,33 +30986,33 @@ func (x *DaemonEndpoint) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2308 := z.EncBinary() - _ = yym2308 + yym2401 := z.EncBinary() + _ = yym2401 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2309 := !z.EncBinary() - yy2arr2309 := z.EncBasicHandle().StructToArray - var yyq2309 [1]bool - _, _, _ = yysep2309, yyq2309, yy2arr2309 - const yyr2309 bool = false - var yynn2309 int - if yyr2309 || yy2arr2309 { + yysep2402 := !z.EncBinary() + yy2arr2402 := z.EncBasicHandle().StructToArray + var yyq2402 [1]bool + _, _, _ = yysep2402, yyq2402, yy2arr2402 + const yyr2402 bool = false + var yynn2402 int + if yyr2402 || yy2arr2402 { r.EncodeArrayStart(1) } else { - yynn2309 = 1 - for _, b := range yyq2309 { + yynn2402 = 1 + for _, b := range yyq2402 { if b { - yynn2309++ + yynn2402++ } } - r.EncodeMapStart(yynn2309) - yynn2309 = 0 + r.EncodeMapStart(yynn2402) + yynn2402 = 0 } - if yyr2309 || yy2arr2309 { + if yyr2402 || yy2arr2402 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2311 := z.EncBinary() - _ = yym2311 + yym2404 := z.EncBinary() + _ = yym2404 if false { } else { r.EncodeInt(int64(x.Port)) @@ -29695,14 +31021,14 @@ func (x *DaemonEndpoint) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Port")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2312 := z.EncBinary() - _ = yym2312 + yym2405 := z.EncBinary() + _ = yym2405 if false { } else { r.EncodeInt(int64(x.Port)) } } - if yyr2309 || yy2arr2309 { + if yyr2402 || yy2arr2402 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -29715,25 +31041,25 @@ func (x *DaemonEndpoint) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2313 := z.DecBinary() - _ = yym2313 + yym2406 := z.DecBinary() + _ = yym2406 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2314 := r.ContainerType() - if yyct2314 == codecSelferValueTypeMap1234 { - yyl2314 := r.ReadMapStart() - if yyl2314 == 0 { + yyct2407 := r.ContainerType() + if yyct2407 == codecSelferValueTypeMap1234 { + yyl2407 := r.ReadMapStart() + if yyl2407 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2314, d) + x.codecDecodeSelfFromMap(yyl2407, d) } - } else if yyct2314 == codecSelferValueTypeArray1234 { - yyl2314 := r.ReadArrayStart() - if yyl2314 == 0 { + } else if yyct2407 == codecSelferValueTypeArray1234 { + yyl2407 := r.ReadArrayStart() + if yyl2407 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2314, d) + x.codecDecodeSelfFromArray(yyl2407, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -29745,12 +31071,12 @@ func (x *DaemonEndpoint) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2315Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2315Slc - var yyhl2315 bool = l >= 0 - for yyj2315 := 0; ; yyj2315++ { - if yyhl2315 { - if yyj2315 >= l { + var yys2408Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2408Slc + var yyhl2408 bool = l >= 0 + for yyj2408 := 0; ; yyj2408++ { + if yyhl2408 { + if yyj2408 >= l { break } } else { @@ -29759,10 +31085,10 @@ func (x *DaemonEndpoint) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2315Slc = r.DecodeBytes(yys2315Slc, true, true) - yys2315 := string(yys2315Slc) + yys2408Slc = r.DecodeBytes(yys2408Slc, true, true) + yys2408 := string(yys2408Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2315 { + switch yys2408 { case "Port": if r.TryDecodeAsNil() { x.Port = 0 @@ -29770,9 +31096,9 @@ func (x *DaemonEndpoint) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Port = int32(r.DecodeInt(32)) } default: - z.DecStructFieldNotFound(-1, yys2315) - } // end switch yys2315 - } // end for yyj2315 + z.DecStructFieldNotFound(-1, yys2408) + } // end switch yys2408 + } // end for yyj2408 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -29780,16 +31106,16 @@ func (x *DaemonEndpoint) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2317 int - var yyb2317 bool - var yyhl2317 bool = l >= 0 - yyj2317++ - if yyhl2317 { - yyb2317 = yyj2317 > l + var yyj2410 int + var yyb2410 bool + var yyhl2410 bool = l >= 0 + yyj2410++ + if yyhl2410 { + yyb2410 = yyj2410 > l } else { - yyb2317 = r.CheckBreak() + yyb2410 = r.CheckBreak() } - if yyb2317 { + if yyb2410 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29800,17 +31126,17 @@ func (x *DaemonEndpoint) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Port = int32(r.DecodeInt(32)) } for { - yyj2317++ - if yyhl2317 { - yyb2317 = yyj2317 > l + yyj2410++ + if yyhl2410 { + yyb2410 = yyj2410 > l } else { - yyb2317 = r.CheckBreak() + yyb2410 = r.CheckBreak() } - if yyb2317 { + if yyb2410 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2317-1, "") + z.DecStructFieldNotFound(yyj2410-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -29822,48 +31148,48 @@ func (x *NodeDaemonEndpoints) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2319 := z.EncBinary() - _ = yym2319 + yym2412 := z.EncBinary() + _ = yym2412 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2320 := !z.EncBinary() - yy2arr2320 := z.EncBasicHandle().StructToArray - var yyq2320 [1]bool - _, _, _ = yysep2320, yyq2320, yy2arr2320 - const yyr2320 bool = false - yyq2320[0] = true - var yynn2320 int - if yyr2320 || yy2arr2320 { + yysep2413 := !z.EncBinary() + yy2arr2413 := z.EncBasicHandle().StructToArray + var yyq2413 [1]bool + _, _, _ = yysep2413, yyq2413, yy2arr2413 + const yyr2413 bool = false + yyq2413[0] = true + var yynn2413 int + if yyr2413 || yy2arr2413 { r.EncodeArrayStart(1) } else { - yynn2320 = 0 - for _, b := range yyq2320 { + yynn2413 = 0 + for _, b := range yyq2413 { if b { - yynn2320++ + yynn2413++ } } - r.EncodeMapStart(yynn2320) - yynn2320 = 0 + r.EncodeMapStart(yynn2413) + yynn2413 = 0 } - if yyr2320 || yy2arr2320 { + if yyr2413 || yy2arr2413 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2320[0] { - yy2322 := &x.KubeletEndpoint - yy2322.CodecEncodeSelf(e) + if yyq2413[0] { + yy2415 := &x.KubeletEndpoint + yy2415.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2320[0] { + if yyq2413[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeletEndpoint")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2323 := &x.KubeletEndpoint - yy2323.CodecEncodeSelf(e) + yy2416 := &x.KubeletEndpoint + yy2416.CodecEncodeSelf(e) } } - if yyr2320 || yy2arr2320 { + if yyr2413 || yy2arr2413 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -29876,25 +31202,25 @@ func (x *NodeDaemonEndpoints) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2324 := z.DecBinary() - _ = yym2324 + yym2417 := z.DecBinary() + _ = yym2417 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2325 := r.ContainerType() - if yyct2325 == codecSelferValueTypeMap1234 { - yyl2325 := r.ReadMapStart() - if yyl2325 == 0 { + yyct2418 := r.ContainerType() + if yyct2418 == codecSelferValueTypeMap1234 { + yyl2418 := r.ReadMapStart() + if yyl2418 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2325, d) + x.codecDecodeSelfFromMap(yyl2418, d) } - } else if yyct2325 == codecSelferValueTypeArray1234 { - yyl2325 := r.ReadArrayStart() - if yyl2325 == 0 { + } else if yyct2418 == codecSelferValueTypeArray1234 { + yyl2418 := r.ReadArrayStart() + if yyl2418 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2325, d) + x.codecDecodeSelfFromArray(yyl2418, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -29906,12 +31232,12 @@ func (x *NodeDaemonEndpoints) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2326Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2326Slc - var yyhl2326 bool = l >= 0 - for yyj2326 := 0; ; yyj2326++ { - if yyhl2326 { - if yyj2326 >= l { + var yys2419Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2419Slc + var yyhl2419 bool = l >= 0 + for yyj2419 := 0; ; yyj2419++ { + if yyhl2419 { + if yyj2419 >= l { break } } else { @@ -29920,21 +31246,21 @@ func (x *NodeDaemonEndpoints) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2326Slc = r.DecodeBytes(yys2326Slc, true, true) - yys2326 := string(yys2326Slc) + yys2419Slc = r.DecodeBytes(yys2419Slc, true, true) + yys2419 := string(yys2419Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2326 { + switch yys2419 { case "kubeletEndpoint": if r.TryDecodeAsNil() { x.KubeletEndpoint = DaemonEndpoint{} } else { - yyv2327 := &x.KubeletEndpoint - yyv2327.CodecDecodeSelf(d) + yyv2420 := &x.KubeletEndpoint + yyv2420.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2326) - } // end switch yys2326 - } // end for yyj2326 + z.DecStructFieldNotFound(-1, yys2419) + } // end switch yys2419 + } // end for yyj2419 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -29942,16 +31268,16 @@ func (x *NodeDaemonEndpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2328 int - var yyb2328 bool - var yyhl2328 bool = l >= 0 - yyj2328++ - if yyhl2328 { - yyb2328 = yyj2328 > l + var yyj2421 int + var yyb2421 bool + var yyhl2421 bool = l >= 0 + yyj2421++ + if yyhl2421 { + yyb2421 = yyj2421 > l } else { - yyb2328 = r.CheckBreak() + yyb2421 = r.CheckBreak() } - if yyb2328 { + if yyb2421 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29959,21 +31285,21 @@ func (x *NodeDaemonEndpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.KubeletEndpoint = DaemonEndpoint{} } else { - yyv2329 := &x.KubeletEndpoint - yyv2329.CodecDecodeSelf(d) + yyv2422 := &x.KubeletEndpoint + yyv2422.CodecDecodeSelf(d) } for { - yyj2328++ - if yyhl2328 { - yyb2328 = yyj2328 > l + yyj2421++ + if yyhl2421 { + yyb2421 = yyj2421 > l } else { - yyb2328 = r.CheckBreak() + yyb2421 = r.CheckBreak() } - if yyb2328 { + if yyb2421 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2328-1, "") + z.DecStructFieldNotFound(yyj2421-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -29985,33 +31311,33 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2330 := z.EncBinary() - _ = yym2330 + yym2423 := z.EncBinary() + _ = yym2423 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2331 := !z.EncBinary() - yy2arr2331 := z.EncBasicHandle().StructToArray - var yyq2331 [8]bool - _, _, _ = yysep2331, yyq2331, yy2arr2331 - const yyr2331 bool = false - var yynn2331 int - if yyr2331 || yy2arr2331 { + yysep2424 := !z.EncBinary() + yy2arr2424 := z.EncBasicHandle().StructToArray + var yyq2424 [8]bool + _, _, _ = yysep2424, yyq2424, yy2arr2424 + const yyr2424 bool = false + var yynn2424 int + if yyr2424 || yy2arr2424 { r.EncodeArrayStart(8) } else { - yynn2331 = 8 - for _, b := range yyq2331 { + yynn2424 = 8 + for _, b := range yyq2424 { if b { - yynn2331++ + yynn2424++ } } - r.EncodeMapStart(yynn2331) - yynn2331 = 0 + r.EncodeMapStart(yynn2424) + yynn2424 = 0 } - if yyr2331 || yy2arr2331 { + if yyr2424 || yy2arr2424 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2333 := z.EncBinary() - _ = yym2333 + yym2426 := z.EncBinary() + _ = yym2426 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.MachineID)) @@ -30020,17 +31346,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("machineID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2334 := z.EncBinary() - _ = yym2334 + yym2427 := z.EncBinary() + _ = yym2427 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.MachineID)) } } - if yyr2331 || yy2arr2331 { + if yyr2424 || yy2arr2424 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2336 := z.EncBinary() - _ = yym2336 + yym2429 := z.EncBinary() + _ = yym2429 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.SystemUUID)) @@ -30039,17 +31365,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("systemUUID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2337 := z.EncBinary() - _ = yym2337 + yym2430 := z.EncBinary() + _ = yym2430 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.SystemUUID)) } } - if yyr2331 || yy2arr2331 { + if yyr2424 || yy2arr2424 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2339 := z.EncBinary() - _ = yym2339 + yym2432 := z.EncBinary() + _ = yym2432 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.BootID)) @@ -30058,17 +31384,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("bootID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2340 := z.EncBinary() - _ = yym2340 + yym2433 := z.EncBinary() + _ = yym2433 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.BootID)) } } - if yyr2331 || yy2arr2331 { + if yyr2424 || yy2arr2424 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2342 := z.EncBinary() - _ = yym2342 + yym2435 := z.EncBinary() + _ = yym2435 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KernelVersion)) @@ -30077,17 +31403,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kernelVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2343 := z.EncBinary() - _ = yym2343 + yym2436 := z.EncBinary() + _ = yym2436 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KernelVersion)) } } - if yyr2331 || yy2arr2331 { + if yyr2424 || yy2arr2424 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2345 := z.EncBinary() - _ = yym2345 + yym2438 := z.EncBinary() + _ = yym2438 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.OSImage)) @@ -30096,17 +31422,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("osImage")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2346 := z.EncBinary() - _ = yym2346 + yym2439 := z.EncBinary() + _ = yym2439 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.OSImage)) } } - if yyr2331 || yy2arr2331 { + if yyr2424 || yy2arr2424 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2348 := z.EncBinary() - _ = yym2348 + yym2441 := z.EncBinary() + _ = yym2441 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContainerRuntimeVersion)) @@ -30115,17 +31441,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("containerRuntimeVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2349 := z.EncBinary() - _ = yym2349 + yym2442 := z.EncBinary() + _ = yym2442 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContainerRuntimeVersion)) } } - if yyr2331 || yy2arr2331 { + if yyr2424 || yy2arr2424 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2351 := z.EncBinary() - _ = yym2351 + yym2444 := z.EncBinary() + _ = yym2444 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KubeletVersion)) @@ -30134,17 +31460,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeletVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2352 := z.EncBinary() - _ = yym2352 + yym2445 := z.EncBinary() + _ = yym2445 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KubeletVersion)) } } - if yyr2331 || yy2arr2331 { + if yyr2424 || yy2arr2424 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2354 := z.EncBinary() - _ = yym2354 + yym2447 := z.EncBinary() + _ = yym2447 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KubeProxyVersion)) @@ -30153,14 +31479,14 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeProxyVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2355 := z.EncBinary() - _ = yym2355 + yym2448 := z.EncBinary() + _ = yym2448 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KubeProxyVersion)) } } - if yyr2331 || yy2arr2331 { + if yyr2424 || yy2arr2424 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -30173,25 +31499,25 @@ func (x *NodeSystemInfo) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2356 := z.DecBinary() - _ = yym2356 + yym2449 := z.DecBinary() + _ = yym2449 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2357 := r.ContainerType() - if yyct2357 == codecSelferValueTypeMap1234 { - yyl2357 := r.ReadMapStart() - if yyl2357 == 0 { + yyct2450 := r.ContainerType() + if yyct2450 == codecSelferValueTypeMap1234 { + yyl2450 := r.ReadMapStart() + if yyl2450 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2357, d) + x.codecDecodeSelfFromMap(yyl2450, d) } - } else if yyct2357 == codecSelferValueTypeArray1234 { - yyl2357 := r.ReadArrayStart() - if yyl2357 == 0 { + } else if yyct2450 == codecSelferValueTypeArray1234 { + yyl2450 := r.ReadArrayStart() + if yyl2450 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2357, d) + x.codecDecodeSelfFromArray(yyl2450, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -30203,12 +31529,12 @@ func (x *NodeSystemInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2358Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2358Slc - var yyhl2358 bool = l >= 0 - for yyj2358 := 0; ; yyj2358++ { - if yyhl2358 { - if yyj2358 >= l { + var yys2451Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2451Slc + var yyhl2451 bool = l >= 0 + for yyj2451 := 0; ; yyj2451++ { + if yyhl2451 { + if yyj2451 >= l { break } } else { @@ -30217,10 +31543,10 @@ func (x *NodeSystemInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2358Slc = r.DecodeBytes(yys2358Slc, true, true) - yys2358 := string(yys2358Slc) + yys2451Slc = r.DecodeBytes(yys2451Slc, true, true) + yys2451 := string(yys2451Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2358 { + switch yys2451 { case "machineID": if r.TryDecodeAsNil() { x.MachineID = "" @@ -30270,9 +31596,9 @@ func (x *NodeSystemInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.KubeProxyVersion = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys2358) - } // end switch yys2358 - } // end for yyj2358 + z.DecStructFieldNotFound(-1, yys2451) + } // end switch yys2451 + } // end for yyj2451 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -30280,16 +31606,16 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2367 int - var yyb2367 bool - var yyhl2367 bool = l >= 0 - yyj2367++ - if yyhl2367 { - yyb2367 = yyj2367 > l + var yyj2460 int + var yyb2460 bool + var yyhl2460 bool = l >= 0 + yyj2460++ + if yyhl2460 { + yyb2460 = yyj2460 > l } else { - yyb2367 = r.CheckBreak() + yyb2460 = r.CheckBreak() } - if yyb2367 { + if yyb2460 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30299,13 +31625,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.MachineID = string(r.DecodeString()) } - yyj2367++ - if yyhl2367 { - yyb2367 = yyj2367 > l + yyj2460++ + if yyhl2460 { + yyb2460 = yyj2460 > l } else { - yyb2367 = r.CheckBreak() + yyb2460 = r.CheckBreak() } - if yyb2367 { + if yyb2460 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30315,13 +31641,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.SystemUUID = string(r.DecodeString()) } - yyj2367++ - if yyhl2367 { - yyb2367 = yyj2367 > l + yyj2460++ + if yyhl2460 { + yyb2460 = yyj2460 > l } else { - yyb2367 = r.CheckBreak() + yyb2460 = r.CheckBreak() } - if yyb2367 { + if yyb2460 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30331,13 +31657,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.BootID = string(r.DecodeString()) } - yyj2367++ - if yyhl2367 { - yyb2367 = yyj2367 > l + yyj2460++ + if yyhl2460 { + yyb2460 = yyj2460 > l } else { - yyb2367 = r.CheckBreak() + yyb2460 = r.CheckBreak() } - if yyb2367 { + if yyb2460 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30347,13 +31673,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.KernelVersion = string(r.DecodeString()) } - yyj2367++ - if yyhl2367 { - yyb2367 = yyj2367 > l + yyj2460++ + if yyhl2460 { + yyb2460 = yyj2460 > l } else { - yyb2367 = r.CheckBreak() + yyb2460 = r.CheckBreak() } - if yyb2367 { + if yyb2460 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30363,13 +31689,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.OSImage = string(r.DecodeString()) } - yyj2367++ - if yyhl2367 { - yyb2367 = yyj2367 > l + yyj2460++ + if yyhl2460 { + yyb2460 = yyj2460 > l } else { - yyb2367 = r.CheckBreak() + yyb2460 = r.CheckBreak() } - if yyb2367 { + if yyb2460 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30379,13 +31705,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.ContainerRuntimeVersion = string(r.DecodeString()) } - yyj2367++ - if yyhl2367 { - yyb2367 = yyj2367 > l + yyj2460++ + if yyhl2460 { + yyb2460 = yyj2460 > l } else { - yyb2367 = r.CheckBreak() + yyb2460 = r.CheckBreak() } - if yyb2367 { + if yyb2460 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30395,13 +31721,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.KubeletVersion = string(r.DecodeString()) } - yyj2367++ - if yyhl2367 { - yyb2367 = yyj2367 > l + yyj2460++ + if yyhl2460 { + yyb2460 = yyj2460 > l } else { - yyb2367 = r.CheckBreak() + yyb2460 = r.CheckBreak() } - if yyb2367 { + if yyb2460 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30412,17 +31738,17 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.KubeProxyVersion = string(r.DecodeString()) } for { - yyj2367++ - if yyhl2367 { - yyb2367 = yyj2367 > l + yyj2460++ + if yyhl2460 { + yyb2460 = yyj2460 > l } else { - yyb2367 = r.CheckBreak() + yyb2460 = r.CheckBreak() } - if yyb2367 { + if yyb2460 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2367-1, "") + z.DecStructFieldNotFound(yyj2460-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -30434,39 +31760,39 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2376 := z.EncBinary() - _ = yym2376 + yym2469 := z.EncBinary() + _ = yym2469 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2377 := !z.EncBinary() - yy2arr2377 := z.EncBasicHandle().StructToArray - var yyq2377 [8]bool - _, _, _ = yysep2377, yyq2377, yy2arr2377 - const yyr2377 bool = false - yyq2377[0] = len(x.Capacity) != 0 - yyq2377[1] = len(x.Allocatable) != 0 - yyq2377[2] = x.Phase != "" - yyq2377[3] = len(x.Conditions) != 0 - yyq2377[4] = len(x.Addresses) != 0 - yyq2377[5] = true - yyq2377[6] = true - var yynn2377 int - if yyr2377 || yy2arr2377 { + yysep2470 := !z.EncBinary() + yy2arr2470 := z.EncBasicHandle().StructToArray + var yyq2470 [8]bool + _, _, _ = yysep2470, yyq2470, yy2arr2470 + const yyr2470 bool = false + yyq2470[0] = len(x.Capacity) != 0 + yyq2470[1] = len(x.Allocatable) != 0 + yyq2470[2] = x.Phase != "" + yyq2470[3] = len(x.Conditions) != 0 + yyq2470[4] = len(x.Addresses) != 0 + yyq2470[5] = true + yyq2470[6] = true + var yynn2470 int + if yyr2470 || yy2arr2470 { r.EncodeArrayStart(8) } else { - yynn2377 = 1 - for _, b := range yyq2377 { + yynn2470 = 1 + for _, b := range yyq2470 { if b { - yynn2377++ + yynn2470++ } } - r.EncodeMapStart(yynn2377) - yynn2377 = 0 + r.EncodeMapStart(yynn2470) + yynn2470 = 0 } - if yyr2377 || yy2arr2377 { + if yyr2470 || yy2arr2470 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2377[0] { + if yyq2470[0] { if x.Capacity == nil { r.EncodeNil() } else { @@ -30476,7 +31802,7 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2377[0] { + if yyq2470[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("capacity")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -30487,9 +31813,9 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2377 || yy2arr2377 { + if yyr2470 || yy2arr2470 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2377[1] { + if yyq2470[1] { if x.Allocatable == nil { r.EncodeNil() } else { @@ -30499,7 +31825,7 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2377[1] { + if yyq2470[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("allocatable")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -30510,29 +31836,29 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2377 || yy2arr2377 { + if yyr2470 || yy2arr2470 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2377[2] { + if yyq2470[2] { x.Phase.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2377[2] { + if yyq2470[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("phase")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Phase.CodecEncodeSelf(e) } } - if yyr2377 || yy2arr2377 { + if yyr2470 || yy2arr2470 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2377[3] { + if yyq2470[3] { if x.Conditions == nil { r.EncodeNil() } else { - yym2382 := z.EncBinary() - _ = yym2382 + yym2475 := z.EncBinary() + _ = yym2475 if false { } else { h.encSliceNodeCondition(([]NodeCondition)(x.Conditions), e) @@ -30542,15 +31868,15 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2377[3] { + if yyq2470[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("conditions")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Conditions == nil { r.EncodeNil() } else { - yym2383 := z.EncBinary() - _ = yym2383 + yym2476 := z.EncBinary() + _ = yym2476 if false { } else { h.encSliceNodeCondition(([]NodeCondition)(x.Conditions), e) @@ -30558,14 +31884,14 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2377 || yy2arr2377 { + if yyr2470 || yy2arr2470 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2377[4] { + if yyq2470[4] { if x.Addresses == nil { r.EncodeNil() } else { - yym2385 := z.EncBinary() - _ = yym2385 + yym2478 := z.EncBinary() + _ = yym2478 if false { } else { h.encSliceNodeAddress(([]NodeAddress)(x.Addresses), e) @@ -30575,15 +31901,15 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2377[4] { + if yyq2470[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("addresses")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Addresses == nil { r.EncodeNil() } else { - yym2386 := z.EncBinary() - _ = yym2386 + yym2479 := z.EncBinary() + _ = yym2479 if false { } else { h.encSliceNodeAddress(([]NodeAddress)(x.Addresses), e) @@ -30591,47 +31917,47 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2377 || yy2arr2377 { + if yyr2470 || yy2arr2470 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2377[5] { - yy2388 := &x.DaemonEndpoints - yy2388.CodecEncodeSelf(e) + if yyq2470[5] { + yy2481 := &x.DaemonEndpoints + yy2481.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2377[5] { + if yyq2470[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("daemonEndpoints")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2389 := &x.DaemonEndpoints - yy2389.CodecEncodeSelf(e) + yy2482 := &x.DaemonEndpoints + yy2482.CodecEncodeSelf(e) } } - if yyr2377 || yy2arr2377 { + if yyr2470 || yy2arr2470 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2377[6] { - yy2391 := &x.NodeInfo - yy2391.CodecEncodeSelf(e) + if yyq2470[6] { + yy2484 := &x.NodeInfo + yy2484.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2377[6] { + if yyq2470[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nodeInfo")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2392 := &x.NodeInfo - yy2392.CodecEncodeSelf(e) + yy2485 := &x.NodeInfo + yy2485.CodecEncodeSelf(e) } } - if yyr2377 || yy2arr2377 { + if yyr2470 || yy2arr2470 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Images == nil { r.EncodeNil() } else { - yym2394 := z.EncBinary() - _ = yym2394 + yym2487 := z.EncBinary() + _ = yym2487 if false { } else { h.encSliceContainerImage(([]ContainerImage)(x.Images), e) @@ -30644,15 +31970,15 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x.Images == nil { r.EncodeNil() } else { - yym2395 := z.EncBinary() - _ = yym2395 + yym2488 := z.EncBinary() + _ = yym2488 if false { } else { h.encSliceContainerImage(([]ContainerImage)(x.Images), e) } } } - if yyr2377 || yy2arr2377 { + if yyr2470 || yy2arr2470 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -30665,25 +31991,25 @@ func (x *NodeStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2396 := z.DecBinary() - _ = yym2396 + yym2489 := z.DecBinary() + _ = yym2489 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2397 := r.ContainerType() - if yyct2397 == codecSelferValueTypeMap1234 { - yyl2397 := r.ReadMapStart() - if yyl2397 == 0 { + yyct2490 := r.ContainerType() + if yyct2490 == codecSelferValueTypeMap1234 { + yyl2490 := r.ReadMapStart() + if yyl2490 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2397, d) + x.codecDecodeSelfFromMap(yyl2490, d) } - } else if yyct2397 == codecSelferValueTypeArray1234 { - yyl2397 := r.ReadArrayStart() - if yyl2397 == 0 { + } else if yyct2490 == codecSelferValueTypeArray1234 { + yyl2490 := r.ReadArrayStart() + if yyl2490 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2397, d) + x.codecDecodeSelfFromArray(yyl2490, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -30695,12 +32021,12 @@ func (x *NodeStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2398Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2398Slc - var yyhl2398 bool = l >= 0 - for yyj2398 := 0; ; yyj2398++ { - if yyhl2398 { - if yyj2398 >= l { + var yys2491Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2491Slc + var yyhl2491 bool = l >= 0 + for yyj2491 := 0; ; yyj2491++ { + if yyhl2491 { + if yyj2491 >= l { break } } else { @@ -30709,23 +32035,23 @@ func (x *NodeStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2398Slc = r.DecodeBytes(yys2398Slc, true, true) - yys2398 := string(yys2398Slc) + yys2491Slc = r.DecodeBytes(yys2491Slc, true, true) + yys2491 := string(yys2491Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2398 { + switch yys2491 { case "capacity": if r.TryDecodeAsNil() { x.Capacity = nil } else { - yyv2399 := &x.Capacity - yyv2399.CodecDecodeSelf(d) + yyv2492 := &x.Capacity + yyv2492.CodecDecodeSelf(d) } case "allocatable": if r.TryDecodeAsNil() { x.Allocatable = nil } else { - yyv2400 := &x.Allocatable - yyv2400.CodecDecodeSelf(d) + yyv2493 := &x.Allocatable + yyv2493.CodecDecodeSelf(d) } case "phase": if r.TryDecodeAsNil() { @@ -30737,56 +32063,56 @@ func (x *NodeStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv2402 := &x.Conditions - yym2403 := z.DecBinary() - _ = yym2403 + yyv2495 := &x.Conditions + yym2496 := z.DecBinary() + _ = yym2496 if false { } else { - h.decSliceNodeCondition((*[]NodeCondition)(yyv2402), d) + h.decSliceNodeCondition((*[]NodeCondition)(yyv2495), d) } } case "addresses": if r.TryDecodeAsNil() { x.Addresses = nil } else { - yyv2404 := &x.Addresses - yym2405 := z.DecBinary() - _ = yym2405 + yyv2497 := &x.Addresses + yym2498 := z.DecBinary() + _ = yym2498 if false { } else { - h.decSliceNodeAddress((*[]NodeAddress)(yyv2404), d) + h.decSliceNodeAddress((*[]NodeAddress)(yyv2497), d) } } case "daemonEndpoints": if r.TryDecodeAsNil() { x.DaemonEndpoints = NodeDaemonEndpoints{} } else { - yyv2406 := &x.DaemonEndpoints - yyv2406.CodecDecodeSelf(d) + yyv2499 := &x.DaemonEndpoints + yyv2499.CodecDecodeSelf(d) } case "nodeInfo": if r.TryDecodeAsNil() { x.NodeInfo = NodeSystemInfo{} } else { - yyv2407 := &x.NodeInfo - yyv2407.CodecDecodeSelf(d) + yyv2500 := &x.NodeInfo + yyv2500.CodecDecodeSelf(d) } case "images": if r.TryDecodeAsNil() { x.Images = nil } else { - yyv2408 := &x.Images - yym2409 := z.DecBinary() - _ = yym2409 + yyv2501 := &x.Images + yym2502 := z.DecBinary() + _ = yym2502 if false { } else { - h.decSliceContainerImage((*[]ContainerImage)(yyv2408), d) + h.decSliceContainerImage((*[]ContainerImage)(yyv2501), d) } } default: - z.DecStructFieldNotFound(-1, yys2398) - } // end switch yys2398 - } // end for yyj2398 + z.DecStructFieldNotFound(-1, yys2491) + } // end switch yys2491 + } // end for yyj2491 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -30794,16 +32120,16 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2410 int - var yyb2410 bool - var yyhl2410 bool = l >= 0 - yyj2410++ - if yyhl2410 { - yyb2410 = yyj2410 > l + var yyj2503 int + var yyb2503 bool + var yyhl2503 bool = l >= 0 + yyj2503++ + if yyhl2503 { + yyb2503 = yyj2503 > l } else { - yyb2410 = r.CheckBreak() + yyb2503 = r.CheckBreak() } - if yyb2410 { + if yyb2503 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30811,16 +32137,16 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Capacity = nil } else { - yyv2411 := &x.Capacity - yyv2411.CodecDecodeSelf(d) + yyv2504 := &x.Capacity + yyv2504.CodecDecodeSelf(d) } - yyj2410++ - if yyhl2410 { - yyb2410 = yyj2410 > l + yyj2503++ + if yyhl2503 { + yyb2503 = yyj2503 > l } else { - yyb2410 = r.CheckBreak() + yyb2503 = r.CheckBreak() } - if yyb2410 { + if yyb2503 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30828,16 +32154,16 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Allocatable = nil } else { - yyv2412 := &x.Allocatable - yyv2412.CodecDecodeSelf(d) + yyv2505 := &x.Allocatable + yyv2505.CodecDecodeSelf(d) } - yyj2410++ - if yyhl2410 { - yyb2410 = yyj2410 > l + yyj2503++ + if yyhl2503 { + yyb2503 = yyj2503 > l } else { - yyb2410 = r.CheckBreak() + yyb2503 = r.CheckBreak() } - if yyb2410 { + if yyb2503 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30847,13 +32173,13 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Phase = NodePhase(r.DecodeString()) } - yyj2410++ - if yyhl2410 { - yyb2410 = yyj2410 > l + yyj2503++ + if yyhl2503 { + yyb2503 = yyj2503 > l } else { - yyb2410 = r.CheckBreak() + yyb2503 = r.CheckBreak() } - if yyb2410 { + if yyb2503 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30861,21 +32187,21 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv2414 := &x.Conditions - yym2415 := z.DecBinary() - _ = yym2415 + yyv2507 := &x.Conditions + yym2508 := z.DecBinary() + _ = yym2508 if false { } else { - h.decSliceNodeCondition((*[]NodeCondition)(yyv2414), d) + h.decSliceNodeCondition((*[]NodeCondition)(yyv2507), d) } } - yyj2410++ - if yyhl2410 { - yyb2410 = yyj2410 > l + yyj2503++ + if yyhl2503 { + yyb2503 = yyj2503 > l } else { - yyb2410 = r.CheckBreak() + yyb2503 = r.CheckBreak() } - if yyb2410 { + if yyb2503 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30883,21 +32209,21 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Addresses = nil } else { - yyv2416 := &x.Addresses - yym2417 := z.DecBinary() - _ = yym2417 + yyv2509 := &x.Addresses + yym2510 := z.DecBinary() + _ = yym2510 if false { } else { - h.decSliceNodeAddress((*[]NodeAddress)(yyv2416), d) + h.decSliceNodeAddress((*[]NodeAddress)(yyv2509), d) } } - yyj2410++ - if yyhl2410 { - yyb2410 = yyj2410 > l + yyj2503++ + if yyhl2503 { + yyb2503 = yyj2503 > l } else { - yyb2410 = r.CheckBreak() + yyb2503 = r.CheckBreak() } - if yyb2410 { + if yyb2503 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30905,16 +32231,16 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.DaemonEndpoints = NodeDaemonEndpoints{} } else { - yyv2418 := &x.DaemonEndpoints - yyv2418.CodecDecodeSelf(d) + yyv2511 := &x.DaemonEndpoints + yyv2511.CodecDecodeSelf(d) } - yyj2410++ - if yyhl2410 { - yyb2410 = yyj2410 > l + yyj2503++ + if yyhl2503 { + yyb2503 = yyj2503 > l } else { - yyb2410 = r.CheckBreak() + yyb2503 = r.CheckBreak() } - if yyb2410 { + if yyb2503 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30922,16 +32248,16 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.NodeInfo = NodeSystemInfo{} } else { - yyv2419 := &x.NodeInfo - yyv2419.CodecDecodeSelf(d) + yyv2512 := &x.NodeInfo + yyv2512.CodecDecodeSelf(d) } - yyj2410++ - if yyhl2410 { - yyb2410 = yyj2410 > l + yyj2503++ + if yyhl2503 { + yyb2503 = yyj2503 > l } else { - yyb2410 = r.CheckBreak() + yyb2503 = r.CheckBreak() } - if yyb2410 { + if yyb2503 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30939,26 +32265,26 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Images = nil } else { - yyv2420 := &x.Images - yym2421 := z.DecBinary() - _ = yym2421 + yyv2513 := &x.Images + yym2514 := z.DecBinary() + _ = yym2514 if false { } else { - h.decSliceContainerImage((*[]ContainerImage)(yyv2420), d) + h.decSliceContainerImage((*[]ContainerImage)(yyv2513), d) } } for { - yyj2410++ - if yyhl2410 { - yyb2410 = yyj2410 > l + yyj2503++ + if yyhl2503 { + yyb2503 = yyj2503 > l } else { - yyb2410 = r.CheckBreak() + yyb2503 = r.CheckBreak() } - if yyb2410 { + if yyb2503 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2410-1, "") + z.DecStructFieldNotFound(yyj2503-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -30970,37 +32296,37 @@ func (x *ContainerImage) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2422 := z.EncBinary() - _ = yym2422 + yym2515 := z.EncBinary() + _ = yym2515 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2423 := !z.EncBinary() - yy2arr2423 := z.EncBasicHandle().StructToArray - var yyq2423 [2]bool - _, _, _ = yysep2423, yyq2423, yy2arr2423 - const yyr2423 bool = false - yyq2423[1] = x.Size != 0 - var yynn2423 int - if yyr2423 || yy2arr2423 { + yysep2516 := !z.EncBinary() + yy2arr2516 := z.EncBasicHandle().StructToArray + var yyq2516 [2]bool + _, _, _ = yysep2516, yyq2516, yy2arr2516 + const yyr2516 bool = false + yyq2516[1] = x.Size != 0 + var yynn2516 int + if yyr2516 || yy2arr2516 { r.EncodeArrayStart(2) } else { - yynn2423 = 1 - for _, b := range yyq2423 { + yynn2516 = 1 + for _, b := range yyq2516 { if b { - yynn2423++ + yynn2516++ } } - r.EncodeMapStart(yynn2423) - yynn2423 = 0 + r.EncodeMapStart(yynn2516) + yynn2516 = 0 } - if yyr2423 || yy2arr2423 { + if yyr2516 || yy2arr2516 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.RepoTags == nil { r.EncodeNil() } else { - yym2425 := z.EncBinary() - _ = yym2425 + yym2518 := z.EncBinary() + _ = yym2518 if false { } else { z.F.EncSliceStringV(x.RepoTags, false, e) @@ -31013,19 +32339,19 @@ func (x *ContainerImage) CodecEncodeSelf(e *codec1978.Encoder) { if x.RepoTags == nil { r.EncodeNil() } else { - yym2426 := z.EncBinary() - _ = yym2426 + yym2519 := z.EncBinary() + _ = yym2519 if false { } else { z.F.EncSliceStringV(x.RepoTags, false, e) } } } - if yyr2423 || yy2arr2423 { + if yyr2516 || yy2arr2516 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2423[1] { - yym2428 := z.EncBinary() - _ = yym2428 + if yyq2516[1] { + yym2521 := z.EncBinary() + _ = yym2521 if false { } else { r.EncodeInt(int64(x.Size)) @@ -31034,19 +32360,19 @@ func (x *ContainerImage) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq2423[1] { + if yyq2516[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("size")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2429 := z.EncBinary() - _ = yym2429 + yym2522 := z.EncBinary() + _ = yym2522 if false { } else { r.EncodeInt(int64(x.Size)) } } } - if yyr2423 || yy2arr2423 { + if yyr2516 || yy2arr2516 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -31059,25 +32385,25 @@ func (x *ContainerImage) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2430 := z.DecBinary() - _ = yym2430 + yym2523 := z.DecBinary() + _ = yym2523 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2431 := r.ContainerType() - if yyct2431 == codecSelferValueTypeMap1234 { - yyl2431 := r.ReadMapStart() - if yyl2431 == 0 { + yyct2524 := r.ContainerType() + if yyct2524 == codecSelferValueTypeMap1234 { + yyl2524 := r.ReadMapStart() + if yyl2524 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2431, d) + x.codecDecodeSelfFromMap(yyl2524, d) } - } else if yyct2431 == codecSelferValueTypeArray1234 { - yyl2431 := r.ReadArrayStart() - if yyl2431 == 0 { + } else if yyct2524 == codecSelferValueTypeArray1234 { + yyl2524 := r.ReadArrayStart() + if yyl2524 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2431, d) + x.codecDecodeSelfFromArray(yyl2524, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -31089,12 +32415,12 @@ func (x *ContainerImage) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2432Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2432Slc - var yyhl2432 bool = l >= 0 - for yyj2432 := 0; ; yyj2432++ { - if yyhl2432 { - if yyj2432 >= l { + var yys2525Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2525Slc + var yyhl2525 bool = l >= 0 + for yyj2525 := 0; ; yyj2525++ { + if yyhl2525 { + if yyj2525 >= l { break } } else { @@ -31103,20 +32429,20 @@ func (x *ContainerImage) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2432Slc = r.DecodeBytes(yys2432Slc, true, true) - yys2432 := string(yys2432Slc) + yys2525Slc = r.DecodeBytes(yys2525Slc, true, true) + yys2525 := string(yys2525Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2432 { + switch yys2525 { case "repoTags": if r.TryDecodeAsNil() { x.RepoTags = nil } else { - yyv2433 := &x.RepoTags - yym2434 := z.DecBinary() - _ = yym2434 + yyv2526 := &x.RepoTags + yym2527 := z.DecBinary() + _ = yym2527 if false { } else { - z.F.DecSliceStringX(yyv2433, false, d) + z.F.DecSliceStringX(yyv2526, false, d) } } case "size": @@ -31126,1081 +32452,13 @@ func (x *ContainerImage) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Size = int64(r.DecodeInt(64)) } default: - z.DecStructFieldNotFound(-1, yys2432) - } // end switch yys2432 - } // end for yyj2432 + z.DecStructFieldNotFound(-1, yys2525) + } // end switch yys2525 + } // end for yyj2525 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } func (x *ContainerImage) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj2436 int - var yyb2436 bool - var yyhl2436 bool = l >= 0 - yyj2436++ - if yyhl2436 { - yyb2436 = yyj2436 > l - } else { - yyb2436 = r.CheckBreak() - } - if yyb2436 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.RepoTags = nil - } else { - yyv2437 := &x.RepoTags - yym2438 := z.DecBinary() - _ = yym2438 - if false { - } else { - z.F.DecSliceStringX(yyv2437, false, d) - } - } - yyj2436++ - if yyhl2436 { - yyb2436 = yyj2436 > l - } else { - yyb2436 = r.CheckBreak() - } - if yyb2436 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Size = 0 - } else { - x.Size = int64(r.DecodeInt(64)) - } - for { - yyj2436++ - if yyhl2436 { - yyb2436 = yyj2436 > l - } else { - yyb2436 = r.CheckBreak() - } - if yyb2436 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2436-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x NodePhase) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym2440 := z.EncBinary() - _ = yym2440 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *NodePhase) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym2441 := z.DecBinary() - _ = yym2441 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - -func (x NodeConditionType) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym2442 := z.EncBinary() - _ = yym2442 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *NodeConditionType) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym2443 := z.DecBinary() - _ = yym2443 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - -func (x *NodeCondition) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym2444 := z.EncBinary() - _ = yym2444 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2445 := !z.EncBinary() - yy2arr2445 := z.EncBasicHandle().StructToArray - var yyq2445 [6]bool - _, _, _ = yysep2445, yyq2445, yy2arr2445 - const yyr2445 bool = false - yyq2445[2] = true - yyq2445[3] = true - yyq2445[4] = x.Reason != "" - yyq2445[5] = x.Message != "" - var yynn2445 int - if yyr2445 || yy2arr2445 { - r.EncodeArrayStart(6) - } else { - yynn2445 = 2 - for _, b := range yyq2445 { - if b { - yynn2445++ - } - } - r.EncodeMapStart(yynn2445) - yynn2445 = 0 - } - if yyr2445 || yy2arr2445 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - x.Type.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("type")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - x.Type.CodecEncodeSelf(e) - } - if yyr2445 || yy2arr2445 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - x.Status.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - x.Status.CodecEncodeSelf(e) - } - if yyr2445 || yy2arr2445 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2445[2] { - yy2449 := &x.LastHeartbeatTime - yym2450 := z.EncBinary() - _ = yym2450 - if false { - } else if z.HasExtensions() && z.EncExt(yy2449) { - } else if yym2450 { - z.EncBinaryMarshal(yy2449) - } else if !yym2450 && z.IsJSONHandle() { - z.EncJSONMarshal(yy2449) - } else { - z.EncFallback(yy2449) - } - } else { - r.EncodeNil() - } - } else { - if yyq2445[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("lastHeartbeatTime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2451 := &x.LastHeartbeatTime - yym2452 := z.EncBinary() - _ = yym2452 - if false { - } else if z.HasExtensions() && z.EncExt(yy2451) { - } else if yym2452 { - z.EncBinaryMarshal(yy2451) - } else if !yym2452 && z.IsJSONHandle() { - z.EncJSONMarshal(yy2451) - } else { - z.EncFallback(yy2451) - } - } - } - if yyr2445 || yy2arr2445 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2445[3] { - yy2454 := &x.LastTransitionTime - yym2455 := z.EncBinary() - _ = yym2455 - if false { - } else if z.HasExtensions() && z.EncExt(yy2454) { - } else if yym2455 { - z.EncBinaryMarshal(yy2454) - } else if !yym2455 && z.IsJSONHandle() { - z.EncJSONMarshal(yy2454) - } else { - z.EncFallback(yy2454) - } - } else { - r.EncodeNil() - } - } else { - if yyq2445[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2456 := &x.LastTransitionTime - yym2457 := z.EncBinary() - _ = yym2457 - if false { - } else if z.HasExtensions() && z.EncExt(yy2456) { - } else if yym2457 { - z.EncBinaryMarshal(yy2456) - } else if !yym2457 && z.IsJSONHandle() { - z.EncJSONMarshal(yy2456) - } else { - z.EncFallback(yy2456) - } - } - } - if yyr2445 || yy2arr2445 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2445[4] { - yym2459 := z.EncBinary() - _ = yym2459 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2445[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("reason")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2460 := z.EncBinary() - _ = yym2460 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) - } - } - } - if yyr2445 || yy2arr2445 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2445[5] { - yym2462 := z.EncBinary() - _ = yym2462 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Message)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2445[5] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("message")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2463 := z.EncBinary() - _ = yym2463 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Message)) - } - } - } - if yyr2445 || yy2arr2445 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *NodeCondition) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym2464 := z.DecBinary() - _ = yym2464 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct2465 := r.ContainerType() - if yyct2465 == codecSelferValueTypeMap1234 { - yyl2465 := r.ReadMapStart() - if yyl2465 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl2465, d) - } - } else if yyct2465 == codecSelferValueTypeArray1234 { - yyl2465 := r.ReadArrayStart() - if yyl2465 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl2465, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *NodeCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys2466Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2466Slc - var yyhl2466 bool = l >= 0 - for yyj2466 := 0; ; yyj2466++ { - if yyhl2466 { - if yyj2466 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2466Slc = r.DecodeBytes(yys2466Slc, true, true) - yys2466 := string(yys2466Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2466 { - case "type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = NodeConditionType(r.DecodeString()) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = ConditionStatus(r.DecodeString()) - } - case "lastHeartbeatTime": - if r.TryDecodeAsNil() { - x.LastHeartbeatTime = pkg2_unversioned.Time{} - } else { - yyv2469 := &x.LastHeartbeatTime - yym2470 := z.DecBinary() - _ = yym2470 - if false { - } else if z.HasExtensions() && z.DecExt(yyv2469) { - } else if yym2470 { - z.DecBinaryUnmarshal(yyv2469) - } else if !yym2470 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv2469) - } else { - z.DecFallback(yyv2469, false) - } - } - case "lastTransitionTime": - if r.TryDecodeAsNil() { - x.LastTransitionTime = pkg2_unversioned.Time{} - } else { - yyv2471 := &x.LastTransitionTime - yym2472 := z.DecBinary() - _ = yym2472 - if false { - } else if z.HasExtensions() && z.DecExt(yyv2471) { - } else if yym2472 { - z.DecBinaryUnmarshal(yyv2471) - } else if !yym2472 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv2471) - } else { - z.DecFallback(yyv2471, false) - } - } - case "reason": - if r.TryDecodeAsNil() { - x.Reason = "" - } else { - x.Reason = string(r.DecodeString()) - } - case "message": - if r.TryDecodeAsNil() { - x.Message = "" - } else { - x.Message = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys2466) - } // end switch yys2466 - } // end for yyj2466 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj2475 int - var yyb2475 bool - var yyhl2475 bool = l >= 0 - yyj2475++ - if yyhl2475 { - yyb2475 = yyj2475 > l - } else { - yyb2475 = r.CheckBreak() - } - if yyb2475 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = NodeConditionType(r.DecodeString()) - } - yyj2475++ - if yyhl2475 { - yyb2475 = yyj2475 > l - } else { - yyb2475 = r.CheckBreak() - } - if yyb2475 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = ConditionStatus(r.DecodeString()) - } - yyj2475++ - if yyhl2475 { - yyb2475 = yyj2475 > l - } else { - yyb2475 = r.CheckBreak() - } - if yyb2475 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.LastHeartbeatTime = pkg2_unversioned.Time{} - } else { - yyv2478 := &x.LastHeartbeatTime - yym2479 := z.DecBinary() - _ = yym2479 - if false { - } else if z.HasExtensions() && z.DecExt(yyv2478) { - } else if yym2479 { - z.DecBinaryUnmarshal(yyv2478) - } else if !yym2479 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv2478) - } else { - z.DecFallback(yyv2478, false) - } - } - yyj2475++ - if yyhl2475 { - yyb2475 = yyj2475 > l - } else { - yyb2475 = r.CheckBreak() - } - if yyb2475 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.LastTransitionTime = pkg2_unversioned.Time{} - } else { - yyv2480 := &x.LastTransitionTime - yym2481 := z.DecBinary() - _ = yym2481 - if false { - } else if z.HasExtensions() && z.DecExt(yyv2480) { - } else if yym2481 { - z.DecBinaryUnmarshal(yyv2480) - } else if !yym2481 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv2480) - } else { - z.DecFallback(yyv2480, false) - } - } - yyj2475++ - if yyhl2475 { - yyb2475 = yyj2475 > l - } else { - yyb2475 = r.CheckBreak() - } - if yyb2475 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Reason = "" - } else { - x.Reason = string(r.DecodeString()) - } - yyj2475++ - if yyhl2475 { - yyb2475 = yyj2475 > l - } else { - yyb2475 = r.CheckBreak() - } - if yyb2475 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Message = "" - } else { - x.Message = string(r.DecodeString()) - } - for { - yyj2475++ - if yyhl2475 { - yyb2475 = yyj2475 > l - } else { - yyb2475 = r.CheckBreak() - } - if yyb2475 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2475-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x NodeAddressType) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym2484 := z.EncBinary() - _ = yym2484 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *NodeAddressType) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym2485 := z.DecBinary() - _ = yym2485 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - -func (x *NodeAddress) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym2486 := z.EncBinary() - _ = yym2486 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2487 := !z.EncBinary() - yy2arr2487 := z.EncBasicHandle().StructToArray - var yyq2487 [2]bool - _, _, _ = yysep2487, yyq2487, yy2arr2487 - const yyr2487 bool = false - var yynn2487 int - if yyr2487 || yy2arr2487 { - r.EncodeArrayStart(2) - } else { - yynn2487 = 2 - for _, b := range yyq2487 { - if b { - yynn2487++ - } - } - r.EncodeMapStart(yynn2487) - yynn2487 = 0 - } - if yyr2487 || yy2arr2487 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - x.Type.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("type")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - x.Type.CodecEncodeSelf(e) - } - if yyr2487 || yy2arr2487 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2490 := z.EncBinary() - _ = yym2490 - 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) - yym2491 := z.EncBinary() - _ = yym2491 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Address)) - } - } - if yyr2487 || yy2arr2487 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *NodeAddress) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym2492 := z.DecBinary() - _ = yym2492 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct2493 := r.ContainerType() - if yyct2493 == codecSelferValueTypeMap1234 { - yyl2493 := r.ReadMapStart() - if yyl2493 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl2493, d) - } - } else if yyct2493 == codecSelferValueTypeArray1234 { - yyl2493 := r.ReadArrayStart() - if yyl2493 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl2493, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *NodeAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys2494Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2494Slc - var yyhl2494 bool = l >= 0 - for yyj2494 := 0; ; yyj2494++ { - if yyhl2494 { - if yyj2494 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2494Slc = r.DecodeBytes(yys2494Slc, true, true) - yys2494 := string(yys2494Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2494 { - case "type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = NodeAddressType(r.DecodeString()) - } - case "address": - if r.TryDecodeAsNil() { - x.Address = "" - } else { - x.Address = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys2494) - } // end switch yys2494 - } // end for yyj2494 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *NodeAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj2497 int - var yyb2497 bool - var yyhl2497 bool = l >= 0 - yyj2497++ - if yyhl2497 { - yyb2497 = yyj2497 > l - } else { - yyb2497 = r.CheckBreak() - } - if yyb2497 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = NodeAddressType(r.DecodeString()) - } - yyj2497++ - if yyhl2497 { - yyb2497 = yyj2497 > l - } else { - yyb2497 = r.CheckBreak() - } - if yyb2497 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Address = "" - } else { - x.Address = string(r.DecodeString()) - } - for { - yyj2497++ - if yyhl2497 { - yyb2497 = yyj2497 > l - } else { - yyb2497 = r.CheckBreak() - } - if yyb2497 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2497-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x ResourceName) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym2500 := z.EncBinary() - _ = yym2500 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *ResourceName) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym2501 := z.DecBinary() - _ = yym2501 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - -func (x ResourceList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym2502 := z.EncBinary() - _ = yym2502 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - h.encResourceList((ResourceList)(x), e) - } - } -} - -func (x *ResourceList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym2503 := z.DecBinary() - _ = yym2503 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - h.decResourceList((*ResourceList)(x), d) - } -} - -func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym2504 := z.EncBinary() - _ = yym2504 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2505 := !z.EncBinary() - yy2arr2505 := z.EncBasicHandle().StructToArray - var yyq2505 [5]bool - _, _, _ = yysep2505, yyq2505, yy2arr2505 - const yyr2505 bool = false - yyq2505[0] = x.Kind != "" - yyq2505[1] = x.APIVersion != "" - yyq2505[2] = true - yyq2505[3] = true - yyq2505[4] = true - var yynn2505 int - if yyr2505 || yy2arr2505 { - r.EncodeArrayStart(5) - } else { - yynn2505 = 0 - for _, b := range yyq2505 { - if b { - yynn2505++ - } - } - r.EncodeMapStart(yynn2505) - yynn2505 = 0 - } - if yyr2505 || yy2arr2505 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2505[0] { - yym2507 := z.EncBinary() - _ = yym2507 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2505[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2508 := z.EncBinary() - _ = yym2508 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr2505 || yy2arr2505 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2505[1] { - yym2510 := z.EncBinary() - _ = yym2510 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2505[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2511 := z.EncBinary() - _ = yym2511 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr2505 || yy2arr2505 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2505[2] { - yy2513 := &x.ObjectMeta - yy2513.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2505[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2514 := &x.ObjectMeta - yy2514.CodecEncodeSelf(e) - } - } - if yyr2505 || yy2arr2505 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2505[3] { - yy2516 := &x.Spec - yy2516.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2505[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2517 := &x.Spec - yy2517.CodecEncodeSelf(e) - } - } - if yyr2505 || yy2arr2505 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2505[4] { - yy2519 := &x.Status - yy2519.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2505[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2520 := &x.Status - yy2520.CodecEncodeSelf(e) - } - } - if yyr2505 || yy2arr2505 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *Node) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym2521 := z.DecBinary() - _ = yym2521 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct2522 := r.ContainerType() - if yyct2522 == codecSelferValueTypeMap1234 { - yyl2522 := r.ReadMapStart() - if yyl2522 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl2522, d) - } - } else if yyct2522 == codecSelferValueTypeArray1234 { - yyl2522 := r.ReadArrayStart() - if yyl2522 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl2522, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys2523Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2523Slc - var yyhl2523 bool = l >= 0 - for yyj2523 := 0; ; yyj2523++ { - if yyhl2523 { - if yyj2523 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2523Slc = r.DecodeBytes(yys2523Slc, true, true) - yys2523 := string(yys2523Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2523 { - 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()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} - } else { - yyv2526 := &x.ObjectMeta - yyv2526.CodecDecodeSelf(d) - } - case "spec": - if r.TryDecodeAsNil() { - x.Spec = NodeSpec{} - } else { - yyv2527 := &x.Spec - yyv2527.CodecDecodeSelf(d) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = NodeStatus{} - } else { - yyv2528 := &x.Status - yyv2528.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys2523) - } // end switch yys2523 - } // end for yyj2523 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r @@ -32219,9 +32477,15 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Kind = "" + x.RepoTags = nil } else { - x.Kind = string(r.DecodeString()) + yyv2530 := &x.RepoTags + yym2531 := z.DecBinary() + _ = yym2531 + if false { + } else { + z.F.DecSliceStringX(yyv2530, false, d) + } } yyj2529++ if yyhl2529 { @@ -32235,60 +32499,9 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.APIVersion = "" + x.Size = 0 } else { - x.APIVersion = string(r.DecodeString()) - } - yyj2529++ - if yyhl2529 { - yyb2529 = yyj2529 > l - } else { - yyb2529 = r.CheckBreak() - } - if yyb2529 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} - } else { - yyv2532 := &x.ObjectMeta - yyv2532.CodecDecodeSelf(d) - } - yyj2529++ - if yyhl2529 { - yyb2529 = yyj2529 > l - } else { - yyb2529 = r.CheckBreak() - } - if yyb2529 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = NodeSpec{} - } else { - yyv2533 := &x.Spec - yyv2533.CodecDecodeSelf(d) - } - yyj2529++ - if yyhl2529 { - yyb2529 = yyj2529 > l - } else { - yyb2529 = r.CheckBreak() - } - if yyb2529 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = NodeStatus{} - } else { - yyv2534 := &x.Status - yyv2534.CodecDecodeSelf(d) + x.Size = int64(r.DecodeInt(64)) } for { yyj2529++ @@ -32306,356 +32519,12 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x *NodeList) CodecEncodeSelf(e *codec1978.Encoder) { +func (x NodePhase) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym2535 := z.EncBinary() - _ = yym2535 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2536 := !z.EncBinary() - yy2arr2536 := z.EncBasicHandle().StructToArray - var yyq2536 [4]bool - _, _, _ = yysep2536, yyq2536, yy2arr2536 - const yyr2536 bool = false - yyq2536[0] = x.Kind != "" - yyq2536[1] = x.APIVersion != "" - yyq2536[2] = true - var yynn2536 int - if yyr2536 || yy2arr2536 { - r.EncodeArrayStart(4) - } else { - yynn2536 = 1 - for _, b := range yyq2536 { - if b { - yynn2536++ - } - } - r.EncodeMapStart(yynn2536) - yynn2536 = 0 - } - if yyr2536 || yy2arr2536 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2536[0] { - yym2538 := z.EncBinary() - _ = yym2538 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2536[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2539 := z.EncBinary() - _ = yym2539 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr2536 || yy2arr2536 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2536[1] { - yym2541 := z.EncBinary() - _ = yym2541 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2536[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2542 := z.EncBinary() - _ = yym2542 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr2536 || yy2arr2536 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2536[2] { - yy2544 := &x.ListMeta - yym2545 := z.EncBinary() - _ = yym2545 - if false { - } else if z.HasExtensions() && z.EncExt(yy2544) { - } else { - z.EncFallback(yy2544) - } - } else { - r.EncodeNil() - } - } else { - if yyq2536[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2546 := &x.ListMeta - yym2547 := z.EncBinary() - _ = yym2547 - if false { - } else if z.HasExtensions() && z.EncExt(yy2546) { - } else { - z.EncFallback(yy2546) - } - } - } - if yyr2536 || yy2arr2536 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym2549 := z.EncBinary() - _ = yym2549 - if false { - } else { - h.encSliceNode(([]Node)(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 { - yym2550 := z.EncBinary() - _ = yym2550 - if false { - } else { - h.encSliceNode(([]Node)(x.Items), e) - } - } - } - if yyr2536 || yy2arr2536 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *NodeList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym2551 := z.DecBinary() - _ = yym2551 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct2552 := r.ContainerType() - if yyct2552 == codecSelferValueTypeMap1234 { - yyl2552 := r.ReadMapStart() - if yyl2552 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl2552, d) - } - } else if yyct2552 == codecSelferValueTypeArray1234 { - yyl2552 := r.ReadArrayStart() - if yyl2552 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl2552, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *NodeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys2553Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2553Slc - var yyhl2553 bool = l >= 0 - for yyj2553 := 0; ; yyj2553++ { - if yyhl2553 { - if yyj2553 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2553Slc = r.DecodeBytes(yys2553Slc, true, true) - yys2553 := string(yys2553Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2553 { - 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()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} - } else { - yyv2556 := &x.ListMeta - yym2557 := z.DecBinary() - _ = yym2557 - if false { - } else if z.HasExtensions() && z.DecExt(yyv2556) { - } else { - z.DecFallback(yyv2556, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv2558 := &x.Items - yym2559 := z.DecBinary() - _ = yym2559 - if false { - } else { - h.decSliceNode((*[]Node)(yyv2558), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys2553) - } // end switch yys2553 - } // end for yyj2553 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *NodeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj2560 int - var yyb2560 bool - var yyhl2560 bool = l >= 0 - yyj2560++ - if yyhl2560 { - yyb2560 = yyj2560 > l - } else { - yyb2560 = r.CheckBreak() - } - if yyb2560 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj2560++ - if yyhl2560 { - yyb2560 = yyj2560 > l - } else { - yyb2560 = r.CheckBreak() - } - if yyb2560 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj2560++ - if yyhl2560 { - yyb2560 = yyj2560 > l - } else { - yyb2560 = r.CheckBreak() - } - if yyb2560 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} - } else { - yyv2563 := &x.ListMeta - yym2564 := z.DecBinary() - _ = yym2564 - if false { - } else if z.HasExtensions() && z.DecExt(yyv2563) { - } else { - z.DecFallback(yyv2563, false) - } - } - yyj2560++ - if yyhl2560 { - yyb2560 = yyj2560 > l - } else { - yyb2560 = r.CheckBreak() - } - if yyb2560 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv2565 := &x.Items - yym2566 := z.DecBinary() - _ = yym2566 - if false { - } else { - h.decSliceNode((*[]Node)(yyv2565), d) - } - } - for { - yyj2560++ - if yyhl2560 { - yyb2560 = yyj2560 > l - } else { - yyb2560 = r.CheckBreak() - } - if yyb2560 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2560-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x FinalizerName) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym2567 := z.EncBinary() - _ = yym2567 + yym2533 := z.EncBinary() + _ = yym2533 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -32663,12 +32532,12 @@ func (x FinalizerName) CodecEncodeSelf(e *codec1978.Encoder) { } } -func (x *FinalizerName) CodecDecodeSelf(d *codec1978.Decoder) { +func (x *NodePhase) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2568 := z.DecBinary() - _ = yym2568 + yym2534 := z.DecBinary() + _ = yym2534 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -32676,71 +32545,209 @@ func (x *FinalizerName) CodecDecodeSelf(d *codec1978.Decoder) { } } -func (x *NamespaceSpec) CodecEncodeSelf(e *codec1978.Encoder) { +func (x NodeConditionType) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym2535 := z.EncBinary() + _ = yym2535 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *NodeConditionType) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym2536 := z.DecBinary() + _ = yym2536 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *NodeCondition) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r if x == nil { r.EncodeNil() } else { - yym2569 := z.EncBinary() - _ = yym2569 + yym2537 := z.EncBinary() + _ = yym2537 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2570 := !z.EncBinary() - yy2arr2570 := z.EncBasicHandle().StructToArray - var yyq2570 [1]bool - _, _, _ = yysep2570, yyq2570, yy2arr2570 - const yyr2570 bool = false - yyq2570[0] = len(x.Finalizers) != 0 - var yynn2570 int - if yyr2570 || yy2arr2570 { - r.EncodeArrayStart(1) + yysep2538 := !z.EncBinary() + yy2arr2538 := z.EncBasicHandle().StructToArray + var yyq2538 [6]bool + _, _, _ = yysep2538, yyq2538, yy2arr2538 + const yyr2538 bool = false + yyq2538[2] = true + yyq2538[3] = true + yyq2538[4] = x.Reason != "" + yyq2538[5] = x.Message != "" + var yynn2538 int + if yyr2538 || yy2arr2538 { + r.EncodeArrayStart(6) } else { - yynn2570 = 0 - for _, b := range yyq2570 { + yynn2538 = 2 + for _, b := range yyq2538 { if b { - yynn2570++ + yynn2538++ } } - r.EncodeMapStart(yynn2570) - yynn2570 = 0 + r.EncodeMapStart(yynn2538) + yynn2538 = 0 } - if yyr2570 || yy2arr2570 { + if yyr2538 || yy2arr2538 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2570[0] { - if x.Finalizers == nil { - r.EncodeNil() + x.Type.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("type")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Type.CodecEncodeSelf(e) + } + if yyr2538 || yy2arr2538 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + x.Status.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Status.CodecEncodeSelf(e) + } + if yyr2538 || yy2arr2538 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2538[2] { + yy2542 := &x.LastHeartbeatTime + yym2543 := z.EncBinary() + _ = yym2543 + if false { + } else if z.HasExtensions() && z.EncExt(yy2542) { + } else if yym2543 { + z.EncBinaryMarshal(yy2542) + } else if !yym2543 && z.IsJSONHandle() { + z.EncJSONMarshal(yy2542) } else { - yym2572 := z.EncBinary() - _ = yym2572 - if false { - } else { - h.encSliceFinalizerName(([]FinalizerName)(x.Finalizers), e) - } + z.EncFallback(yy2542) } } else { r.EncodeNil() } } else { - if yyq2570[0] { + if yyq2538[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("finalizers")) + r.EncodeString(codecSelferC_UTF81234, string("lastHeartbeatTime")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Finalizers == nil { - r.EncodeNil() + yy2544 := &x.LastHeartbeatTime + yym2545 := z.EncBinary() + _ = yym2545 + if false { + } else if z.HasExtensions() && z.EncExt(yy2544) { + } else if yym2545 { + z.EncBinaryMarshal(yy2544) + } else if !yym2545 && z.IsJSONHandle() { + z.EncJSONMarshal(yy2544) } else { - yym2573 := z.EncBinary() - _ = yym2573 - if false { - } else { - h.encSliceFinalizerName(([]FinalizerName)(x.Finalizers), e) - } + z.EncFallback(yy2544) } } } - if yyr2570 || yy2arr2570 { + if yyr2538 || yy2arr2538 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2538[3] { + yy2547 := &x.LastTransitionTime + yym2548 := z.EncBinary() + _ = yym2548 + if false { + } else if z.HasExtensions() && z.EncExt(yy2547) { + } else if yym2548 { + z.EncBinaryMarshal(yy2547) + } else if !yym2548 && z.IsJSONHandle() { + z.EncJSONMarshal(yy2547) + } else { + z.EncFallback(yy2547) + } + } else { + r.EncodeNil() + } + } else { + if yyq2538[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy2549 := &x.LastTransitionTime + yym2550 := z.EncBinary() + _ = yym2550 + if false { + } else if z.HasExtensions() && z.EncExt(yy2549) { + } else if yym2550 { + z.EncBinaryMarshal(yy2549) + } else if !yym2550 && z.IsJSONHandle() { + z.EncJSONMarshal(yy2549) + } else { + z.EncFallback(yy2549) + } + } + } + if yyr2538 || yy2arr2538 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2538[4] { + yym2552 := z.EncBinary() + _ = yym2552 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2538[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("reason")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym2553 := z.EncBinary() + _ = yym2553 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) + } + } + } + if yyr2538 || yy2arr2538 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2538[5] { + yym2555 := z.EncBinary() + _ = yym2555 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Message)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2538[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("message")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym2556 := z.EncBinary() + _ = yym2556 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Message)) + } + } + } + if yyr2538 || yy2arr2538 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -32749,29 +32756,29 @@ func (x *NamespaceSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } -func (x *NamespaceSpec) CodecDecodeSelf(d *codec1978.Decoder) { +func (x *NodeCondition) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2574 := z.DecBinary() - _ = yym2574 + yym2557 := z.DecBinary() + _ = yym2557 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2575 := r.ContainerType() - if yyct2575 == codecSelferValueTypeMap1234 { - yyl2575 := r.ReadMapStart() - if yyl2575 == 0 { + yyct2558 := r.ContainerType() + if yyct2558 == codecSelferValueTypeMap1234 { + yyl2558 := r.ReadMapStart() + if yyl2558 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2575, d) + x.codecDecodeSelfFromMap(yyl2558, d) } - } else if yyct2575 == codecSelferValueTypeArray1234 { - yyl2575 := r.ReadArrayStart() - if yyl2575 == 0 { + } else if yyct2558 == codecSelferValueTypeArray1234 { + yyl2558 := r.ReadArrayStart() + if yyl2558 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2575, d) + x.codecDecodeSelfFromArray(yyl2558, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -32779,16 +32786,16 @@ func (x *NamespaceSpec) CodecDecodeSelf(d *codec1978.Decoder) { } } -func (x *NamespaceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { +func (x *NodeCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2576Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2576Slc - var yyhl2576 bool = l >= 0 - for yyj2576 := 0; ; yyj2576++ { - if yyhl2576 { - if yyj2576 >= l { + var yys2559Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2559Slc + var yyhl2559 bool = l >= 0 + for yyj2559 := 0; ; yyj2559++ { + if yyhl2559 { + if yyj2559 >= l { break } } else { @@ -32797,121 +32804,301 @@ func (x *NamespaceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2576Slc = r.DecodeBytes(yys2576Slc, true, true) - yys2576 := string(yys2576Slc) + yys2559Slc = r.DecodeBytes(yys2559Slc, true, true) + yys2559 := string(yys2559Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2576 { - case "finalizers": + switch yys2559 { + case "type": if r.TryDecodeAsNil() { - x.Finalizers = nil + x.Type = "" } else { - yyv2577 := &x.Finalizers - yym2578 := z.DecBinary() - _ = yym2578 + x.Type = NodeConditionType(r.DecodeString()) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = "" + } else { + x.Status = ConditionStatus(r.DecodeString()) + } + case "lastHeartbeatTime": + if r.TryDecodeAsNil() { + x.LastHeartbeatTime = pkg2_unversioned.Time{} + } else { + yyv2562 := &x.LastHeartbeatTime + yym2563 := z.DecBinary() + _ = yym2563 if false { + } else if z.HasExtensions() && z.DecExt(yyv2562) { + } else if yym2563 { + z.DecBinaryUnmarshal(yyv2562) + } else if !yym2563 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv2562) } else { - h.decSliceFinalizerName((*[]FinalizerName)(yyv2577), d) + z.DecFallback(yyv2562, false) } } + case "lastTransitionTime": + if r.TryDecodeAsNil() { + x.LastTransitionTime = pkg2_unversioned.Time{} + } else { + yyv2564 := &x.LastTransitionTime + yym2565 := z.DecBinary() + _ = yym2565 + if false { + } else if z.HasExtensions() && z.DecExt(yyv2564) { + } else if yym2565 { + z.DecBinaryUnmarshal(yyv2564) + } else if !yym2565 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv2564) + } else { + z.DecFallback(yyv2564, false) + } + } + case "reason": + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + x.Reason = string(r.DecodeString()) + } + case "message": + if r.TryDecodeAsNil() { + x.Message = "" + } else { + x.Message = string(r.DecodeString()) + } default: - z.DecStructFieldNotFound(-1, yys2576) - } // end switch yys2576 - } // end for yyj2576 + z.DecStructFieldNotFound(-1, yys2559) + } // end switch yys2559 + } // end for yyj2559 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } -func (x *NamespaceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { +func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2579 int - var yyb2579 bool - var yyhl2579 bool = l >= 0 - yyj2579++ - if yyhl2579 { - yyb2579 = yyj2579 > l + var yyj2568 int + var yyb2568 bool + var yyhl2568 bool = l >= 0 + yyj2568++ + if yyhl2568 { + yyb2568 = yyj2568 > l } else { - yyb2579 = r.CheckBreak() + yyb2568 = r.CheckBreak() } - if yyb2579 { + if yyb2568 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Finalizers = nil + x.Type = "" } else { - yyv2580 := &x.Finalizers - yym2581 := z.DecBinary() - _ = yym2581 + x.Type = NodeConditionType(r.DecodeString()) + } + yyj2568++ + if yyhl2568 { + yyb2568 = yyj2568 > l + } else { + yyb2568 = r.CheckBreak() + } + if yyb2568 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Status = "" + } else { + x.Status = ConditionStatus(r.DecodeString()) + } + yyj2568++ + if yyhl2568 { + yyb2568 = yyj2568 > l + } else { + yyb2568 = r.CheckBreak() + } + if yyb2568 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.LastHeartbeatTime = pkg2_unversioned.Time{} + } else { + yyv2571 := &x.LastHeartbeatTime + yym2572 := z.DecBinary() + _ = yym2572 if false { + } else if z.HasExtensions() && z.DecExt(yyv2571) { + } else if yym2572 { + z.DecBinaryUnmarshal(yyv2571) + } else if !yym2572 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv2571) } else { - h.decSliceFinalizerName((*[]FinalizerName)(yyv2580), d) + z.DecFallback(yyv2571, false) } } - for { - yyj2579++ - if yyhl2579 { - yyb2579 = yyj2579 > l + yyj2568++ + if yyhl2568 { + yyb2568 = yyj2568 > l + } else { + yyb2568 = r.CheckBreak() + } + if yyb2568 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.LastTransitionTime = pkg2_unversioned.Time{} + } else { + yyv2573 := &x.LastTransitionTime + yym2574 := z.DecBinary() + _ = yym2574 + if false { + } else if z.HasExtensions() && z.DecExt(yyv2573) { + } else if yym2574 { + z.DecBinaryUnmarshal(yyv2573) + } else if !yym2574 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv2573) } else { - yyb2579 = r.CheckBreak() + z.DecFallback(yyv2573, false) } - if yyb2579 { + } + yyj2568++ + if yyhl2568 { + yyb2568 = yyj2568 > l + } else { + yyb2568 = r.CheckBreak() + } + if yyb2568 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + x.Reason = string(r.DecodeString()) + } + yyj2568++ + if yyhl2568 { + yyb2568 = yyj2568 > l + } else { + yyb2568 = r.CheckBreak() + } + if yyb2568 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Message = "" + } else { + x.Message = string(r.DecodeString()) + } + for { + yyj2568++ + if yyhl2568 { + yyb2568 = yyj2568 > l + } else { + yyb2568 = r.CheckBreak() + } + if yyb2568 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2579-1, "") + z.DecStructFieldNotFound(yyj2568-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x *NamespaceStatus) CodecEncodeSelf(e *codec1978.Encoder) { +func (x NodeAddressType) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym2577 := z.EncBinary() + _ = yym2577 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *NodeAddressType) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym2578 := z.DecBinary() + _ = yym2578 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *NodeAddress) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r if x == nil { r.EncodeNil() } else { - yym2582 := z.EncBinary() - _ = yym2582 + yym2579 := z.EncBinary() + _ = yym2579 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2583 := !z.EncBinary() - yy2arr2583 := z.EncBasicHandle().StructToArray - var yyq2583 [1]bool - _, _, _ = yysep2583, yyq2583, yy2arr2583 - const yyr2583 bool = false - yyq2583[0] = x.Phase != "" - var yynn2583 int - if yyr2583 || yy2arr2583 { - r.EncodeArrayStart(1) + yysep2580 := !z.EncBinary() + yy2arr2580 := z.EncBasicHandle().StructToArray + var yyq2580 [2]bool + _, _, _ = yysep2580, yyq2580, yy2arr2580 + const yyr2580 bool = false + var yynn2580 int + if yyr2580 || yy2arr2580 { + r.EncodeArrayStart(2) } else { - yynn2583 = 0 - for _, b := range yyq2583 { + yynn2580 = 2 + for _, b := range yyq2580 { if b { - yynn2583++ + yynn2580++ } } - r.EncodeMapStart(yynn2583) - yynn2583 = 0 + r.EncodeMapStart(yynn2580) + yynn2580 = 0 } - if yyr2583 || yy2arr2583 { + if yyr2580 || yy2arr2580 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2583[0] { - x.Phase.CodecEncodeSelf(e) + x.Type.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("type")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Type.CodecEncodeSelf(e) + } + if yyr2580 || yy2arr2580 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym2583 := z.EncBinary() + _ = yym2583 + if false { } else { - r.EncodeString(codecSelferC_UTF81234, "") + r.EncodeString(codecSelferC_UTF81234, string(x.Address)) } } else { - if yyq2583[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("phase")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - x.Phase.CodecEncodeSelf(e) + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("address")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym2584 := z.EncBinary() + _ = yym2584 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Address)) } } - if yyr2583 || yy2arr2583 { + if yyr2580 || yy2arr2580 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -32920,7 +33107,7 @@ func (x *NamespaceStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } -func (x *NamespaceStatus) CodecDecodeSelf(d *codec1978.Decoder) { +func (x *NodeAddress) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r @@ -32950,7 +33137,7 @@ func (x *NamespaceStatus) CodecDecodeSelf(d *codec1978.Decoder) { } } -func (x *NamespaceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { +func (x *NodeAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r @@ -32972,11 +33159,17 @@ func (x *NamespaceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { yys2587 := string(yys2587Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) switch yys2587 { - case "phase": + case "type": if r.TryDecodeAsNil() { - x.Phase = "" + x.Type = "" } else { - x.Phase = NamespacePhase(r.DecodeString()) + x.Type = NodeAddressType(r.DecodeString()) + } + case "address": + if r.TryDecodeAsNil() { + x.Address = "" + } else { + x.Address = string(r.DecodeString()) } default: z.DecStructFieldNotFound(-1, yys2587) @@ -32985,51 +33178,67 @@ func (x *NamespaceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } -func (x *NamespaceStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { +func (x *NodeAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2589 int - var yyb2589 bool - var yyhl2589 bool = l >= 0 - yyj2589++ - if yyhl2589 { - yyb2589 = yyj2589 > l + var yyj2590 int + var yyb2590 bool + var yyhl2590 bool = l >= 0 + yyj2590++ + if yyhl2590 { + yyb2590 = yyj2590 > l } else { - yyb2589 = r.CheckBreak() + yyb2590 = r.CheckBreak() } - if yyb2589 { + if yyb2590 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Phase = "" + x.Type = "" } else { - x.Phase = NamespacePhase(r.DecodeString()) + x.Type = NodeAddressType(r.DecodeString()) + } + yyj2590++ + if yyhl2590 { + yyb2590 = yyj2590 > l + } else { + yyb2590 = r.CheckBreak() + } + if yyb2590 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Address = "" + } else { + x.Address = string(r.DecodeString()) } for { - yyj2589++ - if yyhl2589 { - yyb2589 = yyj2589 > l + yyj2590++ + if yyhl2590 { + yyb2590 = yyj2590 > l } else { - yyb2589 = r.CheckBreak() + yyb2590 = r.CheckBreak() } - if yyb2589 { + if yyb2590 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2589-1, "") + z.DecStructFieldNotFound(yyj2590-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x NamespacePhase) CodecEncodeSelf(e *codec1978.Encoder) { +func (x ResourceName) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym2591 := z.EncBinary() - _ = yym2591 + yym2593 := z.EncBinary() + _ = yym2593 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -33037,12 +33246,12 @@ func (x NamespacePhase) CodecEncodeSelf(e *codec1978.Encoder) { } } -func (x *NamespacePhase) CodecDecodeSelf(d *codec1978.Decoder) { +func (x *ResourceName) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2592 := z.DecBinary() - _ = yym2592 + yym2594 := z.DecBinary() + _ = yym2594 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -33050,143 +33259,173 @@ func (x *NamespacePhase) CodecDecodeSelf(d *codec1978.Decoder) { } } -func (x *Namespace) CodecEncodeSelf(e *codec1978.Encoder) { +func (x ResourceList) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r if x == nil { r.EncodeNil() } else { - yym2593 := z.EncBinary() - _ = yym2593 + yym2595 := z.EncBinary() + _ = yym2595 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2594 := !z.EncBinary() - yy2arr2594 := z.EncBasicHandle().StructToArray - var yyq2594 [5]bool - _, _, _ = yysep2594, yyq2594, yy2arr2594 - const yyr2594 bool = false - yyq2594[0] = x.Kind != "" - yyq2594[1] = x.APIVersion != "" - yyq2594[2] = true - yyq2594[3] = true - yyq2594[4] = true - var yynn2594 int - if yyr2594 || yy2arr2594 { + h.encResourceList((ResourceList)(x), e) + } + } +} + +func (x *ResourceList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym2596 := z.DecBinary() + _ = yym2596 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + h.decResourceList((*ResourceList)(x), d) + } +} + +func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym2597 := z.EncBinary() + _ = yym2597 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2598 := !z.EncBinary() + yy2arr2598 := z.EncBasicHandle().StructToArray + var yyq2598 [5]bool + _, _, _ = yysep2598, yyq2598, yy2arr2598 + const yyr2598 bool = false + yyq2598[0] = x.Kind != "" + yyq2598[1] = x.APIVersion != "" + yyq2598[2] = true + yyq2598[3] = true + yyq2598[4] = true + var yynn2598 int + if yyr2598 || yy2arr2598 { r.EncodeArrayStart(5) } else { - yynn2594 = 0 - for _, b := range yyq2594 { + yynn2598 = 0 + for _, b := range yyq2598 { if b { - yynn2594++ + yynn2598++ } } - r.EncodeMapStart(yynn2594) - yynn2594 = 0 + r.EncodeMapStart(yynn2598) + yynn2598 = 0 } - if yyr2594 || yy2arr2594 { + if yyr2598 || yy2arr2598 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2594[0] { - yym2596 := z.EncBinary() - _ = yym2596 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2594[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2597 := z.EncBinary() - _ = yym2597 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr2594 || yy2arr2594 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2594[1] { - yym2599 := z.EncBinary() - _ = yym2599 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2594[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) + if yyq2598[0] { yym2600 := z.EncBinary() _ = yym2600 if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2598[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym2601 := z.EncBinary() + _ = yym2601 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2598 || yy2arr2598 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2598[1] { + yym2603 := z.EncBinary() + _ = yym2603 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2598[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym2604 := z.EncBinary() + _ = yym2604 + if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2594 || yy2arr2594 { + if yyr2598 || yy2arr2598 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2594[2] { - yy2602 := &x.ObjectMeta - yy2602.CodecEncodeSelf(e) + if yyq2598[2] { + yy2606 := &x.ObjectMeta + yy2606.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2594[2] { + if yyq2598[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2603 := &x.ObjectMeta - yy2603.CodecEncodeSelf(e) + yy2607 := &x.ObjectMeta + yy2607.CodecEncodeSelf(e) } } - if yyr2594 || yy2arr2594 { + if yyr2598 || yy2arr2598 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2594[3] { - yy2605 := &x.Spec - yy2605.CodecEncodeSelf(e) + if yyq2598[3] { + yy2609 := &x.Spec + yy2609.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2594[3] { + if yyq2598[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2606 := &x.Spec - yy2606.CodecEncodeSelf(e) + yy2610 := &x.Spec + yy2610.CodecEncodeSelf(e) } } - if yyr2594 || yy2arr2594 { + if yyr2598 || yy2arr2598 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2594[4] { - yy2608 := &x.Status - yy2608.CodecEncodeSelf(e) + if yyq2598[4] { + yy2612 := &x.Status + yy2612.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2594[4] { + if yyq2598[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2609 := &x.Status - yy2609.CodecEncodeSelf(e) + yy2613 := &x.Status + yy2613.CodecEncodeSelf(e) } } - if yyr2594 || yy2arr2594 { + if yyr2598 || yy2arr2598 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -33195,29 +33434,29 @@ func (x *Namespace) CodecEncodeSelf(e *codec1978.Encoder) { } } -func (x *Namespace) CodecDecodeSelf(d *codec1978.Decoder) { +func (x *Node) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2610 := z.DecBinary() - _ = yym2610 + yym2614 := z.DecBinary() + _ = yym2614 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2611 := r.ContainerType() - if yyct2611 == codecSelferValueTypeMap1234 { - yyl2611 := r.ReadMapStart() - if yyl2611 == 0 { + yyct2615 := r.ContainerType() + if yyct2615 == codecSelferValueTypeMap1234 { + yyl2615 := r.ReadMapStart() + if yyl2615 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2611, d) + x.codecDecodeSelfFromMap(yyl2615, d) } - } else if yyct2611 == codecSelferValueTypeArray1234 { - yyl2611 := r.ReadArrayStart() - if yyl2611 == 0 { + } else if yyct2615 == codecSelferValueTypeArray1234 { + yyl2615 := r.ReadArrayStart() + if yyl2615 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2611, d) + x.codecDecodeSelfFromArray(yyl2615, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -33225,16 +33464,16 @@ func (x *Namespace) CodecDecodeSelf(d *codec1978.Decoder) { } } -func (x *Namespace) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { +func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2612Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2612Slc - var yyhl2612 bool = l >= 0 - for yyj2612 := 0; ; yyj2612++ { - if yyhl2612 { - if yyj2612 >= l { + var yys2616Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2616Slc + var yyhl2616 bool = l >= 0 + for yyj2616 := 0; ; yyj2616++ { + if yyhl2616 { + if yyj2616 >= l { break } } else { @@ -33243,10 +33482,10 @@ func (x *Namespace) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2612Slc = r.DecodeBytes(yys2612Slc, true, true) - yys2612 := string(yys2612Slc) + yys2616Slc = r.DecodeBytes(yys2616Slc, true, true) + yys2616 := string(yys2616Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2612 { + switch yys2616 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -33263,44 +33502,44 @@ func (x *Namespace) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv2615 := &x.ObjectMeta - yyv2615.CodecDecodeSelf(d) + yyv2619 := &x.ObjectMeta + yyv2619.CodecDecodeSelf(d) } case "spec": if r.TryDecodeAsNil() { - x.Spec = NamespaceSpec{} + x.Spec = NodeSpec{} } else { - yyv2616 := &x.Spec - yyv2616.CodecDecodeSelf(d) + yyv2620 := &x.Spec + yyv2620.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { - x.Status = NamespaceStatus{} + x.Status = NodeStatus{} } else { - yyv2617 := &x.Status - yyv2617.CodecDecodeSelf(d) + yyv2621 := &x.Status + yyv2621.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2612) - } // end switch yys2612 - } // end for yyj2612 + z.DecStructFieldNotFound(-1, yys2616) + } // end switch yys2616 + } // end for yyj2616 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } -func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { +func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2618 int - var yyb2618 bool - var yyhl2618 bool = l >= 0 - yyj2618++ - if yyhl2618 { - yyb2618 = yyj2618 > l + var yyj2622 int + var yyb2622 bool + var yyhl2622 bool = l >= 0 + yyj2622++ + if yyhl2622 { + yyb2622 = yyj2622 > l } else { - yyb2618 = r.CheckBreak() + yyb2622 = r.CheckBreak() } - if yyb2618 { + if yyb2622 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33310,13 +33549,13 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2618++ - if yyhl2618 { - yyb2618 = yyj2618 > l + yyj2622++ + if yyhl2622 { + yyb2622 = yyj2622 > l } else { - yyb2618 = r.CheckBreak() + yyb2622 = r.CheckBreak() } - if yyb2618 { + if yyb2622 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33326,13 +33565,13 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2618++ - if yyhl2618 { - yyb2618 = yyj2618 > l + yyj2622++ + if yyhl2622 { + yyb2622 = yyj2622 > l } else { - yyb2618 = r.CheckBreak() + yyb2622 = r.CheckBreak() } - if yyb2618 { + if yyb2622 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33340,181 +33579,181 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv2621 := &x.ObjectMeta - yyv2621.CodecDecodeSelf(d) + yyv2625 := &x.ObjectMeta + yyv2625.CodecDecodeSelf(d) } - yyj2618++ - if yyhl2618 { - yyb2618 = yyj2618 > l + yyj2622++ + if yyhl2622 { + yyb2622 = yyj2622 > l } else { - yyb2618 = r.CheckBreak() + yyb2622 = r.CheckBreak() } - if yyb2618 { + if yyb2622 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Spec = NamespaceSpec{} + x.Spec = NodeSpec{} } else { - yyv2622 := &x.Spec - yyv2622.CodecDecodeSelf(d) + yyv2626 := &x.Spec + yyv2626.CodecDecodeSelf(d) } - yyj2618++ - if yyhl2618 { - yyb2618 = yyj2618 > l + yyj2622++ + if yyhl2622 { + yyb2622 = yyj2622 > l } else { - yyb2618 = r.CheckBreak() + yyb2622 = r.CheckBreak() } - if yyb2618 { + if yyb2622 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Status = NamespaceStatus{} + x.Status = NodeStatus{} } else { - yyv2623 := &x.Status - yyv2623.CodecDecodeSelf(d) + yyv2627 := &x.Status + yyv2627.CodecDecodeSelf(d) } for { - yyj2618++ - if yyhl2618 { - yyb2618 = yyj2618 > l + yyj2622++ + if yyhl2622 { + yyb2622 = yyj2622 > l } else { - yyb2618 = r.CheckBreak() + yyb2622 = r.CheckBreak() } - if yyb2618 { + if yyb2622 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2618-1, "") + z.DecStructFieldNotFound(yyj2622-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x *NamespaceList) CodecEncodeSelf(e *codec1978.Encoder) { +func (x *NodeList) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r if x == nil { r.EncodeNil() } else { - yym2624 := z.EncBinary() - _ = yym2624 + yym2628 := z.EncBinary() + _ = yym2628 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2625 := !z.EncBinary() - yy2arr2625 := z.EncBasicHandle().StructToArray - var yyq2625 [4]bool - _, _, _ = yysep2625, yyq2625, yy2arr2625 - const yyr2625 bool = false - yyq2625[0] = x.Kind != "" - yyq2625[1] = x.APIVersion != "" - yyq2625[2] = true - var yynn2625 int - if yyr2625 || yy2arr2625 { + yysep2629 := !z.EncBinary() + yy2arr2629 := z.EncBasicHandle().StructToArray + var yyq2629 [4]bool + _, _, _ = yysep2629, yyq2629, yy2arr2629 + const yyr2629 bool = false + yyq2629[0] = x.Kind != "" + yyq2629[1] = x.APIVersion != "" + yyq2629[2] = true + var yynn2629 int + if yyr2629 || yy2arr2629 { r.EncodeArrayStart(4) } else { - yynn2625 = 1 - for _, b := range yyq2625 { + yynn2629 = 1 + for _, b := range yyq2629 { if b { - yynn2625++ + yynn2629++ } } - r.EncodeMapStart(yynn2625) - yynn2625 = 0 + r.EncodeMapStart(yynn2629) + yynn2629 = 0 } - if yyr2625 || yy2arr2625 { + if yyr2629 || yy2arr2629 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2625[0] { - yym2627 := z.EncBinary() - _ = yym2627 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2625[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2628 := z.EncBinary() - _ = yym2628 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr2625 || yy2arr2625 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2625[1] { - yym2630 := z.EncBinary() - _ = yym2630 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2625[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) + if yyq2629[0] { yym2631 := z.EncBinary() _ = yym2631 if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2629[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym2632 := z.EncBinary() + _ = yym2632 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2629 || yy2arr2629 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2629[1] { + yym2634 := z.EncBinary() + _ = yym2634 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2629[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym2635 := z.EncBinary() + _ = yym2635 + if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2625 || yy2arr2625 { + if yyr2629 || yy2arr2629 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2625[2] { - yy2633 := &x.ListMeta - yym2634 := z.EncBinary() - _ = yym2634 + if yyq2629[2] { + yy2637 := &x.ListMeta + yym2638 := z.EncBinary() + _ = yym2638 if false { - } else if z.HasExtensions() && z.EncExt(yy2633) { + } else if z.HasExtensions() && z.EncExt(yy2637) { } else { - z.EncFallback(yy2633) + z.EncFallback(yy2637) } } else { r.EncodeNil() } } else { - if yyq2625[2] { + if yyq2629[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2635 := &x.ListMeta - yym2636 := z.EncBinary() - _ = yym2636 + yy2639 := &x.ListMeta + yym2640 := z.EncBinary() + _ = yym2640 if false { - } else if z.HasExtensions() && z.EncExt(yy2635) { + } else if z.HasExtensions() && z.EncExt(yy2639) { } else { - z.EncFallback(yy2635) + z.EncFallback(yy2639) } } } - if yyr2625 || yy2arr2625 { + if yyr2629 || yy2arr2629 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym2638 := z.EncBinary() - _ = yym2638 + yym2642 := z.EncBinary() + _ = yym2642 if false { } else { - h.encSliceNamespace(([]Namespace)(x.Items), e) + h.encSliceNode(([]Node)(x.Items), e) } } } else { @@ -33524,15 +33763,15 @@ func (x *NamespaceList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym2639 := z.EncBinary() - _ = yym2639 + yym2643 := z.EncBinary() + _ = yym2643 if false { } else { - h.encSliceNamespace(([]Namespace)(x.Items), e) + h.encSliceNode(([]Node)(x.Items), e) } } } - if yyr2625 || yy2arr2625 { + if yyr2629 || yy2arr2629 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -33541,29 +33780,29 @@ func (x *NamespaceList) CodecEncodeSelf(e *codec1978.Encoder) { } } -func (x *NamespaceList) CodecDecodeSelf(d *codec1978.Decoder) { +func (x *NodeList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2640 := z.DecBinary() - _ = yym2640 + yym2644 := z.DecBinary() + _ = yym2644 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2641 := r.ContainerType() - if yyct2641 == codecSelferValueTypeMap1234 { - yyl2641 := r.ReadMapStart() - if yyl2641 == 0 { + yyct2645 := r.ContainerType() + if yyct2645 == codecSelferValueTypeMap1234 { + yyl2645 := r.ReadMapStart() + if yyl2645 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2641, d) + x.codecDecodeSelfFromMap(yyl2645, d) } - } else if yyct2641 == codecSelferValueTypeArray1234 { - yyl2641 := r.ReadArrayStart() - if yyl2641 == 0 { + } else if yyct2645 == codecSelferValueTypeArray1234 { + yyl2645 := r.ReadArrayStart() + if yyl2645 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2641, d) + x.codecDecodeSelfFromArray(yyl2645, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -33571,16 +33810,16 @@ func (x *NamespaceList) CodecDecodeSelf(d *codec1978.Decoder) { } } -func (x *NamespaceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { +func (x *NodeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2642Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2642Slc - var yyhl2642 bool = l >= 0 - for yyj2642 := 0; ; yyj2642++ { - if yyhl2642 { - if yyj2642 >= l { + var yys2646Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2646Slc + var yyhl2646 bool = l >= 0 + for yyj2646 := 0; ; yyj2646++ { + if yyhl2646 { + if yyj2646 >= l { break } } else { @@ -33589,10 +33828,10 @@ func (x *NamespaceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2642Slc = r.DecodeBytes(yys2642Slc, true, true) - yys2642 := string(yys2642Slc) + yys2646Slc = r.DecodeBytes(yys2646Slc, true, true) + yys2646 := string(yys2646Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2642 { + switch yys2646 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -33609,48 +33848,48 @@ func (x *NamespaceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv2645 := &x.ListMeta - yym2646 := z.DecBinary() - _ = yym2646 + yyv2649 := &x.ListMeta + yym2650 := z.DecBinary() + _ = yym2650 if false { - } else if z.HasExtensions() && z.DecExt(yyv2645) { + } else if z.HasExtensions() && z.DecExt(yyv2649) { } else { - z.DecFallback(yyv2645, false) + z.DecFallback(yyv2649, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2647 := &x.Items - yym2648 := z.DecBinary() - _ = yym2648 + yyv2651 := &x.Items + yym2652 := z.DecBinary() + _ = yym2652 if false { } else { - h.decSliceNamespace((*[]Namespace)(yyv2647), d) + h.decSliceNode((*[]Node)(yyv2651), d) } } default: - z.DecStructFieldNotFound(-1, yys2642) - } // end switch yys2642 - } // end for yyj2642 + z.DecStructFieldNotFound(-1, yys2646) + } // end switch yys2646 + } // end for yyj2646 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } -func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { +func (x *NodeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2649 int - var yyb2649 bool - var yyhl2649 bool = l >= 0 - yyj2649++ - if yyhl2649 { - yyb2649 = yyj2649 > l + var yyj2653 int + var yyb2653 bool + var yyhl2653 bool = l >= 0 + yyj2653++ + if yyhl2653 { + yyb2653 = yyj2653 > l } else { - yyb2649 = r.CheckBreak() + yyb2653 = r.CheckBreak() } - if yyb2649 { + if yyb2653 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33660,13 +33899,13 @@ func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2649++ - if yyhl2649 { - yyb2649 = yyj2649 > l + yyj2653++ + if yyhl2653 { + yyb2653 = yyj2653 > l } else { - yyb2649 = r.CheckBreak() + yyb2653 = r.CheckBreak() } - if yyb2649 { + if yyb2653 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33676,13 +33915,13 @@ func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2649++ - if yyhl2649 { - yyb2649 = yyj2649 > l + yyj2653++ + if yyhl2653 { + yyb2653 = yyj2653 > l } else { - yyb2649 = r.CheckBreak() + yyb2653 = r.CheckBreak() } - if yyb2649 { + if yyb2653 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33690,22 +33929,22 @@ func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv2652 := &x.ListMeta - yym2653 := z.DecBinary() - _ = yym2653 + yyv2656 := &x.ListMeta + yym2657 := z.DecBinary() + _ = yym2657 if false { - } else if z.HasExtensions() && z.DecExt(yyv2652) { + } else if z.HasExtensions() && z.DecExt(yyv2656) { } else { - z.DecFallback(yyv2652, false) + z.DecFallback(yyv2656, false) } } - yyj2649++ - if yyhl2649 { - yyb2649 = yyj2649 > l + yyj2653++ + if yyhl2653 { + yyb2653 = yyj2653 > l } else { - yyb2649 = r.CheckBreak() + yyb2653 = r.CheckBreak() } - if yyb2649 { + if yyb2653 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33713,142 +33952,121 @@ func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2654 := &x.Items - yym2655 := z.DecBinary() - _ = yym2655 + yyv2658 := &x.Items + yym2659 := z.DecBinary() + _ = yym2659 if false { } else { - h.decSliceNamespace((*[]Namespace)(yyv2654), d) + h.decSliceNode((*[]Node)(yyv2658), d) } } for { - yyj2649++ - if yyhl2649 { - yyb2649 = yyj2649 > l + yyj2653++ + if yyhl2653 { + yyb2653 = yyj2653 > l } else { - yyb2649 = r.CheckBreak() + yyb2653 = r.CheckBreak() } - if yyb2649 { + if yyb2653 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2649-1, "") + z.DecStructFieldNotFound(yyj2653-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x *Binding) CodecEncodeSelf(e *codec1978.Encoder) { +func (x FinalizerName) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym2660 := z.EncBinary() + _ = yym2660 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *FinalizerName) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym2661 := z.DecBinary() + _ = yym2661 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *NamespaceSpec) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r if x == nil { r.EncodeNil() } else { - yym2656 := z.EncBinary() - _ = yym2656 + yym2662 := z.EncBinary() + _ = yym2662 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2657 := !z.EncBinary() - yy2arr2657 := z.EncBasicHandle().StructToArray - var yyq2657 [4]bool - _, _, _ = yysep2657, yyq2657, yy2arr2657 - const yyr2657 bool = false - yyq2657[0] = x.Kind != "" - yyq2657[1] = x.APIVersion != "" - yyq2657[2] = true - var yynn2657 int - if yyr2657 || yy2arr2657 { - r.EncodeArrayStart(4) + yysep2663 := !z.EncBinary() + yy2arr2663 := z.EncBasicHandle().StructToArray + var yyq2663 [1]bool + _, _, _ = yysep2663, yyq2663, yy2arr2663 + const yyr2663 bool = false + yyq2663[0] = len(x.Finalizers) != 0 + var yynn2663 int + if yyr2663 || yy2arr2663 { + r.EncodeArrayStart(1) } else { - yynn2657 = 1 - for _, b := range yyq2657 { + yynn2663 = 0 + for _, b := range yyq2663 { if b { - yynn2657++ + yynn2663++ } } - r.EncodeMapStart(yynn2657) - yynn2657 = 0 + r.EncodeMapStart(yynn2663) + yynn2663 = 0 } - if yyr2657 || yy2arr2657 { + if yyr2663 || yy2arr2663 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2657[0] { - yym2659 := z.EncBinary() - _ = yym2659 - if false { + if yyq2663[0] { + if x.Finalizers == nil { + r.EncodeNil() } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + yym2665 := z.EncBinary() + _ = yym2665 + if false { + } else { + h.encSliceFinalizerName(([]FinalizerName)(x.Finalizers), e) + } } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2657[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2660 := z.EncBinary() - _ = yym2660 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr2657 || yy2arr2657 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2657[1] { - yym2662 := z.EncBinary() - _ = yym2662 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2657[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2663 := z.EncBinary() - _ = yym2663 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr2657 || yy2arr2657 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2657[2] { - yy2665 := &x.ObjectMeta - yy2665.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2657[2] { + if yyq2663[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) + r.EncodeString(codecSelferC_UTF81234, string("finalizers")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2666 := &x.ObjectMeta - yy2666.CodecEncodeSelf(e) + if x.Finalizers == nil { + r.EncodeNil() + } else { + yym2666 := z.EncBinary() + _ = yym2666 + if false { + } else { + h.encSliceFinalizerName(([]FinalizerName)(x.Finalizers), e) + } + } } } - if yyr2657 || yy2arr2657 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy2668 := &x.Target - yy2668.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("target")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2669 := &x.Target - yy2669.CodecEncodeSelf(e) - } - if yyr2657 || yy2arr2657 { + if yyr2663 || yy2arr2663 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -33857,29 +34075,29 @@ func (x *Binding) CodecEncodeSelf(e *codec1978.Encoder) { } } -func (x *Binding) CodecDecodeSelf(d *codec1978.Decoder) { +func (x *NamespaceSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2670 := z.DecBinary() - _ = yym2670 + yym2667 := z.DecBinary() + _ = yym2667 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2671 := r.ContainerType() - if yyct2671 == codecSelferValueTypeMap1234 { - yyl2671 := r.ReadMapStart() - if yyl2671 == 0 { + yyct2668 := r.ContainerType() + if yyct2668 == codecSelferValueTypeMap1234 { + yyl2668 := r.ReadMapStart() + if yyl2668 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2671, d) + x.codecDecodeSelfFromMap(yyl2668, d) } - } else if yyct2671 == codecSelferValueTypeArray1234 { - yyl2671 := r.ReadArrayStart() - if yyl2671 == 0 { + } else if yyct2668 == codecSelferValueTypeArray1234 { + yyl2668 := r.ReadArrayStart() + if yyl2668 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2671, d) + x.codecDecodeSelfFromArray(yyl2668, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -33887,16 +34105,16 @@ func (x *Binding) CodecDecodeSelf(d *codec1978.Decoder) { } } -func (x *Binding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { +func (x *NamespaceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2672Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2672Slc - var yyhl2672 bool = l >= 0 - for yyj2672 := 0; ; yyj2672++ { - if yyhl2672 { - if yyj2672 >= l { + var yys2669Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2669Slc + var yyhl2669 bool = l >= 0 + for yyj2669 := 0; ; yyj2669++ { + if yyhl2669 { + if yyj2669 >= l { break } } else { @@ -33905,10 +34123,456 @@ func (x *Binding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2672Slc = r.DecodeBytes(yys2672Slc, true, true) - yys2672 := string(yys2672Slc) + yys2669Slc = r.DecodeBytes(yys2669Slc, true, true) + yys2669 := string(yys2669Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2672 { + switch yys2669 { + case "finalizers": + if r.TryDecodeAsNil() { + x.Finalizers = nil + } else { + yyv2670 := &x.Finalizers + yym2671 := z.DecBinary() + _ = yym2671 + if false { + } else { + h.decSliceFinalizerName((*[]FinalizerName)(yyv2670), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys2669) + } // end switch yys2669 + } // end for yyj2669 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *NamespaceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj2672 int + var yyb2672 bool + var yyhl2672 bool = l >= 0 + yyj2672++ + if yyhl2672 { + yyb2672 = yyj2672 > l + } else { + yyb2672 = r.CheckBreak() + } + if yyb2672 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Finalizers = nil + } else { + yyv2673 := &x.Finalizers + yym2674 := z.DecBinary() + _ = yym2674 + if false { + } else { + h.decSliceFinalizerName((*[]FinalizerName)(yyv2673), d) + } + } + for { + yyj2672++ + if yyhl2672 { + yyb2672 = yyj2672 > l + } else { + yyb2672 = r.CheckBreak() + } + if yyb2672 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj2672-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *NamespaceStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym2675 := z.EncBinary() + _ = yym2675 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2676 := !z.EncBinary() + yy2arr2676 := z.EncBasicHandle().StructToArray + var yyq2676 [1]bool + _, _, _ = yysep2676, yyq2676, yy2arr2676 + const yyr2676 bool = false + yyq2676[0] = x.Phase != "" + var yynn2676 int + if yyr2676 || yy2arr2676 { + r.EncodeArrayStart(1) + } else { + yynn2676 = 0 + for _, b := range yyq2676 { + if b { + yynn2676++ + } + } + r.EncodeMapStart(yynn2676) + yynn2676 = 0 + } + if yyr2676 || yy2arr2676 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2676[0] { + x.Phase.CodecEncodeSelf(e) + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2676[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("phase")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Phase.CodecEncodeSelf(e) + } + } + if yyr2676 || yy2arr2676 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *NamespaceStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym2678 := z.DecBinary() + _ = yym2678 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2679 := r.ContainerType() + if yyct2679 == codecSelferValueTypeMap1234 { + yyl2679 := r.ReadMapStart() + if yyl2679 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2679, d) + } + } else if yyct2679 == codecSelferValueTypeArray1234 { + yyl2679 := r.ReadArrayStart() + if yyl2679 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2679, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *NamespaceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys2680Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2680Slc + var yyhl2680 bool = l >= 0 + for yyj2680 := 0; ; yyj2680++ { + if yyhl2680 { + if yyj2680 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys2680Slc = r.DecodeBytes(yys2680Slc, true, true) + yys2680 := string(yys2680Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys2680 { + case "phase": + if r.TryDecodeAsNil() { + x.Phase = "" + } else { + x.Phase = NamespacePhase(r.DecodeString()) + } + default: + z.DecStructFieldNotFound(-1, yys2680) + } // end switch yys2680 + } // end for yyj2680 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *NamespaceStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj2682 int + var yyb2682 bool + var yyhl2682 bool = l >= 0 + yyj2682++ + if yyhl2682 { + yyb2682 = yyj2682 > l + } else { + yyb2682 = r.CheckBreak() + } + if yyb2682 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Phase = "" + } else { + x.Phase = NamespacePhase(r.DecodeString()) + } + for { + yyj2682++ + if yyhl2682 { + yyb2682 = yyj2682 > l + } else { + yyb2682 = r.CheckBreak() + } + if yyb2682 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj2682-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x NamespacePhase) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym2684 := z.EncBinary() + _ = yym2684 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *NamespacePhase) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym2685 := z.DecBinary() + _ = yym2685 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *Namespace) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym2686 := z.EncBinary() + _ = yym2686 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2687 := !z.EncBinary() + yy2arr2687 := z.EncBasicHandle().StructToArray + var yyq2687 [5]bool + _, _, _ = yysep2687, yyq2687, yy2arr2687 + const yyr2687 bool = false + yyq2687[0] = x.Kind != "" + yyq2687[1] = x.APIVersion != "" + yyq2687[2] = true + yyq2687[3] = true + yyq2687[4] = true + var yynn2687 int + if yyr2687 || yy2arr2687 { + r.EncodeArrayStart(5) + } else { + yynn2687 = 0 + for _, b := range yyq2687 { + if b { + yynn2687++ + } + } + r.EncodeMapStart(yynn2687) + yynn2687 = 0 + } + if yyr2687 || yy2arr2687 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2687[0] { + yym2689 := z.EncBinary() + _ = yym2689 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2687[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym2690 := z.EncBinary() + _ = yym2690 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2687 || yy2arr2687 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2687[1] { + yym2692 := z.EncBinary() + _ = yym2692 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2687[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym2693 := z.EncBinary() + _ = yym2693 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2687 || yy2arr2687 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2687[2] { + yy2695 := &x.ObjectMeta + yy2695.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2687[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy2696 := &x.ObjectMeta + yy2696.CodecEncodeSelf(e) + } + } + if yyr2687 || yy2arr2687 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2687[3] { + yy2698 := &x.Spec + yy2698.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2687[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy2699 := &x.Spec + yy2699.CodecEncodeSelf(e) + } + } + if yyr2687 || yy2arr2687 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2687[4] { + yy2701 := &x.Status + yy2701.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2687[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy2702 := &x.Status + yy2702.CodecEncodeSelf(e) + } + } + if yyr2687 || yy2arr2687 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *Namespace) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym2703 := z.DecBinary() + _ = yym2703 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2704 := r.ContainerType() + if yyct2704 == codecSelferValueTypeMap1234 { + yyl2704 := r.ReadMapStart() + if yyl2704 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2704, d) + } + } else if yyct2704 == codecSelferValueTypeArray1234 { + yyl2704 := r.ReadArrayStart() + if yyl2704 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2704, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *Namespace) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys2705Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2705Slc + var yyhl2705 bool = l >= 0 + for yyj2705 := 0; ; yyj2705++ { + if yyhl2705 { + if yyj2705 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys2705Slc = r.DecodeBytes(yys2705Slc, true, true) + yys2705 := string(yys2705Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys2705 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -33925,37 +34589,44 @@ func (x *Binding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv2675 := &x.ObjectMeta - yyv2675.CodecDecodeSelf(d) + yyv2708 := &x.ObjectMeta + yyv2708.CodecDecodeSelf(d) } - case "target": + case "spec": if r.TryDecodeAsNil() { - x.Target = ObjectReference{} + x.Spec = NamespaceSpec{} } else { - yyv2676 := &x.Target - yyv2676.CodecDecodeSelf(d) + yyv2709 := &x.Spec + yyv2709.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = NamespaceStatus{} + } else { + yyv2710 := &x.Status + yyv2710.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2672) - } // end switch yys2672 - } // end for yyj2672 + z.DecStructFieldNotFound(-1, yys2705) + } // end switch yys2705 + } // end for yyj2705 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } -func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { +func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2677 int - var yyb2677 bool - var yyhl2677 bool = l >= 0 - yyj2677++ - if yyhl2677 { - yyb2677 = yyj2677 > l + var yyj2711 int + var yyb2711 bool + var yyhl2711 bool = l >= 0 + yyj2711++ + if yyhl2711 { + yyb2711 = yyj2711 > l } else { - yyb2677 = r.CheckBreak() + yyb2711 = r.CheckBreak() } - if yyb2677 { + if yyb2711 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33965,13 +34636,13 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2677++ - if yyhl2677 { - yyb2677 = yyj2677 > l + yyj2711++ + if yyhl2711 { + yyb2711 = yyj2711 > l } else { - yyb2677 = r.CheckBreak() + yyb2711 = r.CheckBreak() } - if yyb2677 { + if yyb2711 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33981,13 +34652,13 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2677++ - if yyhl2677 { - yyb2677 = yyj2677 > l + yyj2711++ + if yyhl2711 { + yyb2711 = yyj2711 > l } else { - yyb2677 = r.CheckBreak() + yyb2711 = r.CheckBreak() } - if yyb2677 { + if yyb2711 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33995,16 +34666,671 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv2680 := &x.ObjectMeta - yyv2680.CodecDecodeSelf(d) + yyv2714 := &x.ObjectMeta + yyv2714.CodecDecodeSelf(d) } - yyj2677++ - if yyhl2677 { - yyb2677 = yyj2677 > l + yyj2711++ + if yyhl2711 { + yyb2711 = yyj2711 > l } else { - yyb2677 = r.CheckBreak() + yyb2711 = r.CheckBreak() } - if yyb2677 { + if yyb2711 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Spec = NamespaceSpec{} + } else { + yyv2715 := &x.Spec + yyv2715.CodecDecodeSelf(d) + } + yyj2711++ + if yyhl2711 { + yyb2711 = yyj2711 > l + } else { + yyb2711 = r.CheckBreak() + } + if yyb2711 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Status = NamespaceStatus{} + } else { + yyv2716 := &x.Status + yyv2716.CodecDecodeSelf(d) + } + for { + yyj2711++ + if yyhl2711 { + yyb2711 = yyj2711 > l + } else { + yyb2711 = r.CheckBreak() + } + if yyb2711 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj2711-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *NamespaceList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym2717 := z.EncBinary() + _ = yym2717 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2718 := !z.EncBinary() + yy2arr2718 := z.EncBasicHandle().StructToArray + var yyq2718 [4]bool + _, _, _ = yysep2718, yyq2718, yy2arr2718 + const yyr2718 bool = false + yyq2718[0] = x.Kind != "" + yyq2718[1] = x.APIVersion != "" + yyq2718[2] = true + var yynn2718 int + if yyr2718 || yy2arr2718 { + r.EncodeArrayStart(4) + } else { + yynn2718 = 1 + for _, b := range yyq2718 { + if b { + yynn2718++ + } + } + r.EncodeMapStart(yynn2718) + yynn2718 = 0 + } + if yyr2718 || yy2arr2718 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2718[0] { + yym2720 := z.EncBinary() + _ = yym2720 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2718[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym2721 := z.EncBinary() + _ = yym2721 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2718 || yy2arr2718 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2718[1] { + yym2723 := z.EncBinary() + _ = yym2723 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2718[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym2724 := z.EncBinary() + _ = yym2724 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2718 || yy2arr2718 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2718[2] { + yy2726 := &x.ListMeta + yym2727 := z.EncBinary() + _ = yym2727 + if false { + } else if z.HasExtensions() && z.EncExt(yy2726) { + } else { + z.EncFallback(yy2726) + } + } else { + r.EncodeNil() + } + } else { + if yyq2718[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy2728 := &x.ListMeta + yym2729 := z.EncBinary() + _ = yym2729 + if false { + } else if z.HasExtensions() && z.EncExt(yy2728) { + } else { + z.EncFallback(yy2728) + } + } + } + if yyr2718 || yy2arr2718 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym2731 := z.EncBinary() + _ = yym2731 + if false { + } else { + h.encSliceNamespace(([]Namespace)(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 { + yym2732 := z.EncBinary() + _ = yym2732 + if false { + } else { + h.encSliceNamespace(([]Namespace)(x.Items), e) + } + } + } + if yyr2718 || yy2arr2718 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *NamespaceList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym2733 := z.DecBinary() + _ = yym2733 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2734 := r.ContainerType() + if yyct2734 == codecSelferValueTypeMap1234 { + yyl2734 := r.ReadMapStart() + if yyl2734 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2734, d) + } + } else if yyct2734 == codecSelferValueTypeArray1234 { + yyl2734 := r.ReadArrayStart() + if yyl2734 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2734, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *NamespaceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys2735Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2735Slc + var yyhl2735 bool = l >= 0 + for yyj2735 := 0; ; yyj2735++ { + if yyhl2735 { + if yyj2735 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys2735Slc = r.DecodeBytes(yys2735Slc, true, true) + yys2735 := string(yys2735Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys2735 { + 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()) + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg2_unversioned.ListMeta{} + } else { + yyv2738 := &x.ListMeta + yym2739 := z.DecBinary() + _ = yym2739 + if false { + } else if z.HasExtensions() && z.DecExt(yyv2738) { + } else { + z.DecFallback(yyv2738, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv2740 := &x.Items + yym2741 := z.DecBinary() + _ = yym2741 + if false { + } else { + h.decSliceNamespace((*[]Namespace)(yyv2740), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys2735) + } // end switch yys2735 + } // end for yyj2735 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj2742 int + var yyb2742 bool + var yyhl2742 bool = l >= 0 + yyj2742++ + if yyhl2742 { + yyb2742 = yyj2742 > l + } else { + yyb2742 = r.CheckBreak() + } + if yyb2742 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj2742++ + if yyhl2742 { + yyb2742 = yyj2742 > l + } else { + yyb2742 = r.CheckBreak() + } + if yyb2742 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + yyj2742++ + if yyhl2742 { + yyb2742 = yyj2742 > l + } else { + yyb2742 = r.CheckBreak() + } + if yyb2742 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg2_unversioned.ListMeta{} + } else { + yyv2745 := &x.ListMeta + yym2746 := z.DecBinary() + _ = yym2746 + if false { + } else if z.HasExtensions() && z.DecExt(yyv2745) { + } else { + z.DecFallback(yyv2745, false) + } + } + yyj2742++ + if yyhl2742 { + yyb2742 = yyj2742 > l + } else { + yyb2742 = r.CheckBreak() + } + if yyb2742 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv2747 := &x.Items + yym2748 := z.DecBinary() + _ = yym2748 + if false { + } else { + h.decSliceNamespace((*[]Namespace)(yyv2747), d) + } + } + for { + yyj2742++ + if yyhl2742 { + yyb2742 = yyj2742 > l + } else { + yyb2742 = r.CheckBreak() + } + if yyb2742 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj2742-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *Binding) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym2749 := z.EncBinary() + _ = yym2749 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2750 := !z.EncBinary() + yy2arr2750 := z.EncBasicHandle().StructToArray + var yyq2750 [4]bool + _, _, _ = yysep2750, yyq2750, yy2arr2750 + const yyr2750 bool = false + yyq2750[0] = x.Kind != "" + yyq2750[1] = x.APIVersion != "" + yyq2750[2] = true + var yynn2750 int + if yyr2750 || yy2arr2750 { + r.EncodeArrayStart(4) + } else { + yynn2750 = 1 + for _, b := range yyq2750 { + if b { + yynn2750++ + } + } + r.EncodeMapStart(yynn2750) + yynn2750 = 0 + } + if yyr2750 || yy2arr2750 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2750[0] { + yym2752 := z.EncBinary() + _ = yym2752 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2750[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym2753 := z.EncBinary() + _ = yym2753 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2750 || yy2arr2750 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2750[1] { + yym2755 := z.EncBinary() + _ = yym2755 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2750[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym2756 := z.EncBinary() + _ = yym2756 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2750 || yy2arr2750 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2750[2] { + yy2758 := &x.ObjectMeta + yy2758.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2750[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy2759 := &x.ObjectMeta + yy2759.CodecEncodeSelf(e) + } + } + if yyr2750 || yy2arr2750 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2761 := &x.Target + yy2761.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("target")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy2762 := &x.Target + yy2762.CodecEncodeSelf(e) + } + if yyr2750 || yy2arr2750 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *Binding) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym2763 := z.DecBinary() + _ = yym2763 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2764 := r.ContainerType() + if yyct2764 == codecSelferValueTypeMap1234 { + yyl2764 := r.ReadMapStart() + if yyl2764 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2764, d) + } + } else if yyct2764 == codecSelferValueTypeArray1234 { + yyl2764 := r.ReadArrayStart() + if yyl2764 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2764, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *Binding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys2765Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2765Slc + var yyhl2765 bool = l >= 0 + for yyj2765 := 0; ; yyj2765++ { + if yyhl2765 { + if yyj2765 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys2765Slc = r.DecodeBytes(yys2765Slc, true, true) + yys2765 := string(yys2765Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys2765 { + 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()) + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = ObjectMeta{} + } else { + yyv2768 := &x.ObjectMeta + yyv2768.CodecDecodeSelf(d) + } + case "target": + if r.TryDecodeAsNil() { + x.Target = ObjectReference{} + } else { + yyv2769 := &x.Target + yyv2769.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys2765) + } // end switch yys2765 + } // end for yyj2765 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj2770 int + var yyb2770 bool + var yyhl2770 bool = l >= 0 + yyj2770++ + if yyhl2770 { + yyb2770 = yyj2770 > l + } else { + yyb2770 = r.CheckBreak() + } + if yyb2770 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj2770++ + if yyhl2770 { + yyb2770 = yyj2770 > l + } else { + yyb2770 = r.CheckBreak() + } + if yyb2770 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + yyj2770++ + if yyhl2770 { + yyb2770 = yyj2770 > l + } else { + yyb2770 = r.CheckBreak() + } + if yyb2770 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = ObjectMeta{} + } else { + yyv2773 := &x.ObjectMeta + yyv2773.CodecDecodeSelf(d) + } + yyj2770++ + if yyhl2770 { + yyb2770 = yyj2770 > l + } else { + yyb2770 = r.CheckBreak() + } + if yyb2770 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34012,21 +35338,21 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Target = ObjectReference{} } else { - yyv2681 := &x.Target - yyv2681.CodecDecodeSelf(d) + yyv2774 := &x.Target + yyv2774.CodecDecodeSelf(d) } for { - yyj2677++ - if yyhl2677 { - yyb2677 = yyj2677 > l + yyj2770++ + if yyhl2770 { + yyb2770 = yyj2770 > l } else { - yyb2677 = r.CheckBreak() + yyb2770 = r.CheckBreak() } - if yyb2677 { + if yyb2770 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2677-1, "") + z.DecStructFieldNotFound(yyj2770-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -34038,36 +35364,36 @@ func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2682 := z.EncBinary() - _ = yym2682 + yym2775 := z.EncBinary() + _ = yym2775 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2683 := !z.EncBinary() - yy2arr2683 := z.EncBasicHandle().StructToArray - var yyq2683 [3]bool - _, _, _ = yysep2683, yyq2683, yy2arr2683 - const yyr2683 bool = false - yyq2683[0] = x.Kind != "" - yyq2683[1] = x.APIVersion != "" - var yynn2683 int - if yyr2683 || yy2arr2683 { + yysep2776 := !z.EncBinary() + yy2arr2776 := z.EncBasicHandle().StructToArray + var yyq2776 [3]bool + _, _, _ = yysep2776, yyq2776, yy2arr2776 + const yyr2776 bool = false + yyq2776[0] = x.Kind != "" + yyq2776[1] = x.APIVersion != "" + var yynn2776 int + if yyr2776 || yy2arr2776 { r.EncodeArrayStart(3) } else { - yynn2683 = 1 - for _, b := range yyq2683 { + yynn2776 = 1 + for _, b := range yyq2776 { if b { - yynn2683++ + yynn2776++ } } - r.EncodeMapStart(yynn2683) - yynn2683 = 0 + r.EncodeMapStart(yynn2776) + yynn2776 = 0 } - if yyr2683 || yy2arr2683 { + if yyr2776 || yy2arr2776 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2683[0] { - yym2685 := z.EncBinary() - _ = yym2685 + if yyq2776[0] { + yym2778 := z.EncBinary() + _ = yym2778 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -34076,23 +35402,23 @@ func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2683[0] { + if yyq2776[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2686 := z.EncBinary() - _ = yym2686 + yym2779 := z.EncBinary() + _ = yym2779 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2683 || yy2arr2683 { + if yyr2776 || yy2arr2776 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2683[1] { - yym2688 := z.EncBinary() - _ = yym2688 + if yyq2776[1] { + yym2781 := z.EncBinary() + _ = yym2781 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -34101,29 +35427,29 @@ func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2683[1] { + if yyq2776[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2689 := z.EncBinary() - _ = yym2689 + yym2782 := z.EncBinary() + _ = yym2782 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2683 || yy2arr2683 { + if yyr2776 || yy2arr2776 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.GracePeriodSeconds == nil { r.EncodeNil() } else { - yy2691 := *x.GracePeriodSeconds - yym2692 := z.EncBinary() - _ = yym2692 + yy2784 := *x.GracePeriodSeconds + yym2785 := z.EncBinary() + _ = yym2785 if false { } else { - r.EncodeInt(int64(yy2691)) + r.EncodeInt(int64(yy2784)) } } } else { @@ -34133,16 +35459,16 @@ func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x.GracePeriodSeconds == nil { r.EncodeNil() } else { - yy2693 := *x.GracePeriodSeconds - yym2694 := z.EncBinary() - _ = yym2694 + yy2786 := *x.GracePeriodSeconds + yym2787 := z.EncBinary() + _ = yym2787 if false { } else { - r.EncodeInt(int64(yy2693)) + r.EncodeInt(int64(yy2786)) } } } - if yyr2683 || yy2arr2683 { + if yyr2776 || yy2arr2776 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -34155,25 +35481,25 @@ func (x *DeleteOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2695 := z.DecBinary() - _ = yym2695 + yym2788 := z.DecBinary() + _ = yym2788 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2696 := r.ContainerType() - if yyct2696 == codecSelferValueTypeMap1234 { - yyl2696 := r.ReadMapStart() - if yyl2696 == 0 { + yyct2789 := r.ContainerType() + if yyct2789 == codecSelferValueTypeMap1234 { + yyl2789 := r.ReadMapStart() + if yyl2789 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2696, d) + x.codecDecodeSelfFromMap(yyl2789, d) } - } else if yyct2696 == codecSelferValueTypeArray1234 { - yyl2696 := r.ReadArrayStart() - if yyl2696 == 0 { + } else if yyct2789 == codecSelferValueTypeArray1234 { + yyl2789 := r.ReadArrayStart() + if yyl2789 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2696, d) + x.codecDecodeSelfFromArray(yyl2789, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -34185,12 +35511,12 @@ func (x *DeleteOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2697Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2697Slc - var yyhl2697 bool = l >= 0 - for yyj2697 := 0; ; yyj2697++ { - if yyhl2697 { - if yyj2697 >= l { + var yys2790Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2790Slc + var yyhl2790 bool = l >= 0 + for yyj2790 := 0; ; yyj2790++ { + if yyhl2790 { + if yyj2790 >= l { break } } else { @@ -34199,10 +35525,10 @@ func (x *DeleteOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2697Slc = r.DecodeBytes(yys2697Slc, true, true) - yys2697 := string(yys2697Slc) + yys2790Slc = r.DecodeBytes(yys2790Slc, true, true) + yys2790 := string(yys2790Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2697 { + switch yys2790 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -34224,17 +35550,17 @@ func (x *DeleteOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.GracePeriodSeconds == nil { x.GracePeriodSeconds = new(int64) } - yym2701 := z.DecBinary() - _ = yym2701 + yym2794 := z.DecBinary() + _ = yym2794 if false { } else { *((*int64)(x.GracePeriodSeconds)) = int64(r.DecodeInt(64)) } } default: - z.DecStructFieldNotFound(-1, yys2697) - } // end switch yys2697 - } // end for yyj2697 + z.DecStructFieldNotFound(-1, yys2790) + } // end switch yys2790 + } // end for yyj2790 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -34242,16 +35568,16 @@ func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2702 int - var yyb2702 bool - var yyhl2702 bool = l >= 0 - yyj2702++ - if yyhl2702 { - yyb2702 = yyj2702 > l + var yyj2795 int + var yyb2795 bool + var yyhl2795 bool = l >= 0 + yyj2795++ + if yyhl2795 { + yyb2795 = yyj2795 > l } else { - yyb2702 = r.CheckBreak() + yyb2795 = r.CheckBreak() } - if yyb2702 { + if yyb2795 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34261,13 +35587,13 @@ func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2702++ - if yyhl2702 { - yyb2702 = yyj2702 > l + yyj2795++ + if yyhl2795 { + yyb2795 = yyj2795 > l } else { - yyb2702 = r.CheckBreak() + yyb2795 = r.CheckBreak() } - if yyb2702 { + if yyb2795 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34277,13 +35603,13 @@ func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2702++ - if yyhl2702 { - yyb2702 = yyj2702 > l + yyj2795++ + if yyhl2795 { + yyb2795 = yyj2795 > l } else { - yyb2702 = r.CheckBreak() + yyb2795 = r.CheckBreak() } - if yyb2702 { + if yyb2795 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34296,25 +35622,25 @@ func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.GracePeriodSeconds == nil { x.GracePeriodSeconds = new(int64) } - yym2706 := z.DecBinary() - _ = yym2706 + yym2799 := z.DecBinary() + _ = yym2799 if false { } else { *((*int64)(x.GracePeriodSeconds)) = int64(r.DecodeInt(64)) } } for { - yyj2702++ - if yyhl2702 { - yyb2702 = yyj2702 > l + yyj2795++ + if yyhl2795 { + yyb2795 = yyj2795 > l } else { - yyb2702 = r.CheckBreak() + yyb2795 = r.CheckBreak() } - if yyb2702 { + if yyb2795 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2702-1, "") + z.DecStructFieldNotFound(yyj2795-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -34326,36 +35652,36 @@ func (x *ExportOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2707 := z.EncBinary() - _ = yym2707 + yym2800 := z.EncBinary() + _ = yym2800 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2708 := !z.EncBinary() - yy2arr2708 := z.EncBasicHandle().StructToArray - var yyq2708 [4]bool - _, _, _ = yysep2708, yyq2708, yy2arr2708 - const yyr2708 bool = false - yyq2708[0] = x.Kind != "" - yyq2708[1] = x.APIVersion != "" - var yynn2708 int - if yyr2708 || yy2arr2708 { + yysep2801 := !z.EncBinary() + yy2arr2801 := z.EncBasicHandle().StructToArray + var yyq2801 [4]bool + _, _, _ = yysep2801, yyq2801, yy2arr2801 + const yyr2801 bool = false + yyq2801[0] = x.Kind != "" + yyq2801[1] = x.APIVersion != "" + var yynn2801 int + if yyr2801 || yy2arr2801 { r.EncodeArrayStart(4) } else { - yynn2708 = 2 - for _, b := range yyq2708 { + yynn2801 = 2 + for _, b := range yyq2801 { if b { - yynn2708++ + yynn2801++ } } - r.EncodeMapStart(yynn2708) - yynn2708 = 0 + r.EncodeMapStart(yynn2801) + yynn2801 = 0 } - if yyr2708 || yy2arr2708 { + if yyr2801 || yy2arr2801 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2708[0] { - yym2710 := z.EncBinary() - _ = yym2710 + if yyq2801[0] { + yym2803 := z.EncBinary() + _ = yym2803 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -34364,23 +35690,23 @@ func (x *ExportOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2708[0] { + if yyq2801[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2711 := z.EncBinary() - _ = yym2711 + yym2804 := z.EncBinary() + _ = yym2804 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2708 || yy2arr2708 { + if yyr2801 || yy2arr2801 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2708[1] { - yym2713 := z.EncBinary() - _ = yym2713 + if yyq2801[1] { + yym2806 := z.EncBinary() + _ = yym2806 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -34389,22 +35715,22 @@ func (x *ExportOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2708[1] { + if yyq2801[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2714 := z.EncBinary() - _ = yym2714 + yym2807 := z.EncBinary() + _ = yym2807 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2708 || yy2arr2708 { + if yyr2801 || yy2arr2801 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2716 := z.EncBinary() - _ = yym2716 + yym2809 := z.EncBinary() + _ = yym2809 if false { } else { r.EncodeBool(bool(x.Export)) @@ -34413,17 +35739,17 @@ func (x *ExportOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("export")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2717 := z.EncBinary() - _ = yym2717 + yym2810 := z.EncBinary() + _ = yym2810 if false { } else { r.EncodeBool(bool(x.Export)) } } - if yyr2708 || yy2arr2708 { + if yyr2801 || yy2arr2801 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2719 := z.EncBinary() - _ = yym2719 + yym2812 := z.EncBinary() + _ = yym2812 if false { } else { r.EncodeBool(bool(x.Exact)) @@ -34432,14 +35758,14 @@ func (x *ExportOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("exact")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2720 := z.EncBinary() - _ = yym2720 + yym2813 := z.EncBinary() + _ = yym2813 if false { } else { r.EncodeBool(bool(x.Exact)) } } - if yyr2708 || yy2arr2708 { + if yyr2801 || yy2arr2801 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -34452,25 +35778,25 @@ func (x *ExportOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2721 := z.DecBinary() - _ = yym2721 + yym2814 := z.DecBinary() + _ = yym2814 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2722 := r.ContainerType() - if yyct2722 == codecSelferValueTypeMap1234 { - yyl2722 := r.ReadMapStart() - if yyl2722 == 0 { + yyct2815 := r.ContainerType() + if yyct2815 == codecSelferValueTypeMap1234 { + yyl2815 := r.ReadMapStart() + if yyl2815 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2722, d) + x.codecDecodeSelfFromMap(yyl2815, d) } - } else if yyct2722 == codecSelferValueTypeArray1234 { - yyl2722 := r.ReadArrayStart() - if yyl2722 == 0 { + } else if yyct2815 == codecSelferValueTypeArray1234 { + yyl2815 := r.ReadArrayStart() + if yyl2815 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2722, d) + x.codecDecodeSelfFromArray(yyl2815, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -34482,12 +35808,12 @@ func (x *ExportOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2723Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2723Slc - var yyhl2723 bool = l >= 0 - for yyj2723 := 0; ; yyj2723++ { - if yyhl2723 { - if yyj2723 >= l { + var yys2816Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2816Slc + var yyhl2816 bool = l >= 0 + for yyj2816 := 0; ; yyj2816++ { + if yyhl2816 { + if yyj2816 >= l { break } } else { @@ -34496,10 +35822,10 @@ func (x *ExportOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2723Slc = r.DecodeBytes(yys2723Slc, true, true) - yys2723 := string(yys2723Slc) + yys2816Slc = r.DecodeBytes(yys2816Slc, true, true) + yys2816 := string(yys2816Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2723 { + switch yys2816 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -34525,9 +35851,9 @@ func (x *ExportOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Exact = bool(r.DecodeBool()) } default: - z.DecStructFieldNotFound(-1, yys2723) - } // end switch yys2723 - } // end for yyj2723 + z.DecStructFieldNotFound(-1, yys2816) + } // end switch yys2816 + } // end for yyj2816 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -34535,16 +35861,16 @@ func (x *ExportOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2728 int - var yyb2728 bool - var yyhl2728 bool = l >= 0 - yyj2728++ - if yyhl2728 { - yyb2728 = yyj2728 > l + var yyj2821 int + var yyb2821 bool + var yyhl2821 bool = l >= 0 + yyj2821++ + if yyhl2821 { + yyb2821 = yyj2821 > l } else { - yyb2728 = r.CheckBreak() + yyb2821 = r.CheckBreak() } - if yyb2728 { + if yyb2821 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34554,13 +35880,13 @@ func (x *ExportOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2728++ - if yyhl2728 { - yyb2728 = yyj2728 > l + yyj2821++ + if yyhl2821 { + yyb2821 = yyj2821 > l } else { - yyb2728 = r.CheckBreak() + yyb2821 = r.CheckBreak() } - if yyb2728 { + if yyb2821 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34570,13 +35896,13 @@ func (x *ExportOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2728++ - if yyhl2728 { - yyb2728 = yyj2728 > l + yyj2821++ + if yyhl2821 { + yyb2821 = yyj2821 > l } else { - yyb2728 = r.CheckBreak() + yyb2821 = r.CheckBreak() } - if yyb2728 { + if yyb2821 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34586,13 +35912,13 @@ func (x *ExportOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Export = bool(r.DecodeBool()) } - yyj2728++ - if yyhl2728 { - yyb2728 = yyj2728 > l + yyj2821++ + if yyhl2821 { + yyb2821 = yyj2821 > l } else { - yyb2728 = r.CheckBreak() + yyb2821 = r.CheckBreak() } - if yyb2728 { + if yyb2821 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34603,17 +35929,17 @@ func (x *ExportOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Exact = bool(r.DecodeBool()) } for { - yyj2728++ - if yyhl2728 { - yyb2728 = yyj2728 > l + yyj2821++ + if yyhl2821 { + yyb2821 = yyj2821 > l } else { - yyb2728 = r.CheckBreak() + yyb2821 = r.CheckBreak() } - if yyb2728 { + if yyb2821 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2728-1, "") + z.DecStructFieldNotFound(yyj2821-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -34625,41 +35951,41 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2733 := z.EncBinary() - _ = yym2733 + yym2826 := z.EncBinary() + _ = yym2826 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2734 := !z.EncBinary() - yy2arr2734 := z.EncBasicHandle().StructToArray - var yyq2734 [7]bool - _, _, _ = yysep2734, yyq2734, yy2arr2734 - const yyr2734 bool = false - yyq2734[0] = x.Kind != "" - yyq2734[1] = x.APIVersion != "" - yyq2734[2] = x.LabelSelector != "" - yyq2734[3] = x.FieldSelector != "" - yyq2734[4] = x.Watch != false - yyq2734[5] = x.ResourceVersion != "" - yyq2734[6] = x.TimeoutSeconds != nil - var yynn2734 int - if yyr2734 || yy2arr2734 { + yysep2827 := !z.EncBinary() + yy2arr2827 := z.EncBasicHandle().StructToArray + var yyq2827 [7]bool + _, _, _ = yysep2827, yyq2827, yy2arr2827 + const yyr2827 bool = false + yyq2827[0] = x.Kind != "" + yyq2827[1] = x.APIVersion != "" + yyq2827[2] = x.LabelSelector != "" + yyq2827[3] = x.FieldSelector != "" + yyq2827[4] = x.Watch != false + yyq2827[5] = x.ResourceVersion != "" + yyq2827[6] = x.TimeoutSeconds != nil + var yynn2827 int + if yyr2827 || yy2arr2827 { r.EncodeArrayStart(7) } else { - yynn2734 = 0 - for _, b := range yyq2734 { + yynn2827 = 0 + for _, b := range yyq2827 { if b { - yynn2734++ + yynn2827++ } } - r.EncodeMapStart(yynn2734) - yynn2734 = 0 + r.EncodeMapStart(yynn2827) + yynn2827 = 0 } - if yyr2734 || yy2arr2734 { + if yyr2827 || yy2arr2827 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2734[0] { - yym2736 := z.EncBinary() - _ = yym2736 + if yyq2827[0] { + yym2829 := z.EncBinary() + _ = yym2829 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -34668,23 +35994,23 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2734[0] { + if yyq2827[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2737 := z.EncBinary() - _ = yym2737 + yym2830 := z.EncBinary() + _ = yym2830 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2734 || yy2arr2734 { + if yyr2827 || yy2arr2827 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2734[1] { - yym2739 := z.EncBinary() - _ = yym2739 + if yyq2827[1] { + yym2832 := z.EncBinary() + _ = yym2832 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -34693,23 +36019,23 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2734[1] { + if yyq2827[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2740 := z.EncBinary() - _ = yym2740 + yym2833 := z.EncBinary() + _ = yym2833 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2734 || yy2arr2734 { + if yyr2827 || yy2arr2827 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2734[2] { - yym2742 := z.EncBinary() - _ = yym2742 + if yyq2827[2] { + yym2835 := z.EncBinary() + _ = yym2835 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.LabelSelector)) @@ -34718,23 +36044,23 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2734[2] { + if yyq2827[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("labelSelector")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2743 := z.EncBinary() - _ = yym2743 + yym2836 := z.EncBinary() + _ = yym2836 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.LabelSelector)) } } } - if yyr2734 || yy2arr2734 { + if yyr2827 || yy2arr2827 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2734[3] { - yym2745 := z.EncBinary() - _ = yym2745 + if yyq2827[3] { + yym2838 := z.EncBinary() + _ = yym2838 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FieldSelector)) @@ -34743,23 +36069,23 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2734[3] { + if yyq2827[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("fieldSelector")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2746 := z.EncBinary() - _ = yym2746 + yym2839 := z.EncBinary() + _ = yym2839 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FieldSelector)) } } } - if yyr2734 || yy2arr2734 { + if yyr2827 || yy2arr2827 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2734[4] { - yym2748 := z.EncBinary() - _ = yym2748 + if yyq2827[4] { + yym2841 := z.EncBinary() + _ = yym2841 if false { } else { r.EncodeBool(bool(x.Watch)) @@ -34768,23 +36094,23 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq2734[4] { + if yyq2827[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("watch")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2749 := z.EncBinary() - _ = yym2749 + yym2842 := z.EncBinary() + _ = yym2842 if false { } else { r.EncodeBool(bool(x.Watch)) } } } - if yyr2734 || yy2arr2734 { + if yyr2827 || yy2arr2827 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2734[5] { - yym2751 := z.EncBinary() - _ = yym2751 + if yyq2827[5] { + yym2844 := z.EncBinary() + _ = yym2844 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) @@ -34793,54 +36119,54 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2734[5] { + if yyq2827[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("resourceVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2752 := z.EncBinary() - _ = yym2752 + yym2845 := z.EncBinary() + _ = yym2845 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) } } } - if yyr2734 || yy2arr2734 { + if yyr2827 || yy2arr2827 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2734[6] { + if yyq2827[6] { if x.TimeoutSeconds == nil { r.EncodeNil() } else { - yy2754 := *x.TimeoutSeconds - yym2755 := z.EncBinary() - _ = yym2755 + yy2847 := *x.TimeoutSeconds + yym2848 := z.EncBinary() + _ = yym2848 if false { } else { - r.EncodeInt(int64(yy2754)) + r.EncodeInt(int64(yy2847)) } } } else { r.EncodeNil() } } else { - if yyq2734[6] { + if yyq2827[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("timeoutSeconds")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.TimeoutSeconds == nil { r.EncodeNil() } else { - yy2756 := *x.TimeoutSeconds - yym2757 := z.EncBinary() - _ = yym2757 + yy2849 := *x.TimeoutSeconds + yym2850 := z.EncBinary() + _ = yym2850 if false { } else { - r.EncodeInt(int64(yy2756)) + r.EncodeInt(int64(yy2849)) } } } } - if yyr2734 || yy2arr2734 { + if yyr2827 || yy2arr2827 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -34853,25 +36179,25 @@ func (x *ListOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2758 := z.DecBinary() - _ = yym2758 + yym2851 := z.DecBinary() + _ = yym2851 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2759 := r.ContainerType() - if yyct2759 == codecSelferValueTypeMap1234 { - yyl2759 := r.ReadMapStart() - if yyl2759 == 0 { + yyct2852 := r.ContainerType() + if yyct2852 == codecSelferValueTypeMap1234 { + yyl2852 := r.ReadMapStart() + if yyl2852 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2759, d) + x.codecDecodeSelfFromMap(yyl2852, d) } - } else if yyct2759 == codecSelferValueTypeArray1234 { - yyl2759 := r.ReadArrayStart() - if yyl2759 == 0 { + } else if yyct2852 == codecSelferValueTypeArray1234 { + yyl2852 := r.ReadArrayStart() + if yyl2852 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2759, d) + x.codecDecodeSelfFromArray(yyl2852, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -34883,12 +36209,12 @@ func (x *ListOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2760Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2760Slc - var yyhl2760 bool = l >= 0 - for yyj2760 := 0; ; yyj2760++ { - if yyhl2760 { - if yyj2760 >= l { + var yys2853Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2853Slc + var yyhl2853 bool = l >= 0 + for yyj2853 := 0; ; yyj2853++ { + if yyhl2853 { + if yyj2853 >= l { break } } else { @@ -34897,10 +36223,10 @@ func (x *ListOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2760Slc = r.DecodeBytes(yys2760Slc, true, true) - yys2760 := string(yys2760Slc) + yys2853Slc = r.DecodeBytes(yys2853Slc, true, true) + yys2853 := string(yys2853Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2760 { + switch yys2853 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -34946,17 +36272,17 @@ func (x *ListOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.TimeoutSeconds == nil { x.TimeoutSeconds = new(int64) } - yym2768 := z.DecBinary() - _ = yym2768 + yym2861 := z.DecBinary() + _ = yym2861 if false { } else { *((*int64)(x.TimeoutSeconds)) = int64(r.DecodeInt(64)) } } default: - z.DecStructFieldNotFound(-1, yys2760) - } // end switch yys2760 - } // end for yyj2760 + z.DecStructFieldNotFound(-1, yys2853) + } // end switch yys2853 + } // end for yyj2853 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -34964,16 +36290,16 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2769 int - var yyb2769 bool - var yyhl2769 bool = l >= 0 - yyj2769++ - if yyhl2769 { - yyb2769 = yyj2769 > l + var yyj2862 int + var yyb2862 bool + var yyhl2862 bool = l >= 0 + yyj2862++ + if yyhl2862 { + yyb2862 = yyj2862 > l } else { - yyb2769 = r.CheckBreak() + yyb2862 = r.CheckBreak() } - if yyb2769 { + if yyb2862 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34983,13 +36309,13 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2769++ - if yyhl2769 { - yyb2769 = yyj2769 > l + yyj2862++ + if yyhl2862 { + yyb2862 = yyj2862 > l } else { - yyb2769 = r.CheckBreak() + yyb2862 = r.CheckBreak() } - if yyb2769 { + if yyb2862 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34999,13 +36325,13 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2769++ - if yyhl2769 { - yyb2769 = yyj2769 > l + yyj2862++ + if yyhl2862 { + yyb2862 = yyj2862 > l } else { - yyb2769 = r.CheckBreak() + yyb2862 = r.CheckBreak() } - if yyb2769 { + if yyb2862 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35015,13 +36341,13 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.LabelSelector = string(r.DecodeString()) } - yyj2769++ - if yyhl2769 { - yyb2769 = yyj2769 > l + yyj2862++ + if yyhl2862 { + yyb2862 = yyj2862 > l } else { - yyb2769 = r.CheckBreak() + yyb2862 = r.CheckBreak() } - if yyb2769 { + if yyb2862 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35031,13 +36357,13 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.FieldSelector = string(r.DecodeString()) } - yyj2769++ - if yyhl2769 { - yyb2769 = yyj2769 > l + yyj2862++ + if yyhl2862 { + yyb2862 = yyj2862 > l } else { - yyb2769 = r.CheckBreak() + yyb2862 = r.CheckBreak() } - if yyb2769 { + if yyb2862 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35047,13 +36373,13 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Watch = bool(r.DecodeBool()) } - yyj2769++ - if yyhl2769 { - yyb2769 = yyj2769 > l + yyj2862++ + if yyhl2862 { + yyb2862 = yyj2862 > l } else { - yyb2769 = r.CheckBreak() + yyb2862 = r.CheckBreak() } - if yyb2769 { + if yyb2862 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35063,13 +36389,13 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.ResourceVersion = string(r.DecodeString()) } - yyj2769++ - if yyhl2769 { - yyb2769 = yyj2769 > l + yyj2862++ + if yyhl2862 { + yyb2862 = yyj2862 > l } else { - yyb2769 = r.CheckBreak() + yyb2862 = r.CheckBreak() } - if yyb2769 { + if yyb2862 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35082,25 +36408,25 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.TimeoutSeconds == nil { x.TimeoutSeconds = new(int64) } - yym2777 := z.DecBinary() - _ = yym2777 + yym2870 := z.DecBinary() + _ = yym2870 if false { } else { *((*int64)(x.TimeoutSeconds)) = int64(r.DecodeInt(64)) } } for { - yyj2769++ - if yyhl2769 { - yyb2769 = yyj2769 > l + yyj2862++ + if yyhl2862 { + yyb2862 = yyj2862 > l } else { - yyb2769 = r.CheckBreak() + yyb2862 = r.CheckBreak() } - if yyb2769 { + if yyb2862 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2769-1, "") + z.DecStructFieldNotFound(yyj2862-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -35112,44 +36438,44 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2778 := z.EncBinary() - _ = yym2778 + yym2871 := z.EncBinary() + _ = yym2871 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2779 := !z.EncBinary() - yy2arr2779 := z.EncBasicHandle().StructToArray - var yyq2779 [10]bool - _, _, _ = yysep2779, yyq2779, yy2arr2779 - const yyr2779 bool = false - yyq2779[0] = x.Kind != "" - yyq2779[1] = x.APIVersion != "" - yyq2779[2] = x.Container != "" - yyq2779[3] = x.Follow != false - yyq2779[4] = x.Previous != false - yyq2779[5] = x.SinceSeconds != nil - yyq2779[6] = x.SinceTime != nil - yyq2779[7] = x.Timestamps != false - yyq2779[8] = x.TailLines != nil - yyq2779[9] = x.LimitBytes != nil - var yynn2779 int - if yyr2779 || yy2arr2779 { + yysep2872 := !z.EncBinary() + yy2arr2872 := z.EncBasicHandle().StructToArray + var yyq2872 [10]bool + _, _, _ = yysep2872, yyq2872, yy2arr2872 + const yyr2872 bool = false + yyq2872[0] = x.Kind != "" + yyq2872[1] = x.APIVersion != "" + yyq2872[2] = x.Container != "" + yyq2872[3] = x.Follow != false + yyq2872[4] = x.Previous != false + yyq2872[5] = x.SinceSeconds != nil + yyq2872[6] = x.SinceTime != nil + yyq2872[7] = x.Timestamps != false + yyq2872[8] = x.TailLines != nil + yyq2872[9] = x.LimitBytes != nil + var yynn2872 int + if yyr2872 || yy2arr2872 { r.EncodeArrayStart(10) } else { - yynn2779 = 0 - for _, b := range yyq2779 { + yynn2872 = 0 + for _, b := range yyq2872 { if b { - yynn2779++ + yynn2872++ } } - r.EncodeMapStart(yynn2779) - yynn2779 = 0 + r.EncodeMapStart(yynn2872) + yynn2872 = 0 } - if yyr2779 || yy2arr2779 { + if yyr2872 || yy2arr2872 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2779[0] { - yym2781 := z.EncBinary() - _ = yym2781 + if yyq2872[0] { + yym2874 := z.EncBinary() + _ = yym2874 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -35158,23 +36484,23 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2779[0] { + if yyq2872[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2782 := z.EncBinary() - _ = yym2782 + yym2875 := z.EncBinary() + _ = yym2875 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2779 || yy2arr2779 { + if yyr2872 || yy2arr2872 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2779[1] { - yym2784 := z.EncBinary() - _ = yym2784 + if yyq2872[1] { + yym2877 := z.EncBinary() + _ = yym2877 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -35183,23 +36509,23 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2779[1] { + if yyq2872[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2785 := z.EncBinary() - _ = yym2785 + yym2878 := z.EncBinary() + _ = yym2878 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2779 || yy2arr2779 { + if yyr2872 || yy2arr2872 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2779[2] { - yym2787 := z.EncBinary() - _ = yym2787 + if yyq2872[2] { + yym2880 := z.EncBinary() + _ = yym2880 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Container)) @@ -35208,23 +36534,23 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2779[2] { + if yyq2872[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("container")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2788 := z.EncBinary() - _ = yym2788 + yym2881 := z.EncBinary() + _ = yym2881 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Container)) } } } - if yyr2779 || yy2arr2779 { + if yyr2872 || yy2arr2872 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2779[3] { - yym2790 := z.EncBinary() - _ = yym2790 + if yyq2872[3] { + yym2883 := z.EncBinary() + _ = yym2883 if false { } else { r.EncodeBool(bool(x.Follow)) @@ -35233,23 +36559,23 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq2779[3] { + if yyq2872[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("follow")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2791 := z.EncBinary() - _ = yym2791 + yym2884 := z.EncBinary() + _ = yym2884 if false { } else { r.EncodeBool(bool(x.Follow)) } } } - if yyr2779 || yy2arr2779 { + if yyr2872 || yy2arr2872 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2779[4] { - yym2793 := z.EncBinary() - _ = yym2793 + if yyq2872[4] { + yym2886 := z.EncBinary() + _ = yym2886 if false { } else { r.EncodeBool(bool(x.Previous)) @@ -35258,66 +36584,66 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq2779[4] { + if yyq2872[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("previous")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2794 := z.EncBinary() - _ = yym2794 + yym2887 := z.EncBinary() + _ = yym2887 if false { } else { r.EncodeBool(bool(x.Previous)) } } } - if yyr2779 || yy2arr2779 { + if yyr2872 || yy2arr2872 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2779[5] { + if yyq2872[5] { if x.SinceSeconds == nil { r.EncodeNil() } else { - yy2796 := *x.SinceSeconds - yym2797 := z.EncBinary() - _ = yym2797 + yy2889 := *x.SinceSeconds + yym2890 := z.EncBinary() + _ = yym2890 if false { } else { - r.EncodeInt(int64(yy2796)) + r.EncodeInt(int64(yy2889)) } } } else { r.EncodeNil() } } else { - if yyq2779[5] { + if yyq2872[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("sinceSeconds")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.SinceSeconds == nil { r.EncodeNil() } else { - yy2798 := *x.SinceSeconds - yym2799 := z.EncBinary() - _ = yym2799 + yy2891 := *x.SinceSeconds + yym2892 := z.EncBinary() + _ = yym2892 if false { } else { - r.EncodeInt(int64(yy2798)) + r.EncodeInt(int64(yy2891)) } } } } - if yyr2779 || yy2arr2779 { + if yyr2872 || yy2arr2872 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2779[6] { + if yyq2872[6] { if x.SinceTime == nil { r.EncodeNil() } else { - yym2801 := z.EncBinary() - _ = yym2801 + yym2894 := z.EncBinary() + _ = yym2894 if false { } else if z.HasExtensions() && z.EncExt(x.SinceTime) { - } else if yym2801 { + } else if yym2894 { z.EncBinaryMarshal(x.SinceTime) - } else if !yym2801 && z.IsJSONHandle() { + } else if !yym2894 && z.IsJSONHandle() { z.EncJSONMarshal(x.SinceTime) } else { z.EncFallback(x.SinceTime) @@ -35327,20 +36653,20 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2779[6] { + if yyq2872[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("sinceTime")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.SinceTime == nil { r.EncodeNil() } else { - yym2802 := z.EncBinary() - _ = yym2802 + yym2895 := z.EncBinary() + _ = yym2895 if false { } else if z.HasExtensions() && z.EncExt(x.SinceTime) { - } else if yym2802 { + } else if yym2895 { z.EncBinaryMarshal(x.SinceTime) - } else if !yym2802 && z.IsJSONHandle() { + } else if !yym2895 && z.IsJSONHandle() { z.EncJSONMarshal(x.SinceTime) } else { z.EncFallback(x.SinceTime) @@ -35348,11 +36674,11 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2779 || yy2arr2779 { + if yyr2872 || yy2arr2872 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2779[7] { - yym2804 := z.EncBinary() - _ = yym2804 + if yyq2872[7] { + yym2897 := z.EncBinary() + _ = yym2897 if false { } else { r.EncodeBool(bool(x.Timestamps)) @@ -35361,89 +36687,89 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq2779[7] { + if yyq2872[7] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("timestamps")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2805 := z.EncBinary() - _ = yym2805 + yym2898 := z.EncBinary() + _ = yym2898 if false { } else { r.EncodeBool(bool(x.Timestamps)) } } } - if yyr2779 || yy2arr2779 { + if yyr2872 || yy2arr2872 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2779[8] { + if yyq2872[8] { if x.TailLines == nil { r.EncodeNil() } else { - yy2807 := *x.TailLines - yym2808 := z.EncBinary() - _ = yym2808 + yy2900 := *x.TailLines + yym2901 := z.EncBinary() + _ = yym2901 if false { } else { - r.EncodeInt(int64(yy2807)) + r.EncodeInt(int64(yy2900)) } } } else { r.EncodeNil() } } else { - if yyq2779[8] { + if yyq2872[8] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("tailLines")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.TailLines == nil { r.EncodeNil() } else { - yy2809 := *x.TailLines - yym2810 := z.EncBinary() - _ = yym2810 + yy2902 := *x.TailLines + yym2903 := z.EncBinary() + _ = yym2903 if false { } else { - r.EncodeInt(int64(yy2809)) + r.EncodeInt(int64(yy2902)) } } } } - if yyr2779 || yy2arr2779 { + if yyr2872 || yy2arr2872 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2779[9] { + if yyq2872[9] { if x.LimitBytes == nil { r.EncodeNil() } else { - yy2812 := *x.LimitBytes - yym2813 := z.EncBinary() - _ = yym2813 + yy2905 := *x.LimitBytes + yym2906 := z.EncBinary() + _ = yym2906 if false { } else { - r.EncodeInt(int64(yy2812)) + r.EncodeInt(int64(yy2905)) } } } else { r.EncodeNil() } } else { - if yyq2779[9] { + if yyq2872[9] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("limitBytes")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.LimitBytes == nil { r.EncodeNil() } else { - yy2814 := *x.LimitBytes - yym2815 := z.EncBinary() - _ = yym2815 + yy2907 := *x.LimitBytes + yym2908 := z.EncBinary() + _ = yym2908 if false { } else { - r.EncodeInt(int64(yy2814)) + r.EncodeInt(int64(yy2907)) } } } } - if yyr2779 || yy2arr2779 { + if yyr2872 || yy2arr2872 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -35456,25 +36782,25 @@ func (x *PodLogOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2816 := z.DecBinary() - _ = yym2816 + yym2909 := z.DecBinary() + _ = yym2909 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2817 := r.ContainerType() - if yyct2817 == codecSelferValueTypeMap1234 { - yyl2817 := r.ReadMapStart() - if yyl2817 == 0 { + yyct2910 := r.ContainerType() + if yyct2910 == codecSelferValueTypeMap1234 { + yyl2910 := r.ReadMapStart() + if yyl2910 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2817, d) + x.codecDecodeSelfFromMap(yyl2910, d) } - } else if yyct2817 == codecSelferValueTypeArray1234 { - yyl2817 := r.ReadArrayStart() - if yyl2817 == 0 { + } else if yyct2910 == codecSelferValueTypeArray1234 { + yyl2910 := r.ReadArrayStart() + if yyl2910 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2817, d) + x.codecDecodeSelfFromArray(yyl2910, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -35486,12 +36812,12 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2818Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2818Slc - var yyhl2818 bool = l >= 0 - for yyj2818 := 0; ; yyj2818++ { - if yyhl2818 { - if yyj2818 >= l { + var yys2911Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2911Slc + var yyhl2911 bool = l >= 0 + for yyj2911 := 0; ; yyj2911++ { + if yyhl2911 { + if yyj2911 >= l { break } } else { @@ -35500,10 +36826,10 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2818Slc = r.DecodeBytes(yys2818Slc, true, true) - yys2818 := string(yys2818Slc) + yys2911Slc = r.DecodeBytes(yys2911Slc, true, true) + yys2911 := string(yys2911Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2818 { + switch yys2911 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -35543,8 +36869,8 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.SinceSeconds == nil { x.SinceSeconds = new(int64) } - yym2825 := z.DecBinary() - _ = yym2825 + yym2918 := z.DecBinary() + _ = yym2918 if false { } else { *((*int64)(x.SinceSeconds)) = int64(r.DecodeInt(64)) @@ -35559,13 +36885,13 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.SinceTime == nil { x.SinceTime = new(pkg2_unversioned.Time) } - yym2827 := z.DecBinary() - _ = yym2827 + yym2920 := z.DecBinary() + _ = yym2920 if false { } else if z.HasExtensions() && z.DecExt(x.SinceTime) { - } else if yym2827 { + } else if yym2920 { z.DecBinaryUnmarshal(x.SinceTime) - } else if !yym2827 && z.IsJSONHandle() { + } else if !yym2920 && z.IsJSONHandle() { z.DecJSONUnmarshal(x.SinceTime) } else { z.DecFallback(x.SinceTime, false) @@ -35586,8 +36912,8 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.TailLines == nil { x.TailLines = new(int64) } - yym2830 := z.DecBinary() - _ = yym2830 + yym2923 := z.DecBinary() + _ = yym2923 if false { } else { *((*int64)(x.TailLines)) = int64(r.DecodeInt(64)) @@ -35602,17 +36928,17 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.LimitBytes == nil { x.LimitBytes = new(int64) } - yym2832 := z.DecBinary() - _ = yym2832 + yym2925 := z.DecBinary() + _ = yym2925 if false { } else { *((*int64)(x.LimitBytes)) = int64(r.DecodeInt(64)) } } default: - z.DecStructFieldNotFound(-1, yys2818) - } // end switch yys2818 - } // end for yyj2818 + z.DecStructFieldNotFound(-1, yys2911) + } // end switch yys2911 + } // end for yyj2911 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -35620,16 +36946,16 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2833 int - var yyb2833 bool - var yyhl2833 bool = l >= 0 - yyj2833++ - if yyhl2833 { - yyb2833 = yyj2833 > l + var yyj2926 int + var yyb2926 bool + var yyhl2926 bool = l >= 0 + yyj2926++ + if yyhl2926 { + yyb2926 = yyj2926 > l } else { - yyb2833 = r.CheckBreak() + yyb2926 = r.CheckBreak() } - if yyb2833 { + if yyb2926 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35639,13 +36965,13 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2833++ - if yyhl2833 { - yyb2833 = yyj2833 > l + yyj2926++ + if yyhl2926 { + yyb2926 = yyj2926 > l } else { - yyb2833 = r.CheckBreak() + yyb2926 = r.CheckBreak() } - if yyb2833 { + if yyb2926 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35655,13 +36981,13 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2833++ - if yyhl2833 { - yyb2833 = yyj2833 > l + yyj2926++ + if yyhl2926 { + yyb2926 = yyj2926 > l } else { - yyb2833 = r.CheckBreak() + yyb2926 = r.CheckBreak() } - if yyb2833 { + if yyb2926 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35671,13 +36997,13 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Container = string(r.DecodeString()) } - yyj2833++ - if yyhl2833 { - yyb2833 = yyj2833 > l + yyj2926++ + if yyhl2926 { + yyb2926 = yyj2926 > l } else { - yyb2833 = r.CheckBreak() + yyb2926 = r.CheckBreak() } - if yyb2833 { + if yyb2926 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35687,13 +37013,13 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Follow = bool(r.DecodeBool()) } - yyj2833++ - if yyhl2833 { - yyb2833 = yyj2833 > l + yyj2926++ + if yyhl2926 { + yyb2926 = yyj2926 > l } else { - yyb2833 = r.CheckBreak() + yyb2926 = r.CheckBreak() } - if yyb2833 { + if yyb2926 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35703,13 +37029,13 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Previous = bool(r.DecodeBool()) } - yyj2833++ - if yyhl2833 { - yyb2833 = yyj2833 > l + yyj2926++ + if yyhl2926 { + yyb2926 = yyj2926 > l } else { - yyb2833 = r.CheckBreak() + yyb2926 = r.CheckBreak() } - if yyb2833 { + if yyb2926 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35722,20 +37048,20 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.SinceSeconds == nil { x.SinceSeconds = new(int64) } - yym2840 := z.DecBinary() - _ = yym2840 + yym2933 := z.DecBinary() + _ = yym2933 if false { } else { *((*int64)(x.SinceSeconds)) = int64(r.DecodeInt(64)) } } - yyj2833++ - if yyhl2833 { - yyb2833 = yyj2833 > l + yyj2926++ + if yyhl2926 { + yyb2926 = yyj2926 > l } else { - yyb2833 = r.CheckBreak() + yyb2926 = r.CheckBreak() } - if yyb2833 { + if yyb2926 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35748,25 +37074,25 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.SinceTime == nil { x.SinceTime = new(pkg2_unversioned.Time) } - yym2842 := z.DecBinary() - _ = yym2842 + yym2935 := z.DecBinary() + _ = yym2935 if false { } else if z.HasExtensions() && z.DecExt(x.SinceTime) { - } else if yym2842 { + } else if yym2935 { z.DecBinaryUnmarshal(x.SinceTime) - } else if !yym2842 && z.IsJSONHandle() { + } else if !yym2935 && z.IsJSONHandle() { z.DecJSONUnmarshal(x.SinceTime) } else { z.DecFallback(x.SinceTime, false) } } - yyj2833++ - if yyhl2833 { - yyb2833 = yyj2833 > l + yyj2926++ + if yyhl2926 { + yyb2926 = yyj2926 > l } else { - yyb2833 = r.CheckBreak() + yyb2926 = r.CheckBreak() } - if yyb2833 { + if yyb2926 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35776,13 +37102,13 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Timestamps = bool(r.DecodeBool()) } - yyj2833++ - if yyhl2833 { - yyb2833 = yyj2833 > l + yyj2926++ + if yyhl2926 { + yyb2926 = yyj2926 > l } else { - yyb2833 = r.CheckBreak() + yyb2926 = r.CheckBreak() } - if yyb2833 { + if yyb2926 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35795,20 +37121,20 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.TailLines == nil { x.TailLines = new(int64) } - yym2845 := z.DecBinary() - _ = yym2845 + yym2938 := z.DecBinary() + _ = yym2938 if false { } else { *((*int64)(x.TailLines)) = int64(r.DecodeInt(64)) } } - yyj2833++ - if yyhl2833 { - yyb2833 = yyj2833 > l + yyj2926++ + if yyhl2926 { + yyb2926 = yyj2926 > l } else { - yyb2833 = r.CheckBreak() + yyb2926 = r.CheckBreak() } - if yyb2833 { + if yyb2926 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35821,25 +37147,25 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.LimitBytes == nil { x.LimitBytes = new(int64) } - yym2847 := z.DecBinary() - _ = yym2847 + yym2940 := z.DecBinary() + _ = yym2940 if false { } else { *((*int64)(x.LimitBytes)) = int64(r.DecodeInt(64)) } } for { - yyj2833++ - if yyhl2833 { - yyb2833 = yyj2833 > l + yyj2926++ + if yyhl2926 { + yyb2926 = yyj2926 > l } else { - yyb2833 = r.CheckBreak() + yyb2926 = r.CheckBreak() } - if yyb2833 { + if yyb2926 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2833-1, "") + z.DecStructFieldNotFound(yyj2926-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -35851,41 +37177,41 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2848 := z.EncBinary() - _ = yym2848 + yym2941 := z.EncBinary() + _ = yym2941 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2849 := !z.EncBinary() - yy2arr2849 := z.EncBasicHandle().StructToArray - var yyq2849 [7]bool - _, _, _ = yysep2849, yyq2849, yy2arr2849 - const yyr2849 bool = false - yyq2849[0] = x.Kind != "" - yyq2849[1] = x.APIVersion != "" - yyq2849[2] = x.Stdin != false - yyq2849[3] = x.Stdout != false - yyq2849[4] = x.Stderr != false - yyq2849[5] = x.TTY != false - yyq2849[6] = x.Container != "" - var yynn2849 int - if yyr2849 || yy2arr2849 { + yysep2942 := !z.EncBinary() + yy2arr2942 := z.EncBasicHandle().StructToArray + var yyq2942 [7]bool + _, _, _ = yysep2942, yyq2942, yy2arr2942 + const yyr2942 bool = false + yyq2942[0] = x.Kind != "" + yyq2942[1] = x.APIVersion != "" + yyq2942[2] = x.Stdin != false + yyq2942[3] = x.Stdout != false + yyq2942[4] = x.Stderr != false + yyq2942[5] = x.TTY != false + yyq2942[6] = x.Container != "" + var yynn2942 int + if yyr2942 || yy2arr2942 { r.EncodeArrayStart(7) } else { - yynn2849 = 0 - for _, b := range yyq2849 { + yynn2942 = 0 + for _, b := range yyq2942 { if b { - yynn2849++ + yynn2942++ } } - r.EncodeMapStart(yynn2849) - yynn2849 = 0 + r.EncodeMapStart(yynn2942) + yynn2942 = 0 } - if yyr2849 || yy2arr2849 { + if yyr2942 || yy2arr2942 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2849[0] { - yym2851 := z.EncBinary() - _ = yym2851 + if yyq2942[0] { + yym2944 := z.EncBinary() + _ = yym2944 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -35894,23 +37220,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2849[0] { + if yyq2942[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2852 := z.EncBinary() - _ = yym2852 + yym2945 := z.EncBinary() + _ = yym2945 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2849 || yy2arr2849 { + if yyr2942 || yy2arr2942 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2849[1] { - yym2854 := z.EncBinary() - _ = yym2854 + if yyq2942[1] { + yym2947 := z.EncBinary() + _ = yym2947 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -35919,23 +37245,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2849[1] { + if yyq2942[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2855 := z.EncBinary() - _ = yym2855 + yym2948 := z.EncBinary() + _ = yym2948 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2849 || yy2arr2849 { + if yyr2942 || yy2arr2942 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2849[2] { - yym2857 := z.EncBinary() - _ = yym2857 + if yyq2942[2] { + yym2950 := z.EncBinary() + _ = yym2950 if false { } else { r.EncodeBool(bool(x.Stdin)) @@ -35944,23 +37270,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq2849[2] { + if yyq2942[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("stdin")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2858 := z.EncBinary() - _ = yym2858 + yym2951 := z.EncBinary() + _ = yym2951 if false { } else { r.EncodeBool(bool(x.Stdin)) } } } - if yyr2849 || yy2arr2849 { + if yyr2942 || yy2arr2942 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2849[3] { - yym2860 := z.EncBinary() - _ = yym2860 + if yyq2942[3] { + yym2953 := z.EncBinary() + _ = yym2953 if false { } else { r.EncodeBool(bool(x.Stdout)) @@ -35969,23 +37295,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq2849[3] { + if yyq2942[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("stdout")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2861 := z.EncBinary() - _ = yym2861 + yym2954 := z.EncBinary() + _ = yym2954 if false { } else { r.EncodeBool(bool(x.Stdout)) } } } - if yyr2849 || yy2arr2849 { + if yyr2942 || yy2arr2942 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2849[4] { - yym2863 := z.EncBinary() - _ = yym2863 + if yyq2942[4] { + yym2956 := z.EncBinary() + _ = yym2956 if false { } else { r.EncodeBool(bool(x.Stderr)) @@ -35994,23 +37320,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq2849[4] { + if yyq2942[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("stderr")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2864 := z.EncBinary() - _ = yym2864 + yym2957 := z.EncBinary() + _ = yym2957 if false { } else { r.EncodeBool(bool(x.Stderr)) } } } - if yyr2849 || yy2arr2849 { + if yyr2942 || yy2arr2942 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2849[5] { - yym2866 := z.EncBinary() - _ = yym2866 + if yyq2942[5] { + yym2959 := z.EncBinary() + _ = yym2959 if false { } else { r.EncodeBool(bool(x.TTY)) @@ -36019,23 +37345,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq2849[5] { + if yyq2942[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("tty")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2867 := z.EncBinary() - _ = yym2867 + yym2960 := z.EncBinary() + _ = yym2960 if false { } else { r.EncodeBool(bool(x.TTY)) } } } - if yyr2849 || yy2arr2849 { + if yyr2942 || yy2arr2942 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2849[6] { - yym2869 := z.EncBinary() - _ = yym2869 + if yyq2942[6] { + yym2962 := z.EncBinary() + _ = yym2962 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Container)) @@ -36044,19 +37370,19 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2849[6] { + if yyq2942[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("container")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2870 := z.EncBinary() - _ = yym2870 + yym2963 := z.EncBinary() + _ = yym2963 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Container)) } } } - if yyr2849 || yy2arr2849 { + if yyr2942 || yy2arr2942 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -36069,25 +37395,25 @@ func (x *PodAttachOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2871 := z.DecBinary() - _ = yym2871 + yym2964 := z.DecBinary() + _ = yym2964 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2872 := r.ContainerType() - if yyct2872 == codecSelferValueTypeMap1234 { - yyl2872 := r.ReadMapStart() - if yyl2872 == 0 { + yyct2965 := r.ContainerType() + if yyct2965 == codecSelferValueTypeMap1234 { + yyl2965 := r.ReadMapStart() + if yyl2965 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2872, d) + x.codecDecodeSelfFromMap(yyl2965, d) } - } else if yyct2872 == codecSelferValueTypeArray1234 { - yyl2872 := r.ReadArrayStart() - if yyl2872 == 0 { + } else if yyct2965 == codecSelferValueTypeArray1234 { + yyl2965 := r.ReadArrayStart() + if yyl2965 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2872, d) + x.codecDecodeSelfFromArray(yyl2965, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -36099,12 +37425,12 @@ func (x *PodAttachOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2873Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2873Slc - var yyhl2873 bool = l >= 0 - for yyj2873 := 0; ; yyj2873++ { - if yyhl2873 { - if yyj2873 >= l { + var yys2966Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2966Slc + var yyhl2966 bool = l >= 0 + for yyj2966 := 0; ; yyj2966++ { + if yyhl2966 { + if yyj2966 >= l { break } } else { @@ -36113,10 +37439,10 @@ func (x *PodAttachOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2873Slc = r.DecodeBytes(yys2873Slc, true, true) - yys2873 := string(yys2873Slc) + yys2966Slc = r.DecodeBytes(yys2966Slc, true, true) + yys2966 := string(yys2966Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2873 { + switch yys2966 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -36160,9 +37486,9 @@ func (x *PodAttachOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Container = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys2873) - } // end switch yys2873 - } // end for yyj2873 + z.DecStructFieldNotFound(-1, yys2966) + } // end switch yys2966 + } // end for yyj2966 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -36170,16 +37496,16 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2881 int - var yyb2881 bool - var yyhl2881 bool = l >= 0 - yyj2881++ - if yyhl2881 { - yyb2881 = yyj2881 > l + var yyj2974 int + var yyb2974 bool + var yyhl2974 bool = l >= 0 + yyj2974++ + if yyhl2974 { + yyb2974 = yyj2974 > l } else { - yyb2881 = r.CheckBreak() + yyb2974 = r.CheckBreak() } - if yyb2881 { + if yyb2974 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36189,13 +37515,13 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Kind = string(r.DecodeString()) } - yyj2881++ - if yyhl2881 { - yyb2881 = yyj2881 > l + yyj2974++ + if yyhl2974 { + yyb2974 = yyj2974 > l } else { - yyb2881 = r.CheckBreak() + yyb2974 = r.CheckBreak() } - if yyb2881 { + if yyb2974 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36205,13 +37531,13 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.APIVersion = string(r.DecodeString()) } - yyj2881++ - if yyhl2881 { - yyb2881 = yyj2881 > l + yyj2974++ + if yyhl2974 { + yyb2974 = yyj2974 > l } else { - yyb2881 = r.CheckBreak() + yyb2974 = r.CheckBreak() } - if yyb2881 { + if yyb2974 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36221,13 +37547,13 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Stdin = bool(r.DecodeBool()) } - yyj2881++ - if yyhl2881 { - yyb2881 = yyj2881 > l + yyj2974++ + if yyhl2974 { + yyb2974 = yyj2974 > l } else { - yyb2881 = r.CheckBreak() + yyb2974 = r.CheckBreak() } - if yyb2881 { + if yyb2974 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36237,13 +37563,13 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Stdout = bool(r.DecodeBool()) } - yyj2881++ - if yyhl2881 { - yyb2881 = yyj2881 > l + yyj2974++ + if yyhl2974 { + yyb2974 = yyj2974 > l } else { - yyb2881 = r.CheckBreak() + yyb2974 = r.CheckBreak() } - if yyb2881 { + if yyb2974 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36253,13 +37579,13 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Stderr = bool(r.DecodeBool()) } - yyj2881++ - if yyhl2881 { - yyb2881 = yyj2881 > l + yyj2974++ + if yyhl2974 { + yyb2974 = yyj2974 > l } else { - yyb2881 = r.CheckBreak() + yyb2974 = r.CheckBreak() } - if yyb2881 { + if yyb2974 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36269,13 +37595,13 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.TTY = bool(r.DecodeBool()) } - yyj2881++ - if yyhl2881 { - yyb2881 = yyj2881 > l + yyj2974++ + if yyhl2974 { + yyb2974 = yyj2974 > l } else { - yyb2881 = r.CheckBreak() + yyb2974 = r.CheckBreak() } - if yyb2881 { + if yyb2974 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36286,17 +37612,17 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) x.Container = string(r.DecodeString()) } for { - yyj2881++ - if yyhl2881 { - yyb2881 = yyj2881 > l + yyj2974++ + if yyhl2974 { + yyb2974 = yyj2974 > l } else { - yyb2881 = r.CheckBreak() + yyb2974 = r.CheckBreak() } - if yyb2881 { + if yyb2974 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2881-1, "") + z.DecStructFieldNotFound(yyj2974-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -36308,41 +37634,41 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2889 := z.EncBinary() - _ = yym2889 + yym2982 := z.EncBinary() + _ = yym2982 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2890 := !z.EncBinary() - yy2arr2890 := z.EncBasicHandle().StructToArray - var yyq2890 [8]bool - _, _, _ = yysep2890, yyq2890, yy2arr2890 - const yyr2890 bool = false - yyq2890[0] = x.Kind != "" - yyq2890[1] = x.APIVersion != "" - yyq2890[2] = x.Stdin != false - yyq2890[3] = x.Stdout != false - yyq2890[4] = x.Stderr != false - yyq2890[5] = x.TTY != false - yyq2890[6] = x.Container != "" - var yynn2890 int - if yyr2890 || yy2arr2890 { + yysep2983 := !z.EncBinary() + yy2arr2983 := z.EncBasicHandle().StructToArray + var yyq2983 [8]bool + _, _, _ = yysep2983, yyq2983, yy2arr2983 + const yyr2983 bool = false + yyq2983[0] = x.Kind != "" + yyq2983[1] = x.APIVersion != "" + yyq2983[2] = x.Stdin != false + yyq2983[3] = x.Stdout != false + yyq2983[4] = x.Stderr != false + yyq2983[5] = x.TTY != false + yyq2983[6] = x.Container != "" + var yynn2983 int + if yyr2983 || yy2arr2983 { r.EncodeArrayStart(8) } else { - yynn2890 = 1 - for _, b := range yyq2890 { + yynn2983 = 1 + for _, b := range yyq2983 { if b { - yynn2890++ + yynn2983++ } } - r.EncodeMapStart(yynn2890) - yynn2890 = 0 + r.EncodeMapStart(yynn2983) + yynn2983 = 0 } - if yyr2890 || yy2arr2890 { + if yyr2983 || yy2arr2983 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2890[0] { - yym2892 := z.EncBinary() - _ = yym2892 + if yyq2983[0] { + yym2985 := z.EncBinary() + _ = yym2985 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -36351,23 +37677,23 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2890[0] { + if yyq2983[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2893 := z.EncBinary() - _ = yym2893 + yym2986 := z.EncBinary() + _ = yym2986 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2890 || yy2arr2890 { + if yyr2983 || yy2arr2983 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2890[1] { - yym2895 := z.EncBinary() - _ = yym2895 + if yyq2983[1] { + yym2988 := z.EncBinary() + _ = yym2988 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -36376,23 +37702,23 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2890[1] { + if yyq2983[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2896 := z.EncBinary() - _ = yym2896 + yym2989 := z.EncBinary() + _ = yym2989 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2890 || yy2arr2890 { + if yyr2983 || yy2arr2983 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2890[2] { - yym2898 := z.EncBinary() - _ = yym2898 + if yyq2983[2] { + yym2991 := z.EncBinary() + _ = yym2991 if false { } else { r.EncodeBool(bool(x.Stdin)) @@ -36401,23 +37727,23 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq2890[2] { + if yyq2983[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("stdin")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2899 := z.EncBinary() - _ = yym2899 + yym2992 := z.EncBinary() + _ = yym2992 if false { } else { r.EncodeBool(bool(x.Stdin)) } } } - if yyr2890 || yy2arr2890 { + if yyr2983 || yy2arr2983 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2890[3] { - yym2901 := z.EncBinary() - _ = yym2901 + if yyq2983[3] { + yym2994 := z.EncBinary() + _ = yym2994 if false { } else { r.EncodeBool(bool(x.Stdout)) @@ -36426,23 +37752,23 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq2890[3] { + if yyq2983[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("stdout")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2902 := z.EncBinary() - _ = yym2902 + yym2995 := z.EncBinary() + _ = yym2995 if false { } else { r.EncodeBool(bool(x.Stdout)) } } } - if yyr2890 || yy2arr2890 { + if yyr2983 || yy2arr2983 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2890[4] { - yym2904 := z.EncBinary() - _ = yym2904 + if yyq2983[4] { + yym2997 := z.EncBinary() + _ = yym2997 if false { } else { r.EncodeBool(bool(x.Stderr)) @@ -36451,23 +37777,23 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq2890[4] { + if yyq2983[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("stderr")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2905 := z.EncBinary() - _ = yym2905 + yym2998 := z.EncBinary() + _ = yym2998 if false { } else { r.EncodeBool(bool(x.Stderr)) } } } - if yyr2890 || yy2arr2890 { + if yyr2983 || yy2arr2983 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2890[5] { - yym2907 := z.EncBinary() - _ = yym2907 + if yyq2983[5] { + yym3000 := z.EncBinary() + _ = yym3000 if false { } else { r.EncodeBool(bool(x.TTY)) @@ -36476,23 +37802,23 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq2890[5] { + if yyq2983[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("tty")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2908 := z.EncBinary() - _ = yym2908 + yym3001 := z.EncBinary() + _ = yym3001 if false { } else { r.EncodeBool(bool(x.TTY)) } } } - if yyr2890 || yy2arr2890 { + if yyr2983 || yy2arr2983 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2890[6] { - yym2910 := z.EncBinary() - _ = yym2910 + if yyq2983[6] { + yym3003 := z.EncBinary() + _ = yym3003 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Container)) @@ -36501,25 +37827,25 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2890[6] { + if yyq2983[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("container")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2911 := z.EncBinary() - _ = yym2911 + yym3004 := z.EncBinary() + _ = yym3004 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Container)) } } } - if yyr2890 || yy2arr2890 { + if yyr2983 || yy2arr2983 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Command == nil { r.EncodeNil() } else { - yym2913 := z.EncBinary() - _ = yym2913 + yym3006 := z.EncBinary() + _ = yym3006 if false { } else { z.F.EncSliceStringV(x.Command, false, e) @@ -36532,15 +37858,15 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x.Command == nil { r.EncodeNil() } else { - yym2914 := z.EncBinary() - _ = yym2914 + yym3007 := z.EncBinary() + _ = yym3007 if false { } else { z.F.EncSliceStringV(x.Command, false, e) } } } - if yyr2890 || yy2arr2890 { + if yyr2983 || yy2arr2983 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -36553,25 +37879,25 @@ func (x *PodExecOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2915 := z.DecBinary() - _ = yym2915 + yym3008 := z.DecBinary() + _ = yym3008 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2916 := r.ContainerType() - if yyct2916 == codecSelferValueTypeMap1234 { - yyl2916 := r.ReadMapStart() - if yyl2916 == 0 { + yyct3009 := r.ContainerType() + if yyct3009 == codecSelferValueTypeMap1234 { + yyl3009 := r.ReadMapStart() + if yyl3009 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2916, d) + x.codecDecodeSelfFromMap(yyl3009, d) } - } else if yyct2916 == codecSelferValueTypeArray1234 { - yyl2916 := r.ReadArrayStart() - if yyl2916 == 0 { + } else if yyct3009 == codecSelferValueTypeArray1234 { + yyl3009 := r.ReadArrayStart() + if yyl3009 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2916, d) + x.codecDecodeSelfFromArray(yyl3009, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -36583,12 +37909,12 @@ func (x *PodExecOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2917Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2917Slc - var yyhl2917 bool = l >= 0 - for yyj2917 := 0; ; yyj2917++ { - if yyhl2917 { - if yyj2917 >= l { + var yys3010Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3010Slc + var yyhl3010 bool = l >= 0 + for yyj3010 := 0; ; yyj3010++ { + if yyhl3010 { + if yyj3010 >= l { break } } else { @@ -36597,10 +37923,10 @@ func (x *PodExecOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2917Slc = r.DecodeBytes(yys2917Slc, true, true) - yys2917 := string(yys2917Slc) + yys3010Slc = r.DecodeBytes(yys3010Slc, true, true) + yys3010 := string(yys3010Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2917 { + switch yys3010 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -36647,18 +37973,18 @@ func (x *PodExecOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Command = nil } else { - yyv2925 := &x.Command - yym2926 := z.DecBinary() - _ = yym2926 + yyv3018 := &x.Command + yym3019 := z.DecBinary() + _ = yym3019 if false { } else { - z.F.DecSliceStringX(yyv2925, false, d) + z.F.DecSliceStringX(yyv3018, false, d) } } default: - z.DecStructFieldNotFound(-1, yys2917) - } // end switch yys2917 - } // end for yyj2917 + z.DecStructFieldNotFound(-1, yys3010) + } // end switch yys3010 + } // end for yyj3010 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -36666,16 +37992,16 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2927 int - var yyb2927 bool - var yyhl2927 bool = l >= 0 - yyj2927++ - if yyhl2927 { - yyb2927 = yyj2927 > l + var yyj3020 int + var yyb3020 bool + var yyhl3020 bool = l >= 0 + yyj3020++ + if yyhl3020 { + yyb3020 = yyj3020 > l } else { - yyb2927 = r.CheckBreak() + yyb3020 = r.CheckBreak() } - if yyb2927 { + if yyb3020 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36685,13 +38011,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2927++ - if yyhl2927 { - yyb2927 = yyj2927 > l + yyj3020++ + if yyhl3020 { + yyb3020 = yyj3020 > l } else { - yyb2927 = r.CheckBreak() + yyb3020 = r.CheckBreak() } - if yyb2927 { + if yyb3020 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36701,13 +38027,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2927++ - if yyhl2927 { - yyb2927 = yyj2927 > l + yyj3020++ + if yyhl3020 { + yyb3020 = yyj3020 > l } else { - yyb2927 = r.CheckBreak() + yyb3020 = r.CheckBreak() } - if yyb2927 { + if yyb3020 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36717,13 +38043,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Stdin = bool(r.DecodeBool()) } - yyj2927++ - if yyhl2927 { - yyb2927 = yyj2927 > l + yyj3020++ + if yyhl3020 { + yyb3020 = yyj3020 > l } else { - yyb2927 = r.CheckBreak() + yyb3020 = r.CheckBreak() } - if yyb2927 { + if yyb3020 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36733,13 +38059,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Stdout = bool(r.DecodeBool()) } - yyj2927++ - if yyhl2927 { - yyb2927 = yyj2927 > l + yyj3020++ + if yyhl3020 { + yyb3020 = yyj3020 > l } else { - yyb2927 = r.CheckBreak() + yyb3020 = r.CheckBreak() } - if yyb2927 { + if yyb3020 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36749,13 +38075,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Stderr = bool(r.DecodeBool()) } - yyj2927++ - if yyhl2927 { - yyb2927 = yyj2927 > l + yyj3020++ + if yyhl3020 { + yyb3020 = yyj3020 > l } else { - yyb2927 = r.CheckBreak() + yyb3020 = r.CheckBreak() } - if yyb2927 { + if yyb3020 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36765,13 +38091,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.TTY = bool(r.DecodeBool()) } - yyj2927++ - if yyhl2927 { - yyb2927 = yyj2927 > l + yyj3020++ + if yyhl3020 { + yyb3020 = yyj3020 > l } else { - yyb2927 = r.CheckBreak() + yyb3020 = r.CheckBreak() } - if yyb2927 { + if yyb3020 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36781,13 +38107,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Container = string(r.DecodeString()) } - yyj2927++ - if yyhl2927 { - yyb2927 = yyj2927 > l + yyj3020++ + if yyhl3020 { + yyb3020 = yyj3020 > l } else { - yyb2927 = r.CheckBreak() + yyb3020 = r.CheckBreak() } - if yyb2927 { + if yyb3020 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36795,26 +38121,26 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Command = nil } else { - yyv2935 := &x.Command - yym2936 := z.DecBinary() - _ = yym2936 + yyv3028 := &x.Command + yym3029 := z.DecBinary() + _ = yym3029 if false { } else { - z.F.DecSliceStringX(yyv2935, false, d) + z.F.DecSliceStringX(yyv3028, false, d) } } for { - yyj2927++ - if yyhl2927 { - yyb2927 = yyj2927 > l + yyj3020++ + if yyhl3020 { + yyb3020 = yyj3020 > l } else { - yyb2927 = r.CheckBreak() + yyb3020 = r.CheckBreak() } - if yyb2927 { + if yyb3020 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2927-1, "") + z.DecStructFieldNotFound(yyj3020-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -36826,37 +38152,37 @@ func (x *PodProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2937 := z.EncBinary() - _ = yym2937 + yym3030 := z.EncBinary() + _ = yym3030 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2938 := !z.EncBinary() - yy2arr2938 := z.EncBasicHandle().StructToArray - var yyq2938 [3]bool - _, _, _ = yysep2938, yyq2938, yy2arr2938 - const yyr2938 bool = false - yyq2938[0] = x.Kind != "" - yyq2938[1] = x.APIVersion != "" - yyq2938[2] = x.Path != "" - var yynn2938 int - if yyr2938 || yy2arr2938 { + yysep3031 := !z.EncBinary() + yy2arr3031 := z.EncBasicHandle().StructToArray + var yyq3031 [3]bool + _, _, _ = yysep3031, yyq3031, yy2arr3031 + const yyr3031 bool = false + yyq3031[0] = x.Kind != "" + yyq3031[1] = x.APIVersion != "" + yyq3031[2] = x.Path != "" + var yynn3031 int + if yyr3031 || yy2arr3031 { r.EncodeArrayStart(3) } else { - yynn2938 = 0 - for _, b := range yyq2938 { + yynn3031 = 0 + for _, b := range yyq3031 { if b { - yynn2938++ + yynn3031++ } } - r.EncodeMapStart(yynn2938) - yynn2938 = 0 + r.EncodeMapStart(yynn3031) + yynn3031 = 0 } - if yyr2938 || yy2arr2938 { + if yyr3031 || yy2arr3031 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2938[0] { - yym2940 := z.EncBinary() - _ = yym2940 + if yyq3031[0] { + yym3033 := z.EncBinary() + _ = yym3033 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -36865,23 +38191,23 @@ func (x *PodProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2938[0] { + if yyq3031[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2941 := z.EncBinary() - _ = yym2941 + yym3034 := z.EncBinary() + _ = yym3034 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2938 || yy2arr2938 { + if yyr3031 || yy2arr3031 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2938[1] { - yym2943 := z.EncBinary() - _ = yym2943 + if yyq3031[1] { + yym3036 := z.EncBinary() + _ = yym3036 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -36890,23 +38216,23 @@ func (x *PodProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2938[1] { + if yyq3031[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2944 := z.EncBinary() - _ = yym2944 + yym3037 := z.EncBinary() + _ = yym3037 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2938 || yy2arr2938 { + if yyr3031 || yy2arr3031 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2938[2] { - yym2946 := z.EncBinary() - _ = yym2946 + if yyq3031[2] { + yym3039 := z.EncBinary() + _ = yym3039 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) @@ -36915,19 +38241,19 @@ func (x *PodProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2938[2] { + if yyq3031[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("path")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2947 := z.EncBinary() - _ = yym2947 + yym3040 := z.EncBinary() + _ = yym3040 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) } } } - if yyr2938 || yy2arr2938 { + if yyr3031 || yy2arr3031 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -36940,25 +38266,25 @@ func (x *PodProxyOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2948 := z.DecBinary() - _ = yym2948 + yym3041 := z.DecBinary() + _ = yym3041 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2949 := r.ContainerType() - if yyct2949 == codecSelferValueTypeMap1234 { - yyl2949 := r.ReadMapStart() - if yyl2949 == 0 { + yyct3042 := r.ContainerType() + if yyct3042 == codecSelferValueTypeMap1234 { + yyl3042 := r.ReadMapStart() + if yyl3042 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2949, d) + x.codecDecodeSelfFromMap(yyl3042, d) } - } else if yyct2949 == codecSelferValueTypeArray1234 { - yyl2949 := r.ReadArrayStart() - if yyl2949 == 0 { + } else if yyct3042 == codecSelferValueTypeArray1234 { + yyl3042 := r.ReadArrayStart() + if yyl3042 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2949, d) + x.codecDecodeSelfFromArray(yyl3042, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -36970,12 +38296,12 @@ func (x *PodProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2950Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2950Slc - var yyhl2950 bool = l >= 0 - for yyj2950 := 0; ; yyj2950++ { - if yyhl2950 { - if yyj2950 >= l { + var yys3043Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3043Slc + var yyhl3043 bool = l >= 0 + for yyj3043 := 0; ; yyj3043++ { + if yyhl3043 { + if yyj3043 >= l { break } } else { @@ -36984,10 +38310,10 @@ func (x *PodProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2950Slc = r.DecodeBytes(yys2950Slc, true, true) - yys2950 := string(yys2950Slc) + yys3043Slc = r.DecodeBytes(yys3043Slc, true, true) + yys3043 := string(yys3043Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2950 { + switch yys3043 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -37007,9 +38333,9 @@ func (x *PodProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Path = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys2950) - } // end switch yys2950 - } // end for yyj2950 + z.DecStructFieldNotFound(-1, yys3043) + } // end switch yys3043 + } // end for yyj3043 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -37017,16 +38343,16 @@ func (x *PodProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2954 int - var yyb2954 bool - var yyhl2954 bool = l >= 0 - yyj2954++ - if yyhl2954 { - yyb2954 = yyj2954 > l + var yyj3047 int + var yyb3047 bool + var yyhl3047 bool = l >= 0 + yyj3047++ + if yyhl3047 { + yyb3047 = yyj3047 > l } else { - yyb2954 = r.CheckBreak() + yyb3047 = r.CheckBreak() } - if yyb2954 { + if yyb3047 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37036,13 +38362,13 @@ func (x *PodProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Kind = string(r.DecodeString()) } - yyj2954++ - if yyhl2954 { - yyb2954 = yyj2954 > l + yyj3047++ + if yyhl3047 { + yyb3047 = yyj3047 > l } else { - yyb2954 = r.CheckBreak() + yyb3047 = r.CheckBreak() } - if yyb2954 { + if yyb3047 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37052,13 +38378,13 @@ func (x *PodProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.APIVersion = string(r.DecodeString()) } - yyj2954++ - if yyhl2954 { - yyb2954 = yyj2954 > l + yyj3047++ + if yyhl3047 { + yyb3047 = yyj3047 > l } else { - yyb2954 = r.CheckBreak() + yyb3047 = r.CheckBreak() } - if yyb2954 { + if yyb3047 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37069,17 +38395,17 @@ func (x *PodProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) x.Path = string(r.DecodeString()) } for { - yyj2954++ - if yyhl2954 { - yyb2954 = yyj2954 > l + yyj3047++ + if yyhl3047 { + yyb3047 = yyj3047 > l } else { - yyb2954 = r.CheckBreak() + yyb3047 = r.CheckBreak() } - if yyb2954 { + if yyb3047 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2954-1, "") + z.DecStructFieldNotFound(yyj3047-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -37091,41 +38417,41 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2958 := z.EncBinary() - _ = yym2958 + yym3051 := z.EncBinary() + _ = yym3051 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2959 := !z.EncBinary() - yy2arr2959 := z.EncBasicHandle().StructToArray - var yyq2959 [7]bool - _, _, _ = yysep2959, yyq2959, yy2arr2959 - const yyr2959 bool = false - yyq2959[0] = x.Kind != "" - yyq2959[1] = x.Namespace != "" - yyq2959[2] = x.Name != "" - yyq2959[3] = x.UID != "" - yyq2959[4] = x.APIVersion != "" - yyq2959[5] = x.ResourceVersion != "" - yyq2959[6] = x.FieldPath != "" - var yynn2959 int - if yyr2959 || yy2arr2959 { + yysep3052 := !z.EncBinary() + yy2arr3052 := z.EncBasicHandle().StructToArray + var yyq3052 [7]bool + _, _, _ = yysep3052, yyq3052, yy2arr3052 + const yyr3052 bool = false + yyq3052[0] = x.Kind != "" + yyq3052[1] = x.Namespace != "" + yyq3052[2] = x.Name != "" + yyq3052[3] = x.UID != "" + yyq3052[4] = x.APIVersion != "" + yyq3052[5] = x.ResourceVersion != "" + yyq3052[6] = x.FieldPath != "" + var yynn3052 int + if yyr3052 || yy2arr3052 { r.EncodeArrayStart(7) } else { - yynn2959 = 0 - for _, b := range yyq2959 { + yynn3052 = 0 + for _, b := range yyq3052 { if b { - yynn2959++ + yynn3052++ } } - r.EncodeMapStart(yynn2959) - yynn2959 = 0 + r.EncodeMapStart(yynn3052) + yynn3052 = 0 } - if yyr2959 || yy2arr2959 { + if yyr3052 || yy2arr3052 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2959[0] { - yym2961 := z.EncBinary() - _ = yym2961 + if yyq3052[0] { + yym3054 := z.EncBinary() + _ = yym3054 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -37134,23 +38460,23 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2959[0] { + if yyq3052[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2962 := z.EncBinary() - _ = yym2962 + yym3055 := z.EncBinary() + _ = yym3055 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2959 || yy2arr2959 { + if yyr3052 || yy2arr3052 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2959[1] { - yym2964 := z.EncBinary() - _ = yym2964 + if yyq3052[1] { + yym3057 := z.EncBinary() + _ = yym3057 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) @@ -37159,23 +38485,23 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2959[1] { + if yyq3052[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("namespace")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2965 := z.EncBinary() - _ = yym2965 + yym3058 := z.EncBinary() + _ = yym3058 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) } } } - if yyr2959 || yy2arr2959 { + if yyr3052 || yy2arr3052 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2959[2] { - yym2967 := z.EncBinary() - _ = yym2967 + if yyq3052[2] { + yym3060 := z.EncBinary() + _ = yym3060 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -37184,23 +38510,23 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2959[2] { + if yyq3052[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2968 := z.EncBinary() - _ = yym2968 + yym3061 := z.EncBinary() + _ = yym3061 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } } - if yyr2959 || yy2arr2959 { + if yyr3052 || yy2arr3052 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2959[3] { - yym2970 := z.EncBinary() - _ = yym2970 + if yyq3052[3] { + yym3063 := z.EncBinary() + _ = yym3063 if false { } else if z.HasExtensions() && z.EncExt(x.UID) { } else { @@ -37210,12 +38536,12 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2959[3] { + if yyq3052[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("uid")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2971 := z.EncBinary() - _ = yym2971 + yym3064 := z.EncBinary() + _ = yym3064 if false { } else if z.HasExtensions() && z.EncExt(x.UID) { } else { @@ -37223,11 +38549,11 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2959 || yy2arr2959 { + if yyr3052 || yy2arr3052 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2959[4] { - yym2973 := z.EncBinary() - _ = yym2973 + if yyq3052[4] { + yym3066 := z.EncBinary() + _ = yym3066 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -37236,23 +38562,23 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2959[4] { + if yyq3052[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2974 := z.EncBinary() - _ = yym2974 + yym3067 := z.EncBinary() + _ = yym3067 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2959 || yy2arr2959 { + if yyr3052 || yy2arr3052 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2959[5] { - yym2976 := z.EncBinary() - _ = yym2976 + if yyq3052[5] { + yym3069 := z.EncBinary() + _ = yym3069 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) @@ -37261,23 +38587,23 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2959[5] { + if yyq3052[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("resourceVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2977 := z.EncBinary() - _ = yym2977 + yym3070 := z.EncBinary() + _ = yym3070 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) } } } - if yyr2959 || yy2arr2959 { + if yyr3052 || yy2arr3052 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2959[6] { - yym2979 := z.EncBinary() - _ = yym2979 + if yyq3052[6] { + yym3072 := z.EncBinary() + _ = yym3072 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FieldPath)) @@ -37286,19 +38612,19 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2959[6] { + if yyq3052[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("fieldPath")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2980 := z.EncBinary() - _ = yym2980 + yym3073 := z.EncBinary() + _ = yym3073 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FieldPath)) } } } - if yyr2959 || yy2arr2959 { + if yyr3052 || yy2arr3052 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -37311,25 +38637,25 @@ func (x *ObjectReference) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2981 := z.DecBinary() - _ = yym2981 + yym3074 := z.DecBinary() + _ = yym3074 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2982 := r.ContainerType() - if yyct2982 == codecSelferValueTypeMap1234 { - yyl2982 := r.ReadMapStart() - if yyl2982 == 0 { + yyct3075 := r.ContainerType() + if yyct3075 == codecSelferValueTypeMap1234 { + yyl3075 := r.ReadMapStart() + if yyl3075 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2982, d) + x.codecDecodeSelfFromMap(yyl3075, d) } - } else if yyct2982 == codecSelferValueTypeArray1234 { - yyl2982 := r.ReadArrayStart() - if yyl2982 == 0 { + } else if yyct3075 == codecSelferValueTypeArray1234 { + yyl3075 := r.ReadArrayStart() + if yyl3075 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2982, d) + x.codecDecodeSelfFromArray(yyl3075, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -37341,12 +38667,12 @@ func (x *ObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2983Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2983Slc - var yyhl2983 bool = l >= 0 - for yyj2983 := 0; ; yyj2983++ { - if yyhl2983 { - if yyj2983 >= l { + var yys3076Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3076Slc + var yyhl3076 bool = l >= 0 + for yyj3076 := 0; ; yyj3076++ { + if yyhl3076 { + if yyj3076 >= l { break } } else { @@ -37355,10 +38681,10 @@ func (x *ObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2983Slc = r.DecodeBytes(yys2983Slc, true, true) - yys2983 := string(yys2983Slc) + yys3076Slc = r.DecodeBytes(yys3076Slc, true, true) + yys3076 := string(yys3076Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2983 { + switch yys3076 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -37402,9 +38728,9 @@ func (x *ObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.FieldPath = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys2983) - } // end switch yys2983 - } // end for yyj2983 + z.DecStructFieldNotFound(-1, yys3076) + } // end switch yys3076 + } // end for yyj3076 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -37412,16 +38738,16 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2991 int - var yyb2991 bool - var yyhl2991 bool = l >= 0 - yyj2991++ - if yyhl2991 { - yyb2991 = yyj2991 > l + var yyj3084 int + var yyb3084 bool + var yyhl3084 bool = l >= 0 + yyj3084++ + if yyhl3084 { + yyb3084 = yyj3084 > l } else { - yyb2991 = r.CheckBreak() + yyb3084 = r.CheckBreak() } - if yyb2991 { + if yyb3084 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37431,13 +38757,13 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Kind = string(r.DecodeString()) } - yyj2991++ - if yyhl2991 { - yyb2991 = yyj2991 > l + yyj3084++ + if yyhl3084 { + yyb3084 = yyj3084 > l } else { - yyb2991 = r.CheckBreak() + yyb3084 = r.CheckBreak() } - if yyb2991 { + if yyb3084 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37447,13 +38773,13 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Namespace = string(r.DecodeString()) } - yyj2991++ - if yyhl2991 { - yyb2991 = yyj2991 > l + yyj3084++ + if yyhl3084 { + yyb3084 = yyj3084 > l } else { - yyb2991 = r.CheckBreak() + yyb3084 = r.CheckBreak() } - if yyb2991 { + if yyb3084 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37463,13 +38789,13 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Name = string(r.DecodeString()) } - yyj2991++ - if yyhl2991 { - yyb2991 = yyj2991 > l + yyj3084++ + if yyhl3084 { + yyb3084 = yyj3084 > l } else { - yyb2991 = r.CheckBreak() + yyb3084 = r.CheckBreak() } - if yyb2991 { + if yyb3084 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37479,13 +38805,13 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.UID = pkg1_types.UID(r.DecodeString()) } - yyj2991++ - if yyhl2991 { - yyb2991 = yyj2991 > l + yyj3084++ + if yyhl3084 { + yyb3084 = yyj3084 > l } else { - yyb2991 = r.CheckBreak() + yyb3084 = r.CheckBreak() } - if yyb2991 { + if yyb3084 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37495,13 +38821,13 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.APIVersion = string(r.DecodeString()) } - yyj2991++ - if yyhl2991 { - yyb2991 = yyj2991 > l + yyj3084++ + if yyhl3084 { + yyb3084 = yyj3084 > l } else { - yyb2991 = r.CheckBreak() + yyb3084 = r.CheckBreak() } - if yyb2991 { + if yyb3084 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37511,13 +38837,13 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.ResourceVersion = string(r.DecodeString()) } - yyj2991++ - if yyhl2991 { - yyb2991 = yyj2991 > l + yyj3084++ + if yyhl3084 { + yyb3084 = yyj3084 > l } else { - yyb2991 = r.CheckBreak() + yyb3084 = r.CheckBreak() } - if yyb2991 { + if yyb3084 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37528,17 +38854,17 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) x.FieldPath = string(r.DecodeString()) } for { - yyj2991++ - if yyhl2991 { - yyb2991 = yyj2991 > l + yyj3084++ + if yyhl3084 { + yyb3084 = yyj3084 > l } else { - yyb2991 = r.CheckBreak() + yyb3084 = r.CheckBreak() } - if yyb2991 { + if yyb3084 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2991-1, "") + z.DecStructFieldNotFound(yyj3084-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -37550,35 +38876,35 @@ func (x *LocalObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2999 := z.EncBinary() - _ = yym2999 + yym3092 := z.EncBinary() + _ = yym3092 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3000 := !z.EncBinary() - yy2arr3000 := z.EncBasicHandle().StructToArray - var yyq3000 [1]bool - _, _, _ = yysep3000, yyq3000, yy2arr3000 - const yyr3000 bool = false - yyq3000[0] = x.Name != "" - var yynn3000 int - if yyr3000 || yy2arr3000 { + yysep3093 := !z.EncBinary() + yy2arr3093 := z.EncBasicHandle().StructToArray + var yyq3093 [1]bool + _, _, _ = yysep3093, yyq3093, yy2arr3093 + const yyr3093 bool = false + yyq3093[0] = x.Name != "" + var yynn3093 int + if yyr3093 || yy2arr3093 { r.EncodeArrayStart(1) } else { - yynn3000 = 0 - for _, b := range yyq3000 { + yynn3093 = 0 + for _, b := range yyq3093 { if b { - yynn3000++ + yynn3093++ } } - r.EncodeMapStart(yynn3000) - yynn3000 = 0 + r.EncodeMapStart(yynn3093) + yynn3093 = 0 } - if yyr3000 || yy2arr3000 { + if yyr3093 || yy2arr3093 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3000[0] { - yym3002 := z.EncBinary() - _ = yym3002 + if yyq3093[0] { + yym3095 := z.EncBinary() + _ = yym3095 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -37587,19 +38913,19 @@ func (x *LocalObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3000[0] { + if yyq3093[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3003 := z.EncBinary() - _ = yym3003 + yym3096 := z.EncBinary() + _ = yym3096 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } } - if yyr3000 || yy2arr3000 { + if yyr3093 || yy2arr3093 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -37612,25 +38938,25 @@ func (x *LocalObjectReference) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3004 := z.DecBinary() - _ = yym3004 + yym3097 := z.DecBinary() + _ = yym3097 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3005 := r.ContainerType() - if yyct3005 == codecSelferValueTypeMap1234 { - yyl3005 := r.ReadMapStart() - if yyl3005 == 0 { + yyct3098 := r.ContainerType() + if yyct3098 == codecSelferValueTypeMap1234 { + yyl3098 := r.ReadMapStart() + if yyl3098 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3005, d) + x.codecDecodeSelfFromMap(yyl3098, d) } - } else if yyct3005 == codecSelferValueTypeArray1234 { - yyl3005 := r.ReadArrayStart() - if yyl3005 == 0 { + } else if yyct3098 == codecSelferValueTypeArray1234 { + yyl3098 := r.ReadArrayStart() + if yyl3098 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3005, d) + x.codecDecodeSelfFromArray(yyl3098, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -37642,12 +38968,12 @@ func (x *LocalObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3006Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3006Slc - var yyhl3006 bool = l >= 0 - for yyj3006 := 0; ; yyj3006++ { - if yyhl3006 { - if yyj3006 >= l { + var yys3099Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3099Slc + var yyhl3099 bool = l >= 0 + for yyj3099 := 0; ; yyj3099++ { + if yyhl3099 { + if yyj3099 >= l { break } } else { @@ -37656,10 +38982,10 @@ func (x *LocalObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decode } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3006Slc = r.DecodeBytes(yys3006Slc, true, true) - yys3006 := string(yys3006Slc) + yys3099Slc = r.DecodeBytes(yys3099Slc, true, true) + yys3099 := string(yys3099Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3006 { + switch yys3099 { case "name": if r.TryDecodeAsNil() { x.Name = "" @@ -37667,9 +38993,9 @@ func (x *LocalObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decode x.Name = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3006) - } // end switch yys3006 - } // end for yyj3006 + z.DecStructFieldNotFound(-1, yys3099) + } // end switch yys3099 + } // end for yyj3099 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -37677,16 +39003,16 @@ func (x *LocalObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3008 int - var yyb3008 bool - var yyhl3008 bool = l >= 0 - yyj3008++ - if yyhl3008 { - yyb3008 = yyj3008 > l + var yyj3101 int + var yyb3101 bool + var yyhl3101 bool = l >= 0 + yyj3101++ + if yyhl3101 { + yyb3101 = yyj3101 > l } else { - yyb3008 = r.CheckBreak() + yyb3101 = r.CheckBreak() } - if yyb3008 { + if yyb3101 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37697,17 +39023,17 @@ func (x *LocalObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Deco x.Name = string(r.DecodeString()) } for { - yyj3008++ - if yyhl3008 { - yyb3008 = yyj3008 > l + yyj3101++ + if yyhl3101 { + yyb3101 = yyj3101 > l } else { - yyb3008 = r.CheckBreak() + yyb3101 = r.CheckBreak() } - if yyb3008 { + if yyb3101 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3008-1, "") + z.DecStructFieldNotFound(yyj3101-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -37719,37 +39045,37 @@ func (x *SerializedReference) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3010 := z.EncBinary() - _ = yym3010 + yym3103 := z.EncBinary() + _ = yym3103 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3011 := !z.EncBinary() - yy2arr3011 := z.EncBasicHandle().StructToArray - var yyq3011 [3]bool - _, _, _ = yysep3011, yyq3011, yy2arr3011 - const yyr3011 bool = false - yyq3011[0] = x.Kind != "" - yyq3011[1] = x.APIVersion != "" - yyq3011[2] = true - var yynn3011 int - if yyr3011 || yy2arr3011 { + yysep3104 := !z.EncBinary() + yy2arr3104 := z.EncBasicHandle().StructToArray + var yyq3104 [3]bool + _, _, _ = yysep3104, yyq3104, yy2arr3104 + const yyr3104 bool = false + yyq3104[0] = x.Kind != "" + yyq3104[1] = x.APIVersion != "" + yyq3104[2] = true + var yynn3104 int + if yyr3104 || yy2arr3104 { r.EncodeArrayStart(3) } else { - yynn3011 = 0 - for _, b := range yyq3011 { + yynn3104 = 0 + for _, b := range yyq3104 { if b { - yynn3011++ + yynn3104++ } } - r.EncodeMapStart(yynn3011) - yynn3011 = 0 + r.EncodeMapStart(yynn3104) + yynn3104 = 0 } - if yyr3011 || yy2arr3011 { + if yyr3104 || yy2arr3104 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3011[0] { - yym3013 := z.EncBinary() - _ = yym3013 + if yyq3104[0] { + yym3106 := z.EncBinary() + _ = yym3106 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -37758,23 +39084,23 @@ func (x *SerializedReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3011[0] { + if yyq3104[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3014 := z.EncBinary() - _ = yym3014 + yym3107 := z.EncBinary() + _ = yym3107 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3011 || yy2arr3011 { + if yyr3104 || yy2arr3104 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3011[1] { - yym3016 := z.EncBinary() - _ = yym3016 + if yyq3104[1] { + yym3109 := z.EncBinary() + _ = yym3109 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -37783,36 +39109,36 @@ func (x *SerializedReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3011[1] { + if yyq3104[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3017 := z.EncBinary() - _ = yym3017 + yym3110 := z.EncBinary() + _ = yym3110 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3011 || yy2arr3011 { + if yyr3104 || yy2arr3104 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3011[2] { - yy3019 := &x.Reference - yy3019.CodecEncodeSelf(e) + if yyq3104[2] { + yy3112 := &x.Reference + yy3112.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3011[2] { + if yyq3104[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("reference")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3020 := &x.Reference - yy3020.CodecEncodeSelf(e) + yy3113 := &x.Reference + yy3113.CodecEncodeSelf(e) } } - if yyr3011 || yy2arr3011 { + if yyr3104 || yy2arr3104 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -37825,25 +39151,25 @@ func (x *SerializedReference) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3021 := z.DecBinary() - _ = yym3021 + yym3114 := z.DecBinary() + _ = yym3114 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3022 := r.ContainerType() - if yyct3022 == codecSelferValueTypeMap1234 { - yyl3022 := r.ReadMapStart() - if yyl3022 == 0 { + yyct3115 := r.ContainerType() + if yyct3115 == codecSelferValueTypeMap1234 { + yyl3115 := r.ReadMapStart() + if yyl3115 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3022, d) + x.codecDecodeSelfFromMap(yyl3115, d) } - } else if yyct3022 == codecSelferValueTypeArray1234 { - yyl3022 := r.ReadArrayStart() - if yyl3022 == 0 { + } else if yyct3115 == codecSelferValueTypeArray1234 { + yyl3115 := r.ReadArrayStart() + if yyl3115 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3022, d) + x.codecDecodeSelfFromArray(yyl3115, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -37855,12 +39181,12 @@ func (x *SerializedReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3023Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3023Slc - var yyhl3023 bool = l >= 0 - for yyj3023 := 0; ; yyj3023++ { - if yyhl3023 { - if yyj3023 >= l { + var yys3116Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3116Slc + var yyhl3116 bool = l >= 0 + for yyj3116 := 0; ; yyj3116++ { + if yyhl3116 { + if yyj3116 >= l { break } } else { @@ -37869,10 +39195,10 @@ func (x *SerializedReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3023Slc = r.DecodeBytes(yys3023Slc, true, true) - yys3023 := string(yys3023Slc) + yys3116Slc = r.DecodeBytes(yys3116Slc, true, true) + yys3116 := string(yys3116Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3023 { + switch yys3116 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -37889,13 +39215,13 @@ func (x *SerializedReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Reference = ObjectReference{} } else { - yyv3026 := &x.Reference - yyv3026.CodecDecodeSelf(d) + yyv3119 := &x.Reference + yyv3119.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3023) - } // end switch yys3023 - } // end for yyj3023 + z.DecStructFieldNotFound(-1, yys3116) + } // end switch yys3116 + } // end for yyj3116 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -37903,16 +39229,16 @@ func (x *SerializedReference) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3027 int - var yyb3027 bool - var yyhl3027 bool = l >= 0 - yyj3027++ - if yyhl3027 { - yyb3027 = yyj3027 > l + var yyj3120 int + var yyb3120 bool + var yyhl3120 bool = l >= 0 + yyj3120++ + if yyhl3120 { + yyb3120 = yyj3120 > l } else { - yyb3027 = r.CheckBreak() + yyb3120 = r.CheckBreak() } - if yyb3027 { + if yyb3120 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37922,13 +39248,13 @@ func (x *SerializedReference) codecDecodeSelfFromArray(l int, d *codec1978.Decod } else { x.Kind = string(r.DecodeString()) } - yyj3027++ - if yyhl3027 { - yyb3027 = yyj3027 > l + yyj3120++ + if yyhl3120 { + yyb3120 = yyj3120 > l } else { - yyb3027 = r.CheckBreak() + yyb3120 = r.CheckBreak() } - if yyb3027 { + if yyb3120 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37938,13 +39264,13 @@ func (x *SerializedReference) codecDecodeSelfFromArray(l int, d *codec1978.Decod } else { x.APIVersion = string(r.DecodeString()) } - yyj3027++ - if yyhl3027 { - yyb3027 = yyj3027 > l + yyj3120++ + if yyhl3120 { + yyb3120 = yyj3120 > l } else { - yyb3027 = r.CheckBreak() + yyb3120 = r.CheckBreak() } - if yyb3027 { + if yyb3120 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37952,21 +39278,21 @@ func (x *SerializedReference) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Reference = ObjectReference{} } else { - yyv3030 := &x.Reference - yyv3030.CodecDecodeSelf(d) + yyv3123 := &x.Reference + yyv3123.CodecDecodeSelf(d) } for { - yyj3027++ - if yyhl3027 { - yyb3027 = yyj3027 > l + yyj3120++ + if yyhl3120 { + yyb3120 = yyj3120 > l } else { - yyb3027 = r.CheckBreak() + yyb3120 = r.CheckBreak() } - if yyb3027 { + if yyb3120 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3027-1, "") + z.DecStructFieldNotFound(yyj3120-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -37978,36 +39304,36 @@ func (x *EventSource) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3031 := z.EncBinary() - _ = yym3031 + yym3124 := z.EncBinary() + _ = yym3124 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3032 := !z.EncBinary() - yy2arr3032 := z.EncBasicHandle().StructToArray - var yyq3032 [2]bool - _, _, _ = yysep3032, yyq3032, yy2arr3032 - const yyr3032 bool = false - yyq3032[0] = x.Component != "" - yyq3032[1] = x.Host != "" - var yynn3032 int - if yyr3032 || yy2arr3032 { + yysep3125 := !z.EncBinary() + yy2arr3125 := z.EncBasicHandle().StructToArray + var yyq3125 [2]bool + _, _, _ = yysep3125, yyq3125, yy2arr3125 + const yyr3125 bool = false + yyq3125[0] = x.Component != "" + yyq3125[1] = x.Host != "" + var yynn3125 int + if yyr3125 || yy2arr3125 { r.EncodeArrayStart(2) } else { - yynn3032 = 0 - for _, b := range yyq3032 { + yynn3125 = 0 + for _, b := range yyq3125 { if b { - yynn3032++ + yynn3125++ } } - r.EncodeMapStart(yynn3032) - yynn3032 = 0 + r.EncodeMapStart(yynn3125) + yynn3125 = 0 } - if yyr3032 || yy2arr3032 { + if yyr3125 || yy2arr3125 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3032[0] { - yym3034 := z.EncBinary() - _ = yym3034 + if yyq3125[0] { + yym3127 := z.EncBinary() + _ = yym3127 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Component)) @@ -38016,23 +39342,23 @@ func (x *EventSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3032[0] { + if yyq3125[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("component")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3035 := z.EncBinary() - _ = yym3035 + yym3128 := z.EncBinary() + _ = yym3128 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Component)) } } } - if yyr3032 || yy2arr3032 { + if yyr3125 || yy2arr3125 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3032[1] { - yym3037 := z.EncBinary() - _ = yym3037 + if yyq3125[1] { + yym3130 := z.EncBinary() + _ = yym3130 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Host)) @@ -38041,19 +39367,19 @@ func (x *EventSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3032[1] { + if yyq3125[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("host")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3038 := z.EncBinary() - _ = yym3038 + yym3131 := z.EncBinary() + _ = yym3131 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Host)) } } } - if yyr3032 || yy2arr3032 { + if yyr3125 || yy2arr3125 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -38063,965 +39389,6 @@ func (x *EventSource) CodecEncodeSelf(e *codec1978.Encoder) { } func (x *EventSource) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym3039 := z.DecBinary() - _ = yym3039 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct3040 := r.ContainerType() - if yyct3040 == codecSelferValueTypeMap1234 { - yyl3040 := r.ReadMapStart() - if yyl3040 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl3040, d) - } - } else if yyct3040 == codecSelferValueTypeArray1234 { - yyl3040 := r.ReadArrayStart() - if yyl3040 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl3040, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *EventSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys3041Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3041Slc - var yyhl3041 bool = l >= 0 - for yyj3041 := 0; ; yyj3041++ { - if yyhl3041 { - if yyj3041 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3041Slc = r.DecodeBytes(yys3041Slc, true, true) - yys3041 := string(yys3041Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3041 { - case "component": - if r.TryDecodeAsNil() { - x.Component = "" - } else { - x.Component = string(r.DecodeString()) - } - case "host": - if r.TryDecodeAsNil() { - x.Host = "" - } else { - x.Host = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3041) - } // end switch yys3041 - } // end for yyj3041 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *EventSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj3044 int - var yyb3044 bool - var yyhl3044 bool = l >= 0 - yyj3044++ - if yyhl3044 { - yyb3044 = yyj3044 > l - } else { - yyb3044 = r.CheckBreak() - } - if yyb3044 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Component = "" - } else { - x.Component = string(r.DecodeString()) - } - yyj3044++ - if yyhl3044 { - yyb3044 = yyj3044 > l - } else { - yyb3044 = r.CheckBreak() - } - if yyb3044 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Host = "" - } else { - x.Host = string(r.DecodeString()) - } - for { - yyj3044++ - if yyhl3044 { - yyb3044 = yyj3044 > l - } else { - yyb3044 = r.CheckBreak() - } - if yyb3044 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3044-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym3047 := z.EncBinary() - _ = yym3047 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep3048 := !z.EncBinary() - yy2arr3048 := z.EncBasicHandle().StructToArray - var yyq3048 [11]bool - _, _, _ = yysep3048, yyq3048, yy2arr3048 - const yyr3048 bool = false - yyq3048[0] = x.Kind != "" - yyq3048[1] = x.APIVersion != "" - yyq3048[4] = x.Reason != "" - yyq3048[5] = x.Message != "" - yyq3048[6] = true - yyq3048[7] = true - yyq3048[8] = true - yyq3048[9] = x.Count != 0 - yyq3048[10] = x.Type != "" - var yynn3048 int - if yyr3048 || yy2arr3048 { - r.EncodeArrayStart(11) - } else { - yynn3048 = 2 - for _, b := range yyq3048 { - if b { - yynn3048++ - } - } - r.EncodeMapStart(yynn3048) - yynn3048 = 0 - } - if yyr3048 || yy2arr3048 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3048[0] { - yym3050 := z.EncBinary() - _ = yym3050 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3048[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3051 := z.EncBinary() - _ = yym3051 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr3048 || yy2arr3048 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3048[1] { - yym3053 := z.EncBinary() - _ = yym3053 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3048[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3054 := z.EncBinary() - _ = yym3054 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr3048 || yy2arr3048 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3056 := &x.ObjectMeta - yy3056.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3057 := &x.ObjectMeta - yy3057.CodecEncodeSelf(e) - } - if yyr3048 || yy2arr3048 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3059 := &x.InvolvedObject - yy3059.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("involvedObject")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3060 := &x.InvolvedObject - yy3060.CodecEncodeSelf(e) - } - if yyr3048 || yy2arr3048 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3048[4] { - yym3062 := z.EncBinary() - _ = yym3062 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3048[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("reason")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3063 := z.EncBinary() - _ = yym3063 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) - } - } - } - if yyr3048 || yy2arr3048 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3048[5] { - yym3065 := z.EncBinary() - _ = yym3065 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Message)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3048[5] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("message")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3066 := z.EncBinary() - _ = yym3066 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Message)) - } - } - } - if yyr3048 || yy2arr3048 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3048[6] { - yy3068 := &x.Source - yy3068.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq3048[6] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("source")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3069 := &x.Source - yy3069.CodecEncodeSelf(e) - } - } - if yyr3048 || yy2arr3048 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3048[7] { - yy3071 := &x.FirstTimestamp - yym3072 := z.EncBinary() - _ = yym3072 - if false { - } else if z.HasExtensions() && z.EncExt(yy3071) { - } else if yym3072 { - z.EncBinaryMarshal(yy3071) - } else if !yym3072 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3071) - } else { - z.EncFallback(yy3071) - } - } else { - r.EncodeNil() - } - } else { - if yyq3048[7] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("firstTimestamp")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3073 := &x.FirstTimestamp - yym3074 := z.EncBinary() - _ = yym3074 - if false { - } else if z.HasExtensions() && z.EncExt(yy3073) { - } else if yym3074 { - z.EncBinaryMarshal(yy3073) - } else if !yym3074 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3073) - } else { - z.EncFallback(yy3073) - } - } - } - if yyr3048 || yy2arr3048 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3048[8] { - yy3076 := &x.LastTimestamp - yym3077 := z.EncBinary() - _ = yym3077 - if false { - } else if z.HasExtensions() && z.EncExt(yy3076) { - } else if yym3077 { - z.EncBinaryMarshal(yy3076) - } else if !yym3077 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3076) - } else { - z.EncFallback(yy3076) - } - } else { - r.EncodeNil() - } - } else { - if yyq3048[8] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("lastTimestamp")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3078 := &x.LastTimestamp - yym3079 := z.EncBinary() - _ = yym3079 - if false { - } else if z.HasExtensions() && z.EncExt(yy3078) { - } else if yym3079 { - z.EncBinaryMarshal(yy3078) - } else if !yym3079 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3078) - } else { - z.EncFallback(yy3078) - } - } - } - if yyr3048 || yy2arr3048 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3048[9] { - yym3081 := z.EncBinary() - _ = yym3081 - if false { - } else { - r.EncodeInt(int64(x.Count)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq3048[9] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("count")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3082 := z.EncBinary() - _ = yym3082 - if false { - } else { - r.EncodeInt(int64(x.Count)) - } - } - } - if yyr3048 || yy2arr3048 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3048[10] { - yym3084 := z.EncBinary() - _ = yym3084 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Type)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3048[10] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("type")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3085 := z.EncBinary() - _ = yym3085 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Type)) - } - } - } - if yyr3048 || yy2arr3048 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *Event) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym3086 := z.DecBinary() - _ = yym3086 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct3087 := r.ContainerType() - if yyct3087 == codecSelferValueTypeMap1234 { - yyl3087 := r.ReadMapStart() - if yyl3087 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl3087, d) - } - } else if yyct3087 == codecSelferValueTypeArray1234 { - yyl3087 := r.ReadArrayStart() - if yyl3087 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl3087, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *Event) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys3088Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3088Slc - var yyhl3088 bool = l >= 0 - for yyj3088 := 0; ; yyj3088++ { - if yyhl3088 { - if yyj3088 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3088Slc = r.DecodeBytes(yys3088Slc, true, true) - yys3088 := string(yys3088Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3088 { - 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()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} - } else { - yyv3091 := &x.ObjectMeta - yyv3091.CodecDecodeSelf(d) - } - case "involvedObject": - if r.TryDecodeAsNil() { - x.InvolvedObject = ObjectReference{} - } else { - yyv3092 := &x.InvolvedObject - yyv3092.CodecDecodeSelf(d) - } - case "reason": - if r.TryDecodeAsNil() { - x.Reason = "" - } else { - x.Reason = string(r.DecodeString()) - } - case "message": - if r.TryDecodeAsNil() { - x.Message = "" - } else { - x.Message = string(r.DecodeString()) - } - case "source": - if r.TryDecodeAsNil() { - x.Source = EventSource{} - } else { - yyv3095 := &x.Source - yyv3095.CodecDecodeSelf(d) - } - case "firstTimestamp": - if r.TryDecodeAsNil() { - x.FirstTimestamp = pkg2_unversioned.Time{} - } else { - yyv3096 := &x.FirstTimestamp - yym3097 := z.DecBinary() - _ = yym3097 - if false { - } else if z.HasExtensions() && z.DecExt(yyv3096) { - } else if yym3097 { - z.DecBinaryUnmarshal(yyv3096) - } else if !yym3097 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3096) - } else { - z.DecFallback(yyv3096, false) - } - } - case "lastTimestamp": - if r.TryDecodeAsNil() { - x.LastTimestamp = pkg2_unversioned.Time{} - } else { - yyv3098 := &x.LastTimestamp - yym3099 := z.DecBinary() - _ = yym3099 - if false { - } else if z.HasExtensions() && z.DecExt(yyv3098) { - } else if yym3099 { - z.DecBinaryUnmarshal(yyv3098) - } else if !yym3099 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3098) - } else { - z.DecFallback(yyv3098, false) - } - } - case "count": - if r.TryDecodeAsNil() { - x.Count = 0 - } else { - x.Count = int32(r.DecodeInt(32)) - } - case "type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3088) - } // end switch yys3088 - } // end for yyj3088 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj3102 int - var yyb3102 bool - var yyhl3102 bool = l >= 0 - yyj3102++ - if yyhl3102 { - yyb3102 = yyj3102 > l - } else { - yyb3102 = r.CheckBreak() - } - if yyb3102 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj3102++ - if yyhl3102 { - yyb3102 = yyj3102 > l - } else { - yyb3102 = r.CheckBreak() - } - if yyb3102 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj3102++ - if yyhl3102 { - yyb3102 = yyj3102 > l - } else { - yyb3102 = r.CheckBreak() - } - if yyb3102 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} - } else { - yyv3105 := &x.ObjectMeta - yyv3105.CodecDecodeSelf(d) - } - yyj3102++ - if yyhl3102 { - yyb3102 = yyj3102 > l - } else { - yyb3102 = r.CheckBreak() - } - if yyb3102 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.InvolvedObject = ObjectReference{} - } else { - yyv3106 := &x.InvolvedObject - yyv3106.CodecDecodeSelf(d) - } - yyj3102++ - if yyhl3102 { - yyb3102 = yyj3102 > l - } else { - yyb3102 = r.CheckBreak() - } - if yyb3102 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Reason = "" - } else { - x.Reason = string(r.DecodeString()) - } - yyj3102++ - if yyhl3102 { - yyb3102 = yyj3102 > l - } else { - yyb3102 = r.CheckBreak() - } - if yyb3102 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Message = "" - } else { - x.Message = string(r.DecodeString()) - } - yyj3102++ - if yyhl3102 { - yyb3102 = yyj3102 > l - } else { - yyb3102 = r.CheckBreak() - } - if yyb3102 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Source = EventSource{} - } else { - yyv3109 := &x.Source - yyv3109.CodecDecodeSelf(d) - } - yyj3102++ - if yyhl3102 { - yyb3102 = yyj3102 > l - } else { - yyb3102 = r.CheckBreak() - } - if yyb3102 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.FirstTimestamp = pkg2_unversioned.Time{} - } else { - yyv3110 := &x.FirstTimestamp - yym3111 := z.DecBinary() - _ = yym3111 - if false { - } else if z.HasExtensions() && z.DecExt(yyv3110) { - } else if yym3111 { - z.DecBinaryUnmarshal(yyv3110) - } else if !yym3111 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3110) - } else { - z.DecFallback(yyv3110, false) - } - } - yyj3102++ - if yyhl3102 { - yyb3102 = yyj3102 > l - } else { - yyb3102 = r.CheckBreak() - } - if yyb3102 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.LastTimestamp = pkg2_unversioned.Time{} - } else { - yyv3112 := &x.LastTimestamp - yym3113 := z.DecBinary() - _ = yym3113 - if false { - } else if z.HasExtensions() && z.DecExt(yyv3112) { - } else if yym3113 { - z.DecBinaryUnmarshal(yyv3112) - } else if !yym3113 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3112) - } else { - z.DecFallback(yyv3112, false) - } - } - yyj3102++ - if yyhl3102 { - yyb3102 = yyj3102 > l - } else { - yyb3102 = r.CheckBreak() - } - if yyb3102 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Count = 0 - } else { - x.Count = int32(r.DecodeInt(32)) - } - yyj3102++ - if yyhl3102 { - yyb3102 = yyj3102 > l - } else { - yyb3102 = r.CheckBreak() - } - if yyb3102 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = string(r.DecodeString()) - } - for { - yyj3102++ - if yyhl3102 { - yyb3102 = yyj3102 > l - } else { - yyb3102 = r.CheckBreak() - } - if yyb3102 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3102-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *EventList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym3116 := z.EncBinary() - _ = yym3116 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep3117 := !z.EncBinary() - yy2arr3117 := z.EncBasicHandle().StructToArray - var yyq3117 [4]bool - _, _, _ = yysep3117, yyq3117, yy2arr3117 - const yyr3117 bool = false - yyq3117[0] = x.Kind != "" - yyq3117[1] = x.APIVersion != "" - yyq3117[2] = true - var yynn3117 int - if yyr3117 || yy2arr3117 { - r.EncodeArrayStart(4) - } else { - yynn3117 = 1 - for _, b := range yyq3117 { - if b { - yynn3117++ - } - } - r.EncodeMapStart(yynn3117) - yynn3117 = 0 - } - if yyr3117 || yy2arr3117 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3117[0] { - yym3119 := z.EncBinary() - _ = yym3119 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3117[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3120 := z.EncBinary() - _ = yym3120 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr3117 || yy2arr3117 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3117[1] { - yym3122 := z.EncBinary() - _ = yym3122 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3117[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3123 := z.EncBinary() - _ = yym3123 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr3117 || yy2arr3117 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3117[2] { - yy3125 := &x.ListMeta - yym3126 := z.EncBinary() - _ = yym3126 - if false { - } else if z.HasExtensions() && z.EncExt(yy3125) { - } else { - z.EncFallback(yy3125) - } - } else { - r.EncodeNil() - } - } else { - if yyq3117[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3127 := &x.ListMeta - yym3128 := z.EncBinary() - _ = yym3128 - if false { - } else if z.HasExtensions() && z.EncExt(yy3127) { - } else { - z.EncFallback(yy3127) - } - } - } - if yyr3117 || yy2arr3117 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym3130 := z.EncBinary() - _ = yym3130 - if false { - } else { - h.encSliceEvent(([]Event)(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 { - yym3131 := z.EncBinary() - _ = yym3131 - if false { - } else { - h.encSliceEvent(([]Event)(x.Items), e) - } - } - } - if yyr3117 || yy2arr3117 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *EventList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r @@ -39051,7 +39418,7 @@ func (x *EventList) CodecDecodeSelf(d *codec1978.Decoder) { } } -func (x *EventList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { +func (x *EventSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r @@ -39073,6 +39440,965 @@ func (x *EventList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { yys3134 := string(yys3134Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) switch yys3134 { + case "component": + if r.TryDecodeAsNil() { + x.Component = "" + } else { + x.Component = string(r.DecodeString()) + } + case "host": + if r.TryDecodeAsNil() { + x.Host = "" + } else { + x.Host = string(r.DecodeString()) + } + default: + z.DecStructFieldNotFound(-1, yys3134) + } // end switch yys3134 + } // end for yyj3134 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *EventSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj3137 int + var yyb3137 bool + var yyhl3137 bool = l >= 0 + yyj3137++ + if yyhl3137 { + yyb3137 = yyj3137 > l + } else { + yyb3137 = r.CheckBreak() + } + if yyb3137 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Component = "" + } else { + x.Component = string(r.DecodeString()) + } + yyj3137++ + if yyhl3137 { + yyb3137 = yyj3137 > l + } else { + yyb3137 = r.CheckBreak() + } + if yyb3137 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Host = "" + } else { + x.Host = string(r.DecodeString()) + } + for { + yyj3137++ + if yyhl3137 { + yyb3137 = yyj3137 > l + } else { + yyb3137 = r.CheckBreak() + } + if yyb3137 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj3137-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym3140 := z.EncBinary() + _ = yym3140 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep3141 := !z.EncBinary() + yy2arr3141 := z.EncBasicHandle().StructToArray + var yyq3141 [11]bool + _, _, _ = yysep3141, yyq3141, yy2arr3141 + const yyr3141 bool = false + yyq3141[0] = x.Kind != "" + yyq3141[1] = x.APIVersion != "" + yyq3141[4] = x.Reason != "" + yyq3141[5] = x.Message != "" + yyq3141[6] = true + yyq3141[7] = true + yyq3141[8] = true + yyq3141[9] = x.Count != 0 + yyq3141[10] = x.Type != "" + var yynn3141 int + if yyr3141 || yy2arr3141 { + r.EncodeArrayStart(11) + } else { + yynn3141 = 2 + for _, b := range yyq3141 { + if b { + yynn3141++ + } + } + r.EncodeMapStart(yynn3141) + yynn3141 = 0 + } + if yyr3141 || yy2arr3141 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3141[0] { + yym3143 := z.EncBinary() + _ = yym3143 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3141[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3144 := z.EncBinary() + _ = yym3144 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr3141 || yy2arr3141 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3141[1] { + yym3146 := z.EncBinary() + _ = yym3146 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3141[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3147 := z.EncBinary() + _ = yym3147 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr3141 || yy2arr3141 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3149 := &x.ObjectMeta + yy3149.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy3150 := &x.ObjectMeta + yy3150.CodecEncodeSelf(e) + } + if yyr3141 || yy2arr3141 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3152 := &x.InvolvedObject + yy3152.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("involvedObject")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy3153 := &x.InvolvedObject + yy3153.CodecEncodeSelf(e) + } + if yyr3141 || yy2arr3141 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3141[4] { + yym3155 := z.EncBinary() + _ = yym3155 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3141[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("reason")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3156 := z.EncBinary() + _ = yym3156 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) + } + } + } + if yyr3141 || yy2arr3141 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3141[5] { + yym3158 := z.EncBinary() + _ = yym3158 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Message)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3141[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("message")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3159 := z.EncBinary() + _ = yym3159 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Message)) + } + } + } + if yyr3141 || yy2arr3141 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3141[6] { + yy3161 := &x.Source + yy3161.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq3141[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("source")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy3162 := &x.Source + yy3162.CodecEncodeSelf(e) + } + } + if yyr3141 || yy2arr3141 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3141[7] { + yy3164 := &x.FirstTimestamp + yym3165 := z.EncBinary() + _ = yym3165 + if false { + } else if z.HasExtensions() && z.EncExt(yy3164) { + } else if yym3165 { + z.EncBinaryMarshal(yy3164) + } else if !yym3165 && z.IsJSONHandle() { + z.EncJSONMarshal(yy3164) + } else { + z.EncFallback(yy3164) + } + } else { + r.EncodeNil() + } + } else { + if yyq3141[7] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("firstTimestamp")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy3166 := &x.FirstTimestamp + yym3167 := z.EncBinary() + _ = yym3167 + if false { + } else if z.HasExtensions() && z.EncExt(yy3166) { + } else if yym3167 { + z.EncBinaryMarshal(yy3166) + } else if !yym3167 && z.IsJSONHandle() { + z.EncJSONMarshal(yy3166) + } else { + z.EncFallback(yy3166) + } + } + } + if yyr3141 || yy2arr3141 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3141[8] { + yy3169 := &x.LastTimestamp + yym3170 := z.EncBinary() + _ = yym3170 + if false { + } else if z.HasExtensions() && z.EncExt(yy3169) { + } else if yym3170 { + z.EncBinaryMarshal(yy3169) + } else if !yym3170 && z.IsJSONHandle() { + z.EncJSONMarshal(yy3169) + } else { + z.EncFallback(yy3169) + } + } else { + r.EncodeNil() + } + } else { + if yyq3141[8] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("lastTimestamp")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy3171 := &x.LastTimestamp + yym3172 := z.EncBinary() + _ = yym3172 + if false { + } else if z.HasExtensions() && z.EncExt(yy3171) { + } else if yym3172 { + z.EncBinaryMarshal(yy3171) + } else if !yym3172 && z.IsJSONHandle() { + z.EncJSONMarshal(yy3171) + } else { + z.EncFallback(yy3171) + } + } + } + if yyr3141 || yy2arr3141 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3141[9] { + yym3174 := z.EncBinary() + _ = yym3174 + if false { + } else { + r.EncodeInt(int64(x.Count)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq3141[9] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("count")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3175 := z.EncBinary() + _ = yym3175 + if false { + } else { + r.EncodeInt(int64(x.Count)) + } + } + } + if yyr3141 || yy2arr3141 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3141[10] { + yym3177 := z.EncBinary() + _ = yym3177 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Type)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3141[10] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("type")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3178 := z.EncBinary() + _ = yym3178 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Type)) + } + } + } + if yyr3141 || yy2arr3141 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *Event) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym3179 := z.DecBinary() + _ = yym3179 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct3180 := r.ContainerType() + if yyct3180 == codecSelferValueTypeMap1234 { + yyl3180 := r.ReadMapStart() + if yyl3180 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl3180, d) + } + } else if yyct3180 == codecSelferValueTypeArray1234 { + yyl3180 := r.ReadArrayStart() + if yyl3180 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl3180, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *Event) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3181Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3181Slc + var yyhl3181 bool = l >= 0 + for yyj3181 := 0; ; yyj3181++ { + if yyhl3181 { + if yyj3181 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3181Slc = r.DecodeBytes(yys3181Slc, true, true) + yys3181 := string(yys3181Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3181 { + 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()) + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = ObjectMeta{} + } else { + yyv3184 := &x.ObjectMeta + yyv3184.CodecDecodeSelf(d) + } + case "involvedObject": + if r.TryDecodeAsNil() { + x.InvolvedObject = ObjectReference{} + } else { + yyv3185 := &x.InvolvedObject + yyv3185.CodecDecodeSelf(d) + } + case "reason": + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + x.Reason = string(r.DecodeString()) + } + case "message": + if r.TryDecodeAsNil() { + x.Message = "" + } else { + x.Message = string(r.DecodeString()) + } + case "source": + if r.TryDecodeAsNil() { + x.Source = EventSource{} + } else { + yyv3188 := &x.Source + yyv3188.CodecDecodeSelf(d) + } + case "firstTimestamp": + if r.TryDecodeAsNil() { + x.FirstTimestamp = pkg2_unversioned.Time{} + } else { + yyv3189 := &x.FirstTimestamp + yym3190 := z.DecBinary() + _ = yym3190 + if false { + } else if z.HasExtensions() && z.DecExt(yyv3189) { + } else if yym3190 { + z.DecBinaryUnmarshal(yyv3189) + } else if !yym3190 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3189) + } else { + z.DecFallback(yyv3189, false) + } + } + case "lastTimestamp": + if r.TryDecodeAsNil() { + x.LastTimestamp = pkg2_unversioned.Time{} + } else { + yyv3191 := &x.LastTimestamp + yym3192 := z.DecBinary() + _ = yym3192 + if false { + } else if z.HasExtensions() && z.DecExt(yyv3191) { + } else if yym3192 { + z.DecBinaryUnmarshal(yyv3191) + } else if !yym3192 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3191) + } else { + z.DecFallback(yyv3191, false) + } + } + case "count": + if r.TryDecodeAsNil() { + x.Count = 0 + } else { + x.Count = int32(r.DecodeInt(32)) + } + case "type": + if r.TryDecodeAsNil() { + x.Type = "" + } else { + x.Type = string(r.DecodeString()) + } + default: + z.DecStructFieldNotFound(-1, yys3181) + } // end switch yys3181 + } // end for yyj3181 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj3195 int + var yyb3195 bool + var yyhl3195 bool = l >= 0 + yyj3195++ + if yyhl3195 { + yyb3195 = yyj3195 > l + } else { + yyb3195 = r.CheckBreak() + } + if yyb3195 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj3195++ + if yyhl3195 { + yyb3195 = yyj3195 > l + } else { + yyb3195 = r.CheckBreak() + } + if yyb3195 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + yyj3195++ + if yyhl3195 { + yyb3195 = yyj3195 > l + } else { + yyb3195 = r.CheckBreak() + } + if yyb3195 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = ObjectMeta{} + } else { + yyv3198 := &x.ObjectMeta + yyv3198.CodecDecodeSelf(d) + } + yyj3195++ + if yyhl3195 { + yyb3195 = yyj3195 > l + } else { + yyb3195 = r.CheckBreak() + } + if yyb3195 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.InvolvedObject = ObjectReference{} + } else { + yyv3199 := &x.InvolvedObject + yyv3199.CodecDecodeSelf(d) + } + yyj3195++ + if yyhl3195 { + yyb3195 = yyj3195 > l + } else { + yyb3195 = r.CheckBreak() + } + if yyb3195 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + x.Reason = string(r.DecodeString()) + } + yyj3195++ + if yyhl3195 { + yyb3195 = yyj3195 > l + } else { + yyb3195 = r.CheckBreak() + } + if yyb3195 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Message = "" + } else { + x.Message = string(r.DecodeString()) + } + yyj3195++ + if yyhl3195 { + yyb3195 = yyj3195 > l + } else { + yyb3195 = r.CheckBreak() + } + if yyb3195 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Source = EventSource{} + } else { + yyv3202 := &x.Source + yyv3202.CodecDecodeSelf(d) + } + yyj3195++ + if yyhl3195 { + yyb3195 = yyj3195 > l + } else { + yyb3195 = r.CheckBreak() + } + if yyb3195 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.FirstTimestamp = pkg2_unversioned.Time{} + } else { + yyv3203 := &x.FirstTimestamp + yym3204 := z.DecBinary() + _ = yym3204 + if false { + } else if z.HasExtensions() && z.DecExt(yyv3203) { + } else if yym3204 { + z.DecBinaryUnmarshal(yyv3203) + } else if !yym3204 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3203) + } else { + z.DecFallback(yyv3203, false) + } + } + yyj3195++ + if yyhl3195 { + yyb3195 = yyj3195 > l + } else { + yyb3195 = r.CheckBreak() + } + if yyb3195 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.LastTimestamp = pkg2_unversioned.Time{} + } else { + yyv3205 := &x.LastTimestamp + yym3206 := z.DecBinary() + _ = yym3206 + if false { + } else if z.HasExtensions() && z.DecExt(yyv3205) { + } else if yym3206 { + z.DecBinaryUnmarshal(yyv3205) + } else if !yym3206 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3205) + } else { + z.DecFallback(yyv3205, false) + } + } + yyj3195++ + if yyhl3195 { + yyb3195 = yyj3195 > l + } else { + yyb3195 = r.CheckBreak() + } + if yyb3195 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Count = 0 + } else { + x.Count = int32(r.DecodeInt(32)) + } + yyj3195++ + if yyhl3195 { + yyb3195 = yyj3195 > l + } else { + yyb3195 = r.CheckBreak() + } + if yyb3195 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Type = "" + } else { + x.Type = string(r.DecodeString()) + } + for { + yyj3195++ + if yyhl3195 { + yyb3195 = yyj3195 > l + } else { + yyb3195 = r.CheckBreak() + } + if yyb3195 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj3195-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *EventList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym3209 := z.EncBinary() + _ = yym3209 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep3210 := !z.EncBinary() + yy2arr3210 := z.EncBasicHandle().StructToArray + var yyq3210 [4]bool + _, _, _ = yysep3210, yyq3210, yy2arr3210 + const yyr3210 bool = false + yyq3210[0] = x.Kind != "" + yyq3210[1] = x.APIVersion != "" + yyq3210[2] = true + var yynn3210 int + if yyr3210 || yy2arr3210 { + r.EncodeArrayStart(4) + } else { + yynn3210 = 1 + for _, b := range yyq3210 { + if b { + yynn3210++ + } + } + r.EncodeMapStart(yynn3210) + yynn3210 = 0 + } + if yyr3210 || yy2arr3210 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3210[0] { + yym3212 := z.EncBinary() + _ = yym3212 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3210[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3213 := z.EncBinary() + _ = yym3213 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr3210 || yy2arr3210 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3210[1] { + yym3215 := z.EncBinary() + _ = yym3215 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3210[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3216 := z.EncBinary() + _ = yym3216 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr3210 || yy2arr3210 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3210[2] { + yy3218 := &x.ListMeta + yym3219 := z.EncBinary() + _ = yym3219 + if false { + } else if z.HasExtensions() && z.EncExt(yy3218) { + } else { + z.EncFallback(yy3218) + } + } else { + r.EncodeNil() + } + } else { + if yyq3210[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy3220 := &x.ListMeta + yym3221 := z.EncBinary() + _ = yym3221 + if false { + } else if z.HasExtensions() && z.EncExt(yy3220) { + } else { + z.EncFallback(yy3220) + } + } + } + if yyr3210 || yy2arr3210 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym3223 := z.EncBinary() + _ = yym3223 + if false { + } else { + h.encSliceEvent(([]Event)(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 { + yym3224 := z.EncBinary() + _ = yym3224 + if false { + } else { + h.encSliceEvent(([]Event)(x.Items), e) + } + } + } + if yyr3210 || yy2arr3210 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *EventList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym3225 := z.DecBinary() + _ = yym3225 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct3226 := r.ContainerType() + if yyct3226 == codecSelferValueTypeMap1234 { + yyl3226 := r.ReadMapStart() + if yyl3226 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl3226, d) + } + } else if yyct3226 == codecSelferValueTypeArray1234 { + yyl3226 := r.ReadArrayStart() + if yyl3226 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl3226, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *EventList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3227Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3227Slc + var yyhl3227 bool = l >= 0 + for yyj3227 := 0; ; yyj3227++ { + if yyhl3227 { + if yyj3227 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3227Slc = r.DecodeBytes(yys3227Slc, true, true) + yys3227 := string(yys3227Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3227 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -39089,31 +40415,31 @@ func (x *EventList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3137 := &x.ListMeta - yym3138 := z.DecBinary() - _ = yym3138 + yyv3230 := &x.ListMeta + yym3231 := z.DecBinary() + _ = yym3231 if false { - } else if z.HasExtensions() && z.DecExt(yyv3137) { + } else if z.HasExtensions() && z.DecExt(yyv3230) { } else { - z.DecFallback(yyv3137, false) + z.DecFallback(yyv3230, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3139 := &x.Items - yym3140 := z.DecBinary() - _ = yym3140 + yyv3232 := &x.Items + yym3233 := z.DecBinary() + _ = yym3233 if false { } else { - h.decSliceEvent((*[]Event)(yyv3139), d) + h.decSliceEvent((*[]Event)(yyv3232), d) } } default: - z.DecStructFieldNotFound(-1, yys3134) - } // end switch yys3134 - } // end for yyj3134 + z.DecStructFieldNotFound(-1, yys3227) + } // end switch yys3227 + } // end for yyj3227 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -39121,16 +40447,16 @@ func (x *EventList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3141 int - var yyb3141 bool - var yyhl3141 bool = l >= 0 - yyj3141++ - if yyhl3141 { - yyb3141 = yyj3141 > l + var yyj3234 int + var yyb3234 bool + var yyhl3234 bool = l >= 0 + yyj3234++ + if yyhl3234 { + yyb3234 = yyj3234 > l } else { - yyb3141 = r.CheckBreak() + yyb3234 = r.CheckBreak() } - if yyb3141 { + if yyb3234 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39140,13 +40466,13 @@ func (x *EventList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3141++ - if yyhl3141 { - yyb3141 = yyj3141 > l + yyj3234++ + if yyhl3234 { + yyb3234 = yyj3234 > l } else { - yyb3141 = r.CheckBreak() + yyb3234 = r.CheckBreak() } - if yyb3141 { + if yyb3234 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39156,13 +40482,13 @@ func (x *EventList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3141++ - if yyhl3141 { - yyb3141 = yyj3141 > l + yyj3234++ + if yyhl3234 { + yyb3234 = yyj3234 > l } else { - yyb3141 = r.CheckBreak() + yyb3234 = r.CheckBreak() } - if yyb3141 { + if yyb3234 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39170,22 +40496,22 @@ func (x *EventList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3144 := &x.ListMeta - yym3145 := z.DecBinary() - _ = yym3145 + yyv3237 := &x.ListMeta + yym3238 := z.DecBinary() + _ = yym3238 if false { - } else if z.HasExtensions() && z.DecExt(yyv3144) { + } else if z.HasExtensions() && z.DecExt(yyv3237) { } else { - z.DecFallback(yyv3144, false) + z.DecFallback(yyv3237, false) } } - yyj3141++ - if yyhl3141 { - yyb3141 = yyj3141 > l + yyj3234++ + if yyhl3234 { + yyb3234 = yyj3234 > l } else { - yyb3141 = r.CheckBreak() + yyb3234 = r.CheckBreak() } - if yyb3141 { + if yyb3234 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39193,26 +40519,26 @@ func (x *EventList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3146 := &x.Items - yym3147 := z.DecBinary() - _ = yym3147 + yyv3239 := &x.Items + yym3240 := z.DecBinary() + _ = yym3240 if false { } else { - h.decSliceEvent((*[]Event)(yyv3146), d) + h.decSliceEvent((*[]Event)(yyv3239), d) } } for { - yyj3141++ - if yyhl3141 { - yyb3141 = yyj3141 > l + yyj3234++ + if yyhl3234 { + yyb3234 = yyj3234 > l } else { - yyb3141 = r.CheckBreak() + yyb3234 = r.CheckBreak() } - if yyb3141 { + if yyb3234 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3141-1, "") + z.DecStructFieldNotFound(yyj3234-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -39224,37 +40550,37 @@ func (x *List) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3148 := z.EncBinary() - _ = yym3148 + yym3241 := z.EncBinary() + _ = yym3241 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3149 := !z.EncBinary() - yy2arr3149 := z.EncBasicHandle().StructToArray - var yyq3149 [4]bool - _, _, _ = yysep3149, yyq3149, yy2arr3149 - const yyr3149 bool = false - yyq3149[0] = x.Kind != "" - yyq3149[1] = x.APIVersion != "" - yyq3149[2] = true - var yynn3149 int - if yyr3149 || yy2arr3149 { + yysep3242 := !z.EncBinary() + yy2arr3242 := z.EncBasicHandle().StructToArray + var yyq3242 [4]bool + _, _, _ = yysep3242, yyq3242, yy2arr3242 + const yyr3242 bool = false + yyq3242[0] = x.Kind != "" + yyq3242[1] = x.APIVersion != "" + yyq3242[2] = true + var yynn3242 int + if yyr3242 || yy2arr3242 { r.EncodeArrayStart(4) } else { - yynn3149 = 1 - for _, b := range yyq3149 { + yynn3242 = 1 + for _, b := range yyq3242 { if b { - yynn3149++ + yynn3242++ } } - r.EncodeMapStart(yynn3149) - yynn3149 = 0 + r.EncodeMapStart(yynn3242) + yynn3242 = 0 } - if yyr3149 || yy2arr3149 { + if yyr3242 || yy2arr3242 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3149[0] { - yym3151 := z.EncBinary() - _ = yym3151 + if yyq3242[0] { + yym3244 := z.EncBinary() + _ = yym3244 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -39263,23 +40589,23 @@ func (x *List) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3149[0] { + if yyq3242[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3152 := z.EncBinary() - _ = yym3152 + yym3245 := z.EncBinary() + _ = yym3245 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3149 || yy2arr3149 { + if yyr3242 || yy2arr3242 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3149[1] { - yym3154 := z.EncBinary() - _ = yym3154 + if yyq3242[1] { + yym3247 := z.EncBinary() + _ = yym3247 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -39288,54 +40614,54 @@ func (x *List) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3149[1] { + if yyq3242[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3155 := z.EncBinary() - _ = yym3155 + yym3248 := z.EncBinary() + _ = yym3248 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3149 || yy2arr3149 { + if yyr3242 || yy2arr3242 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3149[2] { - yy3157 := &x.ListMeta - yym3158 := z.EncBinary() - _ = yym3158 + if yyq3242[2] { + yy3250 := &x.ListMeta + yym3251 := z.EncBinary() + _ = yym3251 if false { - } else if z.HasExtensions() && z.EncExt(yy3157) { + } else if z.HasExtensions() && z.EncExt(yy3250) { } else { - z.EncFallback(yy3157) + z.EncFallback(yy3250) } } else { r.EncodeNil() } } else { - if yyq3149[2] { + if yyq3242[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3159 := &x.ListMeta - yym3160 := z.EncBinary() - _ = yym3160 + yy3252 := &x.ListMeta + yym3253 := z.EncBinary() + _ = yym3253 if false { - } else if z.HasExtensions() && z.EncExt(yy3159) { + } else if z.HasExtensions() && z.EncExt(yy3252) { } else { - z.EncFallback(yy3159) + z.EncFallback(yy3252) } } } - if yyr3149 || yy2arr3149 { + if yyr3242 || yy2arr3242 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym3162 := z.EncBinary() - _ = yym3162 + yym3255 := z.EncBinary() + _ = yym3255 if false { } else { h.encSliceruntime_RawExtension(([]pkg6_runtime.RawExtension)(x.Items), e) @@ -39348,15 +40674,15 @@ func (x *List) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym3163 := z.EncBinary() - _ = yym3163 + yym3256 := z.EncBinary() + _ = yym3256 if false { } else { h.encSliceruntime_RawExtension(([]pkg6_runtime.RawExtension)(x.Items), e) } } } - if yyr3149 || yy2arr3149 { + if yyr3242 || yy2arr3242 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -39369,25 +40695,25 @@ func (x *List) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3164 := z.DecBinary() - _ = yym3164 + yym3257 := z.DecBinary() + _ = yym3257 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3165 := r.ContainerType() - if yyct3165 == codecSelferValueTypeMap1234 { - yyl3165 := r.ReadMapStart() - if yyl3165 == 0 { + yyct3258 := r.ContainerType() + if yyct3258 == codecSelferValueTypeMap1234 { + yyl3258 := r.ReadMapStart() + if yyl3258 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3165, d) + x.codecDecodeSelfFromMap(yyl3258, d) } - } else if yyct3165 == codecSelferValueTypeArray1234 { - yyl3165 := r.ReadArrayStart() - if yyl3165 == 0 { + } else if yyct3258 == codecSelferValueTypeArray1234 { + yyl3258 := r.ReadArrayStart() + if yyl3258 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3165, d) + x.codecDecodeSelfFromArray(yyl3258, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -39399,12 +40725,12 @@ func (x *List) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3166Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3166Slc - var yyhl3166 bool = l >= 0 - for yyj3166 := 0; ; yyj3166++ { - if yyhl3166 { - if yyj3166 >= l { + var yys3259Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3259Slc + var yyhl3259 bool = l >= 0 + for yyj3259 := 0; ; yyj3259++ { + if yyhl3259 { + if yyj3259 >= l { break } } else { @@ -39413,10 +40739,10 @@ func (x *List) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3166Slc = r.DecodeBytes(yys3166Slc, true, true) - yys3166 := string(yys3166Slc) + yys3259Slc = r.DecodeBytes(yys3259Slc, true, true) + yys3259 := string(yys3259Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3166 { + switch yys3259 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -39433,31 +40759,31 @@ func (x *List) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3169 := &x.ListMeta - yym3170 := z.DecBinary() - _ = yym3170 + yyv3262 := &x.ListMeta + yym3263 := z.DecBinary() + _ = yym3263 if false { - } else if z.HasExtensions() && z.DecExt(yyv3169) { + } else if z.HasExtensions() && z.DecExt(yyv3262) { } else { - z.DecFallback(yyv3169, false) + z.DecFallback(yyv3262, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3171 := &x.Items - yym3172 := z.DecBinary() - _ = yym3172 + yyv3264 := &x.Items + yym3265 := z.DecBinary() + _ = yym3265 if false { } else { - h.decSliceruntime_RawExtension((*[]pkg6_runtime.RawExtension)(yyv3171), d) + h.decSliceruntime_RawExtension((*[]pkg6_runtime.RawExtension)(yyv3264), d) } } default: - z.DecStructFieldNotFound(-1, yys3166) - } // end switch yys3166 - } // end for yyj3166 + z.DecStructFieldNotFound(-1, yys3259) + } // end switch yys3259 + } // end for yyj3259 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -39465,16 +40791,16 @@ func (x *List) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3173 int - var yyb3173 bool - var yyhl3173 bool = l >= 0 - yyj3173++ - if yyhl3173 { - yyb3173 = yyj3173 > l + var yyj3266 int + var yyb3266 bool + var yyhl3266 bool = l >= 0 + yyj3266++ + if yyhl3266 { + yyb3266 = yyj3266 > l } else { - yyb3173 = r.CheckBreak() + yyb3266 = r.CheckBreak() } - if yyb3173 { + if yyb3266 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39484,13 +40810,13 @@ func (x *List) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3173++ - if yyhl3173 { - yyb3173 = yyj3173 > l + yyj3266++ + if yyhl3266 { + yyb3266 = yyj3266 > l } else { - yyb3173 = r.CheckBreak() + yyb3266 = r.CheckBreak() } - if yyb3173 { + if yyb3266 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39500,13 +40826,13 @@ func (x *List) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3173++ - if yyhl3173 { - yyb3173 = yyj3173 > l + yyj3266++ + if yyhl3266 { + yyb3266 = yyj3266 > l } else { - yyb3173 = r.CheckBreak() + yyb3266 = r.CheckBreak() } - if yyb3173 { + if yyb3266 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39514,22 +40840,22 @@ func (x *List) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3176 := &x.ListMeta - yym3177 := z.DecBinary() - _ = yym3177 + yyv3269 := &x.ListMeta + yym3270 := z.DecBinary() + _ = yym3270 if false { - } else if z.HasExtensions() && z.DecExt(yyv3176) { + } else if z.HasExtensions() && z.DecExt(yyv3269) { } else { - z.DecFallback(yyv3176, false) + z.DecFallback(yyv3269, false) } } - yyj3173++ - if yyhl3173 { - yyb3173 = yyj3173 > l + yyj3266++ + if yyhl3266 { + yyb3266 = yyj3266 > l } else { - yyb3173 = r.CheckBreak() + yyb3266 = r.CheckBreak() } - if yyb3173 { + if yyb3266 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39537,26 +40863,26 @@ func (x *List) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3178 := &x.Items - yym3179 := z.DecBinary() - _ = yym3179 + yyv3271 := &x.Items + yym3272 := z.DecBinary() + _ = yym3272 if false { } else { - h.decSliceruntime_RawExtension((*[]pkg6_runtime.RawExtension)(yyv3178), d) + h.decSliceruntime_RawExtension((*[]pkg6_runtime.RawExtension)(yyv3271), d) } } for { - yyj3173++ - if yyhl3173 { - yyb3173 = yyj3173 > l + yyj3266++ + if yyhl3266 { + yyb3266 = yyj3266 > l } else { - yyb3173 = r.CheckBreak() + yyb3266 = r.CheckBreak() } - if yyb3173 { + if yyb3266 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3173-1, "") + z.DecStructFieldNotFound(yyj3266-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -39565,8 +40891,8 @@ func (x LimitType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym3180 := z.EncBinary() - _ = yym3180 + yym3273 := z.EncBinary() + _ = yym3273 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -39578,8 +40904,8 @@ func (x *LimitType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3181 := z.DecBinary() - _ = yym3181 + yym3274 := z.DecBinary() + _ = yym3274 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -39594,53 +40920,53 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3182 := z.EncBinary() - _ = yym3182 + yym3275 := z.EncBinary() + _ = yym3275 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3183 := !z.EncBinary() - yy2arr3183 := z.EncBasicHandle().StructToArray - var yyq3183 [6]bool - _, _, _ = yysep3183, yyq3183, yy2arr3183 - const yyr3183 bool = false - yyq3183[0] = x.Type != "" - yyq3183[1] = len(x.Max) != 0 - yyq3183[2] = len(x.Min) != 0 - yyq3183[3] = len(x.Default) != 0 - yyq3183[4] = len(x.DefaultRequest) != 0 - yyq3183[5] = len(x.MaxLimitRequestRatio) != 0 - var yynn3183 int - if yyr3183 || yy2arr3183 { + yysep3276 := !z.EncBinary() + yy2arr3276 := z.EncBasicHandle().StructToArray + var yyq3276 [6]bool + _, _, _ = yysep3276, yyq3276, yy2arr3276 + const yyr3276 bool = false + yyq3276[0] = x.Type != "" + yyq3276[1] = len(x.Max) != 0 + yyq3276[2] = len(x.Min) != 0 + yyq3276[3] = len(x.Default) != 0 + yyq3276[4] = len(x.DefaultRequest) != 0 + yyq3276[5] = len(x.MaxLimitRequestRatio) != 0 + var yynn3276 int + if yyr3276 || yy2arr3276 { r.EncodeArrayStart(6) } else { - yynn3183 = 0 - for _, b := range yyq3183 { + yynn3276 = 0 + for _, b := range yyq3276 { if b { - yynn3183++ + yynn3276++ } } - r.EncodeMapStart(yynn3183) - yynn3183 = 0 + r.EncodeMapStart(yynn3276) + yynn3276 = 0 } - if yyr3183 || yy2arr3183 { + if yyr3276 || yy2arr3276 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3183[0] { + if yyq3276[0] { x.Type.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3183[0] { + if yyq3276[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("type")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } } - if yyr3183 || yy2arr3183 { + if yyr3276 || yy2arr3276 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3183[1] { + if yyq3276[1] { if x.Max == nil { r.EncodeNil() } else { @@ -39650,7 +40976,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3183[1] { + if yyq3276[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("max")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -39661,9 +40987,9 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3183 || yy2arr3183 { + if yyr3276 || yy2arr3276 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3183[2] { + if yyq3276[2] { if x.Min == nil { r.EncodeNil() } else { @@ -39673,7 +40999,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3183[2] { + if yyq3276[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("min")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -39684,9 +41010,9 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3183 || yy2arr3183 { + if yyr3276 || yy2arr3276 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3183[3] { + if yyq3276[3] { if x.Default == nil { r.EncodeNil() } else { @@ -39696,7 +41022,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3183[3] { + if yyq3276[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("default")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -39707,9 +41033,9 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3183 || yy2arr3183 { + if yyr3276 || yy2arr3276 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3183[4] { + if yyq3276[4] { if x.DefaultRequest == nil { r.EncodeNil() } else { @@ -39719,7 +41045,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3183[4] { + if yyq3276[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("defaultRequest")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -39730,9 +41056,9 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3183 || yy2arr3183 { + if yyr3276 || yy2arr3276 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3183[5] { + if yyq3276[5] { if x.MaxLimitRequestRatio == nil { r.EncodeNil() } else { @@ -39742,7 +41068,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3183[5] { + if yyq3276[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("maxLimitRequestRatio")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -39753,7 +41079,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3183 || yy2arr3183 { + if yyr3276 || yy2arr3276 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -39766,25 +41092,25 @@ func (x *LimitRangeItem) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3190 := z.DecBinary() - _ = yym3190 + yym3283 := z.DecBinary() + _ = yym3283 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3191 := r.ContainerType() - if yyct3191 == codecSelferValueTypeMap1234 { - yyl3191 := r.ReadMapStart() - if yyl3191 == 0 { + yyct3284 := r.ContainerType() + if yyct3284 == codecSelferValueTypeMap1234 { + yyl3284 := r.ReadMapStart() + if yyl3284 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3191, d) + x.codecDecodeSelfFromMap(yyl3284, d) } - } else if yyct3191 == codecSelferValueTypeArray1234 { - yyl3191 := r.ReadArrayStart() - if yyl3191 == 0 { + } else if yyct3284 == codecSelferValueTypeArray1234 { + yyl3284 := r.ReadArrayStart() + if yyl3284 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3191, d) + x.codecDecodeSelfFromArray(yyl3284, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -39796,12 +41122,12 @@ func (x *LimitRangeItem) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3192Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3192Slc - var yyhl3192 bool = l >= 0 - for yyj3192 := 0; ; yyj3192++ { - if yyhl3192 { - if yyj3192 >= l { + var yys3285Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3285Slc + var yyhl3285 bool = l >= 0 + for yyj3285 := 0; ; yyj3285++ { + if yyhl3285 { + if yyj3285 >= l { break } } else { @@ -39810,10 +41136,10 @@ func (x *LimitRangeItem) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3192Slc = r.DecodeBytes(yys3192Slc, true, true) - yys3192 := string(yys3192Slc) + yys3285Slc = r.DecodeBytes(yys3285Slc, true, true) + yys3285 := string(yys3285Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3192 { + switch yys3285 { case "type": if r.TryDecodeAsNil() { x.Type = "" @@ -39824,41 +41150,41 @@ func (x *LimitRangeItem) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Max = nil } else { - yyv3194 := &x.Max - yyv3194.CodecDecodeSelf(d) + yyv3287 := &x.Max + yyv3287.CodecDecodeSelf(d) } case "min": if r.TryDecodeAsNil() { x.Min = nil } else { - yyv3195 := &x.Min - yyv3195.CodecDecodeSelf(d) + yyv3288 := &x.Min + yyv3288.CodecDecodeSelf(d) } case "default": if r.TryDecodeAsNil() { x.Default = nil } else { - yyv3196 := &x.Default - yyv3196.CodecDecodeSelf(d) + yyv3289 := &x.Default + yyv3289.CodecDecodeSelf(d) } case "defaultRequest": if r.TryDecodeAsNil() { x.DefaultRequest = nil } else { - yyv3197 := &x.DefaultRequest - yyv3197.CodecDecodeSelf(d) + yyv3290 := &x.DefaultRequest + yyv3290.CodecDecodeSelf(d) } case "maxLimitRequestRatio": if r.TryDecodeAsNil() { x.MaxLimitRequestRatio = nil } else { - yyv3198 := &x.MaxLimitRequestRatio - yyv3198.CodecDecodeSelf(d) + yyv3291 := &x.MaxLimitRequestRatio + yyv3291.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3192) - } // end switch yys3192 - } // end for yyj3192 + z.DecStructFieldNotFound(-1, yys3285) + } // end switch yys3285 + } // end for yyj3285 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -39866,16 +41192,16 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3199 int - var yyb3199 bool - var yyhl3199 bool = l >= 0 - yyj3199++ - if yyhl3199 { - yyb3199 = yyj3199 > l + var yyj3292 int + var yyb3292 bool + var yyhl3292 bool = l >= 0 + yyj3292++ + if yyhl3292 { + yyb3292 = yyj3292 > l } else { - yyb3199 = r.CheckBreak() + yyb3292 = r.CheckBreak() } - if yyb3199 { + if yyb3292 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39885,13 +41211,13 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Type = LimitType(r.DecodeString()) } - yyj3199++ - if yyhl3199 { - yyb3199 = yyj3199 > l + yyj3292++ + if yyhl3292 { + yyb3292 = yyj3292 > l } else { - yyb3199 = r.CheckBreak() + yyb3292 = r.CheckBreak() } - if yyb3199 { + if yyb3292 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39899,16 +41225,16 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Max = nil } else { - yyv3201 := &x.Max - yyv3201.CodecDecodeSelf(d) + yyv3294 := &x.Max + yyv3294.CodecDecodeSelf(d) } - yyj3199++ - if yyhl3199 { - yyb3199 = yyj3199 > l + yyj3292++ + if yyhl3292 { + yyb3292 = yyj3292 > l } else { - yyb3199 = r.CheckBreak() + yyb3292 = r.CheckBreak() } - if yyb3199 { + if yyb3292 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39916,16 +41242,16 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Min = nil } else { - yyv3202 := &x.Min - yyv3202.CodecDecodeSelf(d) + yyv3295 := &x.Min + yyv3295.CodecDecodeSelf(d) } - yyj3199++ - if yyhl3199 { - yyb3199 = yyj3199 > l + yyj3292++ + if yyhl3292 { + yyb3292 = yyj3292 > l } else { - yyb3199 = r.CheckBreak() + yyb3292 = r.CheckBreak() } - if yyb3199 { + if yyb3292 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39933,16 +41259,16 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Default = nil } else { - yyv3203 := &x.Default - yyv3203.CodecDecodeSelf(d) + yyv3296 := &x.Default + yyv3296.CodecDecodeSelf(d) } - yyj3199++ - if yyhl3199 { - yyb3199 = yyj3199 > l + yyj3292++ + if yyhl3292 { + yyb3292 = yyj3292 > l } else { - yyb3199 = r.CheckBreak() + yyb3292 = r.CheckBreak() } - if yyb3199 { + if yyb3292 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39950,16 +41276,16 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.DefaultRequest = nil } else { - yyv3204 := &x.DefaultRequest - yyv3204.CodecDecodeSelf(d) + yyv3297 := &x.DefaultRequest + yyv3297.CodecDecodeSelf(d) } - yyj3199++ - if yyhl3199 { - yyb3199 = yyj3199 > l + yyj3292++ + if yyhl3292 { + yyb3292 = yyj3292 > l } else { - yyb3199 = r.CheckBreak() + yyb3292 = r.CheckBreak() } - if yyb3199 { + if yyb3292 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39967,21 +41293,21 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.MaxLimitRequestRatio = nil } else { - yyv3205 := &x.MaxLimitRequestRatio - yyv3205.CodecDecodeSelf(d) + yyv3298 := &x.MaxLimitRequestRatio + yyv3298.CodecDecodeSelf(d) } for { - yyj3199++ - if yyhl3199 { - yyb3199 = yyj3199 > l + yyj3292++ + if yyhl3292 { + yyb3292 = yyj3292 > l } else { - yyb3199 = r.CheckBreak() + yyb3292 = r.CheckBreak() } - if yyb3199 { + if yyb3292 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3199-1, "") + z.DecStructFieldNotFound(yyj3292-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -39993,36 +41319,36 @@ func (x *LimitRangeSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3206 := z.EncBinary() - _ = yym3206 + yym3299 := z.EncBinary() + _ = yym3299 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3207 := !z.EncBinary() - yy2arr3207 := z.EncBasicHandle().StructToArray - var yyq3207 [1]bool - _, _, _ = yysep3207, yyq3207, yy2arr3207 - const yyr3207 bool = false - var yynn3207 int - if yyr3207 || yy2arr3207 { + yysep3300 := !z.EncBinary() + yy2arr3300 := z.EncBasicHandle().StructToArray + var yyq3300 [1]bool + _, _, _ = yysep3300, yyq3300, yy2arr3300 + const yyr3300 bool = false + var yynn3300 int + if yyr3300 || yy2arr3300 { r.EncodeArrayStart(1) } else { - yynn3207 = 1 - for _, b := range yyq3207 { + yynn3300 = 1 + for _, b := range yyq3300 { if b { - yynn3207++ + yynn3300++ } } - r.EncodeMapStart(yynn3207) - yynn3207 = 0 + r.EncodeMapStart(yynn3300) + yynn3300 = 0 } - if yyr3207 || yy2arr3207 { + if yyr3300 || yy2arr3300 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Limits == nil { r.EncodeNil() } else { - yym3209 := z.EncBinary() - _ = yym3209 + yym3302 := z.EncBinary() + _ = yym3302 if false { } else { h.encSliceLimitRangeItem(([]LimitRangeItem)(x.Limits), e) @@ -40035,15 +41361,15 @@ func (x *LimitRangeSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x.Limits == nil { r.EncodeNil() } else { - yym3210 := z.EncBinary() - _ = yym3210 + yym3303 := z.EncBinary() + _ = yym3303 if false { } else { h.encSliceLimitRangeItem(([]LimitRangeItem)(x.Limits), e) } } } - if yyr3207 || yy2arr3207 { + if yyr3300 || yy2arr3300 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -40056,25 +41382,25 @@ func (x *LimitRangeSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3211 := z.DecBinary() - _ = yym3211 + yym3304 := z.DecBinary() + _ = yym3304 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3212 := r.ContainerType() - if yyct3212 == codecSelferValueTypeMap1234 { - yyl3212 := r.ReadMapStart() - if yyl3212 == 0 { + yyct3305 := r.ContainerType() + if yyct3305 == codecSelferValueTypeMap1234 { + yyl3305 := r.ReadMapStart() + if yyl3305 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3212, d) + x.codecDecodeSelfFromMap(yyl3305, d) } - } else if yyct3212 == codecSelferValueTypeArray1234 { - yyl3212 := r.ReadArrayStart() - if yyl3212 == 0 { + } else if yyct3305 == codecSelferValueTypeArray1234 { + yyl3305 := r.ReadArrayStart() + if yyl3305 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3212, d) + x.codecDecodeSelfFromArray(yyl3305, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -40086,12 +41412,12 @@ func (x *LimitRangeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3213Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3213Slc - var yyhl3213 bool = l >= 0 - for yyj3213 := 0; ; yyj3213++ { - if yyhl3213 { - if yyj3213 >= l { + var yys3306Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3306Slc + var yyhl3306 bool = l >= 0 + for yyj3306 := 0; ; yyj3306++ { + if yyhl3306 { + if yyj3306 >= l { break } } else { @@ -40100,26 +41426,26 @@ func (x *LimitRangeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3213Slc = r.DecodeBytes(yys3213Slc, true, true) - yys3213 := string(yys3213Slc) + yys3306Slc = r.DecodeBytes(yys3306Slc, true, true) + yys3306 := string(yys3306Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3213 { + switch yys3306 { case "limits": if r.TryDecodeAsNil() { x.Limits = nil } else { - yyv3214 := &x.Limits - yym3215 := z.DecBinary() - _ = yym3215 + yyv3307 := &x.Limits + yym3308 := z.DecBinary() + _ = yym3308 if false { } else { - h.decSliceLimitRangeItem((*[]LimitRangeItem)(yyv3214), d) + h.decSliceLimitRangeItem((*[]LimitRangeItem)(yyv3307), d) } } default: - z.DecStructFieldNotFound(-1, yys3213) - } // end switch yys3213 - } // end for yyj3213 + z.DecStructFieldNotFound(-1, yys3306) + } // end switch yys3306 + } // end for yyj3306 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -40127,16 +41453,16 @@ func (x *LimitRangeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3216 int - var yyb3216 bool - var yyhl3216 bool = l >= 0 - yyj3216++ - if yyhl3216 { - yyb3216 = yyj3216 > l + var yyj3309 int + var yyb3309 bool + var yyhl3309 bool = l >= 0 + yyj3309++ + if yyhl3309 { + yyb3309 = yyj3309 > l } else { - yyb3216 = r.CheckBreak() + yyb3309 = r.CheckBreak() } - if yyb3216 { + if yyb3309 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40144,26 +41470,26 @@ func (x *LimitRangeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Limits = nil } else { - yyv3217 := &x.Limits - yym3218 := z.DecBinary() - _ = yym3218 + yyv3310 := &x.Limits + yym3311 := z.DecBinary() + _ = yym3311 if false { } else { - h.decSliceLimitRangeItem((*[]LimitRangeItem)(yyv3217), d) + h.decSliceLimitRangeItem((*[]LimitRangeItem)(yyv3310), d) } } for { - yyj3216++ - if yyhl3216 { - yyb3216 = yyj3216 > l + yyj3309++ + if yyhl3309 { + yyb3309 = yyj3309 > l } else { - yyb3216 = r.CheckBreak() + yyb3309 = r.CheckBreak() } - if yyb3216 { + if yyb3309 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3216-1, "") + z.DecStructFieldNotFound(yyj3309-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -40175,38 +41501,38 @@ func (x *LimitRange) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3219 := z.EncBinary() - _ = yym3219 + yym3312 := z.EncBinary() + _ = yym3312 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3220 := !z.EncBinary() - yy2arr3220 := z.EncBasicHandle().StructToArray - var yyq3220 [4]bool - _, _, _ = yysep3220, yyq3220, yy2arr3220 - const yyr3220 bool = false - yyq3220[0] = x.Kind != "" - yyq3220[1] = x.APIVersion != "" - yyq3220[2] = true - yyq3220[3] = true - var yynn3220 int - if yyr3220 || yy2arr3220 { + yysep3313 := !z.EncBinary() + yy2arr3313 := z.EncBasicHandle().StructToArray + var yyq3313 [4]bool + _, _, _ = yysep3313, yyq3313, yy2arr3313 + const yyr3313 bool = false + yyq3313[0] = x.Kind != "" + yyq3313[1] = x.APIVersion != "" + yyq3313[2] = true + yyq3313[3] = true + var yynn3313 int + if yyr3313 || yy2arr3313 { r.EncodeArrayStart(4) } else { - yynn3220 = 0 - for _, b := range yyq3220 { + yynn3313 = 0 + for _, b := range yyq3313 { if b { - yynn3220++ + yynn3313++ } } - r.EncodeMapStart(yynn3220) - yynn3220 = 0 + r.EncodeMapStart(yynn3313) + yynn3313 = 0 } - if yyr3220 || yy2arr3220 { + if yyr3313 || yy2arr3313 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3220[0] { - yym3222 := z.EncBinary() - _ = yym3222 + if yyq3313[0] { + yym3315 := z.EncBinary() + _ = yym3315 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -40215,23 +41541,23 @@ func (x *LimitRange) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3220[0] { + if yyq3313[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3223 := z.EncBinary() - _ = yym3223 + yym3316 := z.EncBinary() + _ = yym3316 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3220 || yy2arr3220 { + if yyr3313 || yy2arr3313 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3220[1] { - yym3225 := z.EncBinary() - _ = yym3225 + if yyq3313[1] { + yym3318 := z.EncBinary() + _ = yym3318 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -40240,53 +41566,53 @@ func (x *LimitRange) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3220[1] { + if yyq3313[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3226 := z.EncBinary() - _ = yym3226 + yym3319 := z.EncBinary() + _ = yym3319 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3220 || yy2arr3220 { + if yyr3313 || yy2arr3313 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3220[2] { - yy3228 := &x.ObjectMeta - yy3228.CodecEncodeSelf(e) + if yyq3313[2] { + yy3321 := &x.ObjectMeta + yy3321.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3220[2] { + if yyq3313[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3229 := &x.ObjectMeta - yy3229.CodecEncodeSelf(e) + yy3322 := &x.ObjectMeta + yy3322.CodecEncodeSelf(e) } } - if yyr3220 || yy2arr3220 { + if yyr3313 || yy2arr3313 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3220[3] { - yy3231 := &x.Spec - yy3231.CodecEncodeSelf(e) + if yyq3313[3] { + yy3324 := &x.Spec + yy3324.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3220[3] { + if yyq3313[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3232 := &x.Spec - yy3232.CodecEncodeSelf(e) + yy3325 := &x.Spec + yy3325.CodecEncodeSelf(e) } } - if yyr3220 || yy2arr3220 { + if yyr3313 || yy2arr3313 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -40299,25 +41625,25 @@ func (x *LimitRange) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3233 := z.DecBinary() - _ = yym3233 + yym3326 := z.DecBinary() + _ = yym3326 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3234 := r.ContainerType() - if yyct3234 == codecSelferValueTypeMap1234 { - yyl3234 := r.ReadMapStart() - if yyl3234 == 0 { + yyct3327 := r.ContainerType() + if yyct3327 == codecSelferValueTypeMap1234 { + yyl3327 := r.ReadMapStart() + if yyl3327 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3234, d) + x.codecDecodeSelfFromMap(yyl3327, d) } - } else if yyct3234 == codecSelferValueTypeArray1234 { - yyl3234 := r.ReadArrayStart() - if yyl3234 == 0 { + } else if yyct3327 == codecSelferValueTypeArray1234 { + yyl3327 := r.ReadArrayStart() + if yyl3327 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3234, d) + x.codecDecodeSelfFromArray(yyl3327, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -40329,12 +41655,12 @@ func (x *LimitRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3235Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3235Slc - var yyhl3235 bool = l >= 0 - for yyj3235 := 0; ; yyj3235++ { - if yyhl3235 { - if yyj3235 >= l { + var yys3328Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3328Slc + var yyhl3328 bool = l >= 0 + for yyj3328 := 0; ; yyj3328++ { + if yyhl3328 { + if yyj3328 >= l { break } } else { @@ -40343,10 +41669,10 @@ func (x *LimitRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3235Slc = r.DecodeBytes(yys3235Slc, true, true) - yys3235 := string(yys3235Slc) + yys3328Slc = r.DecodeBytes(yys3328Slc, true, true) + yys3328 := string(yys3328Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3235 { + switch yys3328 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -40363,20 +41689,20 @@ func (x *LimitRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3238 := &x.ObjectMeta - yyv3238.CodecDecodeSelf(d) + yyv3331 := &x.ObjectMeta + yyv3331.CodecDecodeSelf(d) } case "spec": if r.TryDecodeAsNil() { x.Spec = LimitRangeSpec{} } else { - yyv3239 := &x.Spec - yyv3239.CodecDecodeSelf(d) + yyv3332 := &x.Spec + yyv3332.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3235) - } // end switch yys3235 - } // end for yyj3235 + z.DecStructFieldNotFound(-1, yys3328) + } // end switch yys3328 + } // end for yyj3328 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -40384,16 +41710,16 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3240 int - var yyb3240 bool - var yyhl3240 bool = l >= 0 - yyj3240++ - if yyhl3240 { - yyb3240 = yyj3240 > l + var yyj3333 int + var yyb3333 bool + var yyhl3333 bool = l >= 0 + yyj3333++ + if yyhl3333 { + yyb3333 = yyj3333 > l } else { - yyb3240 = r.CheckBreak() + yyb3333 = r.CheckBreak() } - if yyb3240 { + if yyb3333 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40403,13 +41729,13 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3240++ - if yyhl3240 { - yyb3240 = yyj3240 > l + yyj3333++ + if yyhl3333 { + yyb3333 = yyj3333 > l } else { - yyb3240 = r.CheckBreak() + yyb3333 = r.CheckBreak() } - if yyb3240 { + if yyb3333 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40419,13 +41745,13 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3240++ - if yyhl3240 { - yyb3240 = yyj3240 > l + yyj3333++ + if yyhl3333 { + yyb3333 = yyj3333 > l } else { - yyb3240 = r.CheckBreak() + yyb3333 = r.CheckBreak() } - if yyb3240 { + if yyb3333 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40433,16 +41759,16 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3243 := &x.ObjectMeta - yyv3243.CodecDecodeSelf(d) + yyv3336 := &x.ObjectMeta + yyv3336.CodecDecodeSelf(d) } - yyj3240++ - if yyhl3240 { - yyb3240 = yyj3240 > l + yyj3333++ + if yyhl3333 { + yyb3333 = yyj3333 > l } else { - yyb3240 = r.CheckBreak() + yyb3333 = r.CheckBreak() } - if yyb3240 { + if yyb3333 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40450,21 +41776,21 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = LimitRangeSpec{} } else { - yyv3244 := &x.Spec - yyv3244.CodecDecodeSelf(d) + yyv3337 := &x.Spec + yyv3337.CodecDecodeSelf(d) } for { - yyj3240++ - if yyhl3240 { - yyb3240 = yyj3240 > l + yyj3333++ + if yyhl3333 { + yyb3333 = yyj3333 > l } else { - yyb3240 = r.CheckBreak() + yyb3333 = r.CheckBreak() } - if yyb3240 { + if yyb3333 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3240-1, "") + z.DecStructFieldNotFound(yyj3333-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -40476,37 +41802,37 @@ func (x *LimitRangeList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3245 := z.EncBinary() - _ = yym3245 + yym3338 := z.EncBinary() + _ = yym3338 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3246 := !z.EncBinary() - yy2arr3246 := z.EncBasicHandle().StructToArray - var yyq3246 [4]bool - _, _, _ = yysep3246, yyq3246, yy2arr3246 - const yyr3246 bool = false - yyq3246[0] = x.Kind != "" - yyq3246[1] = x.APIVersion != "" - yyq3246[2] = true - var yynn3246 int - if yyr3246 || yy2arr3246 { + yysep3339 := !z.EncBinary() + yy2arr3339 := z.EncBasicHandle().StructToArray + var yyq3339 [4]bool + _, _, _ = yysep3339, yyq3339, yy2arr3339 + const yyr3339 bool = false + yyq3339[0] = x.Kind != "" + yyq3339[1] = x.APIVersion != "" + yyq3339[2] = true + var yynn3339 int + if yyr3339 || yy2arr3339 { r.EncodeArrayStart(4) } else { - yynn3246 = 1 - for _, b := range yyq3246 { + yynn3339 = 1 + for _, b := range yyq3339 { if b { - yynn3246++ + yynn3339++ } } - r.EncodeMapStart(yynn3246) - yynn3246 = 0 + r.EncodeMapStart(yynn3339) + yynn3339 = 0 } - if yyr3246 || yy2arr3246 { + if yyr3339 || yy2arr3339 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3246[0] { - yym3248 := z.EncBinary() - _ = yym3248 + if yyq3339[0] { + yym3341 := z.EncBinary() + _ = yym3341 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -40515,23 +41841,23 @@ func (x *LimitRangeList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3246[0] { + if yyq3339[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3249 := z.EncBinary() - _ = yym3249 + yym3342 := z.EncBinary() + _ = yym3342 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3246 || yy2arr3246 { + if yyr3339 || yy2arr3339 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3246[1] { - yym3251 := z.EncBinary() - _ = yym3251 + if yyq3339[1] { + yym3344 := z.EncBinary() + _ = yym3344 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -40540,54 +41866,54 @@ func (x *LimitRangeList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3246[1] { + if yyq3339[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3252 := z.EncBinary() - _ = yym3252 + yym3345 := z.EncBinary() + _ = yym3345 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3246 || yy2arr3246 { + if yyr3339 || yy2arr3339 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3246[2] { - yy3254 := &x.ListMeta - yym3255 := z.EncBinary() - _ = yym3255 + if yyq3339[2] { + yy3347 := &x.ListMeta + yym3348 := z.EncBinary() + _ = yym3348 if false { - } else if z.HasExtensions() && z.EncExt(yy3254) { + } else if z.HasExtensions() && z.EncExt(yy3347) { } else { - z.EncFallback(yy3254) + z.EncFallback(yy3347) } } else { r.EncodeNil() } } else { - if yyq3246[2] { + if yyq3339[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3256 := &x.ListMeta - yym3257 := z.EncBinary() - _ = yym3257 + yy3349 := &x.ListMeta + yym3350 := z.EncBinary() + _ = yym3350 if false { - } else if z.HasExtensions() && z.EncExt(yy3256) { + } else if z.HasExtensions() && z.EncExt(yy3349) { } else { - z.EncFallback(yy3256) + z.EncFallback(yy3349) } } } - if yyr3246 || yy2arr3246 { + if yyr3339 || yy2arr3339 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym3259 := z.EncBinary() - _ = yym3259 + yym3352 := z.EncBinary() + _ = yym3352 if false { } else { h.encSliceLimitRange(([]LimitRange)(x.Items), e) @@ -40600,15 +41926,15 @@ func (x *LimitRangeList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym3260 := z.EncBinary() - _ = yym3260 + yym3353 := z.EncBinary() + _ = yym3353 if false { } else { h.encSliceLimitRange(([]LimitRange)(x.Items), e) } } } - if yyr3246 || yy2arr3246 { + if yyr3339 || yy2arr3339 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -40621,25 +41947,25 @@ func (x *LimitRangeList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3261 := z.DecBinary() - _ = yym3261 + yym3354 := z.DecBinary() + _ = yym3354 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3262 := r.ContainerType() - if yyct3262 == codecSelferValueTypeMap1234 { - yyl3262 := r.ReadMapStart() - if yyl3262 == 0 { + yyct3355 := r.ContainerType() + if yyct3355 == codecSelferValueTypeMap1234 { + yyl3355 := r.ReadMapStart() + if yyl3355 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3262, d) + x.codecDecodeSelfFromMap(yyl3355, d) } - } else if yyct3262 == codecSelferValueTypeArray1234 { - yyl3262 := r.ReadArrayStart() - if yyl3262 == 0 { + } else if yyct3355 == codecSelferValueTypeArray1234 { + yyl3355 := r.ReadArrayStart() + if yyl3355 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3262, d) + x.codecDecodeSelfFromArray(yyl3355, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -40651,12 +41977,12 @@ func (x *LimitRangeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3263Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3263Slc - var yyhl3263 bool = l >= 0 - for yyj3263 := 0; ; yyj3263++ { - if yyhl3263 { - if yyj3263 >= l { + var yys3356Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3356Slc + var yyhl3356 bool = l >= 0 + for yyj3356 := 0; ; yyj3356++ { + if yyhl3356 { + if yyj3356 >= l { break } } else { @@ -40665,10 +41991,10 @@ func (x *LimitRangeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3263Slc = r.DecodeBytes(yys3263Slc, true, true) - yys3263 := string(yys3263Slc) + yys3356Slc = r.DecodeBytes(yys3356Slc, true, true) + yys3356 := string(yys3356Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3263 { + switch yys3356 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -40685,31 +42011,31 @@ func (x *LimitRangeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3266 := &x.ListMeta - yym3267 := z.DecBinary() - _ = yym3267 + yyv3359 := &x.ListMeta + yym3360 := z.DecBinary() + _ = yym3360 if false { - } else if z.HasExtensions() && z.DecExt(yyv3266) { + } else if z.HasExtensions() && z.DecExt(yyv3359) { } else { - z.DecFallback(yyv3266, false) + z.DecFallback(yyv3359, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3268 := &x.Items - yym3269 := z.DecBinary() - _ = yym3269 + yyv3361 := &x.Items + yym3362 := z.DecBinary() + _ = yym3362 if false { } else { - h.decSliceLimitRange((*[]LimitRange)(yyv3268), d) + h.decSliceLimitRange((*[]LimitRange)(yyv3361), d) } } default: - z.DecStructFieldNotFound(-1, yys3263) - } // end switch yys3263 - } // end for yyj3263 + z.DecStructFieldNotFound(-1, yys3356) + } // end switch yys3356 + } // end for yyj3356 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -40717,16 +42043,16 @@ func (x *LimitRangeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3270 int - var yyb3270 bool - var yyhl3270 bool = l >= 0 - yyj3270++ - if yyhl3270 { - yyb3270 = yyj3270 > l + var yyj3363 int + var yyb3363 bool + var yyhl3363 bool = l >= 0 + yyj3363++ + if yyhl3363 { + yyb3363 = yyj3363 > l } else { - yyb3270 = r.CheckBreak() + yyb3363 = r.CheckBreak() } - if yyb3270 { + if yyb3363 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40736,13 +42062,13 @@ func (x *LimitRangeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3270++ - if yyhl3270 { - yyb3270 = yyj3270 > l + yyj3363++ + if yyhl3363 { + yyb3363 = yyj3363 > l } else { - yyb3270 = r.CheckBreak() + yyb3363 = r.CheckBreak() } - if yyb3270 { + if yyb3363 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40752,13 +42078,13 @@ func (x *LimitRangeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3270++ - if yyhl3270 { - yyb3270 = yyj3270 > l + yyj3363++ + if yyhl3363 { + yyb3363 = yyj3363 > l } else { - yyb3270 = r.CheckBreak() + yyb3363 = r.CheckBreak() } - if yyb3270 { + if yyb3363 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40766,22 +42092,22 @@ func (x *LimitRangeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3273 := &x.ListMeta - yym3274 := z.DecBinary() - _ = yym3274 + yyv3366 := &x.ListMeta + yym3367 := z.DecBinary() + _ = yym3367 if false { - } else if z.HasExtensions() && z.DecExt(yyv3273) { + } else if z.HasExtensions() && z.DecExt(yyv3366) { } else { - z.DecFallback(yyv3273, false) + z.DecFallback(yyv3366, false) } } - yyj3270++ - if yyhl3270 { - yyb3270 = yyj3270 > l + yyj3363++ + if yyhl3363 { + yyb3363 = yyj3363 > l } else { - yyb3270 = r.CheckBreak() + yyb3363 = r.CheckBreak() } - if yyb3270 { + if yyb3363 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40789,26 +42115,26 @@ func (x *LimitRangeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3275 := &x.Items - yym3276 := z.DecBinary() - _ = yym3276 + yyv3368 := &x.Items + yym3369 := z.DecBinary() + _ = yym3369 if false { } else { - h.decSliceLimitRange((*[]LimitRange)(yyv3275), d) + h.decSliceLimitRange((*[]LimitRange)(yyv3368), d) } } for { - yyj3270++ - if yyhl3270 { - yyb3270 = yyj3270 > l + yyj3363++ + if yyhl3363 { + yyb3363 = yyj3363 > l } else { - yyb3270 = r.CheckBreak() + yyb3363 = r.CheckBreak() } - if yyb3270 { + if yyb3363 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3270-1, "") + z.DecStructFieldNotFound(yyj3363-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -40820,33 +42146,33 @@ func (x *ResourceQuotaSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3277 := z.EncBinary() - _ = yym3277 + yym3370 := z.EncBinary() + _ = yym3370 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3278 := !z.EncBinary() - yy2arr3278 := z.EncBasicHandle().StructToArray - var yyq3278 [1]bool - _, _, _ = yysep3278, yyq3278, yy2arr3278 - const yyr3278 bool = false - yyq3278[0] = len(x.Hard) != 0 - var yynn3278 int - if yyr3278 || yy2arr3278 { + yysep3371 := !z.EncBinary() + yy2arr3371 := z.EncBasicHandle().StructToArray + var yyq3371 [1]bool + _, _, _ = yysep3371, yyq3371, yy2arr3371 + const yyr3371 bool = false + yyq3371[0] = len(x.Hard) != 0 + var yynn3371 int + if yyr3371 || yy2arr3371 { r.EncodeArrayStart(1) } else { - yynn3278 = 0 - for _, b := range yyq3278 { + yynn3371 = 0 + for _, b := range yyq3371 { if b { - yynn3278++ + yynn3371++ } } - r.EncodeMapStart(yynn3278) - yynn3278 = 0 + r.EncodeMapStart(yynn3371) + yynn3371 = 0 } - if yyr3278 || yy2arr3278 { + if yyr3371 || yy2arr3371 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3278[0] { + if yyq3371[0] { if x.Hard == nil { r.EncodeNil() } else { @@ -40856,7 +42182,7 @@ func (x *ResourceQuotaSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3278[0] { + if yyq3371[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hard")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -40867,7 +42193,7 @@ func (x *ResourceQuotaSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3278 || yy2arr3278 { + if yyr3371 || yy2arr3371 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -40880,25 +42206,25 @@ func (x *ResourceQuotaSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3280 := z.DecBinary() - _ = yym3280 + yym3373 := z.DecBinary() + _ = yym3373 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3281 := r.ContainerType() - if yyct3281 == codecSelferValueTypeMap1234 { - yyl3281 := r.ReadMapStart() - if yyl3281 == 0 { + yyct3374 := r.ContainerType() + if yyct3374 == codecSelferValueTypeMap1234 { + yyl3374 := r.ReadMapStart() + if yyl3374 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3281, d) + x.codecDecodeSelfFromMap(yyl3374, d) } - } else if yyct3281 == codecSelferValueTypeArray1234 { - yyl3281 := r.ReadArrayStart() - if yyl3281 == 0 { + } else if yyct3374 == codecSelferValueTypeArray1234 { + yyl3374 := r.ReadArrayStart() + if yyl3374 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3281, d) + x.codecDecodeSelfFromArray(yyl3374, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -40910,12 +42236,12 @@ func (x *ResourceQuotaSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3282Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3282Slc - var yyhl3282 bool = l >= 0 - for yyj3282 := 0; ; yyj3282++ { - if yyhl3282 { - if yyj3282 >= l { + var yys3375Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3375Slc + var yyhl3375 bool = l >= 0 + for yyj3375 := 0; ; yyj3375++ { + if yyhl3375 { + if yyj3375 >= l { break } } else { @@ -40924,21 +42250,21 @@ func (x *ResourceQuotaSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3282Slc = r.DecodeBytes(yys3282Slc, true, true) - yys3282 := string(yys3282Slc) + yys3375Slc = r.DecodeBytes(yys3375Slc, true, true) + yys3375 := string(yys3375Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3282 { + switch yys3375 { case "hard": if r.TryDecodeAsNil() { x.Hard = nil } else { - yyv3283 := &x.Hard - yyv3283.CodecDecodeSelf(d) + yyv3376 := &x.Hard + yyv3376.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3282) - } // end switch yys3282 - } // end for yyj3282 + z.DecStructFieldNotFound(-1, yys3375) + } // end switch yys3375 + } // end for yyj3375 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -40946,16 +42272,16 @@ func (x *ResourceQuotaSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3284 int - var yyb3284 bool - var yyhl3284 bool = l >= 0 - yyj3284++ - if yyhl3284 { - yyb3284 = yyj3284 > l + var yyj3377 int + var yyb3377 bool + var yyhl3377 bool = l >= 0 + yyj3377++ + if yyhl3377 { + yyb3377 = yyj3377 > l } else { - yyb3284 = r.CheckBreak() + yyb3377 = r.CheckBreak() } - if yyb3284 { + if yyb3377 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40963,21 +42289,21 @@ func (x *ResourceQuotaSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Hard = nil } else { - yyv3285 := &x.Hard - yyv3285.CodecDecodeSelf(d) + yyv3378 := &x.Hard + yyv3378.CodecDecodeSelf(d) } for { - yyj3284++ - if yyhl3284 { - yyb3284 = yyj3284 > l + yyj3377++ + if yyhl3377 { + yyb3377 = yyj3377 > l } else { - yyb3284 = r.CheckBreak() + yyb3377 = r.CheckBreak() } - if yyb3284 { + if yyb3377 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3284-1, "") + z.DecStructFieldNotFound(yyj3377-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -40989,34 +42315,34 @@ func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3286 := z.EncBinary() - _ = yym3286 + yym3379 := z.EncBinary() + _ = yym3379 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3287 := !z.EncBinary() - yy2arr3287 := z.EncBasicHandle().StructToArray - var yyq3287 [2]bool - _, _, _ = yysep3287, yyq3287, yy2arr3287 - const yyr3287 bool = false - yyq3287[0] = len(x.Hard) != 0 - yyq3287[1] = len(x.Used) != 0 - var yynn3287 int - if yyr3287 || yy2arr3287 { + yysep3380 := !z.EncBinary() + yy2arr3380 := z.EncBasicHandle().StructToArray + var yyq3380 [2]bool + _, _, _ = yysep3380, yyq3380, yy2arr3380 + const yyr3380 bool = false + yyq3380[0] = len(x.Hard) != 0 + yyq3380[1] = len(x.Used) != 0 + var yynn3380 int + if yyr3380 || yy2arr3380 { r.EncodeArrayStart(2) } else { - yynn3287 = 0 - for _, b := range yyq3287 { + yynn3380 = 0 + for _, b := range yyq3380 { if b { - yynn3287++ + yynn3380++ } } - r.EncodeMapStart(yynn3287) - yynn3287 = 0 + r.EncodeMapStart(yynn3380) + yynn3380 = 0 } - if yyr3287 || yy2arr3287 { + if yyr3380 || yy2arr3380 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3287[0] { + if yyq3380[0] { if x.Hard == nil { r.EncodeNil() } else { @@ -41026,7 +42352,7 @@ func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3287[0] { + if yyq3380[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hard")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -41037,9 +42363,9 @@ func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3287 || yy2arr3287 { + if yyr3380 || yy2arr3380 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3287[1] { + if yyq3380[1] { if x.Used == nil { r.EncodeNil() } else { @@ -41049,7 +42375,7 @@ func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3287[1] { + if yyq3380[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("used")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -41060,7 +42386,7 @@ func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3287 || yy2arr3287 { + if yyr3380 || yy2arr3380 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -41073,25 +42399,25 @@ func (x *ResourceQuotaStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3290 := z.DecBinary() - _ = yym3290 + yym3383 := z.DecBinary() + _ = yym3383 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3291 := r.ContainerType() - if yyct3291 == codecSelferValueTypeMap1234 { - yyl3291 := r.ReadMapStart() - if yyl3291 == 0 { + yyct3384 := r.ContainerType() + if yyct3384 == codecSelferValueTypeMap1234 { + yyl3384 := r.ReadMapStart() + if yyl3384 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3291, d) + x.codecDecodeSelfFromMap(yyl3384, d) } - } else if yyct3291 == codecSelferValueTypeArray1234 { - yyl3291 := r.ReadArrayStart() - if yyl3291 == 0 { + } else if yyct3384 == codecSelferValueTypeArray1234 { + yyl3384 := r.ReadArrayStart() + if yyl3384 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3291, d) + x.codecDecodeSelfFromArray(yyl3384, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -41103,12 +42429,12 @@ func (x *ResourceQuotaStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3292Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3292Slc - var yyhl3292 bool = l >= 0 - for yyj3292 := 0; ; yyj3292++ { - if yyhl3292 { - if yyj3292 >= l { + var yys3385Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3385Slc + var yyhl3385 bool = l >= 0 + for yyj3385 := 0; ; yyj3385++ { + if yyhl3385 { + if yyj3385 >= l { break } } else { @@ -41117,28 +42443,28 @@ func (x *ResourceQuotaStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3292Slc = r.DecodeBytes(yys3292Slc, true, true) - yys3292 := string(yys3292Slc) + yys3385Slc = r.DecodeBytes(yys3385Slc, true, true) + yys3385 := string(yys3385Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3292 { + switch yys3385 { case "hard": if r.TryDecodeAsNil() { x.Hard = nil } else { - yyv3293 := &x.Hard - yyv3293.CodecDecodeSelf(d) + yyv3386 := &x.Hard + yyv3386.CodecDecodeSelf(d) } case "used": if r.TryDecodeAsNil() { x.Used = nil } else { - yyv3294 := &x.Used - yyv3294.CodecDecodeSelf(d) + yyv3387 := &x.Used + yyv3387.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3292) - } // end switch yys3292 - } // end for yyj3292 + z.DecStructFieldNotFound(-1, yys3385) + } // end switch yys3385 + } // end for yyj3385 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -41146,16 +42472,16 @@ func (x *ResourceQuotaStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3295 int - var yyb3295 bool - var yyhl3295 bool = l >= 0 - yyj3295++ - if yyhl3295 { - yyb3295 = yyj3295 > l + var yyj3388 int + var yyb3388 bool + var yyhl3388 bool = l >= 0 + yyj3388++ + if yyhl3388 { + yyb3388 = yyj3388 > l } else { - yyb3295 = r.CheckBreak() + yyb3388 = r.CheckBreak() } - if yyb3295 { + if yyb3388 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41163,16 +42489,16 @@ func (x *ResourceQuotaStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Hard = nil } else { - yyv3296 := &x.Hard - yyv3296.CodecDecodeSelf(d) + yyv3389 := &x.Hard + yyv3389.CodecDecodeSelf(d) } - yyj3295++ - if yyhl3295 { - yyb3295 = yyj3295 > l + yyj3388++ + if yyhl3388 { + yyb3388 = yyj3388 > l } else { - yyb3295 = r.CheckBreak() + yyb3388 = r.CheckBreak() } - if yyb3295 { + if yyb3388 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41180,21 +42506,21 @@ func (x *ResourceQuotaStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Used = nil } else { - yyv3297 := &x.Used - yyv3297.CodecDecodeSelf(d) + yyv3390 := &x.Used + yyv3390.CodecDecodeSelf(d) } for { - yyj3295++ - if yyhl3295 { - yyb3295 = yyj3295 > l + yyj3388++ + if yyhl3388 { + yyb3388 = yyj3388 > l } else { - yyb3295 = r.CheckBreak() + yyb3388 = r.CheckBreak() } - if yyb3295 { + if yyb3388 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3295-1, "") + z.DecStructFieldNotFound(yyj3388-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -41206,39 +42532,39 @@ func (x *ResourceQuota) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3298 := z.EncBinary() - _ = yym3298 + yym3391 := z.EncBinary() + _ = yym3391 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3299 := !z.EncBinary() - yy2arr3299 := z.EncBasicHandle().StructToArray - var yyq3299 [5]bool - _, _, _ = yysep3299, yyq3299, yy2arr3299 - const yyr3299 bool = false - yyq3299[0] = x.Kind != "" - yyq3299[1] = x.APIVersion != "" - yyq3299[2] = true - yyq3299[3] = true - yyq3299[4] = true - var yynn3299 int - if yyr3299 || yy2arr3299 { + yysep3392 := !z.EncBinary() + yy2arr3392 := z.EncBasicHandle().StructToArray + var yyq3392 [5]bool + _, _, _ = yysep3392, yyq3392, yy2arr3392 + const yyr3392 bool = false + yyq3392[0] = x.Kind != "" + yyq3392[1] = x.APIVersion != "" + yyq3392[2] = true + yyq3392[3] = true + yyq3392[4] = true + var yynn3392 int + if yyr3392 || yy2arr3392 { r.EncodeArrayStart(5) } else { - yynn3299 = 0 - for _, b := range yyq3299 { + yynn3392 = 0 + for _, b := range yyq3392 { if b { - yynn3299++ + yynn3392++ } } - r.EncodeMapStart(yynn3299) - yynn3299 = 0 + r.EncodeMapStart(yynn3392) + yynn3392 = 0 } - if yyr3299 || yy2arr3299 { + if yyr3392 || yy2arr3392 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3299[0] { - yym3301 := z.EncBinary() - _ = yym3301 + if yyq3392[0] { + yym3394 := z.EncBinary() + _ = yym3394 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -41247,23 +42573,23 @@ func (x *ResourceQuota) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3299[0] { + if yyq3392[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3302 := z.EncBinary() - _ = yym3302 + yym3395 := z.EncBinary() + _ = yym3395 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3299 || yy2arr3299 { + if yyr3392 || yy2arr3392 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3299[1] { - yym3304 := z.EncBinary() - _ = yym3304 + if yyq3392[1] { + yym3397 := z.EncBinary() + _ = yym3397 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -41272,70 +42598,70 @@ func (x *ResourceQuota) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3299[1] { + if yyq3392[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3305 := z.EncBinary() - _ = yym3305 + yym3398 := z.EncBinary() + _ = yym3398 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3299 || yy2arr3299 { + if yyr3392 || yy2arr3392 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3299[2] { - yy3307 := &x.ObjectMeta - yy3307.CodecEncodeSelf(e) + if yyq3392[2] { + yy3400 := &x.ObjectMeta + yy3400.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3299[2] { + if yyq3392[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3308 := &x.ObjectMeta - yy3308.CodecEncodeSelf(e) + yy3401 := &x.ObjectMeta + yy3401.CodecEncodeSelf(e) } } - if yyr3299 || yy2arr3299 { + if yyr3392 || yy2arr3392 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3299[3] { - yy3310 := &x.Spec - yy3310.CodecEncodeSelf(e) + if yyq3392[3] { + yy3403 := &x.Spec + yy3403.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3299[3] { + if yyq3392[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3311 := &x.Spec - yy3311.CodecEncodeSelf(e) + yy3404 := &x.Spec + yy3404.CodecEncodeSelf(e) } } - if yyr3299 || yy2arr3299 { + if yyr3392 || yy2arr3392 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3299[4] { - yy3313 := &x.Status - yy3313.CodecEncodeSelf(e) + if yyq3392[4] { + yy3406 := &x.Status + yy3406.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3299[4] { + if yyq3392[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3314 := &x.Status - yy3314.CodecEncodeSelf(e) + yy3407 := &x.Status + yy3407.CodecEncodeSelf(e) } } - if yyr3299 || yy2arr3299 { + if yyr3392 || yy2arr3392 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -41348,25 +42674,25 @@ func (x *ResourceQuota) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3315 := z.DecBinary() - _ = yym3315 + yym3408 := z.DecBinary() + _ = yym3408 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3316 := r.ContainerType() - if yyct3316 == codecSelferValueTypeMap1234 { - yyl3316 := r.ReadMapStart() - if yyl3316 == 0 { + yyct3409 := r.ContainerType() + if yyct3409 == codecSelferValueTypeMap1234 { + yyl3409 := r.ReadMapStart() + if yyl3409 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3316, d) + x.codecDecodeSelfFromMap(yyl3409, d) } - } else if yyct3316 == codecSelferValueTypeArray1234 { - yyl3316 := r.ReadArrayStart() - if yyl3316 == 0 { + } else if yyct3409 == codecSelferValueTypeArray1234 { + yyl3409 := r.ReadArrayStart() + if yyl3409 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3316, d) + x.codecDecodeSelfFromArray(yyl3409, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -41378,12 +42704,12 @@ func (x *ResourceQuota) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3317Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3317Slc - var yyhl3317 bool = l >= 0 - for yyj3317 := 0; ; yyj3317++ { - if yyhl3317 { - if yyj3317 >= l { + var yys3410Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3410Slc + var yyhl3410 bool = l >= 0 + for yyj3410 := 0; ; yyj3410++ { + if yyhl3410 { + if yyj3410 >= l { break } } else { @@ -41392,10 +42718,10 @@ func (x *ResourceQuota) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3317Slc = r.DecodeBytes(yys3317Slc, true, true) - yys3317 := string(yys3317Slc) + yys3410Slc = r.DecodeBytes(yys3410Slc, true, true) + yys3410 := string(yys3410Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3317 { + switch yys3410 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -41412,27 +42738,27 @@ func (x *ResourceQuota) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3320 := &x.ObjectMeta - yyv3320.CodecDecodeSelf(d) + yyv3413 := &x.ObjectMeta + yyv3413.CodecDecodeSelf(d) } case "spec": if r.TryDecodeAsNil() { x.Spec = ResourceQuotaSpec{} } else { - yyv3321 := &x.Spec - yyv3321.CodecDecodeSelf(d) + yyv3414 := &x.Spec + yyv3414.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ResourceQuotaStatus{} } else { - yyv3322 := &x.Status - yyv3322.CodecDecodeSelf(d) + yyv3415 := &x.Status + yyv3415.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3317) - } // end switch yys3317 - } // end for yyj3317 + z.DecStructFieldNotFound(-1, yys3410) + } // end switch yys3410 + } // end for yyj3410 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -41440,16 +42766,16 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3323 int - var yyb3323 bool - var yyhl3323 bool = l >= 0 - yyj3323++ - if yyhl3323 { - yyb3323 = yyj3323 > l + var yyj3416 int + var yyb3416 bool + var yyhl3416 bool = l >= 0 + yyj3416++ + if yyhl3416 { + yyb3416 = yyj3416 > l } else { - yyb3323 = r.CheckBreak() + yyb3416 = r.CheckBreak() } - if yyb3323 { + if yyb3416 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41459,13 +42785,13 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3323++ - if yyhl3323 { - yyb3323 = yyj3323 > l + yyj3416++ + if yyhl3416 { + yyb3416 = yyj3416 > l } else { - yyb3323 = r.CheckBreak() + yyb3416 = r.CheckBreak() } - if yyb3323 { + if yyb3416 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41475,13 +42801,13 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3323++ - if yyhl3323 { - yyb3323 = yyj3323 > l + yyj3416++ + if yyhl3416 { + yyb3416 = yyj3416 > l } else { - yyb3323 = r.CheckBreak() + yyb3416 = r.CheckBreak() } - if yyb3323 { + if yyb3416 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41489,16 +42815,16 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3326 := &x.ObjectMeta - yyv3326.CodecDecodeSelf(d) + yyv3419 := &x.ObjectMeta + yyv3419.CodecDecodeSelf(d) } - yyj3323++ - if yyhl3323 { - yyb3323 = yyj3323 > l + yyj3416++ + if yyhl3416 { + yyb3416 = yyj3416 > l } else { - yyb3323 = r.CheckBreak() + yyb3416 = r.CheckBreak() } - if yyb3323 { + if yyb3416 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41506,16 +42832,16 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ResourceQuotaSpec{} } else { - yyv3327 := &x.Spec - yyv3327.CodecDecodeSelf(d) + yyv3420 := &x.Spec + yyv3420.CodecDecodeSelf(d) } - yyj3323++ - if yyhl3323 { - yyb3323 = yyj3323 > l + yyj3416++ + if yyhl3416 { + yyb3416 = yyj3416 > l } else { - yyb3323 = r.CheckBreak() + yyb3416 = r.CheckBreak() } - if yyb3323 { + if yyb3416 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41523,21 +42849,21 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ResourceQuotaStatus{} } else { - yyv3328 := &x.Status - yyv3328.CodecDecodeSelf(d) + yyv3421 := &x.Status + yyv3421.CodecDecodeSelf(d) } for { - yyj3323++ - if yyhl3323 { - yyb3323 = yyj3323 > l + yyj3416++ + if yyhl3416 { + yyb3416 = yyj3416 > l } else { - yyb3323 = r.CheckBreak() + yyb3416 = r.CheckBreak() } - if yyb3323 { + if yyb3416 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3323-1, "") + z.DecStructFieldNotFound(yyj3416-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -41549,37 +42875,37 @@ func (x *ResourceQuotaList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3329 := z.EncBinary() - _ = yym3329 + yym3422 := z.EncBinary() + _ = yym3422 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3330 := !z.EncBinary() - yy2arr3330 := z.EncBasicHandle().StructToArray - var yyq3330 [4]bool - _, _, _ = yysep3330, yyq3330, yy2arr3330 - const yyr3330 bool = false - yyq3330[0] = x.Kind != "" - yyq3330[1] = x.APIVersion != "" - yyq3330[2] = true - var yynn3330 int - if yyr3330 || yy2arr3330 { + yysep3423 := !z.EncBinary() + yy2arr3423 := z.EncBasicHandle().StructToArray + var yyq3423 [4]bool + _, _, _ = yysep3423, yyq3423, yy2arr3423 + const yyr3423 bool = false + yyq3423[0] = x.Kind != "" + yyq3423[1] = x.APIVersion != "" + yyq3423[2] = true + var yynn3423 int + if yyr3423 || yy2arr3423 { r.EncodeArrayStart(4) } else { - yynn3330 = 1 - for _, b := range yyq3330 { + yynn3423 = 1 + for _, b := range yyq3423 { if b { - yynn3330++ + yynn3423++ } } - r.EncodeMapStart(yynn3330) - yynn3330 = 0 + r.EncodeMapStart(yynn3423) + yynn3423 = 0 } - if yyr3330 || yy2arr3330 { + if yyr3423 || yy2arr3423 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3330[0] { - yym3332 := z.EncBinary() - _ = yym3332 + if yyq3423[0] { + yym3425 := z.EncBinary() + _ = yym3425 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -41588,23 +42914,23 @@ func (x *ResourceQuotaList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3330[0] { + if yyq3423[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3333 := z.EncBinary() - _ = yym3333 + yym3426 := z.EncBinary() + _ = yym3426 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3330 || yy2arr3330 { + if yyr3423 || yy2arr3423 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3330[1] { - yym3335 := z.EncBinary() - _ = yym3335 + if yyq3423[1] { + yym3428 := z.EncBinary() + _ = yym3428 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -41613,54 +42939,54 @@ func (x *ResourceQuotaList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3330[1] { + if yyq3423[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3336 := z.EncBinary() - _ = yym3336 + yym3429 := z.EncBinary() + _ = yym3429 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3330 || yy2arr3330 { + if yyr3423 || yy2arr3423 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3330[2] { - yy3338 := &x.ListMeta - yym3339 := z.EncBinary() - _ = yym3339 + if yyq3423[2] { + yy3431 := &x.ListMeta + yym3432 := z.EncBinary() + _ = yym3432 if false { - } else if z.HasExtensions() && z.EncExt(yy3338) { + } else if z.HasExtensions() && z.EncExt(yy3431) { } else { - z.EncFallback(yy3338) + z.EncFallback(yy3431) } } else { r.EncodeNil() } } else { - if yyq3330[2] { + if yyq3423[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3340 := &x.ListMeta - yym3341 := z.EncBinary() - _ = yym3341 + yy3433 := &x.ListMeta + yym3434 := z.EncBinary() + _ = yym3434 if false { - } else if z.HasExtensions() && z.EncExt(yy3340) { + } else if z.HasExtensions() && z.EncExt(yy3433) { } else { - z.EncFallback(yy3340) + z.EncFallback(yy3433) } } } - if yyr3330 || yy2arr3330 { + if yyr3423 || yy2arr3423 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym3343 := z.EncBinary() - _ = yym3343 + yym3436 := z.EncBinary() + _ = yym3436 if false { } else { h.encSliceResourceQuota(([]ResourceQuota)(x.Items), e) @@ -41673,15 +42999,15 @@ func (x *ResourceQuotaList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym3344 := z.EncBinary() - _ = yym3344 + yym3437 := z.EncBinary() + _ = yym3437 if false { } else { h.encSliceResourceQuota(([]ResourceQuota)(x.Items), e) } } } - if yyr3330 || yy2arr3330 { + if yyr3423 || yy2arr3423 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -41694,25 +43020,25 @@ func (x *ResourceQuotaList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3345 := z.DecBinary() - _ = yym3345 + yym3438 := z.DecBinary() + _ = yym3438 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3346 := r.ContainerType() - if yyct3346 == codecSelferValueTypeMap1234 { - yyl3346 := r.ReadMapStart() - if yyl3346 == 0 { + yyct3439 := r.ContainerType() + if yyct3439 == codecSelferValueTypeMap1234 { + yyl3439 := r.ReadMapStart() + if yyl3439 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3346, d) + x.codecDecodeSelfFromMap(yyl3439, d) } - } else if yyct3346 == codecSelferValueTypeArray1234 { - yyl3346 := r.ReadArrayStart() - if yyl3346 == 0 { + } else if yyct3439 == codecSelferValueTypeArray1234 { + yyl3439 := r.ReadArrayStart() + if yyl3439 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3346, d) + x.codecDecodeSelfFromArray(yyl3439, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -41724,12 +43050,12 @@ func (x *ResourceQuotaList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3347Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3347Slc - var yyhl3347 bool = l >= 0 - for yyj3347 := 0; ; yyj3347++ { - if yyhl3347 { - if yyj3347 >= l { + var yys3440Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3440Slc + var yyhl3440 bool = l >= 0 + for yyj3440 := 0; ; yyj3440++ { + if yyhl3440 { + if yyj3440 >= l { break } } else { @@ -41738,10 +43064,10 @@ func (x *ResourceQuotaList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3347Slc = r.DecodeBytes(yys3347Slc, true, true) - yys3347 := string(yys3347Slc) + yys3440Slc = r.DecodeBytes(yys3440Slc, true, true) + yys3440 := string(yys3440Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3347 { + switch yys3440 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -41758,31 +43084,31 @@ func (x *ResourceQuotaList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3350 := &x.ListMeta - yym3351 := z.DecBinary() - _ = yym3351 + yyv3443 := &x.ListMeta + yym3444 := z.DecBinary() + _ = yym3444 if false { - } else if z.HasExtensions() && z.DecExt(yyv3350) { + } else if z.HasExtensions() && z.DecExt(yyv3443) { } else { - z.DecFallback(yyv3350, false) + z.DecFallback(yyv3443, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3352 := &x.Items - yym3353 := z.DecBinary() - _ = yym3353 + yyv3445 := &x.Items + yym3446 := z.DecBinary() + _ = yym3446 if false { } else { - h.decSliceResourceQuota((*[]ResourceQuota)(yyv3352), d) + h.decSliceResourceQuota((*[]ResourceQuota)(yyv3445), d) } } default: - z.DecStructFieldNotFound(-1, yys3347) - } // end switch yys3347 - } // end for yyj3347 + z.DecStructFieldNotFound(-1, yys3440) + } // end switch yys3440 + } // end for yyj3440 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -41790,16 +43116,16 @@ func (x *ResourceQuotaList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3354 int - var yyb3354 bool - var yyhl3354 bool = l >= 0 - yyj3354++ - if yyhl3354 { - yyb3354 = yyj3354 > l + var yyj3447 int + var yyb3447 bool + var yyhl3447 bool = l >= 0 + yyj3447++ + if yyhl3447 { + yyb3447 = yyj3447 > l } else { - yyb3354 = r.CheckBreak() + yyb3447 = r.CheckBreak() } - if yyb3354 { + if yyb3447 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41809,13 +43135,13 @@ func (x *ResourceQuotaList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder } else { x.Kind = string(r.DecodeString()) } - yyj3354++ - if yyhl3354 { - yyb3354 = yyj3354 > l + yyj3447++ + if yyhl3447 { + yyb3447 = yyj3447 > l } else { - yyb3354 = r.CheckBreak() + yyb3447 = r.CheckBreak() } - if yyb3354 { + if yyb3447 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41825,13 +43151,13 @@ func (x *ResourceQuotaList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder } else { x.APIVersion = string(r.DecodeString()) } - yyj3354++ - if yyhl3354 { - yyb3354 = yyj3354 > l + yyj3447++ + if yyhl3447 { + yyb3447 = yyj3447 > l } else { - yyb3354 = r.CheckBreak() + yyb3447 = r.CheckBreak() } - if yyb3354 { + if yyb3447 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41839,22 +43165,22 @@ func (x *ResourceQuotaList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3357 := &x.ListMeta - yym3358 := z.DecBinary() - _ = yym3358 + yyv3450 := &x.ListMeta + yym3451 := z.DecBinary() + _ = yym3451 if false { - } else if z.HasExtensions() && z.DecExt(yyv3357) { + } else if z.HasExtensions() && z.DecExt(yyv3450) { } else { - z.DecFallback(yyv3357, false) + z.DecFallback(yyv3450, false) } } - yyj3354++ - if yyhl3354 { - yyb3354 = yyj3354 > l + yyj3447++ + if yyhl3447 { + yyb3447 = yyj3447 > l } else { - yyb3354 = r.CheckBreak() + yyb3447 = r.CheckBreak() } - if yyb3354 { + if yyb3447 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41862,1093 +43188,31 @@ func (x *ResourceQuotaList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3359 := &x.Items - yym3360 := z.DecBinary() - _ = yym3360 + yyv3452 := &x.Items + yym3453 := z.DecBinary() + _ = yym3453 if false { } else { - h.decSliceResourceQuota((*[]ResourceQuota)(yyv3359), d) + h.decSliceResourceQuota((*[]ResourceQuota)(yyv3452), d) } } for { - yyj3354++ - if yyhl3354 { - yyb3354 = yyj3354 > l + yyj3447++ + if yyhl3447 { + yyb3447 = yyj3447 > l } else { - yyb3354 = r.CheckBreak() + yyb3447 = r.CheckBreak() } - if yyb3354 { + if yyb3447 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3354-1, "") + z.DecStructFieldNotFound(yyj3447-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym3361 := z.EncBinary() - _ = yym3361 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep3362 := !z.EncBinary() - yy2arr3362 := z.EncBasicHandle().StructToArray - var yyq3362 [5]bool - _, _, _ = yysep3362, yyq3362, yy2arr3362 - const yyr3362 bool = false - yyq3362[0] = x.Kind != "" - yyq3362[1] = x.APIVersion != "" - yyq3362[2] = true - yyq3362[3] = len(x.Data) != 0 - yyq3362[4] = x.Type != "" - var yynn3362 int - if yyr3362 || yy2arr3362 { - r.EncodeArrayStart(5) - } else { - yynn3362 = 0 - for _, b := range yyq3362 { - if b { - yynn3362++ - } - } - r.EncodeMapStart(yynn3362) - yynn3362 = 0 - } - if yyr3362 || yy2arr3362 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3362[0] { - yym3364 := z.EncBinary() - _ = yym3364 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3362[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3365 := z.EncBinary() - _ = yym3365 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr3362 || yy2arr3362 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3362[1] { - yym3367 := z.EncBinary() - _ = yym3367 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3362[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3368 := z.EncBinary() - _ = yym3368 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr3362 || yy2arr3362 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3362[2] { - yy3370 := &x.ObjectMeta - yy3370.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq3362[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3371 := &x.ObjectMeta - yy3371.CodecEncodeSelf(e) - } - } - if yyr3362 || yy2arr3362 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3362[3] { - if x.Data == nil { - r.EncodeNil() - } else { - yym3373 := z.EncBinary() - _ = yym3373 - if false { - } else { - h.encMapstringSliceuint8((map[string][]uint8)(x.Data), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq3362[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("data")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Data == nil { - r.EncodeNil() - } else { - yym3374 := z.EncBinary() - _ = yym3374 - if false { - } else { - h.encMapstringSliceuint8((map[string][]uint8)(x.Data), e) - } - } - } - } - if yyr3362 || yy2arr3362 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3362[4] { - x.Type.CodecEncodeSelf(e) - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3362[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("type")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - x.Type.CodecEncodeSelf(e) - } - } - if yyr3362 || yy2arr3362 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *Secret) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym3376 := z.DecBinary() - _ = yym3376 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct3377 := r.ContainerType() - if yyct3377 == codecSelferValueTypeMap1234 { - yyl3377 := r.ReadMapStart() - if yyl3377 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl3377, d) - } - } else if yyct3377 == codecSelferValueTypeArray1234 { - yyl3377 := r.ReadArrayStart() - if yyl3377 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl3377, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *Secret) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys3378Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3378Slc - var yyhl3378 bool = l >= 0 - for yyj3378 := 0; ; yyj3378++ { - if yyhl3378 { - if yyj3378 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3378Slc = r.DecodeBytes(yys3378Slc, true, true) - yys3378 := string(yys3378Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3378 { - 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()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} - } else { - yyv3381 := &x.ObjectMeta - yyv3381.CodecDecodeSelf(d) - } - case "data": - if r.TryDecodeAsNil() { - x.Data = nil - } else { - yyv3382 := &x.Data - yym3383 := z.DecBinary() - _ = yym3383 - if false { - } else { - h.decMapstringSliceuint8((*map[string][]uint8)(yyv3382), d) - } - } - case "type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = SecretType(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3378) - } // end switch yys3378 - } // end for yyj3378 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj3385 int - var yyb3385 bool - var yyhl3385 bool = l >= 0 - yyj3385++ - if yyhl3385 { - yyb3385 = yyj3385 > l - } else { - yyb3385 = r.CheckBreak() - } - if yyb3385 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj3385++ - if yyhl3385 { - yyb3385 = yyj3385 > l - } else { - yyb3385 = r.CheckBreak() - } - if yyb3385 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj3385++ - if yyhl3385 { - yyb3385 = yyj3385 > l - } else { - yyb3385 = r.CheckBreak() - } - if yyb3385 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} - } else { - yyv3388 := &x.ObjectMeta - yyv3388.CodecDecodeSelf(d) - } - yyj3385++ - if yyhl3385 { - yyb3385 = yyj3385 > l - } else { - yyb3385 = r.CheckBreak() - } - if yyb3385 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Data = nil - } else { - yyv3389 := &x.Data - yym3390 := z.DecBinary() - _ = yym3390 - if false { - } else { - h.decMapstringSliceuint8((*map[string][]uint8)(yyv3389), d) - } - } - yyj3385++ - if yyhl3385 { - yyb3385 = yyj3385 > l - } else { - yyb3385 = r.CheckBreak() - } - if yyb3385 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = SecretType(r.DecodeString()) - } - for { - yyj3385++ - if yyhl3385 { - yyb3385 = yyj3385 > l - } else { - yyb3385 = r.CheckBreak() - } - if yyb3385 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3385-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x SecretType) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym3392 := z.EncBinary() - _ = yym3392 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *SecretType) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym3393 := z.DecBinary() - _ = yym3393 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - -func (x *SecretList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym3394 := z.EncBinary() - _ = yym3394 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep3395 := !z.EncBinary() - yy2arr3395 := z.EncBasicHandle().StructToArray - var yyq3395 [4]bool - _, _, _ = yysep3395, yyq3395, yy2arr3395 - const yyr3395 bool = false - yyq3395[0] = x.Kind != "" - yyq3395[1] = x.APIVersion != "" - yyq3395[2] = true - var yynn3395 int - if yyr3395 || yy2arr3395 { - r.EncodeArrayStart(4) - } else { - yynn3395 = 1 - for _, b := range yyq3395 { - if b { - yynn3395++ - } - } - r.EncodeMapStart(yynn3395) - yynn3395 = 0 - } - if yyr3395 || yy2arr3395 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3395[0] { - yym3397 := z.EncBinary() - _ = yym3397 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3395[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3398 := z.EncBinary() - _ = yym3398 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr3395 || yy2arr3395 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3395[1] { - yym3400 := z.EncBinary() - _ = yym3400 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3395[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3401 := z.EncBinary() - _ = yym3401 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr3395 || yy2arr3395 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3395[2] { - yy3403 := &x.ListMeta - yym3404 := z.EncBinary() - _ = yym3404 - if false { - } else if z.HasExtensions() && z.EncExt(yy3403) { - } else { - z.EncFallback(yy3403) - } - } else { - r.EncodeNil() - } - } else { - if yyq3395[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3405 := &x.ListMeta - yym3406 := z.EncBinary() - _ = yym3406 - if false { - } else if z.HasExtensions() && z.EncExt(yy3405) { - } else { - z.EncFallback(yy3405) - } - } - } - if yyr3395 || yy2arr3395 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym3408 := z.EncBinary() - _ = yym3408 - if false { - } else { - h.encSliceSecret(([]Secret)(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 { - yym3409 := z.EncBinary() - _ = yym3409 - if false { - } else { - h.encSliceSecret(([]Secret)(x.Items), e) - } - } - } - if yyr3395 || yy2arr3395 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *SecretList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym3410 := z.DecBinary() - _ = yym3410 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct3411 := r.ContainerType() - if yyct3411 == codecSelferValueTypeMap1234 { - yyl3411 := r.ReadMapStart() - if yyl3411 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl3411, d) - } - } else if yyct3411 == codecSelferValueTypeArray1234 { - yyl3411 := r.ReadArrayStart() - if yyl3411 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl3411, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *SecretList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys3412Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3412Slc - var yyhl3412 bool = l >= 0 - for yyj3412 := 0; ; yyj3412++ { - if yyhl3412 { - if yyj3412 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3412Slc = r.DecodeBytes(yys3412Slc, true, true) - yys3412 := string(yys3412Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3412 { - 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()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} - } else { - yyv3415 := &x.ListMeta - yym3416 := z.DecBinary() - _ = yym3416 - if false { - } else if z.HasExtensions() && z.DecExt(yyv3415) { - } else { - z.DecFallback(yyv3415, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv3417 := &x.Items - yym3418 := z.DecBinary() - _ = yym3418 - if false { - } else { - h.decSliceSecret((*[]Secret)(yyv3417), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3412) - } // end switch yys3412 - } // end for yyj3412 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *SecretList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj3419 int - var yyb3419 bool - var yyhl3419 bool = l >= 0 - yyj3419++ - if yyhl3419 { - yyb3419 = yyj3419 > l - } else { - yyb3419 = r.CheckBreak() - } - if yyb3419 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj3419++ - if yyhl3419 { - yyb3419 = yyj3419 > l - } else { - yyb3419 = r.CheckBreak() - } - if yyb3419 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj3419++ - if yyhl3419 { - yyb3419 = yyj3419 > l - } else { - yyb3419 = r.CheckBreak() - } - if yyb3419 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} - } else { - yyv3422 := &x.ListMeta - yym3423 := z.DecBinary() - _ = yym3423 - if false { - } else if z.HasExtensions() && z.DecExt(yyv3422) { - } else { - z.DecFallback(yyv3422, false) - } - } - yyj3419++ - if yyhl3419 { - yyb3419 = yyj3419 > l - } else { - yyb3419 = r.CheckBreak() - } - if yyb3419 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv3424 := &x.Items - yym3425 := z.DecBinary() - _ = yym3425 - if false { - } else { - h.decSliceSecret((*[]Secret)(yyv3424), d) - } - } - for { - yyj3419++ - if yyhl3419 { - yyb3419 = yyj3419 > l - } else { - yyb3419 = r.CheckBreak() - } - if yyb3419 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3419-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym3426 := z.EncBinary() - _ = yym3426 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep3427 := !z.EncBinary() - yy2arr3427 := z.EncBasicHandle().StructToArray - var yyq3427 [4]bool - _, _, _ = yysep3427, yyq3427, yy2arr3427 - const yyr3427 bool = false - yyq3427[0] = x.Kind != "" - yyq3427[1] = x.APIVersion != "" - yyq3427[2] = true - yyq3427[3] = len(x.Data) != 0 - var yynn3427 int - if yyr3427 || yy2arr3427 { - r.EncodeArrayStart(4) - } else { - yynn3427 = 0 - for _, b := range yyq3427 { - if b { - yynn3427++ - } - } - r.EncodeMapStart(yynn3427) - yynn3427 = 0 - } - if yyr3427 || yy2arr3427 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3427[0] { - yym3429 := z.EncBinary() - _ = yym3429 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3427[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3430 := z.EncBinary() - _ = yym3430 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr3427 || yy2arr3427 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3427[1] { - yym3432 := z.EncBinary() - _ = yym3432 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3427[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3433 := z.EncBinary() - _ = yym3433 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr3427 || yy2arr3427 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3427[2] { - yy3435 := &x.ObjectMeta - yy3435.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq3427[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3436 := &x.ObjectMeta - yy3436.CodecEncodeSelf(e) - } - } - if yyr3427 || yy2arr3427 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3427[3] { - if x.Data == nil { - r.EncodeNil() - } else { - yym3438 := z.EncBinary() - _ = yym3438 - if false { - } else { - z.F.EncMapStringStringV(x.Data, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq3427[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("data")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Data == nil { - r.EncodeNil() - } else { - yym3439 := z.EncBinary() - _ = yym3439 - if false { - } else { - z.F.EncMapStringStringV(x.Data, false, e) - } - } - } - } - if yyr3427 || yy2arr3427 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ConfigMap) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym3440 := z.DecBinary() - _ = yym3440 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct3441 := r.ContainerType() - if yyct3441 == codecSelferValueTypeMap1234 { - yyl3441 := r.ReadMapStart() - if yyl3441 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl3441, d) - } - } else if yyct3441 == codecSelferValueTypeArray1234 { - yyl3441 := r.ReadArrayStart() - if yyl3441 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl3441, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ConfigMap) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys3442Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3442Slc - var yyhl3442 bool = l >= 0 - for yyj3442 := 0; ; yyj3442++ { - if yyhl3442 { - if yyj3442 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3442Slc = r.DecodeBytes(yys3442Slc, true, true) - yys3442 := string(yys3442Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3442 { - 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()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} - } else { - yyv3445 := &x.ObjectMeta - yyv3445.CodecDecodeSelf(d) - } - case "data": - if r.TryDecodeAsNil() { - x.Data = nil - } else { - yyv3446 := &x.Data - yym3447 := z.DecBinary() - _ = yym3447 - if false { - } else { - z.F.DecMapStringStringX(yyv3446, false, d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3442) - } // end switch yys3442 - } // end for yyj3442 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj3448 int - var yyb3448 bool - var yyhl3448 bool = l >= 0 - yyj3448++ - if yyhl3448 { - yyb3448 = yyj3448 > l - } else { - yyb3448 = r.CheckBreak() - } - if yyb3448 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj3448++ - if yyhl3448 { - yyb3448 = yyj3448 > l - } else { - yyb3448 = r.CheckBreak() - } - if yyb3448 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj3448++ - if yyhl3448 { - yyb3448 = yyj3448 > l - } else { - yyb3448 = r.CheckBreak() - } - if yyb3448 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} - } else { - yyv3451 := &x.ObjectMeta - yyv3451.CodecDecodeSelf(d) - } - yyj3448++ - if yyhl3448 { - yyb3448 = yyj3448 > l - } else { - yyb3448 = r.CheckBreak() - } - if yyb3448 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Data = nil - } else { - yyv3452 := &x.Data - yym3453 := z.DecBinary() - _ = yym3453 - if false { - } else { - z.F.DecMapStringStringX(yyv3452, false, d) - } - } - for { - yyj3448++ - if yyhl3448 { - yyb3448 = yyj3448 > l - } else { - yyb3448 = r.CheckBreak() - } - if yyb3448 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3448-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r @@ -42962,16 +43226,17 @@ func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep3455 := !z.EncBinary() yy2arr3455 := z.EncBasicHandle().StructToArray - var yyq3455 [4]bool + var yyq3455 [5]bool _, _, _ = yysep3455, yyq3455, yy2arr3455 const yyr3455 bool = false yyq3455[0] = x.Kind != "" yyq3455[1] = x.APIVersion != "" yyq3455[2] = true - yyq3455[3] = len(x.Items) != 0 + yyq3455[3] = len(x.Data) != 0 + yyq3455[4] = x.Type != "" var yynn3455 int if yyr3455 || yy2arr3455 { - r.EncodeArrayStart(4) + r.EncodeArrayStart(5) } else { yynn3455 = 0 for _, b := range yyq3455 { @@ -43035,14 +43300,8 @@ func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) { if yyr3455 || yy2arr3455 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq3455[2] { - yy3463 := &x.ListMeta - yym3464 := z.EncBinary() - _ = yym3464 - if false { - } else if z.HasExtensions() && z.EncExt(yy3463) { - } else { - z.EncFallback(yy3463) - } + yy3463 := &x.ObjectMeta + yy3463.CodecEncodeSelf(e) } else { r.EncodeNil() } @@ -43051,27 +43310,21 @@ func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3465 := &x.ListMeta - yym3466 := z.EncBinary() - _ = yym3466 - if false { - } else if z.HasExtensions() && z.EncExt(yy3465) { - } else { - z.EncFallback(yy3465) - } + yy3464 := &x.ObjectMeta + yy3464.CodecEncodeSelf(e) } } if yyr3455 || yy2arr3455 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq3455[3] { - if x.Items == nil { + if x.Data == nil { r.EncodeNil() } else { - yym3468 := z.EncBinary() - _ = yym3468 + yym3466 := z.EncBinary() + _ = yym3466 if false { } else { - h.encSliceConfigMap(([]ConfigMap)(x.Items), e) + h.encMapstringSliceuint8((map[string][]uint8)(x.Data), e) } } } else { @@ -43080,20 +43333,35 @@ func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) { } else { if yyq3455[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) + r.EncodeString(codecSelferC_UTF81234, string("data")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { + if x.Data == nil { r.EncodeNil() } else { - yym3469 := z.EncBinary() - _ = yym3469 + yym3467 := z.EncBinary() + _ = yym3467 if false { } else { - h.encSliceConfigMap(([]ConfigMap)(x.Items), e) + h.encMapstringSliceuint8((map[string][]uint8)(x.Data), e) } } } } + if yyr3455 || yy2arr3455 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3455[4] { + x.Type.CodecEncodeSelf(e) + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3455[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("type")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Type.CodecEncodeSelf(e) + } + } if yyr3455 || yy2arr3455 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { @@ -43103,29 +43371,29 @@ func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) { } } -func (x *ConfigMapList) CodecDecodeSelf(d *codec1978.Decoder) { +func (x *Secret) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3470 := z.DecBinary() - _ = yym3470 + yym3469 := z.DecBinary() + _ = yym3469 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3471 := r.ContainerType() - if yyct3471 == codecSelferValueTypeMap1234 { - yyl3471 := r.ReadMapStart() - if yyl3471 == 0 { + yyct3470 := r.ContainerType() + if yyct3470 == codecSelferValueTypeMap1234 { + yyl3470 := r.ReadMapStart() + if yyl3470 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3471, d) + x.codecDecodeSelfFromMap(yyl3470, d) } - } else if yyct3471 == codecSelferValueTypeArray1234 { - yyl3471 := r.ReadArrayStart() - if yyl3471 == 0 { + } else if yyct3470 == codecSelferValueTypeArray1234 { + yyl3470 := r.ReadArrayStart() + if yyl3470 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3471, d) + x.codecDecodeSelfFromArray(yyl3470, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -43133,16 +43401,16 @@ func (x *ConfigMapList) CodecDecodeSelf(d *codec1978.Decoder) { } } -func (x *ConfigMapList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { +func (x *Secret) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3472Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3472Slc - var yyhl3472 bool = l >= 0 - for yyj3472 := 0; ; yyj3472++ { - if yyhl3472 { - if yyj3472 >= l { + var yys3471Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3471Slc + var yyhl3471 bool = l >= 0 + for yyj3471 := 0; ; yyj3471++ { + if yyhl3471 { + if yyj3471 >= l { break } } else { @@ -43151,654 +43419,10 @@ func (x *ConfigMapList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3472Slc = r.DecodeBytes(yys3472Slc, true, true) - yys3472 := string(yys3472Slc) + yys3471Slc = r.DecodeBytes(yys3471Slc, true, true) + yys3471 := string(yys3471Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3472 { - 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()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} - } else { - yyv3475 := &x.ListMeta - yym3476 := z.DecBinary() - _ = yym3476 - if false { - } else if z.HasExtensions() && z.DecExt(yyv3475) { - } else { - z.DecFallback(yyv3475, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv3477 := &x.Items - yym3478 := z.DecBinary() - _ = yym3478 - if false { - } else { - h.decSliceConfigMap((*[]ConfigMap)(yyv3477), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3472) - } // end switch yys3472 - } // end for yyj3472 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ConfigMapList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj3479 int - var yyb3479 bool - var yyhl3479 bool = l >= 0 - yyj3479++ - if yyhl3479 { - yyb3479 = yyj3479 > l - } else { - yyb3479 = r.CheckBreak() - } - if yyb3479 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj3479++ - if yyhl3479 { - yyb3479 = yyj3479 > l - } else { - yyb3479 = r.CheckBreak() - } - if yyb3479 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj3479++ - if yyhl3479 { - yyb3479 = yyj3479 > l - } else { - yyb3479 = r.CheckBreak() - } - if yyb3479 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} - } else { - yyv3482 := &x.ListMeta - yym3483 := z.DecBinary() - _ = yym3483 - if false { - } else if z.HasExtensions() && z.DecExt(yyv3482) { - } else { - z.DecFallback(yyv3482, false) - } - } - yyj3479++ - if yyhl3479 { - yyb3479 = yyj3479 > l - } else { - yyb3479 = r.CheckBreak() - } - if yyb3479 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv3484 := &x.Items - yym3485 := z.DecBinary() - _ = yym3485 - if false { - } else { - h.decSliceConfigMap((*[]ConfigMap)(yyv3484), d) - } - } - for { - yyj3479++ - if yyhl3479 { - yyb3479 = yyj3479 > l - } else { - yyb3479 = r.CheckBreak() - } - if yyb3479 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3479-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x ComponentConditionType) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym3486 := z.EncBinary() - _ = yym3486 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *ComponentConditionType) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym3487 := z.DecBinary() - _ = yym3487 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - -func (x *ComponentCondition) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym3488 := z.EncBinary() - _ = yym3488 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep3489 := !z.EncBinary() - yy2arr3489 := z.EncBasicHandle().StructToArray - var yyq3489 [4]bool - _, _, _ = yysep3489, yyq3489, yy2arr3489 - const yyr3489 bool = false - yyq3489[2] = x.Message != "" - yyq3489[3] = x.Error != "" - var yynn3489 int - if yyr3489 || yy2arr3489 { - r.EncodeArrayStart(4) - } else { - yynn3489 = 2 - for _, b := range yyq3489 { - if b { - yynn3489++ - } - } - r.EncodeMapStart(yynn3489) - yynn3489 = 0 - } - if yyr3489 || yy2arr3489 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - x.Type.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("type")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - x.Type.CodecEncodeSelf(e) - } - if yyr3489 || yy2arr3489 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - x.Status.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - x.Status.CodecEncodeSelf(e) - } - if yyr3489 || yy2arr3489 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3489[2] { - yym3493 := z.EncBinary() - _ = yym3493 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Message)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3489[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("message")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3494 := z.EncBinary() - _ = yym3494 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Message)) - } - } - } - if yyr3489 || yy2arr3489 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3489[3] { - yym3496 := z.EncBinary() - _ = yym3496 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Error)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3489[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("error")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3497 := z.EncBinary() - _ = yym3497 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Error)) - } - } - } - if yyr3489 || yy2arr3489 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ComponentCondition) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym3498 := z.DecBinary() - _ = yym3498 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct3499 := r.ContainerType() - if yyct3499 == codecSelferValueTypeMap1234 { - yyl3499 := r.ReadMapStart() - if yyl3499 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl3499, d) - } - } else if yyct3499 == codecSelferValueTypeArray1234 { - yyl3499 := r.ReadArrayStart() - if yyl3499 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl3499, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ComponentCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys3500Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3500Slc - var yyhl3500 bool = l >= 0 - for yyj3500 := 0; ; yyj3500++ { - if yyhl3500 { - if yyj3500 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3500Slc = r.DecodeBytes(yys3500Slc, true, true) - yys3500 := string(yys3500Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3500 { - case "type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = ComponentConditionType(r.DecodeString()) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = ConditionStatus(r.DecodeString()) - } - case "message": - if r.TryDecodeAsNil() { - x.Message = "" - } else { - x.Message = string(r.DecodeString()) - } - case "error": - if r.TryDecodeAsNil() { - x.Error = "" - } else { - x.Error = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3500) - } // end switch yys3500 - } // end for yyj3500 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ComponentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj3505 int - var yyb3505 bool - var yyhl3505 bool = l >= 0 - yyj3505++ - if yyhl3505 { - yyb3505 = yyj3505 > l - } else { - yyb3505 = r.CheckBreak() - } - if yyb3505 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = ComponentConditionType(r.DecodeString()) - } - yyj3505++ - if yyhl3505 { - yyb3505 = yyj3505 > l - } else { - yyb3505 = r.CheckBreak() - } - if yyb3505 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = ConditionStatus(r.DecodeString()) - } - yyj3505++ - if yyhl3505 { - yyb3505 = yyj3505 > l - } else { - yyb3505 = r.CheckBreak() - } - if yyb3505 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Message = "" - } else { - x.Message = string(r.DecodeString()) - } - yyj3505++ - if yyhl3505 { - yyb3505 = yyj3505 > l - } else { - yyb3505 = r.CheckBreak() - } - if yyb3505 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Error = "" - } else { - x.Error = string(r.DecodeString()) - } - for { - yyj3505++ - if yyhl3505 { - yyb3505 = yyj3505 > l - } else { - yyb3505 = r.CheckBreak() - } - if yyb3505 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3505-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym3510 := z.EncBinary() - _ = yym3510 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep3511 := !z.EncBinary() - yy2arr3511 := z.EncBasicHandle().StructToArray - var yyq3511 [4]bool - _, _, _ = yysep3511, yyq3511, yy2arr3511 - const yyr3511 bool = false - yyq3511[0] = x.Kind != "" - yyq3511[1] = x.APIVersion != "" - yyq3511[2] = true - yyq3511[3] = len(x.Conditions) != 0 - var yynn3511 int - if yyr3511 || yy2arr3511 { - r.EncodeArrayStart(4) - } else { - yynn3511 = 0 - for _, b := range yyq3511 { - if b { - yynn3511++ - } - } - r.EncodeMapStart(yynn3511) - yynn3511 = 0 - } - if yyr3511 || yy2arr3511 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3511[0] { - yym3513 := z.EncBinary() - _ = yym3513 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3511[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3514 := z.EncBinary() - _ = yym3514 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr3511 || yy2arr3511 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3511[1] { - yym3516 := z.EncBinary() - _ = yym3516 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3511[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3517 := z.EncBinary() - _ = yym3517 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr3511 || yy2arr3511 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3511[2] { - yy3519 := &x.ObjectMeta - yy3519.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq3511[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3520 := &x.ObjectMeta - yy3520.CodecEncodeSelf(e) - } - } - if yyr3511 || yy2arr3511 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3511[3] { - if x.Conditions == nil { - r.EncodeNil() - } else { - yym3522 := z.EncBinary() - _ = yym3522 - if false { - } else { - h.encSliceComponentCondition(([]ComponentCondition)(x.Conditions), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq3511[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("conditions")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Conditions == nil { - r.EncodeNil() - } else { - yym3523 := z.EncBinary() - _ = yym3523 - if false { - } else { - h.encSliceComponentCondition(([]ComponentCondition)(x.Conditions), e) - } - } - } - } - if yyr3511 || yy2arr3511 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ComponentStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym3524 := z.DecBinary() - _ = yym3524 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct3525 := r.ContainerType() - if yyct3525 == codecSelferValueTypeMap1234 { - yyl3525 := r.ReadMapStart() - if yyl3525 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl3525, d) - } - } else if yyct3525 == codecSelferValueTypeArray1234 { - yyl3525 := r.ReadArrayStart() - if yyl3525 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl3525, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ComponentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys3526Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3526Slc - var yyhl3526 bool = l >= 0 - for yyj3526 := 0; ; yyj3526++ { - if yyhl3526 { - if yyj3526 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3526Slc = r.DecodeBytes(yys3526Slc, true, true) - yys3526 := string(yys3526Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3526 { + switch yys3471 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -43815,42 +43439,48 @@ func (x *ComponentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3529 := &x.ObjectMeta - yyv3529.CodecDecodeSelf(d) + yyv3474 := &x.ObjectMeta + yyv3474.CodecDecodeSelf(d) } - case "conditions": + case "data": if r.TryDecodeAsNil() { - x.Conditions = nil + x.Data = nil } else { - yyv3530 := &x.Conditions - yym3531 := z.DecBinary() - _ = yym3531 + yyv3475 := &x.Data + yym3476 := z.DecBinary() + _ = yym3476 if false { } else { - h.decSliceComponentCondition((*[]ComponentCondition)(yyv3530), d) + h.decMapstringSliceuint8((*map[string][]uint8)(yyv3475), d) } } + case "type": + if r.TryDecodeAsNil() { + x.Type = "" + } else { + x.Type = SecretType(r.DecodeString()) + } default: - z.DecStructFieldNotFound(-1, yys3526) - } // end switch yys3526 - } // end for yyj3526 + z.DecStructFieldNotFound(-1, yys3471) + } // end switch yys3471 + } // end for yyj3471 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } -func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { +func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3532 int - var yyb3532 bool - var yyhl3532 bool = l >= 0 - yyj3532++ - if yyhl3532 { - yyb3532 = yyj3532 > l + var yyj3478 int + var yyb3478 bool + var yyhl3478 bool = l >= 0 + yyj3478++ + if yyhl3478 { + yyb3478 = yyj3478 > l } else { - yyb3532 = r.CheckBreak() + yyb3478 = r.CheckBreak() } - if yyb3532 { + if yyb3478 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43860,13 +43490,13 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Kind = string(r.DecodeString()) } - yyj3532++ - if yyhl3532 { - yyb3532 = yyj3532 > l + yyj3478++ + if yyhl3478 { + yyb3478 = yyj3478 > l } else { - yyb3532 = r.CheckBreak() + yyb3478 = r.CheckBreak() } - if yyb3532 { + if yyb3478 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43876,13 +43506,13 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.APIVersion = string(r.DecodeString()) } - yyj3532++ - if yyhl3532 { - yyb3532 = yyj3532 > l + yyj3478++ + if yyhl3478 { + yyb3478 = yyj3478 > l } else { - yyb3532 = r.CheckBreak() + yyb3478 = r.CheckBreak() } - if yyb3532 { + if yyb3478 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43890,85 +43520,127 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3535 := &x.ObjectMeta - yyv3535.CodecDecodeSelf(d) + yyv3481 := &x.ObjectMeta + yyv3481.CodecDecodeSelf(d) } - yyj3532++ - if yyhl3532 { - yyb3532 = yyj3532 > l + yyj3478++ + if yyhl3478 { + yyb3478 = yyj3478 > l } else { - yyb3532 = r.CheckBreak() + yyb3478 = r.CheckBreak() } - if yyb3532 { + if yyb3478 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Conditions = nil + x.Data = nil } else { - yyv3536 := &x.Conditions - yym3537 := z.DecBinary() - _ = yym3537 + yyv3482 := &x.Data + yym3483 := z.DecBinary() + _ = yym3483 if false { } else { - h.decSliceComponentCondition((*[]ComponentCondition)(yyv3536), d) + h.decMapstringSliceuint8((*map[string][]uint8)(yyv3482), d) } } + yyj3478++ + if yyhl3478 { + yyb3478 = yyj3478 > l + } else { + yyb3478 = r.CheckBreak() + } + if yyb3478 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Type = "" + } else { + x.Type = SecretType(r.DecodeString()) + } for { - yyj3532++ - if yyhl3532 { - yyb3532 = yyj3532 > l + yyj3478++ + if yyhl3478 { + yyb3478 = yyj3478 > l } else { - yyb3532 = r.CheckBreak() + yyb3478 = r.CheckBreak() } - if yyb3532 { + if yyb3478 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3532-1, "") + z.DecStructFieldNotFound(yyj3478-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x *ComponentStatusList) CodecEncodeSelf(e *codec1978.Encoder) { +func (x SecretType) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym3485 := z.EncBinary() + _ = yym3485 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *SecretType) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym3486 := z.DecBinary() + _ = yym3486 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *SecretList) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r if x == nil { r.EncodeNil() } else { - yym3538 := z.EncBinary() - _ = yym3538 + yym3487 := z.EncBinary() + _ = yym3487 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3539 := !z.EncBinary() - yy2arr3539 := z.EncBasicHandle().StructToArray - var yyq3539 [4]bool - _, _, _ = yysep3539, yyq3539, yy2arr3539 - const yyr3539 bool = false - yyq3539[0] = x.Kind != "" - yyq3539[1] = x.APIVersion != "" - yyq3539[2] = true - var yynn3539 int - if yyr3539 || yy2arr3539 { + yysep3488 := !z.EncBinary() + yy2arr3488 := z.EncBasicHandle().StructToArray + var yyq3488 [4]bool + _, _, _ = yysep3488, yyq3488, yy2arr3488 + const yyr3488 bool = false + yyq3488[0] = x.Kind != "" + yyq3488[1] = x.APIVersion != "" + yyq3488[2] = true + var yynn3488 int + if yyr3488 || yy2arr3488 { r.EncodeArrayStart(4) } else { - yynn3539 = 1 - for _, b := range yyq3539 { + yynn3488 = 1 + for _, b := range yyq3488 { if b { - yynn3539++ + yynn3488++ } } - r.EncodeMapStart(yynn3539) - yynn3539 = 0 + r.EncodeMapStart(yynn3488) + yynn3488 = 0 } - if yyr3539 || yy2arr3539 { + if yyr3488 || yy2arr3488 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3539[0] { - yym3541 := z.EncBinary() - _ = yym3541 + if yyq3488[0] { + yym3490 := z.EncBinary() + _ = yym3490 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -43977,23 +43649,23 @@ func (x *ComponentStatusList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3539[0] { + if yyq3488[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3542 := z.EncBinary() - _ = yym3542 + yym3491 := z.EncBinary() + _ = yym3491 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3539 || yy2arr3539 { + if yyr3488 || yy2arr3488 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3539[1] { - yym3544 := z.EncBinary() - _ = yym3544 + if yyq3488[1] { + yym3493 := z.EncBinary() + _ = yym3493 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -44002,57 +43674,57 @@ func (x *ComponentStatusList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3539[1] { + if yyq3488[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3545 := z.EncBinary() - _ = yym3545 + yym3494 := z.EncBinary() + _ = yym3494 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3539 || yy2arr3539 { + if yyr3488 || yy2arr3488 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3539[2] { - yy3547 := &x.ListMeta - yym3548 := z.EncBinary() - _ = yym3548 + if yyq3488[2] { + yy3496 := &x.ListMeta + yym3497 := z.EncBinary() + _ = yym3497 if false { - } else if z.HasExtensions() && z.EncExt(yy3547) { + } else if z.HasExtensions() && z.EncExt(yy3496) { } else { - z.EncFallback(yy3547) + z.EncFallback(yy3496) } } else { r.EncodeNil() } } else { - if yyq3539[2] { + if yyq3488[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3549 := &x.ListMeta - yym3550 := z.EncBinary() - _ = yym3550 + yy3498 := &x.ListMeta + yym3499 := z.EncBinary() + _ = yym3499 if false { - } else if z.HasExtensions() && z.EncExt(yy3549) { + } else if z.HasExtensions() && z.EncExt(yy3498) { } else { - z.EncFallback(yy3549) + z.EncFallback(yy3498) } } } - if yyr3539 || yy2arr3539 { + if yyr3488 || yy2arr3488 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym3552 := z.EncBinary() - _ = yym3552 + yym3501 := z.EncBinary() + _ = yym3501 if false { } else { - h.encSliceComponentStatus(([]ComponentStatus)(x.Items), e) + h.encSliceSecret(([]Secret)(x.Items), e) } } } else { @@ -44062,15 +43734,15 @@ func (x *ComponentStatusList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym3553 := z.EncBinary() - _ = yym3553 + yym3502 := z.EncBinary() + _ = yym3502 if false { } else { - h.encSliceComponentStatus(([]ComponentStatus)(x.Items), e) + h.encSliceSecret(([]Secret)(x.Items), e) } } } - if yyr3539 || yy2arr3539 { + if yyr3488 || yy2arr3488 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -44079,29 +43751,29 @@ func (x *ComponentStatusList) CodecEncodeSelf(e *codec1978.Encoder) { } } -func (x *ComponentStatusList) CodecDecodeSelf(d *codec1978.Decoder) { +func (x *SecretList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3554 := z.DecBinary() - _ = yym3554 + yym3503 := z.DecBinary() + _ = yym3503 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3555 := r.ContainerType() - if yyct3555 == codecSelferValueTypeMap1234 { - yyl3555 := r.ReadMapStart() - if yyl3555 == 0 { + yyct3504 := r.ContainerType() + if yyct3504 == codecSelferValueTypeMap1234 { + yyl3504 := r.ReadMapStart() + if yyl3504 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3555, d) + x.codecDecodeSelfFromMap(yyl3504, d) } - } else if yyct3555 == codecSelferValueTypeArray1234 { - yyl3555 := r.ReadArrayStart() - if yyl3555 == 0 { + } else if yyct3504 == codecSelferValueTypeArray1234 { + yyl3504 := r.ReadArrayStart() + if yyl3504 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3555, d) + x.codecDecodeSelfFromArray(yyl3504, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -44109,16 +43781,16 @@ func (x *ComponentStatusList) CodecDecodeSelf(d *codec1978.Decoder) { } } -func (x *ComponentStatusList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { +func (x *SecretList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3556Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3556Slc - var yyhl3556 bool = l >= 0 - for yyj3556 := 0; ; yyj3556++ { - if yyhl3556 { - if yyj3556 >= l { + var yys3505Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3505Slc + var yyhl3505 bool = l >= 0 + for yyj3505 := 0; ; yyj3505++ { + if yyhl3505 { + if yyj3505 >= l { break } } else { @@ -44127,10 +43799,10 @@ func (x *ComponentStatusList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3556Slc = r.DecodeBytes(yys3556Slc, true, true) - yys3556 := string(yys3556Slc) + yys3505Slc = r.DecodeBytes(yys3505Slc, true, true) + yys3505 := string(yys3505Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3556 { + switch yys3505 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -44147,48 +43819,48 @@ func (x *ComponentStatusList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3559 := &x.ListMeta - yym3560 := z.DecBinary() - _ = yym3560 + yyv3508 := &x.ListMeta + yym3509 := z.DecBinary() + _ = yym3509 if false { - } else if z.HasExtensions() && z.DecExt(yyv3559) { + } else if z.HasExtensions() && z.DecExt(yyv3508) { } else { - z.DecFallback(yyv3559, false) + z.DecFallback(yyv3508, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3561 := &x.Items - yym3562 := z.DecBinary() - _ = yym3562 + yyv3510 := &x.Items + yym3511 := z.DecBinary() + _ = yym3511 if false { } else { - h.decSliceComponentStatus((*[]ComponentStatus)(yyv3561), d) + h.decSliceSecret((*[]Secret)(yyv3510), d) } } default: - z.DecStructFieldNotFound(-1, yys3556) - } // end switch yys3556 - } // end for yyj3556 + z.DecStructFieldNotFound(-1, yys3505) + } // end switch yys3505 + } // end for yyj3505 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } -func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { +func (x *SecretList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3563 int - var yyb3563 bool - var yyhl3563 bool = l >= 0 - yyj3563++ - if yyhl3563 { - yyb3563 = yyj3563 > l + var yyj3512 int + var yyb3512 bool + var yyhl3512 bool = l >= 0 + yyj3512++ + if yyhl3512 { + yyb3512 = yyj3512 > l } else { - yyb3563 = r.CheckBreak() + yyb3512 = r.CheckBreak() } - if yyb3563 { + if yyb3512 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44198,13 +43870,13 @@ func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decod } else { x.Kind = string(r.DecodeString()) } - yyj3563++ - if yyhl3563 { - yyb3563 = yyj3563 > l + yyj3512++ + if yyhl3512 { + yyb3512 = yyj3512 > l } else { - yyb3563 = r.CheckBreak() + yyb3512 = r.CheckBreak() } - if yyb3563 { + if yyb3512 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44214,13 +43886,13 @@ func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decod } else { x.APIVersion = string(r.DecodeString()) } - yyj3563++ - if yyhl3563 { - yyb3563 = yyj3563 > l + yyj3512++ + if yyhl3512 { + yyb3512 = yyj3512 > l } else { - yyb3563 = r.CheckBreak() + yyb3512 = r.CheckBreak() } - if yyb3563 { + if yyb3512 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44228,22 +43900,22 @@ func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3566 := &x.ListMeta - yym3567 := z.DecBinary() - _ = yym3567 + yyv3515 := &x.ListMeta + yym3516 := z.DecBinary() + _ = yym3516 if false { - } else if z.HasExtensions() && z.DecExt(yyv3566) { + } else if z.HasExtensions() && z.DecExt(yyv3515) { } else { - z.DecFallback(yyv3566, false) + z.DecFallback(yyv3515, false) } } - yyj3563++ - if yyhl3563 { - yyb3563 = yyj3563 > l + yyj3512++ + if yyhl3512 { + yyb3512 = yyj3512 > l } else { - yyb3563 = r.CheckBreak() + yyb3512 = r.CheckBreak() } - if yyb3563 { + if yyb3512 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44251,95 +43923,165 @@ func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3568 := &x.Items - yym3569 := z.DecBinary() - _ = yym3569 + yyv3517 := &x.Items + yym3518 := z.DecBinary() + _ = yym3518 if false { } else { - h.decSliceComponentStatus((*[]ComponentStatus)(yyv3568), d) + h.decSliceSecret((*[]Secret)(yyv3517), d) } } for { - yyj3563++ - if yyhl3563 { - yyb3563 = yyj3563 > l + yyj3512++ + if yyhl3512 { + yyb3512 = yyj3512 > l } else { - yyb3563 = r.CheckBreak() + yyb3512 = r.CheckBreak() } - if yyb3563 { + if yyb3512 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3563-1, "") + z.DecStructFieldNotFound(yyj3512-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x *DownwardAPIVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { +func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r if x == nil { r.EncodeNil() } else { - yym3570 := z.EncBinary() - _ = yym3570 + yym3519 := z.EncBinary() + _ = yym3519 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3571 := !z.EncBinary() - yy2arr3571 := z.EncBasicHandle().StructToArray - var yyq3571 [1]bool - _, _, _ = yysep3571, yyq3571, yy2arr3571 - const yyr3571 bool = false - yyq3571[0] = len(x.Items) != 0 - var yynn3571 int - if yyr3571 || yy2arr3571 { - r.EncodeArrayStart(1) + yysep3520 := !z.EncBinary() + yy2arr3520 := z.EncBasicHandle().StructToArray + var yyq3520 [4]bool + _, _, _ = yysep3520, yyq3520, yy2arr3520 + const yyr3520 bool = false + yyq3520[0] = x.Kind != "" + yyq3520[1] = x.APIVersion != "" + yyq3520[2] = true + yyq3520[3] = len(x.Data) != 0 + var yynn3520 int + if yyr3520 || yy2arr3520 { + r.EncodeArrayStart(4) } else { - yynn3571 = 0 - for _, b := range yyq3571 { + yynn3520 = 0 + for _, b := range yyq3520 { if b { - yynn3571++ + yynn3520++ } } - r.EncodeMapStart(yynn3571) - yynn3571 = 0 + r.EncodeMapStart(yynn3520) + yynn3520 = 0 } - if yyr3571 || yy2arr3571 { + if yyr3520 || yy2arr3520 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3571[0] { - if x.Items == nil { + if yyq3520[0] { + yym3522 := z.EncBinary() + _ = yym3522 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3520[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3523 := z.EncBinary() + _ = yym3523 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr3520 || yy2arr3520 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3520[1] { + yym3525 := z.EncBinary() + _ = yym3525 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3520[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3526 := z.EncBinary() + _ = yym3526 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr3520 || yy2arr3520 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3520[2] { + yy3528 := &x.ObjectMeta + yy3528.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq3520[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy3529 := &x.ObjectMeta + yy3529.CodecEncodeSelf(e) + } + } + if yyr3520 || yy2arr3520 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3520[3] { + if x.Data == nil { r.EncodeNil() } else { - yym3573 := z.EncBinary() - _ = yym3573 + yym3531 := z.EncBinary() + _ = yym3531 if false { } else { - h.encSliceDownwardAPIVolumeFile(([]DownwardAPIVolumeFile)(x.Items), e) + z.F.EncMapStringStringV(x.Data, false, e) } } } else { r.EncodeNil() } } else { - if yyq3571[0] { + if yyq3520[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) + r.EncodeString(codecSelferC_UTF81234, string("data")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { + if x.Data == nil { r.EncodeNil() } else { - yym3574 := z.EncBinary() - _ = yym3574 + yym3532 := z.EncBinary() + _ = yym3532 if false { } else { - h.encSliceDownwardAPIVolumeFile(([]DownwardAPIVolumeFile)(x.Items), e) + z.F.EncMapStringStringV(x.Data, false, e) } } } } - if yyr3571 || yy2arr3571 { + if yyr3520 || yy2arr3520 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -44348,29 +44090,29 @@ func (x *DownwardAPIVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } -func (x *DownwardAPIVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { +func (x *ConfigMap) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3575 := z.DecBinary() - _ = yym3575 + yym3533 := z.DecBinary() + _ = yym3533 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3576 := r.ContainerType() - if yyct3576 == codecSelferValueTypeMap1234 { - yyl3576 := r.ReadMapStart() - if yyl3576 == 0 { + yyct3534 := r.ContainerType() + if yyct3534 == codecSelferValueTypeMap1234 { + yyl3534 := r.ReadMapStart() + if yyl3534 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3576, d) + x.codecDecodeSelfFromMap(yyl3534, d) } - } else if yyct3576 == codecSelferValueTypeArray1234 { - yyl3576 := r.ReadArrayStart() - if yyl3576 == 0 { + } else if yyct3534 == codecSelferValueTypeArray1234 { + yyl3534 := r.ReadArrayStart() + if yyl3534 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3576, d) + x.codecDecodeSelfFromArray(yyl3534, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -44378,16 +44120,16 @@ func (x *DownwardAPIVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { } } -func (x *DownwardAPIVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { +func (x *ConfigMap) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3577Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3577Slc - var yyhl3577 bool = l >= 0 - for yyj3577 := 0; ; yyj3577++ { - if yyhl3577 { - if yyj3577 >= l { + var yys3535Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3535Slc + var yyhl3535 bool = l >= 0 + for yyj3535 := 0; ; yyj3535++ { + if yyhl3535 { + if yyj3535 >= l { break } } else { @@ -44396,135 +44138,289 @@ func (x *DownwardAPIVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Dec } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3577Slc = r.DecodeBytes(yys3577Slc, true, true) - yys3577 := string(yys3577Slc) + yys3535Slc = r.DecodeBytes(yys3535Slc, true, true) + yys3535 := string(yys3535Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3577 { - case "items": + switch yys3535 { + case "kind": if r.TryDecodeAsNil() { - x.Items = nil + x.Kind = "" } else { - yyv3578 := &x.Items - yym3579 := z.DecBinary() - _ = yym3579 + x.Kind = string(r.DecodeString()) + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = ObjectMeta{} + } else { + yyv3538 := &x.ObjectMeta + yyv3538.CodecDecodeSelf(d) + } + case "data": + if r.TryDecodeAsNil() { + x.Data = nil + } else { + yyv3539 := &x.Data + yym3540 := z.DecBinary() + _ = yym3540 if false { } else { - h.decSliceDownwardAPIVolumeFile((*[]DownwardAPIVolumeFile)(yyv3578), d) + z.F.DecMapStringStringX(yyv3539, false, d) } } default: - z.DecStructFieldNotFound(-1, yys3577) - } // end switch yys3577 - } // end for yyj3577 + z.DecStructFieldNotFound(-1, yys3535) + } // end switch yys3535 + } // end for yyj3535 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } -func (x *DownwardAPIVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { +func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3580 int - var yyb3580 bool - var yyhl3580 bool = l >= 0 - yyj3580++ - if yyhl3580 { - yyb3580 = yyj3580 > l + var yyj3541 int + var yyb3541 bool + var yyhl3541 bool = l >= 0 + yyj3541++ + if yyhl3541 { + yyb3541 = yyj3541 > l } else { - yyb3580 = r.CheckBreak() + yyb3541 = r.CheckBreak() } - if yyb3580 { + if yyb3541 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Items = nil + x.Kind = "" } else { - yyv3581 := &x.Items - yym3582 := z.DecBinary() - _ = yym3582 + x.Kind = string(r.DecodeString()) + } + yyj3541++ + if yyhl3541 { + yyb3541 = yyj3541 > l + } else { + yyb3541 = r.CheckBreak() + } + if yyb3541 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + yyj3541++ + if yyhl3541 { + yyb3541 = yyj3541 > l + } else { + yyb3541 = r.CheckBreak() + } + if yyb3541 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = ObjectMeta{} + } else { + yyv3544 := &x.ObjectMeta + yyv3544.CodecDecodeSelf(d) + } + yyj3541++ + if yyhl3541 { + yyb3541 = yyj3541 > l + } else { + yyb3541 = r.CheckBreak() + } + if yyb3541 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Data = nil + } else { + yyv3545 := &x.Data + yym3546 := z.DecBinary() + _ = yym3546 if false { } else { - h.decSliceDownwardAPIVolumeFile((*[]DownwardAPIVolumeFile)(yyv3581), d) + z.F.DecMapStringStringX(yyv3545, false, d) } } for { - yyj3580++ - if yyhl3580 { - yyb3580 = yyj3580 > l + yyj3541++ + if yyhl3541 { + yyb3541 = yyj3541 > l } else { - yyb3580 = r.CheckBreak() + yyb3541 = r.CheckBreak() } - if yyb3580 { + if yyb3541 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3580-1, "") + z.DecStructFieldNotFound(yyj3541-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x *DownwardAPIVolumeFile) CodecEncodeSelf(e *codec1978.Encoder) { +func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r if x == nil { r.EncodeNil() } else { - yym3583 := z.EncBinary() - _ = yym3583 + yym3547 := z.EncBinary() + _ = yym3547 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3584 := !z.EncBinary() - yy2arr3584 := z.EncBasicHandle().StructToArray - var yyq3584 [2]bool - _, _, _ = yysep3584, yyq3584, yy2arr3584 - const yyr3584 bool = false - var yynn3584 int - if yyr3584 || yy2arr3584 { - r.EncodeArrayStart(2) + yysep3548 := !z.EncBinary() + yy2arr3548 := z.EncBasicHandle().StructToArray + var yyq3548 [4]bool + _, _, _ = yysep3548, yyq3548, yy2arr3548 + const yyr3548 bool = false + yyq3548[0] = x.Kind != "" + yyq3548[1] = x.APIVersion != "" + yyq3548[2] = true + yyq3548[3] = len(x.Items) != 0 + var yynn3548 int + if yyr3548 || yy2arr3548 { + r.EncodeArrayStart(4) } else { - yynn3584 = 2 - for _, b := range yyq3584 { + yynn3548 = 0 + for _, b := range yyq3548 { if b { - yynn3584++ + yynn3548++ } } - r.EncodeMapStart(yynn3584) - yynn3584 = 0 + r.EncodeMapStart(yynn3548) + yynn3548 = 0 } - if yyr3584 || yy2arr3584 { + if yyr3548 || yy2arr3548 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3586 := z.EncBinary() - _ = yym3586 - if false { + if yyq3548[0] { + yym3550 := z.EncBinary() + _ = yym3550 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Path)) + r.EncodeString(codecSelferC_UTF81234, "") } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("path")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3587 := z.EncBinary() - _ = yym3587 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Path)) + if yyq3548[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3551 := z.EncBinary() + _ = yym3551 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } } } - if yyr3584 || yy2arr3584 { + if yyr3548 || yy2arr3548 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3589 := &x.FieldRef - yy3589.CodecEncodeSelf(e) + if yyq3548[1] { + yym3553 := z.EncBinary() + _ = yym3553 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("fieldRef")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3590 := &x.FieldRef - yy3590.CodecEncodeSelf(e) + if yyq3548[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3554 := z.EncBinary() + _ = yym3554 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } } - if yyr3584 || yy2arr3584 { + if yyr3548 || yy2arr3548 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3548[2] { + yy3556 := &x.ListMeta + yym3557 := z.EncBinary() + _ = yym3557 + if false { + } else if z.HasExtensions() && z.EncExt(yy3556) { + } else { + z.EncFallback(yy3556) + } + } else { + r.EncodeNil() + } + } else { + if yyq3548[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy3558 := &x.ListMeta + yym3559 := z.EncBinary() + _ = yym3559 + if false { + } else if z.HasExtensions() && z.EncExt(yy3558) { + } else { + z.EncFallback(yy3558) + } + } + } + if yyr3548 || yy2arr3548 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3548[3] { + if x.Items == nil { + r.EncodeNil() + } else { + yym3561 := z.EncBinary() + _ = yym3561 + if false { + } else { + h.encSliceConfigMap(([]ConfigMap)(x.Items), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq3548[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym3562 := z.EncBinary() + _ = yym3562 + if false { + } else { + h.encSliceConfigMap(([]ConfigMap)(x.Items), e) + } + } + } + } + if yyr3548 || yy2arr3548 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -44533,7 +44429,338 @@ func (x *DownwardAPIVolumeFile) CodecEncodeSelf(e *codec1978.Encoder) { } } -func (x *DownwardAPIVolumeFile) CodecDecodeSelf(d *codec1978.Decoder) { +func (x *ConfigMapList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym3563 := z.DecBinary() + _ = yym3563 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct3564 := r.ContainerType() + if yyct3564 == codecSelferValueTypeMap1234 { + yyl3564 := r.ReadMapStart() + if yyl3564 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl3564, d) + } + } else if yyct3564 == codecSelferValueTypeArray1234 { + yyl3564 := r.ReadArrayStart() + if yyl3564 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl3564, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ConfigMapList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3565Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3565Slc + var yyhl3565 bool = l >= 0 + for yyj3565 := 0; ; yyj3565++ { + if yyhl3565 { + if yyj3565 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3565Slc = r.DecodeBytes(yys3565Slc, true, true) + yys3565 := string(yys3565Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3565 { + 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()) + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg2_unversioned.ListMeta{} + } else { + yyv3568 := &x.ListMeta + yym3569 := z.DecBinary() + _ = yym3569 + if false { + } else if z.HasExtensions() && z.DecExt(yyv3568) { + } else { + z.DecFallback(yyv3568, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv3570 := &x.Items + yym3571 := z.DecBinary() + _ = yym3571 + if false { + } else { + h.decSliceConfigMap((*[]ConfigMap)(yyv3570), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3565) + } // end switch yys3565 + } // end for yyj3565 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ConfigMapList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj3572 int + var yyb3572 bool + var yyhl3572 bool = l >= 0 + yyj3572++ + if yyhl3572 { + yyb3572 = yyj3572 > l + } else { + yyb3572 = r.CheckBreak() + } + if yyb3572 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj3572++ + if yyhl3572 { + yyb3572 = yyj3572 > l + } else { + yyb3572 = r.CheckBreak() + } + if yyb3572 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + yyj3572++ + if yyhl3572 { + yyb3572 = yyj3572 > l + } else { + yyb3572 = r.CheckBreak() + } + if yyb3572 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg2_unversioned.ListMeta{} + } else { + yyv3575 := &x.ListMeta + yym3576 := z.DecBinary() + _ = yym3576 + if false { + } else if z.HasExtensions() && z.DecExt(yyv3575) { + } else { + z.DecFallback(yyv3575, false) + } + } + yyj3572++ + if yyhl3572 { + yyb3572 = yyj3572 > l + } else { + yyb3572 = r.CheckBreak() + } + if yyb3572 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv3577 := &x.Items + yym3578 := z.DecBinary() + _ = yym3578 + if false { + } else { + h.decSliceConfigMap((*[]ConfigMap)(yyv3577), d) + } + } + for { + yyj3572++ + if yyhl3572 { + yyb3572 = yyj3572 > l + } else { + yyb3572 = r.CheckBreak() + } + if yyb3572 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj3572-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x ComponentConditionType) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym3579 := z.EncBinary() + _ = yym3579 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *ComponentConditionType) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym3580 := z.DecBinary() + _ = yym3580 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *ComponentCondition) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym3581 := z.EncBinary() + _ = yym3581 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep3582 := !z.EncBinary() + yy2arr3582 := z.EncBasicHandle().StructToArray + var yyq3582 [4]bool + _, _, _ = yysep3582, yyq3582, yy2arr3582 + const yyr3582 bool = false + yyq3582[2] = x.Message != "" + yyq3582[3] = x.Error != "" + var yynn3582 int + if yyr3582 || yy2arr3582 { + r.EncodeArrayStart(4) + } else { + yynn3582 = 2 + for _, b := range yyq3582 { + if b { + yynn3582++ + } + } + r.EncodeMapStart(yynn3582) + yynn3582 = 0 + } + if yyr3582 || yy2arr3582 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + x.Type.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("type")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Type.CodecEncodeSelf(e) + } + if yyr3582 || yy2arr3582 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + x.Status.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Status.CodecEncodeSelf(e) + } + if yyr3582 || yy2arr3582 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3582[2] { + yym3586 := z.EncBinary() + _ = yym3586 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Message)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3582[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("message")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3587 := z.EncBinary() + _ = yym3587 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Message)) + } + } + } + if yyr3582 || yy2arr3582 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3582[3] { + yym3589 := z.EncBinary() + _ = yym3589 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Error)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3582[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("error")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3590 := z.EncBinary() + _ = yym3590 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Error)) + } + } + } + if yyr3582 || yy2arr3582 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ComponentCondition) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r @@ -44563,7 +44790,7 @@ func (x *DownwardAPIVolumeFile) CodecDecodeSelf(d *codec1978.Decoder) { } } -func (x *DownwardAPIVolumeFile) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { +func (x *ComponentCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r @@ -44585,6 +44812,1105 @@ func (x *DownwardAPIVolumeFile) codecDecodeSelfFromMap(l int, d *codec1978.Decod yys3593 := string(yys3593Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) switch yys3593 { + case "type": + if r.TryDecodeAsNil() { + x.Type = "" + } else { + x.Type = ComponentConditionType(r.DecodeString()) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = "" + } else { + x.Status = ConditionStatus(r.DecodeString()) + } + case "message": + if r.TryDecodeAsNil() { + x.Message = "" + } else { + x.Message = string(r.DecodeString()) + } + case "error": + if r.TryDecodeAsNil() { + x.Error = "" + } else { + x.Error = string(r.DecodeString()) + } + default: + z.DecStructFieldNotFound(-1, yys3593) + } // end switch yys3593 + } // end for yyj3593 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ComponentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj3598 int + var yyb3598 bool + var yyhl3598 bool = l >= 0 + yyj3598++ + if yyhl3598 { + yyb3598 = yyj3598 > l + } else { + yyb3598 = r.CheckBreak() + } + if yyb3598 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Type = "" + } else { + x.Type = ComponentConditionType(r.DecodeString()) + } + yyj3598++ + if yyhl3598 { + yyb3598 = yyj3598 > l + } else { + yyb3598 = r.CheckBreak() + } + if yyb3598 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Status = "" + } else { + x.Status = ConditionStatus(r.DecodeString()) + } + yyj3598++ + if yyhl3598 { + yyb3598 = yyj3598 > l + } else { + yyb3598 = r.CheckBreak() + } + if yyb3598 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Message = "" + } else { + x.Message = string(r.DecodeString()) + } + yyj3598++ + if yyhl3598 { + yyb3598 = yyj3598 > l + } else { + yyb3598 = r.CheckBreak() + } + if yyb3598 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Error = "" + } else { + x.Error = string(r.DecodeString()) + } + for { + yyj3598++ + if yyhl3598 { + yyb3598 = yyj3598 > l + } else { + yyb3598 = r.CheckBreak() + } + if yyb3598 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj3598-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym3603 := z.EncBinary() + _ = yym3603 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep3604 := !z.EncBinary() + yy2arr3604 := z.EncBasicHandle().StructToArray + var yyq3604 [4]bool + _, _, _ = yysep3604, yyq3604, yy2arr3604 + const yyr3604 bool = false + yyq3604[0] = x.Kind != "" + yyq3604[1] = x.APIVersion != "" + yyq3604[2] = true + yyq3604[3] = len(x.Conditions) != 0 + var yynn3604 int + if yyr3604 || yy2arr3604 { + r.EncodeArrayStart(4) + } else { + yynn3604 = 0 + for _, b := range yyq3604 { + if b { + yynn3604++ + } + } + r.EncodeMapStart(yynn3604) + yynn3604 = 0 + } + if yyr3604 || yy2arr3604 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3604[0] { + yym3606 := z.EncBinary() + _ = yym3606 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3604[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3607 := z.EncBinary() + _ = yym3607 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr3604 || yy2arr3604 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3604[1] { + yym3609 := z.EncBinary() + _ = yym3609 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3604[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3610 := z.EncBinary() + _ = yym3610 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr3604 || yy2arr3604 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3604[2] { + yy3612 := &x.ObjectMeta + yy3612.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq3604[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy3613 := &x.ObjectMeta + yy3613.CodecEncodeSelf(e) + } + } + if yyr3604 || yy2arr3604 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3604[3] { + if x.Conditions == nil { + r.EncodeNil() + } else { + yym3615 := z.EncBinary() + _ = yym3615 + if false { + } else { + h.encSliceComponentCondition(([]ComponentCondition)(x.Conditions), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq3604[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("conditions")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Conditions == nil { + r.EncodeNil() + } else { + yym3616 := z.EncBinary() + _ = yym3616 + if false { + } else { + h.encSliceComponentCondition(([]ComponentCondition)(x.Conditions), e) + } + } + } + } + if yyr3604 || yy2arr3604 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ComponentStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym3617 := z.DecBinary() + _ = yym3617 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct3618 := r.ContainerType() + if yyct3618 == codecSelferValueTypeMap1234 { + yyl3618 := r.ReadMapStart() + if yyl3618 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl3618, d) + } + } else if yyct3618 == codecSelferValueTypeArray1234 { + yyl3618 := r.ReadArrayStart() + if yyl3618 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl3618, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ComponentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3619Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3619Slc + var yyhl3619 bool = l >= 0 + for yyj3619 := 0; ; yyj3619++ { + if yyhl3619 { + if yyj3619 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3619Slc = r.DecodeBytes(yys3619Slc, true, true) + yys3619 := string(yys3619Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3619 { + 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()) + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = ObjectMeta{} + } else { + yyv3622 := &x.ObjectMeta + yyv3622.CodecDecodeSelf(d) + } + case "conditions": + if r.TryDecodeAsNil() { + x.Conditions = nil + } else { + yyv3623 := &x.Conditions + yym3624 := z.DecBinary() + _ = yym3624 + if false { + } else { + h.decSliceComponentCondition((*[]ComponentCondition)(yyv3623), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3619) + } // end switch yys3619 + } // end for yyj3619 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj3625 int + var yyb3625 bool + var yyhl3625 bool = l >= 0 + yyj3625++ + if yyhl3625 { + yyb3625 = yyj3625 > l + } else { + yyb3625 = r.CheckBreak() + } + if yyb3625 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj3625++ + if yyhl3625 { + yyb3625 = yyj3625 > l + } else { + yyb3625 = r.CheckBreak() + } + if yyb3625 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + yyj3625++ + if yyhl3625 { + yyb3625 = yyj3625 > l + } else { + yyb3625 = r.CheckBreak() + } + if yyb3625 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = ObjectMeta{} + } else { + yyv3628 := &x.ObjectMeta + yyv3628.CodecDecodeSelf(d) + } + yyj3625++ + if yyhl3625 { + yyb3625 = yyj3625 > l + } else { + yyb3625 = r.CheckBreak() + } + if yyb3625 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Conditions = nil + } else { + yyv3629 := &x.Conditions + yym3630 := z.DecBinary() + _ = yym3630 + if false { + } else { + h.decSliceComponentCondition((*[]ComponentCondition)(yyv3629), d) + } + } + for { + yyj3625++ + if yyhl3625 { + yyb3625 = yyj3625 > l + } else { + yyb3625 = r.CheckBreak() + } + if yyb3625 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj3625-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ComponentStatusList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym3631 := z.EncBinary() + _ = yym3631 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep3632 := !z.EncBinary() + yy2arr3632 := z.EncBasicHandle().StructToArray + var yyq3632 [4]bool + _, _, _ = yysep3632, yyq3632, yy2arr3632 + const yyr3632 bool = false + yyq3632[0] = x.Kind != "" + yyq3632[1] = x.APIVersion != "" + yyq3632[2] = true + var yynn3632 int + if yyr3632 || yy2arr3632 { + r.EncodeArrayStart(4) + } else { + yynn3632 = 1 + for _, b := range yyq3632 { + if b { + yynn3632++ + } + } + r.EncodeMapStart(yynn3632) + yynn3632 = 0 + } + if yyr3632 || yy2arr3632 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3632[0] { + yym3634 := z.EncBinary() + _ = yym3634 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3632[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3635 := z.EncBinary() + _ = yym3635 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr3632 || yy2arr3632 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3632[1] { + yym3637 := z.EncBinary() + _ = yym3637 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq3632[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3638 := z.EncBinary() + _ = yym3638 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr3632 || yy2arr3632 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3632[2] { + yy3640 := &x.ListMeta + yym3641 := z.EncBinary() + _ = yym3641 + if false { + } else if z.HasExtensions() && z.EncExt(yy3640) { + } else { + z.EncFallback(yy3640) + } + } else { + r.EncodeNil() + } + } else { + if yyq3632[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy3642 := &x.ListMeta + yym3643 := z.EncBinary() + _ = yym3643 + if false { + } else if z.HasExtensions() && z.EncExt(yy3642) { + } else { + z.EncFallback(yy3642) + } + } + } + if yyr3632 || yy2arr3632 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym3645 := z.EncBinary() + _ = yym3645 + if false { + } else { + h.encSliceComponentStatus(([]ComponentStatus)(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 { + yym3646 := z.EncBinary() + _ = yym3646 + if false { + } else { + h.encSliceComponentStatus(([]ComponentStatus)(x.Items), e) + } + } + } + if yyr3632 || yy2arr3632 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ComponentStatusList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym3647 := z.DecBinary() + _ = yym3647 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct3648 := r.ContainerType() + if yyct3648 == codecSelferValueTypeMap1234 { + yyl3648 := r.ReadMapStart() + if yyl3648 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl3648, d) + } + } else if yyct3648 == codecSelferValueTypeArray1234 { + yyl3648 := r.ReadArrayStart() + if yyl3648 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl3648, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ComponentStatusList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3649Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3649Slc + var yyhl3649 bool = l >= 0 + for yyj3649 := 0; ; yyj3649++ { + if yyhl3649 { + if yyj3649 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3649Slc = r.DecodeBytes(yys3649Slc, true, true) + yys3649 := string(yys3649Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3649 { + 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()) + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg2_unversioned.ListMeta{} + } else { + yyv3652 := &x.ListMeta + yym3653 := z.DecBinary() + _ = yym3653 + if false { + } else if z.HasExtensions() && z.DecExt(yyv3652) { + } else { + z.DecFallback(yyv3652, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv3654 := &x.Items + yym3655 := z.DecBinary() + _ = yym3655 + if false { + } else { + h.decSliceComponentStatus((*[]ComponentStatus)(yyv3654), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3649) + } // end switch yys3649 + } // end for yyj3649 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj3656 int + var yyb3656 bool + var yyhl3656 bool = l >= 0 + yyj3656++ + if yyhl3656 { + yyb3656 = yyj3656 > l + } else { + yyb3656 = r.CheckBreak() + } + if yyb3656 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj3656++ + if yyhl3656 { + yyb3656 = yyj3656 > l + } else { + yyb3656 = r.CheckBreak() + } + if yyb3656 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + yyj3656++ + if yyhl3656 { + yyb3656 = yyj3656 > l + } else { + yyb3656 = r.CheckBreak() + } + if yyb3656 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg2_unversioned.ListMeta{} + } else { + yyv3659 := &x.ListMeta + yym3660 := z.DecBinary() + _ = yym3660 + if false { + } else if z.HasExtensions() && z.DecExt(yyv3659) { + } else { + z.DecFallback(yyv3659, false) + } + } + yyj3656++ + if yyhl3656 { + yyb3656 = yyj3656 > l + } else { + yyb3656 = r.CheckBreak() + } + if yyb3656 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv3661 := &x.Items + yym3662 := z.DecBinary() + _ = yym3662 + if false { + } else { + h.decSliceComponentStatus((*[]ComponentStatus)(yyv3661), d) + } + } + for { + yyj3656++ + if yyhl3656 { + yyb3656 = yyj3656 > l + } else { + yyb3656 = r.CheckBreak() + } + if yyb3656 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj3656-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *DownwardAPIVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym3663 := z.EncBinary() + _ = yym3663 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep3664 := !z.EncBinary() + yy2arr3664 := z.EncBasicHandle().StructToArray + var yyq3664 [1]bool + _, _, _ = yysep3664, yyq3664, yy2arr3664 + const yyr3664 bool = false + yyq3664[0] = len(x.Items) != 0 + var yynn3664 int + if yyr3664 || yy2arr3664 { + r.EncodeArrayStart(1) + } else { + yynn3664 = 0 + for _, b := range yyq3664 { + if b { + yynn3664++ + } + } + r.EncodeMapStart(yynn3664) + yynn3664 = 0 + } + if yyr3664 || yy2arr3664 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq3664[0] { + if x.Items == nil { + r.EncodeNil() + } else { + yym3666 := z.EncBinary() + _ = yym3666 + if false { + } else { + h.encSliceDownwardAPIVolumeFile(([]DownwardAPIVolumeFile)(x.Items), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq3664[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym3667 := z.EncBinary() + _ = yym3667 + if false { + } else { + h.encSliceDownwardAPIVolumeFile(([]DownwardAPIVolumeFile)(x.Items), e) + } + } + } + } + if yyr3664 || yy2arr3664 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *DownwardAPIVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym3668 := z.DecBinary() + _ = yym3668 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct3669 := r.ContainerType() + if yyct3669 == codecSelferValueTypeMap1234 { + yyl3669 := r.ReadMapStart() + if yyl3669 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl3669, d) + } + } else if yyct3669 == codecSelferValueTypeArray1234 { + yyl3669 := r.ReadArrayStart() + if yyl3669 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl3669, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *DownwardAPIVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3670Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3670Slc + var yyhl3670 bool = l >= 0 + for yyj3670 := 0; ; yyj3670++ { + if yyhl3670 { + if yyj3670 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3670Slc = r.DecodeBytes(yys3670Slc, true, true) + yys3670 := string(yys3670Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3670 { + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv3671 := &x.Items + yym3672 := z.DecBinary() + _ = yym3672 + if false { + } else { + h.decSliceDownwardAPIVolumeFile((*[]DownwardAPIVolumeFile)(yyv3671), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3670) + } // end switch yys3670 + } // end for yyj3670 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *DownwardAPIVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj3673 int + var yyb3673 bool + var yyhl3673 bool = l >= 0 + yyj3673++ + if yyhl3673 { + yyb3673 = yyj3673 > l + } else { + yyb3673 = r.CheckBreak() + } + if yyb3673 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv3674 := &x.Items + yym3675 := z.DecBinary() + _ = yym3675 + if false { + } else { + h.decSliceDownwardAPIVolumeFile((*[]DownwardAPIVolumeFile)(yyv3674), d) + } + } + for { + yyj3673++ + if yyhl3673 { + yyb3673 = yyj3673 > l + } else { + yyb3673 = r.CheckBreak() + } + if yyb3673 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj3673-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *DownwardAPIVolumeFile) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym3676 := z.EncBinary() + _ = yym3676 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep3677 := !z.EncBinary() + yy2arr3677 := z.EncBasicHandle().StructToArray + var yyq3677 [2]bool + _, _, _ = yysep3677, yyq3677, yy2arr3677 + const yyr3677 bool = false + var yynn3677 int + if yyr3677 || yy2arr3677 { + r.EncodeArrayStart(2) + } else { + yynn3677 = 2 + for _, b := range yyq3677 { + if b { + yynn3677++ + } + } + r.EncodeMapStart(yynn3677) + yynn3677 = 0 + } + if yyr3677 || yy2arr3677 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym3679 := z.EncBinary() + _ = yym3679 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Path)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("path")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym3680 := z.EncBinary() + _ = yym3680 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Path)) + } + } + if yyr3677 || yy2arr3677 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3682 := &x.FieldRef + yy3682.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("fieldRef")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy3683 := &x.FieldRef + yy3683.CodecEncodeSelf(e) + } + if yyr3677 || yy2arr3677 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *DownwardAPIVolumeFile) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym3684 := z.DecBinary() + _ = yym3684 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct3685 := r.ContainerType() + if yyct3685 == codecSelferValueTypeMap1234 { + yyl3685 := r.ReadMapStart() + if yyl3685 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl3685, d) + } + } else if yyct3685 == codecSelferValueTypeArray1234 { + yyl3685 := r.ReadArrayStart() + if yyl3685 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl3685, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *DownwardAPIVolumeFile) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3686Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3686Slc + var yyhl3686 bool = l >= 0 + for yyj3686 := 0; ; yyj3686++ { + if yyhl3686 { + if yyj3686 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3686Slc = r.DecodeBytes(yys3686Slc, true, true) + yys3686 := string(yys3686Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3686 { case "path": if r.TryDecodeAsNil() { x.Path = "" @@ -44595,13 +45921,13 @@ func (x *DownwardAPIVolumeFile) codecDecodeSelfFromMap(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.FieldRef = ObjectFieldSelector{} } else { - yyv3595 := &x.FieldRef - yyv3595.CodecDecodeSelf(d) + yyv3688 := &x.FieldRef + yyv3688.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3593) - } // end switch yys3593 - } // end for yyj3593 + z.DecStructFieldNotFound(-1, yys3686) + } // end switch yys3686 + } // end for yyj3686 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -44609,16 +45935,16 @@ func (x *DownwardAPIVolumeFile) codecDecodeSelfFromArray(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3596 int - var yyb3596 bool - var yyhl3596 bool = l >= 0 - yyj3596++ - if yyhl3596 { - yyb3596 = yyj3596 > l + var yyj3689 int + var yyb3689 bool + var yyhl3689 bool = l >= 0 + yyj3689++ + if yyhl3689 { + yyb3689 = yyj3689 > l } else { - yyb3596 = r.CheckBreak() + yyb3689 = r.CheckBreak() } - if yyb3596 { + if yyb3689 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44628,13 +45954,13 @@ func (x *DownwardAPIVolumeFile) codecDecodeSelfFromArray(l int, d *codec1978.Dec } else { x.Path = string(r.DecodeString()) } - yyj3596++ - if yyhl3596 { - yyb3596 = yyj3596 > l + yyj3689++ + if yyhl3689 { + yyb3689 = yyj3689 > l } else { - yyb3596 = r.CheckBreak() + yyb3689 = r.CheckBreak() } - if yyb3596 { + if yyb3689 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44642,21 +45968,21 @@ func (x *DownwardAPIVolumeFile) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.FieldRef = ObjectFieldSelector{} } else { - yyv3598 := &x.FieldRef - yyv3598.CodecDecodeSelf(d) + yyv3691 := &x.FieldRef + yyv3691.CodecDecodeSelf(d) } for { - yyj3596++ - if yyhl3596 { - yyb3596 = yyj3596 > l + yyj3689++ + if yyhl3689 { + yyb3689 = yyj3689 > l } else { - yyb3596 = r.CheckBreak() + yyb3689 = r.CheckBreak() } - if yyb3596 { + if yyb3689 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3596-1, "") + z.DecStructFieldNotFound(yyj3689-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -44668,37 +45994,37 @@ func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3599 := z.EncBinary() - _ = yym3599 + yym3692 := z.EncBinary() + _ = yym3692 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3600 := !z.EncBinary() - yy2arr3600 := z.EncBasicHandle().StructToArray - var yyq3600 [5]bool - _, _, _ = yysep3600, yyq3600, yy2arr3600 - const yyr3600 bool = false - yyq3600[0] = x.Capabilities != nil - yyq3600[1] = x.Privileged != nil - yyq3600[2] = x.SELinuxOptions != nil - yyq3600[3] = x.RunAsUser != nil - yyq3600[4] = x.RunAsNonRoot != nil - var yynn3600 int - if yyr3600 || yy2arr3600 { + yysep3693 := !z.EncBinary() + yy2arr3693 := z.EncBasicHandle().StructToArray + var yyq3693 [5]bool + _, _, _ = yysep3693, yyq3693, yy2arr3693 + const yyr3693 bool = false + yyq3693[0] = x.Capabilities != nil + yyq3693[1] = x.Privileged != nil + yyq3693[2] = x.SELinuxOptions != nil + yyq3693[3] = x.RunAsUser != nil + yyq3693[4] = x.RunAsNonRoot != nil + var yynn3693 int + if yyr3693 || yy2arr3693 { r.EncodeArrayStart(5) } else { - yynn3600 = 0 - for _, b := range yyq3600 { + yynn3693 = 0 + for _, b := range yyq3693 { if b { - yynn3600++ + yynn3693++ } } - r.EncodeMapStart(yynn3600) - yynn3600 = 0 + r.EncodeMapStart(yynn3693) + yynn3693 = 0 } - if yyr3600 || yy2arr3600 { + if yyr3693 || yy2arr3693 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3600[0] { + if yyq3693[0] { if x.Capabilities == nil { r.EncodeNil() } else { @@ -44708,7 +46034,7 @@ func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3600[0] { + if yyq3693[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("capabilities")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -44719,44 +46045,44 @@ func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3600 || yy2arr3600 { + if yyr3693 || yy2arr3693 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3600[1] { + if yyq3693[1] { if x.Privileged == nil { r.EncodeNil() } else { - yy3603 := *x.Privileged - yym3604 := z.EncBinary() - _ = yym3604 + yy3696 := *x.Privileged + yym3697 := z.EncBinary() + _ = yym3697 if false { } else { - r.EncodeBool(bool(yy3603)) + r.EncodeBool(bool(yy3696)) } } } else { r.EncodeNil() } } else { - if yyq3600[1] { + if yyq3693[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("privileged")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Privileged == nil { r.EncodeNil() } else { - yy3605 := *x.Privileged - yym3606 := z.EncBinary() - _ = yym3606 + yy3698 := *x.Privileged + yym3699 := z.EncBinary() + _ = yym3699 if false { } else { - r.EncodeBool(bool(yy3605)) + r.EncodeBool(bool(yy3698)) } } } } - if yyr3600 || yy2arr3600 { + if yyr3693 || yy2arr3693 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3600[2] { + if yyq3693[2] { if x.SELinuxOptions == nil { r.EncodeNil() } else { @@ -44766,7 +46092,7 @@ func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3600[2] { + if yyq3693[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("seLinuxOptions")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -44777,77 +46103,77 @@ func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3600 || yy2arr3600 { + if yyr3693 || yy2arr3693 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3600[3] { + if yyq3693[3] { if x.RunAsUser == nil { r.EncodeNil() } else { - yy3609 := *x.RunAsUser - yym3610 := z.EncBinary() - _ = yym3610 + yy3702 := *x.RunAsUser + yym3703 := z.EncBinary() + _ = yym3703 if false { } else { - r.EncodeInt(int64(yy3609)) + r.EncodeInt(int64(yy3702)) } } } else { r.EncodeNil() } } else { - if yyq3600[3] { + if yyq3693[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("runAsUser")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.RunAsUser == nil { r.EncodeNil() } else { - yy3611 := *x.RunAsUser - yym3612 := z.EncBinary() - _ = yym3612 + yy3704 := *x.RunAsUser + yym3705 := z.EncBinary() + _ = yym3705 if false { } else { - r.EncodeInt(int64(yy3611)) + r.EncodeInt(int64(yy3704)) } } } } - if yyr3600 || yy2arr3600 { + if yyr3693 || yy2arr3693 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3600[4] { + if yyq3693[4] { if x.RunAsNonRoot == nil { r.EncodeNil() } else { - yy3614 := *x.RunAsNonRoot - yym3615 := z.EncBinary() - _ = yym3615 + yy3707 := *x.RunAsNonRoot + yym3708 := z.EncBinary() + _ = yym3708 if false { } else { - r.EncodeBool(bool(yy3614)) + r.EncodeBool(bool(yy3707)) } } } else { r.EncodeNil() } } else { - if yyq3600[4] { + if yyq3693[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("runAsNonRoot")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.RunAsNonRoot == nil { r.EncodeNil() } else { - yy3616 := *x.RunAsNonRoot - yym3617 := z.EncBinary() - _ = yym3617 + yy3709 := *x.RunAsNonRoot + yym3710 := z.EncBinary() + _ = yym3710 if false { } else { - r.EncodeBool(bool(yy3616)) + r.EncodeBool(bool(yy3709)) } } } } - if yyr3600 || yy2arr3600 { + if yyr3693 || yy2arr3693 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -44860,25 +46186,25 @@ func (x *SecurityContext) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3618 := z.DecBinary() - _ = yym3618 + yym3711 := z.DecBinary() + _ = yym3711 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3619 := r.ContainerType() - if yyct3619 == codecSelferValueTypeMap1234 { - yyl3619 := r.ReadMapStart() - if yyl3619 == 0 { + yyct3712 := r.ContainerType() + if yyct3712 == codecSelferValueTypeMap1234 { + yyl3712 := r.ReadMapStart() + if yyl3712 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3619, d) + x.codecDecodeSelfFromMap(yyl3712, d) } - } else if yyct3619 == codecSelferValueTypeArray1234 { - yyl3619 := r.ReadArrayStart() - if yyl3619 == 0 { + } else if yyct3712 == codecSelferValueTypeArray1234 { + yyl3712 := r.ReadArrayStart() + if yyl3712 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3619, d) + x.codecDecodeSelfFromArray(yyl3712, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -44890,12 +46216,12 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3620Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3620Slc - var yyhl3620 bool = l >= 0 - for yyj3620 := 0; ; yyj3620++ { - if yyhl3620 { - if yyj3620 >= l { + var yys3713Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3713Slc + var yyhl3713 bool = l >= 0 + for yyj3713 := 0; ; yyj3713++ { + if yyhl3713 { + if yyj3713 >= l { break } } else { @@ -44904,10 +46230,10 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3620Slc = r.DecodeBytes(yys3620Slc, true, true) - yys3620 := string(yys3620Slc) + yys3713Slc = r.DecodeBytes(yys3713Slc, true, true) + yys3713 := string(yys3713Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3620 { + switch yys3713 { case "capabilities": if r.TryDecodeAsNil() { if x.Capabilities != nil { @@ -44928,8 +46254,8 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.Privileged == nil { x.Privileged = new(bool) } - yym3623 := z.DecBinary() - _ = yym3623 + yym3716 := z.DecBinary() + _ = yym3716 if false { } else { *((*bool)(x.Privileged)) = r.DecodeBool() @@ -44955,8 +46281,8 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.RunAsUser == nil { x.RunAsUser = new(int64) } - yym3626 := z.DecBinary() - _ = yym3626 + yym3719 := z.DecBinary() + _ = yym3719 if false { } else { *((*int64)(x.RunAsUser)) = int64(r.DecodeInt(64)) @@ -44971,17 +46297,17 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.RunAsNonRoot == nil { x.RunAsNonRoot = new(bool) } - yym3628 := z.DecBinary() - _ = yym3628 + yym3721 := z.DecBinary() + _ = yym3721 if false { } else { *((*bool)(x.RunAsNonRoot)) = r.DecodeBool() } } default: - z.DecStructFieldNotFound(-1, yys3620) - } // end switch yys3620 - } // end for yyj3620 + z.DecStructFieldNotFound(-1, yys3713) + } // end switch yys3713 + } // end for yyj3713 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -44989,16 +46315,16 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3629 int - var yyb3629 bool - var yyhl3629 bool = l >= 0 - yyj3629++ - if yyhl3629 { - yyb3629 = yyj3629 > l + var yyj3722 int + var yyb3722 bool + var yyhl3722 bool = l >= 0 + yyj3722++ + if yyhl3722 { + yyb3722 = yyj3722 > l } else { - yyb3629 = r.CheckBreak() + yyb3722 = r.CheckBreak() } - if yyb3629 { + if yyb3722 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45013,13 +46339,13 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } x.Capabilities.CodecDecodeSelf(d) } - yyj3629++ - if yyhl3629 { - yyb3629 = yyj3629 > l + yyj3722++ + if yyhl3722 { + yyb3722 = yyj3722 > l } else { - yyb3629 = r.CheckBreak() + yyb3722 = r.CheckBreak() } - if yyb3629 { + if yyb3722 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45032,20 +46358,20 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if x.Privileged == nil { x.Privileged = new(bool) } - yym3632 := z.DecBinary() - _ = yym3632 + yym3725 := z.DecBinary() + _ = yym3725 if false { } else { *((*bool)(x.Privileged)) = r.DecodeBool() } } - yyj3629++ - if yyhl3629 { - yyb3629 = yyj3629 > l + yyj3722++ + if yyhl3722 { + yyb3722 = yyj3722 > l } else { - yyb3629 = r.CheckBreak() + yyb3722 = r.CheckBreak() } - if yyb3629 { + if yyb3722 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45060,13 +46386,13 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } x.SELinuxOptions.CodecDecodeSelf(d) } - yyj3629++ - if yyhl3629 { - yyb3629 = yyj3629 > l + yyj3722++ + if yyhl3722 { + yyb3722 = yyj3722 > l } else { - yyb3629 = r.CheckBreak() + yyb3722 = r.CheckBreak() } - if yyb3629 { + if yyb3722 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45079,20 +46405,20 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if x.RunAsUser == nil { x.RunAsUser = new(int64) } - yym3635 := z.DecBinary() - _ = yym3635 + yym3728 := z.DecBinary() + _ = yym3728 if false { } else { *((*int64)(x.RunAsUser)) = int64(r.DecodeInt(64)) } } - yyj3629++ - if yyhl3629 { - yyb3629 = yyj3629 > l + yyj3722++ + if yyhl3722 { + yyb3722 = yyj3722 > l } else { - yyb3629 = r.CheckBreak() + yyb3722 = r.CheckBreak() } - if yyb3629 { + if yyb3722 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45105,25 +46431,25 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if x.RunAsNonRoot == nil { x.RunAsNonRoot = new(bool) } - yym3637 := z.DecBinary() - _ = yym3637 + yym3730 := z.DecBinary() + _ = yym3730 if false { } else { *((*bool)(x.RunAsNonRoot)) = r.DecodeBool() } } for { - yyj3629++ - if yyhl3629 { - yyb3629 = yyj3629 > l + yyj3722++ + if yyhl3722 { + yyb3722 = yyj3722 > l } else { - yyb3629 = r.CheckBreak() + yyb3722 = r.CheckBreak() } - if yyb3629 { + if yyb3722 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3629-1, "") + z.DecStructFieldNotFound(yyj3722-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -45135,38 +46461,38 @@ func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3638 := z.EncBinary() - _ = yym3638 + yym3731 := z.EncBinary() + _ = yym3731 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3639 := !z.EncBinary() - yy2arr3639 := z.EncBasicHandle().StructToArray - var yyq3639 [4]bool - _, _, _ = yysep3639, yyq3639, yy2arr3639 - const yyr3639 bool = false - yyq3639[0] = x.User != "" - yyq3639[1] = x.Role != "" - yyq3639[2] = x.Type != "" - yyq3639[3] = x.Level != "" - var yynn3639 int - if yyr3639 || yy2arr3639 { + yysep3732 := !z.EncBinary() + yy2arr3732 := z.EncBasicHandle().StructToArray + var yyq3732 [4]bool + _, _, _ = yysep3732, yyq3732, yy2arr3732 + const yyr3732 bool = false + yyq3732[0] = x.User != "" + yyq3732[1] = x.Role != "" + yyq3732[2] = x.Type != "" + yyq3732[3] = x.Level != "" + var yynn3732 int + if yyr3732 || yy2arr3732 { r.EncodeArrayStart(4) } else { - yynn3639 = 0 - for _, b := range yyq3639 { + yynn3732 = 0 + for _, b := range yyq3732 { if b { - yynn3639++ + yynn3732++ } } - r.EncodeMapStart(yynn3639) - yynn3639 = 0 + r.EncodeMapStart(yynn3732) + yynn3732 = 0 } - if yyr3639 || yy2arr3639 { + if yyr3732 || yy2arr3732 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3639[0] { - yym3641 := z.EncBinary() - _ = yym3641 + if yyq3732[0] { + yym3734 := z.EncBinary() + _ = yym3734 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.User)) @@ -45175,23 +46501,23 @@ func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3639[0] { + if yyq3732[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("user")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3642 := z.EncBinary() - _ = yym3642 + yym3735 := z.EncBinary() + _ = yym3735 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.User)) } } } - if yyr3639 || yy2arr3639 { + if yyr3732 || yy2arr3732 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3639[1] { - yym3644 := z.EncBinary() - _ = yym3644 + if yyq3732[1] { + yym3737 := z.EncBinary() + _ = yym3737 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Role)) @@ -45200,23 +46526,23 @@ func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3639[1] { + if yyq3732[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("role")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3645 := z.EncBinary() - _ = yym3645 + yym3738 := z.EncBinary() + _ = yym3738 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Role)) } } } - if yyr3639 || yy2arr3639 { + if yyr3732 || yy2arr3732 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3639[2] { - yym3647 := z.EncBinary() - _ = yym3647 + if yyq3732[2] { + yym3740 := z.EncBinary() + _ = yym3740 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Type)) @@ -45225,23 +46551,23 @@ func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3639[2] { + if yyq3732[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("type")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3648 := z.EncBinary() - _ = yym3648 + yym3741 := z.EncBinary() + _ = yym3741 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Type)) } } } - if yyr3639 || yy2arr3639 { + if yyr3732 || yy2arr3732 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3639[3] { - yym3650 := z.EncBinary() - _ = yym3650 + if yyq3732[3] { + yym3743 := z.EncBinary() + _ = yym3743 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Level)) @@ -45250,19 +46576,19 @@ func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3639[3] { + if yyq3732[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("level")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3651 := z.EncBinary() - _ = yym3651 + yym3744 := z.EncBinary() + _ = yym3744 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Level)) } } } - if yyr3639 || yy2arr3639 { + if yyr3732 || yy2arr3732 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -45275,25 +46601,25 @@ func (x *SELinuxOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3652 := z.DecBinary() - _ = yym3652 + yym3745 := z.DecBinary() + _ = yym3745 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3653 := r.ContainerType() - if yyct3653 == codecSelferValueTypeMap1234 { - yyl3653 := r.ReadMapStart() - if yyl3653 == 0 { + yyct3746 := r.ContainerType() + if yyct3746 == codecSelferValueTypeMap1234 { + yyl3746 := r.ReadMapStart() + if yyl3746 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3653, d) + x.codecDecodeSelfFromMap(yyl3746, d) } - } else if yyct3653 == codecSelferValueTypeArray1234 { - yyl3653 := r.ReadArrayStart() - if yyl3653 == 0 { + } else if yyct3746 == codecSelferValueTypeArray1234 { + yyl3746 := r.ReadArrayStart() + if yyl3746 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3653, d) + x.codecDecodeSelfFromArray(yyl3746, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -45305,12 +46631,12 @@ func (x *SELinuxOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3654Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3654Slc - var yyhl3654 bool = l >= 0 - for yyj3654 := 0; ; yyj3654++ { - if yyhl3654 { - if yyj3654 >= l { + var yys3747Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3747Slc + var yyhl3747 bool = l >= 0 + for yyj3747 := 0; ; yyj3747++ { + if yyhl3747 { + if yyj3747 >= l { break } } else { @@ -45319,10 +46645,10 @@ func (x *SELinuxOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3654Slc = r.DecodeBytes(yys3654Slc, true, true) - yys3654 := string(yys3654Slc) + yys3747Slc = r.DecodeBytes(yys3747Slc, true, true) + yys3747 := string(yys3747Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3654 { + switch yys3747 { case "user": if r.TryDecodeAsNil() { x.User = "" @@ -45348,9 +46674,9 @@ func (x *SELinuxOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Level = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3654) - } // end switch yys3654 - } // end for yyj3654 + z.DecStructFieldNotFound(-1, yys3747) + } // end switch yys3747 + } // end for yyj3747 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -45358,16 +46684,16 @@ func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3659 int - var yyb3659 bool - var yyhl3659 bool = l >= 0 - yyj3659++ - if yyhl3659 { - yyb3659 = yyj3659 > l + var yyj3752 int + var yyb3752 bool + var yyhl3752 bool = l >= 0 + yyj3752++ + if yyhl3752 { + yyb3752 = yyj3752 > l } else { - yyb3659 = r.CheckBreak() + yyb3752 = r.CheckBreak() } - if yyb3659 { + if yyb3752 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45377,13 +46703,13 @@ func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.User = string(r.DecodeString()) } - yyj3659++ - if yyhl3659 { - yyb3659 = yyj3659 > l + yyj3752++ + if yyhl3752 { + yyb3752 = yyj3752 > l } else { - yyb3659 = r.CheckBreak() + yyb3752 = r.CheckBreak() } - if yyb3659 { + if yyb3752 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45393,13 +46719,13 @@ func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Role = string(r.DecodeString()) } - yyj3659++ - if yyhl3659 { - yyb3659 = yyj3659 > l + yyj3752++ + if yyhl3752 { + yyb3752 = yyj3752 > l } else { - yyb3659 = r.CheckBreak() + yyb3752 = r.CheckBreak() } - if yyb3659 { + if yyb3752 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45409,13 +46735,13 @@ func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Type = string(r.DecodeString()) } - yyj3659++ - if yyhl3659 { - yyb3659 = yyj3659 > l + yyj3752++ + if yyhl3752 { + yyb3752 = yyj3752 > l } else { - yyb3659 = r.CheckBreak() + yyb3752 = r.CheckBreak() } - if yyb3659 { + if yyb3752 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45426,17 +46752,17 @@ func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Level = string(r.DecodeString()) } for { - yyj3659++ - if yyhl3659 { - yyb3659 = yyj3659 > l + yyj3752++ + if yyhl3752 { + yyb3752 = yyj3752 > l } else { - yyb3659 = r.CheckBreak() + yyb3752 = r.CheckBreak() } - if yyb3659 { + if yyb3752 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3659-1, "") + z.DecStructFieldNotFound(yyj3752-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -45448,37 +46774,37 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3664 := z.EncBinary() - _ = yym3664 + yym3757 := z.EncBinary() + _ = yym3757 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3665 := !z.EncBinary() - yy2arr3665 := z.EncBasicHandle().StructToArray - var yyq3665 [5]bool - _, _, _ = yysep3665, yyq3665, yy2arr3665 - const yyr3665 bool = false - yyq3665[0] = x.Kind != "" - yyq3665[1] = x.APIVersion != "" - yyq3665[2] = true - var yynn3665 int - if yyr3665 || yy2arr3665 { + yysep3758 := !z.EncBinary() + yy2arr3758 := z.EncBasicHandle().StructToArray + var yyq3758 [5]bool + _, _, _ = yysep3758, yyq3758, yy2arr3758 + const yyr3758 bool = false + yyq3758[0] = x.Kind != "" + yyq3758[1] = x.APIVersion != "" + yyq3758[2] = true + var yynn3758 int + if yyr3758 || yy2arr3758 { r.EncodeArrayStart(5) } else { - yynn3665 = 2 - for _, b := range yyq3665 { + yynn3758 = 2 + for _, b := range yyq3758 { if b { - yynn3665++ + yynn3758++ } } - r.EncodeMapStart(yynn3665) - yynn3665 = 0 + r.EncodeMapStart(yynn3758) + yynn3758 = 0 } - if yyr3665 || yy2arr3665 { + if yyr3758 || yy2arr3758 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3665[0] { - yym3667 := z.EncBinary() - _ = yym3667 + if yyq3758[0] { + yym3760 := z.EncBinary() + _ = yym3760 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -45487,23 +46813,23 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3665[0] { + if yyq3758[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3668 := z.EncBinary() - _ = yym3668 + yym3761 := z.EncBinary() + _ = yym3761 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3665 || yy2arr3665 { + if yyr3758 || yy2arr3758 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3665[1] { - yym3670 := z.EncBinary() - _ = yym3670 + if yyq3758[1] { + yym3763 := z.EncBinary() + _ = yym3763 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -45512,39 +46838,39 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3665[1] { + if yyq3758[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3671 := z.EncBinary() - _ = yym3671 + yym3764 := z.EncBinary() + _ = yym3764 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3665 || yy2arr3665 { + if yyr3758 || yy2arr3758 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3665[2] { - yy3673 := &x.ObjectMeta - yy3673.CodecEncodeSelf(e) + if yyq3758[2] { + yy3766 := &x.ObjectMeta + yy3766.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3665[2] { + if yyq3758[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3674 := &x.ObjectMeta - yy3674.CodecEncodeSelf(e) + yy3767 := &x.ObjectMeta + yy3767.CodecEncodeSelf(e) } } - if yyr3665 || yy2arr3665 { + if yyr3758 || yy2arr3758 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3676 := z.EncBinary() - _ = yym3676 + yym3769 := z.EncBinary() + _ = yym3769 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Range)) @@ -45553,20 +46879,20 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("range")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3677 := z.EncBinary() - _ = yym3677 + yym3770 := z.EncBinary() + _ = yym3770 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Range)) } } - if yyr3665 || yy2arr3665 { + if yyr3758 || yy2arr3758 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Data == nil { r.EncodeNil() } else { - yym3679 := z.EncBinary() - _ = yym3679 + yym3772 := z.EncBinary() + _ = yym3772 if false { } else { r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data)) @@ -45579,15 +46905,15 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { if x.Data == nil { r.EncodeNil() } else { - yym3680 := z.EncBinary() - _ = yym3680 + yym3773 := z.EncBinary() + _ = yym3773 if false { } else { r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data)) } } } - if yyr3665 || yy2arr3665 { + if yyr3758 || yy2arr3758 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -45600,25 +46926,25 @@ func (x *RangeAllocation) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3681 := z.DecBinary() - _ = yym3681 + yym3774 := z.DecBinary() + _ = yym3774 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3682 := r.ContainerType() - if yyct3682 == codecSelferValueTypeMap1234 { - yyl3682 := r.ReadMapStart() - if yyl3682 == 0 { + yyct3775 := r.ContainerType() + if yyct3775 == codecSelferValueTypeMap1234 { + yyl3775 := r.ReadMapStart() + if yyl3775 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3682, d) + x.codecDecodeSelfFromMap(yyl3775, d) } - } else if yyct3682 == codecSelferValueTypeArray1234 { - yyl3682 := r.ReadArrayStart() - if yyl3682 == 0 { + } else if yyct3775 == codecSelferValueTypeArray1234 { + yyl3775 := r.ReadArrayStart() + if yyl3775 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3682, d) + x.codecDecodeSelfFromArray(yyl3775, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -45630,12 +46956,12 @@ func (x *RangeAllocation) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3683Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3683Slc - var yyhl3683 bool = l >= 0 - for yyj3683 := 0; ; yyj3683++ { - if yyhl3683 { - if yyj3683 >= l { + var yys3776Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3776Slc + var yyhl3776 bool = l >= 0 + for yyj3776 := 0; ; yyj3776++ { + if yyhl3776 { + if yyj3776 >= l { break } } else { @@ -45644,10 +46970,10 @@ func (x *RangeAllocation) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3683Slc = r.DecodeBytes(yys3683Slc, true, true) - yys3683 := string(yys3683Slc) + yys3776Slc = r.DecodeBytes(yys3776Slc, true, true) + yys3776 := string(yys3776Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3683 { + switch yys3776 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -45664,8 +46990,8 @@ func (x *RangeAllocation) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3686 := &x.ObjectMeta - yyv3686.CodecDecodeSelf(d) + yyv3779 := &x.ObjectMeta + yyv3779.CodecDecodeSelf(d) } case "range": if r.TryDecodeAsNil() { @@ -45677,18 +47003,18 @@ func (x *RangeAllocation) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Data = nil } else { - yyv3688 := &x.Data - yym3689 := z.DecBinary() - _ = yym3689 + yyv3781 := &x.Data + yym3782 := z.DecBinary() + _ = yym3782 if false { } else { - *yyv3688 = r.DecodeBytes(*(*[]byte)(yyv3688), false, false) + *yyv3781 = r.DecodeBytes(*(*[]byte)(yyv3781), false, false) } } default: - z.DecStructFieldNotFound(-1, yys3683) - } // end switch yys3683 - } // end for yyj3683 + z.DecStructFieldNotFound(-1, yys3776) + } // end switch yys3776 + } // end for yyj3776 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -45696,16 +47022,16 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3690 int - var yyb3690 bool - var yyhl3690 bool = l >= 0 - yyj3690++ - if yyhl3690 { - yyb3690 = yyj3690 > l + var yyj3783 int + var yyb3783 bool + var yyhl3783 bool = l >= 0 + yyj3783++ + if yyhl3783 { + yyb3783 = yyj3783 > l } else { - yyb3690 = r.CheckBreak() + yyb3783 = r.CheckBreak() } - if yyb3690 { + if yyb3783 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45715,13 +47041,13 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Kind = string(r.DecodeString()) } - yyj3690++ - if yyhl3690 { - yyb3690 = yyj3690 > l + yyj3783++ + if yyhl3783 { + yyb3783 = yyj3783 > l } else { - yyb3690 = r.CheckBreak() + yyb3783 = r.CheckBreak() } - if yyb3690 { + if yyb3783 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45731,13 +47057,13 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.APIVersion = string(r.DecodeString()) } - yyj3690++ - if yyhl3690 { - yyb3690 = yyj3690 > l + yyj3783++ + if yyhl3783 { + yyb3783 = yyj3783 > l } else { - yyb3690 = r.CheckBreak() + yyb3783 = r.CheckBreak() } - if yyb3690 { + if yyb3783 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45745,16 +47071,16 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3693 := &x.ObjectMeta - yyv3693.CodecDecodeSelf(d) + yyv3786 := &x.ObjectMeta + yyv3786.CodecDecodeSelf(d) } - yyj3690++ - if yyhl3690 { - yyb3690 = yyj3690 > l + yyj3783++ + if yyhl3783 { + yyb3783 = yyj3783 > l } else { - yyb3690 = r.CheckBreak() + yyb3783 = r.CheckBreak() } - if yyb3690 { + if yyb3783 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45764,13 +47090,13 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Range = string(r.DecodeString()) } - yyj3690++ - if yyhl3690 { - yyb3690 = yyj3690 > l + yyj3783++ + if yyhl3783 { + yyb3783 = yyj3783 > l } else { - yyb3690 = r.CheckBreak() + yyb3783 = r.CheckBreak() } - if yyb3690 { + if yyb3783 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45778,26 +47104,26 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Data = nil } else { - yyv3695 := &x.Data - yym3696 := z.DecBinary() - _ = yym3696 + yyv3788 := &x.Data + yym3789 := z.DecBinary() + _ = yym3789 if false { } else { - *yyv3695 = r.DecodeBytes(*(*[]byte)(yyv3695), false, false) + *yyv3788 = r.DecodeBytes(*(*[]byte)(yyv3788), false, false) } } for { - yyj3690++ - if yyhl3690 { - yyb3690 = yyj3690 > l + yyj3783++ + if yyhl3783 { + yyb3783 = yyj3783 > l } else { - yyb3690 = r.CheckBreak() + yyb3783 = r.CheckBreak() } - if yyb3690 { + if yyb3783 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3690-1, "") + z.DecStructFieldNotFound(yyj3783-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -45807,9 +47133,9 @@ func (x codecSelfer1234) encSlicePersistentVolumeAccessMode(v []PersistentVolume z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3697 := range v { + for _, yyv3790 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yyv3697.CodecEncodeSelf(e) + yyv3790.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -45819,75 +47145,75 @@ func (x codecSelfer1234) decSlicePersistentVolumeAccessMode(v *[]PersistentVolum z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3698 := *v - yyh3698, yyl3698 := z.DecSliceHelperStart() - var yyc3698 bool - if yyl3698 == 0 { - if yyv3698 == nil { - yyv3698 = []PersistentVolumeAccessMode{} - yyc3698 = true - } else if len(yyv3698) != 0 { - yyv3698 = yyv3698[:0] - yyc3698 = true + yyv3791 := *v + yyh3791, yyl3791 := z.DecSliceHelperStart() + var yyc3791 bool + if yyl3791 == 0 { + if yyv3791 == nil { + yyv3791 = []PersistentVolumeAccessMode{} + yyc3791 = true + } else if len(yyv3791) != 0 { + yyv3791 = yyv3791[:0] + yyc3791 = true } - } else if yyl3698 > 0 { - var yyrr3698, yyrl3698 int - var yyrt3698 bool - if yyl3698 > cap(yyv3698) { + } else if yyl3791 > 0 { + var yyrr3791, yyrl3791 int + var yyrt3791 bool + if yyl3791 > cap(yyv3791) { - yyrl3698, yyrt3698 = z.DecInferLen(yyl3698, z.DecBasicHandle().MaxInitLen, 16) - if yyrt3698 { - if yyrl3698 <= cap(yyv3698) { - yyv3698 = yyv3698[:yyrl3698] + yyrl3791, yyrt3791 = z.DecInferLen(yyl3791, z.DecBasicHandle().MaxInitLen, 16) + if yyrt3791 { + if yyrl3791 <= cap(yyv3791) { + yyv3791 = yyv3791[:yyrl3791] } else { - yyv3698 = make([]PersistentVolumeAccessMode, yyrl3698) + yyv3791 = make([]PersistentVolumeAccessMode, yyrl3791) } } else { - yyv3698 = make([]PersistentVolumeAccessMode, yyrl3698) + yyv3791 = make([]PersistentVolumeAccessMode, yyrl3791) } - yyc3698 = true - yyrr3698 = len(yyv3698) - } else if yyl3698 != len(yyv3698) { - yyv3698 = yyv3698[:yyl3698] - yyc3698 = true + yyc3791 = true + yyrr3791 = len(yyv3791) + } else if yyl3791 != len(yyv3791) { + yyv3791 = yyv3791[:yyl3791] + yyc3791 = true } - yyj3698 := 0 - for ; yyj3698 < yyrr3698; yyj3698++ { - yyh3698.ElemContainerState(yyj3698) + yyj3791 := 0 + for ; yyj3791 < yyrr3791; yyj3791++ { + yyh3791.ElemContainerState(yyj3791) if r.TryDecodeAsNil() { - yyv3698[yyj3698] = "" + yyv3791[yyj3791] = "" } else { - yyv3698[yyj3698] = PersistentVolumeAccessMode(r.DecodeString()) + yyv3791[yyj3791] = PersistentVolumeAccessMode(r.DecodeString()) } } - if yyrt3698 { - for ; yyj3698 < yyl3698; yyj3698++ { - yyv3698 = append(yyv3698, "") - yyh3698.ElemContainerState(yyj3698) + if yyrt3791 { + for ; yyj3791 < yyl3791; yyj3791++ { + yyv3791 = append(yyv3791, "") + yyh3791.ElemContainerState(yyj3791) if r.TryDecodeAsNil() { - yyv3698[yyj3698] = "" + yyv3791[yyj3791] = "" } else { - yyv3698[yyj3698] = PersistentVolumeAccessMode(r.DecodeString()) + yyv3791[yyj3791] = PersistentVolumeAccessMode(r.DecodeString()) } } } } else { - yyj3698 := 0 - for ; !r.CheckBreak(); yyj3698++ { + yyj3791 := 0 + for ; !r.CheckBreak(); yyj3791++ { - if yyj3698 >= len(yyv3698) { - yyv3698 = append(yyv3698, "") // var yyz3698 PersistentVolumeAccessMode - yyc3698 = true + if yyj3791 >= len(yyv3791) { + yyv3791 = append(yyv3791, "") // var yyz3791 PersistentVolumeAccessMode + yyc3791 = true } - yyh3698.ElemContainerState(yyj3698) - if yyj3698 < len(yyv3698) { + yyh3791.ElemContainerState(yyj3791) + if yyj3791 < len(yyv3791) { if r.TryDecodeAsNil() { - yyv3698[yyj3698] = "" + yyv3791[yyj3791] = "" } else { - yyv3698[yyj3698] = PersistentVolumeAccessMode(r.DecodeString()) + yyv3791[yyj3791] = PersistentVolumeAccessMode(r.DecodeString()) } } else { @@ -45895,17 +47221,17 @@ func (x codecSelfer1234) decSlicePersistentVolumeAccessMode(v *[]PersistentVolum } } - if yyj3698 < len(yyv3698) { - yyv3698 = yyv3698[:yyj3698] - yyc3698 = true - } else if yyj3698 == 0 && yyv3698 == nil { - yyv3698 = []PersistentVolumeAccessMode{} - yyc3698 = true + if yyj3791 < len(yyv3791) { + yyv3791 = yyv3791[:yyj3791] + yyc3791 = true + } else if yyj3791 == 0 && yyv3791 == nil { + yyv3791 = []PersistentVolumeAccessMode{} + yyc3791 = true } } - yyh3698.End() - if yyc3698 { - *v = yyv3698 + yyh3791.End() + if yyc3791 { + *v = yyv3791 } } @@ -45914,10 +47240,10 @@ func (x codecSelfer1234) encSlicePersistentVolume(v []PersistentVolume, e *codec z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3702 := range v { + for _, yyv3795 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3703 := &yyv3702 - yy3703.CodecEncodeSelf(e) + yy3796 := &yyv3795 + yy3796.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -45927,83 +47253,83 @@ func (x codecSelfer1234) decSlicePersistentVolume(v *[]PersistentVolume, d *code z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3704 := *v - yyh3704, yyl3704 := z.DecSliceHelperStart() - var yyc3704 bool - if yyl3704 == 0 { - if yyv3704 == nil { - yyv3704 = []PersistentVolume{} - yyc3704 = true - } else if len(yyv3704) != 0 { - yyv3704 = yyv3704[:0] - yyc3704 = true + yyv3797 := *v + yyh3797, yyl3797 := z.DecSliceHelperStart() + var yyc3797 bool + if yyl3797 == 0 { + if yyv3797 == nil { + yyv3797 = []PersistentVolume{} + yyc3797 = true + } else if len(yyv3797) != 0 { + yyv3797 = yyv3797[:0] + yyc3797 = true } - } else if yyl3704 > 0 { - var yyrr3704, yyrl3704 int - var yyrt3704 bool - if yyl3704 > cap(yyv3704) { + } else if yyl3797 > 0 { + var yyrr3797, yyrl3797 int + var yyrt3797 bool + if yyl3797 > cap(yyv3797) { - yyrg3704 := len(yyv3704) > 0 - yyv23704 := yyv3704 - yyrl3704, yyrt3704 = z.DecInferLen(yyl3704, z.DecBasicHandle().MaxInitLen, 392) - if yyrt3704 { - if yyrl3704 <= cap(yyv3704) { - yyv3704 = yyv3704[:yyrl3704] + yyrg3797 := len(yyv3797) > 0 + yyv23797 := yyv3797 + yyrl3797, yyrt3797 = z.DecInferLen(yyl3797, z.DecBasicHandle().MaxInitLen, 392) + if yyrt3797 { + if yyrl3797 <= cap(yyv3797) { + yyv3797 = yyv3797[:yyrl3797] } else { - yyv3704 = make([]PersistentVolume, yyrl3704) + yyv3797 = make([]PersistentVolume, yyrl3797) } } else { - yyv3704 = make([]PersistentVolume, yyrl3704) + yyv3797 = make([]PersistentVolume, yyrl3797) } - yyc3704 = true - yyrr3704 = len(yyv3704) - if yyrg3704 { - copy(yyv3704, yyv23704) + yyc3797 = true + yyrr3797 = len(yyv3797) + if yyrg3797 { + copy(yyv3797, yyv23797) } - } else if yyl3704 != len(yyv3704) { - yyv3704 = yyv3704[:yyl3704] - yyc3704 = true + } else if yyl3797 != len(yyv3797) { + yyv3797 = yyv3797[:yyl3797] + yyc3797 = true } - yyj3704 := 0 - for ; yyj3704 < yyrr3704; yyj3704++ { - yyh3704.ElemContainerState(yyj3704) + yyj3797 := 0 + for ; yyj3797 < yyrr3797; yyj3797++ { + yyh3797.ElemContainerState(yyj3797) if r.TryDecodeAsNil() { - yyv3704[yyj3704] = PersistentVolume{} + yyv3797[yyj3797] = PersistentVolume{} } else { - yyv3705 := &yyv3704[yyj3704] - yyv3705.CodecDecodeSelf(d) + yyv3798 := &yyv3797[yyj3797] + yyv3798.CodecDecodeSelf(d) } } - if yyrt3704 { - for ; yyj3704 < yyl3704; yyj3704++ { - yyv3704 = append(yyv3704, PersistentVolume{}) - yyh3704.ElemContainerState(yyj3704) + if yyrt3797 { + for ; yyj3797 < yyl3797; yyj3797++ { + yyv3797 = append(yyv3797, PersistentVolume{}) + yyh3797.ElemContainerState(yyj3797) if r.TryDecodeAsNil() { - yyv3704[yyj3704] = PersistentVolume{} + yyv3797[yyj3797] = PersistentVolume{} } else { - yyv3706 := &yyv3704[yyj3704] - yyv3706.CodecDecodeSelf(d) + yyv3799 := &yyv3797[yyj3797] + yyv3799.CodecDecodeSelf(d) } } } } else { - yyj3704 := 0 - for ; !r.CheckBreak(); yyj3704++ { + yyj3797 := 0 + for ; !r.CheckBreak(); yyj3797++ { - if yyj3704 >= len(yyv3704) { - yyv3704 = append(yyv3704, PersistentVolume{}) // var yyz3704 PersistentVolume - yyc3704 = true + if yyj3797 >= len(yyv3797) { + yyv3797 = append(yyv3797, PersistentVolume{}) // var yyz3797 PersistentVolume + yyc3797 = true } - yyh3704.ElemContainerState(yyj3704) - if yyj3704 < len(yyv3704) { + yyh3797.ElemContainerState(yyj3797) + if yyj3797 < len(yyv3797) { if r.TryDecodeAsNil() { - yyv3704[yyj3704] = PersistentVolume{} + yyv3797[yyj3797] = PersistentVolume{} } else { - yyv3707 := &yyv3704[yyj3704] - yyv3707.CodecDecodeSelf(d) + yyv3800 := &yyv3797[yyj3797] + yyv3800.CodecDecodeSelf(d) } } else { @@ -46011,17 +47337,17 @@ func (x codecSelfer1234) decSlicePersistentVolume(v *[]PersistentVolume, d *code } } - if yyj3704 < len(yyv3704) { - yyv3704 = yyv3704[:yyj3704] - yyc3704 = true - } else if yyj3704 == 0 && yyv3704 == nil { - yyv3704 = []PersistentVolume{} - yyc3704 = true + if yyj3797 < len(yyv3797) { + yyv3797 = yyv3797[:yyj3797] + yyc3797 = true + } else if yyj3797 == 0 && yyv3797 == nil { + yyv3797 = []PersistentVolume{} + yyc3797 = true } } - yyh3704.End() - if yyc3704 { - *v = yyv3704 + yyh3797.End() + if yyc3797 { + *v = yyv3797 } } @@ -46030,10 +47356,10 @@ func (x codecSelfer1234) encSlicePersistentVolumeClaim(v []PersistentVolumeClaim z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3708 := range v { + for _, yyv3801 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3709 := &yyv3708 - yy3709.CodecEncodeSelf(e) + yy3802 := &yyv3801 + yy3802.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46043,83 +47369,83 @@ func (x codecSelfer1234) decSlicePersistentVolumeClaim(v *[]PersistentVolumeClai z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3710 := *v - yyh3710, yyl3710 := z.DecSliceHelperStart() - var yyc3710 bool - if yyl3710 == 0 { - if yyv3710 == nil { - yyv3710 = []PersistentVolumeClaim{} - yyc3710 = true - } else if len(yyv3710) != 0 { - yyv3710 = yyv3710[:0] - yyc3710 = true + yyv3803 := *v + yyh3803, yyl3803 := z.DecSliceHelperStart() + var yyc3803 bool + if yyl3803 == 0 { + if yyv3803 == nil { + yyv3803 = []PersistentVolumeClaim{} + yyc3803 = true + } else if len(yyv3803) != 0 { + yyv3803 = yyv3803[:0] + yyc3803 = true } - } else if yyl3710 > 0 { - var yyrr3710, yyrl3710 int - var yyrt3710 bool - if yyl3710 > cap(yyv3710) { + } else if yyl3803 > 0 { + var yyrr3803, yyrl3803 int + var yyrt3803 bool + if yyl3803 > cap(yyv3803) { - yyrg3710 := len(yyv3710) > 0 - yyv23710 := yyv3710 - yyrl3710, yyrt3710 = z.DecInferLen(yyl3710, z.DecBasicHandle().MaxInitLen, 296) - if yyrt3710 { - if yyrl3710 <= cap(yyv3710) { - yyv3710 = yyv3710[:yyrl3710] + yyrg3803 := len(yyv3803) > 0 + yyv23803 := yyv3803 + yyrl3803, yyrt3803 = z.DecInferLen(yyl3803, z.DecBasicHandle().MaxInitLen, 296) + if yyrt3803 { + if yyrl3803 <= cap(yyv3803) { + yyv3803 = yyv3803[:yyrl3803] } else { - yyv3710 = make([]PersistentVolumeClaim, yyrl3710) + yyv3803 = make([]PersistentVolumeClaim, yyrl3803) } } else { - yyv3710 = make([]PersistentVolumeClaim, yyrl3710) + yyv3803 = make([]PersistentVolumeClaim, yyrl3803) } - yyc3710 = true - yyrr3710 = len(yyv3710) - if yyrg3710 { - copy(yyv3710, yyv23710) + yyc3803 = true + yyrr3803 = len(yyv3803) + if yyrg3803 { + copy(yyv3803, yyv23803) } - } else if yyl3710 != len(yyv3710) { - yyv3710 = yyv3710[:yyl3710] - yyc3710 = true + } else if yyl3803 != len(yyv3803) { + yyv3803 = yyv3803[:yyl3803] + yyc3803 = true } - yyj3710 := 0 - for ; yyj3710 < yyrr3710; yyj3710++ { - yyh3710.ElemContainerState(yyj3710) + yyj3803 := 0 + for ; yyj3803 < yyrr3803; yyj3803++ { + yyh3803.ElemContainerState(yyj3803) if r.TryDecodeAsNil() { - yyv3710[yyj3710] = PersistentVolumeClaim{} + yyv3803[yyj3803] = PersistentVolumeClaim{} } else { - yyv3711 := &yyv3710[yyj3710] - yyv3711.CodecDecodeSelf(d) + yyv3804 := &yyv3803[yyj3803] + yyv3804.CodecDecodeSelf(d) } } - if yyrt3710 { - for ; yyj3710 < yyl3710; yyj3710++ { - yyv3710 = append(yyv3710, PersistentVolumeClaim{}) - yyh3710.ElemContainerState(yyj3710) + if yyrt3803 { + for ; yyj3803 < yyl3803; yyj3803++ { + yyv3803 = append(yyv3803, PersistentVolumeClaim{}) + yyh3803.ElemContainerState(yyj3803) if r.TryDecodeAsNil() { - yyv3710[yyj3710] = PersistentVolumeClaim{} + yyv3803[yyj3803] = PersistentVolumeClaim{} } else { - yyv3712 := &yyv3710[yyj3710] - yyv3712.CodecDecodeSelf(d) + yyv3805 := &yyv3803[yyj3803] + yyv3805.CodecDecodeSelf(d) } } } } else { - yyj3710 := 0 - for ; !r.CheckBreak(); yyj3710++ { + yyj3803 := 0 + for ; !r.CheckBreak(); yyj3803++ { - if yyj3710 >= len(yyv3710) { - yyv3710 = append(yyv3710, PersistentVolumeClaim{}) // var yyz3710 PersistentVolumeClaim - yyc3710 = true + if yyj3803 >= len(yyv3803) { + yyv3803 = append(yyv3803, PersistentVolumeClaim{}) // var yyz3803 PersistentVolumeClaim + yyc3803 = true } - yyh3710.ElemContainerState(yyj3710) - if yyj3710 < len(yyv3710) { + yyh3803.ElemContainerState(yyj3803) + if yyj3803 < len(yyv3803) { if r.TryDecodeAsNil() { - yyv3710[yyj3710] = PersistentVolumeClaim{} + yyv3803[yyj3803] = PersistentVolumeClaim{} } else { - yyv3713 := &yyv3710[yyj3710] - yyv3713.CodecDecodeSelf(d) + yyv3806 := &yyv3803[yyj3803] + yyv3806.CodecDecodeSelf(d) } } else { @@ -46127,17 +47453,17 @@ func (x codecSelfer1234) decSlicePersistentVolumeClaim(v *[]PersistentVolumeClai } } - if yyj3710 < len(yyv3710) { - yyv3710 = yyv3710[:yyj3710] - yyc3710 = true - } else if yyj3710 == 0 && yyv3710 == nil { - yyv3710 = []PersistentVolumeClaim{} - yyc3710 = true + if yyj3803 < len(yyv3803) { + yyv3803 = yyv3803[:yyj3803] + yyc3803 = true + } else if yyj3803 == 0 && yyv3803 == nil { + yyv3803 = []PersistentVolumeClaim{} + yyc3803 = true } } - yyh3710.End() - if yyc3710 { - *v = yyv3710 + yyh3803.End() + if yyc3803 { + *v = yyv3803 } } @@ -46146,9 +47472,9 @@ func (x codecSelfer1234) encSliceCapability(v []Capability, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3714 := range v { + for _, yyv3807 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yyv3714.CodecEncodeSelf(e) + yyv3807.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46158,75 +47484,75 @@ func (x codecSelfer1234) decSliceCapability(v *[]Capability, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3715 := *v - yyh3715, yyl3715 := z.DecSliceHelperStart() - var yyc3715 bool - if yyl3715 == 0 { - if yyv3715 == nil { - yyv3715 = []Capability{} - yyc3715 = true - } else if len(yyv3715) != 0 { - yyv3715 = yyv3715[:0] - yyc3715 = true + yyv3808 := *v + yyh3808, yyl3808 := z.DecSliceHelperStart() + var yyc3808 bool + if yyl3808 == 0 { + if yyv3808 == nil { + yyv3808 = []Capability{} + yyc3808 = true + } else if len(yyv3808) != 0 { + yyv3808 = yyv3808[:0] + yyc3808 = true } - } else if yyl3715 > 0 { - var yyrr3715, yyrl3715 int - var yyrt3715 bool - if yyl3715 > cap(yyv3715) { + } else if yyl3808 > 0 { + var yyrr3808, yyrl3808 int + var yyrt3808 bool + if yyl3808 > cap(yyv3808) { - yyrl3715, yyrt3715 = z.DecInferLen(yyl3715, z.DecBasicHandle().MaxInitLen, 16) - if yyrt3715 { - if yyrl3715 <= cap(yyv3715) { - yyv3715 = yyv3715[:yyrl3715] + yyrl3808, yyrt3808 = z.DecInferLen(yyl3808, z.DecBasicHandle().MaxInitLen, 16) + if yyrt3808 { + if yyrl3808 <= cap(yyv3808) { + yyv3808 = yyv3808[:yyrl3808] } else { - yyv3715 = make([]Capability, yyrl3715) + yyv3808 = make([]Capability, yyrl3808) } } else { - yyv3715 = make([]Capability, yyrl3715) + yyv3808 = make([]Capability, yyrl3808) } - yyc3715 = true - yyrr3715 = len(yyv3715) - } else if yyl3715 != len(yyv3715) { - yyv3715 = yyv3715[:yyl3715] - yyc3715 = true + yyc3808 = true + yyrr3808 = len(yyv3808) + } else if yyl3808 != len(yyv3808) { + yyv3808 = yyv3808[:yyl3808] + yyc3808 = true } - yyj3715 := 0 - for ; yyj3715 < yyrr3715; yyj3715++ { - yyh3715.ElemContainerState(yyj3715) + yyj3808 := 0 + for ; yyj3808 < yyrr3808; yyj3808++ { + yyh3808.ElemContainerState(yyj3808) if r.TryDecodeAsNil() { - yyv3715[yyj3715] = "" + yyv3808[yyj3808] = "" } else { - yyv3715[yyj3715] = Capability(r.DecodeString()) + yyv3808[yyj3808] = Capability(r.DecodeString()) } } - if yyrt3715 { - for ; yyj3715 < yyl3715; yyj3715++ { - yyv3715 = append(yyv3715, "") - yyh3715.ElemContainerState(yyj3715) + if yyrt3808 { + for ; yyj3808 < yyl3808; yyj3808++ { + yyv3808 = append(yyv3808, "") + yyh3808.ElemContainerState(yyj3808) if r.TryDecodeAsNil() { - yyv3715[yyj3715] = "" + yyv3808[yyj3808] = "" } else { - yyv3715[yyj3715] = Capability(r.DecodeString()) + yyv3808[yyj3808] = Capability(r.DecodeString()) } } } } else { - yyj3715 := 0 - for ; !r.CheckBreak(); yyj3715++ { + yyj3808 := 0 + for ; !r.CheckBreak(); yyj3808++ { - if yyj3715 >= len(yyv3715) { - yyv3715 = append(yyv3715, "") // var yyz3715 Capability - yyc3715 = true + if yyj3808 >= len(yyv3808) { + yyv3808 = append(yyv3808, "") // var yyz3808 Capability + yyc3808 = true } - yyh3715.ElemContainerState(yyj3715) - if yyj3715 < len(yyv3715) { + yyh3808.ElemContainerState(yyj3808) + if yyj3808 < len(yyv3808) { if r.TryDecodeAsNil() { - yyv3715[yyj3715] = "" + yyv3808[yyj3808] = "" } else { - yyv3715[yyj3715] = Capability(r.DecodeString()) + yyv3808[yyj3808] = Capability(r.DecodeString()) } } else { @@ -46234,17 +47560,17 @@ func (x codecSelfer1234) decSliceCapability(v *[]Capability, d *codec1978.Decode } } - if yyj3715 < len(yyv3715) { - yyv3715 = yyv3715[:yyj3715] - yyc3715 = true - } else if yyj3715 == 0 && yyv3715 == nil { - yyv3715 = []Capability{} - yyc3715 = true + if yyj3808 < len(yyv3808) { + yyv3808 = yyv3808[:yyj3808] + yyc3808 = true + } else if yyj3808 == 0 && yyv3808 == nil { + yyv3808 = []Capability{} + yyc3808 = true } } - yyh3715.End() - if yyc3715 { - *v = yyv3715 + yyh3808.End() + if yyc3808 { + *v = yyv3808 } } @@ -46253,10 +47579,10 @@ func (x codecSelfer1234) encSliceContainerPort(v []ContainerPort, e *codec1978.E z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3719 := range v { + for _, yyv3812 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3720 := &yyv3719 - yy3720.CodecEncodeSelf(e) + yy3813 := &yyv3812 + yy3813.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46266,83 +47592,83 @@ func (x codecSelfer1234) decSliceContainerPort(v *[]ContainerPort, d *codec1978. z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3721 := *v - yyh3721, yyl3721 := z.DecSliceHelperStart() - var yyc3721 bool - if yyl3721 == 0 { - if yyv3721 == nil { - yyv3721 = []ContainerPort{} - yyc3721 = true - } else if len(yyv3721) != 0 { - yyv3721 = yyv3721[:0] - yyc3721 = true + yyv3814 := *v + yyh3814, yyl3814 := z.DecSliceHelperStart() + var yyc3814 bool + if yyl3814 == 0 { + if yyv3814 == nil { + yyv3814 = []ContainerPort{} + yyc3814 = true + } else if len(yyv3814) != 0 { + yyv3814 = yyv3814[:0] + yyc3814 = true } - } else if yyl3721 > 0 { - var yyrr3721, yyrl3721 int - var yyrt3721 bool - if yyl3721 > cap(yyv3721) { + } else if yyl3814 > 0 { + var yyrr3814, yyrl3814 int + var yyrt3814 bool + if yyl3814 > cap(yyv3814) { - yyrg3721 := len(yyv3721) > 0 - yyv23721 := yyv3721 - yyrl3721, yyrt3721 = z.DecInferLen(yyl3721, z.DecBasicHandle().MaxInitLen, 56) - if yyrt3721 { - if yyrl3721 <= cap(yyv3721) { - yyv3721 = yyv3721[:yyrl3721] + yyrg3814 := len(yyv3814) > 0 + yyv23814 := yyv3814 + yyrl3814, yyrt3814 = z.DecInferLen(yyl3814, z.DecBasicHandle().MaxInitLen, 56) + if yyrt3814 { + if yyrl3814 <= cap(yyv3814) { + yyv3814 = yyv3814[:yyrl3814] } else { - yyv3721 = make([]ContainerPort, yyrl3721) + yyv3814 = make([]ContainerPort, yyrl3814) } } else { - yyv3721 = make([]ContainerPort, yyrl3721) + yyv3814 = make([]ContainerPort, yyrl3814) } - yyc3721 = true - yyrr3721 = len(yyv3721) - if yyrg3721 { - copy(yyv3721, yyv23721) + yyc3814 = true + yyrr3814 = len(yyv3814) + if yyrg3814 { + copy(yyv3814, yyv23814) } - } else if yyl3721 != len(yyv3721) { - yyv3721 = yyv3721[:yyl3721] - yyc3721 = true + } else if yyl3814 != len(yyv3814) { + yyv3814 = yyv3814[:yyl3814] + yyc3814 = true } - yyj3721 := 0 - for ; yyj3721 < yyrr3721; yyj3721++ { - yyh3721.ElemContainerState(yyj3721) + yyj3814 := 0 + for ; yyj3814 < yyrr3814; yyj3814++ { + yyh3814.ElemContainerState(yyj3814) if r.TryDecodeAsNil() { - yyv3721[yyj3721] = ContainerPort{} + yyv3814[yyj3814] = ContainerPort{} } else { - yyv3722 := &yyv3721[yyj3721] - yyv3722.CodecDecodeSelf(d) + yyv3815 := &yyv3814[yyj3814] + yyv3815.CodecDecodeSelf(d) } } - if yyrt3721 { - for ; yyj3721 < yyl3721; yyj3721++ { - yyv3721 = append(yyv3721, ContainerPort{}) - yyh3721.ElemContainerState(yyj3721) + if yyrt3814 { + for ; yyj3814 < yyl3814; yyj3814++ { + yyv3814 = append(yyv3814, ContainerPort{}) + yyh3814.ElemContainerState(yyj3814) if r.TryDecodeAsNil() { - yyv3721[yyj3721] = ContainerPort{} + yyv3814[yyj3814] = ContainerPort{} } else { - yyv3723 := &yyv3721[yyj3721] - yyv3723.CodecDecodeSelf(d) + yyv3816 := &yyv3814[yyj3814] + yyv3816.CodecDecodeSelf(d) } } } } else { - yyj3721 := 0 - for ; !r.CheckBreak(); yyj3721++ { + yyj3814 := 0 + for ; !r.CheckBreak(); yyj3814++ { - if yyj3721 >= len(yyv3721) { - yyv3721 = append(yyv3721, ContainerPort{}) // var yyz3721 ContainerPort - yyc3721 = true + if yyj3814 >= len(yyv3814) { + yyv3814 = append(yyv3814, ContainerPort{}) // var yyz3814 ContainerPort + yyc3814 = true } - yyh3721.ElemContainerState(yyj3721) - if yyj3721 < len(yyv3721) { + yyh3814.ElemContainerState(yyj3814) + if yyj3814 < len(yyv3814) { if r.TryDecodeAsNil() { - yyv3721[yyj3721] = ContainerPort{} + yyv3814[yyj3814] = ContainerPort{} } else { - yyv3724 := &yyv3721[yyj3721] - yyv3724.CodecDecodeSelf(d) + yyv3817 := &yyv3814[yyj3814] + yyv3817.CodecDecodeSelf(d) } } else { @@ -46350,17 +47676,17 @@ func (x codecSelfer1234) decSliceContainerPort(v *[]ContainerPort, d *codec1978. } } - if yyj3721 < len(yyv3721) { - yyv3721 = yyv3721[:yyj3721] - yyc3721 = true - } else if yyj3721 == 0 && yyv3721 == nil { - yyv3721 = []ContainerPort{} - yyc3721 = true + if yyj3814 < len(yyv3814) { + yyv3814 = yyv3814[:yyj3814] + yyc3814 = true + } else if yyj3814 == 0 && yyv3814 == nil { + yyv3814 = []ContainerPort{} + yyc3814 = true } } - yyh3721.End() - if yyc3721 { - *v = yyv3721 + yyh3814.End() + if yyc3814 { + *v = yyv3814 } } @@ -46369,10 +47695,10 @@ func (x codecSelfer1234) encSliceEnvVar(v []EnvVar, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3725 := range v { + for _, yyv3818 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3726 := &yyv3725 - yy3726.CodecEncodeSelf(e) + yy3819 := &yyv3818 + yy3819.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46382,83 +47708,83 @@ func (x codecSelfer1234) decSliceEnvVar(v *[]EnvVar, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3727 := *v - yyh3727, yyl3727 := z.DecSliceHelperStart() - var yyc3727 bool - if yyl3727 == 0 { - if yyv3727 == nil { - yyv3727 = []EnvVar{} - yyc3727 = true - } else if len(yyv3727) != 0 { - yyv3727 = yyv3727[:0] - yyc3727 = true + yyv3820 := *v + yyh3820, yyl3820 := z.DecSliceHelperStart() + var yyc3820 bool + if yyl3820 == 0 { + if yyv3820 == nil { + yyv3820 = []EnvVar{} + yyc3820 = true + } else if len(yyv3820) != 0 { + yyv3820 = yyv3820[:0] + yyc3820 = true } - } else if yyl3727 > 0 { - var yyrr3727, yyrl3727 int - var yyrt3727 bool - if yyl3727 > cap(yyv3727) { + } else if yyl3820 > 0 { + var yyrr3820, yyrl3820 int + var yyrt3820 bool + if yyl3820 > cap(yyv3820) { - yyrg3727 := len(yyv3727) > 0 - yyv23727 := yyv3727 - yyrl3727, yyrt3727 = z.DecInferLen(yyl3727, z.DecBasicHandle().MaxInitLen, 40) - if yyrt3727 { - if yyrl3727 <= cap(yyv3727) { - yyv3727 = yyv3727[:yyrl3727] + yyrg3820 := len(yyv3820) > 0 + yyv23820 := yyv3820 + yyrl3820, yyrt3820 = z.DecInferLen(yyl3820, z.DecBasicHandle().MaxInitLen, 40) + if yyrt3820 { + if yyrl3820 <= cap(yyv3820) { + yyv3820 = yyv3820[:yyrl3820] } else { - yyv3727 = make([]EnvVar, yyrl3727) + yyv3820 = make([]EnvVar, yyrl3820) } } else { - yyv3727 = make([]EnvVar, yyrl3727) + yyv3820 = make([]EnvVar, yyrl3820) } - yyc3727 = true - yyrr3727 = len(yyv3727) - if yyrg3727 { - copy(yyv3727, yyv23727) + yyc3820 = true + yyrr3820 = len(yyv3820) + if yyrg3820 { + copy(yyv3820, yyv23820) } - } else if yyl3727 != len(yyv3727) { - yyv3727 = yyv3727[:yyl3727] - yyc3727 = true + } else if yyl3820 != len(yyv3820) { + yyv3820 = yyv3820[:yyl3820] + yyc3820 = true } - yyj3727 := 0 - for ; yyj3727 < yyrr3727; yyj3727++ { - yyh3727.ElemContainerState(yyj3727) + yyj3820 := 0 + for ; yyj3820 < yyrr3820; yyj3820++ { + yyh3820.ElemContainerState(yyj3820) if r.TryDecodeAsNil() { - yyv3727[yyj3727] = EnvVar{} + yyv3820[yyj3820] = EnvVar{} } else { - yyv3728 := &yyv3727[yyj3727] - yyv3728.CodecDecodeSelf(d) + yyv3821 := &yyv3820[yyj3820] + yyv3821.CodecDecodeSelf(d) } } - if yyrt3727 { - for ; yyj3727 < yyl3727; yyj3727++ { - yyv3727 = append(yyv3727, EnvVar{}) - yyh3727.ElemContainerState(yyj3727) + if yyrt3820 { + for ; yyj3820 < yyl3820; yyj3820++ { + yyv3820 = append(yyv3820, EnvVar{}) + yyh3820.ElemContainerState(yyj3820) if r.TryDecodeAsNil() { - yyv3727[yyj3727] = EnvVar{} + yyv3820[yyj3820] = EnvVar{} } else { - yyv3729 := &yyv3727[yyj3727] - yyv3729.CodecDecodeSelf(d) + yyv3822 := &yyv3820[yyj3820] + yyv3822.CodecDecodeSelf(d) } } } } else { - yyj3727 := 0 - for ; !r.CheckBreak(); yyj3727++ { + yyj3820 := 0 + for ; !r.CheckBreak(); yyj3820++ { - if yyj3727 >= len(yyv3727) { - yyv3727 = append(yyv3727, EnvVar{}) // var yyz3727 EnvVar - yyc3727 = true + if yyj3820 >= len(yyv3820) { + yyv3820 = append(yyv3820, EnvVar{}) // var yyz3820 EnvVar + yyc3820 = true } - yyh3727.ElemContainerState(yyj3727) - if yyj3727 < len(yyv3727) { + yyh3820.ElemContainerState(yyj3820) + if yyj3820 < len(yyv3820) { if r.TryDecodeAsNil() { - yyv3727[yyj3727] = EnvVar{} + yyv3820[yyj3820] = EnvVar{} } else { - yyv3730 := &yyv3727[yyj3727] - yyv3730.CodecDecodeSelf(d) + yyv3823 := &yyv3820[yyj3820] + yyv3823.CodecDecodeSelf(d) } } else { @@ -46466,17 +47792,17 @@ func (x codecSelfer1234) decSliceEnvVar(v *[]EnvVar, d *codec1978.Decoder) { } } - if yyj3727 < len(yyv3727) { - yyv3727 = yyv3727[:yyj3727] - yyc3727 = true - } else if yyj3727 == 0 && yyv3727 == nil { - yyv3727 = []EnvVar{} - yyc3727 = true + if yyj3820 < len(yyv3820) { + yyv3820 = yyv3820[:yyj3820] + yyc3820 = true + } else if yyj3820 == 0 && yyv3820 == nil { + yyv3820 = []EnvVar{} + yyc3820 = true } } - yyh3727.End() - if yyc3727 { - *v = yyv3727 + yyh3820.End() + if yyc3820 { + *v = yyv3820 } } @@ -46485,10 +47811,10 @@ func (x codecSelfer1234) encSliceVolumeMount(v []VolumeMount, e *codec1978.Encod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3731 := range v { + for _, yyv3824 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3732 := &yyv3731 - yy3732.CodecEncodeSelf(e) + yy3825 := &yyv3824 + yy3825.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46498,83 +47824,83 @@ func (x codecSelfer1234) decSliceVolumeMount(v *[]VolumeMount, d *codec1978.Deco z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3733 := *v - yyh3733, yyl3733 := z.DecSliceHelperStart() - var yyc3733 bool - if yyl3733 == 0 { - if yyv3733 == nil { - yyv3733 = []VolumeMount{} - yyc3733 = true - } else if len(yyv3733) != 0 { - yyv3733 = yyv3733[:0] - yyc3733 = true + yyv3826 := *v + yyh3826, yyl3826 := z.DecSliceHelperStart() + var yyc3826 bool + if yyl3826 == 0 { + if yyv3826 == nil { + yyv3826 = []VolumeMount{} + yyc3826 = true + } else if len(yyv3826) != 0 { + yyv3826 = yyv3826[:0] + yyc3826 = true } - } else if yyl3733 > 0 { - var yyrr3733, yyrl3733 int - var yyrt3733 bool - if yyl3733 > cap(yyv3733) { + } else if yyl3826 > 0 { + var yyrr3826, yyrl3826 int + var yyrt3826 bool + if yyl3826 > cap(yyv3826) { - yyrg3733 := len(yyv3733) > 0 - yyv23733 := yyv3733 - yyrl3733, yyrt3733 = z.DecInferLen(yyl3733, z.DecBasicHandle().MaxInitLen, 40) - if yyrt3733 { - if yyrl3733 <= cap(yyv3733) { - yyv3733 = yyv3733[:yyrl3733] + yyrg3826 := len(yyv3826) > 0 + yyv23826 := yyv3826 + yyrl3826, yyrt3826 = z.DecInferLen(yyl3826, z.DecBasicHandle().MaxInitLen, 40) + if yyrt3826 { + if yyrl3826 <= cap(yyv3826) { + yyv3826 = yyv3826[:yyrl3826] } else { - yyv3733 = make([]VolumeMount, yyrl3733) + yyv3826 = make([]VolumeMount, yyrl3826) } } else { - yyv3733 = make([]VolumeMount, yyrl3733) + yyv3826 = make([]VolumeMount, yyrl3826) } - yyc3733 = true - yyrr3733 = len(yyv3733) - if yyrg3733 { - copy(yyv3733, yyv23733) + yyc3826 = true + yyrr3826 = len(yyv3826) + if yyrg3826 { + copy(yyv3826, yyv23826) } - } else if yyl3733 != len(yyv3733) { - yyv3733 = yyv3733[:yyl3733] - yyc3733 = true + } else if yyl3826 != len(yyv3826) { + yyv3826 = yyv3826[:yyl3826] + yyc3826 = true } - yyj3733 := 0 - for ; yyj3733 < yyrr3733; yyj3733++ { - yyh3733.ElemContainerState(yyj3733) + yyj3826 := 0 + for ; yyj3826 < yyrr3826; yyj3826++ { + yyh3826.ElemContainerState(yyj3826) if r.TryDecodeAsNil() { - yyv3733[yyj3733] = VolumeMount{} + yyv3826[yyj3826] = VolumeMount{} } else { - yyv3734 := &yyv3733[yyj3733] - yyv3734.CodecDecodeSelf(d) + yyv3827 := &yyv3826[yyj3826] + yyv3827.CodecDecodeSelf(d) } } - if yyrt3733 { - for ; yyj3733 < yyl3733; yyj3733++ { - yyv3733 = append(yyv3733, VolumeMount{}) - yyh3733.ElemContainerState(yyj3733) + if yyrt3826 { + for ; yyj3826 < yyl3826; yyj3826++ { + yyv3826 = append(yyv3826, VolumeMount{}) + yyh3826.ElemContainerState(yyj3826) if r.TryDecodeAsNil() { - yyv3733[yyj3733] = VolumeMount{} + yyv3826[yyj3826] = VolumeMount{} } else { - yyv3735 := &yyv3733[yyj3733] - yyv3735.CodecDecodeSelf(d) + yyv3828 := &yyv3826[yyj3826] + yyv3828.CodecDecodeSelf(d) } } } } else { - yyj3733 := 0 - for ; !r.CheckBreak(); yyj3733++ { + yyj3826 := 0 + for ; !r.CheckBreak(); yyj3826++ { - if yyj3733 >= len(yyv3733) { - yyv3733 = append(yyv3733, VolumeMount{}) // var yyz3733 VolumeMount - yyc3733 = true + if yyj3826 >= len(yyv3826) { + yyv3826 = append(yyv3826, VolumeMount{}) // var yyz3826 VolumeMount + yyc3826 = true } - yyh3733.ElemContainerState(yyj3733) - if yyj3733 < len(yyv3733) { + yyh3826.ElemContainerState(yyj3826) + if yyj3826 < len(yyv3826) { if r.TryDecodeAsNil() { - yyv3733[yyj3733] = VolumeMount{} + yyv3826[yyj3826] = VolumeMount{} } else { - yyv3736 := &yyv3733[yyj3733] - yyv3736.CodecDecodeSelf(d) + yyv3829 := &yyv3826[yyj3826] + yyv3829.CodecDecodeSelf(d) } } else { @@ -46582,17 +47908,365 @@ func (x codecSelfer1234) decSliceVolumeMount(v *[]VolumeMount, d *codec1978.Deco } } - if yyj3733 < len(yyv3733) { - yyv3733 = yyv3733[:yyj3733] - yyc3733 = true - } else if yyj3733 == 0 && yyv3733 == nil { - yyv3733 = []VolumeMount{} - yyc3733 = true + if yyj3826 < len(yyv3826) { + yyv3826 = yyv3826[:yyj3826] + yyc3826 = true + } else if yyj3826 == 0 && yyv3826 == nil { + yyv3826 = []VolumeMount{} + yyc3826 = true } } - yyh3733.End() - if yyc3733 { - *v = yyv3733 + yyh3826.End() + if yyc3826 { + *v = yyv3826 + } +} + +func (x codecSelfer1234) encSliceNodeSelectorTerm(v []NodeSelectorTerm, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3830 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3831 := &yyv3830 + yy3831.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceNodeSelectorTerm(v *[]NodeSelectorTerm, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3832 := *v + yyh3832, yyl3832 := z.DecSliceHelperStart() + var yyc3832 bool + if yyl3832 == 0 { + if yyv3832 == nil { + yyv3832 = []NodeSelectorTerm{} + yyc3832 = true + } else if len(yyv3832) != 0 { + yyv3832 = yyv3832[:0] + yyc3832 = true + } + } else if yyl3832 > 0 { + var yyrr3832, yyrl3832 int + var yyrt3832 bool + if yyl3832 > cap(yyv3832) { + + yyrg3832 := len(yyv3832) > 0 + yyv23832 := yyv3832 + yyrl3832, yyrt3832 = z.DecInferLen(yyl3832, z.DecBasicHandle().MaxInitLen, 24) + if yyrt3832 { + if yyrl3832 <= cap(yyv3832) { + yyv3832 = yyv3832[:yyrl3832] + } else { + yyv3832 = make([]NodeSelectorTerm, yyrl3832) + } + } else { + yyv3832 = make([]NodeSelectorTerm, yyrl3832) + } + yyc3832 = true + yyrr3832 = len(yyv3832) + if yyrg3832 { + copy(yyv3832, yyv23832) + } + } else if yyl3832 != len(yyv3832) { + yyv3832 = yyv3832[:yyl3832] + yyc3832 = true + } + yyj3832 := 0 + for ; yyj3832 < yyrr3832; yyj3832++ { + yyh3832.ElemContainerState(yyj3832) + if r.TryDecodeAsNil() { + yyv3832[yyj3832] = NodeSelectorTerm{} + } else { + yyv3833 := &yyv3832[yyj3832] + yyv3833.CodecDecodeSelf(d) + } + + } + if yyrt3832 { + for ; yyj3832 < yyl3832; yyj3832++ { + yyv3832 = append(yyv3832, NodeSelectorTerm{}) + yyh3832.ElemContainerState(yyj3832) + if r.TryDecodeAsNil() { + yyv3832[yyj3832] = NodeSelectorTerm{} + } else { + yyv3834 := &yyv3832[yyj3832] + yyv3834.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3832 := 0 + for ; !r.CheckBreak(); yyj3832++ { + + if yyj3832 >= len(yyv3832) { + yyv3832 = append(yyv3832, NodeSelectorTerm{}) // var yyz3832 NodeSelectorTerm + yyc3832 = true + } + yyh3832.ElemContainerState(yyj3832) + if yyj3832 < len(yyv3832) { + if r.TryDecodeAsNil() { + yyv3832[yyj3832] = NodeSelectorTerm{} + } else { + yyv3835 := &yyv3832[yyj3832] + yyv3835.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3832 < len(yyv3832) { + yyv3832 = yyv3832[:yyj3832] + yyc3832 = true + } else if yyj3832 == 0 && yyv3832 == nil { + yyv3832 = []NodeSelectorTerm{} + yyc3832 = true + } + } + yyh3832.End() + if yyc3832 { + *v = yyv3832 + } +} + +func (x codecSelfer1234) encSliceNodeSelectorRequirement(v []NodeSelectorRequirement, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3836 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3837 := &yyv3836 + yy3837.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceNodeSelectorRequirement(v *[]NodeSelectorRequirement, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3838 := *v + yyh3838, yyl3838 := z.DecSliceHelperStart() + var yyc3838 bool + if yyl3838 == 0 { + if yyv3838 == nil { + yyv3838 = []NodeSelectorRequirement{} + yyc3838 = true + } else if len(yyv3838) != 0 { + yyv3838 = yyv3838[:0] + yyc3838 = true + } + } else if yyl3838 > 0 { + var yyrr3838, yyrl3838 int + var yyrt3838 bool + if yyl3838 > cap(yyv3838) { + + yyrg3838 := len(yyv3838) > 0 + yyv23838 := yyv3838 + yyrl3838, yyrt3838 = z.DecInferLen(yyl3838, z.DecBasicHandle().MaxInitLen, 56) + if yyrt3838 { + if yyrl3838 <= cap(yyv3838) { + yyv3838 = yyv3838[:yyrl3838] + } else { + yyv3838 = make([]NodeSelectorRequirement, yyrl3838) + } + } else { + yyv3838 = make([]NodeSelectorRequirement, yyrl3838) + } + yyc3838 = true + yyrr3838 = len(yyv3838) + if yyrg3838 { + copy(yyv3838, yyv23838) + } + } else if yyl3838 != len(yyv3838) { + yyv3838 = yyv3838[:yyl3838] + yyc3838 = true + } + yyj3838 := 0 + for ; yyj3838 < yyrr3838; yyj3838++ { + yyh3838.ElemContainerState(yyj3838) + if r.TryDecodeAsNil() { + yyv3838[yyj3838] = NodeSelectorRequirement{} + } else { + yyv3839 := &yyv3838[yyj3838] + yyv3839.CodecDecodeSelf(d) + } + + } + if yyrt3838 { + for ; yyj3838 < yyl3838; yyj3838++ { + yyv3838 = append(yyv3838, NodeSelectorRequirement{}) + yyh3838.ElemContainerState(yyj3838) + if r.TryDecodeAsNil() { + yyv3838[yyj3838] = NodeSelectorRequirement{} + } else { + yyv3840 := &yyv3838[yyj3838] + yyv3840.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3838 := 0 + for ; !r.CheckBreak(); yyj3838++ { + + if yyj3838 >= len(yyv3838) { + yyv3838 = append(yyv3838, NodeSelectorRequirement{}) // var yyz3838 NodeSelectorRequirement + yyc3838 = true + } + yyh3838.ElemContainerState(yyj3838) + if yyj3838 < len(yyv3838) { + if r.TryDecodeAsNil() { + yyv3838[yyj3838] = NodeSelectorRequirement{} + } else { + yyv3841 := &yyv3838[yyj3838] + yyv3841.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3838 < len(yyv3838) { + yyv3838 = yyv3838[:yyj3838] + yyc3838 = true + } else if yyj3838 == 0 && yyv3838 == nil { + yyv3838 = []NodeSelectorRequirement{} + yyc3838 = true + } + } + yyh3838.End() + if yyc3838 { + *v = yyv3838 + } +} + +func (x codecSelfer1234) encSlicePreferredSchedulingTerm(v []PreferredSchedulingTerm, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3842 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3843 := &yyv3842 + yy3843.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSlicePreferredSchedulingTerm(v *[]PreferredSchedulingTerm, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3844 := *v + yyh3844, yyl3844 := z.DecSliceHelperStart() + var yyc3844 bool + if yyl3844 == 0 { + if yyv3844 == nil { + yyv3844 = []PreferredSchedulingTerm{} + yyc3844 = true + } else if len(yyv3844) != 0 { + yyv3844 = yyv3844[:0] + yyc3844 = true + } + } else if yyl3844 > 0 { + var yyrr3844, yyrl3844 int + var yyrt3844 bool + if yyl3844 > cap(yyv3844) { + + yyrg3844 := len(yyv3844) > 0 + yyv23844 := yyv3844 + yyrl3844, yyrt3844 = z.DecInferLen(yyl3844, z.DecBasicHandle().MaxInitLen, 32) + if yyrt3844 { + if yyrl3844 <= cap(yyv3844) { + yyv3844 = yyv3844[:yyrl3844] + } else { + yyv3844 = make([]PreferredSchedulingTerm, yyrl3844) + } + } else { + yyv3844 = make([]PreferredSchedulingTerm, yyrl3844) + } + yyc3844 = true + yyrr3844 = len(yyv3844) + if yyrg3844 { + copy(yyv3844, yyv23844) + } + } else if yyl3844 != len(yyv3844) { + yyv3844 = yyv3844[:yyl3844] + yyc3844 = true + } + yyj3844 := 0 + for ; yyj3844 < yyrr3844; yyj3844++ { + yyh3844.ElemContainerState(yyj3844) + if r.TryDecodeAsNil() { + yyv3844[yyj3844] = PreferredSchedulingTerm{} + } else { + yyv3845 := &yyv3844[yyj3844] + yyv3845.CodecDecodeSelf(d) + } + + } + if yyrt3844 { + for ; yyj3844 < yyl3844; yyj3844++ { + yyv3844 = append(yyv3844, PreferredSchedulingTerm{}) + yyh3844.ElemContainerState(yyj3844) + if r.TryDecodeAsNil() { + yyv3844[yyj3844] = PreferredSchedulingTerm{} + } else { + yyv3846 := &yyv3844[yyj3844] + yyv3846.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3844 := 0 + for ; !r.CheckBreak(); yyj3844++ { + + if yyj3844 >= len(yyv3844) { + yyv3844 = append(yyv3844, PreferredSchedulingTerm{}) // var yyz3844 PreferredSchedulingTerm + yyc3844 = true + } + yyh3844.ElemContainerState(yyj3844) + if yyj3844 < len(yyv3844) { + if r.TryDecodeAsNil() { + yyv3844[yyj3844] = PreferredSchedulingTerm{} + } else { + yyv3847 := &yyv3844[yyj3844] + yyv3847.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3844 < len(yyv3844) { + yyv3844 = yyv3844[:yyj3844] + yyc3844 = true + } else if yyj3844 == 0 && yyv3844 == nil { + yyv3844 = []PreferredSchedulingTerm{} + yyc3844 = true + } + } + yyh3844.End() + if yyc3844 { + *v = yyv3844 } } @@ -46601,10 +48275,10 @@ func (x codecSelfer1234) encSliceVolume(v []Volume, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3737 := range v { + for _, yyv3848 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3738 := &yyv3737 - yy3738.CodecEncodeSelf(e) + yy3849 := &yyv3848 + yy3849.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46614,83 +48288,83 @@ func (x codecSelfer1234) decSliceVolume(v *[]Volume, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3739 := *v - yyh3739, yyl3739 := z.DecSliceHelperStart() - var yyc3739 bool - if yyl3739 == 0 { - if yyv3739 == nil { - yyv3739 = []Volume{} - yyc3739 = true - } else if len(yyv3739) != 0 { - yyv3739 = yyv3739[:0] - yyc3739 = true + yyv3850 := *v + yyh3850, yyl3850 := z.DecSliceHelperStart() + var yyc3850 bool + if yyl3850 == 0 { + if yyv3850 == nil { + yyv3850 = []Volume{} + yyc3850 = true + } else if len(yyv3850) != 0 { + yyv3850 = yyv3850[:0] + yyc3850 = true } - } else if yyl3739 > 0 { - var yyrr3739, yyrl3739 int - var yyrt3739 bool - if yyl3739 > cap(yyv3739) { + } else if yyl3850 > 0 { + var yyrr3850, yyrl3850 int + var yyrt3850 bool + if yyl3850 > cap(yyv3850) { - yyrg3739 := len(yyv3739) > 0 - yyv23739 := yyv3739 - yyrl3739, yyrt3739 = z.DecInferLen(yyl3739, z.DecBasicHandle().MaxInitLen, 152) - if yyrt3739 { - if yyrl3739 <= cap(yyv3739) { - yyv3739 = yyv3739[:yyrl3739] + yyrg3850 := len(yyv3850) > 0 + yyv23850 := yyv3850 + yyrl3850, yyrt3850 = z.DecInferLen(yyl3850, z.DecBasicHandle().MaxInitLen, 152) + if yyrt3850 { + if yyrl3850 <= cap(yyv3850) { + yyv3850 = yyv3850[:yyrl3850] } else { - yyv3739 = make([]Volume, yyrl3739) + yyv3850 = make([]Volume, yyrl3850) } } else { - yyv3739 = make([]Volume, yyrl3739) + yyv3850 = make([]Volume, yyrl3850) } - yyc3739 = true - yyrr3739 = len(yyv3739) - if yyrg3739 { - copy(yyv3739, yyv23739) + yyc3850 = true + yyrr3850 = len(yyv3850) + if yyrg3850 { + copy(yyv3850, yyv23850) } - } else if yyl3739 != len(yyv3739) { - yyv3739 = yyv3739[:yyl3739] - yyc3739 = true + } else if yyl3850 != len(yyv3850) { + yyv3850 = yyv3850[:yyl3850] + yyc3850 = true } - yyj3739 := 0 - for ; yyj3739 < yyrr3739; yyj3739++ { - yyh3739.ElemContainerState(yyj3739) + yyj3850 := 0 + for ; yyj3850 < yyrr3850; yyj3850++ { + yyh3850.ElemContainerState(yyj3850) if r.TryDecodeAsNil() { - yyv3739[yyj3739] = Volume{} + yyv3850[yyj3850] = Volume{} } else { - yyv3740 := &yyv3739[yyj3739] - yyv3740.CodecDecodeSelf(d) + yyv3851 := &yyv3850[yyj3850] + yyv3851.CodecDecodeSelf(d) } } - if yyrt3739 { - for ; yyj3739 < yyl3739; yyj3739++ { - yyv3739 = append(yyv3739, Volume{}) - yyh3739.ElemContainerState(yyj3739) + if yyrt3850 { + for ; yyj3850 < yyl3850; yyj3850++ { + yyv3850 = append(yyv3850, Volume{}) + yyh3850.ElemContainerState(yyj3850) if r.TryDecodeAsNil() { - yyv3739[yyj3739] = Volume{} + yyv3850[yyj3850] = Volume{} } else { - yyv3741 := &yyv3739[yyj3739] - yyv3741.CodecDecodeSelf(d) + yyv3852 := &yyv3850[yyj3850] + yyv3852.CodecDecodeSelf(d) } } } } else { - yyj3739 := 0 - for ; !r.CheckBreak(); yyj3739++ { + yyj3850 := 0 + for ; !r.CheckBreak(); yyj3850++ { - if yyj3739 >= len(yyv3739) { - yyv3739 = append(yyv3739, Volume{}) // var yyz3739 Volume - yyc3739 = true + if yyj3850 >= len(yyv3850) { + yyv3850 = append(yyv3850, Volume{}) // var yyz3850 Volume + yyc3850 = true } - yyh3739.ElemContainerState(yyj3739) - if yyj3739 < len(yyv3739) { + yyh3850.ElemContainerState(yyj3850) + if yyj3850 < len(yyv3850) { if r.TryDecodeAsNil() { - yyv3739[yyj3739] = Volume{} + yyv3850[yyj3850] = Volume{} } else { - yyv3742 := &yyv3739[yyj3739] - yyv3742.CodecDecodeSelf(d) + yyv3853 := &yyv3850[yyj3850] + yyv3853.CodecDecodeSelf(d) } } else { @@ -46698,17 +48372,17 @@ func (x codecSelfer1234) decSliceVolume(v *[]Volume, d *codec1978.Decoder) { } } - if yyj3739 < len(yyv3739) { - yyv3739 = yyv3739[:yyj3739] - yyc3739 = true - } else if yyj3739 == 0 && yyv3739 == nil { - yyv3739 = []Volume{} - yyc3739 = true + if yyj3850 < len(yyv3850) { + yyv3850 = yyv3850[:yyj3850] + yyc3850 = true + } else if yyj3850 == 0 && yyv3850 == nil { + yyv3850 = []Volume{} + yyc3850 = true } } - yyh3739.End() - if yyc3739 { - *v = yyv3739 + yyh3850.End() + if yyc3850 { + *v = yyv3850 } } @@ -46717,10 +48391,10 @@ func (x codecSelfer1234) encSliceContainer(v []Container, e *codec1978.Encoder) z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3743 := range v { + for _, yyv3854 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3744 := &yyv3743 - yy3744.CodecEncodeSelf(e) + yy3855 := &yyv3854 + yy3855.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46730,83 +48404,83 @@ func (x codecSelfer1234) decSliceContainer(v *[]Container, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3745 := *v - yyh3745, yyl3745 := z.DecSliceHelperStart() - var yyc3745 bool - if yyl3745 == 0 { - if yyv3745 == nil { - yyv3745 = []Container{} - yyc3745 = true - } else if len(yyv3745) != 0 { - yyv3745 = yyv3745[:0] - yyc3745 = true + yyv3856 := *v + yyh3856, yyl3856 := z.DecSliceHelperStart() + var yyc3856 bool + if yyl3856 == 0 { + if yyv3856 == nil { + yyv3856 = []Container{} + yyc3856 = true + } else if len(yyv3856) != 0 { + yyv3856 = yyv3856[:0] + yyc3856 = true } - } else if yyl3745 > 0 { - var yyrr3745, yyrl3745 int - var yyrt3745 bool - if yyl3745 > cap(yyv3745) { + } else if yyl3856 > 0 { + var yyrr3856, yyrl3856 int + var yyrt3856 bool + if yyl3856 > cap(yyv3856) { - yyrg3745 := len(yyv3745) > 0 - yyv23745 := yyv3745 - yyrl3745, yyrt3745 = z.DecInferLen(yyl3745, z.DecBasicHandle().MaxInitLen, 256) - if yyrt3745 { - if yyrl3745 <= cap(yyv3745) { - yyv3745 = yyv3745[:yyrl3745] + yyrg3856 := len(yyv3856) > 0 + yyv23856 := yyv3856 + yyrl3856, yyrt3856 = z.DecInferLen(yyl3856, z.DecBasicHandle().MaxInitLen, 256) + if yyrt3856 { + if yyrl3856 <= cap(yyv3856) { + yyv3856 = yyv3856[:yyrl3856] } else { - yyv3745 = make([]Container, yyrl3745) + yyv3856 = make([]Container, yyrl3856) } } else { - yyv3745 = make([]Container, yyrl3745) + yyv3856 = make([]Container, yyrl3856) } - yyc3745 = true - yyrr3745 = len(yyv3745) - if yyrg3745 { - copy(yyv3745, yyv23745) + yyc3856 = true + yyrr3856 = len(yyv3856) + if yyrg3856 { + copy(yyv3856, yyv23856) } - } else if yyl3745 != len(yyv3745) { - yyv3745 = yyv3745[:yyl3745] - yyc3745 = true + } else if yyl3856 != len(yyv3856) { + yyv3856 = yyv3856[:yyl3856] + yyc3856 = true } - yyj3745 := 0 - for ; yyj3745 < yyrr3745; yyj3745++ { - yyh3745.ElemContainerState(yyj3745) + yyj3856 := 0 + for ; yyj3856 < yyrr3856; yyj3856++ { + yyh3856.ElemContainerState(yyj3856) if r.TryDecodeAsNil() { - yyv3745[yyj3745] = Container{} + yyv3856[yyj3856] = Container{} } else { - yyv3746 := &yyv3745[yyj3745] - yyv3746.CodecDecodeSelf(d) + yyv3857 := &yyv3856[yyj3856] + yyv3857.CodecDecodeSelf(d) } } - if yyrt3745 { - for ; yyj3745 < yyl3745; yyj3745++ { - yyv3745 = append(yyv3745, Container{}) - yyh3745.ElemContainerState(yyj3745) + if yyrt3856 { + for ; yyj3856 < yyl3856; yyj3856++ { + yyv3856 = append(yyv3856, Container{}) + yyh3856.ElemContainerState(yyj3856) if r.TryDecodeAsNil() { - yyv3745[yyj3745] = Container{} + yyv3856[yyj3856] = Container{} } else { - yyv3747 := &yyv3745[yyj3745] - yyv3747.CodecDecodeSelf(d) + yyv3858 := &yyv3856[yyj3856] + yyv3858.CodecDecodeSelf(d) } } } } else { - yyj3745 := 0 - for ; !r.CheckBreak(); yyj3745++ { + yyj3856 := 0 + for ; !r.CheckBreak(); yyj3856++ { - if yyj3745 >= len(yyv3745) { - yyv3745 = append(yyv3745, Container{}) // var yyz3745 Container - yyc3745 = true + if yyj3856 >= len(yyv3856) { + yyv3856 = append(yyv3856, Container{}) // var yyz3856 Container + yyc3856 = true } - yyh3745.ElemContainerState(yyj3745) - if yyj3745 < len(yyv3745) { + yyh3856.ElemContainerState(yyj3856) + if yyj3856 < len(yyv3856) { if r.TryDecodeAsNil() { - yyv3745[yyj3745] = Container{} + yyv3856[yyj3856] = Container{} } else { - yyv3748 := &yyv3745[yyj3745] - yyv3748.CodecDecodeSelf(d) + yyv3859 := &yyv3856[yyj3856] + yyv3859.CodecDecodeSelf(d) } } else { @@ -46814,17 +48488,17 @@ func (x codecSelfer1234) decSliceContainer(v *[]Container, d *codec1978.Decoder) } } - if yyj3745 < len(yyv3745) { - yyv3745 = yyv3745[:yyj3745] - yyc3745 = true - } else if yyj3745 == 0 && yyv3745 == nil { - yyv3745 = []Container{} - yyc3745 = true + if yyj3856 < len(yyv3856) { + yyv3856 = yyv3856[:yyj3856] + yyc3856 = true + } else if yyj3856 == 0 && yyv3856 == nil { + yyv3856 = []Container{} + yyc3856 = true } } - yyh3745.End() - if yyc3745 { - *v = yyv3745 + yyh3856.End() + if yyc3856 { + *v = yyv3856 } } @@ -46833,10 +48507,10 @@ func (x codecSelfer1234) encSliceLocalObjectReference(v []LocalObjectReference, z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3749 := range v { + for _, yyv3860 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3750 := &yyv3749 - yy3750.CodecEncodeSelf(e) + yy3861 := &yyv3860 + yy3861.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46846,83 +48520,83 @@ func (x codecSelfer1234) decSliceLocalObjectReference(v *[]LocalObjectReference, z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3751 := *v - yyh3751, yyl3751 := z.DecSliceHelperStart() - var yyc3751 bool - if yyl3751 == 0 { - if yyv3751 == nil { - yyv3751 = []LocalObjectReference{} - yyc3751 = true - } else if len(yyv3751) != 0 { - yyv3751 = yyv3751[:0] - yyc3751 = true + yyv3862 := *v + yyh3862, yyl3862 := z.DecSliceHelperStart() + var yyc3862 bool + if yyl3862 == 0 { + if yyv3862 == nil { + yyv3862 = []LocalObjectReference{} + yyc3862 = true + } else if len(yyv3862) != 0 { + yyv3862 = yyv3862[:0] + yyc3862 = true } - } else if yyl3751 > 0 { - var yyrr3751, yyrl3751 int - var yyrt3751 bool - if yyl3751 > cap(yyv3751) { + } else if yyl3862 > 0 { + var yyrr3862, yyrl3862 int + var yyrt3862 bool + if yyl3862 > cap(yyv3862) { - yyrg3751 := len(yyv3751) > 0 - yyv23751 := yyv3751 - yyrl3751, yyrt3751 = z.DecInferLen(yyl3751, z.DecBasicHandle().MaxInitLen, 16) - if yyrt3751 { - if yyrl3751 <= cap(yyv3751) { - yyv3751 = yyv3751[:yyrl3751] + yyrg3862 := len(yyv3862) > 0 + yyv23862 := yyv3862 + yyrl3862, yyrt3862 = z.DecInferLen(yyl3862, z.DecBasicHandle().MaxInitLen, 16) + if yyrt3862 { + if yyrl3862 <= cap(yyv3862) { + yyv3862 = yyv3862[:yyrl3862] } else { - yyv3751 = make([]LocalObjectReference, yyrl3751) + yyv3862 = make([]LocalObjectReference, yyrl3862) } } else { - yyv3751 = make([]LocalObjectReference, yyrl3751) + yyv3862 = make([]LocalObjectReference, yyrl3862) } - yyc3751 = true - yyrr3751 = len(yyv3751) - if yyrg3751 { - copy(yyv3751, yyv23751) + yyc3862 = true + yyrr3862 = len(yyv3862) + if yyrg3862 { + copy(yyv3862, yyv23862) } - } else if yyl3751 != len(yyv3751) { - yyv3751 = yyv3751[:yyl3751] - yyc3751 = true + } else if yyl3862 != len(yyv3862) { + yyv3862 = yyv3862[:yyl3862] + yyc3862 = true } - yyj3751 := 0 - for ; yyj3751 < yyrr3751; yyj3751++ { - yyh3751.ElemContainerState(yyj3751) + yyj3862 := 0 + for ; yyj3862 < yyrr3862; yyj3862++ { + yyh3862.ElemContainerState(yyj3862) if r.TryDecodeAsNil() { - yyv3751[yyj3751] = LocalObjectReference{} + yyv3862[yyj3862] = LocalObjectReference{} } else { - yyv3752 := &yyv3751[yyj3751] - yyv3752.CodecDecodeSelf(d) + yyv3863 := &yyv3862[yyj3862] + yyv3863.CodecDecodeSelf(d) } } - if yyrt3751 { - for ; yyj3751 < yyl3751; yyj3751++ { - yyv3751 = append(yyv3751, LocalObjectReference{}) - yyh3751.ElemContainerState(yyj3751) + if yyrt3862 { + for ; yyj3862 < yyl3862; yyj3862++ { + yyv3862 = append(yyv3862, LocalObjectReference{}) + yyh3862.ElemContainerState(yyj3862) if r.TryDecodeAsNil() { - yyv3751[yyj3751] = LocalObjectReference{} + yyv3862[yyj3862] = LocalObjectReference{} } else { - yyv3753 := &yyv3751[yyj3751] - yyv3753.CodecDecodeSelf(d) + yyv3864 := &yyv3862[yyj3862] + yyv3864.CodecDecodeSelf(d) } } } } else { - yyj3751 := 0 - for ; !r.CheckBreak(); yyj3751++ { + yyj3862 := 0 + for ; !r.CheckBreak(); yyj3862++ { - if yyj3751 >= len(yyv3751) { - yyv3751 = append(yyv3751, LocalObjectReference{}) // var yyz3751 LocalObjectReference - yyc3751 = true + if yyj3862 >= len(yyv3862) { + yyv3862 = append(yyv3862, LocalObjectReference{}) // var yyz3862 LocalObjectReference + yyc3862 = true } - yyh3751.ElemContainerState(yyj3751) - if yyj3751 < len(yyv3751) { + yyh3862.ElemContainerState(yyj3862) + if yyj3862 < len(yyv3862) { if r.TryDecodeAsNil() { - yyv3751[yyj3751] = LocalObjectReference{} + yyv3862[yyj3862] = LocalObjectReference{} } else { - yyv3754 := &yyv3751[yyj3751] - yyv3754.CodecDecodeSelf(d) + yyv3865 := &yyv3862[yyj3862] + yyv3865.CodecDecodeSelf(d) } } else { @@ -46930,17 +48604,17 @@ func (x codecSelfer1234) decSliceLocalObjectReference(v *[]LocalObjectReference, } } - if yyj3751 < len(yyv3751) { - yyv3751 = yyv3751[:yyj3751] - yyc3751 = true - } else if yyj3751 == 0 && yyv3751 == nil { - yyv3751 = []LocalObjectReference{} - yyc3751 = true + if yyj3862 < len(yyv3862) { + yyv3862 = yyv3862[:yyj3862] + yyc3862 = true + } else if yyj3862 == 0 && yyv3862 == nil { + yyv3862 = []LocalObjectReference{} + yyc3862 = true } } - yyh3751.End() - if yyc3751 { - *v = yyv3751 + yyh3862.End() + if yyc3862 { + *v = yyv3862 } } @@ -46949,10 +48623,10 @@ func (x codecSelfer1234) encSlicePodCondition(v []PodCondition, e *codec1978.Enc z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3755 := range v { + for _, yyv3866 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3756 := &yyv3755 - yy3756.CodecEncodeSelf(e) + yy3867 := &yyv3866 + yy3867.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46962,83 +48636,83 @@ func (x codecSelfer1234) decSlicePodCondition(v *[]PodCondition, d *codec1978.De z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3757 := *v - yyh3757, yyl3757 := z.DecSliceHelperStart() - var yyc3757 bool - if yyl3757 == 0 { - if yyv3757 == nil { - yyv3757 = []PodCondition{} - yyc3757 = true - } else if len(yyv3757) != 0 { - yyv3757 = yyv3757[:0] - yyc3757 = true + yyv3868 := *v + yyh3868, yyl3868 := z.DecSliceHelperStart() + var yyc3868 bool + if yyl3868 == 0 { + if yyv3868 == nil { + yyv3868 = []PodCondition{} + yyc3868 = true + } else if len(yyv3868) != 0 { + yyv3868 = yyv3868[:0] + yyc3868 = true } - } else if yyl3757 > 0 { - var yyrr3757, yyrl3757 int - var yyrt3757 bool - if yyl3757 > cap(yyv3757) { + } else if yyl3868 > 0 { + var yyrr3868, yyrl3868 int + var yyrt3868 bool + if yyl3868 > cap(yyv3868) { - yyrg3757 := len(yyv3757) > 0 - yyv23757 := yyv3757 - yyrl3757, yyrt3757 = z.DecInferLen(yyl3757, z.DecBasicHandle().MaxInitLen, 112) - if yyrt3757 { - if yyrl3757 <= cap(yyv3757) { - yyv3757 = yyv3757[:yyrl3757] + yyrg3868 := len(yyv3868) > 0 + yyv23868 := yyv3868 + yyrl3868, yyrt3868 = z.DecInferLen(yyl3868, z.DecBasicHandle().MaxInitLen, 112) + if yyrt3868 { + if yyrl3868 <= cap(yyv3868) { + yyv3868 = yyv3868[:yyrl3868] } else { - yyv3757 = make([]PodCondition, yyrl3757) + yyv3868 = make([]PodCondition, yyrl3868) } } else { - yyv3757 = make([]PodCondition, yyrl3757) + yyv3868 = make([]PodCondition, yyrl3868) } - yyc3757 = true - yyrr3757 = len(yyv3757) - if yyrg3757 { - copy(yyv3757, yyv23757) + yyc3868 = true + yyrr3868 = len(yyv3868) + if yyrg3868 { + copy(yyv3868, yyv23868) } - } else if yyl3757 != len(yyv3757) { - yyv3757 = yyv3757[:yyl3757] - yyc3757 = true + } else if yyl3868 != len(yyv3868) { + yyv3868 = yyv3868[:yyl3868] + yyc3868 = true } - yyj3757 := 0 - for ; yyj3757 < yyrr3757; yyj3757++ { - yyh3757.ElemContainerState(yyj3757) + yyj3868 := 0 + for ; yyj3868 < yyrr3868; yyj3868++ { + yyh3868.ElemContainerState(yyj3868) if r.TryDecodeAsNil() { - yyv3757[yyj3757] = PodCondition{} + yyv3868[yyj3868] = PodCondition{} } else { - yyv3758 := &yyv3757[yyj3757] - yyv3758.CodecDecodeSelf(d) + yyv3869 := &yyv3868[yyj3868] + yyv3869.CodecDecodeSelf(d) } } - if yyrt3757 { - for ; yyj3757 < yyl3757; yyj3757++ { - yyv3757 = append(yyv3757, PodCondition{}) - yyh3757.ElemContainerState(yyj3757) + if yyrt3868 { + for ; yyj3868 < yyl3868; yyj3868++ { + yyv3868 = append(yyv3868, PodCondition{}) + yyh3868.ElemContainerState(yyj3868) if r.TryDecodeAsNil() { - yyv3757[yyj3757] = PodCondition{} + yyv3868[yyj3868] = PodCondition{} } else { - yyv3759 := &yyv3757[yyj3757] - yyv3759.CodecDecodeSelf(d) + yyv3870 := &yyv3868[yyj3868] + yyv3870.CodecDecodeSelf(d) } } } } else { - yyj3757 := 0 - for ; !r.CheckBreak(); yyj3757++ { + yyj3868 := 0 + for ; !r.CheckBreak(); yyj3868++ { - if yyj3757 >= len(yyv3757) { - yyv3757 = append(yyv3757, PodCondition{}) // var yyz3757 PodCondition - yyc3757 = true + if yyj3868 >= len(yyv3868) { + yyv3868 = append(yyv3868, PodCondition{}) // var yyz3868 PodCondition + yyc3868 = true } - yyh3757.ElemContainerState(yyj3757) - if yyj3757 < len(yyv3757) { + yyh3868.ElemContainerState(yyj3868) + if yyj3868 < len(yyv3868) { if r.TryDecodeAsNil() { - yyv3757[yyj3757] = PodCondition{} + yyv3868[yyj3868] = PodCondition{} } else { - yyv3760 := &yyv3757[yyj3757] - yyv3760.CodecDecodeSelf(d) + yyv3871 := &yyv3868[yyj3868] + yyv3871.CodecDecodeSelf(d) } } else { @@ -47046,17 +48720,17 @@ func (x codecSelfer1234) decSlicePodCondition(v *[]PodCondition, d *codec1978.De } } - if yyj3757 < len(yyv3757) { - yyv3757 = yyv3757[:yyj3757] - yyc3757 = true - } else if yyj3757 == 0 && yyv3757 == nil { - yyv3757 = []PodCondition{} - yyc3757 = true + if yyj3868 < len(yyv3868) { + yyv3868 = yyv3868[:yyj3868] + yyc3868 = true + } else if yyj3868 == 0 && yyv3868 == nil { + yyv3868 = []PodCondition{} + yyc3868 = true } } - yyh3757.End() - if yyc3757 { - *v = yyv3757 + yyh3868.End() + if yyc3868 { + *v = yyv3868 } } @@ -47065,10 +48739,10 @@ func (x codecSelfer1234) encSliceContainerStatus(v []ContainerStatus, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3761 := range v { + for _, yyv3872 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3762 := &yyv3761 - yy3762.CodecEncodeSelf(e) + yy3873 := &yyv3872 + yy3873.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -47078,2097 +48752,12 @@ func (x codecSelfer1234) decSliceContainerStatus(v *[]ContainerStatus, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3763 := *v - yyh3763, yyl3763 := z.DecSliceHelperStart() - var yyc3763 bool - if yyl3763 == 0 { - if yyv3763 == nil { - yyv3763 = []ContainerStatus{} - yyc3763 = true - } else if len(yyv3763) != 0 { - yyv3763 = yyv3763[:0] - yyc3763 = true - } - } else if yyl3763 > 0 { - var yyrr3763, yyrl3763 int - var yyrt3763 bool - if yyl3763 > cap(yyv3763) { - - yyrg3763 := len(yyv3763) > 0 - yyv23763 := yyv3763 - yyrl3763, yyrt3763 = z.DecInferLen(yyl3763, z.DecBasicHandle().MaxInitLen, 120) - if yyrt3763 { - if yyrl3763 <= cap(yyv3763) { - yyv3763 = yyv3763[:yyrl3763] - } else { - yyv3763 = make([]ContainerStatus, yyrl3763) - } - } else { - yyv3763 = make([]ContainerStatus, yyrl3763) - } - yyc3763 = true - yyrr3763 = len(yyv3763) - if yyrg3763 { - copy(yyv3763, yyv23763) - } - } else if yyl3763 != len(yyv3763) { - yyv3763 = yyv3763[:yyl3763] - yyc3763 = true - } - yyj3763 := 0 - for ; yyj3763 < yyrr3763; yyj3763++ { - yyh3763.ElemContainerState(yyj3763) - if r.TryDecodeAsNil() { - yyv3763[yyj3763] = ContainerStatus{} - } else { - yyv3764 := &yyv3763[yyj3763] - yyv3764.CodecDecodeSelf(d) - } - - } - if yyrt3763 { - for ; yyj3763 < yyl3763; yyj3763++ { - yyv3763 = append(yyv3763, ContainerStatus{}) - yyh3763.ElemContainerState(yyj3763) - if r.TryDecodeAsNil() { - yyv3763[yyj3763] = ContainerStatus{} - } else { - yyv3765 := &yyv3763[yyj3763] - yyv3765.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3763 := 0 - for ; !r.CheckBreak(); yyj3763++ { - - if yyj3763 >= len(yyv3763) { - yyv3763 = append(yyv3763, ContainerStatus{}) // var yyz3763 ContainerStatus - yyc3763 = true - } - yyh3763.ElemContainerState(yyj3763) - if yyj3763 < len(yyv3763) { - if r.TryDecodeAsNil() { - yyv3763[yyj3763] = ContainerStatus{} - } else { - yyv3766 := &yyv3763[yyj3763] - yyv3766.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3763 < len(yyv3763) { - yyv3763 = yyv3763[:yyj3763] - yyc3763 = true - } else if yyj3763 == 0 && yyv3763 == nil { - yyv3763 = []ContainerStatus{} - yyc3763 = true - } - } - yyh3763.End() - if yyc3763 { - *v = yyv3763 - } -} - -func (x codecSelfer1234) encSlicePod(v []Pod, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3767 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3768 := &yyv3767 - yy3768.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSlicePod(v *[]Pod, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3769 := *v - yyh3769, yyl3769 := z.DecSliceHelperStart() - var yyc3769 bool - if yyl3769 == 0 { - if yyv3769 == nil { - yyv3769 = []Pod{} - yyc3769 = true - } else if len(yyv3769) != 0 { - yyv3769 = yyv3769[:0] - yyc3769 = true - } - } else if yyl3769 > 0 { - var yyrr3769, yyrl3769 int - var yyrt3769 bool - if yyl3769 > cap(yyv3769) { - - yyrg3769 := len(yyv3769) > 0 - yyv23769 := yyv3769 - yyrl3769, yyrt3769 = z.DecInferLen(yyl3769, z.DecBasicHandle().MaxInitLen, 520) - if yyrt3769 { - if yyrl3769 <= cap(yyv3769) { - yyv3769 = yyv3769[:yyrl3769] - } else { - yyv3769 = make([]Pod, yyrl3769) - } - } else { - yyv3769 = make([]Pod, yyrl3769) - } - yyc3769 = true - yyrr3769 = len(yyv3769) - if yyrg3769 { - copy(yyv3769, yyv23769) - } - } else if yyl3769 != len(yyv3769) { - yyv3769 = yyv3769[:yyl3769] - yyc3769 = true - } - yyj3769 := 0 - for ; yyj3769 < yyrr3769; yyj3769++ { - yyh3769.ElemContainerState(yyj3769) - if r.TryDecodeAsNil() { - yyv3769[yyj3769] = Pod{} - } else { - yyv3770 := &yyv3769[yyj3769] - yyv3770.CodecDecodeSelf(d) - } - - } - if yyrt3769 { - for ; yyj3769 < yyl3769; yyj3769++ { - yyv3769 = append(yyv3769, Pod{}) - yyh3769.ElemContainerState(yyj3769) - if r.TryDecodeAsNil() { - yyv3769[yyj3769] = Pod{} - } else { - yyv3771 := &yyv3769[yyj3769] - yyv3771.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3769 := 0 - for ; !r.CheckBreak(); yyj3769++ { - - if yyj3769 >= len(yyv3769) { - yyv3769 = append(yyv3769, Pod{}) // var yyz3769 Pod - yyc3769 = true - } - yyh3769.ElemContainerState(yyj3769) - if yyj3769 < len(yyv3769) { - if r.TryDecodeAsNil() { - yyv3769[yyj3769] = Pod{} - } else { - yyv3772 := &yyv3769[yyj3769] - yyv3772.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3769 < len(yyv3769) { - yyv3769 = yyv3769[:yyj3769] - yyc3769 = true - } else if yyj3769 == 0 && yyv3769 == nil { - yyv3769 = []Pod{} - yyc3769 = true - } - } - yyh3769.End() - if yyc3769 { - *v = yyv3769 - } -} - -func (x codecSelfer1234) encSlicePodTemplate(v []PodTemplate, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3773 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3774 := &yyv3773 - yy3774.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSlicePodTemplate(v *[]PodTemplate, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3775 := *v - yyh3775, yyl3775 := z.DecSliceHelperStart() - var yyc3775 bool - if yyl3775 == 0 { - if yyv3775 == nil { - yyv3775 = []PodTemplate{} - yyc3775 = true - } else if len(yyv3775) != 0 { - yyv3775 = yyv3775[:0] - yyc3775 = true - } - } else if yyl3775 > 0 { - var yyrr3775, yyrl3775 int - var yyrt3775 bool - if yyl3775 > cap(yyv3775) { - - yyrg3775 := len(yyv3775) > 0 - yyv23775 := yyv3775 - yyrl3775, yyrt3775 = z.DecInferLen(yyl3775, z.DecBasicHandle().MaxInitLen, 544) - if yyrt3775 { - if yyrl3775 <= cap(yyv3775) { - yyv3775 = yyv3775[:yyrl3775] - } else { - yyv3775 = make([]PodTemplate, yyrl3775) - } - } else { - yyv3775 = make([]PodTemplate, yyrl3775) - } - yyc3775 = true - yyrr3775 = len(yyv3775) - if yyrg3775 { - copy(yyv3775, yyv23775) - } - } else if yyl3775 != len(yyv3775) { - yyv3775 = yyv3775[:yyl3775] - yyc3775 = true - } - yyj3775 := 0 - for ; yyj3775 < yyrr3775; yyj3775++ { - yyh3775.ElemContainerState(yyj3775) - if r.TryDecodeAsNil() { - yyv3775[yyj3775] = PodTemplate{} - } else { - yyv3776 := &yyv3775[yyj3775] - yyv3776.CodecDecodeSelf(d) - } - - } - if yyrt3775 { - for ; yyj3775 < yyl3775; yyj3775++ { - yyv3775 = append(yyv3775, PodTemplate{}) - yyh3775.ElemContainerState(yyj3775) - if r.TryDecodeAsNil() { - yyv3775[yyj3775] = PodTemplate{} - } else { - yyv3777 := &yyv3775[yyj3775] - yyv3777.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3775 := 0 - for ; !r.CheckBreak(); yyj3775++ { - - if yyj3775 >= len(yyv3775) { - yyv3775 = append(yyv3775, PodTemplate{}) // var yyz3775 PodTemplate - yyc3775 = true - } - yyh3775.ElemContainerState(yyj3775) - if yyj3775 < len(yyv3775) { - if r.TryDecodeAsNil() { - yyv3775[yyj3775] = PodTemplate{} - } else { - yyv3778 := &yyv3775[yyj3775] - yyv3778.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3775 < len(yyv3775) { - yyv3775 = yyv3775[:yyj3775] - yyc3775 = true - } else if yyj3775 == 0 && yyv3775 == nil { - yyv3775 = []PodTemplate{} - yyc3775 = true - } - } - yyh3775.End() - if yyc3775 { - *v = yyv3775 - } -} - -func (x codecSelfer1234) encSliceReplicationController(v []ReplicationController, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3779 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3780 := &yyv3779 - yy3780.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceReplicationController(v *[]ReplicationController, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3781 := *v - yyh3781, yyl3781 := z.DecSliceHelperStart() - var yyc3781 bool - if yyl3781 == 0 { - if yyv3781 == nil { - yyv3781 = []ReplicationController{} - yyc3781 = true - } else if len(yyv3781) != 0 { - yyv3781 = yyv3781[:0] - yyc3781 = true - } - } else if yyl3781 > 0 { - var yyrr3781, yyrl3781 int - var yyrt3781 bool - if yyl3781 > cap(yyv3781) { - - yyrg3781 := len(yyv3781) > 0 - yyv23781 := yyv3781 - yyrl3781, yyrt3781 = z.DecInferLen(yyl3781, z.DecBasicHandle().MaxInitLen, 232) - if yyrt3781 { - if yyrl3781 <= cap(yyv3781) { - yyv3781 = yyv3781[:yyrl3781] - } else { - yyv3781 = make([]ReplicationController, yyrl3781) - } - } else { - yyv3781 = make([]ReplicationController, yyrl3781) - } - yyc3781 = true - yyrr3781 = len(yyv3781) - if yyrg3781 { - copy(yyv3781, yyv23781) - } - } else if yyl3781 != len(yyv3781) { - yyv3781 = yyv3781[:yyl3781] - yyc3781 = true - } - yyj3781 := 0 - for ; yyj3781 < yyrr3781; yyj3781++ { - yyh3781.ElemContainerState(yyj3781) - if r.TryDecodeAsNil() { - yyv3781[yyj3781] = ReplicationController{} - } else { - yyv3782 := &yyv3781[yyj3781] - yyv3782.CodecDecodeSelf(d) - } - - } - if yyrt3781 { - for ; yyj3781 < yyl3781; yyj3781++ { - yyv3781 = append(yyv3781, ReplicationController{}) - yyh3781.ElemContainerState(yyj3781) - if r.TryDecodeAsNil() { - yyv3781[yyj3781] = ReplicationController{} - } else { - yyv3783 := &yyv3781[yyj3781] - yyv3783.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3781 := 0 - for ; !r.CheckBreak(); yyj3781++ { - - if yyj3781 >= len(yyv3781) { - yyv3781 = append(yyv3781, ReplicationController{}) // var yyz3781 ReplicationController - yyc3781 = true - } - yyh3781.ElemContainerState(yyj3781) - if yyj3781 < len(yyv3781) { - if r.TryDecodeAsNil() { - yyv3781[yyj3781] = ReplicationController{} - } else { - yyv3784 := &yyv3781[yyj3781] - yyv3784.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3781 < len(yyv3781) { - yyv3781 = yyv3781[:yyj3781] - yyc3781 = true - } else if yyj3781 == 0 && yyv3781 == nil { - yyv3781 = []ReplicationController{} - yyc3781 = true - } - } - yyh3781.End() - if yyc3781 { - *v = yyv3781 - } -} - -func (x codecSelfer1234) encSliceLoadBalancerIngress(v []LoadBalancerIngress, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3785 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3786 := &yyv3785 - yy3786.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceLoadBalancerIngress(v *[]LoadBalancerIngress, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3787 := *v - yyh3787, yyl3787 := z.DecSliceHelperStart() - var yyc3787 bool - if yyl3787 == 0 { - if yyv3787 == nil { - yyv3787 = []LoadBalancerIngress{} - yyc3787 = true - } else if len(yyv3787) != 0 { - yyv3787 = yyv3787[:0] - yyc3787 = true - } - } else if yyl3787 > 0 { - var yyrr3787, yyrl3787 int - var yyrt3787 bool - if yyl3787 > cap(yyv3787) { - - yyrg3787 := len(yyv3787) > 0 - yyv23787 := yyv3787 - yyrl3787, yyrt3787 = z.DecInferLen(yyl3787, z.DecBasicHandle().MaxInitLen, 32) - if yyrt3787 { - if yyrl3787 <= cap(yyv3787) { - yyv3787 = yyv3787[:yyrl3787] - } else { - yyv3787 = make([]LoadBalancerIngress, yyrl3787) - } - } else { - yyv3787 = make([]LoadBalancerIngress, yyrl3787) - } - yyc3787 = true - yyrr3787 = len(yyv3787) - if yyrg3787 { - copy(yyv3787, yyv23787) - } - } else if yyl3787 != len(yyv3787) { - yyv3787 = yyv3787[:yyl3787] - yyc3787 = true - } - yyj3787 := 0 - for ; yyj3787 < yyrr3787; yyj3787++ { - yyh3787.ElemContainerState(yyj3787) - if r.TryDecodeAsNil() { - yyv3787[yyj3787] = LoadBalancerIngress{} - } else { - yyv3788 := &yyv3787[yyj3787] - yyv3788.CodecDecodeSelf(d) - } - - } - if yyrt3787 { - for ; yyj3787 < yyl3787; yyj3787++ { - yyv3787 = append(yyv3787, LoadBalancerIngress{}) - yyh3787.ElemContainerState(yyj3787) - if r.TryDecodeAsNil() { - yyv3787[yyj3787] = LoadBalancerIngress{} - } else { - yyv3789 := &yyv3787[yyj3787] - yyv3789.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3787 := 0 - for ; !r.CheckBreak(); yyj3787++ { - - if yyj3787 >= len(yyv3787) { - yyv3787 = append(yyv3787, LoadBalancerIngress{}) // var yyz3787 LoadBalancerIngress - yyc3787 = true - } - yyh3787.ElemContainerState(yyj3787) - if yyj3787 < len(yyv3787) { - if r.TryDecodeAsNil() { - yyv3787[yyj3787] = LoadBalancerIngress{} - } else { - yyv3790 := &yyv3787[yyj3787] - yyv3790.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3787 < len(yyv3787) { - yyv3787 = yyv3787[:yyj3787] - yyc3787 = true - } else if yyj3787 == 0 && yyv3787 == nil { - yyv3787 = []LoadBalancerIngress{} - yyc3787 = true - } - } - yyh3787.End() - if yyc3787 { - *v = yyv3787 - } -} - -func (x codecSelfer1234) encSliceServicePort(v []ServicePort, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3791 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3792 := &yyv3791 - yy3792.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceServicePort(v *[]ServicePort, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3793 := *v - yyh3793, yyl3793 := z.DecSliceHelperStart() - var yyc3793 bool - if yyl3793 == 0 { - if yyv3793 == nil { - yyv3793 = []ServicePort{} - yyc3793 = true - } else if len(yyv3793) != 0 { - yyv3793 = yyv3793[:0] - yyc3793 = true - } - } else if yyl3793 > 0 { - var yyrr3793, yyrl3793 int - var yyrt3793 bool - if yyl3793 > cap(yyv3793) { - - yyrg3793 := len(yyv3793) > 0 - yyv23793 := yyv3793 - yyrl3793, yyrt3793 = z.DecInferLen(yyl3793, z.DecBasicHandle().MaxInitLen, 80) - if yyrt3793 { - if yyrl3793 <= cap(yyv3793) { - yyv3793 = yyv3793[:yyrl3793] - } else { - yyv3793 = make([]ServicePort, yyrl3793) - } - } else { - yyv3793 = make([]ServicePort, yyrl3793) - } - yyc3793 = true - yyrr3793 = len(yyv3793) - if yyrg3793 { - copy(yyv3793, yyv23793) - } - } else if yyl3793 != len(yyv3793) { - yyv3793 = yyv3793[:yyl3793] - yyc3793 = true - } - yyj3793 := 0 - for ; yyj3793 < yyrr3793; yyj3793++ { - yyh3793.ElemContainerState(yyj3793) - if r.TryDecodeAsNil() { - yyv3793[yyj3793] = ServicePort{} - } else { - yyv3794 := &yyv3793[yyj3793] - yyv3794.CodecDecodeSelf(d) - } - - } - if yyrt3793 { - for ; yyj3793 < yyl3793; yyj3793++ { - yyv3793 = append(yyv3793, ServicePort{}) - yyh3793.ElemContainerState(yyj3793) - if r.TryDecodeAsNil() { - yyv3793[yyj3793] = ServicePort{} - } else { - yyv3795 := &yyv3793[yyj3793] - yyv3795.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3793 := 0 - for ; !r.CheckBreak(); yyj3793++ { - - if yyj3793 >= len(yyv3793) { - yyv3793 = append(yyv3793, ServicePort{}) // var yyz3793 ServicePort - yyc3793 = true - } - yyh3793.ElemContainerState(yyj3793) - if yyj3793 < len(yyv3793) { - if r.TryDecodeAsNil() { - yyv3793[yyj3793] = ServicePort{} - } else { - yyv3796 := &yyv3793[yyj3793] - yyv3796.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3793 < len(yyv3793) { - yyv3793 = yyv3793[:yyj3793] - yyc3793 = true - } else if yyj3793 == 0 && yyv3793 == nil { - yyv3793 = []ServicePort{} - yyc3793 = true - } - } - yyh3793.End() - if yyc3793 { - *v = yyv3793 - } -} - -func (x codecSelfer1234) encSliceService(v []Service, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3797 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3798 := &yyv3797 - yy3798.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceService(v *[]Service, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3799 := *v - yyh3799, yyl3799 := z.DecSliceHelperStart() - var yyc3799 bool - if yyl3799 == 0 { - if yyv3799 == nil { - yyv3799 = []Service{} - yyc3799 = true - } else if len(yyv3799) != 0 { - yyv3799 = yyv3799[:0] - yyc3799 = true - } - } else if yyl3799 > 0 { - var yyrr3799, yyrl3799 int - var yyrt3799 bool - if yyl3799 > cap(yyv3799) { - - yyrg3799 := len(yyv3799) > 0 - yyv23799 := yyv3799 - yyrl3799, yyrt3799 = z.DecInferLen(yyl3799, z.DecBasicHandle().MaxInitLen, 360) - if yyrt3799 { - if yyrl3799 <= cap(yyv3799) { - yyv3799 = yyv3799[:yyrl3799] - } else { - yyv3799 = make([]Service, yyrl3799) - } - } else { - yyv3799 = make([]Service, yyrl3799) - } - yyc3799 = true - yyrr3799 = len(yyv3799) - if yyrg3799 { - copy(yyv3799, yyv23799) - } - } else if yyl3799 != len(yyv3799) { - yyv3799 = yyv3799[:yyl3799] - yyc3799 = true - } - yyj3799 := 0 - for ; yyj3799 < yyrr3799; yyj3799++ { - yyh3799.ElemContainerState(yyj3799) - if r.TryDecodeAsNil() { - yyv3799[yyj3799] = Service{} - } else { - yyv3800 := &yyv3799[yyj3799] - yyv3800.CodecDecodeSelf(d) - } - - } - if yyrt3799 { - for ; yyj3799 < yyl3799; yyj3799++ { - yyv3799 = append(yyv3799, Service{}) - yyh3799.ElemContainerState(yyj3799) - if r.TryDecodeAsNil() { - yyv3799[yyj3799] = Service{} - } else { - yyv3801 := &yyv3799[yyj3799] - yyv3801.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3799 := 0 - for ; !r.CheckBreak(); yyj3799++ { - - if yyj3799 >= len(yyv3799) { - yyv3799 = append(yyv3799, Service{}) // var yyz3799 Service - yyc3799 = true - } - yyh3799.ElemContainerState(yyj3799) - if yyj3799 < len(yyv3799) { - if r.TryDecodeAsNil() { - yyv3799[yyj3799] = Service{} - } else { - yyv3802 := &yyv3799[yyj3799] - yyv3802.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3799 < len(yyv3799) { - yyv3799 = yyv3799[:yyj3799] - yyc3799 = true - } else if yyj3799 == 0 && yyv3799 == nil { - yyv3799 = []Service{} - yyc3799 = true - } - } - yyh3799.End() - if yyc3799 { - *v = yyv3799 - } -} - -func (x codecSelfer1234) encSliceObjectReference(v []ObjectReference, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3803 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3804 := &yyv3803 - yy3804.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceObjectReference(v *[]ObjectReference, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3805 := *v - yyh3805, yyl3805 := z.DecSliceHelperStart() - var yyc3805 bool - if yyl3805 == 0 { - if yyv3805 == nil { - yyv3805 = []ObjectReference{} - yyc3805 = true - } else if len(yyv3805) != 0 { - yyv3805 = yyv3805[:0] - yyc3805 = true - } - } else if yyl3805 > 0 { - var yyrr3805, yyrl3805 int - var yyrt3805 bool - if yyl3805 > cap(yyv3805) { - - yyrg3805 := len(yyv3805) > 0 - yyv23805 := yyv3805 - yyrl3805, yyrt3805 = z.DecInferLen(yyl3805, z.DecBasicHandle().MaxInitLen, 112) - if yyrt3805 { - if yyrl3805 <= cap(yyv3805) { - yyv3805 = yyv3805[:yyrl3805] - } else { - yyv3805 = make([]ObjectReference, yyrl3805) - } - } else { - yyv3805 = make([]ObjectReference, yyrl3805) - } - yyc3805 = true - yyrr3805 = len(yyv3805) - if yyrg3805 { - copy(yyv3805, yyv23805) - } - } else if yyl3805 != len(yyv3805) { - yyv3805 = yyv3805[:yyl3805] - yyc3805 = true - } - yyj3805 := 0 - for ; yyj3805 < yyrr3805; yyj3805++ { - yyh3805.ElemContainerState(yyj3805) - if r.TryDecodeAsNil() { - yyv3805[yyj3805] = ObjectReference{} - } else { - yyv3806 := &yyv3805[yyj3805] - yyv3806.CodecDecodeSelf(d) - } - - } - if yyrt3805 { - for ; yyj3805 < yyl3805; yyj3805++ { - yyv3805 = append(yyv3805, ObjectReference{}) - yyh3805.ElemContainerState(yyj3805) - if r.TryDecodeAsNil() { - yyv3805[yyj3805] = ObjectReference{} - } else { - yyv3807 := &yyv3805[yyj3805] - yyv3807.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3805 := 0 - for ; !r.CheckBreak(); yyj3805++ { - - if yyj3805 >= len(yyv3805) { - yyv3805 = append(yyv3805, ObjectReference{}) // var yyz3805 ObjectReference - yyc3805 = true - } - yyh3805.ElemContainerState(yyj3805) - if yyj3805 < len(yyv3805) { - if r.TryDecodeAsNil() { - yyv3805[yyj3805] = ObjectReference{} - } else { - yyv3808 := &yyv3805[yyj3805] - yyv3808.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3805 < len(yyv3805) { - yyv3805 = yyv3805[:yyj3805] - yyc3805 = true - } else if yyj3805 == 0 && yyv3805 == nil { - yyv3805 = []ObjectReference{} - yyc3805 = true - } - } - yyh3805.End() - if yyc3805 { - *v = yyv3805 - } -} - -func (x codecSelfer1234) encSliceServiceAccount(v []ServiceAccount, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3809 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3810 := &yyv3809 - yy3810.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceServiceAccount(v *[]ServiceAccount, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3811 := *v - yyh3811, yyl3811 := z.DecSliceHelperStart() - var yyc3811 bool - if yyl3811 == 0 { - if yyv3811 == nil { - yyv3811 = []ServiceAccount{} - yyc3811 = true - } else if len(yyv3811) != 0 { - yyv3811 = yyv3811[:0] - yyc3811 = true - } - } else if yyl3811 > 0 { - var yyrr3811, yyrl3811 int - var yyrt3811 bool - if yyl3811 > cap(yyv3811) { - - yyrg3811 := len(yyv3811) > 0 - yyv23811 := yyv3811 - yyrl3811, yyrt3811 = z.DecInferLen(yyl3811, z.DecBasicHandle().MaxInitLen, 240) - if yyrt3811 { - if yyrl3811 <= cap(yyv3811) { - yyv3811 = yyv3811[:yyrl3811] - } else { - yyv3811 = make([]ServiceAccount, yyrl3811) - } - } else { - yyv3811 = make([]ServiceAccount, yyrl3811) - } - yyc3811 = true - yyrr3811 = len(yyv3811) - if yyrg3811 { - copy(yyv3811, yyv23811) - } - } else if yyl3811 != len(yyv3811) { - yyv3811 = yyv3811[:yyl3811] - yyc3811 = true - } - yyj3811 := 0 - for ; yyj3811 < yyrr3811; yyj3811++ { - yyh3811.ElemContainerState(yyj3811) - if r.TryDecodeAsNil() { - yyv3811[yyj3811] = ServiceAccount{} - } else { - yyv3812 := &yyv3811[yyj3811] - yyv3812.CodecDecodeSelf(d) - } - - } - if yyrt3811 { - for ; yyj3811 < yyl3811; yyj3811++ { - yyv3811 = append(yyv3811, ServiceAccount{}) - yyh3811.ElemContainerState(yyj3811) - if r.TryDecodeAsNil() { - yyv3811[yyj3811] = ServiceAccount{} - } else { - yyv3813 := &yyv3811[yyj3811] - yyv3813.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3811 := 0 - for ; !r.CheckBreak(); yyj3811++ { - - if yyj3811 >= len(yyv3811) { - yyv3811 = append(yyv3811, ServiceAccount{}) // var yyz3811 ServiceAccount - yyc3811 = true - } - yyh3811.ElemContainerState(yyj3811) - if yyj3811 < len(yyv3811) { - if r.TryDecodeAsNil() { - yyv3811[yyj3811] = ServiceAccount{} - } else { - yyv3814 := &yyv3811[yyj3811] - yyv3814.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3811 < len(yyv3811) { - yyv3811 = yyv3811[:yyj3811] - yyc3811 = true - } else if yyj3811 == 0 && yyv3811 == nil { - yyv3811 = []ServiceAccount{} - yyc3811 = true - } - } - yyh3811.End() - if yyc3811 { - *v = yyv3811 - } -} - -func (x codecSelfer1234) encSliceEndpointSubset(v []EndpointSubset, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3815 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3816 := &yyv3815 - yy3816.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceEndpointSubset(v *[]EndpointSubset, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3817 := *v - yyh3817, yyl3817 := z.DecSliceHelperStart() - var yyc3817 bool - if yyl3817 == 0 { - if yyv3817 == nil { - yyv3817 = []EndpointSubset{} - yyc3817 = true - } else if len(yyv3817) != 0 { - yyv3817 = yyv3817[:0] - yyc3817 = true - } - } else if yyl3817 > 0 { - var yyrr3817, yyrl3817 int - var yyrt3817 bool - if yyl3817 > cap(yyv3817) { - - yyrg3817 := len(yyv3817) > 0 - yyv23817 := yyv3817 - yyrl3817, yyrt3817 = z.DecInferLen(yyl3817, z.DecBasicHandle().MaxInitLen, 72) - if yyrt3817 { - if yyrl3817 <= cap(yyv3817) { - yyv3817 = yyv3817[:yyrl3817] - } else { - yyv3817 = make([]EndpointSubset, yyrl3817) - } - } else { - yyv3817 = make([]EndpointSubset, yyrl3817) - } - yyc3817 = true - yyrr3817 = len(yyv3817) - if yyrg3817 { - copy(yyv3817, yyv23817) - } - } else if yyl3817 != len(yyv3817) { - yyv3817 = yyv3817[:yyl3817] - yyc3817 = true - } - yyj3817 := 0 - for ; yyj3817 < yyrr3817; yyj3817++ { - yyh3817.ElemContainerState(yyj3817) - if r.TryDecodeAsNil() { - yyv3817[yyj3817] = EndpointSubset{} - } else { - yyv3818 := &yyv3817[yyj3817] - yyv3818.CodecDecodeSelf(d) - } - - } - if yyrt3817 { - for ; yyj3817 < yyl3817; yyj3817++ { - yyv3817 = append(yyv3817, EndpointSubset{}) - yyh3817.ElemContainerState(yyj3817) - if r.TryDecodeAsNil() { - yyv3817[yyj3817] = EndpointSubset{} - } else { - yyv3819 := &yyv3817[yyj3817] - yyv3819.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3817 := 0 - for ; !r.CheckBreak(); yyj3817++ { - - if yyj3817 >= len(yyv3817) { - yyv3817 = append(yyv3817, EndpointSubset{}) // var yyz3817 EndpointSubset - yyc3817 = true - } - yyh3817.ElemContainerState(yyj3817) - if yyj3817 < len(yyv3817) { - if r.TryDecodeAsNil() { - yyv3817[yyj3817] = EndpointSubset{} - } else { - yyv3820 := &yyv3817[yyj3817] - yyv3820.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3817 < len(yyv3817) { - yyv3817 = yyv3817[:yyj3817] - yyc3817 = true - } else if yyj3817 == 0 && yyv3817 == nil { - yyv3817 = []EndpointSubset{} - yyc3817 = true - } - } - yyh3817.End() - if yyc3817 { - *v = yyv3817 - } -} - -func (x codecSelfer1234) encSliceEndpointAddress(v []EndpointAddress, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3821 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3822 := &yyv3821 - yy3822.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceEndpointAddress(v *[]EndpointAddress, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3823 := *v - yyh3823, yyl3823 := z.DecSliceHelperStart() - var yyc3823 bool - if yyl3823 == 0 { - if yyv3823 == nil { - yyv3823 = []EndpointAddress{} - yyc3823 = true - } else if len(yyv3823) != 0 { - yyv3823 = yyv3823[:0] - yyc3823 = true - } - } else if yyl3823 > 0 { - var yyrr3823, yyrl3823 int - var yyrt3823 bool - if yyl3823 > cap(yyv3823) { - - yyrg3823 := len(yyv3823) > 0 - yyv23823 := yyv3823 - yyrl3823, yyrt3823 = z.DecInferLen(yyl3823, z.DecBasicHandle().MaxInitLen, 24) - if yyrt3823 { - if yyrl3823 <= cap(yyv3823) { - yyv3823 = yyv3823[:yyrl3823] - } else { - yyv3823 = make([]EndpointAddress, yyrl3823) - } - } else { - yyv3823 = make([]EndpointAddress, yyrl3823) - } - yyc3823 = true - yyrr3823 = len(yyv3823) - if yyrg3823 { - copy(yyv3823, yyv23823) - } - } else if yyl3823 != len(yyv3823) { - yyv3823 = yyv3823[:yyl3823] - yyc3823 = true - } - yyj3823 := 0 - for ; yyj3823 < yyrr3823; yyj3823++ { - yyh3823.ElemContainerState(yyj3823) - if r.TryDecodeAsNil() { - yyv3823[yyj3823] = EndpointAddress{} - } else { - yyv3824 := &yyv3823[yyj3823] - yyv3824.CodecDecodeSelf(d) - } - - } - if yyrt3823 { - for ; yyj3823 < yyl3823; yyj3823++ { - yyv3823 = append(yyv3823, EndpointAddress{}) - yyh3823.ElemContainerState(yyj3823) - if r.TryDecodeAsNil() { - yyv3823[yyj3823] = EndpointAddress{} - } else { - yyv3825 := &yyv3823[yyj3823] - yyv3825.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3823 := 0 - for ; !r.CheckBreak(); yyj3823++ { - - if yyj3823 >= len(yyv3823) { - yyv3823 = append(yyv3823, EndpointAddress{}) // var yyz3823 EndpointAddress - yyc3823 = true - } - yyh3823.ElemContainerState(yyj3823) - if yyj3823 < len(yyv3823) { - if r.TryDecodeAsNil() { - yyv3823[yyj3823] = EndpointAddress{} - } else { - yyv3826 := &yyv3823[yyj3823] - yyv3826.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3823 < len(yyv3823) { - yyv3823 = yyv3823[:yyj3823] - yyc3823 = true - } else if yyj3823 == 0 && yyv3823 == nil { - yyv3823 = []EndpointAddress{} - yyc3823 = true - } - } - yyh3823.End() - if yyc3823 { - *v = yyv3823 - } -} - -func (x codecSelfer1234) encSliceEndpointPort(v []EndpointPort, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3827 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3828 := &yyv3827 - yy3828.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceEndpointPort(v *[]EndpointPort, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3829 := *v - yyh3829, yyl3829 := z.DecSliceHelperStart() - var yyc3829 bool - if yyl3829 == 0 { - if yyv3829 == nil { - yyv3829 = []EndpointPort{} - yyc3829 = true - } else if len(yyv3829) != 0 { - yyv3829 = yyv3829[:0] - yyc3829 = true - } - } else if yyl3829 > 0 { - var yyrr3829, yyrl3829 int - var yyrt3829 bool - if yyl3829 > cap(yyv3829) { - - yyrg3829 := len(yyv3829) > 0 - yyv23829 := yyv3829 - yyrl3829, yyrt3829 = z.DecInferLen(yyl3829, z.DecBasicHandle().MaxInitLen, 40) - if yyrt3829 { - if yyrl3829 <= cap(yyv3829) { - yyv3829 = yyv3829[:yyrl3829] - } else { - yyv3829 = make([]EndpointPort, yyrl3829) - } - } else { - yyv3829 = make([]EndpointPort, yyrl3829) - } - yyc3829 = true - yyrr3829 = len(yyv3829) - if yyrg3829 { - copy(yyv3829, yyv23829) - } - } else if yyl3829 != len(yyv3829) { - yyv3829 = yyv3829[:yyl3829] - yyc3829 = true - } - yyj3829 := 0 - for ; yyj3829 < yyrr3829; yyj3829++ { - yyh3829.ElemContainerState(yyj3829) - if r.TryDecodeAsNil() { - yyv3829[yyj3829] = EndpointPort{} - } else { - yyv3830 := &yyv3829[yyj3829] - yyv3830.CodecDecodeSelf(d) - } - - } - if yyrt3829 { - for ; yyj3829 < yyl3829; yyj3829++ { - yyv3829 = append(yyv3829, EndpointPort{}) - yyh3829.ElemContainerState(yyj3829) - if r.TryDecodeAsNil() { - yyv3829[yyj3829] = EndpointPort{} - } else { - yyv3831 := &yyv3829[yyj3829] - yyv3831.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3829 := 0 - for ; !r.CheckBreak(); yyj3829++ { - - if yyj3829 >= len(yyv3829) { - yyv3829 = append(yyv3829, EndpointPort{}) // var yyz3829 EndpointPort - yyc3829 = true - } - yyh3829.ElemContainerState(yyj3829) - if yyj3829 < len(yyv3829) { - if r.TryDecodeAsNil() { - yyv3829[yyj3829] = EndpointPort{} - } else { - yyv3832 := &yyv3829[yyj3829] - yyv3832.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3829 < len(yyv3829) { - yyv3829 = yyv3829[:yyj3829] - yyc3829 = true - } else if yyj3829 == 0 && yyv3829 == nil { - yyv3829 = []EndpointPort{} - yyc3829 = true - } - } - yyh3829.End() - if yyc3829 { - *v = yyv3829 - } -} - -func (x codecSelfer1234) encSliceEndpoints(v []Endpoints, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3833 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3834 := &yyv3833 - yy3834.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceEndpoints(v *[]Endpoints, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3835 := *v - yyh3835, yyl3835 := z.DecSliceHelperStart() - var yyc3835 bool - if yyl3835 == 0 { - if yyv3835 == nil { - yyv3835 = []Endpoints{} - yyc3835 = true - } else if len(yyv3835) != 0 { - yyv3835 = yyv3835[:0] - yyc3835 = true - } - } else if yyl3835 > 0 { - var yyrr3835, yyrl3835 int - var yyrt3835 bool - if yyl3835 > cap(yyv3835) { - - yyrg3835 := len(yyv3835) > 0 - yyv23835 := yyv3835 - yyrl3835, yyrt3835 = z.DecInferLen(yyl3835, z.DecBasicHandle().MaxInitLen, 216) - if yyrt3835 { - if yyrl3835 <= cap(yyv3835) { - yyv3835 = yyv3835[:yyrl3835] - } else { - yyv3835 = make([]Endpoints, yyrl3835) - } - } else { - yyv3835 = make([]Endpoints, yyrl3835) - } - yyc3835 = true - yyrr3835 = len(yyv3835) - if yyrg3835 { - copy(yyv3835, yyv23835) - } - } else if yyl3835 != len(yyv3835) { - yyv3835 = yyv3835[:yyl3835] - yyc3835 = true - } - yyj3835 := 0 - for ; yyj3835 < yyrr3835; yyj3835++ { - yyh3835.ElemContainerState(yyj3835) - if r.TryDecodeAsNil() { - yyv3835[yyj3835] = Endpoints{} - } else { - yyv3836 := &yyv3835[yyj3835] - yyv3836.CodecDecodeSelf(d) - } - - } - if yyrt3835 { - for ; yyj3835 < yyl3835; yyj3835++ { - yyv3835 = append(yyv3835, Endpoints{}) - yyh3835.ElemContainerState(yyj3835) - if r.TryDecodeAsNil() { - yyv3835[yyj3835] = Endpoints{} - } else { - yyv3837 := &yyv3835[yyj3835] - yyv3837.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3835 := 0 - for ; !r.CheckBreak(); yyj3835++ { - - if yyj3835 >= len(yyv3835) { - yyv3835 = append(yyv3835, Endpoints{}) // var yyz3835 Endpoints - yyc3835 = true - } - yyh3835.ElemContainerState(yyj3835) - if yyj3835 < len(yyv3835) { - if r.TryDecodeAsNil() { - yyv3835[yyj3835] = Endpoints{} - } else { - yyv3838 := &yyv3835[yyj3835] - yyv3838.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3835 < len(yyv3835) { - yyv3835 = yyv3835[:yyj3835] - yyc3835 = true - } else if yyj3835 == 0 && yyv3835 == nil { - yyv3835 = []Endpoints{} - yyc3835 = true - } - } - yyh3835.End() - if yyc3835 { - *v = yyv3835 - } -} - -func (x codecSelfer1234) encSliceNodeCondition(v []NodeCondition, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3839 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3840 := &yyv3839 - yy3840.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceNodeCondition(v *[]NodeCondition, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3841 := *v - yyh3841, yyl3841 := z.DecSliceHelperStart() - var yyc3841 bool - if yyl3841 == 0 { - if yyv3841 == nil { - yyv3841 = []NodeCondition{} - yyc3841 = true - } else if len(yyv3841) != 0 { - yyv3841 = yyv3841[:0] - yyc3841 = true - } - } else if yyl3841 > 0 { - var yyrr3841, yyrl3841 int - var yyrt3841 bool - if yyl3841 > cap(yyv3841) { - - yyrg3841 := len(yyv3841) > 0 - yyv23841 := yyv3841 - yyrl3841, yyrt3841 = z.DecInferLen(yyl3841, z.DecBasicHandle().MaxInitLen, 112) - if yyrt3841 { - if yyrl3841 <= cap(yyv3841) { - yyv3841 = yyv3841[:yyrl3841] - } else { - yyv3841 = make([]NodeCondition, yyrl3841) - } - } else { - yyv3841 = make([]NodeCondition, yyrl3841) - } - yyc3841 = true - yyrr3841 = len(yyv3841) - if yyrg3841 { - copy(yyv3841, yyv23841) - } - } else if yyl3841 != len(yyv3841) { - yyv3841 = yyv3841[:yyl3841] - yyc3841 = true - } - yyj3841 := 0 - for ; yyj3841 < yyrr3841; yyj3841++ { - yyh3841.ElemContainerState(yyj3841) - if r.TryDecodeAsNil() { - yyv3841[yyj3841] = NodeCondition{} - } else { - yyv3842 := &yyv3841[yyj3841] - yyv3842.CodecDecodeSelf(d) - } - - } - if yyrt3841 { - for ; yyj3841 < yyl3841; yyj3841++ { - yyv3841 = append(yyv3841, NodeCondition{}) - yyh3841.ElemContainerState(yyj3841) - if r.TryDecodeAsNil() { - yyv3841[yyj3841] = NodeCondition{} - } else { - yyv3843 := &yyv3841[yyj3841] - yyv3843.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3841 := 0 - for ; !r.CheckBreak(); yyj3841++ { - - if yyj3841 >= len(yyv3841) { - yyv3841 = append(yyv3841, NodeCondition{}) // var yyz3841 NodeCondition - yyc3841 = true - } - yyh3841.ElemContainerState(yyj3841) - if yyj3841 < len(yyv3841) { - if r.TryDecodeAsNil() { - yyv3841[yyj3841] = NodeCondition{} - } else { - yyv3844 := &yyv3841[yyj3841] - yyv3844.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3841 < len(yyv3841) { - yyv3841 = yyv3841[:yyj3841] - yyc3841 = true - } else if yyj3841 == 0 && yyv3841 == nil { - yyv3841 = []NodeCondition{} - yyc3841 = true - } - } - yyh3841.End() - if yyc3841 { - *v = yyv3841 - } -} - -func (x codecSelfer1234) encSliceNodeAddress(v []NodeAddress, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3845 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3846 := &yyv3845 - yy3846.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceNodeAddress(v *[]NodeAddress, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3847 := *v - yyh3847, yyl3847 := z.DecSliceHelperStart() - var yyc3847 bool - if yyl3847 == 0 { - if yyv3847 == nil { - yyv3847 = []NodeAddress{} - yyc3847 = true - } else if len(yyv3847) != 0 { - yyv3847 = yyv3847[:0] - yyc3847 = true - } - } else if yyl3847 > 0 { - var yyrr3847, yyrl3847 int - var yyrt3847 bool - if yyl3847 > cap(yyv3847) { - - yyrg3847 := len(yyv3847) > 0 - yyv23847 := yyv3847 - yyrl3847, yyrt3847 = z.DecInferLen(yyl3847, z.DecBasicHandle().MaxInitLen, 32) - if yyrt3847 { - if yyrl3847 <= cap(yyv3847) { - yyv3847 = yyv3847[:yyrl3847] - } else { - yyv3847 = make([]NodeAddress, yyrl3847) - } - } else { - yyv3847 = make([]NodeAddress, yyrl3847) - } - yyc3847 = true - yyrr3847 = len(yyv3847) - if yyrg3847 { - copy(yyv3847, yyv23847) - } - } else if yyl3847 != len(yyv3847) { - yyv3847 = yyv3847[:yyl3847] - yyc3847 = true - } - yyj3847 := 0 - for ; yyj3847 < yyrr3847; yyj3847++ { - yyh3847.ElemContainerState(yyj3847) - if r.TryDecodeAsNil() { - yyv3847[yyj3847] = NodeAddress{} - } else { - yyv3848 := &yyv3847[yyj3847] - yyv3848.CodecDecodeSelf(d) - } - - } - if yyrt3847 { - for ; yyj3847 < yyl3847; yyj3847++ { - yyv3847 = append(yyv3847, NodeAddress{}) - yyh3847.ElemContainerState(yyj3847) - if r.TryDecodeAsNil() { - yyv3847[yyj3847] = NodeAddress{} - } else { - yyv3849 := &yyv3847[yyj3847] - yyv3849.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3847 := 0 - for ; !r.CheckBreak(); yyj3847++ { - - if yyj3847 >= len(yyv3847) { - yyv3847 = append(yyv3847, NodeAddress{}) // var yyz3847 NodeAddress - yyc3847 = true - } - yyh3847.ElemContainerState(yyj3847) - if yyj3847 < len(yyv3847) { - if r.TryDecodeAsNil() { - yyv3847[yyj3847] = NodeAddress{} - } else { - yyv3850 := &yyv3847[yyj3847] - yyv3850.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3847 < len(yyv3847) { - yyv3847 = yyv3847[:yyj3847] - yyc3847 = true - } else if yyj3847 == 0 && yyv3847 == nil { - yyv3847 = []NodeAddress{} - yyc3847 = true - } - } - yyh3847.End() - if yyc3847 { - *v = yyv3847 - } -} - -func (x codecSelfer1234) encSliceContainerImage(v []ContainerImage, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3851 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3852 := &yyv3851 - yy3852.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceContainerImage(v *[]ContainerImage, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3853 := *v - yyh3853, yyl3853 := z.DecSliceHelperStart() - var yyc3853 bool - if yyl3853 == 0 { - if yyv3853 == nil { - yyv3853 = []ContainerImage{} - yyc3853 = true - } else if len(yyv3853) != 0 { - yyv3853 = yyv3853[:0] - yyc3853 = true - } - } else if yyl3853 > 0 { - var yyrr3853, yyrl3853 int - var yyrt3853 bool - if yyl3853 > cap(yyv3853) { - - yyrg3853 := len(yyv3853) > 0 - yyv23853 := yyv3853 - yyrl3853, yyrt3853 = z.DecInferLen(yyl3853, z.DecBasicHandle().MaxInitLen, 32) - if yyrt3853 { - if yyrl3853 <= cap(yyv3853) { - yyv3853 = yyv3853[:yyrl3853] - } else { - yyv3853 = make([]ContainerImage, yyrl3853) - } - } else { - yyv3853 = make([]ContainerImage, yyrl3853) - } - yyc3853 = true - yyrr3853 = len(yyv3853) - if yyrg3853 { - copy(yyv3853, yyv23853) - } - } else if yyl3853 != len(yyv3853) { - yyv3853 = yyv3853[:yyl3853] - yyc3853 = true - } - yyj3853 := 0 - for ; yyj3853 < yyrr3853; yyj3853++ { - yyh3853.ElemContainerState(yyj3853) - if r.TryDecodeAsNil() { - yyv3853[yyj3853] = ContainerImage{} - } else { - yyv3854 := &yyv3853[yyj3853] - yyv3854.CodecDecodeSelf(d) - } - - } - if yyrt3853 { - for ; yyj3853 < yyl3853; yyj3853++ { - yyv3853 = append(yyv3853, ContainerImage{}) - yyh3853.ElemContainerState(yyj3853) - if r.TryDecodeAsNil() { - yyv3853[yyj3853] = ContainerImage{} - } else { - yyv3855 := &yyv3853[yyj3853] - yyv3855.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3853 := 0 - for ; !r.CheckBreak(); yyj3853++ { - - if yyj3853 >= len(yyv3853) { - yyv3853 = append(yyv3853, ContainerImage{}) // var yyz3853 ContainerImage - yyc3853 = true - } - yyh3853.ElemContainerState(yyj3853) - if yyj3853 < len(yyv3853) { - if r.TryDecodeAsNil() { - yyv3853[yyj3853] = ContainerImage{} - } else { - yyv3856 := &yyv3853[yyj3853] - yyv3856.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3853 < len(yyv3853) { - yyv3853 = yyv3853[:yyj3853] - yyc3853 = true - } else if yyj3853 == 0 && yyv3853 == nil { - yyv3853 = []ContainerImage{} - yyc3853 = true - } - } - yyh3853.End() - if yyc3853 { - *v = yyv3853 - } -} - -func (x codecSelfer1234) encResourceList(v ResourceList, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeMapStart(len(v)) - for yyk3857, yyv3857 := range v { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - yyk3857.CodecEncodeSelf(e) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3858 := &yyv3857 - yym3859 := z.EncBinary() - _ = yym3859 - if false { - } else if z.HasExtensions() && z.EncExt(yy3858) { - } else if !yym3859 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3858) - } else { - z.EncFallback(yy3858) - } - } - z.EncSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x codecSelfer1234) decResourceList(v *ResourceList, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3860 := *v - yyl3860 := r.ReadMapStart() - yybh3860 := z.DecBasicHandle() - if yyv3860 == nil { - yyrl3860, _ := z.DecInferLen(yyl3860, yybh3860.MaxInitLen, 40) - yyv3860 = make(map[ResourceName]pkg3_resource.Quantity, yyrl3860) - *v = yyv3860 - } - var yymk3860 ResourceName - var yymv3860 pkg3_resource.Quantity - var yymg3860 bool - if yybh3860.MapValueReset { - yymg3860 = true - } - if yyl3860 > 0 { - for yyj3860 := 0; yyj3860 < yyl3860; yyj3860++ { - z.DecSendContainerState(codecSelfer_containerMapKey1234) - if r.TryDecodeAsNil() { - yymk3860 = "" - } else { - yymk3860 = ResourceName(r.DecodeString()) - } - - if yymg3860 { - yymv3860 = yyv3860[yymk3860] - } else { - yymv3860 = pkg3_resource.Quantity{} - } - z.DecSendContainerState(codecSelfer_containerMapValue1234) - if r.TryDecodeAsNil() { - yymv3860 = pkg3_resource.Quantity{} - } else { - yyv3862 := &yymv3860 - yym3863 := z.DecBinary() - _ = yym3863 - if false { - } else if z.HasExtensions() && z.DecExt(yyv3862) { - } else if !yym3863 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3862) - } else { - z.DecFallback(yyv3862, false) - } - } - - if yyv3860 != nil { - yyv3860[yymk3860] = yymv3860 - } - } - } else if yyl3860 < 0 { - for yyj3860 := 0; !r.CheckBreak(); yyj3860++ { - z.DecSendContainerState(codecSelfer_containerMapKey1234) - if r.TryDecodeAsNil() { - yymk3860 = "" - } else { - yymk3860 = ResourceName(r.DecodeString()) - } - - if yymg3860 { - yymv3860 = yyv3860[yymk3860] - } else { - yymv3860 = pkg3_resource.Quantity{} - } - z.DecSendContainerState(codecSelfer_containerMapValue1234) - if r.TryDecodeAsNil() { - yymv3860 = pkg3_resource.Quantity{} - } else { - yyv3865 := &yymv3860 - yym3866 := z.DecBinary() - _ = yym3866 - if false { - } else if z.HasExtensions() && z.DecExt(yyv3865) { - } else if !yym3866 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3865) - } else { - z.DecFallback(yyv3865, false) - } - } - - if yyv3860 != nil { - yyv3860[yymk3860] = yymv3860 - } - } - } // else len==0: TODO: Should we clear map entries? - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x codecSelfer1234) encSliceNode(v []Node, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3867 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3868 := &yyv3867 - yy3868.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceNode(v *[]Node, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv3869 := *v - yyh3869, yyl3869 := z.DecSliceHelperStart() - var yyc3869 bool - if yyl3869 == 0 { - if yyv3869 == nil { - yyv3869 = []Node{} - yyc3869 = true - } else if len(yyv3869) != 0 { - yyv3869 = yyv3869[:0] - yyc3869 = true - } - } else if yyl3869 > 0 { - var yyrr3869, yyrl3869 int - var yyrt3869 bool - if yyl3869 > cap(yyv3869) { - - yyrg3869 := len(yyv3869) > 0 - yyv23869 := yyv3869 - yyrl3869, yyrt3869 = z.DecInferLen(yyl3869, z.DecBasicHandle().MaxInitLen, 488) - if yyrt3869 { - if yyrl3869 <= cap(yyv3869) { - yyv3869 = yyv3869[:yyrl3869] - } else { - yyv3869 = make([]Node, yyrl3869) - } - } else { - yyv3869 = make([]Node, yyrl3869) - } - yyc3869 = true - yyrr3869 = len(yyv3869) - if yyrg3869 { - copy(yyv3869, yyv23869) - } - } else if yyl3869 != len(yyv3869) { - yyv3869 = yyv3869[:yyl3869] - yyc3869 = true - } - yyj3869 := 0 - for ; yyj3869 < yyrr3869; yyj3869++ { - yyh3869.ElemContainerState(yyj3869) - if r.TryDecodeAsNil() { - yyv3869[yyj3869] = Node{} - } else { - yyv3870 := &yyv3869[yyj3869] - yyv3870.CodecDecodeSelf(d) - } - - } - if yyrt3869 { - for ; yyj3869 < yyl3869; yyj3869++ { - yyv3869 = append(yyv3869, Node{}) - yyh3869.ElemContainerState(yyj3869) - if r.TryDecodeAsNil() { - yyv3869[yyj3869] = Node{} - } else { - yyv3871 := &yyv3869[yyj3869] - yyv3871.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj3869 := 0 - for ; !r.CheckBreak(); yyj3869++ { - - if yyj3869 >= len(yyv3869) { - yyv3869 = append(yyv3869, Node{}) // var yyz3869 Node - yyc3869 = true - } - yyh3869.ElemContainerState(yyj3869) - if yyj3869 < len(yyv3869) { - if r.TryDecodeAsNil() { - yyv3869[yyj3869] = Node{} - } else { - yyv3872 := &yyv3869[yyj3869] - yyv3872.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj3869 < len(yyv3869) { - yyv3869 = yyv3869[:yyj3869] - yyc3869 = true - } else if yyj3869 == 0 && yyv3869 == nil { - yyv3869 = []Node{} - yyc3869 = true - } - } - yyh3869.End() - if yyc3869 { - *v = yyv3869 - } -} - -func (x codecSelfer1234) encSliceFinalizerName(v []FinalizerName, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv3873 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yyv3873.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceFinalizerName(v *[]FinalizerName, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yyv3874 := *v yyh3874, yyl3874 := z.DecSliceHelperStart() var yyc3874 bool if yyl3874 == 0 { if yyv3874 == nil { - yyv3874 = []FinalizerName{} + yyv3874 = []ContainerStatus{} yyc3874 = true } else if len(yyv3874) != 0 { yyv3874 = yyv3874[:0] @@ -49179,18 +48768,23 @@ func (x codecSelfer1234) decSliceFinalizerName(v *[]FinalizerName, d *codec1978. var yyrt3874 bool if yyl3874 > cap(yyv3874) { - yyrl3874, yyrt3874 = z.DecInferLen(yyl3874, z.DecBasicHandle().MaxInitLen, 16) + yyrg3874 := len(yyv3874) > 0 + yyv23874 := yyv3874 + yyrl3874, yyrt3874 = z.DecInferLen(yyl3874, z.DecBasicHandle().MaxInitLen, 120) if yyrt3874 { if yyrl3874 <= cap(yyv3874) { yyv3874 = yyv3874[:yyrl3874] } else { - yyv3874 = make([]FinalizerName, yyrl3874) + yyv3874 = make([]ContainerStatus, yyrl3874) } } else { - yyv3874 = make([]FinalizerName, yyrl3874) + yyv3874 = make([]ContainerStatus, yyrl3874) } yyc3874 = true yyrr3874 = len(yyv3874) + if yyrg3874 { + copy(yyv3874, yyv23874) + } } else if yyl3874 != len(yyv3874) { yyv3874 = yyv3874[:yyl3874] yyc3874 = true @@ -49199,20 +48793,22 @@ func (x codecSelfer1234) decSliceFinalizerName(v *[]FinalizerName, d *codec1978. for ; yyj3874 < yyrr3874; yyj3874++ { yyh3874.ElemContainerState(yyj3874) if r.TryDecodeAsNil() { - yyv3874[yyj3874] = "" + yyv3874[yyj3874] = ContainerStatus{} } else { - yyv3874[yyj3874] = FinalizerName(r.DecodeString()) + yyv3875 := &yyv3874[yyj3874] + yyv3875.CodecDecodeSelf(d) } } if yyrt3874 { for ; yyj3874 < yyl3874; yyj3874++ { - yyv3874 = append(yyv3874, "") + yyv3874 = append(yyv3874, ContainerStatus{}) yyh3874.ElemContainerState(yyj3874) if r.TryDecodeAsNil() { - yyv3874[yyj3874] = "" + yyv3874[yyj3874] = ContainerStatus{} } else { - yyv3874[yyj3874] = FinalizerName(r.DecodeString()) + yyv3876 := &yyv3874[yyj3874] + yyv3876.CodecDecodeSelf(d) } } @@ -49223,15 +48819,16 @@ func (x codecSelfer1234) decSliceFinalizerName(v *[]FinalizerName, d *codec1978. for ; !r.CheckBreak(); yyj3874++ { if yyj3874 >= len(yyv3874) { - yyv3874 = append(yyv3874, "") // var yyz3874 FinalizerName + yyv3874 = append(yyv3874, ContainerStatus{}) // var yyz3874 ContainerStatus yyc3874 = true } yyh3874.ElemContainerState(yyj3874) if yyj3874 < len(yyv3874) { if r.TryDecodeAsNil() { - yyv3874[yyj3874] = "" + yyv3874[yyj3874] = ContainerStatus{} } else { - yyv3874[yyj3874] = FinalizerName(r.DecodeString()) + yyv3877 := &yyv3874[yyj3874] + yyv3877.CodecDecodeSelf(d) } } else { @@ -49243,7 +48840,7 @@ func (x codecSelfer1234) decSliceFinalizerName(v *[]FinalizerName, d *codec1978. yyv3874 = yyv3874[:yyj3874] yyc3874 = true } else if yyj3874 == 0 && yyv3874 == nil { - yyv3874 = []FinalizerName{} + yyv3874 = []ContainerStatus{} yyc3874 = true } } @@ -49253,7 +48850,7 @@ func (x codecSelfer1234) decSliceFinalizerName(v *[]FinalizerName, d *codec1978. } } -func (x codecSelfer1234) encSliceNamespace(v []Namespace, e *codec1978.Encoder) { +func (x codecSelfer1234) encSlicePod(v []Pod, e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r @@ -49266,7 +48863,7 @@ func (x codecSelfer1234) encSliceNamespace(v []Namespace, e *codec1978.Encoder) z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x codecSelfer1234) decSliceNamespace(v *[]Namespace, d *codec1978.Decoder) { +func (x codecSelfer1234) decSlicePod(v *[]Pod, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r @@ -49276,7 +48873,7 @@ func (x codecSelfer1234) decSliceNamespace(v *[]Namespace, d *codec1978.Decoder) var yyc3880 bool if yyl3880 == 0 { if yyv3880 == nil { - yyv3880 = []Namespace{} + yyv3880 = []Pod{} yyc3880 = true } else if len(yyv3880) != 0 { yyv3880 = yyv3880[:0] @@ -49289,15 +48886,15 @@ func (x codecSelfer1234) decSliceNamespace(v *[]Namespace, d *codec1978.Decoder) yyrg3880 := len(yyv3880) > 0 yyv23880 := yyv3880 - yyrl3880, yyrt3880 = z.DecInferLen(yyl3880, z.DecBasicHandle().MaxInitLen, 232) + yyrl3880, yyrt3880 = z.DecInferLen(yyl3880, z.DecBasicHandle().MaxInitLen, 520) if yyrt3880 { if yyrl3880 <= cap(yyv3880) { yyv3880 = yyv3880[:yyrl3880] } else { - yyv3880 = make([]Namespace, yyrl3880) + yyv3880 = make([]Pod, yyrl3880) } } else { - yyv3880 = make([]Namespace, yyrl3880) + yyv3880 = make([]Pod, yyrl3880) } yyc3880 = true yyrr3880 = len(yyv3880) @@ -49312,7 +48909,7 @@ func (x codecSelfer1234) decSliceNamespace(v *[]Namespace, d *codec1978.Decoder) for ; yyj3880 < yyrr3880; yyj3880++ { yyh3880.ElemContainerState(yyj3880) if r.TryDecodeAsNil() { - yyv3880[yyj3880] = Namespace{} + yyv3880[yyj3880] = Pod{} } else { yyv3881 := &yyv3880[yyj3880] yyv3881.CodecDecodeSelf(d) @@ -49321,10 +48918,10 @@ func (x codecSelfer1234) decSliceNamespace(v *[]Namespace, d *codec1978.Decoder) } if yyrt3880 { for ; yyj3880 < yyl3880; yyj3880++ { - yyv3880 = append(yyv3880, Namespace{}) + yyv3880 = append(yyv3880, Pod{}) yyh3880.ElemContainerState(yyj3880) if r.TryDecodeAsNil() { - yyv3880[yyj3880] = Namespace{} + yyv3880[yyj3880] = Pod{} } else { yyv3882 := &yyv3880[yyj3880] yyv3882.CodecDecodeSelf(d) @@ -49338,13 +48935,13 @@ func (x codecSelfer1234) decSliceNamespace(v *[]Namespace, d *codec1978.Decoder) for ; !r.CheckBreak(); yyj3880++ { if yyj3880 >= len(yyv3880) { - yyv3880 = append(yyv3880, Namespace{}) // var yyz3880 Namespace + yyv3880 = append(yyv3880, Pod{}) // var yyz3880 Pod yyc3880 = true } yyh3880.ElemContainerState(yyj3880) if yyj3880 < len(yyv3880) { if r.TryDecodeAsNil() { - yyv3880[yyj3880] = Namespace{} + yyv3880[yyj3880] = Pod{} } else { yyv3883 := &yyv3880[yyj3880] yyv3883.CodecDecodeSelf(d) @@ -49359,7 +48956,7 @@ func (x codecSelfer1234) decSliceNamespace(v *[]Namespace, d *codec1978.Decoder) yyv3880 = yyv3880[:yyj3880] yyc3880 = true } else if yyj3880 == 0 && yyv3880 == nil { - yyv3880 = []Namespace{} + yyv3880 = []Pod{} yyc3880 = true } } @@ -49369,7 +48966,7 @@ func (x codecSelfer1234) decSliceNamespace(v *[]Namespace, d *codec1978.Decoder) } } -func (x codecSelfer1234) encSliceEvent(v []Event, e *codec1978.Encoder) { +func (x codecSelfer1234) encSlicePodTemplate(v []PodTemplate, e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r @@ -49382,7 +48979,7 @@ func (x codecSelfer1234) encSliceEvent(v []Event, e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x codecSelfer1234) decSliceEvent(v *[]Event, d *codec1978.Decoder) { +func (x codecSelfer1234) decSlicePodTemplate(v *[]PodTemplate, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r @@ -49392,7 +48989,7 @@ func (x codecSelfer1234) decSliceEvent(v *[]Event, d *codec1978.Decoder) { var yyc3886 bool if yyl3886 == 0 { if yyv3886 == nil { - yyv3886 = []Event{} + yyv3886 = []PodTemplate{} yyc3886 = true } else if len(yyv3886) != 0 { yyv3886 = yyv3886[:0] @@ -49405,15 +49002,15 @@ func (x codecSelfer1234) decSliceEvent(v *[]Event, d *codec1978.Decoder) { yyrg3886 := len(yyv3886) > 0 yyv23886 := yyv3886 - yyrl3886, yyrt3886 = z.DecInferLen(yyl3886, z.DecBasicHandle().MaxInitLen, 440) + yyrl3886, yyrt3886 = z.DecInferLen(yyl3886, z.DecBasicHandle().MaxInitLen, 544) if yyrt3886 { if yyrl3886 <= cap(yyv3886) { yyv3886 = yyv3886[:yyrl3886] } else { - yyv3886 = make([]Event, yyrl3886) + yyv3886 = make([]PodTemplate, yyrl3886) } } else { - yyv3886 = make([]Event, yyrl3886) + yyv3886 = make([]PodTemplate, yyrl3886) } yyc3886 = true yyrr3886 = len(yyv3886) @@ -49428,7 +49025,7 @@ func (x codecSelfer1234) decSliceEvent(v *[]Event, d *codec1978.Decoder) { for ; yyj3886 < yyrr3886; yyj3886++ { yyh3886.ElemContainerState(yyj3886) if r.TryDecodeAsNil() { - yyv3886[yyj3886] = Event{} + yyv3886[yyj3886] = PodTemplate{} } else { yyv3887 := &yyv3886[yyj3886] yyv3887.CodecDecodeSelf(d) @@ -49437,10 +49034,10 @@ func (x codecSelfer1234) decSliceEvent(v *[]Event, d *codec1978.Decoder) { } if yyrt3886 { for ; yyj3886 < yyl3886; yyj3886++ { - yyv3886 = append(yyv3886, Event{}) + yyv3886 = append(yyv3886, PodTemplate{}) yyh3886.ElemContainerState(yyj3886) if r.TryDecodeAsNil() { - yyv3886[yyj3886] = Event{} + yyv3886[yyj3886] = PodTemplate{} } else { yyv3888 := &yyv3886[yyj3886] yyv3888.CodecDecodeSelf(d) @@ -49454,13 +49051,13 @@ func (x codecSelfer1234) decSliceEvent(v *[]Event, d *codec1978.Decoder) { for ; !r.CheckBreak(); yyj3886++ { if yyj3886 >= len(yyv3886) { - yyv3886 = append(yyv3886, Event{}) // var yyz3886 Event + yyv3886 = append(yyv3886, PodTemplate{}) // var yyz3886 PodTemplate yyc3886 = true } yyh3886.ElemContainerState(yyj3886) if yyj3886 < len(yyv3886) { if r.TryDecodeAsNil() { - yyv3886[yyj3886] = Event{} + yyv3886[yyj3886] = PodTemplate{} } else { yyv3889 := &yyv3886[yyj3886] yyv3889.CodecDecodeSelf(d) @@ -49475,7 +49072,7 @@ func (x codecSelfer1234) decSliceEvent(v *[]Event, d *codec1978.Decoder) { yyv3886 = yyv3886[:yyj3886] yyc3886 = true } else if yyj3886 == 0 && yyv3886 == nil { - yyv3886 = []Event{} + yyv3886 = []PodTemplate{} yyc3886 = true } } @@ -49485,7 +49082,7 @@ func (x codecSelfer1234) decSliceEvent(v *[]Event, d *codec1978.Decoder) { } } -func (x codecSelfer1234) encSliceruntime_RawExtension(v []pkg6_runtime.RawExtension, e *codec1978.Encoder) { +func (x codecSelfer1234) encSliceReplicationController(v []ReplicationController, e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r @@ -49493,14 +49090,2091 @@ func (x codecSelfer1234) encSliceruntime_RawExtension(v []pkg6_runtime.RawExtens for _, yyv3890 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) yy3891 := &yyv3890 - yym3892 := z.EncBinary() - _ = yym3892 + yy3891.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceReplicationController(v *[]ReplicationController, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3892 := *v + yyh3892, yyl3892 := z.DecSliceHelperStart() + var yyc3892 bool + if yyl3892 == 0 { + if yyv3892 == nil { + yyv3892 = []ReplicationController{} + yyc3892 = true + } else if len(yyv3892) != 0 { + yyv3892 = yyv3892[:0] + yyc3892 = true + } + } else if yyl3892 > 0 { + var yyrr3892, yyrl3892 int + var yyrt3892 bool + if yyl3892 > cap(yyv3892) { + + yyrg3892 := len(yyv3892) > 0 + yyv23892 := yyv3892 + yyrl3892, yyrt3892 = z.DecInferLen(yyl3892, z.DecBasicHandle().MaxInitLen, 232) + if yyrt3892 { + if yyrl3892 <= cap(yyv3892) { + yyv3892 = yyv3892[:yyrl3892] + } else { + yyv3892 = make([]ReplicationController, yyrl3892) + } + } else { + yyv3892 = make([]ReplicationController, yyrl3892) + } + yyc3892 = true + yyrr3892 = len(yyv3892) + if yyrg3892 { + copy(yyv3892, yyv23892) + } + } else if yyl3892 != len(yyv3892) { + yyv3892 = yyv3892[:yyl3892] + yyc3892 = true + } + yyj3892 := 0 + for ; yyj3892 < yyrr3892; yyj3892++ { + yyh3892.ElemContainerState(yyj3892) + if r.TryDecodeAsNil() { + yyv3892[yyj3892] = ReplicationController{} + } else { + yyv3893 := &yyv3892[yyj3892] + yyv3893.CodecDecodeSelf(d) + } + + } + if yyrt3892 { + for ; yyj3892 < yyl3892; yyj3892++ { + yyv3892 = append(yyv3892, ReplicationController{}) + yyh3892.ElemContainerState(yyj3892) + if r.TryDecodeAsNil() { + yyv3892[yyj3892] = ReplicationController{} + } else { + yyv3894 := &yyv3892[yyj3892] + yyv3894.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3892 := 0 + for ; !r.CheckBreak(); yyj3892++ { + + if yyj3892 >= len(yyv3892) { + yyv3892 = append(yyv3892, ReplicationController{}) // var yyz3892 ReplicationController + yyc3892 = true + } + yyh3892.ElemContainerState(yyj3892) + if yyj3892 < len(yyv3892) { + if r.TryDecodeAsNil() { + yyv3892[yyj3892] = ReplicationController{} + } else { + yyv3895 := &yyv3892[yyj3892] + yyv3895.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3892 < len(yyv3892) { + yyv3892 = yyv3892[:yyj3892] + yyc3892 = true + } else if yyj3892 == 0 && yyv3892 == nil { + yyv3892 = []ReplicationController{} + yyc3892 = true + } + } + yyh3892.End() + if yyc3892 { + *v = yyv3892 + } +} + +func (x codecSelfer1234) encSliceLoadBalancerIngress(v []LoadBalancerIngress, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3896 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3897 := &yyv3896 + yy3897.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceLoadBalancerIngress(v *[]LoadBalancerIngress, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3898 := *v + yyh3898, yyl3898 := z.DecSliceHelperStart() + var yyc3898 bool + if yyl3898 == 0 { + if yyv3898 == nil { + yyv3898 = []LoadBalancerIngress{} + yyc3898 = true + } else if len(yyv3898) != 0 { + yyv3898 = yyv3898[:0] + yyc3898 = true + } + } else if yyl3898 > 0 { + var yyrr3898, yyrl3898 int + var yyrt3898 bool + if yyl3898 > cap(yyv3898) { + + yyrg3898 := len(yyv3898) > 0 + yyv23898 := yyv3898 + yyrl3898, yyrt3898 = z.DecInferLen(yyl3898, z.DecBasicHandle().MaxInitLen, 32) + if yyrt3898 { + if yyrl3898 <= cap(yyv3898) { + yyv3898 = yyv3898[:yyrl3898] + } else { + yyv3898 = make([]LoadBalancerIngress, yyrl3898) + } + } else { + yyv3898 = make([]LoadBalancerIngress, yyrl3898) + } + yyc3898 = true + yyrr3898 = len(yyv3898) + if yyrg3898 { + copy(yyv3898, yyv23898) + } + } else if yyl3898 != len(yyv3898) { + yyv3898 = yyv3898[:yyl3898] + yyc3898 = true + } + yyj3898 := 0 + for ; yyj3898 < yyrr3898; yyj3898++ { + yyh3898.ElemContainerState(yyj3898) + if r.TryDecodeAsNil() { + yyv3898[yyj3898] = LoadBalancerIngress{} + } else { + yyv3899 := &yyv3898[yyj3898] + yyv3899.CodecDecodeSelf(d) + } + + } + if yyrt3898 { + for ; yyj3898 < yyl3898; yyj3898++ { + yyv3898 = append(yyv3898, LoadBalancerIngress{}) + yyh3898.ElemContainerState(yyj3898) + if r.TryDecodeAsNil() { + yyv3898[yyj3898] = LoadBalancerIngress{} + } else { + yyv3900 := &yyv3898[yyj3898] + yyv3900.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3898 := 0 + for ; !r.CheckBreak(); yyj3898++ { + + if yyj3898 >= len(yyv3898) { + yyv3898 = append(yyv3898, LoadBalancerIngress{}) // var yyz3898 LoadBalancerIngress + yyc3898 = true + } + yyh3898.ElemContainerState(yyj3898) + if yyj3898 < len(yyv3898) { + if r.TryDecodeAsNil() { + yyv3898[yyj3898] = LoadBalancerIngress{} + } else { + yyv3901 := &yyv3898[yyj3898] + yyv3901.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3898 < len(yyv3898) { + yyv3898 = yyv3898[:yyj3898] + yyc3898 = true + } else if yyj3898 == 0 && yyv3898 == nil { + yyv3898 = []LoadBalancerIngress{} + yyc3898 = true + } + } + yyh3898.End() + if yyc3898 { + *v = yyv3898 + } +} + +func (x codecSelfer1234) encSliceServicePort(v []ServicePort, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3902 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3903 := &yyv3902 + yy3903.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceServicePort(v *[]ServicePort, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3904 := *v + yyh3904, yyl3904 := z.DecSliceHelperStart() + var yyc3904 bool + if yyl3904 == 0 { + if yyv3904 == nil { + yyv3904 = []ServicePort{} + yyc3904 = true + } else if len(yyv3904) != 0 { + yyv3904 = yyv3904[:0] + yyc3904 = true + } + } else if yyl3904 > 0 { + var yyrr3904, yyrl3904 int + var yyrt3904 bool + if yyl3904 > cap(yyv3904) { + + yyrg3904 := len(yyv3904) > 0 + yyv23904 := yyv3904 + yyrl3904, yyrt3904 = z.DecInferLen(yyl3904, z.DecBasicHandle().MaxInitLen, 80) + if yyrt3904 { + if yyrl3904 <= cap(yyv3904) { + yyv3904 = yyv3904[:yyrl3904] + } else { + yyv3904 = make([]ServicePort, yyrl3904) + } + } else { + yyv3904 = make([]ServicePort, yyrl3904) + } + yyc3904 = true + yyrr3904 = len(yyv3904) + if yyrg3904 { + copy(yyv3904, yyv23904) + } + } else if yyl3904 != len(yyv3904) { + yyv3904 = yyv3904[:yyl3904] + yyc3904 = true + } + yyj3904 := 0 + for ; yyj3904 < yyrr3904; yyj3904++ { + yyh3904.ElemContainerState(yyj3904) + if r.TryDecodeAsNil() { + yyv3904[yyj3904] = ServicePort{} + } else { + yyv3905 := &yyv3904[yyj3904] + yyv3905.CodecDecodeSelf(d) + } + + } + if yyrt3904 { + for ; yyj3904 < yyl3904; yyj3904++ { + yyv3904 = append(yyv3904, ServicePort{}) + yyh3904.ElemContainerState(yyj3904) + if r.TryDecodeAsNil() { + yyv3904[yyj3904] = ServicePort{} + } else { + yyv3906 := &yyv3904[yyj3904] + yyv3906.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3904 := 0 + for ; !r.CheckBreak(); yyj3904++ { + + if yyj3904 >= len(yyv3904) { + yyv3904 = append(yyv3904, ServicePort{}) // var yyz3904 ServicePort + yyc3904 = true + } + yyh3904.ElemContainerState(yyj3904) + if yyj3904 < len(yyv3904) { + if r.TryDecodeAsNil() { + yyv3904[yyj3904] = ServicePort{} + } else { + yyv3907 := &yyv3904[yyj3904] + yyv3907.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3904 < len(yyv3904) { + yyv3904 = yyv3904[:yyj3904] + yyc3904 = true + } else if yyj3904 == 0 && yyv3904 == nil { + yyv3904 = []ServicePort{} + yyc3904 = true + } + } + yyh3904.End() + if yyc3904 { + *v = yyv3904 + } +} + +func (x codecSelfer1234) encSliceService(v []Service, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3908 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3909 := &yyv3908 + yy3909.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceService(v *[]Service, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3910 := *v + yyh3910, yyl3910 := z.DecSliceHelperStart() + var yyc3910 bool + if yyl3910 == 0 { + if yyv3910 == nil { + yyv3910 = []Service{} + yyc3910 = true + } else if len(yyv3910) != 0 { + yyv3910 = yyv3910[:0] + yyc3910 = true + } + } else if yyl3910 > 0 { + var yyrr3910, yyrl3910 int + var yyrt3910 bool + if yyl3910 > cap(yyv3910) { + + yyrg3910 := len(yyv3910) > 0 + yyv23910 := yyv3910 + yyrl3910, yyrt3910 = z.DecInferLen(yyl3910, z.DecBasicHandle().MaxInitLen, 360) + if yyrt3910 { + if yyrl3910 <= cap(yyv3910) { + yyv3910 = yyv3910[:yyrl3910] + } else { + yyv3910 = make([]Service, yyrl3910) + } + } else { + yyv3910 = make([]Service, yyrl3910) + } + yyc3910 = true + yyrr3910 = len(yyv3910) + if yyrg3910 { + copy(yyv3910, yyv23910) + } + } else if yyl3910 != len(yyv3910) { + yyv3910 = yyv3910[:yyl3910] + yyc3910 = true + } + yyj3910 := 0 + for ; yyj3910 < yyrr3910; yyj3910++ { + yyh3910.ElemContainerState(yyj3910) + if r.TryDecodeAsNil() { + yyv3910[yyj3910] = Service{} + } else { + yyv3911 := &yyv3910[yyj3910] + yyv3911.CodecDecodeSelf(d) + } + + } + if yyrt3910 { + for ; yyj3910 < yyl3910; yyj3910++ { + yyv3910 = append(yyv3910, Service{}) + yyh3910.ElemContainerState(yyj3910) + if r.TryDecodeAsNil() { + yyv3910[yyj3910] = Service{} + } else { + yyv3912 := &yyv3910[yyj3910] + yyv3912.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3910 := 0 + for ; !r.CheckBreak(); yyj3910++ { + + if yyj3910 >= len(yyv3910) { + yyv3910 = append(yyv3910, Service{}) // var yyz3910 Service + yyc3910 = true + } + yyh3910.ElemContainerState(yyj3910) + if yyj3910 < len(yyv3910) { + if r.TryDecodeAsNil() { + yyv3910[yyj3910] = Service{} + } else { + yyv3913 := &yyv3910[yyj3910] + yyv3913.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3910 < len(yyv3910) { + yyv3910 = yyv3910[:yyj3910] + yyc3910 = true + } else if yyj3910 == 0 && yyv3910 == nil { + yyv3910 = []Service{} + yyc3910 = true + } + } + yyh3910.End() + if yyc3910 { + *v = yyv3910 + } +} + +func (x codecSelfer1234) encSliceObjectReference(v []ObjectReference, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3914 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3915 := &yyv3914 + yy3915.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceObjectReference(v *[]ObjectReference, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3916 := *v + yyh3916, yyl3916 := z.DecSliceHelperStart() + var yyc3916 bool + if yyl3916 == 0 { + if yyv3916 == nil { + yyv3916 = []ObjectReference{} + yyc3916 = true + } else if len(yyv3916) != 0 { + yyv3916 = yyv3916[:0] + yyc3916 = true + } + } else if yyl3916 > 0 { + var yyrr3916, yyrl3916 int + var yyrt3916 bool + if yyl3916 > cap(yyv3916) { + + yyrg3916 := len(yyv3916) > 0 + yyv23916 := yyv3916 + yyrl3916, yyrt3916 = z.DecInferLen(yyl3916, z.DecBasicHandle().MaxInitLen, 112) + if yyrt3916 { + if yyrl3916 <= cap(yyv3916) { + yyv3916 = yyv3916[:yyrl3916] + } else { + yyv3916 = make([]ObjectReference, yyrl3916) + } + } else { + yyv3916 = make([]ObjectReference, yyrl3916) + } + yyc3916 = true + yyrr3916 = len(yyv3916) + if yyrg3916 { + copy(yyv3916, yyv23916) + } + } else if yyl3916 != len(yyv3916) { + yyv3916 = yyv3916[:yyl3916] + yyc3916 = true + } + yyj3916 := 0 + for ; yyj3916 < yyrr3916; yyj3916++ { + yyh3916.ElemContainerState(yyj3916) + if r.TryDecodeAsNil() { + yyv3916[yyj3916] = ObjectReference{} + } else { + yyv3917 := &yyv3916[yyj3916] + yyv3917.CodecDecodeSelf(d) + } + + } + if yyrt3916 { + for ; yyj3916 < yyl3916; yyj3916++ { + yyv3916 = append(yyv3916, ObjectReference{}) + yyh3916.ElemContainerState(yyj3916) + if r.TryDecodeAsNil() { + yyv3916[yyj3916] = ObjectReference{} + } else { + yyv3918 := &yyv3916[yyj3916] + yyv3918.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3916 := 0 + for ; !r.CheckBreak(); yyj3916++ { + + if yyj3916 >= len(yyv3916) { + yyv3916 = append(yyv3916, ObjectReference{}) // var yyz3916 ObjectReference + yyc3916 = true + } + yyh3916.ElemContainerState(yyj3916) + if yyj3916 < len(yyv3916) { + if r.TryDecodeAsNil() { + yyv3916[yyj3916] = ObjectReference{} + } else { + yyv3919 := &yyv3916[yyj3916] + yyv3919.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3916 < len(yyv3916) { + yyv3916 = yyv3916[:yyj3916] + yyc3916 = true + } else if yyj3916 == 0 && yyv3916 == nil { + yyv3916 = []ObjectReference{} + yyc3916 = true + } + } + yyh3916.End() + if yyc3916 { + *v = yyv3916 + } +} + +func (x codecSelfer1234) encSliceServiceAccount(v []ServiceAccount, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3920 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3921 := &yyv3920 + yy3921.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceServiceAccount(v *[]ServiceAccount, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3922 := *v + yyh3922, yyl3922 := z.DecSliceHelperStart() + var yyc3922 bool + if yyl3922 == 0 { + if yyv3922 == nil { + yyv3922 = []ServiceAccount{} + yyc3922 = true + } else if len(yyv3922) != 0 { + yyv3922 = yyv3922[:0] + yyc3922 = true + } + } else if yyl3922 > 0 { + var yyrr3922, yyrl3922 int + var yyrt3922 bool + if yyl3922 > cap(yyv3922) { + + yyrg3922 := len(yyv3922) > 0 + yyv23922 := yyv3922 + yyrl3922, yyrt3922 = z.DecInferLen(yyl3922, z.DecBasicHandle().MaxInitLen, 240) + if yyrt3922 { + if yyrl3922 <= cap(yyv3922) { + yyv3922 = yyv3922[:yyrl3922] + } else { + yyv3922 = make([]ServiceAccount, yyrl3922) + } + } else { + yyv3922 = make([]ServiceAccount, yyrl3922) + } + yyc3922 = true + yyrr3922 = len(yyv3922) + if yyrg3922 { + copy(yyv3922, yyv23922) + } + } else if yyl3922 != len(yyv3922) { + yyv3922 = yyv3922[:yyl3922] + yyc3922 = true + } + yyj3922 := 0 + for ; yyj3922 < yyrr3922; yyj3922++ { + yyh3922.ElemContainerState(yyj3922) + if r.TryDecodeAsNil() { + yyv3922[yyj3922] = ServiceAccount{} + } else { + yyv3923 := &yyv3922[yyj3922] + yyv3923.CodecDecodeSelf(d) + } + + } + if yyrt3922 { + for ; yyj3922 < yyl3922; yyj3922++ { + yyv3922 = append(yyv3922, ServiceAccount{}) + yyh3922.ElemContainerState(yyj3922) + if r.TryDecodeAsNil() { + yyv3922[yyj3922] = ServiceAccount{} + } else { + yyv3924 := &yyv3922[yyj3922] + yyv3924.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3922 := 0 + for ; !r.CheckBreak(); yyj3922++ { + + if yyj3922 >= len(yyv3922) { + yyv3922 = append(yyv3922, ServiceAccount{}) // var yyz3922 ServiceAccount + yyc3922 = true + } + yyh3922.ElemContainerState(yyj3922) + if yyj3922 < len(yyv3922) { + if r.TryDecodeAsNil() { + yyv3922[yyj3922] = ServiceAccount{} + } else { + yyv3925 := &yyv3922[yyj3922] + yyv3925.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3922 < len(yyv3922) { + yyv3922 = yyv3922[:yyj3922] + yyc3922 = true + } else if yyj3922 == 0 && yyv3922 == nil { + yyv3922 = []ServiceAccount{} + yyc3922 = true + } + } + yyh3922.End() + if yyc3922 { + *v = yyv3922 + } +} + +func (x codecSelfer1234) encSliceEndpointSubset(v []EndpointSubset, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3926 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3927 := &yyv3926 + yy3927.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceEndpointSubset(v *[]EndpointSubset, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3928 := *v + yyh3928, yyl3928 := z.DecSliceHelperStart() + var yyc3928 bool + if yyl3928 == 0 { + if yyv3928 == nil { + yyv3928 = []EndpointSubset{} + yyc3928 = true + } else if len(yyv3928) != 0 { + yyv3928 = yyv3928[:0] + yyc3928 = true + } + } else if yyl3928 > 0 { + var yyrr3928, yyrl3928 int + var yyrt3928 bool + if yyl3928 > cap(yyv3928) { + + yyrg3928 := len(yyv3928) > 0 + yyv23928 := yyv3928 + yyrl3928, yyrt3928 = z.DecInferLen(yyl3928, z.DecBasicHandle().MaxInitLen, 72) + if yyrt3928 { + if yyrl3928 <= cap(yyv3928) { + yyv3928 = yyv3928[:yyrl3928] + } else { + yyv3928 = make([]EndpointSubset, yyrl3928) + } + } else { + yyv3928 = make([]EndpointSubset, yyrl3928) + } + yyc3928 = true + yyrr3928 = len(yyv3928) + if yyrg3928 { + copy(yyv3928, yyv23928) + } + } else if yyl3928 != len(yyv3928) { + yyv3928 = yyv3928[:yyl3928] + yyc3928 = true + } + yyj3928 := 0 + for ; yyj3928 < yyrr3928; yyj3928++ { + yyh3928.ElemContainerState(yyj3928) + if r.TryDecodeAsNil() { + yyv3928[yyj3928] = EndpointSubset{} + } else { + yyv3929 := &yyv3928[yyj3928] + yyv3929.CodecDecodeSelf(d) + } + + } + if yyrt3928 { + for ; yyj3928 < yyl3928; yyj3928++ { + yyv3928 = append(yyv3928, EndpointSubset{}) + yyh3928.ElemContainerState(yyj3928) + if r.TryDecodeAsNil() { + yyv3928[yyj3928] = EndpointSubset{} + } else { + yyv3930 := &yyv3928[yyj3928] + yyv3930.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3928 := 0 + for ; !r.CheckBreak(); yyj3928++ { + + if yyj3928 >= len(yyv3928) { + yyv3928 = append(yyv3928, EndpointSubset{}) // var yyz3928 EndpointSubset + yyc3928 = true + } + yyh3928.ElemContainerState(yyj3928) + if yyj3928 < len(yyv3928) { + if r.TryDecodeAsNil() { + yyv3928[yyj3928] = EndpointSubset{} + } else { + yyv3931 := &yyv3928[yyj3928] + yyv3931.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3928 < len(yyv3928) { + yyv3928 = yyv3928[:yyj3928] + yyc3928 = true + } else if yyj3928 == 0 && yyv3928 == nil { + yyv3928 = []EndpointSubset{} + yyc3928 = true + } + } + yyh3928.End() + if yyc3928 { + *v = yyv3928 + } +} + +func (x codecSelfer1234) encSliceEndpointAddress(v []EndpointAddress, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3932 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3933 := &yyv3932 + yy3933.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceEndpointAddress(v *[]EndpointAddress, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3934 := *v + yyh3934, yyl3934 := z.DecSliceHelperStart() + var yyc3934 bool + if yyl3934 == 0 { + if yyv3934 == nil { + yyv3934 = []EndpointAddress{} + yyc3934 = true + } else if len(yyv3934) != 0 { + yyv3934 = yyv3934[:0] + yyc3934 = true + } + } else if yyl3934 > 0 { + var yyrr3934, yyrl3934 int + var yyrt3934 bool + if yyl3934 > cap(yyv3934) { + + yyrg3934 := len(yyv3934) > 0 + yyv23934 := yyv3934 + yyrl3934, yyrt3934 = z.DecInferLen(yyl3934, z.DecBasicHandle().MaxInitLen, 24) + if yyrt3934 { + if yyrl3934 <= cap(yyv3934) { + yyv3934 = yyv3934[:yyrl3934] + } else { + yyv3934 = make([]EndpointAddress, yyrl3934) + } + } else { + yyv3934 = make([]EndpointAddress, yyrl3934) + } + yyc3934 = true + yyrr3934 = len(yyv3934) + if yyrg3934 { + copy(yyv3934, yyv23934) + } + } else if yyl3934 != len(yyv3934) { + yyv3934 = yyv3934[:yyl3934] + yyc3934 = true + } + yyj3934 := 0 + for ; yyj3934 < yyrr3934; yyj3934++ { + yyh3934.ElemContainerState(yyj3934) + if r.TryDecodeAsNil() { + yyv3934[yyj3934] = EndpointAddress{} + } else { + yyv3935 := &yyv3934[yyj3934] + yyv3935.CodecDecodeSelf(d) + } + + } + if yyrt3934 { + for ; yyj3934 < yyl3934; yyj3934++ { + yyv3934 = append(yyv3934, EndpointAddress{}) + yyh3934.ElemContainerState(yyj3934) + if r.TryDecodeAsNil() { + yyv3934[yyj3934] = EndpointAddress{} + } else { + yyv3936 := &yyv3934[yyj3934] + yyv3936.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3934 := 0 + for ; !r.CheckBreak(); yyj3934++ { + + if yyj3934 >= len(yyv3934) { + yyv3934 = append(yyv3934, EndpointAddress{}) // var yyz3934 EndpointAddress + yyc3934 = true + } + yyh3934.ElemContainerState(yyj3934) + if yyj3934 < len(yyv3934) { + if r.TryDecodeAsNil() { + yyv3934[yyj3934] = EndpointAddress{} + } else { + yyv3937 := &yyv3934[yyj3934] + yyv3937.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3934 < len(yyv3934) { + yyv3934 = yyv3934[:yyj3934] + yyc3934 = true + } else if yyj3934 == 0 && yyv3934 == nil { + yyv3934 = []EndpointAddress{} + yyc3934 = true + } + } + yyh3934.End() + if yyc3934 { + *v = yyv3934 + } +} + +func (x codecSelfer1234) encSliceEndpointPort(v []EndpointPort, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3938 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3939 := &yyv3938 + yy3939.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceEndpointPort(v *[]EndpointPort, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3940 := *v + yyh3940, yyl3940 := z.DecSliceHelperStart() + var yyc3940 bool + if yyl3940 == 0 { + if yyv3940 == nil { + yyv3940 = []EndpointPort{} + yyc3940 = true + } else if len(yyv3940) != 0 { + yyv3940 = yyv3940[:0] + yyc3940 = true + } + } else if yyl3940 > 0 { + var yyrr3940, yyrl3940 int + var yyrt3940 bool + if yyl3940 > cap(yyv3940) { + + yyrg3940 := len(yyv3940) > 0 + yyv23940 := yyv3940 + yyrl3940, yyrt3940 = z.DecInferLen(yyl3940, z.DecBasicHandle().MaxInitLen, 40) + if yyrt3940 { + if yyrl3940 <= cap(yyv3940) { + yyv3940 = yyv3940[:yyrl3940] + } else { + yyv3940 = make([]EndpointPort, yyrl3940) + } + } else { + yyv3940 = make([]EndpointPort, yyrl3940) + } + yyc3940 = true + yyrr3940 = len(yyv3940) + if yyrg3940 { + copy(yyv3940, yyv23940) + } + } else if yyl3940 != len(yyv3940) { + yyv3940 = yyv3940[:yyl3940] + yyc3940 = true + } + yyj3940 := 0 + for ; yyj3940 < yyrr3940; yyj3940++ { + yyh3940.ElemContainerState(yyj3940) + if r.TryDecodeAsNil() { + yyv3940[yyj3940] = EndpointPort{} + } else { + yyv3941 := &yyv3940[yyj3940] + yyv3941.CodecDecodeSelf(d) + } + + } + if yyrt3940 { + for ; yyj3940 < yyl3940; yyj3940++ { + yyv3940 = append(yyv3940, EndpointPort{}) + yyh3940.ElemContainerState(yyj3940) + if r.TryDecodeAsNil() { + yyv3940[yyj3940] = EndpointPort{} + } else { + yyv3942 := &yyv3940[yyj3940] + yyv3942.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3940 := 0 + for ; !r.CheckBreak(); yyj3940++ { + + if yyj3940 >= len(yyv3940) { + yyv3940 = append(yyv3940, EndpointPort{}) // var yyz3940 EndpointPort + yyc3940 = true + } + yyh3940.ElemContainerState(yyj3940) + if yyj3940 < len(yyv3940) { + if r.TryDecodeAsNil() { + yyv3940[yyj3940] = EndpointPort{} + } else { + yyv3943 := &yyv3940[yyj3940] + yyv3943.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3940 < len(yyv3940) { + yyv3940 = yyv3940[:yyj3940] + yyc3940 = true + } else if yyj3940 == 0 && yyv3940 == nil { + yyv3940 = []EndpointPort{} + yyc3940 = true + } + } + yyh3940.End() + if yyc3940 { + *v = yyv3940 + } +} + +func (x codecSelfer1234) encSliceEndpoints(v []Endpoints, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3944 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3945 := &yyv3944 + yy3945.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceEndpoints(v *[]Endpoints, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3946 := *v + yyh3946, yyl3946 := z.DecSliceHelperStart() + var yyc3946 bool + if yyl3946 == 0 { + if yyv3946 == nil { + yyv3946 = []Endpoints{} + yyc3946 = true + } else if len(yyv3946) != 0 { + yyv3946 = yyv3946[:0] + yyc3946 = true + } + } else if yyl3946 > 0 { + var yyrr3946, yyrl3946 int + var yyrt3946 bool + if yyl3946 > cap(yyv3946) { + + yyrg3946 := len(yyv3946) > 0 + yyv23946 := yyv3946 + yyrl3946, yyrt3946 = z.DecInferLen(yyl3946, z.DecBasicHandle().MaxInitLen, 216) + if yyrt3946 { + if yyrl3946 <= cap(yyv3946) { + yyv3946 = yyv3946[:yyrl3946] + } else { + yyv3946 = make([]Endpoints, yyrl3946) + } + } else { + yyv3946 = make([]Endpoints, yyrl3946) + } + yyc3946 = true + yyrr3946 = len(yyv3946) + if yyrg3946 { + copy(yyv3946, yyv23946) + } + } else if yyl3946 != len(yyv3946) { + yyv3946 = yyv3946[:yyl3946] + yyc3946 = true + } + yyj3946 := 0 + for ; yyj3946 < yyrr3946; yyj3946++ { + yyh3946.ElemContainerState(yyj3946) + if r.TryDecodeAsNil() { + yyv3946[yyj3946] = Endpoints{} + } else { + yyv3947 := &yyv3946[yyj3946] + yyv3947.CodecDecodeSelf(d) + } + + } + if yyrt3946 { + for ; yyj3946 < yyl3946; yyj3946++ { + yyv3946 = append(yyv3946, Endpoints{}) + yyh3946.ElemContainerState(yyj3946) + if r.TryDecodeAsNil() { + yyv3946[yyj3946] = Endpoints{} + } else { + yyv3948 := &yyv3946[yyj3946] + yyv3948.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3946 := 0 + for ; !r.CheckBreak(); yyj3946++ { + + if yyj3946 >= len(yyv3946) { + yyv3946 = append(yyv3946, Endpoints{}) // var yyz3946 Endpoints + yyc3946 = true + } + yyh3946.ElemContainerState(yyj3946) + if yyj3946 < len(yyv3946) { + if r.TryDecodeAsNil() { + yyv3946[yyj3946] = Endpoints{} + } else { + yyv3949 := &yyv3946[yyj3946] + yyv3949.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3946 < len(yyv3946) { + yyv3946 = yyv3946[:yyj3946] + yyc3946 = true + } else if yyj3946 == 0 && yyv3946 == nil { + yyv3946 = []Endpoints{} + yyc3946 = true + } + } + yyh3946.End() + if yyc3946 { + *v = yyv3946 + } +} + +func (x codecSelfer1234) encSliceNodeCondition(v []NodeCondition, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3950 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3951 := &yyv3950 + yy3951.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceNodeCondition(v *[]NodeCondition, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3952 := *v + yyh3952, yyl3952 := z.DecSliceHelperStart() + var yyc3952 bool + if yyl3952 == 0 { + if yyv3952 == nil { + yyv3952 = []NodeCondition{} + yyc3952 = true + } else if len(yyv3952) != 0 { + yyv3952 = yyv3952[:0] + yyc3952 = true + } + } else if yyl3952 > 0 { + var yyrr3952, yyrl3952 int + var yyrt3952 bool + if yyl3952 > cap(yyv3952) { + + yyrg3952 := len(yyv3952) > 0 + yyv23952 := yyv3952 + yyrl3952, yyrt3952 = z.DecInferLen(yyl3952, z.DecBasicHandle().MaxInitLen, 112) + if yyrt3952 { + if yyrl3952 <= cap(yyv3952) { + yyv3952 = yyv3952[:yyrl3952] + } else { + yyv3952 = make([]NodeCondition, yyrl3952) + } + } else { + yyv3952 = make([]NodeCondition, yyrl3952) + } + yyc3952 = true + yyrr3952 = len(yyv3952) + if yyrg3952 { + copy(yyv3952, yyv23952) + } + } else if yyl3952 != len(yyv3952) { + yyv3952 = yyv3952[:yyl3952] + yyc3952 = true + } + yyj3952 := 0 + for ; yyj3952 < yyrr3952; yyj3952++ { + yyh3952.ElemContainerState(yyj3952) + if r.TryDecodeAsNil() { + yyv3952[yyj3952] = NodeCondition{} + } else { + yyv3953 := &yyv3952[yyj3952] + yyv3953.CodecDecodeSelf(d) + } + + } + if yyrt3952 { + for ; yyj3952 < yyl3952; yyj3952++ { + yyv3952 = append(yyv3952, NodeCondition{}) + yyh3952.ElemContainerState(yyj3952) + if r.TryDecodeAsNil() { + yyv3952[yyj3952] = NodeCondition{} + } else { + yyv3954 := &yyv3952[yyj3952] + yyv3954.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3952 := 0 + for ; !r.CheckBreak(); yyj3952++ { + + if yyj3952 >= len(yyv3952) { + yyv3952 = append(yyv3952, NodeCondition{}) // var yyz3952 NodeCondition + yyc3952 = true + } + yyh3952.ElemContainerState(yyj3952) + if yyj3952 < len(yyv3952) { + if r.TryDecodeAsNil() { + yyv3952[yyj3952] = NodeCondition{} + } else { + yyv3955 := &yyv3952[yyj3952] + yyv3955.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3952 < len(yyv3952) { + yyv3952 = yyv3952[:yyj3952] + yyc3952 = true + } else if yyj3952 == 0 && yyv3952 == nil { + yyv3952 = []NodeCondition{} + yyc3952 = true + } + } + yyh3952.End() + if yyc3952 { + *v = yyv3952 + } +} + +func (x codecSelfer1234) encSliceNodeAddress(v []NodeAddress, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3956 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3957 := &yyv3956 + yy3957.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceNodeAddress(v *[]NodeAddress, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3958 := *v + yyh3958, yyl3958 := z.DecSliceHelperStart() + var yyc3958 bool + if yyl3958 == 0 { + if yyv3958 == nil { + yyv3958 = []NodeAddress{} + yyc3958 = true + } else if len(yyv3958) != 0 { + yyv3958 = yyv3958[:0] + yyc3958 = true + } + } else if yyl3958 > 0 { + var yyrr3958, yyrl3958 int + var yyrt3958 bool + if yyl3958 > cap(yyv3958) { + + yyrg3958 := len(yyv3958) > 0 + yyv23958 := yyv3958 + yyrl3958, yyrt3958 = z.DecInferLen(yyl3958, z.DecBasicHandle().MaxInitLen, 32) + if yyrt3958 { + if yyrl3958 <= cap(yyv3958) { + yyv3958 = yyv3958[:yyrl3958] + } else { + yyv3958 = make([]NodeAddress, yyrl3958) + } + } else { + yyv3958 = make([]NodeAddress, yyrl3958) + } + yyc3958 = true + yyrr3958 = len(yyv3958) + if yyrg3958 { + copy(yyv3958, yyv23958) + } + } else if yyl3958 != len(yyv3958) { + yyv3958 = yyv3958[:yyl3958] + yyc3958 = true + } + yyj3958 := 0 + for ; yyj3958 < yyrr3958; yyj3958++ { + yyh3958.ElemContainerState(yyj3958) + if r.TryDecodeAsNil() { + yyv3958[yyj3958] = NodeAddress{} + } else { + yyv3959 := &yyv3958[yyj3958] + yyv3959.CodecDecodeSelf(d) + } + + } + if yyrt3958 { + for ; yyj3958 < yyl3958; yyj3958++ { + yyv3958 = append(yyv3958, NodeAddress{}) + yyh3958.ElemContainerState(yyj3958) + if r.TryDecodeAsNil() { + yyv3958[yyj3958] = NodeAddress{} + } else { + yyv3960 := &yyv3958[yyj3958] + yyv3960.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3958 := 0 + for ; !r.CheckBreak(); yyj3958++ { + + if yyj3958 >= len(yyv3958) { + yyv3958 = append(yyv3958, NodeAddress{}) // var yyz3958 NodeAddress + yyc3958 = true + } + yyh3958.ElemContainerState(yyj3958) + if yyj3958 < len(yyv3958) { + if r.TryDecodeAsNil() { + yyv3958[yyj3958] = NodeAddress{} + } else { + yyv3961 := &yyv3958[yyj3958] + yyv3961.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3958 < len(yyv3958) { + yyv3958 = yyv3958[:yyj3958] + yyc3958 = true + } else if yyj3958 == 0 && yyv3958 == nil { + yyv3958 = []NodeAddress{} + yyc3958 = true + } + } + yyh3958.End() + if yyc3958 { + *v = yyv3958 + } +} + +func (x codecSelfer1234) encSliceContainerImage(v []ContainerImage, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3962 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3963 := &yyv3962 + yy3963.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceContainerImage(v *[]ContainerImage, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3964 := *v + yyh3964, yyl3964 := z.DecSliceHelperStart() + var yyc3964 bool + if yyl3964 == 0 { + if yyv3964 == nil { + yyv3964 = []ContainerImage{} + yyc3964 = true + } else if len(yyv3964) != 0 { + yyv3964 = yyv3964[:0] + yyc3964 = true + } + } else if yyl3964 > 0 { + var yyrr3964, yyrl3964 int + var yyrt3964 bool + if yyl3964 > cap(yyv3964) { + + yyrg3964 := len(yyv3964) > 0 + yyv23964 := yyv3964 + yyrl3964, yyrt3964 = z.DecInferLen(yyl3964, z.DecBasicHandle().MaxInitLen, 32) + if yyrt3964 { + if yyrl3964 <= cap(yyv3964) { + yyv3964 = yyv3964[:yyrl3964] + } else { + yyv3964 = make([]ContainerImage, yyrl3964) + } + } else { + yyv3964 = make([]ContainerImage, yyrl3964) + } + yyc3964 = true + yyrr3964 = len(yyv3964) + if yyrg3964 { + copy(yyv3964, yyv23964) + } + } else if yyl3964 != len(yyv3964) { + yyv3964 = yyv3964[:yyl3964] + yyc3964 = true + } + yyj3964 := 0 + for ; yyj3964 < yyrr3964; yyj3964++ { + yyh3964.ElemContainerState(yyj3964) + if r.TryDecodeAsNil() { + yyv3964[yyj3964] = ContainerImage{} + } else { + yyv3965 := &yyv3964[yyj3964] + yyv3965.CodecDecodeSelf(d) + } + + } + if yyrt3964 { + for ; yyj3964 < yyl3964; yyj3964++ { + yyv3964 = append(yyv3964, ContainerImage{}) + yyh3964.ElemContainerState(yyj3964) + if r.TryDecodeAsNil() { + yyv3964[yyj3964] = ContainerImage{} + } else { + yyv3966 := &yyv3964[yyj3964] + yyv3966.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3964 := 0 + for ; !r.CheckBreak(); yyj3964++ { + + if yyj3964 >= len(yyv3964) { + yyv3964 = append(yyv3964, ContainerImage{}) // var yyz3964 ContainerImage + yyc3964 = true + } + yyh3964.ElemContainerState(yyj3964) + if yyj3964 < len(yyv3964) { + if r.TryDecodeAsNil() { + yyv3964[yyj3964] = ContainerImage{} + } else { + yyv3967 := &yyv3964[yyj3964] + yyv3967.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3964 < len(yyv3964) { + yyv3964 = yyv3964[:yyj3964] + yyc3964 = true + } else if yyj3964 == 0 && yyv3964 == nil { + yyv3964 = []ContainerImage{} + yyc3964 = true + } + } + yyh3964.End() + if yyc3964 { + *v = yyv3964 + } +} + +func (x codecSelfer1234) encResourceList(v ResourceList, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeMapStart(len(v)) + for yyk3968, yyv3968 := range v { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + yyk3968.CodecEncodeSelf(e) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy3969 := &yyv3968 + yym3970 := z.EncBinary() + _ = yym3970 if false { - } else if z.HasExtensions() && z.EncExt(yy3891) { - } else if !yym3892 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3891) + } else if z.HasExtensions() && z.EncExt(yy3969) { + } else if !yym3970 && z.IsJSONHandle() { + z.EncJSONMarshal(yy3969) } else { - z.EncFallback(yy3891) + z.EncFallback(yy3969) + } + } + z.EncSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x codecSelfer1234) decResourceList(v *ResourceList, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3971 := *v + yyl3971 := r.ReadMapStart() + yybh3971 := z.DecBasicHandle() + if yyv3971 == nil { + yyrl3971, _ := z.DecInferLen(yyl3971, yybh3971.MaxInitLen, 40) + yyv3971 = make(map[ResourceName]pkg3_resource.Quantity, yyrl3971) + *v = yyv3971 + } + var yymk3971 ResourceName + var yymv3971 pkg3_resource.Quantity + var yymg3971 bool + if yybh3971.MapValueReset { + yymg3971 = true + } + if yyl3971 > 0 { + for yyj3971 := 0; yyj3971 < yyl3971; yyj3971++ { + z.DecSendContainerState(codecSelfer_containerMapKey1234) + if r.TryDecodeAsNil() { + yymk3971 = "" + } else { + yymk3971 = ResourceName(r.DecodeString()) + } + + if yymg3971 { + yymv3971 = yyv3971[yymk3971] + } else { + yymv3971 = pkg3_resource.Quantity{} + } + z.DecSendContainerState(codecSelfer_containerMapValue1234) + if r.TryDecodeAsNil() { + yymv3971 = pkg3_resource.Quantity{} + } else { + yyv3973 := &yymv3971 + yym3974 := z.DecBinary() + _ = yym3974 + if false { + } else if z.HasExtensions() && z.DecExt(yyv3973) { + } else if !yym3974 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3973) + } else { + z.DecFallback(yyv3973, false) + } + } + + if yyv3971 != nil { + yyv3971[yymk3971] = yymv3971 + } + } + } else if yyl3971 < 0 { + for yyj3971 := 0; !r.CheckBreak(); yyj3971++ { + z.DecSendContainerState(codecSelfer_containerMapKey1234) + if r.TryDecodeAsNil() { + yymk3971 = "" + } else { + yymk3971 = ResourceName(r.DecodeString()) + } + + if yymg3971 { + yymv3971 = yyv3971[yymk3971] + } else { + yymv3971 = pkg3_resource.Quantity{} + } + z.DecSendContainerState(codecSelfer_containerMapValue1234) + if r.TryDecodeAsNil() { + yymv3971 = pkg3_resource.Quantity{} + } else { + yyv3976 := &yymv3971 + yym3977 := z.DecBinary() + _ = yym3977 + if false { + } else if z.HasExtensions() && z.DecExt(yyv3976) { + } else if !yym3977 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3976) + } else { + z.DecFallback(yyv3976, false) + } + } + + if yyv3971 != nil { + yyv3971[yymk3971] = yymv3971 + } + } + } // else len==0: TODO: Should we clear map entries? + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x codecSelfer1234) encSliceNode(v []Node, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3978 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3979 := &yyv3978 + yy3979.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceNode(v *[]Node, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3980 := *v + yyh3980, yyl3980 := z.DecSliceHelperStart() + var yyc3980 bool + if yyl3980 == 0 { + if yyv3980 == nil { + yyv3980 = []Node{} + yyc3980 = true + } else if len(yyv3980) != 0 { + yyv3980 = yyv3980[:0] + yyc3980 = true + } + } else if yyl3980 > 0 { + var yyrr3980, yyrl3980 int + var yyrt3980 bool + if yyl3980 > cap(yyv3980) { + + yyrg3980 := len(yyv3980) > 0 + yyv23980 := yyv3980 + yyrl3980, yyrt3980 = z.DecInferLen(yyl3980, z.DecBasicHandle().MaxInitLen, 488) + if yyrt3980 { + if yyrl3980 <= cap(yyv3980) { + yyv3980 = yyv3980[:yyrl3980] + } else { + yyv3980 = make([]Node, yyrl3980) + } + } else { + yyv3980 = make([]Node, yyrl3980) + } + yyc3980 = true + yyrr3980 = len(yyv3980) + if yyrg3980 { + copy(yyv3980, yyv23980) + } + } else if yyl3980 != len(yyv3980) { + yyv3980 = yyv3980[:yyl3980] + yyc3980 = true + } + yyj3980 := 0 + for ; yyj3980 < yyrr3980; yyj3980++ { + yyh3980.ElemContainerState(yyj3980) + if r.TryDecodeAsNil() { + yyv3980[yyj3980] = Node{} + } else { + yyv3981 := &yyv3980[yyj3980] + yyv3981.CodecDecodeSelf(d) + } + + } + if yyrt3980 { + for ; yyj3980 < yyl3980; yyj3980++ { + yyv3980 = append(yyv3980, Node{}) + yyh3980.ElemContainerState(yyj3980) + if r.TryDecodeAsNil() { + yyv3980[yyj3980] = Node{} + } else { + yyv3982 := &yyv3980[yyj3980] + yyv3982.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3980 := 0 + for ; !r.CheckBreak(); yyj3980++ { + + if yyj3980 >= len(yyv3980) { + yyv3980 = append(yyv3980, Node{}) // var yyz3980 Node + yyc3980 = true + } + yyh3980.ElemContainerState(yyj3980) + if yyj3980 < len(yyv3980) { + if r.TryDecodeAsNil() { + yyv3980[yyj3980] = Node{} + } else { + yyv3983 := &yyv3980[yyj3980] + yyv3983.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3980 < len(yyv3980) { + yyv3980 = yyv3980[:yyj3980] + yyc3980 = true + } else if yyj3980 == 0 && yyv3980 == nil { + yyv3980 = []Node{} + yyc3980 = true + } + } + yyh3980.End() + if yyc3980 { + *v = yyv3980 + } +} + +func (x codecSelfer1234) encSliceFinalizerName(v []FinalizerName, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3984 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yyv3984.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceFinalizerName(v *[]FinalizerName, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3985 := *v + yyh3985, yyl3985 := z.DecSliceHelperStart() + var yyc3985 bool + if yyl3985 == 0 { + if yyv3985 == nil { + yyv3985 = []FinalizerName{} + yyc3985 = true + } else if len(yyv3985) != 0 { + yyv3985 = yyv3985[:0] + yyc3985 = true + } + } else if yyl3985 > 0 { + var yyrr3985, yyrl3985 int + var yyrt3985 bool + if yyl3985 > cap(yyv3985) { + + yyrl3985, yyrt3985 = z.DecInferLen(yyl3985, z.DecBasicHandle().MaxInitLen, 16) + if yyrt3985 { + if yyrl3985 <= cap(yyv3985) { + yyv3985 = yyv3985[:yyrl3985] + } else { + yyv3985 = make([]FinalizerName, yyrl3985) + } + } else { + yyv3985 = make([]FinalizerName, yyrl3985) + } + yyc3985 = true + yyrr3985 = len(yyv3985) + } else if yyl3985 != len(yyv3985) { + yyv3985 = yyv3985[:yyl3985] + yyc3985 = true + } + yyj3985 := 0 + for ; yyj3985 < yyrr3985; yyj3985++ { + yyh3985.ElemContainerState(yyj3985) + if r.TryDecodeAsNil() { + yyv3985[yyj3985] = "" + } else { + yyv3985[yyj3985] = FinalizerName(r.DecodeString()) + } + + } + if yyrt3985 { + for ; yyj3985 < yyl3985; yyj3985++ { + yyv3985 = append(yyv3985, "") + yyh3985.ElemContainerState(yyj3985) + if r.TryDecodeAsNil() { + yyv3985[yyj3985] = "" + } else { + yyv3985[yyj3985] = FinalizerName(r.DecodeString()) + } + + } + } + + } else { + yyj3985 := 0 + for ; !r.CheckBreak(); yyj3985++ { + + if yyj3985 >= len(yyv3985) { + yyv3985 = append(yyv3985, "") // var yyz3985 FinalizerName + yyc3985 = true + } + yyh3985.ElemContainerState(yyj3985) + if yyj3985 < len(yyv3985) { + if r.TryDecodeAsNil() { + yyv3985[yyj3985] = "" + } else { + yyv3985[yyj3985] = FinalizerName(r.DecodeString()) + } + + } else { + z.DecSwallow() + } + + } + if yyj3985 < len(yyv3985) { + yyv3985 = yyv3985[:yyj3985] + yyc3985 = true + } else if yyj3985 == 0 && yyv3985 == nil { + yyv3985 = []FinalizerName{} + yyc3985 = true + } + } + yyh3985.End() + if yyc3985 { + *v = yyv3985 + } +} + +func (x codecSelfer1234) encSliceNamespace(v []Namespace, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3989 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3990 := &yyv3989 + yy3990.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceNamespace(v *[]Namespace, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3991 := *v + yyh3991, yyl3991 := z.DecSliceHelperStart() + var yyc3991 bool + if yyl3991 == 0 { + if yyv3991 == nil { + yyv3991 = []Namespace{} + yyc3991 = true + } else if len(yyv3991) != 0 { + yyv3991 = yyv3991[:0] + yyc3991 = true + } + } else if yyl3991 > 0 { + var yyrr3991, yyrl3991 int + var yyrt3991 bool + if yyl3991 > cap(yyv3991) { + + yyrg3991 := len(yyv3991) > 0 + yyv23991 := yyv3991 + yyrl3991, yyrt3991 = z.DecInferLen(yyl3991, z.DecBasicHandle().MaxInitLen, 232) + if yyrt3991 { + if yyrl3991 <= cap(yyv3991) { + yyv3991 = yyv3991[:yyrl3991] + } else { + yyv3991 = make([]Namespace, yyrl3991) + } + } else { + yyv3991 = make([]Namespace, yyrl3991) + } + yyc3991 = true + yyrr3991 = len(yyv3991) + if yyrg3991 { + copy(yyv3991, yyv23991) + } + } else if yyl3991 != len(yyv3991) { + yyv3991 = yyv3991[:yyl3991] + yyc3991 = true + } + yyj3991 := 0 + for ; yyj3991 < yyrr3991; yyj3991++ { + yyh3991.ElemContainerState(yyj3991) + if r.TryDecodeAsNil() { + yyv3991[yyj3991] = Namespace{} + } else { + yyv3992 := &yyv3991[yyj3991] + yyv3992.CodecDecodeSelf(d) + } + + } + if yyrt3991 { + for ; yyj3991 < yyl3991; yyj3991++ { + yyv3991 = append(yyv3991, Namespace{}) + yyh3991.ElemContainerState(yyj3991) + if r.TryDecodeAsNil() { + yyv3991[yyj3991] = Namespace{} + } else { + yyv3993 := &yyv3991[yyj3991] + yyv3993.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3991 := 0 + for ; !r.CheckBreak(); yyj3991++ { + + if yyj3991 >= len(yyv3991) { + yyv3991 = append(yyv3991, Namespace{}) // var yyz3991 Namespace + yyc3991 = true + } + yyh3991.ElemContainerState(yyj3991) + if yyj3991 < len(yyv3991) { + if r.TryDecodeAsNil() { + yyv3991[yyj3991] = Namespace{} + } else { + yyv3994 := &yyv3991[yyj3991] + yyv3994.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3991 < len(yyv3991) { + yyv3991 = yyv3991[:yyj3991] + yyc3991 = true + } else if yyj3991 == 0 && yyv3991 == nil { + yyv3991 = []Namespace{} + yyc3991 = true + } + } + yyh3991.End() + if yyc3991 { + *v = yyv3991 + } +} + +func (x codecSelfer1234) encSliceEvent(v []Event, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv3995 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy3996 := &yyv3995 + yy3996.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceEvent(v *[]Event, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv3997 := *v + yyh3997, yyl3997 := z.DecSliceHelperStart() + var yyc3997 bool + if yyl3997 == 0 { + if yyv3997 == nil { + yyv3997 = []Event{} + yyc3997 = true + } else if len(yyv3997) != 0 { + yyv3997 = yyv3997[:0] + yyc3997 = true + } + } else if yyl3997 > 0 { + var yyrr3997, yyrl3997 int + var yyrt3997 bool + if yyl3997 > cap(yyv3997) { + + yyrg3997 := len(yyv3997) > 0 + yyv23997 := yyv3997 + yyrl3997, yyrt3997 = z.DecInferLen(yyl3997, z.DecBasicHandle().MaxInitLen, 440) + if yyrt3997 { + if yyrl3997 <= cap(yyv3997) { + yyv3997 = yyv3997[:yyrl3997] + } else { + yyv3997 = make([]Event, yyrl3997) + } + } else { + yyv3997 = make([]Event, yyrl3997) + } + yyc3997 = true + yyrr3997 = len(yyv3997) + if yyrg3997 { + copy(yyv3997, yyv23997) + } + } else if yyl3997 != len(yyv3997) { + yyv3997 = yyv3997[:yyl3997] + yyc3997 = true + } + yyj3997 := 0 + for ; yyj3997 < yyrr3997; yyj3997++ { + yyh3997.ElemContainerState(yyj3997) + if r.TryDecodeAsNil() { + yyv3997[yyj3997] = Event{} + } else { + yyv3998 := &yyv3997[yyj3997] + yyv3998.CodecDecodeSelf(d) + } + + } + if yyrt3997 { + for ; yyj3997 < yyl3997; yyj3997++ { + yyv3997 = append(yyv3997, Event{}) + yyh3997.ElemContainerState(yyj3997) + if r.TryDecodeAsNil() { + yyv3997[yyj3997] = Event{} + } else { + yyv3999 := &yyv3997[yyj3997] + yyv3999.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj3997 := 0 + for ; !r.CheckBreak(); yyj3997++ { + + if yyj3997 >= len(yyv3997) { + yyv3997 = append(yyv3997, Event{}) // var yyz3997 Event + yyc3997 = true + } + yyh3997.ElemContainerState(yyj3997) + if yyj3997 < len(yyv3997) { + if r.TryDecodeAsNil() { + yyv3997[yyj3997] = Event{} + } else { + yyv4000 := &yyv3997[yyj3997] + yyv4000.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj3997 < len(yyv3997) { + yyv3997 = yyv3997[:yyj3997] + yyc3997 = true + } else if yyj3997 == 0 && yyv3997 == nil { + yyv3997 = []Event{} + yyc3997 = true + } + } + yyh3997.End() + if yyc3997 { + *v = yyv3997 + } +} + +func (x codecSelfer1234) encSliceruntime_RawExtension(v []pkg6_runtime.RawExtension, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv4001 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy4002 := &yyv4001 + yym4003 := z.EncBinary() + _ = yym4003 + if false { + } else if z.HasExtensions() && z.EncExt(yy4002) { + } else if !yym4003 && z.IsJSONHandle() { + z.EncJSONMarshal(yy4002) + } else { + z.EncFallback(yy4002) } } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) @@ -49511,78 +51185,78 @@ func (x codecSelfer1234) decSliceruntime_RawExtension(v *[]pkg6_runtime.RawExten z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3893 := *v - yyh3893, yyl3893 := z.DecSliceHelperStart() - var yyc3893 bool - if yyl3893 == 0 { - if yyv3893 == nil { - yyv3893 = []pkg6_runtime.RawExtension{} - yyc3893 = true - } else if len(yyv3893) != 0 { - yyv3893 = yyv3893[:0] - yyc3893 = true + yyv4004 := *v + yyh4004, yyl4004 := z.DecSliceHelperStart() + var yyc4004 bool + if yyl4004 == 0 { + if yyv4004 == nil { + yyv4004 = []pkg6_runtime.RawExtension{} + yyc4004 = true + } else if len(yyv4004) != 0 { + yyv4004 = yyv4004[:0] + yyc4004 = true } - } else if yyl3893 > 0 { - var yyrr3893, yyrl3893 int - var yyrt3893 bool - if yyl3893 > cap(yyv3893) { + } else if yyl4004 > 0 { + var yyrr4004, yyrl4004 int + var yyrt4004 bool + if yyl4004 > cap(yyv4004) { - yyrg3893 := len(yyv3893) > 0 - yyv23893 := yyv3893 - yyrl3893, yyrt3893 = z.DecInferLen(yyl3893, z.DecBasicHandle().MaxInitLen, 40) - if yyrt3893 { - if yyrl3893 <= cap(yyv3893) { - yyv3893 = yyv3893[:yyrl3893] + yyrg4004 := len(yyv4004) > 0 + yyv24004 := yyv4004 + yyrl4004, yyrt4004 = z.DecInferLen(yyl4004, z.DecBasicHandle().MaxInitLen, 40) + if yyrt4004 { + if yyrl4004 <= cap(yyv4004) { + yyv4004 = yyv4004[:yyrl4004] } else { - yyv3893 = make([]pkg6_runtime.RawExtension, yyrl3893) + yyv4004 = make([]pkg6_runtime.RawExtension, yyrl4004) } } else { - yyv3893 = make([]pkg6_runtime.RawExtension, yyrl3893) + yyv4004 = make([]pkg6_runtime.RawExtension, yyrl4004) } - yyc3893 = true - yyrr3893 = len(yyv3893) - if yyrg3893 { - copy(yyv3893, yyv23893) + yyc4004 = true + yyrr4004 = len(yyv4004) + if yyrg4004 { + copy(yyv4004, yyv24004) } - } else if yyl3893 != len(yyv3893) { - yyv3893 = yyv3893[:yyl3893] - yyc3893 = true + } else if yyl4004 != len(yyv4004) { + yyv4004 = yyv4004[:yyl4004] + yyc4004 = true } - yyj3893 := 0 - for ; yyj3893 < yyrr3893; yyj3893++ { - yyh3893.ElemContainerState(yyj3893) + yyj4004 := 0 + for ; yyj4004 < yyrr4004; yyj4004++ { + yyh4004.ElemContainerState(yyj4004) if r.TryDecodeAsNil() { - yyv3893[yyj3893] = pkg6_runtime.RawExtension{} + yyv4004[yyj4004] = pkg6_runtime.RawExtension{} } else { - yyv3894 := &yyv3893[yyj3893] - yym3895 := z.DecBinary() - _ = yym3895 + yyv4005 := &yyv4004[yyj4004] + yym4006 := z.DecBinary() + _ = yym4006 if false { - } else if z.HasExtensions() && z.DecExt(yyv3894) { - } else if !yym3895 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3894) + } else if z.HasExtensions() && z.DecExt(yyv4005) { + } else if !yym4006 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv4005) } else { - z.DecFallback(yyv3894, false) + z.DecFallback(yyv4005, false) } } } - if yyrt3893 { - for ; yyj3893 < yyl3893; yyj3893++ { - yyv3893 = append(yyv3893, pkg6_runtime.RawExtension{}) - yyh3893.ElemContainerState(yyj3893) + if yyrt4004 { + for ; yyj4004 < yyl4004; yyj4004++ { + yyv4004 = append(yyv4004, pkg6_runtime.RawExtension{}) + yyh4004.ElemContainerState(yyj4004) if r.TryDecodeAsNil() { - yyv3893[yyj3893] = pkg6_runtime.RawExtension{} + yyv4004[yyj4004] = pkg6_runtime.RawExtension{} } else { - yyv3896 := &yyv3893[yyj3893] - yym3897 := z.DecBinary() - _ = yym3897 + yyv4007 := &yyv4004[yyj4004] + yym4008 := z.DecBinary() + _ = yym4008 if false { - } else if z.HasExtensions() && z.DecExt(yyv3896) { - } else if !yym3897 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3896) + } else if z.HasExtensions() && z.DecExt(yyv4007) { + } else if !yym4008 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv4007) } else { - z.DecFallback(yyv3896, false) + z.DecFallback(yyv4007, false) } } @@ -49590,27 +51264,27 @@ func (x codecSelfer1234) decSliceruntime_RawExtension(v *[]pkg6_runtime.RawExten } } else { - yyj3893 := 0 - for ; !r.CheckBreak(); yyj3893++ { + yyj4004 := 0 + for ; !r.CheckBreak(); yyj4004++ { - if yyj3893 >= len(yyv3893) { - yyv3893 = append(yyv3893, pkg6_runtime.RawExtension{}) // var yyz3893 pkg6_runtime.RawExtension - yyc3893 = true + if yyj4004 >= len(yyv4004) { + yyv4004 = append(yyv4004, pkg6_runtime.RawExtension{}) // var yyz4004 pkg6_runtime.RawExtension + yyc4004 = true } - yyh3893.ElemContainerState(yyj3893) - if yyj3893 < len(yyv3893) { + yyh4004.ElemContainerState(yyj4004) + if yyj4004 < len(yyv4004) { if r.TryDecodeAsNil() { - yyv3893[yyj3893] = pkg6_runtime.RawExtension{} + yyv4004[yyj4004] = pkg6_runtime.RawExtension{} } else { - yyv3898 := &yyv3893[yyj3893] - yym3899 := z.DecBinary() - _ = yym3899 + yyv4009 := &yyv4004[yyj4004] + yym4010 := z.DecBinary() + _ = yym4010 if false { - } else if z.HasExtensions() && z.DecExt(yyv3898) { - } else if !yym3899 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3898) + } else if z.HasExtensions() && z.DecExt(yyv4009) { + } else if !yym4010 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv4009) } else { - z.DecFallback(yyv3898, false) + z.DecFallback(yyv4009, false) } } @@ -49619,17 +51293,17 @@ func (x codecSelfer1234) decSliceruntime_RawExtension(v *[]pkg6_runtime.RawExten } } - if yyj3893 < len(yyv3893) { - yyv3893 = yyv3893[:yyj3893] - yyc3893 = true - } else if yyj3893 == 0 && yyv3893 == nil { - yyv3893 = []pkg6_runtime.RawExtension{} - yyc3893 = true + if yyj4004 < len(yyv4004) { + yyv4004 = yyv4004[:yyj4004] + yyc4004 = true + } else if yyj4004 == 0 && yyv4004 == nil { + yyv4004 = []pkg6_runtime.RawExtension{} + yyc4004 = true } } - yyh3893.End() - if yyc3893 { - *v = yyv3893 + yyh4004.End() + if yyc4004 { + *v = yyv4004 } } @@ -49638,10 +51312,10 @@ func (x codecSelfer1234) encSliceLimitRangeItem(v []LimitRangeItem, e *codec1978 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3900 := range v { + for _, yyv4011 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3901 := &yyv3900 - yy3901.CodecEncodeSelf(e) + yy4012 := &yyv4011 + yy4012.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -49651,83 +51325,83 @@ func (x codecSelfer1234) decSliceLimitRangeItem(v *[]LimitRangeItem, d *codec197 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3902 := *v - yyh3902, yyl3902 := z.DecSliceHelperStart() - var yyc3902 bool - if yyl3902 == 0 { - if yyv3902 == nil { - yyv3902 = []LimitRangeItem{} - yyc3902 = true - } else if len(yyv3902) != 0 { - yyv3902 = yyv3902[:0] - yyc3902 = true + yyv4013 := *v + yyh4013, yyl4013 := z.DecSliceHelperStart() + var yyc4013 bool + if yyl4013 == 0 { + if yyv4013 == nil { + yyv4013 = []LimitRangeItem{} + yyc4013 = true + } else if len(yyv4013) != 0 { + yyv4013 = yyv4013[:0] + yyc4013 = true } - } else if yyl3902 > 0 { - var yyrr3902, yyrl3902 int - var yyrt3902 bool - if yyl3902 > cap(yyv3902) { + } else if yyl4013 > 0 { + var yyrr4013, yyrl4013 int + var yyrt4013 bool + if yyl4013 > cap(yyv4013) { - yyrg3902 := len(yyv3902) > 0 - yyv23902 := yyv3902 - yyrl3902, yyrt3902 = z.DecInferLen(yyl3902, z.DecBasicHandle().MaxInitLen, 56) - if yyrt3902 { - if yyrl3902 <= cap(yyv3902) { - yyv3902 = yyv3902[:yyrl3902] + yyrg4013 := len(yyv4013) > 0 + yyv24013 := yyv4013 + yyrl4013, yyrt4013 = z.DecInferLen(yyl4013, z.DecBasicHandle().MaxInitLen, 56) + if yyrt4013 { + if yyrl4013 <= cap(yyv4013) { + yyv4013 = yyv4013[:yyrl4013] } else { - yyv3902 = make([]LimitRangeItem, yyrl3902) + yyv4013 = make([]LimitRangeItem, yyrl4013) } } else { - yyv3902 = make([]LimitRangeItem, yyrl3902) + yyv4013 = make([]LimitRangeItem, yyrl4013) } - yyc3902 = true - yyrr3902 = len(yyv3902) - if yyrg3902 { - copy(yyv3902, yyv23902) + yyc4013 = true + yyrr4013 = len(yyv4013) + if yyrg4013 { + copy(yyv4013, yyv24013) } - } else if yyl3902 != len(yyv3902) { - yyv3902 = yyv3902[:yyl3902] - yyc3902 = true + } else if yyl4013 != len(yyv4013) { + yyv4013 = yyv4013[:yyl4013] + yyc4013 = true } - yyj3902 := 0 - for ; yyj3902 < yyrr3902; yyj3902++ { - yyh3902.ElemContainerState(yyj3902) + yyj4013 := 0 + for ; yyj4013 < yyrr4013; yyj4013++ { + yyh4013.ElemContainerState(yyj4013) if r.TryDecodeAsNil() { - yyv3902[yyj3902] = LimitRangeItem{} + yyv4013[yyj4013] = LimitRangeItem{} } else { - yyv3903 := &yyv3902[yyj3902] - yyv3903.CodecDecodeSelf(d) + yyv4014 := &yyv4013[yyj4013] + yyv4014.CodecDecodeSelf(d) } } - if yyrt3902 { - for ; yyj3902 < yyl3902; yyj3902++ { - yyv3902 = append(yyv3902, LimitRangeItem{}) - yyh3902.ElemContainerState(yyj3902) + if yyrt4013 { + for ; yyj4013 < yyl4013; yyj4013++ { + yyv4013 = append(yyv4013, LimitRangeItem{}) + yyh4013.ElemContainerState(yyj4013) if r.TryDecodeAsNil() { - yyv3902[yyj3902] = LimitRangeItem{} + yyv4013[yyj4013] = LimitRangeItem{} } else { - yyv3904 := &yyv3902[yyj3902] - yyv3904.CodecDecodeSelf(d) + yyv4015 := &yyv4013[yyj4013] + yyv4015.CodecDecodeSelf(d) } } } } else { - yyj3902 := 0 - for ; !r.CheckBreak(); yyj3902++ { + yyj4013 := 0 + for ; !r.CheckBreak(); yyj4013++ { - if yyj3902 >= len(yyv3902) { - yyv3902 = append(yyv3902, LimitRangeItem{}) // var yyz3902 LimitRangeItem - yyc3902 = true + if yyj4013 >= len(yyv4013) { + yyv4013 = append(yyv4013, LimitRangeItem{}) // var yyz4013 LimitRangeItem + yyc4013 = true } - yyh3902.ElemContainerState(yyj3902) - if yyj3902 < len(yyv3902) { + yyh4013.ElemContainerState(yyj4013) + if yyj4013 < len(yyv4013) { if r.TryDecodeAsNil() { - yyv3902[yyj3902] = LimitRangeItem{} + yyv4013[yyj4013] = LimitRangeItem{} } else { - yyv3905 := &yyv3902[yyj3902] - yyv3905.CodecDecodeSelf(d) + yyv4016 := &yyv4013[yyj4013] + yyv4016.CodecDecodeSelf(d) } } else { @@ -49735,17 +51409,17 @@ func (x codecSelfer1234) decSliceLimitRangeItem(v *[]LimitRangeItem, d *codec197 } } - if yyj3902 < len(yyv3902) { - yyv3902 = yyv3902[:yyj3902] - yyc3902 = true - } else if yyj3902 == 0 && yyv3902 == nil { - yyv3902 = []LimitRangeItem{} - yyc3902 = true + if yyj4013 < len(yyv4013) { + yyv4013 = yyv4013[:yyj4013] + yyc4013 = true + } else if yyj4013 == 0 && yyv4013 == nil { + yyv4013 = []LimitRangeItem{} + yyc4013 = true } } - yyh3902.End() - if yyc3902 { - *v = yyv3902 + yyh4013.End() + if yyc4013 { + *v = yyv4013 } } @@ -49754,10 +51428,10 @@ func (x codecSelfer1234) encSliceLimitRange(v []LimitRange, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3906 := range v { + for _, yyv4017 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3907 := &yyv3906 - yy3907.CodecEncodeSelf(e) + yy4018 := &yyv4017 + yy4018.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -49767,83 +51441,83 @@ func (x codecSelfer1234) decSliceLimitRange(v *[]LimitRange, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3908 := *v - yyh3908, yyl3908 := z.DecSliceHelperStart() - var yyc3908 bool - if yyl3908 == 0 { - if yyv3908 == nil { - yyv3908 = []LimitRange{} - yyc3908 = true - } else if len(yyv3908) != 0 { - yyv3908 = yyv3908[:0] - yyc3908 = true + yyv4019 := *v + yyh4019, yyl4019 := z.DecSliceHelperStart() + var yyc4019 bool + if yyl4019 == 0 { + if yyv4019 == nil { + yyv4019 = []LimitRange{} + yyc4019 = true + } else if len(yyv4019) != 0 { + yyv4019 = yyv4019[:0] + yyc4019 = true } - } else if yyl3908 > 0 { - var yyrr3908, yyrl3908 int - var yyrt3908 bool - if yyl3908 > cap(yyv3908) { + } else if yyl4019 > 0 { + var yyrr4019, yyrl4019 int + var yyrt4019 bool + if yyl4019 > cap(yyv4019) { - yyrg3908 := len(yyv3908) > 0 - yyv23908 := yyv3908 - yyrl3908, yyrt3908 = z.DecInferLen(yyl3908, z.DecBasicHandle().MaxInitLen, 216) - if yyrt3908 { - if yyrl3908 <= cap(yyv3908) { - yyv3908 = yyv3908[:yyrl3908] + yyrg4019 := len(yyv4019) > 0 + yyv24019 := yyv4019 + yyrl4019, yyrt4019 = z.DecInferLen(yyl4019, z.DecBasicHandle().MaxInitLen, 216) + if yyrt4019 { + if yyrl4019 <= cap(yyv4019) { + yyv4019 = yyv4019[:yyrl4019] } else { - yyv3908 = make([]LimitRange, yyrl3908) + yyv4019 = make([]LimitRange, yyrl4019) } } else { - yyv3908 = make([]LimitRange, yyrl3908) + yyv4019 = make([]LimitRange, yyrl4019) } - yyc3908 = true - yyrr3908 = len(yyv3908) - if yyrg3908 { - copy(yyv3908, yyv23908) + yyc4019 = true + yyrr4019 = len(yyv4019) + if yyrg4019 { + copy(yyv4019, yyv24019) } - } else if yyl3908 != len(yyv3908) { - yyv3908 = yyv3908[:yyl3908] - yyc3908 = true + } else if yyl4019 != len(yyv4019) { + yyv4019 = yyv4019[:yyl4019] + yyc4019 = true } - yyj3908 := 0 - for ; yyj3908 < yyrr3908; yyj3908++ { - yyh3908.ElemContainerState(yyj3908) + yyj4019 := 0 + for ; yyj4019 < yyrr4019; yyj4019++ { + yyh4019.ElemContainerState(yyj4019) if r.TryDecodeAsNil() { - yyv3908[yyj3908] = LimitRange{} + yyv4019[yyj4019] = LimitRange{} } else { - yyv3909 := &yyv3908[yyj3908] - yyv3909.CodecDecodeSelf(d) + yyv4020 := &yyv4019[yyj4019] + yyv4020.CodecDecodeSelf(d) } } - if yyrt3908 { - for ; yyj3908 < yyl3908; yyj3908++ { - yyv3908 = append(yyv3908, LimitRange{}) - yyh3908.ElemContainerState(yyj3908) + if yyrt4019 { + for ; yyj4019 < yyl4019; yyj4019++ { + yyv4019 = append(yyv4019, LimitRange{}) + yyh4019.ElemContainerState(yyj4019) if r.TryDecodeAsNil() { - yyv3908[yyj3908] = LimitRange{} + yyv4019[yyj4019] = LimitRange{} } else { - yyv3910 := &yyv3908[yyj3908] - yyv3910.CodecDecodeSelf(d) + yyv4021 := &yyv4019[yyj4019] + yyv4021.CodecDecodeSelf(d) } } } } else { - yyj3908 := 0 - for ; !r.CheckBreak(); yyj3908++ { + yyj4019 := 0 + for ; !r.CheckBreak(); yyj4019++ { - if yyj3908 >= len(yyv3908) { - yyv3908 = append(yyv3908, LimitRange{}) // var yyz3908 LimitRange - yyc3908 = true + if yyj4019 >= len(yyv4019) { + yyv4019 = append(yyv4019, LimitRange{}) // var yyz4019 LimitRange + yyc4019 = true } - yyh3908.ElemContainerState(yyj3908) - if yyj3908 < len(yyv3908) { + yyh4019.ElemContainerState(yyj4019) + if yyj4019 < len(yyv4019) { if r.TryDecodeAsNil() { - yyv3908[yyj3908] = LimitRange{} + yyv4019[yyj4019] = LimitRange{} } else { - yyv3911 := &yyv3908[yyj3908] - yyv3911.CodecDecodeSelf(d) + yyv4022 := &yyv4019[yyj4019] + yyv4022.CodecDecodeSelf(d) } } else { @@ -49851,17 +51525,17 @@ func (x codecSelfer1234) decSliceLimitRange(v *[]LimitRange, d *codec1978.Decode } } - if yyj3908 < len(yyv3908) { - yyv3908 = yyv3908[:yyj3908] - yyc3908 = true - } else if yyj3908 == 0 && yyv3908 == nil { - yyv3908 = []LimitRange{} - yyc3908 = true + if yyj4019 < len(yyv4019) { + yyv4019 = yyv4019[:yyj4019] + yyc4019 = true + } else if yyj4019 == 0 && yyv4019 == nil { + yyv4019 = []LimitRange{} + yyc4019 = true } } - yyh3908.End() - if yyc3908 { - *v = yyv3908 + yyh4019.End() + if yyc4019 { + *v = yyv4019 } } @@ -49870,10 +51544,10 @@ func (x codecSelfer1234) encSliceResourceQuota(v []ResourceQuota, e *codec1978.E z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3912 := range v { + for _, yyv4023 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3913 := &yyv3912 - yy3913.CodecEncodeSelf(e) + yy4024 := &yyv4023 + yy4024.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -49883,83 +51557,83 @@ func (x codecSelfer1234) decSliceResourceQuota(v *[]ResourceQuota, d *codec1978. z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3914 := *v - yyh3914, yyl3914 := z.DecSliceHelperStart() - var yyc3914 bool - if yyl3914 == 0 { - if yyv3914 == nil { - yyv3914 = []ResourceQuota{} - yyc3914 = true - } else if len(yyv3914) != 0 { - yyv3914 = yyv3914[:0] - yyc3914 = true + yyv4025 := *v + yyh4025, yyl4025 := z.DecSliceHelperStart() + var yyc4025 bool + if yyl4025 == 0 { + if yyv4025 == nil { + yyv4025 = []ResourceQuota{} + yyc4025 = true + } else if len(yyv4025) != 0 { + yyv4025 = yyv4025[:0] + yyc4025 = true } - } else if yyl3914 > 0 { - var yyrr3914, yyrl3914 int - var yyrt3914 bool - if yyl3914 > cap(yyv3914) { + } else if yyl4025 > 0 { + var yyrr4025, yyrl4025 int + var yyrt4025 bool + if yyl4025 > cap(yyv4025) { - yyrg3914 := len(yyv3914) > 0 - yyv23914 := yyv3914 - yyrl3914, yyrt3914 = z.DecInferLen(yyl3914, z.DecBasicHandle().MaxInitLen, 216) - if yyrt3914 { - if yyrl3914 <= cap(yyv3914) { - yyv3914 = yyv3914[:yyrl3914] + yyrg4025 := len(yyv4025) > 0 + yyv24025 := yyv4025 + yyrl4025, yyrt4025 = z.DecInferLen(yyl4025, z.DecBasicHandle().MaxInitLen, 216) + if yyrt4025 { + if yyrl4025 <= cap(yyv4025) { + yyv4025 = yyv4025[:yyrl4025] } else { - yyv3914 = make([]ResourceQuota, yyrl3914) + yyv4025 = make([]ResourceQuota, yyrl4025) } } else { - yyv3914 = make([]ResourceQuota, yyrl3914) + yyv4025 = make([]ResourceQuota, yyrl4025) } - yyc3914 = true - yyrr3914 = len(yyv3914) - if yyrg3914 { - copy(yyv3914, yyv23914) + yyc4025 = true + yyrr4025 = len(yyv4025) + if yyrg4025 { + copy(yyv4025, yyv24025) } - } else if yyl3914 != len(yyv3914) { - yyv3914 = yyv3914[:yyl3914] - yyc3914 = true + } else if yyl4025 != len(yyv4025) { + yyv4025 = yyv4025[:yyl4025] + yyc4025 = true } - yyj3914 := 0 - for ; yyj3914 < yyrr3914; yyj3914++ { - yyh3914.ElemContainerState(yyj3914) + yyj4025 := 0 + for ; yyj4025 < yyrr4025; yyj4025++ { + yyh4025.ElemContainerState(yyj4025) if r.TryDecodeAsNil() { - yyv3914[yyj3914] = ResourceQuota{} + yyv4025[yyj4025] = ResourceQuota{} } else { - yyv3915 := &yyv3914[yyj3914] - yyv3915.CodecDecodeSelf(d) + yyv4026 := &yyv4025[yyj4025] + yyv4026.CodecDecodeSelf(d) } } - if yyrt3914 { - for ; yyj3914 < yyl3914; yyj3914++ { - yyv3914 = append(yyv3914, ResourceQuota{}) - yyh3914.ElemContainerState(yyj3914) + if yyrt4025 { + for ; yyj4025 < yyl4025; yyj4025++ { + yyv4025 = append(yyv4025, ResourceQuota{}) + yyh4025.ElemContainerState(yyj4025) if r.TryDecodeAsNil() { - yyv3914[yyj3914] = ResourceQuota{} + yyv4025[yyj4025] = ResourceQuota{} } else { - yyv3916 := &yyv3914[yyj3914] - yyv3916.CodecDecodeSelf(d) + yyv4027 := &yyv4025[yyj4025] + yyv4027.CodecDecodeSelf(d) } } } } else { - yyj3914 := 0 - for ; !r.CheckBreak(); yyj3914++ { + yyj4025 := 0 + for ; !r.CheckBreak(); yyj4025++ { - if yyj3914 >= len(yyv3914) { - yyv3914 = append(yyv3914, ResourceQuota{}) // var yyz3914 ResourceQuota - yyc3914 = true + if yyj4025 >= len(yyv4025) { + yyv4025 = append(yyv4025, ResourceQuota{}) // var yyz4025 ResourceQuota + yyc4025 = true } - yyh3914.ElemContainerState(yyj3914) - if yyj3914 < len(yyv3914) { + yyh4025.ElemContainerState(yyj4025) + if yyj4025 < len(yyv4025) { if r.TryDecodeAsNil() { - yyv3914[yyj3914] = ResourceQuota{} + yyv4025[yyj4025] = ResourceQuota{} } else { - yyv3917 := &yyv3914[yyj3914] - yyv3917.CodecDecodeSelf(d) + yyv4028 := &yyv4025[yyj4025] + yyv4028.CodecDecodeSelf(d) } } else { @@ -49967,17 +51641,17 @@ func (x codecSelfer1234) decSliceResourceQuota(v *[]ResourceQuota, d *codec1978. } } - if yyj3914 < len(yyv3914) { - yyv3914 = yyv3914[:yyj3914] - yyc3914 = true - } else if yyj3914 == 0 && yyv3914 == nil { - yyv3914 = []ResourceQuota{} - yyc3914 = true + if yyj4025 < len(yyv4025) { + yyv4025 = yyv4025[:yyj4025] + yyc4025 = true + } else if yyj4025 == 0 && yyv4025 == nil { + yyv4025 = []ResourceQuota{} + yyc4025 = true } } - yyh3914.End() - if yyc3914 { - *v = yyv3914 + yyh4025.End() + if yyc4025 { + *v = yyv4025 } } @@ -49986,23 +51660,23 @@ func (x codecSelfer1234) encMapstringSliceuint8(v map[string][]uint8, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeMapStart(len(v)) - for yyk3918, yyv3918 := range v { + for yyk4029, yyv4029 := range v { z.EncSendContainerState(codecSelfer_containerMapKey1234) - yym3919 := z.EncBinary() - _ = yym3919 + yym4030 := z.EncBinary() + _ = yym4030 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(yyk3918)) + r.EncodeString(codecSelferC_UTF81234, string(yyk4029)) } z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyv3918 == nil { + if yyv4029 == nil { r.EncodeNil() } else { - yym3920 := z.EncBinary() - _ = yym3920 + yym4031 := z.EncBinary() + _ = yym4031 if false { } else { - r.EncodeStringBytes(codecSelferC_RAW1234, []byte(yyv3918)) + r.EncodeStringBytes(codecSelferC_RAW1234, []byte(yyv4029)) } } } @@ -50014,80 +51688,80 @@ func (x codecSelfer1234) decMapstringSliceuint8(v *map[string][]uint8, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3921 := *v - yyl3921 := r.ReadMapStart() - yybh3921 := z.DecBasicHandle() - if yyv3921 == nil { - yyrl3921, _ := z.DecInferLen(yyl3921, yybh3921.MaxInitLen, 40) - yyv3921 = make(map[string][]uint8, yyrl3921) - *v = yyv3921 + yyv4032 := *v + yyl4032 := r.ReadMapStart() + yybh4032 := z.DecBasicHandle() + if yyv4032 == nil { + yyrl4032, _ := z.DecInferLen(yyl4032, yybh4032.MaxInitLen, 40) + yyv4032 = make(map[string][]uint8, yyrl4032) + *v = yyv4032 } - var yymk3921 string - var yymv3921 []uint8 - var yymg3921 bool - if yybh3921.MapValueReset { - yymg3921 = true + var yymk4032 string + var yymv4032 []uint8 + var yymg4032 bool + if yybh4032.MapValueReset { + yymg4032 = true } - if yyl3921 > 0 { - for yyj3921 := 0; yyj3921 < yyl3921; yyj3921++ { + if yyl4032 > 0 { + for yyj4032 := 0; yyj4032 < yyl4032; yyj4032++ { z.DecSendContainerState(codecSelfer_containerMapKey1234) if r.TryDecodeAsNil() { - yymk3921 = "" + yymk4032 = "" } else { - yymk3921 = string(r.DecodeString()) + yymk4032 = string(r.DecodeString()) } - if yymg3921 { - yymv3921 = yyv3921[yymk3921] + if yymg4032 { + yymv4032 = yyv4032[yymk4032] } else { - yymv3921 = nil + yymv4032 = nil } z.DecSendContainerState(codecSelfer_containerMapValue1234) if r.TryDecodeAsNil() { - yymv3921 = nil + yymv4032 = nil } else { - yyv3923 := &yymv3921 - yym3924 := z.DecBinary() - _ = yym3924 + yyv4034 := &yymv4032 + yym4035 := z.DecBinary() + _ = yym4035 if false { } else { - *yyv3923 = r.DecodeBytes(*(*[]byte)(yyv3923), false, false) + *yyv4034 = r.DecodeBytes(*(*[]byte)(yyv4034), false, false) } } - if yyv3921 != nil { - yyv3921[yymk3921] = yymv3921 + if yyv4032 != nil { + yyv4032[yymk4032] = yymv4032 } } - } else if yyl3921 < 0 { - for yyj3921 := 0; !r.CheckBreak(); yyj3921++ { + } else if yyl4032 < 0 { + for yyj4032 := 0; !r.CheckBreak(); yyj4032++ { z.DecSendContainerState(codecSelfer_containerMapKey1234) if r.TryDecodeAsNil() { - yymk3921 = "" + yymk4032 = "" } else { - yymk3921 = string(r.DecodeString()) + yymk4032 = string(r.DecodeString()) } - if yymg3921 { - yymv3921 = yyv3921[yymk3921] + if yymg4032 { + yymv4032 = yyv4032[yymk4032] } else { - yymv3921 = nil + yymv4032 = nil } z.DecSendContainerState(codecSelfer_containerMapValue1234) if r.TryDecodeAsNil() { - yymv3921 = nil + yymv4032 = nil } else { - yyv3926 := &yymv3921 - yym3927 := z.DecBinary() - _ = yym3927 + yyv4037 := &yymv4032 + yym4038 := z.DecBinary() + _ = yym4038 if false { } else { - *yyv3926 = r.DecodeBytes(*(*[]byte)(yyv3926), false, false) + *yyv4037 = r.DecodeBytes(*(*[]byte)(yyv4037), false, false) } } - if yyv3921 != nil { - yyv3921[yymk3921] = yymv3921 + if yyv4032 != nil { + yyv4032[yymk4032] = yymv4032 } } } // else len==0: TODO: Should we clear map entries? @@ -50099,10 +51773,10 @@ func (x codecSelfer1234) encSliceSecret(v []Secret, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3928 := range v { + for _, yyv4039 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3929 := &yyv3928 - yy3929.CodecEncodeSelf(e) + yy4040 := &yyv4039 + yy4040.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -50112,83 +51786,83 @@ func (x codecSelfer1234) decSliceSecret(v *[]Secret, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3930 := *v - yyh3930, yyl3930 := z.DecSliceHelperStart() - var yyc3930 bool - if yyl3930 == 0 { - if yyv3930 == nil { - yyv3930 = []Secret{} - yyc3930 = true - } else if len(yyv3930) != 0 { - yyv3930 = yyv3930[:0] - yyc3930 = true + yyv4041 := *v + yyh4041, yyl4041 := z.DecSliceHelperStart() + var yyc4041 bool + if yyl4041 == 0 { + if yyv4041 == nil { + yyv4041 = []Secret{} + yyc4041 = true + } else if len(yyv4041) != 0 { + yyv4041 = yyv4041[:0] + yyc4041 = true } - } else if yyl3930 > 0 { - var yyrr3930, yyrl3930 int - var yyrt3930 bool - if yyl3930 > cap(yyv3930) { + } else if yyl4041 > 0 { + var yyrr4041, yyrl4041 int + var yyrt4041 bool + if yyl4041 > cap(yyv4041) { - yyrg3930 := len(yyv3930) > 0 - yyv23930 := yyv3930 - yyrl3930, yyrt3930 = z.DecInferLen(yyl3930, z.DecBasicHandle().MaxInitLen, 216) - if yyrt3930 { - if yyrl3930 <= cap(yyv3930) { - yyv3930 = yyv3930[:yyrl3930] + yyrg4041 := len(yyv4041) > 0 + yyv24041 := yyv4041 + yyrl4041, yyrt4041 = z.DecInferLen(yyl4041, z.DecBasicHandle().MaxInitLen, 216) + if yyrt4041 { + if yyrl4041 <= cap(yyv4041) { + yyv4041 = yyv4041[:yyrl4041] } else { - yyv3930 = make([]Secret, yyrl3930) + yyv4041 = make([]Secret, yyrl4041) } } else { - yyv3930 = make([]Secret, yyrl3930) + yyv4041 = make([]Secret, yyrl4041) } - yyc3930 = true - yyrr3930 = len(yyv3930) - if yyrg3930 { - copy(yyv3930, yyv23930) + yyc4041 = true + yyrr4041 = len(yyv4041) + if yyrg4041 { + copy(yyv4041, yyv24041) } - } else if yyl3930 != len(yyv3930) { - yyv3930 = yyv3930[:yyl3930] - yyc3930 = true + } else if yyl4041 != len(yyv4041) { + yyv4041 = yyv4041[:yyl4041] + yyc4041 = true } - yyj3930 := 0 - for ; yyj3930 < yyrr3930; yyj3930++ { - yyh3930.ElemContainerState(yyj3930) + yyj4041 := 0 + for ; yyj4041 < yyrr4041; yyj4041++ { + yyh4041.ElemContainerState(yyj4041) if r.TryDecodeAsNil() { - yyv3930[yyj3930] = Secret{} + yyv4041[yyj4041] = Secret{} } else { - yyv3931 := &yyv3930[yyj3930] - yyv3931.CodecDecodeSelf(d) + yyv4042 := &yyv4041[yyj4041] + yyv4042.CodecDecodeSelf(d) } } - if yyrt3930 { - for ; yyj3930 < yyl3930; yyj3930++ { - yyv3930 = append(yyv3930, Secret{}) - yyh3930.ElemContainerState(yyj3930) + if yyrt4041 { + for ; yyj4041 < yyl4041; yyj4041++ { + yyv4041 = append(yyv4041, Secret{}) + yyh4041.ElemContainerState(yyj4041) if r.TryDecodeAsNil() { - yyv3930[yyj3930] = Secret{} + yyv4041[yyj4041] = Secret{} } else { - yyv3932 := &yyv3930[yyj3930] - yyv3932.CodecDecodeSelf(d) + yyv4043 := &yyv4041[yyj4041] + yyv4043.CodecDecodeSelf(d) } } } } else { - yyj3930 := 0 - for ; !r.CheckBreak(); yyj3930++ { + yyj4041 := 0 + for ; !r.CheckBreak(); yyj4041++ { - if yyj3930 >= len(yyv3930) { - yyv3930 = append(yyv3930, Secret{}) // var yyz3930 Secret - yyc3930 = true + if yyj4041 >= len(yyv4041) { + yyv4041 = append(yyv4041, Secret{}) // var yyz4041 Secret + yyc4041 = true } - yyh3930.ElemContainerState(yyj3930) - if yyj3930 < len(yyv3930) { + yyh4041.ElemContainerState(yyj4041) + if yyj4041 < len(yyv4041) { if r.TryDecodeAsNil() { - yyv3930[yyj3930] = Secret{} + yyv4041[yyj4041] = Secret{} } else { - yyv3933 := &yyv3930[yyj3930] - yyv3933.CodecDecodeSelf(d) + yyv4044 := &yyv4041[yyj4041] + yyv4044.CodecDecodeSelf(d) } } else { @@ -50196,17 +51870,17 @@ func (x codecSelfer1234) decSliceSecret(v *[]Secret, d *codec1978.Decoder) { } } - if yyj3930 < len(yyv3930) { - yyv3930 = yyv3930[:yyj3930] - yyc3930 = true - } else if yyj3930 == 0 && yyv3930 == nil { - yyv3930 = []Secret{} - yyc3930 = true + if yyj4041 < len(yyv4041) { + yyv4041 = yyv4041[:yyj4041] + yyc4041 = true + } else if yyj4041 == 0 && yyv4041 == nil { + yyv4041 = []Secret{} + yyc4041 = true } } - yyh3930.End() - if yyc3930 { - *v = yyv3930 + yyh4041.End() + if yyc4041 { + *v = yyv4041 } } @@ -50215,10 +51889,10 @@ func (x codecSelfer1234) encSliceConfigMap(v []ConfigMap, e *codec1978.Encoder) z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3934 := range v { + for _, yyv4045 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3935 := &yyv3934 - yy3935.CodecEncodeSelf(e) + yy4046 := &yyv4045 + yy4046.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -50228,83 +51902,83 @@ func (x codecSelfer1234) decSliceConfigMap(v *[]ConfigMap, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3936 := *v - yyh3936, yyl3936 := z.DecSliceHelperStart() - var yyc3936 bool - if yyl3936 == 0 { - if yyv3936 == nil { - yyv3936 = []ConfigMap{} - yyc3936 = true - } else if len(yyv3936) != 0 { - yyv3936 = yyv3936[:0] - yyc3936 = true + yyv4047 := *v + yyh4047, yyl4047 := z.DecSliceHelperStart() + var yyc4047 bool + if yyl4047 == 0 { + if yyv4047 == nil { + yyv4047 = []ConfigMap{} + yyc4047 = true + } else if len(yyv4047) != 0 { + yyv4047 = yyv4047[:0] + yyc4047 = true } - } else if yyl3936 > 0 { - var yyrr3936, yyrl3936 int - var yyrt3936 bool - if yyl3936 > cap(yyv3936) { + } else if yyl4047 > 0 { + var yyrr4047, yyrl4047 int + var yyrt4047 bool + if yyl4047 > cap(yyv4047) { - yyrg3936 := len(yyv3936) > 0 - yyv23936 := yyv3936 - yyrl3936, yyrt3936 = z.DecInferLen(yyl3936, z.DecBasicHandle().MaxInitLen, 200) - if yyrt3936 { - if yyrl3936 <= cap(yyv3936) { - yyv3936 = yyv3936[:yyrl3936] + yyrg4047 := len(yyv4047) > 0 + yyv24047 := yyv4047 + yyrl4047, yyrt4047 = z.DecInferLen(yyl4047, z.DecBasicHandle().MaxInitLen, 200) + if yyrt4047 { + if yyrl4047 <= cap(yyv4047) { + yyv4047 = yyv4047[:yyrl4047] } else { - yyv3936 = make([]ConfigMap, yyrl3936) + yyv4047 = make([]ConfigMap, yyrl4047) } } else { - yyv3936 = make([]ConfigMap, yyrl3936) + yyv4047 = make([]ConfigMap, yyrl4047) } - yyc3936 = true - yyrr3936 = len(yyv3936) - if yyrg3936 { - copy(yyv3936, yyv23936) + yyc4047 = true + yyrr4047 = len(yyv4047) + if yyrg4047 { + copy(yyv4047, yyv24047) } - } else if yyl3936 != len(yyv3936) { - yyv3936 = yyv3936[:yyl3936] - yyc3936 = true + } else if yyl4047 != len(yyv4047) { + yyv4047 = yyv4047[:yyl4047] + yyc4047 = true } - yyj3936 := 0 - for ; yyj3936 < yyrr3936; yyj3936++ { - yyh3936.ElemContainerState(yyj3936) + yyj4047 := 0 + for ; yyj4047 < yyrr4047; yyj4047++ { + yyh4047.ElemContainerState(yyj4047) if r.TryDecodeAsNil() { - yyv3936[yyj3936] = ConfigMap{} + yyv4047[yyj4047] = ConfigMap{} } else { - yyv3937 := &yyv3936[yyj3936] - yyv3937.CodecDecodeSelf(d) + yyv4048 := &yyv4047[yyj4047] + yyv4048.CodecDecodeSelf(d) } } - if yyrt3936 { - for ; yyj3936 < yyl3936; yyj3936++ { - yyv3936 = append(yyv3936, ConfigMap{}) - yyh3936.ElemContainerState(yyj3936) + if yyrt4047 { + for ; yyj4047 < yyl4047; yyj4047++ { + yyv4047 = append(yyv4047, ConfigMap{}) + yyh4047.ElemContainerState(yyj4047) if r.TryDecodeAsNil() { - yyv3936[yyj3936] = ConfigMap{} + yyv4047[yyj4047] = ConfigMap{} } else { - yyv3938 := &yyv3936[yyj3936] - yyv3938.CodecDecodeSelf(d) + yyv4049 := &yyv4047[yyj4047] + yyv4049.CodecDecodeSelf(d) } } } } else { - yyj3936 := 0 - for ; !r.CheckBreak(); yyj3936++ { + yyj4047 := 0 + for ; !r.CheckBreak(); yyj4047++ { - if yyj3936 >= len(yyv3936) { - yyv3936 = append(yyv3936, ConfigMap{}) // var yyz3936 ConfigMap - yyc3936 = true + if yyj4047 >= len(yyv4047) { + yyv4047 = append(yyv4047, ConfigMap{}) // var yyz4047 ConfigMap + yyc4047 = true } - yyh3936.ElemContainerState(yyj3936) - if yyj3936 < len(yyv3936) { + yyh4047.ElemContainerState(yyj4047) + if yyj4047 < len(yyv4047) { if r.TryDecodeAsNil() { - yyv3936[yyj3936] = ConfigMap{} + yyv4047[yyj4047] = ConfigMap{} } else { - yyv3939 := &yyv3936[yyj3936] - yyv3939.CodecDecodeSelf(d) + yyv4050 := &yyv4047[yyj4047] + yyv4050.CodecDecodeSelf(d) } } else { @@ -50312,17 +51986,17 @@ func (x codecSelfer1234) decSliceConfigMap(v *[]ConfigMap, d *codec1978.Decoder) } } - if yyj3936 < len(yyv3936) { - yyv3936 = yyv3936[:yyj3936] - yyc3936 = true - } else if yyj3936 == 0 && yyv3936 == nil { - yyv3936 = []ConfigMap{} - yyc3936 = true + if yyj4047 < len(yyv4047) { + yyv4047 = yyv4047[:yyj4047] + yyc4047 = true + } else if yyj4047 == 0 && yyv4047 == nil { + yyv4047 = []ConfigMap{} + yyc4047 = true } } - yyh3936.End() - if yyc3936 { - *v = yyv3936 + yyh4047.End() + if yyc4047 { + *v = yyv4047 } } @@ -50331,10 +52005,10 @@ func (x codecSelfer1234) encSliceComponentCondition(v []ComponentCondition, e *c z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3940 := range v { + for _, yyv4051 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3941 := &yyv3940 - yy3941.CodecEncodeSelf(e) + yy4052 := &yyv4051 + yy4052.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -50344,83 +52018,83 @@ func (x codecSelfer1234) decSliceComponentCondition(v *[]ComponentCondition, d * z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3942 := *v - yyh3942, yyl3942 := z.DecSliceHelperStart() - var yyc3942 bool - if yyl3942 == 0 { - if yyv3942 == nil { - yyv3942 = []ComponentCondition{} - yyc3942 = true - } else if len(yyv3942) != 0 { - yyv3942 = yyv3942[:0] - yyc3942 = true + yyv4053 := *v + yyh4053, yyl4053 := z.DecSliceHelperStart() + var yyc4053 bool + if yyl4053 == 0 { + if yyv4053 == nil { + yyv4053 = []ComponentCondition{} + yyc4053 = true + } else if len(yyv4053) != 0 { + yyv4053 = yyv4053[:0] + yyc4053 = true } - } else if yyl3942 > 0 { - var yyrr3942, yyrl3942 int - var yyrt3942 bool - if yyl3942 > cap(yyv3942) { + } else if yyl4053 > 0 { + var yyrr4053, yyrl4053 int + var yyrt4053 bool + if yyl4053 > cap(yyv4053) { - yyrg3942 := len(yyv3942) > 0 - yyv23942 := yyv3942 - yyrl3942, yyrt3942 = z.DecInferLen(yyl3942, z.DecBasicHandle().MaxInitLen, 64) - if yyrt3942 { - if yyrl3942 <= cap(yyv3942) { - yyv3942 = yyv3942[:yyrl3942] + yyrg4053 := len(yyv4053) > 0 + yyv24053 := yyv4053 + yyrl4053, yyrt4053 = z.DecInferLen(yyl4053, z.DecBasicHandle().MaxInitLen, 64) + if yyrt4053 { + if yyrl4053 <= cap(yyv4053) { + yyv4053 = yyv4053[:yyrl4053] } else { - yyv3942 = make([]ComponentCondition, yyrl3942) + yyv4053 = make([]ComponentCondition, yyrl4053) } } else { - yyv3942 = make([]ComponentCondition, yyrl3942) + yyv4053 = make([]ComponentCondition, yyrl4053) } - yyc3942 = true - yyrr3942 = len(yyv3942) - if yyrg3942 { - copy(yyv3942, yyv23942) + yyc4053 = true + yyrr4053 = len(yyv4053) + if yyrg4053 { + copy(yyv4053, yyv24053) } - } else if yyl3942 != len(yyv3942) { - yyv3942 = yyv3942[:yyl3942] - yyc3942 = true + } else if yyl4053 != len(yyv4053) { + yyv4053 = yyv4053[:yyl4053] + yyc4053 = true } - yyj3942 := 0 - for ; yyj3942 < yyrr3942; yyj3942++ { - yyh3942.ElemContainerState(yyj3942) + yyj4053 := 0 + for ; yyj4053 < yyrr4053; yyj4053++ { + yyh4053.ElemContainerState(yyj4053) if r.TryDecodeAsNil() { - yyv3942[yyj3942] = ComponentCondition{} + yyv4053[yyj4053] = ComponentCondition{} } else { - yyv3943 := &yyv3942[yyj3942] - yyv3943.CodecDecodeSelf(d) + yyv4054 := &yyv4053[yyj4053] + yyv4054.CodecDecodeSelf(d) } } - if yyrt3942 { - for ; yyj3942 < yyl3942; yyj3942++ { - yyv3942 = append(yyv3942, ComponentCondition{}) - yyh3942.ElemContainerState(yyj3942) + if yyrt4053 { + for ; yyj4053 < yyl4053; yyj4053++ { + yyv4053 = append(yyv4053, ComponentCondition{}) + yyh4053.ElemContainerState(yyj4053) if r.TryDecodeAsNil() { - yyv3942[yyj3942] = ComponentCondition{} + yyv4053[yyj4053] = ComponentCondition{} } else { - yyv3944 := &yyv3942[yyj3942] - yyv3944.CodecDecodeSelf(d) + yyv4055 := &yyv4053[yyj4053] + yyv4055.CodecDecodeSelf(d) } } } } else { - yyj3942 := 0 - for ; !r.CheckBreak(); yyj3942++ { + yyj4053 := 0 + for ; !r.CheckBreak(); yyj4053++ { - if yyj3942 >= len(yyv3942) { - yyv3942 = append(yyv3942, ComponentCondition{}) // var yyz3942 ComponentCondition - yyc3942 = true + if yyj4053 >= len(yyv4053) { + yyv4053 = append(yyv4053, ComponentCondition{}) // var yyz4053 ComponentCondition + yyc4053 = true } - yyh3942.ElemContainerState(yyj3942) - if yyj3942 < len(yyv3942) { + yyh4053.ElemContainerState(yyj4053) + if yyj4053 < len(yyv4053) { if r.TryDecodeAsNil() { - yyv3942[yyj3942] = ComponentCondition{} + yyv4053[yyj4053] = ComponentCondition{} } else { - yyv3945 := &yyv3942[yyj3942] - yyv3945.CodecDecodeSelf(d) + yyv4056 := &yyv4053[yyj4053] + yyv4056.CodecDecodeSelf(d) } } else { @@ -50428,17 +52102,17 @@ func (x codecSelfer1234) decSliceComponentCondition(v *[]ComponentCondition, d * } } - if yyj3942 < len(yyv3942) { - yyv3942 = yyv3942[:yyj3942] - yyc3942 = true - } else if yyj3942 == 0 && yyv3942 == nil { - yyv3942 = []ComponentCondition{} - yyc3942 = true + if yyj4053 < len(yyv4053) { + yyv4053 = yyv4053[:yyj4053] + yyc4053 = true + } else if yyj4053 == 0 && yyv4053 == nil { + yyv4053 = []ComponentCondition{} + yyc4053 = true } } - yyh3942.End() - if yyc3942 { - *v = yyv3942 + yyh4053.End() + if yyc4053 { + *v = yyv4053 } } @@ -50447,10 +52121,10 @@ func (x codecSelfer1234) encSliceComponentStatus(v []ComponentStatus, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3946 := range v { + for _, yyv4057 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3947 := &yyv3946 - yy3947.CodecEncodeSelf(e) + yy4058 := &yyv4057 + yy4058.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -50460,83 +52134,83 @@ func (x codecSelfer1234) decSliceComponentStatus(v *[]ComponentStatus, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3948 := *v - yyh3948, yyl3948 := z.DecSliceHelperStart() - var yyc3948 bool - if yyl3948 == 0 { - if yyv3948 == nil { - yyv3948 = []ComponentStatus{} - yyc3948 = true - } else if len(yyv3948) != 0 { - yyv3948 = yyv3948[:0] - yyc3948 = true + yyv4059 := *v + yyh4059, yyl4059 := z.DecSliceHelperStart() + var yyc4059 bool + if yyl4059 == 0 { + if yyv4059 == nil { + yyv4059 = []ComponentStatus{} + yyc4059 = true + } else if len(yyv4059) != 0 { + yyv4059 = yyv4059[:0] + yyc4059 = true } - } else if yyl3948 > 0 { - var yyrr3948, yyrl3948 int - var yyrt3948 bool - if yyl3948 > cap(yyv3948) { + } else if yyl4059 > 0 { + var yyrr4059, yyrl4059 int + var yyrt4059 bool + if yyl4059 > cap(yyv4059) { - yyrg3948 := len(yyv3948) > 0 - yyv23948 := yyv3948 - yyrl3948, yyrt3948 = z.DecInferLen(yyl3948, z.DecBasicHandle().MaxInitLen, 216) - if yyrt3948 { - if yyrl3948 <= cap(yyv3948) { - yyv3948 = yyv3948[:yyrl3948] + yyrg4059 := len(yyv4059) > 0 + yyv24059 := yyv4059 + yyrl4059, yyrt4059 = z.DecInferLen(yyl4059, z.DecBasicHandle().MaxInitLen, 216) + if yyrt4059 { + if yyrl4059 <= cap(yyv4059) { + yyv4059 = yyv4059[:yyrl4059] } else { - yyv3948 = make([]ComponentStatus, yyrl3948) + yyv4059 = make([]ComponentStatus, yyrl4059) } } else { - yyv3948 = make([]ComponentStatus, yyrl3948) + yyv4059 = make([]ComponentStatus, yyrl4059) } - yyc3948 = true - yyrr3948 = len(yyv3948) - if yyrg3948 { - copy(yyv3948, yyv23948) + yyc4059 = true + yyrr4059 = len(yyv4059) + if yyrg4059 { + copy(yyv4059, yyv24059) } - } else if yyl3948 != len(yyv3948) { - yyv3948 = yyv3948[:yyl3948] - yyc3948 = true + } else if yyl4059 != len(yyv4059) { + yyv4059 = yyv4059[:yyl4059] + yyc4059 = true } - yyj3948 := 0 - for ; yyj3948 < yyrr3948; yyj3948++ { - yyh3948.ElemContainerState(yyj3948) + yyj4059 := 0 + for ; yyj4059 < yyrr4059; yyj4059++ { + yyh4059.ElemContainerState(yyj4059) if r.TryDecodeAsNil() { - yyv3948[yyj3948] = ComponentStatus{} + yyv4059[yyj4059] = ComponentStatus{} } else { - yyv3949 := &yyv3948[yyj3948] - yyv3949.CodecDecodeSelf(d) + yyv4060 := &yyv4059[yyj4059] + yyv4060.CodecDecodeSelf(d) } } - if yyrt3948 { - for ; yyj3948 < yyl3948; yyj3948++ { - yyv3948 = append(yyv3948, ComponentStatus{}) - yyh3948.ElemContainerState(yyj3948) + if yyrt4059 { + for ; yyj4059 < yyl4059; yyj4059++ { + yyv4059 = append(yyv4059, ComponentStatus{}) + yyh4059.ElemContainerState(yyj4059) if r.TryDecodeAsNil() { - yyv3948[yyj3948] = ComponentStatus{} + yyv4059[yyj4059] = ComponentStatus{} } else { - yyv3950 := &yyv3948[yyj3948] - yyv3950.CodecDecodeSelf(d) + yyv4061 := &yyv4059[yyj4059] + yyv4061.CodecDecodeSelf(d) } } } } else { - yyj3948 := 0 - for ; !r.CheckBreak(); yyj3948++ { + yyj4059 := 0 + for ; !r.CheckBreak(); yyj4059++ { - if yyj3948 >= len(yyv3948) { - yyv3948 = append(yyv3948, ComponentStatus{}) // var yyz3948 ComponentStatus - yyc3948 = true + if yyj4059 >= len(yyv4059) { + yyv4059 = append(yyv4059, ComponentStatus{}) // var yyz4059 ComponentStatus + yyc4059 = true } - yyh3948.ElemContainerState(yyj3948) - if yyj3948 < len(yyv3948) { + yyh4059.ElemContainerState(yyj4059) + if yyj4059 < len(yyv4059) { if r.TryDecodeAsNil() { - yyv3948[yyj3948] = ComponentStatus{} + yyv4059[yyj4059] = ComponentStatus{} } else { - yyv3951 := &yyv3948[yyj3948] - yyv3951.CodecDecodeSelf(d) + yyv4062 := &yyv4059[yyj4059] + yyv4062.CodecDecodeSelf(d) } } else { @@ -50544,17 +52218,17 @@ func (x codecSelfer1234) decSliceComponentStatus(v *[]ComponentStatus, d *codec1 } } - if yyj3948 < len(yyv3948) { - yyv3948 = yyv3948[:yyj3948] - yyc3948 = true - } else if yyj3948 == 0 && yyv3948 == nil { - yyv3948 = []ComponentStatus{} - yyc3948 = true + if yyj4059 < len(yyv4059) { + yyv4059 = yyv4059[:yyj4059] + yyc4059 = true + } else if yyj4059 == 0 && yyv4059 == nil { + yyv4059 = []ComponentStatus{} + yyc4059 = true } } - yyh3948.End() - if yyc3948 { - *v = yyv3948 + yyh4059.End() + if yyc4059 { + *v = yyv4059 } } @@ -50563,10 +52237,10 @@ func (x codecSelfer1234) encSliceDownwardAPIVolumeFile(v []DownwardAPIVolumeFile z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv3952 := range v { + for _, yyv4063 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3953 := &yyv3952 - yy3953.CodecEncodeSelf(e) + yy4064 := &yyv4063 + yy4064.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -50576,83 +52250,83 @@ func (x codecSelfer1234) decSliceDownwardAPIVolumeFile(v *[]DownwardAPIVolumeFil z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv3954 := *v - yyh3954, yyl3954 := z.DecSliceHelperStart() - var yyc3954 bool - if yyl3954 == 0 { - if yyv3954 == nil { - yyv3954 = []DownwardAPIVolumeFile{} - yyc3954 = true - } else if len(yyv3954) != 0 { - yyv3954 = yyv3954[:0] - yyc3954 = true + yyv4065 := *v + yyh4065, yyl4065 := z.DecSliceHelperStart() + var yyc4065 bool + if yyl4065 == 0 { + if yyv4065 == nil { + yyv4065 = []DownwardAPIVolumeFile{} + yyc4065 = true + } else if len(yyv4065) != 0 { + yyv4065 = yyv4065[:0] + yyc4065 = true } - } else if yyl3954 > 0 { - var yyrr3954, yyrl3954 int - var yyrt3954 bool - if yyl3954 > cap(yyv3954) { + } else if yyl4065 > 0 { + var yyrr4065, yyrl4065 int + var yyrt4065 bool + if yyl4065 > cap(yyv4065) { - yyrg3954 := len(yyv3954) > 0 - yyv23954 := yyv3954 - yyrl3954, yyrt3954 = z.DecInferLen(yyl3954, z.DecBasicHandle().MaxInitLen, 48) - if yyrt3954 { - if yyrl3954 <= cap(yyv3954) { - yyv3954 = yyv3954[:yyrl3954] + yyrg4065 := len(yyv4065) > 0 + yyv24065 := yyv4065 + yyrl4065, yyrt4065 = z.DecInferLen(yyl4065, z.DecBasicHandle().MaxInitLen, 48) + if yyrt4065 { + if yyrl4065 <= cap(yyv4065) { + yyv4065 = yyv4065[:yyrl4065] } else { - yyv3954 = make([]DownwardAPIVolumeFile, yyrl3954) + yyv4065 = make([]DownwardAPIVolumeFile, yyrl4065) } } else { - yyv3954 = make([]DownwardAPIVolumeFile, yyrl3954) + yyv4065 = make([]DownwardAPIVolumeFile, yyrl4065) } - yyc3954 = true - yyrr3954 = len(yyv3954) - if yyrg3954 { - copy(yyv3954, yyv23954) + yyc4065 = true + yyrr4065 = len(yyv4065) + if yyrg4065 { + copy(yyv4065, yyv24065) } - } else if yyl3954 != len(yyv3954) { - yyv3954 = yyv3954[:yyl3954] - yyc3954 = true + } else if yyl4065 != len(yyv4065) { + yyv4065 = yyv4065[:yyl4065] + yyc4065 = true } - yyj3954 := 0 - for ; yyj3954 < yyrr3954; yyj3954++ { - yyh3954.ElemContainerState(yyj3954) + yyj4065 := 0 + for ; yyj4065 < yyrr4065; yyj4065++ { + yyh4065.ElemContainerState(yyj4065) if r.TryDecodeAsNil() { - yyv3954[yyj3954] = DownwardAPIVolumeFile{} + yyv4065[yyj4065] = DownwardAPIVolumeFile{} } else { - yyv3955 := &yyv3954[yyj3954] - yyv3955.CodecDecodeSelf(d) + yyv4066 := &yyv4065[yyj4065] + yyv4066.CodecDecodeSelf(d) } } - if yyrt3954 { - for ; yyj3954 < yyl3954; yyj3954++ { - yyv3954 = append(yyv3954, DownwardAPIVolumeFile{}) - yyh3954.ElemContainerState(yyj3954) + if yyrt4065 { + for ; yyj4065 < yyl4065; yyj4065++ { + yyv4065 = append(yyv4065, DownwardAPIVolumeFile{}) + yyh4065.ElemContainerState(yyj4065) if r.TryDecodeAsNil() { - yyv3954[yyj3954] = DownwardAPIVolumeFile{} + yyv4065[yyj4065] = DownwardAPIVolumeFile{} } else { - yyv3956 := &yyv3954[yyj3954] - yyv3956.CodecDecodeSelf(d) + yyv4067 := &yyv4065[yyj4065] + yyv4067.CodecDecodeSelf(d) } } } } else { - yyj3954 := 0 - for ; !r.CheckBreak(); yyj3954++ { + yyj4065 := 0 + for ; !r.CheckBreak(); yyj4065++ { - if yyj3954 >= len(yyv3954) { - yyv3954 = append(yyv3954, DownwardAPIVolumeFile{}) // var yyz3954 DownwardAPIVolumeFile - yyc3954 = true + if yyj4065 >= len(yyv4065) { + yyv4065 = append(yyv4065, DownwardAPIVolumeFile{}) // var yyz4065 DownwardAPIVolumeFile + yyc4065 = true } - yyh3954.ElemContainerState(yyj3954) - if yyj3954 < len(yyv3954) { + yyh4065.ElemContainerState(yyj4065) + if yyj4065 < len(yyv4065) { if r.TryDecodeAsNil() { - yyv3954[yyj3954] = DownwardAPIVolumeFile{} + yyv4065[yyj4065] = DownwardAPIVolumeFile{} } else { - yyv3957 := &yyv3954[yyj3954] - yyv3957.CodecDecodeSelf(d) + yyv4068 := &yyv4065[yyj4065] + yyv4068.CodecDecodeSelf(d) } } else { @@ -50660,16 +52334,16 @@ func (x codecSelfer1234) decSliceDownwardAPIVolumeFile(v *[]DownwardAPIVolumeFil } } - if yyj3954 < len(yyv3954) { - yyv3954 = yyv3954[:yyj3954] - yyc3954 = true - } else if yyj3954 == 0 && yyv3954 == nil { - yyv3954 = []DownwardAPIVolumeFile{} - yyc3954 = true + if yyj4065 < len(yyv4065) { + yyv4065 = yyv4065[:yyj4065] + yyc4065 = true + } else if yyj4065 == 0 && yyv4065 == nil { + yyv4065 = []DownwardAPIVolumeFile{} + yyc4065 = true } } - yyh3954.End() - if yyc3954 { - *v = yyv3954 + yyh4065.End() + if yyc4065 { + *v = yyv4065 } } diff --git a/pkg/api/v1/types.go b/pkg/api/v1/types.go index 0f8b93817b5..cd2ae253dc9 100644 --- a/pkg/api/v1/types.go +++ b/pkg/api/v1/types.go @@ -1273,6 +1273,94 @@ const ( DefaultTerminationGracePeriodSeconds = 30 ) +// A node selector represents the union of the results of one or more label queries +// over a set of nodes; that is, it represents the OR of the selectors represented +// by the node selector terms. +type NodeSelector struct { + //Required. A list of node selector terms. The terms are ORed. + NodeSelectorTerms []NodeSelectorTerm `json:"nodeSelectorTerms"` +} + +// A null or empty node selector term matches no objects. +type NodeSelectorTerm struct { + //Required. A list of node selector requirements. The requirements are ANDed. + MatchExpressions []NodeSelectorRequirement `json:"matchExpressions"` +} + +// A node selector requirement is a selector that contains values, a key, and an operator +// that relates the key and values. +type NodeSelectorRequirement struct { + // The label key that the selector applies to. + Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key"` + // Represents a key's relationship to a set of values. + // Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + Operator NodeSelectorOperator `json:"operator"` + // An array of string values. If the operator is In or NotIn, + // the values array must be non-empty. If the operator is Exists or DoesNotExist, + // the values array must be empty. If the operator is Gt or Lt, the values + // array must have a single element, which will be interpreted as an integer. + // This array is replaced during a strategic merge patch. + Values []string `json:"values,omitempty"` +} + +// A node selector operator is the set of operators that can be used in +// a node selector requirement. +type NodeSelectorOperator string + +const ( + NodeSelectorOpIn NodeSelectorOperator = "In" + NodeSelectorOpNotIn NodeSelectorOperator = "NotIn" + NodeSelectorOpExists NodeSelectorOperator = "Exists" + NodeSelectorOpDoesNotExist NodeSelectorOperator = "DoesNotExist" + NodeSelectorOpGt NodeSelectorOperator = "Gt" + NodeSelectorOpLt NodeSelectorOperator = "Lt" +) + +// Affinity is a group of affinity scheduling requirements, +// including node affinity and inter pod affinity. +type Affinity struct { + // Describes node affinity scheduling requirements for the pod. + NodeAffinity *NodeAffinity `json:"nodeAffinity,omitempty"` +} + +// Node affinity is a group of node affinity scheduling requirements. +// If RequiredDuringSchedulingRequiredDuringExecution and +// RequiredDuringSchedulingIgnoredDuringExecution are both set, +// then both node selectors must be satisfied. +type NodeAffinity struct { + // If the affinity requirements specified by this field are not met at + // scheduling time, the pod will not be scheduled onto the node. + // If the affinity requirements specified by this field cease to be met + // at some point during pod execution (e.g. due to an update), the system + // will try to eventually evict the pod from its node. + RequiredDuringSchedulingRequiredDuringExecution *NodeSelector `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` + // If the affinity requirements specified by this field are not met at + // scheduling time, the pod will not be scheduled onto the node. + // If the affinity requirements specified by this field cease to be met + // at some point during pod execution (e.g. due to an update), the system + // may or may not try to eventually evict the pod from its node. + RequiredDuringSchedulingIgnoredDuringExecution *NodeSelector `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"` + // The scheduler will prefer to schedule pods to nodes that satisfy + // the affinity expressions specified by this field, but it may choose + // a node that violates one or more of the expressions. The node that is + // most preferred is the one with the greatest sum of weights, i.e. + // for each node that meets all of the scheduling requirements (resource + // request, requiredDuringScheduling affinity expressions, etc.), + // compute a sum by iterating through the elements of this field and adding + // "weight" to the sum if the node matches the corresponding matchExpressions; the + // node(s) with the highest sum are the most preferred. + PreferredDuringSchedulingIgnoredDuringExecution []PreferredSchedulingTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty"` +} + +// An empty preferred scheduling term matches all objects with implicit weight 0 +// (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). +type PreferredSchedulingTerm struct { + // Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. + Weight int `json:"weight"` + // A node selector term, associated with the corresponding weight. + Preference NodeSelectorTerm `json:"preference"` +} + // PodSpec is a description of a pod. type PodSpec struct { // List of volumes that can be mounted by containers belonging to the pod. diff --git a/pkg/api/v1/types_swagger_doc_generated.go b/pkg/api/v1/types_swagger_doc_generated.go index d1c6aea9b47..94d36038a27 100644 --- a/pkg/api/v1/types_swagger_doc_generated.go +++ b/pkg/api/v1/types_swagger_doc_generated.go @@ -39,6 +39,15 @@ func (AWSElasticBlockStoreVolumeSource) SwaggerDoc() map[string]string { return map_AWSElasticBlockStoreVolumeSource } +var map_Affinity = map[string]string{ + "": "Affinity is a group of affinity scheduling requirements, including node affinity and inter pod affinity.", + "nodeAffinity": "Describes node affinity scheduling requirements for the pod.", +} + +func (Affinity) SwaggerDoc() map[string]string { + return map_Affinity +} + var map_Binding = map[string]string{ "": "Binding ties one object to another. For example, a pod is bound to a node by a scheduler.", "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", @@ -720,6 +729,17 @@ func (NodeAddress) SwaggerDoc() map[string]string { return map_NodeAddress } +var map_NodeAffinity = map[string]string{ + "": "Node affinity is a group of node affinity scheduling requirements. If RequiredDuringSchedulingRequiredDuringExecution and RequiredDuringSchedulingIgnoredDuringExecution are both set, then both node selectors must be satisfied.", + "requiredDuringSchedulingRequiredDuringExecution": "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system will try to eventually evict the pod from its node.", + "requiredDuringSchedulingIgnoredDuringExecution": "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.", + "preferredDuringSchedulingIgnoredDuringExecution": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.", +} + +func (NodeAffinity) SwaggerDoc() map[string]string { + return map_NodeAffinity +} + var map_NodeCondition = map[string]string{ "": "NodeCondition contains condition infromation for a node.", "type": "Type of node condition.", @@ -753,6 +773,35 @@ func (NodeList) SwaggerDoc() map[string]string { return map_NodeList } +var map_NodeSelector = map[string]string{ + "": "A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.", + "nodeSelectorTerms": "Required. A list of node selector terms. The terms are ORed.", +} + +func (NodeSelector) SwaggerDoc() map[string]string { + return map_NodeSelector +} + +var map_NodeSelectorRequirement = map[string]string{ + "": "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + "key": "The label key that the selector applies to.", + "operator": "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.", + "values": "An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.", +} + +func (NodeSelectorRequirement) SwaggerDoc() map[string]string { + return map_NodeSelectorRequirement +} + +var map_NodeSelectorTerm = map[string]string{ + "": "A null or empty node selector term matches no objects.", + "matchExpressions": "Required. A list of node selector requirements. The requirements are ANDed.", +} + +func (NodeSelectorTerm) SwaggerDoc() map[string]string { + return map_NodeSelectorTerm +} + var map_NodeSpec = map[string]string{ "": "NodeSpec describes the attributes that a node is created with.", "podCIDR": "PodCIDR represents the pod IP range assigned to the node.", @@ -1138,6 +1187,16 @@ func (PodTemplateSpec) SwaggerDoc() map[string]string { return map_PodTemplateSpec } +var map_PreferredSchedulingTerm = map[string]string{ + "": "An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).", + "weight": "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.", + "preference": "A node selector term, associated with the corresponding weight.", +} + +func (PreferredSchedulingTerm) SwaggerDoc() map[string]string { + return map_PreferredSchedulingTerm +} + var map_Probe = map[string]string{ "": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", "initialDelaySeconds": "Number of seconds after the container has started before liveness probes are initiated. More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-probes", diff --git a/pkg/api/validation/validation.go b/pkg/api/validation/validation.go index f81e9845f80..c2d1040af0d 100644 --- a/pkg/api/validation/validation.go +++ b/pkg/api/validation/validation.go @@ -97,6 +97,10 @@ func ValidateAnnotations(annotations map[string]string, fldPath *field.Path) fie if totalSize > (int64)(totalAnnotationSizeLimitB) { allErrs = append(allErrs, field.TooLong(fldPath, "", totalAnnotationSizeLimitB)) } + + if annotations[api.AffinityAnnotationKey] != "" { + allErrs = append(allErrs, ValidateAffinityInPodAnnotations(annotations, fldPath)...) + } return allErrs } @@ -1346,6 +1350,102 @@ func ValidatePodSpec(spec *api.PodSpec, fldPath *field.Path) field.ErrorList { return allErrs } +// ValidateNodeSelectorRequirement tests that the specified NodeSelectorRequirement fields has valid data +func ValidateNodeSelectorRequirement(rq api.NodeSelectorRequirement, fldPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + switch rq.Operator { + case api.NodeSelectorOpIn, api.NodeSelectorOpNotIn: + if len(rq.Values) == 0 { + allErrs = append(allErrs, field.Required(fldPath.Child("values"), "must be specified when `operator` is 'In' or 'NotIn'")) + } + case api.NodeSelectorOpExists, api.NodeSelectorOpDoesNotExist: + if len(rq.Values) > 0 { + allErrs = append(allErrs, field.Forbidden(fldPath.Child("values"), "may not be specified when `operator` is 'Exists' or 'DoesNotExist'")) + } + + case api.NodeSelectorOpGt, api.NodeSelectorOpLt: + if len(rq.Values) != 1 { + allErrs = append(allErrs, field.Required(fldPath.Child("values"), "must be specified single value when `operator` is 'Lt' or 'Gt'")) + } + default: + allErrs = append(allErrs, field.Invalid(fldPath.Child("operator"), rq.Operator, "not a valid selector operator")) + } + allErrs = append(allErrs, ValidateLabelName(rq.Key, fldPath.Child("key"))...) + return allErrs +} + +// ValidateNodeSelectorTerm tests that the specified node selector term has valid data +func ValidateNodeSelectorTerm(term api.NodeSelectorTerm, fldPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + + if len(term.MatchExpressions) == 0 { + return append(allErrs, field.Required(fldPath.Child("matchExpressions"), "must have at least one node selector requirement")) + } + for j, req := range term.MatchExpressions { + allErrs = append(allErrs, ValidateNodeSelectorRequirement(req, fldPath.Child("matchExpressions").Index(j))...) + } + return allErrs +} + +// ValidateNodeSelector tests that the specified nodeSelector fields has valid data +func ValidateNodeSelector(nodeSelector *api.NodeSelector, fldPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + + termFldPath := fldPath.Child("nodeSelectorTerms") + if len(nodeSelector.NodeSelectorTerms) == 0 { + return append(allErrs, field.Required(termFldPath, "must have at least one node selector term")) + } + + for i, term := range nodeSelector.NodeSelectorTerms { + allErrs = append(allErrs, ValidateNodeSelectorTerm(term, termFldPath.Index(i))...) + } + + return allErrs +} + +// ValidatePreferredSchedulingTerms tests that the specified SoftNodeAffinity fields has valid data +func ValidatePreferredSchedulingTerms(terms []api.PreferredSchedulingTerm, fldPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + + for i, term := range terms { + if term.Weight <= 0 || term.Weight > 100 { + allErrs = append(allErrs, field.Invalid(fldPath.Index(i).Child("weight"), term.Weight, "must be in the range 1-100")) + } + + allErrs = append(allErrs, ValidateNodeSelectorTerm(term.Preference, fldPath.Index(i).Child("preference"))...) + } + return allErrs +} + +// ValidateAffinityInPodAnnotations tests that the serialized Affinity in Pod.Annotations has valid data +func ValidateAffinityInPodAnnotations(annotations map[string]string, fldPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + + affinity, err := api.GetAffinityFromPodAnnotations(annotations) + if err != nil { + allErrs = append(allErrs, field.Invalid(fldPath, api.AffinityAnnotationKey, err.Error())) + return allErrs + } + + if affinity.NodeAffinity != nil { + na := affinity.NodeAffinity + if na.RequiredDuringSchedulingRequiredDuringExecution != nil { + allErrs = append(allErrs, ValidateNodeSelector(na.RequiredDuringSchedulingRequiredDuringExecution, fldPath.Child("requiredDuringSchedulingRequiredDuringExecution"))...) + } + + if na.RequiredDuringSchedulingIgnoredDuringExecution != nil { + allErrs = append(allErrs, ValidateNodeSelector(na.RequiredDuringSchedulingIgnoredDuringExecution, fldPath.Child("requiredDuringSchedulingIgnoredDuringExecution"))...) + } + + if len(na.PreferredDuringSchedulingIgnoredDuringExecution) > 0 { + allErrs = append(allErrs, ValidatePreferredSchedulingTerms(na.PreferredDuringSchedulingIgnoredDuringExecution, fldPath.Child("preferredDuringSchedulingIgnoredDuringExecution"))...) + + } + } + + return allErrs +} + // ValidatePodSecurityContext test that the specified PodSecurityContext has valid data. func ValidatePodSecurityContext(securityContext *api.PodSecurityContext, spec *api.PodSpec, specPath, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} diff --git a/pkg/api/validation/validation_test.go b/pkg/api/validation/validation_test.go index 69e02012e3f..72c66383d46 100644 --- a/pkg/api/validation/validation_test.go +++ b/pkg/api/validation/validation_test.go @@ -1550,6 +1550,12 @@ func TestValidatePodSpec(t *testing.T) { RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, + { // Populate Affinity. + Volumes: []api.Volume{{Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, } for i := range successCases { if errs := ValidatePodSpec(&successCases[i], field.NewPath("field")); len(errs) != 0 { @@ -1712,6 +1718,50 @@ func TestValidatePod(t *testing.T) { NodeName: "foobar", }, }, + { // Serialized affinity requirements in annotations. + ObjectMeta: api.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + api.AffinityAnnotationKey: ` + {"nodeAffinity": { + "requiredDuringSchedulingRequiredDuringExecution": { + "nodeSelectorTerms": [{ + "matchExpressions": [{ + "key": "key1", + "operator": "Exists" + }] + }] + }, + "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [{ + "matchExpressions": [{ + "key": "key2", + "operator": "In", + "values": ["value1", "value2"] + }] + }] + }, + "preferredDuringSchedulingIgnoredDuringExecution": [ + { + "weight": 10, + "preference": {"matchExpressions": [ + { + "key": "foo", + "operator": "In", "values": ["bar"] + } + ]} + } + ] + }}`, + }, + }, + Spec: api.PodSpec{ + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + }, } for _, pod := range successCases { if errs := ValidatePod(&pod); len(errs) != 0 { @@ -1756,6 +1806,111 @@ func TestValidatePod(t *testing.T) { Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, }, }, + "invalid json of affinity in pod annotations": { + ObjectMeta: api.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + api.AffinityAnnotationKey: ` + {"nodeAffinity": { + "requiredDuringSchedulingRequiredDuringExecution": { + "nodeSelectorTerms": [{ + `, + }, + }, + Spec: api.PodSpec{ + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + }, + "invalid node selector requirement in affinity in pod annotations, operator can't be null": { + ObjectMeta: api.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + api.AffinityAnnotationKey: ` + {"nodeAffinity": {"requiredDuringSchedulingRequiredDuringExecution": { + "nodeSelectorTerms": [{ + "matchExpressions": [{ + "key": "key1", + }] + }] + }}}`, + }, + }, + Spec: api.PodSpec{ + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + }, + "invalid preferredSchedulingTerm in affinity in pod annotations, weight should be in range 1-100": { + ObjectMeta: api.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + api.AffinityAnnotationKey: ` + {"nodeAffinity": {"preferredDuringSchedulingIgnoredDuringExecution": [ + { + "weight": 199, + "preference": {"matchExpressions": [ + { + "key": "foo", + "operator": "In", + "values": ["bar"] + } + ]} + } + ]}}`, + }, + }, + Spec: api.PodSpec{ + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + }, + "invalid requiredDuringSchedulingRequiredDuringExecution node selector, nodeSelectorTerms must have at least one term": { + ObjectMeta: api.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + api.AffinityAnnotationKey: ` + {"nodeAffinity": { + "requiredDuringSchedulingRequiredDuringExecution": { + "nodeSelectorTerms": [] + }, + }}`, + }, + }, + Spec: api.PodSpec{ + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + }, + "invalid requiredDuringSchedulingRequiredDuringExecution node selector term, matchExpressions must have at least one node selector requirement": { + ObjectMeta: api.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + api.AffinityAnnotationKey: ` + {"nodeAffinity": { + "requiredDuringSchedulingRequiredDuringExecution": { + "nodeSelectorTerms": [{ + "matchExpressions": [] + }] + }, + }}`, + }, + }, + Spec: api.PodSpec{ + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + }, } for k, v := range errorCases { if errs := ValidatePod(&v); len(errs) == 0 { diff --git a/pkg/labels/selector.go b/pkg/labels/selector.go index 4fec1e0961e..5203774868b 100644 --- a/pkg/labels/selector.go +++ b/pkg/labels/selector.go @@ -20,8 +20,10 @@ import ( "bytes" "fmt" "sort" + "strconv" "strings" + "github.com/golang/glog" "k8s.io/kubernetes/pkg/util/sets" "k8s.io/kubernetes/pkg/util/validation" ) @@ -70,6 +72,8 @@ const ( NotEqualsOperator Operator = "!=" NotInOperator Operator = "notin" ExistsOperator Operator = "exists" + GreaterThanOperator Operator = "Gt" + LessThanOperator Operator = "Lt" ) func NewSelector() Selector { @@ -104,7 +108,8 @@ type Requirement struct { // (2) If the operator is In or NotIn, the values set must be non-empty. // (3) If the operator is Equals, DoubleEquals, or NotEquals, the values set must contain one value. // (4) If the operator is Exists or DoesNotExist, the value set must be empty. -// (5) The key is invalid due to its length, or sequence +// (5) If the operator is Gt or Lt, the values set must contain only one value. +// (6) The key is invalid due to its length, or sequence // of characters. See validateLabelKey for more details. // // The empty string is a valid value in the input values set. @@ -125,6 +130,15 @@ func NewRequirement(key string, op Operator, vals sets.String) (*Requirement, er if len(vals) != 0 { return nil, fmt.Errorf("values set must be empty for exists and does not exist") } + case GreaterThanOperator, LessThanOperator: + if len(vals) != 1 { + return nil, fmt.Errorf("for 'Gt', 'Lt' operators, exactly one value is required") + } + for val := range vals { + if _, err := strconv.ParseFloat(val, 64); err != nil { + return nil, fmt.Errorf("for 'Gt', 'Lt' operators, the value must be a number") + } + } default: return nil, fmt.Errorf("operator '%v' is not recognized", op) } @@ -162,6 +176,31 @@ func (r *Requirement) Matches(ls Labels) bool { return ls.Has(r.key) case DoesNotExistOperator: return !ls.Has(r.key) + case GreaterThanOperator, LessThanOperator: + if !ls.Has(r.key) { + return false + } + lsValue, err := strconv.ParseFloat(ls.Get(r.key), 64) + if err != nil { + glog.V(10).Infof("Parse float failed for value %+v in label %+v, %+v", ls.Get(r.key), ls, err) + return false + } + + // There should be only one strValue in r.strValues, and can be converted to a float number. + if len(r.strValues) != 1 { + glog.V(10).Infof("Invalid values count %+v of requirement %+v, for 'Gt', 'Lt' operators, exactly one value is required", len(r.strValues), r) + return false + } + + var rValue float64 + for strValue := range r.strValues { + rValue, err = strconv.ParseFloat(strValue, 64) + if err != nil { + glog.V(10).Infof("Parse float failed for value %+v in requirement %+v, for 'Gt', 'Lt' operators, the value must be a number", strValue, r) + return false + } + } + return (r.operator == GreaterThanOperator && lsValue > rValue) || (r.operator == LessThanOperator && lsValue < rValue) default: return false } @@ -210,6 +249,10 @@ func (r *Requirement) String() string { buffer.WriteString(" in ") case NotInOperator: buffer.WriteString(" notin ") + case GreaterThanOperator: + buffer.WriteString(">") + case LessThanOperator: + buffer.WriteString("<") case ExistsOperator, DoesNotExistOperator: return buffer.String() } @@ -277,8 +320,10 @@ const ( DoesNotExistToken DoubleEqualsToken EqualsToken + GreaterThanToken IdentifierToken // to represent keys and values InToken + LessThanToken NotEqualsToken NotInToken OpenParToken @@ -292,7 +337,9 @@ var string2token = map[string]Token{ "!": DoesNotExistToken, "==": DoubleEqualsToken, "=": EqualsToken, + ">": GreaterThanToken, "in": InToken, + "<": LessThanToken, "!=": NotEqualsToken, "notin": NotInToken, "(": OpenParToken, @@ -312,7 +359,7 @@ func isWhitespace(ch byte) bool { // isSpecialSymbol detect if the character ch can be an operator func isSpecialSymbol(ch byte) bool { switch ch { - case '=', '!', '(', ')', ',': + case '=', '!', '(', ')', ',', '>', '<': return true } return false @@ -526,7 +573,7 @@ func (p *Parser) parseRequirement() (*Requirement, error) { switch operator { case InOperator, NotInOperator: values, err = p.parseValues() - case EqualsOperator, DoubleEqualsOperator, NotEqualsOperator: + case EqualsOperator, DoubleEqualsOperator, NotEqualsOperator, GreaterThanOperator, LessThanOperator: values, err = p.parseExactValue() } if err != nil { @@ -573,6 +620,10 @@ func (p *Parser) parseOperator() (op Operator, err error) { op = EqualsOperator case DoubleEqualsToken: op = DoubleEqualsOperator + case GreaterThanToken: + op = GreaterThanOperator + case LessThanToken: + op = LessThanOperator case NotInToken: op = NotInOperator case NotEqualsToken: diff --git a/pkg/labels/selector_test.go b/pkg/labels/selector_test.go index efe97f7d8b2..5fbb1fc762c 100644 --- a/pkg/labels/selector_test.go +++ b/pkg/labels/selector_test.go @@ -34,11 +34,14 @@ func TestSelectorParse(t *testing.T) { "x=,z= ", "x= ,z= ", "!x", + "x>1.1", + "x>1.1,z<5.3", } testBadStrings := []string{ "x=a||y=b", "x==a==b", "!x=a", + "x1.1", Set{"x": "1.2"}) + expectMatch(t, "x<1.1", Set{"x": "0.8"}) expectNoMatch(t, "x=z", Set{}) expectNoMatch(t, "x=y", Set{"x": "z"}) expectNoMatch(t, "x=y,z=w", Set{"x": "w", "z": "w"}) expectNoMatch(t, "x!=y,z!=w", Set{"x": "z", "z": "w"}) expectNoMatch(t, "x", Set{"y": "z"}) expectNoMatch(t, "!x", Set{"x": "z"}) + expectNoMatch(t, "x>1.1", Set{"x": "0.8"}) + expectNoMatch(t, "x<1.1", Set{"x": "1.1"}) labelset := Set{ "foo": "bar", @@ -184,6 +191,8 @@ func TestLexer(t *testing.T) { {"in", InToken}, {"=", EqualsToken}, {"==", DoubleEqualsToken}, + {">", GreaterThanToken}, + {"<", LessThanToken}, //Note that Lex returns the longest valid token found {"!", DoesNotExistToken}, {"!=", NotEqualsToken}, @@ -226,6 +235,8 @@ func TestLexerSequence(t *testing.T) { {"()", []Token{OpenParToken, ClosedParToken}}, {"x in (),y", []Token{IdentifierToken, InToken, OpenParToken, ClosedParToken, CommaToken, IdentifierToken}}, {"== != (), = notin", []Token{DoubleEqualsToken, NotEqualsToken, OpenParToken, ClosedParToken, CommaToken, EqualsToken, NotInToken}}, + {"key>1.1", []Token{IdentifierToken, GreaterThanToken, IdentifierToken}}, + {"key<0.8", []Token{IdentifierToken, LessThanToken, IdentifierToken}}, } for _, v := range testcases { var literals []string @@ -263,6 +274,8 @@ func TestParserLookahead(t *testing.T) { {"", []Token{EndOfStringToken}}, {"x in (),y", []Token{IdentifierToken, InToken, OpenParToken, ClosedParToken, CommaToken, IdentifierToken, EndOfStringToken}}, {"== != (), = notin", []Token{DoubleEqualsToken, NotEqualsToken, OpenParToken, ClosedParToken, CommaToken, EqualsToken, NotInToken, EndOfStringToken}}, + {"key>1.1", []Token{IdentifierToken, GreaterThanToken, IdentifierToken, EndOfStringToken}}, + {"key<0.8", []Token{IdentifierToken, LessThanToken, IdentifierToken, EndOfStringToken}}, } for _, v := range testcases { p := &Parser{l: &Lexer{s: v.s, pos: 0}, position: 0} @@ -299,6 +312,10 @@ func TestRequirementConstructor(t *testing.T) { {"x", DoesNotExistOperator, nil, true}, {"1foo", InOperator, sets.NewString("bar"), true}, {"1234", InOperator, sets.NewString("bar"), true}, + {"y", GreaterThanOperator, sets.NewString("1.1"), true}, + {"z", LessThanOperator, sets.NewString("5.3"), true}, + {"foo", GreaterThanOperator, sets.NewString("bar"), false}, + {"barz", LessThanOperator, sets.NewString("blah"), false}, {strings.Repeat("a", 254), ExistsOperator, nil, false}, //breaks DNS rule that len(key) <= 253 } for _, rc := range requirementConstructorTests { @@ -343,6 +360,11 @@ func TestToString(t *testing.T) { getRequirement("z", NotEqualsOperator, sets.NewString("a"), t), getRequirement("z", ExistsOperator, nil, t)}, "x=abc,y==jkl,z!=a,z", true}, + {&internalSelector{ + getRequirement("x", GreaterThanOperator, sets.NewString("2.4"), t), + getRequirement("y", LessThanOperator, sets.NewString("7.1"), t), + getRequirement("z", ExistsOperator, nil, t)}, + "x>2.4,y<7.1,z", true}, } for _, ts := range toStringTests { if out := ts.In.String(); out == "" && ts.Valid { @@ -386,6 +408,12 @@ func TestRequirementSelectorMatching(t *testing.T) { {Set{"y": "baz"}, &internalSelector{ getRequirement("x", InOperator, sets.NewString(""), t), }, false}, + {Set{"z": "1.2"}, &internalSelector{ + getRequirement("z", GreaterThanOperator, sets.NewString("1.0"), t), + }, true}, + {Set{"z": "v1.2"}, &internalSelector{ + getRequirement("z", GreaterThanOperator, sets.NewString("1.0"), t), + }, false}, } for _, lsm := range labelSelectorMatchingTests { if match := lsm.Sel.Matches(lsm.Set); match != lsm.Match { @@ -445,6 +473,12 @@ func TestSetSelectorParser(t *testing.T) { {"x=a", internalSelector{ getRequirement("x", EqualsOperator, sets.NewString("a"), t), }, true, true}, + {"x>1.1", internalSelector{ + getRequirement("x", GreaterThanOperator, sets.NewString("1.1"), t), + }, true, true}, + {"x<7.1", internalSelector{ + getRequirement("x", LessThanOperator, sets.NewString("7.1"), t), + }, true, true}, {"x=a,y!=b", internalSelector{ getRequirement("x", EqualsOperator, sets.NewString("a"), t), getRequirement("y", NotEqualsOperator, sets.NewString("b"), t), diff --git a/plugin/pkg/scheduler/algorithm/predicates/predicates.go b/plugin/pkg/scheduler/algorithm/predicates/predicates.go index db19091f22e..1942400b821 100644 --- a/plugin/pkg/scheduler/algorithm/predicates/predicates.go +++ b/plugin/pkg/scheduler/algorithm/predicates/predicates.go @@ -343,12 +343,70 @@ func NewSelectorMatchPredicate(info NodeInfo) algorithm.FitPredicate { return selector.PodSelectorMatches } -func PodMatchesNodeLabels(pod *api.Pod, node *api.Node) bool { - if len(pod.Spec.NodeSelector) == 0 { - return true +// NodeMatchesNodeSelectorTerms checks if a node's labels satisfy a list of node selector terms, +// terms are ORed, and an emtpy a list of terms will match nothing. +func NodeMatchesNodeSelectorTerms(node *api.Node, nodeSelectorTerms []api.NodeSelectorTerm) bool { + for _, req := range nodeSelectorTerms { + nodeSelector, err := api.NodeSelectorRequirementsAsSelector(req.MatchExpressions) + if err != nil { + glog.V(10).Infof("Failed to parse MatchExpressions: %+v, regarding as not match.", req.MatchExpressions) + return false + } + if nodeSelector.Matches(labels.Set(node.Labels)) { + return true + } } - selector := labels.SelectorFromSet(pod.Spec.NodeSelector) - return selector.Matches(labels.Set(node.Labels)) + return false +} + +// The pod can only schedule onto nodes that satisfy requirements in both NodeAffinity and nodeSelector. +func PodMatchesNodeLabels(pod *api.Pod, node *api.Node) bool { + // Check if node.Labels match pod.Spec.NodeSelector. + if len(pod.Spec.NodeSelector) > 0 { + selector := labels.SelectorFromSet(pod.Spec.NodeSelector) + if !selector.Matches(labels.Set(node.Labels)) { + return false + } + } + + // Parse required node affinity scheduling requirements + // and check if the current node match the requirements. + affinity, err := api.GetAffinityFromPodAnnotations(pod.Annotations) + if err != nil { + glog.V(10).Infof("Failed to get Affinity from Pod %+v, err: %+v", podName(pod), err) + return false + } + + // 1. nil NodeSelector matches all nodes (i.e. does not filter out any nodes) + // 2. nil []NodeSelectorTerm (equivalent to non-nil empty NodeSelector) matches no nodes + // 3. zero-length non-nil []NodeSelectorTerm matches no nodes also, just for simplicity + // 4. nil []NodeSelectorRequirement (equivalent to non-nil empty NodeSelectorTerm) matches no nodes + // 5. zero-length non-nil []NodeSelectorRequirement matches no nodes also, just for simplicity + // 6. non-nil empty NodeSelectorRequirement is not allowed + nodeAffinityMatches := true + if affinity.NodeAffinity != nil { + nodeAffinity := affinity.NodeAffinity + // if no required NodeAffinity requirements, will do no-op, means select all nodes. + if nodeAffinity.RequiredDuringSchedulingRequiredDuringExecution == nil && nodeAffinity.RequiredDuringSchedulingIgnoredDuringExecution == nil { + return true + } + + // Match node selector for requiredDuringSchedulingRequiredDuringExecution. + if nodeAffinity.RequiredDuringSchedulingRequiredDuringExecution != nil { + nodeSelectorTerms := nodeAffinity.RequiredDuringSchedulingRequiredDuringExecution.NodeSelectorTerms + glog.V(10).Infof("Match for RequiredDuringSchedulingRequiredDuringExecution node selector terms %+v", nodeSelectorTerms) + nodeAffinityMatches = NodeMatchesNodeSelectorTerms(node, nodeSelectorTerms) + } + + // Match node selector for requiredDuringSchedulingRequiredDuringExecution. + if nodeAffinity.RequiredDuringSchedulingIgnoredDuringExecution != nil { + nodeSelectorTerms := nodeAffinity.RequiredDuringSchedulingIgnoredDuringExecution.NodeSelectorTerms + glog.V(10).Infof("Match for RequiredDuringSchedulingIgnoredDuringExecution node selector terms %+v", nodeSelectorTerms) + nodeAffinityMatches = nodeAffinityMatches && NodeMatchesNodeSelectorTerms(node, nodeSelectorTerms) + } + + } + return nodeAffinityMatches } type NodeSelector struct { diff --git a/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go b/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go index f250cab61e8..217adce77eb 100644 --- a/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go +++ b/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go @@ -574,7 +574,395 @@ func TestPodFitsSelector(t *testing.T) { fits: false, test: "node labels are subset", }, + { + pod: &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Annotations: map[string]string{ + api.AffinityAnnotationKey: ` + {"nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [{ + "matchExpressions": [{ + "key": "foo", + "operator": "In", + "values": ["bar", "value2"] + }] + }] + }}}`, + }, + }, + }, + labels: map[string]string{ + "foo": "bar", + }, + fits: true, + test: "Pod with matchExpressions using In operator that matches the existing node", + }, + { + pod: &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Annotations: map[string]string{ + api.AffinityAnnotationKey: ` + {"nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [{ + "matchExpressions": [{ + "key": "kernel-version", + "operator": "Gt", + "values": ["2.4"] + }] + }] + }}}`, + }, + }, + }, + labels: map[string]string{ + "kernel-version": "2.6", + }, + fits: true, + test: "Pod with matchExpressions using Gt operator that matches the existing node", + }, + { + pod: &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Annotations: map[string]string{ + api.AffinityAnnotationKey: ` + {"nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [{ + "matchExpressions": [{ + "key": "mem-type", + "operator": "NotIn", + "values": ["DDR", "DDR2"] + }] + }] + }}}`, + }, + }, + }, + labels: map[string]string{ + "mem-type": "DDR3", + }, + fits: true, + test: "Pod with matchExpressions using NotIn operator that matches the existing node", + }, + { + pod: &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Annotations: map[string]string{ + api.AffinityAnnotationKey: ` + {"nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [{ + "matchExpressions": [{ + "key": "GPU", + "operator": "Exists" + }] + }] + }}}`, + }, + }, + }, + labels: map[string]string{ + "GPU": "NVIDIA-GRID-K1", + }, + fits: true, + test: "Pod with matchExpressions using Exists operator that matches the existing node", + }, + { + pod: &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Annotations: map[string]string{ + api.AffinityAnnotationKey: ` + {"nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [{ + "matchExpressions": [{ + "key": "foo", + "operator": "In", + "values": ["value1", "value2"] + }] + }] + }}}`, + }, + }, + }, + labels: map[string]string{ + "foo": "bar", + }, + fits: false, + test: "Pod with affinity that don't match node's labels won't schedule onto the node", + }, + { + pod: &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Annotations: map[string]string{ + api.AffinityAnnotationKey: ` + {"nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": null + }}}`, + }, + }, + }, + labels: map[string]string{ + "foo": "bar", + }, + fits: false, + test: "Pod with a nil []NodeSelectorTerm in affinity, can't match the node's labels and won't schedule onto the node", + }, + { + pod: &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Annotations: map[string]string{ + api.AffinityAnnotationKey: ` + {"nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [] + }}}`, + }, + }, + }, + labels: map[string]string{ + "foo": "bar", + }, + fits: false, + test: "Pod with an empty []NodeSelectorTerm in affinity, can't match the node's labels and won't schedule onto the node", + }, + { + pod: &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Annotations: map[string]string{ + api.AffinityAnnotationKey: ` + {"nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [{}, {}] + }}}`, + }, + }, + }, + labels: map[string]string{ + "foo": "bar", + }, + fits: false, + test: "Pod with invalid NodeSelectTerms in affinity will match no objects and won't schedule onto the node", + }, + { + pod: &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Annotations: map[string]string{ + api.AffinityAnnotationKey: ` + {"nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [{"matchExpressions": [{}]}] + }}}`, + }, + }, + }, + labels: map[string]string{ + "foo": "bar", + }, + fits: false, + test: "Pod with empty MatchExpressions is not a valid value will match no objects and won't schedule onto the node", + }, + { + pod: &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Annotations: map[string]string{ + "some-key": "some-value", + }, + }, + }, + labels: map[string]string{ + "foo": "bar", + }, + fits: true, + test: "Pod with no Affinity will schedule onto a node", + }, + { + pod: &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Annotations: map[string]string{ + api.AffinityAnnotationKey: ` + {"nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": null + }}`, + }, + }, + }, + labels: map[string]string{ + "foo": "bar", + }, + fits: true, + test: "Pod with Affinity but nil NodeSelector will schedule onto a node", + }, + { + pod: &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Annotations: map[string]string{ + api.AffinityAnnotationKey: ` + {"nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [{ + "matchExpressions": [{ + "key": "GPU", + "operator": "Exists" + }, { + "key": "GPU", + "operator": "NotIn", + "values": ["AMD", "INTER"] + }] + }] + }}}`, + }, + }, + }, + labels: map[string]string{ + "GPU": "NVIDIA-GRID-K1", + }, + fits: true, + test: "Pod with multiple matchExpressions ANDed that matches the existing node", + }, + { + pod: &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Annotations: map[string]string{ + api.AffinityAnnotationKey: ` + {"nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [{ + "matchExpressions": [{ + "key": "GPU", + "operator": "Exists" + }, { + "key": "GPU", + "operator": "In", + "values": ["AMD", "INTER"] + }] + }] + }}}`, + }, + }, + }, + labels: map[string]string{ + "GPU": "NVIDIA-GRID-K1", + }, + fits: false, + test: "Pod with multiple matchExpressions ANDed that doesn't match the existing node", + }, + { + pod: &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Annotations: map[string]string{ + api.AffinityAnnotationKey: ` + {"nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [ + { + "matchExpressions": [{ + "key": "foo", + "operator": "In", + "values": ["bar", "value2"] + }] + }, + { + "matchExpressions": [{ + "key": "diffkey", + "operator": "In", + "values": ["wrong", "value2"] + }] + } + ] + }}}`, + }, + }, + }, + labels: map[string]string{ + "foo": "bar", + }, + fits: true, + test: "Pod with multiple NodeSelectorTerms ORed in affinity, matches the node's labels and will schedule onto the node", + }, + { + pod: &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Annotations: map[string]string{ + api.AffinityAnnotationKey: ` + {"nodeAffinity": { + "requiredDuringSchedulingRequiredDuringExecution": { + "nodeSelectorTerms": [{ + "matchExpressions": [{ + "key": "foo", + "operator": "In", + "values": ["bar", "value2"] + }] + }] + }, + "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [{ + "matchExpressions": [{ + "key": "foo", + "operator": "NotIn", + "values": ["bar", "value2"] + }] + }] + } + }}`, + }, + }, + }, + labels: map[string]string{ + "foo": "bar", + }, + fits: false, + test: "Pod with an Affinity both requiredDuringSchedulingRequiredDuringExecution and " + + "requiredDuringSchedulingIgnoredDuringExecution indicated that don't match node's labels and won't schedule onto the node", + }, + { + pod: &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Annotations: map[string]string{ + api.AffinityAnnotationKey: ` + {"nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [{ + "matchExpressions": [{ + "key": "foo", + "operator": "Exists" + }] + }] + }}}`, + }, + }, + Spec: api.PodSpec{ + NodeSelector: map[string]string{ + "foo": "bar", + }, + }, + }, + labels: map[string]string{ + "foo": "bar", + }, + fits: true, + test: "Pod with an Affinity and a PodSpec.NodeSelector(the old thing that we are deprecating) " + + "both are satisfied, will schedule onto the node", + }, + { + pod: &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Annotations: map[string]string{ + api.AffinityAnnotationKey: ` + {"nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [{ + "matchExpressions": [{ + "key": "foo", + "operator": "Exists" + }] + }] + }}}`, + }, + }, + Spec: api.PodSpec{ + NodeSelector: map[string]string{ + "foo": "bar", + }, + }, + }, + labels: map[string]string{ + "foo": "barrrrrr", + }, + fits: false, + test: "Pod with an Affinity matches node's labels but the PodSpec.NodeSelector(the old thing that we are deprecating) " + + "is not satisfied, won't schedule onto the node", + }, } + for _, test := range tests { node := api.Node{ObjectMeta: api.ObjectMeta{Labels: test.labels}} diff --git a/plugin/pkg/scheduler/algorithm/priorities/node_affinity.go b/plugin/pkg/scheduler/algorithm/priorities/node_affinity.go new file mode 100644 index 00000000000..ced9d5a16c6 --- /dev/null +++ b/plugin/pkg/scheduler/algorithm/priorities/node_affinity.go @@ -0,0 +1,95 @@ +/* +Copyright 2015 The Kubernetes Authors All rights reserved. + +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 priorities + +import ( + "github.com/golang/glog" + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/labels" + "k8s.io/kubernetes/plugin/pkg/scheduler/algorithm" + schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api" +) + +type NodeAffinity struct { + nodeLister algorithm.NodeLister +} + +func NewNodeAffinityPriority(nodeLister algorithm.NodeLister) algorithm.PriorityFunction { + nodeAffinity := &NodeAffinity{ + nodeLister: nodeLister, + } + return nodeAffinity.CalculateNodeAffinityPriority +} + +// CalculateNodeAffinityPriority prioritizes nodes according to node affinity scheduling preferences +// indicated in PreferredDuringSchedulingIgnoredDuringExecution. Each time a node match a preferredSchedulingTerm, +// it will a get an add of preferredSchedulingTerm.Weight. Thus, the more preferredSchedulingTerms +// the node satisfies and the more the preferredSchedulingTerm that is satisfied weights, the higher +// score the node gets. +func (s *NodeAffinity) CalculateNodeAffinityPriority(pod *api.Pod, machinesToPods map[string][]*api.Pod, podLister algorithm.PodLister, nodeLister algorithm.NodeLister) (schedulerapi.HostPriorityList, error) { + + var maxCount int + counts := map[string]int{} + + nodes, err := nodeLister.List() + if err != nil { + return nil, err + } + + affinity, err := api.GetAffinityFromPodAnnotations(pod.Annotations) + if err != nil { + return nil, err + } + + // A nil element of PreferredDuringSchedulingIgnoredDuringExecution matches no objects. + // An element of PreferredDuringSchedulingIgnoredDuringExecution that refers to an + // empty PreferredSchedulingTerm matches all objects. + if affinity.NodeAffinity != nil && affinity.NodeAffinity.PreferredDuringSchedulingIgnoredDuringExecution != nil { + // Match PreferredDuringSchedulingIgnoredDuringExecution term by term. + for _, preferredSchedulingTerm := range affinity.NodeAffinity.PreferredDuringSchedulingIgnoredDuringExecution { + if preferredSchedulingTerm.Weight == 0 { + continue + } + + nodeSelector, err := api.NodeSelectorRequirementsAsSelector(preferredSchedulingTerm.Preference.MatchExpressions) + if err != nil { + return nil, err + } + + for _, node := range nodes.Items { + if nodeSelector.Matches(labels.Set(node.Labels)) { + counts[node.Name] += preferredSchedulingTerm.Weight + } + + if counts[node.Name] > maxCount { + maxCount = counts[node.Name] + } + } + } + } + + result := []schedulerapi.HostPriority{} + for _, node := range nodes.Items { + fScore := float64(0) + if maxCount > 0 { + fScore = 10 * (float64(counts[node.Name]) / float64(maxCount)) + } + result = append(result, schedulerapi.HostPriority{Host: node.Name, Score: int(fScore)}) + glog.V(10).Infof("%v -> %v: NodeAffinityPriority, Score: (%d)", pod.Name, node.Name, int(fScore)) + } + return result, nil +} diff --git a/plugin/pkg/scheduler/algorithm/priorities/node_affinity_test.go b/plugin/pkg/scheduler/algorithm/priorities/node_affinity_test.go new file mode 100644 index 00000000000..02343a8e8e7 --- /dev/null +++ b/plugin/pkg/scheduler/algorithm/priorities/node_affinity_test.go @@ -0,0 +1,167 @@ +/* +Copyright 2015 The Kubernetes Authors All rights reserved. + +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 priorities + +import ( + "reflect" + "testing" + + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/plugin/pkg/scheduler/algorithm" + schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api" +) + +func TestNodeAffinityPriority(t *testing.T) { + label1 := map[string]string{"foo": "bar"} + label2 := map[string]string{"key": "value"} + label3 := map[string]string{"az": "az1"} + label4 := map[string]string{"abc": "az11", "def": "az22"} + label5 := map[string]string{"foo": "bar", "key": "value", "az": "az1"} + + affinity1 := map[string]string{ + api.AffinityAnnotationKey: ` + {"nodeAffinity": {"preferredDuringSchedulingIgnoredDuringExecution": [ + { + "weight": 2, + "preference": { + "matchExpressions": [ + { + "key": "foo", + "operator": "In", "values": ["bar"] + } + ] + } + } + ]}}`, + } + + affinity2 := map[string]string{ + api.AffinityAnnotationKey: ` + {"nodeAffinity": {"preferredDuringSchedulingIgnoredDuringExecution": [ + { + "weight": 2, + "preference": {"matchExpressions": [ + { + "key": "foo", + "operator": "In", "values": ["bar"] + } + ]} + }, + { + "weight": 4, + "preference": {"matchExpressions": [ + { + "key": "key", + "operator": "In", "values": ["value"] + } + ]} + }, + { + "weight": 5, + "preference": {"matchExpressions": [ + { + "key": "foo", + "operator": "In", "values": ["bar"] + }, + { + "key": "key", + "operator": "In", "values": ["value"] + }, + { + "key": "az", + "operator": "In", "values": ["az1"] + } + ]} + } + ]}}`, + } + + tests := []struct { + pod *api.Pod + nodes []api.Node + expectedList schedulerapi.HostPriorityList + test string + }{ + { + pod: &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Annotations: map[string]string{}, + }, + }, + nodes: []api.Node{ + {ObjectMeta: api.ObjectMeta{Name: "machine1", Labels: label1}}, + {ObjectMeta: api.ObjectMeta{Name: "machine2", Labels: label2}}, + {ObjectMeta: api.ObjectMeta{Name: "machine3", Labels: label3}}, + }, + expectedList: []schedulerapi.HostPriority{{"machine1", 0}, {"machine2", 0}, {"machine3", 0}}, + test: "all machines are same priority as NodeAffinity is nil", + }, + { + pod: &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Annotations: affinity1, + }, + }, + nodes: []api.Node{ + {ObjectMeta: api.ObjectMeta{Name: "machine1", Labels: label4}}, + {ObjectMeta: api.ObjectMeta{Name: "machine2", Labels: label2}}, + {ObjectMeta: api.ObjectMeta{Name: "machine3", Labels: label3}}, + }, + expectedList: []schedulerapi.HostPriority{{"machine1", 0}, {"machine2", 0}, {"machine3", 0}}, + test: "no machine macthes preferred scheduling requirements in NodeAffinity of pod so all machines' priority is zero", + }, + { + pod: &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Annotations: affinity1, + }, + }, + nodes: []api.Node{ + {ObjectMeta: api.ObjectMeta{Name: "machine1", Labels: label1}}, + {ObjectMeta: api.ObjectMeta{Name: "machine2", Labels: label2}}, + {ObjectMeta: api.ObjectMeta{Name: "machine3", Labels: label3}}, + }, + expectedList: []schedulerapi.HostPriority{{"machine1", 10}, {"machine2", 0}, {"machine3", 0}}, + test: "only machine1 matches the preferred scheduling requirements of pod", + }, + { + pod: &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Annotations: affinity2, + }, + }, + nodes: []api.Node{ + {ObjectMeta: api.ObjectMeta{Name: "machine1", Labels: label1}}, + {ObjectMeta: api.ObjectMeta{Name: "machine5", Labels: label5}}, + {ObjectMeta: api.ObjectMeta{Name: "machine2", Labels: label2}}, + }, + expectedList: []schedulerapi.HostPriority{{"machine1", 1}, {"machine5", 10}, {"machine2", 3}}, + test: "all machines matches the preferred scheduling requirements of pod but with different priorities ", + }, + } + + for _, test := range tests { + nodeAffinity := NodeAffinity{nodeLister: algorithm.FakeNodeLister(api.NodeList{Items: test.nodes})} + list, err := nodeAffinity.CalculateNodeAffinityPriority(test.pod, nil, nil, algorithm.FakeNodeLister(api.NodeList{Items: test.nodes})) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if !reflect.DeepEqual(test.expectedList, list) { + t.Errorf("%s: \nexpected %#v, \ngot %#v", test.test, test.expectedList, list) + } + } +} diff --git a/plugin/pkg/scheduler/algorithmprovider/defaults/defaults.go b/plugin/pkg/scheduler/algorithmprovider/defaults/defaults.go index 7704dd4e260..edaf6747003 100644 --- a/plugin/pkg/scheduler/algorithmprovider/defaults/defaults.go +++ b/plugin/pkg/scheduler/algorithmprovider/defaults/defaults.go @@ -99,5 +99,14 @@ func defaultPriorities() sets.String { Weight: 1, }, ), + factory.RegisterPriorityConfigFactory( + "NodeAffinityPriority", + factory.PriorityConfigFactory{ + Function: func(args factory.PluginFactoryArgs) algorithm.PriorityFunction { + return priorities.NewNodeAffinityPriority(args.NodeLister) + }, + Weight: 1, + }, + ), ) } diff --git a/test/e2e/scheduler_predicates.go b/test/e2e/scheduler_predicates.go index dbae84a92d3..3807af75d0e 100644 --- a/test/e2e/scheduler_predicates.go +++ b/test/e2e/scheduler_predicates.go @@ -18,9 +18,11 @@ package e2e import ( "fmt" + "path/filepath" "time" "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/unversioned" client "k8s.io/kubernetes/pkg/client/unversioned" @@ -29,6 +31,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" + _ "github.com/stretchr/testify/assert" ) // Returns a number of currently scheduled and not scheduled Pods. @@ -392,6 +395,49 @@ var _ = Describe("SchedulerPredicates [Serial]", func() { cleanupPods(c, ns) }) + It("validates that a pod with an invalid Affinity is rejected [Conformance]", func() { + + By("Trying to launch a pod with an invalid Affinity data.") + podName := "without-label" + _, err := c.Pods(ns).Create(&api.Pod{ + TypeMeta: unversioned.TypeMeta{ + Kind: "Pod", + }, + ObjectMeta: api.ObjectMeta{ + Name: podName, + Annotations: map[string]string{ + api.AffinityAnnotationKey: ` + {"nodeAffinity": { + "requiredDuringSchedulingRequiredDuringExecution": { + "nodeSelectorTerms": [{ + "matchExpressions": [] + }] + }, + }}`, + }, + }, + Spec: api.PodSpec{ + Containers: []api.Container{ + { + Name: podName, + Image: "gcr.io/google_containers/pause:2.0", + }, + }, + }, + }) + + if err == nil || !errors.IsInvalid(err) { + Failf("Expect error of invalid, got : %v", err) + } + + // Wait a bit to allow scheduler to do its thing if the pod is not rejected. + // TODO: this is brittle; there's no guarantee the scheduler will have run in 10 seconds. + Logf("Sleeping 10 seconds and crossing our fingers that scheduler will run in that time.") + time.Sleep(10 * time.Second) + + cleanupPods(c, ns) + }) + It("validates that NodeSelector is respected if matching [Conformance]", func() { // launch a pod to find a node which can launch a pod. We intentionally do // not just take the node list and choose the first of them. Depending on the @@ -470,4 +516,217 @@ var _ = Describe("SchedulerPredicates [Serial]", func() { expectNoError(err) Expect(labelPod.Spec.NodeName).To(Equal(nodeName)) }) + + // Test Nodes does not have any label, hence it should be impossible to schedule Pod with + // non-nil NodeAffinity.RequiredDuringSchedulingIgnoredDuringExecution. + It("validates that NodeAffinity is respected if not matching [Conformance]", func() { + By("Trying to schedule Pod with nonempty NodeSelector.") + podName := "restricted-pod" + + waitForStableCluster(c) + + _, err := c.Pods(ns).Create(&api.Pod{ + TypeMeta: unversioned.TypeMeta{ + Kind: "Pod", + }, + ObjectMeta: api.ObjectMeta{ + Name: podName, + Labels: map[string]string{"name": "restricted"}, + Annotations: map[string]string{ + "scheduler.alpha.kubernetes.io/affinity": ` + {"nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [ + { + "matchExpressions": [{ + "key": "foo", + "operator": "In", + "values": ["bar", "value2"] + }] + }, + { + "matchExpressions": [{ + "key": "diffkey", + "operator": "In", + "values": ["wrong", "value2"] + }] + } + ] + }}}`, + }, + }, + Spec: api.PodSpec{ + Containers: []api.Container{ + { + Name: podName, + Image: "gcr.io/google_containers/pause:2.0", + }, + }, + }, + }) + expectNoError(err) + // Wait a bit to allow scheduler to do its thing + // TODO: this is brittle; there's no guarantee the scheduler will have run in 10 seconds. + Logf("Sleeping 10 seconds and crossing our fingers that scheduler will run in that time.") + time.Sleep(10 * time.Second) + + verifyResult(c, podName, ns) + cleanupPods(c, ns) + }) + + // Keep the same steps with the test on NodeSelector, + // but specify Affinity in Pod.Annotations, instead of NodeSelector. + It("validates that required NodeAffinity setting is respected if matching [Conformance]", func() { + // launch a pod to find a node which can launch a pod. We intentionally do + // not just take the node list and choose the first of them. Depending on the + // cluster and the scheduler it might be that a "normal" pod cannot be + // scheduled onto it. + By("Trying to launch a pod without a label to get a node which can launch it.") + podName := "without-label" + _, err := c.Pods(ns).Create(&api.Pod{ + TypeMeta: unversioned.TypeMeta{ + Kind: "Pod", + }, + ObjectMeta: api.ObjectMeta{ + Name: podName, + }, + Spec: api.PodSpec{ + Containers: []api.Container{ + { + Name: podName, + Image: "gcr.io/google_containers/pause:2.0", + }, + }, + }, + }) + expectNoError(err) + expectNoError(waitForPodRunningInNamespace(c, podName, ns)) + pod, err := c.Pods(ns).Get(podName) + expectNoError(err) + + nodeName := pod.Spec.NodeName + err = c.Pods(ns).Delete(podName, api.NewDeleteOptions(0)) + expectNoError(err) + + By("Trying to apply a random label on the found node.") + k := fmt.Sprintf("kubernetes.io/e2e-%s", string(util.NewUUID())) + v := "42" + patch := fmt.Sprintf(`{"metadata":{"labels":{"%s":"%s"}}}`, k, v) + err = c.Patch(api.MergePatchType).Resource("nodes").Name(nodeName).Body([]byte(patch)).Do().Error() + expectNoError(err) + + node, err := c.Nodes().Get(nodeName) + expectNoError(err) + Expect(node.Labels[k]).To(Equal(v)) + + By("Trying to relaunch the pod, now with labels.") + labelPodName := "with-labels" + _, err = c.Pods(ns).Create(&api.Pod{ + TypeMeta: unversioned.TypeMeta{ + Kind: "Pod", + }, + ObjectMeta: api.ObjectMeta{ + Name: labelPodName, + Annotations: map[string]string{ + "scheduler.alpha.kubernetes.io/affinity": ` + {"nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [ + { + "matchExpressions": [{ + "key": "kubernetes.io/hostname", + "operator": "In", + "values": ["` + nodeName + `"] + },{ + "key": "` + k + `", + "operator": "In", + "values": ["` + v + `"] + }] + } + ] + }}}`, + }, + }, + Spec: api.PodSpec{ + Containers: []api.Container{ + { + Name: labelPodName, + Image: "gcr.io/google_containers/pause:2.0", + }, + }, + }, + }) + expectNoError(err) + defer c.Pods(ns).Delete(labelPodName, api.NewDeleteOptions(0)) + + // check that pod got scheduled. We intentionally DO NOT check that the + // pod is running because this will create a race condition with the + // kubelet and the scheduler: the scheduler might have scheduled a pod + // already when the kubelet does not know about its new label yet. The + // kubelet will then refuse to launch the pod. + expectNoError(waitForPodNotPending(c, ns, labelPodName)) + labelPod, err := c.Pods(ns).Get(labelPodName) + expectNoError(err) + Expect(labelPod.Spec.NodeName).To(Equal(nodeName)) + }) + + // Verify that an escaped JSON string of NodeAffinity in a YAML PodSpec works. + It("validates that embedding the JSON NodeAffinity setting as a string in the annotation value work [Conformance]", func() { + // launch a pod to find a node which can launch a pod. We intentionally do + // not just take the node list and choose the first of them. Depending on the + // cluster and the scheduler it might be that a "normal" pod cannot be + // scheduled onto it. + By("Trying to launch a pod without a label to get a node which can launch it.") + podName := "without-label" + _, err := c.Pods(ns).Create(&api.Pod{ + TypeMeta: unversioned.TypeMeta{ + Kind: "Pod", + }, + ObjectMeta: api.ObjectMeta{ + Name: podName, + }, + Spec: api.PodSpec{ + Containers: []api.Container{ + { + Name: podName, + Image: "gcr.io/google_containers/pause:2.0", + }, + }, + }, + }) + expectNoError(err) + expectNoError(waitForPodRunningInNamespace(c, podName, ns)) + pod, err := c.Pods(ns).Get(podName) + expectNoError(err) + + nodeName := pod.Spec.NodeName + err = c.Pods(ns).Delete(podName, api.NewDeleteOptions(0)) + expectNoError(err) + + By("Trying to apply a label with fake az info on the found node.") + k := "kubernetes.io/e2e-az-name" + v := "e2e-az1" + patch := fmt.Sprintf(`{"metadata":{"labels":{"%s":"%s"}}}`, k, v) + err = c.Patch(api.MergePatchType).Resource("nodes").Name(nodeName).Body([]byte(patch)).Do().Error() + expectNoError(err) + + node, err := c.Nodes().Get(nodeName) + expectNoError(err) + Expect(node.Labels[k]).To(Equal(v)) + + By("Trying to launch a pod that with NodeAffinity setting as embedded JSON string in the annotation value.") + labelPodName := "with-labels" + nodeSelectionRoot := filepath.Join(testContext.RepoRoot, "docs/user-guide/node-selection") + testPodPath := filepath.Join(nodeSelectionRoot, "pod-with-node-affinity.yaml") + runKubectlOrDie("create", "-f", testPodPath, fmt.Sprintf("--namespace=%v", ns)) + defer c.Pods(ns).Delete(labelPodName, api.NewDeleteOptions(0)) + + // check that pod got scheduled. We intentionally DO NOT check that the + // pod is running because this will create a race condition with the + // kubelet and the scheduler: the scheduler might have scheduled a pod + // already when the kubelet does not know about its new label yet. The + // kubelet will then refuse to launch the pod. + expectNoError(waitForPodNotPending(c, ns, labelPodName)) + labelPod, err := c.Pods(ns).Get(labelPodName) + expectNoError(err) + Expect(labelPod.Spec.NodeName).To(Equal(nodeName)) + }) }) From 24b06d805a575ea2795d8982c2e8422ae8b70f47 Mon Sep 17 00:00:00 2001 From: Warren Strange Date: Wed, 3 Feb 2016 19:34:27 -0700 Subject: [PATCH 138/328] Add preemtible option to master --- cluster/gce/config-default.sh | 2 ++ cluster/gce/config-test.sh | 2 ++ cluster/gce/coreos/helper.sh | 8 +++++++- cluster/gce/debian/helper.sh | 7 ++++++- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/cluster/gce/config-default.sh b/cluster/gce/config-default.sh index 4e4a08d9079..d0a989deb79 100755 --- a/cluster/gce/config-default.sh +++ b/cluster/gce/config-default.sh @@ -27,6 +27,8 @@ NODE_DISK_TYPE=${NODE_DISK_TYPE:-pd-standard} NODE_DISK_SIZE=${NODE_DISK_SIZE:-100GB} REGISTER_MASTER_KUBELET=${REGISTER_MASTER:-true} PREEMPTIBLE_NODE=${PREEMPTIBLE_NODE:-false} +PREEMPTIBLE_MASTER=${PREEMPTIBLE_MASTER:-false} + OS_DISTRIBUTION=${KUBE_OS_DISTRIBUTION:-debian} MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-container-vm-v20160127} diff --git a/cluster/gce/config-test.sh b/cluster/gce/config-test.sh index df1d359a657..65396e91ee7 100755 --- a/cluster/gce/config-test.sh +++ b/cluster/gce/config-test.sh @@ -28,6 +28,8 @@ NODE_DISK_SIZE=${NODE_DISK_SIZE:-100GB} REGISTER_MASTER_KUBELET=${REGISTER_MASTER:-false} KUBE_APISERVER_REQUEST_TIMEOUT=300 PREEMPTIBLE_NODE=${PREEMPTIBLE_NODE:-false} +PREEMPTIBLE_MASTER=${PREEMPTIBLE_MASTER:-false} + OS_DISTRIBUTION=${KUBE_OS_DISTRIBUTION:-debian} MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-container-vm-v20160127} diff --git a/cluster/gce/coreos/helper.sh b/cluster/gce/coreos/helper.sh index 15bd768194c..78aa002cfcc 100755 --- a/cluster/gce/coreos/helper.sh +++ b/cluster/gce/coreos/helper.sh @@ -46,6 +46,11 @@ function create-master-instance() { local address_opt="" [[ -n ${1:-} ]] && address_opt="--address ${1}" + local preemptible_master="" + if [[ "${PREEMPTIBLE_MASTER}" == "true" ]]; then + preemptible_master="--preemptible --maintenance-policy TERMINATE" + fi + write-master-env gcloud compute instances create "${MASTER_NAME}" \ ${address_opt} \ @@ -60,5 +65,6 @@ function create-master-instance() { --can-ip-forward \ --metadata-from-file \ "kube-env=${KUBE_TEMP}/master-kube-env.yaml,user-data=${KUBE_ROOT}/cluster/gce/coreos/master.yaml,configure-node=${KUBE_ROOT}/cluster/gce/coreos/configure-node.sh,configure-kubelet=${KUBE_ROOT}/cluster/gce/coreos/configure-kubelet.sh" \ - --disk "name=${MASTER_NAME}-pd,device-name=master-pd,mode=rw,boot=no,auto-delete=no" + --disk "name=${MASTER_NAME}-pd,device-name=master-pd,mode=rw,boot=no,auto-delete=no" \ + ${preemptible_master} } diff --git a/cluster/gce/debian/helper.sh b/cluster/gce/debian/helper.sh index 32a90f1cc10..71d5418f18c 100755 --- a/cluster/gce/debian/helper.sh +++ b/cluster/gce/debian/helper.sh @@ -33,6 +33,10 @@ function create-master-instance { local address_opt="" [[ -n ${1:-} ]] && address_opt="--address ${1}" + local preemptible_master="" + if [[ "${PREEMPTIBLE_MASTER}" == "true" ]]; then + preemptible_master="--preemptible --maintenance-policy TERMINATE" + fi write-master-env gcloud compute instances create "${MASTER_NAME}" \ @@ -48,7 +52,8 @@ function create-master-instance { --can-ip-forward \ --metadata-from-file \ "startup-script=${KUBE_ROOT}/cluster/gce/configure-vm.sh,kube-env=${KUBE_TEMP}/master-kube-env.yaml" \ - --disk "name=${MASTER_NAME}-pd,device-name=master-pd,mode=rw,boot=no,auto-delete=no" + --disk "name=${MASTER_NAME}-pd,device-name=master-pd,mode=rw,boot=no,auto-delete=no" \ + ${preemptible_master} } # $1: template name (required) From 2d701e8ac807979d6be2ffd03852ed793e335255 Mon Sep 17 00:00:00 2001 From: magicwang-cn Date: Thu, 4 Feb 2016 11:07:00 +0800 Subject: [PATCH 139/328] bug fix in unversion request --- pkg/client/unversioned/request.go | 1 + pkg/client/unversioned/request_test.go | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pkg/client/unversioned/request.go b/pkg/client/unversioned/request.go index 3789cdccd2a..7f0bc185c04 100644 --- a/pkg/client/unversioned/request.go +++ b/pkg/client/unversioned/request.go @@ -642,6 +642,7 @@ func (r *Request) Watch() (watch.Interface, error) { return nil, err } if resp.StatusCode != http.StatusOK { + defer resp.Body.Close() if result := r.transformResponse(resp, req); result.err != nil { return nil, result.err } diff --git a/pkg/client/unversioned/request_test.go b/pkg/client/unversioned/request_test.go index e0823a7909d..2b5bf6d2977 100644 --- a/pkg/client/unversioned/request_test.go +++ b/pkg/client/unversioned/request_test.go @@ -477,7 +477,10 @@ func TestRequestWatch(t *testing.T) { Request: &Request{ content: ContentConfig{GroupVersion: testapi.Default.GroupVersion(), Codec: testapi.Default.Codec()}, client: clientFunc(func(req *http.Request) (*http.Response, error) { - return &http.Response{StatusCode: http.StatusForbidden}, nil + return &http.Response{ + StatusCode: http.StatusForbidden, + Body: ioutil.NopCloser(bytes.NewReader([]byte{})), + }, nil }), baseURL: &url.URL{}, }, @@ -490,7 +493,10 @@ func TestRequestWatch(t *testing.T) { Request: &Request{ content: ContentConfig{GroupVersion: testapi.Default.GroupVersion(), Codec: testapi.Default.Codec()}, client: clientFunc(func(req *http.Request) (*http.Response, error) { - return &http.Response{StatusCode: http.StatusUnauthorized}, nil + return &http.Response{ + StatusCode: http.StatusUnauthorized, + Body: ioutil.NopCloser(bytes.NewReader([]byte{})), + }, nil }), baseURL: &url.URL{}, }, From f9b96d2c71fb44c31ce6628d919a975a0b81f3cd Mon Sep 17 00:00:00 2001 From: Prashanth Balasubramanian Date: Wed, 3 Feb 2016 19:19:59 -0800 Subject: [PATCH 140/328] Make sure at least one interrupt is buffered before dropping. --- pkg/proxy/config/config.go | 12 ++++++++++-- pkg/proxy/config/config_test.go | 5 +++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/pkg/proxy/config/config.go b/pkg/proxy/config/config.go index e1d1e1523f8..2181ca93f78 100644 --- a/pkg/proxy/config/config.go +++ b/pkg/proxy/config/config.go @@ -82,7 +82,11 @@ type EndpointsConfig struct { // NewEndpointsConfig creates a new EndpointsConfig. // It immediately runs the created EndpointsConfig. func NewEndpointsConfig() *EndpointsConfig { - updates := make(chan struct{}) + // The updates channel is used to send interrupts to the Endpoints handler. + // It's buffered because we never want to block for as long as there is a + // pending interrupt, but don't want to drop them if the handler is doing + // work. + updates := make(chan struct{}, 1) store := &endpointsStore{updates: updates, endpoints: make(map[string]map[types.NamespacedName]api.Endpoints)} mux := config.NewMux(store) bcaster := config.NewBroadcaster() @@ -187,7 +191,11 @@ type ServiceConfig struct { // NewServiceConfig creates a new ServiceConfig. // It immediately runs the created ServiceConfig. func NewServiceConfig() *ServiceConfig { - updates := make(chan struct{}) + // The updates channel is used to send interrupts to the Services handler. + // It's buffered because we never want to block for as long as there is a + // pending interrupt, but don't want to drop them if the handler is doing + // work. + updates := make(chan struct{}, 1) store := &serviceStore{updates: updates, services: make(map[string]map[types.NamespacedName]api.Service)} mux := config.NewMux(store) bcaster := config.NewBroadcaster() diff --git a/pkg/proxy/config/config_test.go b/pkg/proxy/config/config_test.go index fdd3a7385a7..43e69d3bab7 100644 --- a/pkg/proxy/config/config_test.go +++ b/pkg/proxy/config/config_test.go @@ -348,3 +348,8 @@ func TestNewMultipleSourcesEndpointsMultipleHandlersAddRemoveSetAndNotified(t *t handler.ValidateEndpoints(t, endpoints) handler2.ValidateEndpoints(t, endpoints) } + +// TODO: Add a unittest for interrupts getting processed in a timely manner. +// Currently this module has a circular dependency with config, and so it's +// named config_test, which means even test methods need to be public. This +// is refactoring that we can avoid by resolving the dependency. From 714d12cf724191547330ff50a4878510fb74570e Mon Sep 17 00:00:00 2001 From: AdoHe Date: Thu, 4 Feb 2016 02:08:44 -0500 Subject: [PATCH 141/328] kubectl add show-labels flag to make it more readable --- contrib/completions/bash/kubectl | 9 ++ docs/man/man1/kubectl-annotate.1 | 4 + docs/man/man1/kubectl-autoscale.1 | 4 + docs/man/man1/kubectl-config-view.1 | 4 + docs/man/man1/kubectl-convert.1 | 4 + docs/man/man1/kubectl-expose.1 | 4 + docs/man/man1/kubectl-get.1 | 4 + docs/man/man1/kubectl-label.1 | 4 + docs/man/man1/kubectl-rolling-update.1 | 4 + docs/man/man1/kubectl-run.1 | 4 + docs/user-guide/kubectl/kubectl_annotate.md | 1 + docs/user-guide/kubectl/kubectl_autoscale.md | 1 + .../user-guide/kubectl/kubectl_config_view.md | 1 + docs/user-guide/kubectl/kubectl_convert.md | 3 +- docs/user-guide/kubectl/kubectl_expose.md | 1 + docs/user-guide/kubectl/kubectl_get.md | 3 +- docs/user-guide/kubectl/kubectl_label.md | 1 + .../kubectl/kubectl_rolling-update.md | 3 +- docs/user-guide/kubectl/kubectl_run.md | 1 + hack/verify-flags/known-flags.txt | 1 + pkg/kubectl/cmd/cmd_test.go | 53 ++++++- pkg/kubectl/cmd/delete.go | 2 +- pkg/kubectl/cmd/get.go | 2 +- pkg/kubectl/cmd/label.go | 2 +- pkg/kubectl/cmd/util/factory.go | 8 +- pkg/kubectl/cmd/util/printing.go | 1 + pkg/kubectl/resource_printer.go | 149 ++++++++++++++---- pkg/kubectl/resource_printer_test.go | 88 +++++++++-- 28 files changed, 306 insertions(+), 60 deletions(-) diff --git a/contrib/completions/bash/kubectl b/contrib/completions/bash/kubectl index 69a4e98ca16..f4a362c51d1 100644 --- a/contrib/completions/bash/kubectl +++ b/contrib/completions/bash/kubectl @@ -282,6 +282,7 @@ _kubectl_get() two_word_flags+=("-l") flags+=("--show-all") flags+=("-a") + flags+=("--show-labels") flags+=("--sort-by=") flags+=("--template=") two_word_flags+=("-t") @@ -1058,6 +1059,7 @@ _kubectl_rolling-update() flags+=("--schema-cache-dir=") flags+=("--show-all") flags+=("-a") + flags+=("--show-labels") flags+=("--sort-by=") flags+=("--template=") two_word_flags+=("-t") @@ -1494,6 +1496,7 @@ _kubectl_run() flags+=("--service-overrides=") flags+=("--show-all") flags+=("-a") + flags+=("--show-labels") flags+=("--sort-by=") flags+=("--stdin") flags+=("-i") @@ -1568,6 +1571,7 @@ _kubectl_expose() flags+=("--session-affinity=") flags+=("--show-all") flags+=("-a") + flags+=("--show-labels") flags+=("--sort-by=") flags+=("--target-port=") flags+=("--template=") @@ -1632,6 +1636,7 @@ _kubectl_autoscale() flags+=("--save-config") flags+=("--show-all") flags+=("-a") + flags+=("--show-labels") flags+=("--sort-by=") flags+=("--template=") two_word_flags+=("-t") @@ -1919,6 +1924,7 @@ _kubectl_label() two_word_flags+=("-l") flags+=("--show-all") flags+=("-a") + flags+=("--show-labels") flags+=("--sort-by=") flags+=("--template=") two_word_flags+=("-t") @@ -2001,6 +2007,7 @@ _kubectl_annotate() two_word_flags+=("-l") flags+=("--show-all") flags+=("-a") + flags+=("--show-labels") flags+=("--sort-by=") flags+=("--template=") two_word_flags+=("-t") @@ -2053,6 +2060,7 @@ _kubectl_config_view() flags+=("--raw") flags+=("--show-all") flags+=("-a") + flags+=("--show-labels") flags+=("--sort-by=") flags+=("--template=") two_word_flags+=("-t") @@ -2589,6 +2597,7 @@ _kubectl_convert() flags+=("--schema-cache-dir=") flags+=("--show-all") flags+=("-a") + flags+=("--show-labels") flags+=("--sort-by=") flags+=("--template=") two_word_flags+=("-t") diff --git a/docs/man/man1/kubectl-annotate.1 b/docs/man/man1/kubectl-annotate.1 index 3ff4336f227..6794d734a2a 100644 --- a/docs/man/man1/kubectl-annotate.1 +++ b/docs/man/man1/kubectl-annotate.1 @@ -71,6 +71,10 @@ horizontalpodautoscalers (hpa), resourcequotas (quota) or secrets. \fB\-a\fP, \fB\-\-show\-all\fP=false When printing, show all resources (default hide terminated pods.) +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + .PP \fB\-\-sort\-by\fP="" If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string. diff --git a/docs/man/man1/kubectl-autoscale.1 b/docs/man/man1/kubectl-autoscale.1 index 867e4471b46..33c5868975d 100644 --- a/docs/man/man1/kubectl-autoscale.1 +++ b/docs/man/man1/kubectl-autoscale.1 @@ -75,6 +75,10 @@ An autoscaler can automatically increase or decrease number of pods deployed wit \fB\-a\fP, \fB\-\-show\-all\fP=false When printing, show all resources (default hide terminated pods.) +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + .PP \fB\-\-sort\-by\fP="" If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string. diff --git a/docs/man/man1/kubectl-config-view.1 b/docs/man/man1/kubectl-config-view.1 index 2ac3848213f..1446c90fa44 100644 --- a/docs/man/man1/kubectl-config-view.1 +++ b/docs/man/man1/kubectl-config-view.1 @@ -54,6 +54,10 @@ You can use \-\-output jsonpath={...} to extract specific values using a jsonpat \fB\-a\fP, \fB\-\-show\-all\fP=false When printing, show all resources (default hide terminated pods.) +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + .PP \fB\-\-sort\-by\fP="" If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string. diff --git a/docs/man/man1/kubectl-convert.1 b/docs/man/man1/kubectl-convert.1 index bae38580fbc..c0aebad0a9e 100644 --- a/docs/man/man1/kubectl-convert.1 +++ b/docs/man/man1/kubectl-convert.1 @@ -57,6 +57,10 @@ to change to output destination. \fB\-a\fP, \fB\-\-show\-all\fP=false When printing, show all resources (default hide terminated pods.) +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + .PP \fB\-\-sort\-by\fP="" If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string. diff --git a/docs/man/man1/kubectl-expose.1 b/docs/man/man1/kubectl-expose.1 index 6865f091b7a..5274cce775a 100644 --- a/docs/man/man1/kubectl-expose.1 +++ b/docs/man/man1/kubectl-expose.1 @@ -105,6 +105,10 @@ the new service will re\-use the labels from the resource it exposes. \fB\-a\fP, \fB\-\-show\-all\fP=false When printing, show all resources (default hide terminated pods.) +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + .PP \fB\-\-sort\-by\fP="" If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string. diff --git a/docs/man/man1/kubectl-get.1 b/docs/man/man1/kubectl-get.1 index 0c517589e5a..ba518037c5e 100644 --- a/docs/man/man1/kubectl-get.1 +++ b/docs/man/man1/kubectl-get.1 @@ -66,6 +66,10 @@ of the \-\-template flag, you can filter the attributes of the fetched resource( \fB\-a\fP, \fB\-\-show\-all\fP=false When printing, show all resources (default hide terminated pods.) +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + .PP \fB\-\-sort\-by\fP="" If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string. diff --git a/docs/man/man1/kubectl-label.1 b/docs/man/man1/kubectl-label.1 index ea14efdac4f..9f2c7c5c4a0 100644 --- a/docs/man/man1/kubectl-label.1 +++ b/docs/man/man1/kubectl-label.1 @@ -68,6 +68,10 @@ If \-\-resource\-version is specified, then updates will use this resource versi \fB\-a\fP, \fB\-\-show\-all\fP=false When printing, show all resources (default hide terminated pods.) +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + .PP \fB\-\-sort\-by\fP="" If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string. diff --git a/docs/man/man1/kubectl-rolling-update.1 b/docs/man/man1/kubectl-rolling-update.1 index f492d35fbe5..8e9a245c31a 100644 --- a/docs/man/man1/kubectl-rolling-update.1 +++ b/docs/man/man1/kubectl-rolling-update.1 @@ -72,6 +72,10 @@ existing replication controller and overwrite at least one (common) label in its \fB\-a\fP, \fB\-\-show\-all\fP=false When printing, show all resources (default hide terminated pods.) +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + .PP \fB\-\-sort\-by\fP="" If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string. diff --git a/docs/man/man1/kubectl-run.1 b/docs/man/man1/kubectl-run.1 index 9131f717d05..6ea50079706 100644 --- a/docs/man/man1/kubectl-run.1 +++ b/docs/man/man1/kubectl-run.1 @@ -120,6 +120,10 @@ Creates a replication controller or job to manage the created container(s). \fB\-a\fP, \fB\-\-show\-all\fP=false When printing, show all resources (default hide terminated pods.) +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + .PP \fB\-\-sort\-by\fP="" If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string. diff --git a/docs/user-guide/kubectl/kubectl_annotate.md b/docs/user-guide/kubectl/kubectl_annotate.md index 5812ff4b6bd..b7b273deb49 100644 --- a/docs/user-guide/kubectl/kubectl_annotate.md +++ b/docs/user-guide/kubectl/kubectl_annotate.md @@ -92,6 +92,7 @@ $ kubectl annotate pods foo description- --resource-version="": If non-empty, the annotation update will only succeed if this is the current resource-version for the object. Only valid when specifying a single resource. -l, --selector="": Selector (label query) to filter on -a, --show-all[=false]: When printing, show all resources (default hide terminated pods.) + --show-labels[=false]: When printing, show all labels as the last column (default hide labels column) --sort-by="": If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string. --template="": Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. ``` diff --git a/docs/user-guide/kubectl/kubectl_autoscale.md b/docs/user-guide/kubectl/kubectl_autoscale.md index 61c0ff530e2..ade072cef5f 100644 --- a/docs/user-guide/kubectl/kubectl_autoscale.md +++ b/docs/user-guide/kubectl/kubectl_autoscale.md @@ -74,6 +74,7 @@ $ kubectl autoscale rc foo --max=5 --cpu-percent=80 --record[=false]: Record current kubectl command in the resource annotation. --save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future. -a, --show-all[=false]: When printing, show all resources (default hide terminated pods.) + --show-labels[=false]: When printing, show all labels as the last column (default hide labels column) --sort-by="": If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string. --template="": Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. ``` diff --git a/docs/user-guide/kubectl/kubectl_config_view.md b/docs/user-guide/kubectl/kubectl_config_view.md index db1a1adac61..bf9c8a995c0 100644 --- a/docs/user-guide/kubectl/kubectl_config_view.md +++ b/docs/user-guide/kubectl/kubectl_config_view.md @@ -68,6 +68,7 @@ $ kubectl config view -o jsonpath='{.users[?(@.name == "e2e")].user.password}' --output-version="": Output the formatted object with the given version (default api-version). --raw[=false]: display raw byte data -a, --show-all[=false]: When printing, show all resources (default hide terminated pods.) + --show-labels[=false]: When printing, show all labels as the last column (default hide labels column) --sort-by="": If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string. --template="": Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. ``` diff --git a/docs/user-guide/kubectl/kubectl_convert.md b/docs/user-guide/kubectl/kubectl_convert.md index e048ab4536f..d83a39d6c43 100644 --- a/docs/user-guide/kubectl/kubectl_convert.md +++ b/docs/user-guide/kubectl/kubectl_convert.md @@ -74,6 +74,7 @@ $ kubectl convert -f . | kubectl create -f - --output-version="": Output the formatted object with the given version (default api-version). --schema-cache-dir="~/.kube/schema": If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema' -a, --show-all[=false]: When printing, show all resources (default hide terminated pods.) + --show-labels[=false]: When printing, show all labels as the last column (default hide labels column) --sort-by="": If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string. --template="": Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. --validate[=true]: If true, use a schema to validate the input before sending it @@ -111,7 +112,7 @@ $ kubectl convert -f . | kubectl create -f - * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 24-Nov-2015 +###### Auto generated by spf13/cobra on 20-Jan-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_convert.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_expose.md b/docs/user-guide/kubectl/kubectl_expose.md index 79e524157db..4d6e1d66d0e 100644 --- a/docs/user-guide/kubectl/kubectl_expose.md +++ b/docs/user-guide/kubectl/kubectl_expose.md @@ -91,6 +91,7 @@ $ kubectl expose rc streamer --port=4100 --protocol=udp --name=video-stream --selector="": A label selector to use for this service. If empty (the default) infer the selector from the replication controller. --session-affinity="": If non-empty, set the session affinity for the service to this; legal values: 'None', 'ClientIP' -a, --show-all[=false]: When printing, show all resources (default hide terminated pods.) + --show-labels[=false]: When printing, show all labels as the last column (default hide labels column) --sort-by="": If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string. --target-port="": Name or number for the port on the container that the service should direct traffic to. Optional. --template="": Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. diff --git a/docs/user-guide/kubectl/kubectl_get.md b/docs/user-guide/kubectl/kubectl_get.md index 25f21b8720f..29c202fa300 100644 --- a/docs/user-guide/kubectl/kubectl_get.md +++ b/docs/user-guide/kubectl/kubectl_get.md @@ -94,6 +94,7 @@ $ kubectl get rc/web service/frontend pods/web-pod-13je7 --output-version="": Output the formatted object with the given version (default api-version). -l, --selector="": Selector (label query) to filter on -a, --show-all[=false]: When printing, show all resources (default hide terminated pods.) + --show-labels[=false]: When printing, show all labels as the last column (default hide labels column) --sort-by="": If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string. --template="": Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. -w, --watch[=false]: After listing/getting the requested object, watch for changes. @@ -132,7 +133,7 @@ $ kubectl get rc/web service/frontend pods/web-pod-13je7 * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 22-Dec-2015 +###### Auto generated by spf13/cobra on 20-Jan-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_get.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_label.md b/docs/user-guide/kubectl/kubectl_label.md index 9455fff8e22..31d250e0b9c 100644 --- a/docs/user-guide/kubectl/kubectl_label.md +++ b/docs/user-guide/kubectl/kubectl_label.md @@ -86,6 +86,7 @@ $ kubectl label pods foo bar- --resource-version="": If non-empty, the labels update will only succeed if this is the current resource-version for the object. Only valid when specifying a single resource. -l, --selector="": Selector (label query) to filter on -a, --show-all[=false]: When printing, show all resources (default hide terminated pods.) + --show-labels[=false]: When printing, show all labels as the last column (default hide labels column) --sort-by="": If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string. --template="": Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. ``` diff --git a/docs/user-guide/kubectl/kubectl_rolling-update.md b/docs/user-guide/kubectl/kubectl_rolling-update.md index 65fa08d3267..4c3889555bd 100644 --- a/docs/user-guide/kubectl/kubectl_rolling-update.md +++ b/docs/user-guide/kubectl/kubectl_rolling-update.md @@ -85,6 +85,7 @@ $ kubectl rolling-update frontend-v1 frontend-v2 --rollback --rollback[=false]: If true, this is a request to abort an existing rollout that is partially rolled out. It effectively reverses current and next and runs a rollout --schema-cache-dir="~/.kube/schema": If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema' -a, --show-all[=false]: When printing, show all resources (default hide terminated pods.) + --show-labels[=false]: When printing, show all labels as the last column (default hide labels column) --sort-by="": If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string. --template="": Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. --timeout=5m0s: Max time to wait for a replication controller to update before giving up. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". @@ -124,7 +125,7 @@ $ kubectl rolling-update frontend-v1 frontend-v2 --rollback * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 8-Dec-2015 +###### Auto generated by spf13/cobra on 20-Jan-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_rolling-update.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_run.md b/docs/user-guide/kubectl/kubectl_run.md index 56b49387d5f..887c1239489 100644 --- a/docs/user-guide/kubectl/kubectl_run.md +++ b/docs/user-guide/kubectl/kubectl_run.md @@ -108,6 +108,7 @@ $ kubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'pri --service-generator="service/v2": The name of the generator to use for creating a service. Only used if --expose is true --service-overrides="": An inline JSON override for the generated service object. If this is non-empty, it is used to override the generated object. Requires that the object supply a valid apiVersion field. Only used if --expose is true. -a, --show-all[=false]: When printing, show all resources (default hide terminated pods.) + --show-labels[=false]: When printing, show all labels as the last column (default hide labels column) --sort-by="": If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string. -i, --stdin[=false]: Keep stdin open on the container(s) in the pod, even if nothing is attached. --template="": Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. diff --git a/hack/verify-flags/known-flags.txt b/hack/verify-flags/known-flags.txt index c31c808c6bf..20b0ee12a60 100644 --- a/hack/verify-flags/known-flags.txt +++ b/hack/verify-flags/known-flags.txt @@ -323,6 +323,7 @@ service-overrides service-sync-period session-affinity show-all +show-labels shutdown-fd shutdown-fifo since-seconds diff --git a/pkg/kubectl/cmd/cmd_test.go b/pkg/kubectl/cmd/cmd_test.go index 72f4ac867f6..fbcc2be5fd1 100644 --- a/pkg/kubectl/cmd/cmd_test.go +++ b/pkg/kubectl/cmd/cmd_test.go @@ -195,7 +195,7 @@ func NewTestFactory() (*cmdutil.Factory, *testFactory, runtime.Codec) { Describer: func(*meta.RESTMapping) (kubectl.Describer, error) { return t.Describer, t.Err }, - Printer: func(mapping *meta.RESTMapping, noHeaders, withNamespace bool, wide bool, showAll bool, absoluteTimestamps bool, columnLabels []string) (kubectl.ResourcePrinter, error) { + Printer: func(mapping *meta.RESTMapping, noHeaders, withNamespace bool, wide bool, showAll bool, showLabels bool, absoluteTimestamps bool, columnLabels []string) (kubectl.ResourcePrinter, error) { return t.Printer, t.Err }, Validator: func(validate bool, cacheDir string) (validation.Schema, error) { @@ -253,7 +253,7 @@ func NewAPIFactory() (*cmdutil.Factory, *testFactory, runtime.Codec) { Describer: func(*meta.RESTMapping) (kubectl.Describer, error) { return t.Describer, t.Err }, - Printer: func(mapping *meta.RESTMapping, noHeaders, withNamespace bool, wide bool, showAll bool, absoluteTimestamps bool, columnLabels []string) (kubectl.ResourcePrinter, error) { + Printer: func(mapping *meta.RESTMapping, noHeaders, withNamespace bool, wide bool, showAll bool, showLabels bool, absoluteTimestamps bool, columnLabels []string) (kubectl.ResourcePrinter, error) { return t.Printer, t.Err }, Validator: func(validate bool, cacheDir string) (validation.Schema, error) { @@ -327,7 +327,7 @@ func stringBody(body string) io.ReadCloser { func ExamplePrintReplicationControllerWithNamespace() { f, tf, codec := NewAPIFactory() - tf.Printer = kubectl.NewHumanReadablePrinter(false, true, false, false, false, []string{}) + tf.Printer = kubectl.NewHumanReadablePrinter(false, true, false, false, false, false, []string{}) tf.Client = &fake.RESTClient{ Codec: codec, Client: nil, @@ -369,7 +369,7 @@ func ExamplePrintReplicationControllerWithNamespace() { func ExamplePrintPodWithWideFormat() { f, tf, codec := NewAPIFactory() - tf.Printer = kubectl.NewHumanReadablePrinter(false, false, true, false, false, []string{}) + tf.Printer = kubectl.NewHumanReadablePrinter(false, false, true, false, false, false, []string{}) tf.Client = &fake.RESTClient{ Codec: codec, Client: nil, @@ -402,6 +402,45 @@ func ExamplePrintPodWithWideFormat() { // test1 1/2 podPhase 6 10y kubernetes-minion-abcd } +func ExamplePrintPodWithShowLabels() { + f, tf, codec := NewAPIFactory() + tf.Printer = kubectl.NewHumanReadablePrinter(false, false, false, false, true, false, []string{}) + tf.Client = &fake.RESTClient{ + Codec: codec, + Client: nil, + } + nodeName := "kubernetes-minion-abcd" + cmd := NewCmdRun(f, os.Stdin, os.Stdout, os.Stderr) + pod := &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Name: "test1", + CreationTimestamp: unversioned.Time{Time: time.Now().AddDate(-10, 0, 0)}, + Labels: map[string]string{ + "l1": "key", + "l2": "value", + }, + }, + Spec: api.PodSpec{ + Containers: make([]api.Container, 2), + NodeName: nodeName, + }, + Status: api.PodStatus{ + Phase: "podPhase", + ContainerStatuses: []api.ContainerStatus{ + {Ready: true, RestartCount: 3, State: api.ContainerState{Running: &api.ContainerStateRunning{}}}, + {RestartCount: 3}, + }, + }, + } + err := f.PrintObject(cmd, pod, os.Stdout) + if err != nil { + fmt.Printf("Unexpected error: %v", err) + } + // Output: + // NAME READY STATUS RESTARTS AGE LABELS + // test1 1/2 podPhase 6 10y l1=key,l2=value +} + func newAllPhasePodList() *api.PodList { nodeName := "kubernetes-minion-abcd" return &api.PodList{ @@ -496,7 +535,7 @@ func newAllPhasePodList() *api.PodList { func ExamplePrintPodHideTerminated() { f, tf, codec := NewAPIFactory() - tf.Printer = kubectl.NewHumanReadablePrinter(false, false, false, false, false, []string{}) + tf.Printer = kubectl.NewHumanReadablePrinter(false, false, false, false, false, false, []string{}) tf.Client = &fake.RESTClient{ Codec: codec, Client: nil, @@ -516,7 +555,7 @@ func ExamplePrintPodHideTerminated() { func ExamplePrintPodShowAll() { f, tf, codec := NewAPIFactory() - tf.Printer = kubectl.NewHumanReadablePrinter(false, false, false, true, false, []string{}) + tf.Printer = kubectl.NewHumanReadablePrinter(false, false, false, true, false, false, []string{}) tf.Client = &fake.RESTClient{ Codec: codec, Client: nil, @@ -538,7 +577,7 @@ func ExamplePrintPodShowAll() { func ExamplePrintServiceWithNamespacesAndLabels() { f, tf, codec := NewAPIFactory() - tf.Printer = kubectl.NewHumanReadablePrinter(false, true, false, false, false, []string{"l1"}) + tf.Printer = kubectl.NewHumanReadablePrinter(false, true, false, false, false, false, []string{"l1"}) tf.Client = &fake.RESTClient{ Codec: codec, Client: nil, diff --git a/pkg/kubectl/cmd/delete.go b/pkg/kubectl/cmd/delete.go index 94973d6e584..7dffd4f9909 100644 --- a/pkg/kubectl/cmd/delete.go +++ b/pkg/kubectl/cmd/delete.go @@ -71,7 +71,7 @@ func NewCmdDelete(f *cmdutil.Factory, out io.Writer) *cobra.Command { // retrieve a list of handled resources from printer as valid args validArgs := []string{} - p, err := f.Printer(nil, false, false, false, false, false, []string{}) + p, err := f.Printer(nil, false, false, false, false, false, false, []string{}) cmdutil.CheckErr(err) if p != nil { validArgs = p.HandledResources() diff --git a/pkg/kubectl/cmd/get.go b/pkg/kubectl/cmd/get.go index e20d520ef1b..c8123c9ff5b 100644 --- a/pkg/kubectl/cmd/get.go +++ b/pkg/kubectl/cmd/get.go @@ -78,7 +78,7 @@ func NewCmdGet(f *cmdutil.Factory, out io.Writer) *cobra.Command { // retrieve a list of handled resources from printer as valid args validArgs := []string{} - p, err := f.Printer(nil, false, false, false, false, false, []string{}) + p, err := f.Printer(nil, false, false, false, false, false, false, []string{}) cmdutil.CheckErr(err) if p != nil { validArgs = p.HandledResources() diff --git a/pkg/kubectl/cmd/label.go b/pkg/kubectl/cmd/label.go index 9e6d76edc27..39c401d5204 100644 --- a/pkg/kubectl/cmd/label.go +++ b/pkg/kubectl/cmd/label.go @@ -72,7 +72,7 @@ func NewCmdLabel(f *cmdutil.Factory, out io.Writer) *cobra.Command { // retrieve a list of handled resources from printer as valid args validArgs := []string{} - p, err := f.Printer(nil, false, false, false, false, false, []string{}) + p, err := f.Printer(nil, false, false, false, false, false, false, []string{}) cmdutil.CheckErr(err) if p != nil { validArgs = p.HandledResources() diff --git a/pkg/kubectl/cmd/util/factory.go b/pkg/kubectl/cmd/util/factory.go index 4633d24f924..38505cdf14e 100644 --- a/pkg/kubectl/cmd/util/factory.go +++ b/pkg/kubectl/cmd/util/factory.go @@ -83,7 +83,7 @@ type Factory struct { // Returns a Describer for displaying the specified RESTMapping type or an error. Describer func(mapping *meta.RESTMapping) (kubectl.Describer, error) // Returns a Printer for formatting objects of the given type or an error. - Printer func(mapping *meta.RESTMapping, noHeaders, withNamespace bool, wide bool, showAll bool, absoluteTimestamps bool, columnLabels []string) (kubectl.ResourcePrinter, error) + Printer func(mapping *meta.RESTMapping, noHeaders, withNamespace bool, wide bool, showAll bool, showLabels bool, absoluteTimestamps bool, columnLabels []string) (kubectl.ResourcePrinter, error) // Returns a Scaler for changing the size of the specified RESTMapping type or an error Scaler func(mapping *meta.RESTMapping) (kubectl.Scaler, error) // Returns a Reaper for gracefully shutting down resources. @@ -238,8 +238,8 @@ func NewFactory(optionalClientConfig clientcmd.ClientConfig) *Factory { JSONEncoder: func() runtime.Encoder { return api.Codecs.LegacyCodec(registered.EnabledVersions()...) }, - Printer: func(mapping *meta.RESTMapping, noHeaders, withNamespace bool, wide bool, showAll bool, absoluteTimestamps bool, columnLabels []string) (kubectl.ResourcePrinter, error) { - return kubectl.NewHumanReadablePrinter(noHeaders, withNamespace, wide, showAll, absoluteTimestamps, columnLabels), nil + Printer: func(mapping *meta.RESTMapping, noHeaders, withNamespace bool, wide bool, showAll bool, showLabels bool, absoluteTimestamps bool, columnLabels []string) (kubectl.ResourcePrinter, error) { + return kubectl.NewHumanReadablePrinter(noHeaders, withNamespace, wide, showAll, showLabels, absoluteTimestamps, columnLabels), nil }, PodSelectorForObject: func(object runtime.Object) (string, error) { // TODO: replace with a swagger schema based approach (identify pod selector via schema introspection) @@ -753,7 +753,7 @@ func (f *Factory) PrinterForMapping(cmd *cobra.Command, mapping *meta.RESTMappin if err != nil { columnLabel = []string{} } - printer, err = f.Printer(mapping, GetFlagBool(cmd, "no-headers"), withNamespace, GetWideFlag(cmd), GetFlagBool(cmd, "show-all"), isWatch(cmd), columnLabel) + printer, err = f.Printer(mapping, GetFlagBool(cmd, "no-headers"), withNamespace, GetWideFlag(cmd), GetFlagBool(cmd, "show-all"), GetFlagBool(cmd, "show-labels"), isWatch(cmd), columnLabel) if err != nil { return nil, err } diff --git a/pkg/kubectl/cmd/util/printing.go b/pkg/kubectl/cmd/util/printing.go index ce68ca2d12e..40d7c07fa06 100644 --- a/pkg/kubectl/cmd/util/printing.go +++ b/pkg/kubectl/cmd/util/printing.go @@ -33,6 +33,7 @@ func AddPrinterFlags(cmd *cobra.Command) { cmd.Flags().StringP("output", "o", "", "Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md].") cmd.Flags().String("output-version", "", "Output the formatted object with the given version (default api-version).") cmd.Flags().Bool("no-headers", false, "When using the default output, don't print headers.") + cmd.Flags().Bool("show-labels", false, "When printing, show all labels as the last column (default hide labels column)") // template shorthand -t is deprecated to support -t for --tty // TODO: remove template flag shorthand -t cmd.Flags().StringP("template", "t", "", "Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].") diff --git a/pkg/kubectl/resource_printer.go b/pkg/kubectl/resource_printer.go index f5e6d22c45e..6a684aa5caf 100644 --- a/pkg/kubectl/resource_printer.go +++ b/pkg/kubectl/resource_printer.go @@ -304,6 +304,7 @@ type PrintOptions struct { WithNamespace bool Wide bool ShowAll bool + ShowLabels bool AbsoluteTimestamps bool ColumnLabels []string } @@ -319,7 +320,7 @@ type HumanReadablePrinter struct { } // NewHumanReadablePrinter creates a HumanReadablePrinter. -func NewHumanReadablePrinter(noHeaders, withNamespace bool, wide bool, showAll bool, absoluteTimestamps bool, columnLabels []string) *HumanReadablePrinter { +func NewHumanReadablePrinter(noHeaders, withNamespace bool, wide bool, showAll bool, showLabels bool, absoluteTimestamps bool, columnLabels []string) *HumanReadablePrinter { printer := &HumanReadablePrinter{ handlerMap: make(map[reflect.Type]*handlerEntry), options: PrintOptions{ @@ -327,6 +328,7 @@ func NewHumanReadablePrinter(noHeaders, withNamespace bool, wide bool, showAll b WithNamespace: withNamespace, Wide: wide, ShowAll: showAll, + ShowLabels: showLabels, AbsoluteTimestamps: absoluteTimestamps, ColumnLabels: columnLabels, }, @@ -399,16 +401,16 @@ var jobColumns = []string{"JOB", "CONTAINER(S)", "IMAGE(S)", "SELECTOR", "SUCCES var serviceColumns = []string{"NAME", "CLUSTER-IP", "EXTERNAL-IP", "PORT(S)", "SELECTOR", "AGE"} var ingressColumns = []string{"NAME", "RULE", "BACKEND", "ADDRESS"} var endpointColumns = []string{"NAME", "ENDPOINTS", "AGE"} -var nodeColumns = []string{"NAME", "LABELS", "STATUS", "AGE"} +var nodeColumns = []string{"NAME", "STATUS", "AGE"} var daemonSetColumns = []string{"NAME", "CONTAINER(S)", "IMAGE(S)", "SELECTOR", "NODE-SELECTOR"} var eventColumns = []string{"FIRSTSEEN", "LASTSEEN", "COUNT", "NAME", "KIND", "SUBOBJECT", "TYPE", "REASON", "SOURCE", "MESSAGE"} var limitRangeColumns = []string{"NAME", "AGE"} var resourceQuotaColumns = []string{"NAME", "AGE"} -var namespaceColumns = []string{"NAME", "LABELS", "STATUS", "AGE"} +var namespaceColumns = []string{"NAME", "STATUS", "AGE"} var secretColumns = []string{"NAME", "TYPE", "DATA", "AGE"} var serviceAccountColumns = []string{"NAME", "SECRETS", "AGE"} -var persistentVolumeColumns = []string{"NAME", "LABELS", "CAPACITY", "ACCESSMODES", "STATUS", "CLAIM", "REASON", "AGE"} -var persistentVolumeClaimColumns = []string{"NAME", "LABELS", "STATUS", "VOLUME", "CAPACITY", "ACCESSMODES", "AGE"} +var persistentVolumeColumns = []string{"NAME", "CAPACITY", "ACCESSMODES", "STATUS", "CLAIM", "REASON", "AGE"} +var persistentVolumeClaimColumns = []string{"NAME", "STATUS", "VOLUME", "CAPACITY", "ACCESSMODES", "AGE"} var componentStatusColumns = []string{"NAME", "STATUS", "MESSAGE", "ERROR"} var thirdPartyResourceColumns = []string{"NAME", "DESCRIPTION", "VERSION(S)"} var horizontalPodAutoscalerColumns = []string{"NAME", "REFERENCE", "TARGET", "CURRENT", "MINPODS", "MAXPODS", "AGE"} @@ -606,8 +608,14 @@ func printPodBase(pod *api.Pod, w io.Writer, options PrintOptions) error { } } - _, err := fmt.Fprint(w, appendLabels(pod.Labels, options.ColumnLabels)) - return err + if _, err := fmt.Fprint(w, appendLabels(pod.Labels, options.ColumnLabels)); err != nil { + return err + } + if _, err := fmt.Fprint(w, appendAllLabels(options.ShowLabels, pod.Labels)); err != nil { + return err + } + + return nil } func printPodList(podList *api.PodList, w io.Writer, options PrintOptions) error { @@ -645,6 +653,9 @@ func printPodTemplate(pod *api.PodTemplate, w io.Writer, options PrintOptions) e if _, err := fmt.Fprint(w, appendLabels(pod.Labels, options.ColumnLabels)); err != nil { return err } + if _, err := fmt.Fprint(w, appendAllLabels(options.ShowLabels, pod.Labels)); err != nil { + return err + } // Lay out all the other containers on separate lines. extraLinePrefix := "\t" @@ -699,6 +710,9 @@ func printReplicationController(controller *api.ReplicationController, w io.Writ if _, err := fmt.Fprint(w, appendLabels(controller.Labels, options.ColumnLabels)); err != nil { return err } + if _, err := fmt.Fprint(w, appendAllLabels(options.ShowLabels, controller.Labels)); err != nil { + return err + } // Lay out all the other containers on separate lines. extraLinePrefix := "\t" @@ -753,6 +767,9 @@ func printJob(job *extensions.Job, w io.Writer, options PrintOptions) error { if _, err := fmt.Fprint(w, appendLabels(job.Labels, options.ColumnLabels)); err != nil { return err } + if _, err := fmt.Fprint(w, appendAllLabels(options.ShowLabels, job.Labels)); err != nil { + return err + } // Lay out all the other containers on separate lines. extraLinePrefix := "\t" @@ -849,7 +866,8 @@ func printService(svc *api.Service, w io.Writer, options PrintOptions) error { if _, err := fmt.Fprint(w, appendLabels(svc.Labels, options.ColumnLabels)); err != nil { return err } - return nil + _, err := fmt.Fprint(w, appendAllLabels(options.ShowLabels, svc.Labels)) + return err } func printServiceList(list *api.ServiceList, w io.Writer, options PrintOptions) error { @@ -880,7 +898,7 @@ func printIngress(ingress *extensions.Ingress, w io.Writer, options PrintOptions } } - if _, err := fmt.Fprintf(w, "%s\t%v\t%v\t%v\n", + if _, err := fmt.Fprintf(w, "%s\t%v\t%v\t%v", name, "-", backendStringer(ingress.Spec.Backend), @@ -888,6 +906,10 @@ func printIngress(ingress *extensions.Ingress, w io.Writer, options PrintOptions return err } + if _, err := fmt.Fprint(w, appendAllLabels(options.ShowLabels, ingress.Labels)); err != nil { + return err + } + // Lay out all the rules on separate lines. extraLinePrefix := "" if options.WithNamespace { @@ -958,6 +980,9 @@ func printDaemonSet(ds *extensions.DaemonSet, w io.Writer, options PrintOptions) if _, err := fmt.Fprint(w, appendLabels(ds.Labels, options.ColumnLabels)); err != nil { return err } + if _, err := fmt.Fprint(w, appendAllLabels(options.ShowLabels, ds.Labels)); err != nil { + return err + } // Lay out all the other containers on separate lines. extraLinePrefix := "\t" @@ -997,7 +1022,10 @@ func printEndpoints(endpoints *api.Endpoints, w io.Writer, options PrintOptions) if _, err := fmt.Fprintf(w, "%s\t%s\t%s", name, formatEndpoints(endpoints, nil), translateTimestamp(endpoints.CreationTimestamp)); err != nil { return err } - _, err := fmt.Fprint(w, appendLabels(endpoints.Labels, options.ColumnLabels)) + if _, err := fmt.Fprint(w, appendLabels(endpoints.Labels, options.ColumnLabels)); err != nil { + return err + } + _, err := fmt.Fprint(w, appendAllLabels(options.ShowLabels, endpoints.Labels)) return err } @@ -1015,10 +1043,13 @@ func printNamespace(item *api.Namespace, w io.Writer, options PrintOptions) erro return fmt.Errorf("namespace is not namespaced") } - if _, err := fmt.Fprintf(w, "%s\t%s\t%s\t%s", item.Name, labels.FormatLabels(item.Labels), item.Status.Phase, translateTimestamp(item.CreationTimestamp)); err != nil { + if _, err := fmt.Fprintf(w, "%s\t%s\t%s", item.Name, item.Status.Phase, translateTimestamp(item.CreationTimestamp)); err != nil { return err } - _, err := fmt.Fprint(w, appendLabels(item.Labels, options.ColumnLabels)) + if _, err := fmt.Fprint(w, appendLabels(item.Labels, options.ColumnLabels)); err != nil { + return err + } + _, err := fmt.Fprint(w, appendAllLabels(options.ShowLabels, item.Labels)) return err } @@ -1043,7 +1074,10 @@ func printSecret(item *api.Secret, w io.Writer, options PrintOptions) error { if _, err := fmt.Fprintf(w, "%s\t%s\t%v\t%s", name, item.Type, len(item.Data), translateTimestamp(item.CreationTimestamp)); err != nil { return err } - _, err := fmt.Fprint(w, appendLabels(item.Labels, options.ColumnLabels)) + if _, err := fmt.Fprint(w, appendLabels(item.Labels, options.ColumnLabels)); err != nil { + return err + } + _, err := fmt.Fprint(w, appendAllLabels(options.ShowLabels, item.Labels)) return err } @@ -1069,7 +1103,10 @@ func printServiceAccount(item *api.ServiceAccount, w io.Writer, options PrintOpt if _, err := fmt.Fprintf(w, "%s\t%d\t%s", name, len(item.Secrets), translateTimestamp(item.CreationTimestamp)); err != nil { return err } - _, err := fmt.Fprint(w, appendLabels(item.Labels, options.ColumnLabels)) + if _, err := fmt.Fprint(w, appendLabels(item.Labels, options.ColumnLabels)); err != nil { + return err + } + _, err := fmt.Fprint(w, appendAllLabels(options.ShowLabels, item.Labels)) return err } @@ -1110,10 +1147,14 @@ func printNode(node *api.Node, w io.Writer, options PrintOptions) error { status = append(status, "SchedulingDisabled") } - if _, err := fmt.Fprintf(w, "%s\t%s\t%s\t%s", node.Name, labels.FormatLabels(node.Labels), strings.Join(status, ","), translateTimestamp(node.CreationTimestamp)); err != nil { + if _, err := fmt.Fprintf(w, "%s\t%s\t%s", node.Name, strings.Join(status, ","), translateTimestamp(node.CreationTimestamp)); err != nil { return err } - _, err := fmt.Fprint(w, appendLabels(node.Labels, options.ColumnLabels)) + // Display caller specify column labels first. + if _, err := fmt.Fprint(w, appendLabels(node.Labels, options.ColumnLabels)); err != nil { + return err + } + _, err := fmt.Fprint(w, appendAllLabels(options.ShowLabels, node.Labels)) return err } @@ -1144,9 +1185,8 @@ func printPersistentVolume(pv *api.PersistentVolume, w io.Writer, options PrintO aQty := pv.Spec.Capacity[api.ResourceStorage] aSize := aQty.String() - if _, err := fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s", + if _, err := fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s\t%s", name, - labels.FormatLabels(pv.Labels), aSize, modesStr, pv.Status.Phase, claimRefUID, @@ -1155,7 +1195,10 @@ func printPersistentVolume(pv *api.PersistentVolume, w io.Writer, options PrintO ); err != nil { return err } - _, err := fmt.Fprint(w, appendLabels(pv.Labels, options.ColumnLabels)) + if _, err := fmt.Fprint(w, appendLabels(pv.Labels, options.ColumnLabels)); err != nil { + return err + } + _, err := fmt.Fprint(w, appendAllLabels(options.ShowLabels, pv.Labels)) return err } @@ -1178,7 +1221,6 @@ func printPersistentVolumeClaim(pvc *api.PersistentVolumeClaim, w io.Writer, opt } } - labels := labels.FormatLabels(pvc.Labels) phase := pvc.Status.Phase storage := pvc.Spec.Resources.Requests[api.ResourceStorage] capacity := "" @@ -1189,10 +1231,13 @@ func printPersistentVolumeClaim(pvc *api.PersistentVolumeClaim, w io.Writer, opt capacity = storage.String() } - if _, err := fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s\t%s", name, labels, phase, pvc.Spec.VolumeName, capacity, accessModes, translateTimestamp(pvc.CreationTimestamp)); err != nil { + if _, err := fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s", name, phase, pvc.Spec.VolumeName, capacity, accessModes, translateTimestamp(pvc.CreationTimestamp)); err != nil { return err } - _, err := fmt.Fprint(w, appendLabels(pvc.Labels, options.ColumnLabels)) + if _, err := fmt.Fprint(w, appendLabels(pvc.Labels, options.ColumnLabels)); err != nil { + return err + } + _, err := fmt.Fprint(w, appendAllLabels(options.ShowLabels, pvc.Labels)) return err } @@ -1238,7 +1283,10 @@ func printEvent(event *api.Event, w io.Writer, options PrintOptions) error { ); err != nil { return err } - _, err := fmt.Fprint(w, appendLabels(event.Labels, options.ColumnLabels)) + if _, err := fmt.Fprint(w, appendLabels(event.Labels, options.ColumnLabels)); err != nil { + return err + } + _, err := fmt.Fprint(w, appendAllLabels(options.ShowLabels, event.Labels)) return err } @@ -1270,7 +1318,10 @@ func printLimitRange(limitRange *api.LimitRange, w io.Writer, options PrintOptio ); err != nil { return err } - _, err := fmt.Fprint(w, appendLabels(limitRange.Labels, options.ColumnLabels)) + if _, err := fmt.Fprint(w, appendLabels(limitRange.Labels, options.ColumnLabels)); err != nil { + return err + } + _, err := fmt.Fprint(w, appendAllLabels(options.ShowLabels, limitRange.Labels)) return err } @@ -1301,7 +1352,10 @@ func printResourceQuota(resourceQuota *api.ResourceQuota, w io.Writer, options P ); err != nil { return err } - _, err := fmt.Fprint(w, appendLabels(resourceQuota.Labels, options.ColumnLabels)) + if _, err := fmt.Fprint(w, appendLabels(resourceQuota.Labels, options.ColumnLabels)); err != nil { + return err + } + _, err := fmt.Fprint(w, appendAllLabels(options.ShowLabels, resourceQuota.Labels)) return err } @@ -1338,7 +1392,10 @@ func printComponentStatus(item *api.ComponentStatus, w io.Writer, options PrintO if _, err := fmt.Fprintf(w, "%s\t%s\t%s\t%s", item.Name, status, message, error); err != nil { return err } - _, err := fmt.Fprint(w, appendLabels(item.Labels, options.ColumnLabels)) + if _, err := fmt.Fprint(w, appendLabels(item.Labels, options.ColumnLabels)); err != nil { + return err + } + _, err := fmt.Fprint(w, appendAllLabels(options.ShowLabels, item.Labels)) return err } @@ -1390,7 +1447,10 @@ func printDeployment(deployment *extensions.Deployment, w io.Writer, options Pri if _, err := fmt.Fprintf(w, "%s\t%d\t%d\t%d\t%d\t%s", deployment.Name, desiredReplicas, currentReplicas, updatedReplicas, availableReplicas, age); err != nil { return err } - _, err := fmt.Fprint(w, appendLabels(deployment.Labels, options.ColumnLabels)) + if _, err := fmt.Fprint(w, appendLabels(deployment.Labels, options.ColumnLabels)); err != nil { + return err + } + _, err := fmt.Fprint(w, appendAllLabels(options.ShowLabels, deployment.Labels)) return err } @@ -1440,7 +1500,10 @@ func printHorizontalPodAutoscaler(hpa *extensions.HorizontalPodAutoscaler, w io. ); err != nil { return err } - _, err := fmt.Fprint(w, appendLabels(hpa.Labels, options.ColumnLabels)) + if _, err := fmt.Fprint(w, appendLabels(hpa.Labels, options.ColumnLabels)); err != nil { + return err + } + _, err := fmt.Fprint(w, appendAllLabels(options.ShowLabels, hpa.Labels)) return err } @@ -1465,7 +1528,10 @@ func printConfigMap(configMap *api.ConfigMap, w io.Writer, options PrintOptions) if _, err := fmt.Fprintf(w, "%s\t%v\t%s", name, len(configMap.Data), translateTimestamp(configMap.CreationTimestamp)); err != nil { return err } - _, err := fmt.Fprint(w, appendLabels(configMap.Labels, options.ColumnLabels)) + if _, err := fmt.Fprint(w, appendLabels(configMap.Labels, options.ColumnLabels)); err != nil { + return err + } + _, err := fmt.Fprint(w, appendAllLabels(options.ShowLabels, configMap.Labels)) return err } @@ -1489,6 +1555,19 @@ func appendLabels(itemLabels map[string]string, columnLabels []string) string { buffer.WriteString("") } } + + return buffer.String() +} + +// Append all labels to a single column. We need this even when show-labels flag* is +// false, since this adds newline delimiter to the end of each row. +func appendAllLabels(showLabels bool, itemLabels map[string]string) string { + var buffer bytes.Buffer + + if showLabels { + buffer.WriteString(fmt.Sprint("\t")) + buffer.WriteString(labels.FormatLabels(itemLabels)) + } buffer.WriteString("\n") return buffer.String() @@ -1529,6 +1608,16 @@ func formatWideHeaders(wide bool, t reflect.Type) []string { return nil } +// headers for --show-labels=true +func formatShowLabelsHeader(showLabels bool, t reflect.Type) []string { + if showLabels { + if t.String() != "*api.ThirdPartyResource" && t.String() != "*api.ThirdPartyResourceList" { + return []string{"LABELS"} + } + } + return nil +} + // GetNewTabWriter returns a tabwriter that translates tabbed columns in input into properly aligned text. func GetNewTabWriter(output io.Writer) *tabwriter.Writer { return tabwriter.NewWriter(output, tabwriterMinWidth, tabwriterWidth, tabwriterPadding, tabwriterPadChar, tabwriterFlags) @@ -1547,6 +1636,8 @@ func (h *HumanReadablePrinter) PrintObj(obj runtime.Object, output io.Writer) er if !h.options.NoHeaders && t != h.lastType { headers := append(handler.columns, formatWideHeaders(h.options.Wide, t)...) headers = append(headers, formatLabelHeaders(h.options.ColumnLabels)...) + // LABELS is always the last column. + headers = append(headers, formatShowLabelsHeader(h.options.ShowLabels, t)...) if h.options.WithNamespace { headers = append(withNamespacePrefixColumns, headers...) } diff --git a/pkg/kubectl/resource_printer_test.go b/pkg/kubectl/resource_printer_test.go index dfb2da28a5f..9e17063c395 100644 --- a/pkg/kubectl/resource_printer_test.go +++ b/pkg/kubectl/resource_printer_test.go @@ -224,7 +224,7 @@ func ErrorPrintHandler(obj *TestPrintType, w io.Writer, options PrintOptions) er func TestCustomTypePrinting(t *testing.T) { columns := []string{"Data"} - printer := NewHumanReadablePrinter(false, false, false, false, false, []string{}) + printer := NewHumanReadablePrinter(false, false, false, false, false, false, []string{}) printer.Handler(columns, PrintCustomType) obj := TestPrintType{"test object"} @@ -241,7 +241,7 @@ func TestCustomTypePrinting(t *testing.T) { func TestPrintHandlerError(t *testing.T) { columns := []string{"Data"} - printer := NewHumanReadablePrinter(false, false, false, false, false, []string{}) + printer := NewHumanReadablePrinter(false, false, false, false, false, false, []string{}) printer.Handler(columns, ErrorPrintHandler) obj := TestPrintType{"test object"} buffer := &bytes.Buffer{} @@ -252,7 +252,7 @@ func TestPrintHandlerError(t *testing.T) { } func TestUnknownTypePrinting(t *testing.T) { - printer := NewHumanReadablePrinter(false, false, false, false, false, []string{}) + printer := NewHumanReadablePrinter(false, false, false, false, false, false, []string{}) buffer := &bytes.Buffer{} err := printer.PrintObj(&TestUnknownType{}, buffer) if err == nil { @@ -456,8 +456,8 @@ func TestPrinters(t *testing.T) { t.Fatal(err) } printers := map[string]ResourcePrinter{ - "humanReadable": NewHumanReadablePrinter(true, false, false, false, false, []string{}), - "humanReadableHeaders": NewHumanReadablePrinter(false, false, false, false, false, []string{}), + "humanReadable": NewHumanReadablePrinter(true, false, false, false, false, false, []string{}), + "humanReadableHeaders": NewHumanReadablePrinter(false, false, false, false, false, false, []string{}), "json": &JSONPrinter{}, "yaml": &YAMLPrinter{}, "template": templatePrinter, @@ -500,7 +500,7 @@ func TestPrinters(t *testing.T) { func TestPrintEventsResultSorted(t *testing.T) { // Arrange - printer := NewHumanReadablePrinter(false /* noHeaders */, false, false, false, false, []string{}) + printer := NewHumanReadablePrinter(false /* noHeaders */, false, false, false, false, false, []string{}) obj := api.EventList{ Items: []api.Event{ @@ -544,7 +544,7 @@ func TestPrintEventsResultSorted(t *testing.T) { } func TestPrintNodeStatus(t *testing.T) { - printer := NewHumanReadablePrinter(false, false, false, false, false, []string{}) + printer := NewHumanReadablePrinter(false, false, false, false, false, false, []string{}) table := []struct { node api.Node status string @@ -755,7 +755,7 @@ func TestPrintHumanReadableService(t *testing.T) { for _, svc := range tests { buff := bytes.Buffer{} - printService(&svc, &buff, PrintOptions{false, false, false, false, false, []string{}}) + printService(&svc, &buff, PrintOptions{false, false, false, false, false, false, []string{}}) output := string(buff.Bytes()) ip := svc.Spec.ClusterIP if !strings.Contains(output, ip) { @@ -937,7 +937,7 @@ func TestPrintHumanReadableWithNamespace(t *testing.T) { for _, test := range table { if test.isNamespaced { // Expect output to include namespace when requested. - printer := NewHumanReadablePrinter(false, true, false, false, false, []string{}) + printer := NewHumanReadablePrinter(false, true, false, false, false, false, []string{}) buffer := &bytes.Buffer{} err := printer.PrintObj(test.obj, buffer) if err != nil { @@ -949,7 +949,7 @@ func TestPrintHumanReadableWithNamespace(t *testing.T) { } } else { // Expect error when trying to get all namespaces for un-namespaced object. - printer := NewHumanReadablePrinter(false, true, false, false, false, []string{}) + printer := NewHumanReadablePrinter(false, true, false, false, false, false, []string{}) buffer := &bytes.Buffer{} err := printer.PrintObj(test.obj, buffer) if err == nil { @@ -1044,7 +1044,7 @@ func TestPrintPod(t *testing.T) { buf := bytes.NewBuffer([]byte{}) for _, test := range tests { - printPod(&test.pod, buf, PrintOptions{false, false, false, true, false, []string{}}) + printPod(&test.pod, buf, PrintOptions{false, false, false, true, false, false, []string{}}) // We ignore time if !strings.HasPrefix(buf.String(), test.expect) { t.Fatalf("Expected: %s, got: %s", test.expect, buf.String()) @@ -1137,7 +1137,7 @@ func TestPrintNonTerminatedPod(t *testing.T) { buf := bytes.NewBuffer([]byte{}) for _, test := range tests { - printPod(&test.pod, buf, PrintOptions{false, false, false, false, false, []string{}}) + printPod(&test.pod, buf, PrintOptions{false, false, false, false, false, false, []string{}}) // We ignore time if !strings.HasPrefix(buf.String(), test.expect) { t.Fatalf("Expected: %s, got: %s", test.expect, buf.String()) @@ -1197,7 +1197,7 @@ func TestPrintPodWithLabels(t *testing.T) { buf := bytes.NewBuffer([]byte{}) for _, test := range tests { - printPod(&test.pod, buf, PrintOptions{false, false, false, false, false, test.labelColumns}) + printPod(&test.pod, buf, PrintOptions{false, false, false, false, false, false, test.labelColumns}) // We ignore time if !strings.HasPrefix(buf.String(), test.startsWith) || !strings.HasSuffix(buf.String(), test.endsWith) { t.Fatalf("Expected to start with: %s and end with: %s, but got: %s", test.startsWith, test.endsWith, buf.String()) @@ -1261,10 +1261,70 @@ func TestPrintDeployment(t *testing.T) { buf := bytes.NewBuffer([]byte{}) for _, test := range tests { - printDeployment(&test.deployment, buf, PrintOptions{false, false, false, true, false, []string{}}) + printDeployment(&test.deployment, buf, PrintOptions{false, false, false, true, false, false, []string{}}) if buf.String() != test.expect { t.Fatalf("Expected: %s, got: %s", test.expect, buf.String()) } buf.Reset() } } + +func TestPrintPodShowLabels(t *testing.T) { + tests := []struct { + pod api.Pod + startsWith string + endsWith string + showLabels bool + }{ + { + // Test name, num of containers, restarts, container ready status + api.Pod{ + ObjectMeta: api.ObjectMeta{ + Name: "test1", + Labels: map[string]string{"col1": "asd", "COL2": "zxc"}, + }, + Spec: api.PodSpec{Containers: make([]api.Container, 2)}, + Status: api.PodStatus{ + Phase: "podPhase", + ContainerStatuses: []api.ContainerStatus{ + {Ready: true, RestartCount: 3, State: api.ContainerState{Running: &api.ContainerStateRunning{}}}, + {RestartCount: 3}, + }, + }, + }, + "test1\t1/2\tpodPhase\t6\t", + "\tCOL2=zxc,col1=asd\n", + true, + }, + { + // Test name, num of containers, restarts, container ready status + api.Pod{ + ObjectMeta: api.ObjectMeta{ + Name: "test1", + Labels: map[string]string{"col3": "asd", "COL4": "zxc"}, + }, + Spec: api.PodSpec{Containers: make([]api.Container, 2)}, + Status: api.PodStatus{ + Phase: "podPhase", + ContainerStatuses: []api.ContainerStatus{ + {Ready: true, RestartCount: 3, State: api.ContainerState{Running: &api.ContainerStateRunning{}}}, + {RestartCount: 3}, + }, + }, + }, + "test1\t1/2\tpodPhase\t6\t", + "\n", + false, + }, + } + + buf := bytes.NewBuffer([]byte{}) + for _, test := range tests { + printPod(&test.pod, buf, PrintOptions{false, false, false, false, test.showLabels, false, []string{}}) + // We ignore time + if !strings.HasPrefix(buf.String(), test.startsWith) || !strings.HasSuffix(buf.String(), test.endsWith) { + t.Fatalf("Expected to start with: %s and end with: %s, but got: %s", test.startsWith, test.endsWith, buf.String()) + } + buf.Reset() + } +} From 25e4cd37f139949f6a4c2ebc49593a8507176124 Mon Sep 17 00:00:00 2001 From: dingh Date: Thu, 4 Feb 2016 15:52:49 +0800 Subject: [PATCH 142/328] update pod count in comment --- cmd/integration/integration.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/integration/integration.go b/cmd/integration/integration.go index a5e8be2c247..c875b055f22 100644 --- a/cmd/integration/integration.go +++ b/cmd/integration/integration.go @@ -1042,11 +1042,11 @@ func main() { createdConts.Insert(p[:n-8]) } } - // We expect 9: 2 pod infra containers + 2 containers from the replication controller + + // We expect 12: 2 pod infra containers + 2 containers from the replication controller + // 1 pod infra container + 2 containers from the URL on first Kubelet + // 1 pod infra container + 2 containers from the URL on second Kubelet + // 1 pod infra container + 1 container from the service test. - // The total number of container created is 9 + // The total number of container created is 12 if len(createdConts) != 12 { glog.Fatalf("Expected 12 containers; got %v\n\nlist of created containers:\n\n%#v\n\nDocker 1 Created:\n\n%#v\n\nDocker 2 Created:\n\n%#v\n\n", len(createdConts), createdConts.List(), fakeDocker1.Created, fakeDocker2.Created) From 592da85a8120d73ab42019b8b2f96acf3afa305c Mon Sep 17 00:00:00 2001 From: Alex Robinson Date: Thu, 7 Jan 2016 20:41:22 -0500 Subject: [PATCH 143/328] Parse system logs into structured messages in fluentd. This allows you to filter based on components of the log, like their severity, in the developers console or elasticsearch. --- .../fluentd-es-image/td-agent.conf | 39 +++++++++++++++---- .../fluentd-gcp-image/google-fluentd.conf | 39 +++++++++++++++---- 2 files changed, 64 insertions(+), 14 deletions(-) diff --git a/cluster/addons/fluentd-elasticsearch/fluentd-es-image/td-agent.conf b/cluster/addons/fluentd-elasticsearch/fluentd-es-image/td-agent.conf index bbe39854181..1e2013da01d 100644 --- a/cluster/addons/fluentd-elasticsearch/fluentd-es-image/td-agent.conf +++ b/cluster/addons/fluentd-elasticsearch/fluentd-es-image/td-agent.conf @@ -115,65 +115,90 @@ read_from_head true +# Example: +# 2015-12-21 23:17:22,066 [salt.state ][INFO ] Completed state [net.ipv4.ip_forward] at time 23:17:22.066081 type tail - format none + format /^(?