generated.proto 224 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473
  1. /*
  2. Copyright The Kubernetes Authors.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. // This file was autogenerated by go-to-protobuf. Do not edit it manually!
  14. syntax = 'proto2';
  15. package k8s.io.api.core.v1;
  16. import "k8s.io/apimachinery/pkg/api/resource/generated.proto";
  17. import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
  18. import "k8s.io/apimachinery/pkg/runtime/generated.proto";
  19. import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
  20. import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
  21. // Package-wide variables from generator "generated".
  22. option go_package = "v1";
  23. // Represents a Persistent Disk resource in AWS.
  24. //
  25. // An AWS EBS disk must exist before mounting to a container. The disk
  26. // must also be in the same AWS zone as the kubelet. An AWS EBS disk
  27. // can only be mounted as read/write once. AWS EBS volumes support
  28. // ownership management and SELinux relabeling.
  29. message AWSElasticBlockStoreVolumeSource {
  30. // Unique ID of the persistent disk resource in AWS (Amazon EBS volume).
  31. // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
  32. optional string volumeID = 1;
  33. // Filesystem type of the volume that you want to mount.
  34. // Tip: Ensure that the filesystem type is supported by the host operating system.
  35. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
  36. // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
  37. // TODO: how do we prevent errors in the filesystem from compromising the machine
  38. // +optional
  39. optional string fsType = 2;
  40. // The partition in the volume that you want to mount.
  41. // If omitted, the default is to mount by volume name.
  42. // Examples: For volume /dev/sda1, you specify the partition as "1".
  43. // Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).
  44. // +optional
  45. optional int32 partition = 3;
  46. // Specify "true" to force and set the ReadOnly property in VolumeMounts to "true".
  47. // If omitted, the default is "false".
  48. // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
  49. // +optional
  50. optional bool readOnly = 4;
  51. }
  52. // Affinity is a group of affinity scheduling rules.
  53. message Affinity {
  54. // Describes node affinity scheduling rules for the pod.
  55. // +optional
  56. optional NodeAffinity nodeAffinity = 1;
  57. // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
  58. // +optional
  59. optional PodAffinity podAffinity = 2;
  60. // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
  61. // +optional
  62. optional PodAntiAffinity podAntiAffinity = 3;
  63. }
  64. // AttachedVolume describes a volume attached to a node
  65. message AttachedVolume {
  66. // Name of the attached volume
  67. optional string name = 1;
  68. // DevicePath represents the device path where the volume should be available
  69. optional string devicePath = 2;
  70. }
  71. // AvoidPods describes pods that should avoid this node. This is the value for a
  72. // Node annotation with key scheduler.alpha.kubernetes.io/preferAvoidPods and
  73. // will eventually become a field of NodeStatus.
  74. message AvoidPods {
  75. // Bounded-sized list of signatures of pods that should avoid this node, sorted
  76. // in timestamp order from oldest to newest. Size of the slice is unspecified.
  77. // +optional
  78. repeated PreferAvoidPodsEntry preferAvoidPods = 1;
  79. }
  80. // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
  81. message AzureDiskVolumeSource {
  82. // The Name of the data disk in the blob storage
  83. optional string diskName = 1;
  84. // The URI the data disk in the blob storage
  85. optional string diskURI = 2;
  86. // Host Caching mode: None, Read Only, Read Write.
  87. // +optional
  88. optional string cachingMode = 3;
  89. // Filesystem type to mount.
  90. // Must be a filesystem type supported by the host operating system.
  91. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
  92. // +optional
  93. optional string fsType = 4;
  94. // Defaults to false (read/write). ReadOnly here will force
  95. // the ReadOnly setting in VolumeMounts.
  96. // +optional
  97. optional bool readOnly = 5;
  98. // Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared
  99. optional string kind = 6;
  100. }
  101. // AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
  102. message AzureFilePersistentVolumeSource {
  103. // the name of secret that contains Azure Storage Account Name and Key
  104. optional string secretName = 1;
  105. // Share Name
  106. optional string shareName = 2;
  107. // Defaults to false (read/write). ReadOnly here will force
  108. // the ReadOnly setting in VolumeMounts.
  109. // +optional
  110. optional bool readOnly = 3;
  111. // the namespace of the secret that contains Azure Storage Account Name and Key
  112. // default is the same as the Pod
  113. // +optional
  114. optional string secretNamespace = 4;
  115. }
  116. // AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
  117. message AzureFileVolumeSource {
  118. // the name of secret that contains Azure Storage Account Name and Key
  119. optional string secretName = 1;
  120. // Share Name
  121. optional string shareName = 2;
  122. // Defaults to false (read/write). ReadOnly here will force
  123. // the ReadOnly setting in VolumeMounts.
  124. // +optional
  125. optional bool readOnly = 3;
  126. }
  127. // Binding ties one object to another; for example, a pod is bound to a node by a scheduler.
  128. // Deprecated in 1.7, please use the bindings subresource of pods instead.
  129. message Binding {
  130. // Standard object's metadata.
  131. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  132. // +optional
  133. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  134. // The target object that you want to bind to the standard object.
  135. optional ObjectReference target = 2;
  136. }
  137. // Represents storage that is managed by an external CSI volume driver (Beta feature)
  138. message CSIPersistentVolumeSource {
  139. // Driver is the name of the driver to use for this volume.
  140. // Required.
  141. optional string driver = 1;
  142. // VolumeHandle is the unique volume name returned by the CSI volume
  143. // plugin’s CreateVolume to refer to the volume on all subsequent calls.
  144. // Required.
  145. optional string volumeHandle = 2;
  146. // Optional: The value to pass to ControllerPublishVolumeRequest.
  147. // Defaults to false (read/write).
  148. // +optional
  149. optional bool readOnly = 3;
  150. // Filesystem type to mount.
  151. // Must be a filesystem type supported by the host operating system.
  152. // Ex. "ext4", "xfs", "ntfs".
  153. // +optional
  154. optional string fsType = 4;
  155. // Attributes of the volume to publish.
  156. // +optional
  157. map<string, string> volumeAttributes = 5;
  158. // ControllerPublishSecretRef is a reference to the secret object containing
  159. // sensitive information to pass to the CSI driver to complete the CSI
  160. // ControllerPublishVolume and ControllerUnpublishVolume calls.
  161. // This field is optional, and may be empty if no secret is required. If the
  162. // secret object contains more than one secret, all secrets are passed.
  163. // +optional
  164. optional SecretReference controllerPublishSecretRef = 6;
  165. // NodeStageSecretRef is a reference to the secret object containing sensitive
  166. // information to pass to the CSI driver to complete the CSI NodeStageVolume
  167. // and NodeStageVolume and NodeUnstageVolume calls.
  168. // This field is optional, and may be empty if no secret is required. If the
  169. // secret object contains more than one secret, all secrets are passed.
  170. // +optional
  171. optional SecretReference nodeStageSecretRef = 7;
  172. // NodePublishSecretRef is a reference to the secret object containing
  173. // sensitive information to pass to the CSI driver to complete the CSI
  174. // NodePublishVolume and NodeUnpublishVolume calls.
  175. // This field is optional, and may be empty if no secret is required. If the
  176. // secret object contains more than one secret, all secrets are passed.
  177. // +optional
  178. optional SecretReference nodePublishSecretRef = 8;
  179. // ControllerExpandSecretRef is a reference to the secret object containing
  180. // sensitive information to pass to the CSI driver to complete the CSI
  181. // ControllerExpandVolume call.
  182. // This is an alpha field and requires enabling ExpandCSIVolumes feature gate.
  183. // This field is optional, and may be empty if no secret is required. If the
  184. // secret object contains more than one secret, all secrets are passed.
  185. // +optional
  186. optional SecretReference controllerExpandSecretRef = 9;
  187. }
  188. // Represents a source location of a volume to mount, managed by an external CSI driver
  189. message CSIVolumeSource {
  190. // Driver is the name of the CSI driver that handles this volume.
  191. // Consult with your admin for the correct name as registered in the cluster.
  192. optional string driver = 1;
  193. // Specifies a read-only configuration for the volume.
  194. // Defaults to false (read/write).
  195. // +optional
  196. optional bool readOnly = 2;
  197. // Filesystem type to mount. Ex. "ext4", "xfs", "ntfs".
  198. // If not provided, the empty value is passed to the associated CSI driver
  199. // which will determine the default filesystem to apply.
  200. // +optional
  201. optional string fsType = 3;
  202. // VolumeAttributes stores driver-specific properties that are passed to the CSI
  203. // driver. Consult your driver's documentation for supported values.
  204. // +optional
  205. map<string, string> volumeAttributes = 4;
  206. // NodePublishSecretRef is a reference to the secret object containing
  207. // sensitive information to pass to the CSI driver to complete the CSI
  208. // NodePublishVolume and NodeUnpublishVolume calls.
  209. // This field is optional, and may be empty if no secret is required. If the
  210. // secret object contains more than one secret, all secret references are passed.
  211. // +optional
  212. optional LocalObjectReference nodePublishSecretRef = 5;
  213. }
  214. // Adds and removes POSIX capabilities from running containers.
  215. message Capabilities {
  216. // Added capabilities
  217. // +optional
  218. repeated string add = 1;
  219. // Removed capabilities
  220. // +optional
  221. repeated string drop = 2;
  222. }
  223. // Represents a Ceph Filesystem mount that lasts the lifetime of a pod
  224. // Cephfs volumes do not support ownership management or SELinux relabeling.
  225. message CephFSPersistentVolumeSource {
  226. // Required: Monitors is a collection of Ceph monitors
  227. // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
  228. repeated string monitors = 1;
  229. // Optional: Used as the mounted root, rather than the full Ceph tree, default is /
  230. // +optional
  231. optional string path = 2;
  232. // Optional: User is the rados user name, default is admin
  233. // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
  234. // +optional
  235. optional string user = 3;
  236. // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret
  237. // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
  238. // +optional
  239. optional string secretFile = 4;
  240. // Optional: SecretRef is reference to the authentication secret for User, default is empty.
  241. // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
  242. // +optional
  243. optional SecretReference secretRef = 5;
  244. // Optional: Defaults to false (read/write). ReadOnly here will force
  245. // the ReadOnly setting in VolumeMounts.
  246. // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
  247. // +optional
  248. optional bool readOnly = 6;
  249. }
  250. // Represents a Ceph Filesystem mount that lasts the lifetime of a pod
  251. // Cephfs volumes do not support ownership management or SELinux relabeling.
  252. message CephFSVolumeSource {
  253. // Required: Monitors is a collection of Ceph monitors
  254. // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
  255. repeated string monitors = 1;
  256. // Optional: Used as the mounted root, rather than the full Ceph tree, default is /
  257. // +optional
  258. optional string path = 2;
  259. // Optional: User is the rados user name, default is admin
  260. // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
  261. // +optional
  262. optional string user = 3;
  263. // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret
  264. // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
  265. // +optional
  266. optional string secretFile = 4;
  267. // Optional: SecretRef is reference to the authentication secret for User, default is empty.
  268. // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
  269. // +optional
  270. optional LocalObjectReference secretRef = 5;
  271. // Optional: Defaults to false (read/write). ReadOnly here will force
  272. // the ReadOnly setting in VolumeMounts.
  273. // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
  274. // +optional
  275. optional bool readOnly = 6;
  276. }
  277. // Represents a cinder volume resource in Openstack.
  278. // A Cinder volume must exist before mounting to a container.
  279. // The volume must also be in the same region as the kubelet.
  280. // Cinder volumes support ownership management and SELinux relabeling.
  281. message CinderPersistentVolumeSource {
  282. // volume id used to identify the volume in cinder.
  283. // More info: https://examples.k8s.io/mysql-cinder-pd/README.md
  284. optional string volumeID = 1;
  285. // Filesystem type to mount.
  286. // Must be a filesystem type supported by the host operating system.
  287. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
  288. // More info: https://examples.k8s.io/mysql-cinder-pd/README.md
  289. // +optional
  290. optional string fsType = 2;
  291. // Optional: Defaults to false (read/write). ReadOnly here will force
  292. // the ReadOnly setting in VolumeMounts.
  293. // More info: https://examples.k8s.io/mysql-cinder-pd/README.md
  294. // +optional
  295. optional bool readOnly = 3;
  296. // Optional: points to a secret object containing parameters used to connect
  297. // to OpenStack.
  298. // +optional
  299. optional SecretReference secretRef = 4;
  300. }
  301. // Represents a cinder volume resource in Openstack.
  302. // A Cinder volume must exist before mounting to a container.
  303. // The volume must also be in the same region as the kubelet.
  304. // Cinder volumes support ownership management and SELinux relabeling.
  305. message CinderVolumeSource {
  306. // volume id used to identify the volume in cinder.
  307. // More info: https://examples.k8s.io/mysql-cinder-pd/README.md
  308. optional string volumeID = 1;
  309. // Filesystem type to mount.
  310. // Must be a filesystem type supported by the host operating system.
  311. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
  312. // More info: https://examples.k8s.io/mysql-cinder-pd/README.md
  313. // +optional
  314. optional string fsType = 2;
  315. // Optional: Defaults to false (read/write). ReadOnly here will force
  316. // the ReadOnly setting in VolumeMounts.
  317. // More info: https://examples.k8s.io/mysql-cinder-pd/README.md
  318. // +optional
  319. optional bool readOnly = 3;
  320. // Optional: points to a secret object containing parameters used to connect
  321. // to OpenStack.
  322. // +optional
  323. optional LocalObjectReference secretRef = 4;
  324. }
  325. // ClientIPConfig represents the configurations of Client IP based session affinity.
  326. message ClientIPConfig {
  327. // timeoutSeconds specifies the seconds of ClientIP type session sticky time.
  328. // The value must be >0 && <=86400(for 1 day) if ServiceAffinity == "ClientIP".
  329. // Default value is 10800(for 3 hours).
  330. // +optional
  331. optional int32 timeoutSeconds = 1;
  332. }
  333. // Information about the condition of a component.
  334. message ComponentCondition {
  335. // Type of condition for a component.
  336. // Valid value: "Healthy"
  337. optional string type = 1;
  338. // Status of the condition for a component.
  339. // Valid values for "Healthy": "True", "False", or "Unknown".
  340. optional string status = 2;
  341. // Message about the condition for a component.
  342. // For example, information about a health check.
  343. // +optional
  344. optional string message = 3;
  345. // Condition error code for a component.
  346. // For example, a health check error code.
  347. // +optional
  348. optional string error = 4;
  349. }
  350. // ComponentStatus (and ComponentStatusList) holds the cluster validation info.
  351. // Deprecated: This API is deprecated in v1.19+
  352. message ComponentStatus {
  353. // Standard object's metadata.
  354. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  355. // +optional
  356. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  357. // List of component conditions observed
  358. // +optional
  359. // +patchMergeKey=type
  360. // +patchStrategy=merge
  361. repeated ComponentCondition conditions = 2;
  362. }
  363. // Status of all the conditions for the component as a list of ComponentStatus objects.
  364. // Deprecated: This API is deprecated in v1.19+
  365. message ComponentStatusList {
  366. // Standard list metadata.
  367. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  368. // +optional
  369. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  370. // List of ComponentStatus objects.
  371. repeated ComponentStatus items = 2;
  372. }
  373. // ConfigMap holds configuration data for pods to consume.
  374. message ConfigMap {
  375. // Standard object's metadata.
  376. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  377. // +optional
  378. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  379. // Immutable, if set to true, ensures that data stored in the ConfigMap cannot
  380. // be updated (only object metadata can be modified).
  381. // If not set to true, the field can be modified at any time.
  382. // Defaulted to nil.
  383. // This is a beta field enabled by ImmutableEphemeralVolumes feature gate.
  384. // +optional
  385. optional bool immutable = 4;
  386. // Data contains the configuration data.
  387. // Each key must consist of alphanumeric characters, '-', '_' or '.'.
  388. // Values with non-UTF-8 byte sequences must use the BinaryData field.
  389. // The keys stored in Data must not overlap with the keys in
  390. // the BinaryData field, this is enforced during validation process.
  391. // +optional
  392. map<string, string> data = 2;
  393. // BinaryData contains the binary data.
  394. // Each key must consist of alphanumeric characters, '-', '_' or '.'.
  395. // BinaryData can contain byte sequences that are not in the UTF-8 range.
  396. // The keys stored in BinaryData must not overlap with the ones in
  397. // the Data field, this is enforced during validation process.
  398. // Using this field will require 1.10+ apiserver and
  399. // kubelet.
  400. // +optional
  401. map<string, bytes> binaryData = 3;
  402. }
  403. // ConfigMapEnvSource selects a ConfigMap to populate the environment
  404. // variables with.
  405. //
  406. // The contents of the target ConfigMap's Data field will represent the
  407. // key-value pairs as environment variables.
  408. message ConfigMapEnvSource {
  409. // The ConfigMap to select from.
  410. optional LocalObjectReference localObjectReference = 1;
  411. // Specify whether the ConfigMap must be defined
  412. // +optional
  413. optional bool optional = 2;
  414. }
  415. // Selects a key from a ConfigMap.
  416. message ConfigMapKeySelector {
  417. // The ConfigMap to select from.
  418. optional LocalObjectReference localObjectReference = 1;
  419. // The key to select.
  420. optional string key = 2;
  421. // Specify whether the ConfigMap or its key must be defined
  422. // +optional
  423. optional bool optional = 3;
  424. }
  425. // ConfigMapList is a resource containing a list of ConfigMap objects.
  426. message ConfigMapList {
  427. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  428. // +optional
  429. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  430. // Items is the list of ConfigMaps.
  431. repeated ConfigMap items = 2;
  432. }
  433. // ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node.
  434. message ConfigMapNodeConfigSource {
  435. // Namespace is the metadata.namespace of the referenced ConfigMap.
  436. // This field is required in all cases.
  437. optional string namespace = 1;
  438. // Name is the metadata.name of the referenced ConfigMap.
  439. // This field is required in all cases.
  440. optional string name = 2;
  441. // UID is the metadata.UID of the referenced ConfigMap.
  442. // This field is forbidden in Node.Spec, and required in Node.Status.
  443. // +optional
  444. optional string uid = 3;
  445. // ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap.
  446. // This field is forbidden in Node.Spec, and required in Node.Status.
  447. // +optional
  448. optional string resourceVersion = 4;
  449. // KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure
  450. // This field is required in all cases.
  451. optional string kubeletConfigKey = 5;
  452. }
  453. // Adapts a ConfigMap into a projected volume.
  454. //
  455. // The contents of the target ConfigMap's Data field will be presented in a
  456. // projected volume as files using the keys in the Data field as the file names,
  457. // unless the items element is populated with specific mappings of keys to paths.
  458. // Note that this is identical to a configmap volume source without the default
  459. // mode.
  460. message ConfigMapProjection {
  461. optional LocalObjectReference localObjectReference = 1;
  462. // If unspecified, each key-value pair in the Data field of the referenced
  463. // ConfigMap will be projected into the volume as a file whose name is the
  464. // key and content is the value. If specified, the listed keys will be
  465. // projected into the specified paths, and unlisted keys will not be
  466. // present. If a key is specified which is not present in the ConfigMap,
  467. // the volume setup will error unless it is marked optional. Paths must be
  468. // relative and may not contain the '..' path or start with '..'.
  469. // +optional
  470. repeated KeyToPath items = 2;
  471. // Specify whether the ConfigMap or its keys must be defined
  472. // +optional
  473. optional bool optional = 4;
  474. }
  475. // Adapts a ConfigMap into a volume.
  476. //
  477. // The contents of the target ConfigMap's Data field will be presented in a
  478. // volume as files using the keys in the Data field as the file names, unless
  479. // the items element is populated with specific mappings of keys to paths.
  480. // ConfigMap volumes support ownership management and SELinux relabeling.
  481. message ConfigMapVolumeSource {
  482. optional LocalObjectReference localObjectReference = 1;
  483. // If unspecified, each key-value pair in the Data field of the referenced
  484. // ConfigMap will be projected into the volume as a file whose name is the
  485. // key and content is the value. If specified, the listed keys will be
  486. // projected into the specified paths, and unlisted keys will not be
  487. // present. If a key is specified which is not present in the ConfigMap,
  488. // the volume setup will error unless it is marked optional. Paths must be
  489. // relative and may not contain the '..' path or start with '..'.
  490. // +optional
  491. repeated KeyToPath items = 2;
  492. // Optional: mode bits used to set permissions on created files by default.
  493. // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
  494. // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
  495. // Defaults to 0644.
  496. // Directories within the path are not affected by this setting.
  497. // This might be in conflict with other options that affect the file
  498. // mode, like fsGroup, and the result can be other mode bits set.
  499. // +optional
  500. optional int32 defaultMode = 3;
  501. // Specify whether the ConfigMap or its keys must be defined
  502. // +optional
  503. optional bool optional = 4;
  504. }
  505. // A single application container that you want to run within a pod.
  506. message Container {
  507. // Name of the container specified as a DNS_LABEL.
  508. // Each container in a pod must have a unique name (DNS_LABEL).
  509. // Cannot be updated.
  510. optional string name = 1;
  511. // Docker image name.
  512. // More info: https://kubernetes.io/docs/concepts/containers/images
  513. // This field is optional to allow higher level config management to default or override
  514. // container images in workload controllers like Deployments and StatefulSets.
  515. // +optional
  516. optional string image = 2;
  517. // Entrypoint array. Not executed within a shell.
  518. // The docker image's ENTRYPOINT is used if this is not provided.
  519. // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
  520. // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
  521. // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
  522. // regardless of whether the variable exists or not.
  523. // Cannot be updated.
  524. // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
  525. // +optional
  526. repeated string command = 3;
  527. // Arguments to the entrypoint.
  528. // The docker image's CMD is used if this is not provided.
  529. // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
  530. // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
  531. // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
  532. // regardless of whether the variable exists or not.
  533. // Cannot be updated.
  534. // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
  535. // +optional
  536. repeated string args = 4;
  537. // Container's working directory.
  538. // If not specified, the container runtime's default will be used, which
  539. // might be configured in the container image.
  540. // Cannot be updated.
  541. // +optional
  542. optional string workingDir = 5;
  543. // List of ports to expose from the container. Exposing a port here gives
  544. // the system additional information about the network connections a
  545. // container uses, but is primarily informational. Not specifying a port here
  546. // DOES NOT prevent that port from being exposed. Any port which is
  547. // listening on the default "0.0.0.0" address inside a container will be
  548. // accessible from the network.
  549. // Cannot be updated.
  550. // +optional
  551. // +patchMergeKey=containerPort
  552. // +patchStrategy=merge
  553. // +listType=map
  554. // +listMapKey=containerPort
  555. // +listMapKey=protocol
  556. repeated ContainerPort ports = 6;
  557. // List of sources to populate environment variables in the container.
  558. // The keys defined within a source must be a C_IDENTIFIER. All invalid keys
  559. // will be reported as an event when the container is starting. When a key exists in multiple
  560. // sources, the value associated with the last source will take precedence.
  561. // Values defined by an Env with a duplicate key will take precedence.
  562. // Cannot be updated.
  563. // +optional
  564. repeated EnvFromSource envFrom = 19;
  565. // List of environment variables to set in the container.
  566. // Cannot be updated.
  567. // +optional
  568. // +patchMergeKey=name
  569. // +patchStrategy=merge
  570. repeated EnvVar env = 7;
  571. // Compute Resources required by this container.
  572. // Cannot be updated.
  573. // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
  574. // +optional
  575. optional ResourceRequirements resources = 8;
  576. // Pod volumes to mount into the container's filesystem.
  577. // Cannot be updated.
  578. // +optional
  579. // +patchMergeKey=mountPath
  580. // +patchStrategy=merge
  581. repeated VolumeMount volumeMounts = 9;
  582. // volumeDevices is the list of block devices to be used by the container.
  583. // +patchMergeKey=devicePath
  584. // +patchStrategy=merge
  585. // +optional
  586. repeated VolumeDevice volumeDevices = 21;
  587. // Periodic probe of container liveness.
  588. // Container will be restarted if the probe fails.
  589. // Cannot be updated.
  590. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
  591. // +optional
  592. optional Probe livenessProbe = 10;
  593. // Periodic probe of container service readiness.
  594. // Container will be removed from service endpoints if the probe fails.
  595. // Cannot be updated.
  596. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
  597. // +optional
  598. optional Probe readinessProbe = 11;
  599. // StartupProbe indicates that the Pod has successfully initialized.
  600. // If specified, no other probes are executed until this completes successfully.
  601. // If this probe fails, the Pod will be restarted, just as if the livenessProbe failed.
  602. // This can be used to provide different probe parameters at the beginning of a Pod's lifecycle,
  603. // when it might take a long time to load data or warm a cache, than during steady-state operation.
  604. // This cannot be updated.
  605. // This is a beta feature enabled by the StartupProbe feature flag.
  606. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
  607. // +optional
  608. optional Probe startupProbe = 22;
  609. // Actions that the management system should take in response to container lifecycle events.
  610. // Cannot be updated.
  611. // +optional
  612. optional Lifecycle lifecycle = 12;
  613. // Optional: Path at which the file to which the container's termination message
  614. // will be written is mounted into the container's filesystem.
  615. // Message written is intended to be brief final status, such as an assertion failure message.
  616. // Will be truncated by the node if greater than 4096 bytes. The total message length across
  617. // all containers will be limited to 12kb.
  618. // Defaults to /dev/termination-log.
  619. // Cannot be updated.
  620. // +optional
  621. optional string terminationMessagePath = 13;
  622. // Indicate how the termination message should be populated. File will use the contents of
  623. // terminationMessagePath to populate the container status message on both success and failure.
  624. // FallbackToLogsOnError will use the last chunk of container log output if the termination
  625. // message file is empty and the container exited with an error.
  626. // The log output is limited to 2048 bytes or 80 lines, whichever is smaller.
  627. // Defaults to File.
  628. // Cannot be updated.
  629. // +optional
  630. optional string terminationMessagePolicy = 20;
  631. // Image pull policy.
  632. // One of Always, Never, IfNotPresent.
  633. // Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
  634. // Cannot be updated.
  635. // More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
  636. // +optional
  637. optional string imagePullPolicy = 14;
  638. // Security options the pod should run with.
  639. // More info: https://kubernetes.io/docs/concepts/policy/security-context/
  640. // More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
  641. // +optional
  642. optional SecurityContext securityContext = 15;
  643. // Whether this container should allocate a buffer for stdin in the container runtime. If this
  644. // is not set, reads from stdin in the container will always result in EOF.
  645. // Default is false.
  646. // +optional
  647. optional bool stdin = 16;
  648. // Whether the container runtime should close the stdin channel after it has been opened by
  649. // a single attach. When stdin is true the stdin stream will remain open across multiple attach
  650. // sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the
  651. // first client attaches to stdin, and then remains open and accepts data until the client disconnects,
  652. // at which time stdin is closed and remains closed until the container is restarted. If this
  653. // flag is false, a container processes that reads from stdin will never receive an EOF.
  654. // Default is false
  655. // +optional
  656. optional bool stdinOnce = 17;
  657. // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true.
  658. // Default is false.
  659. // +optional
  660. optional bool tty = 18;
  661. }
  662. // Describe a container image
  663. message ContainerImage {
  664. // Names by which this image is known.
  665. // e.g. ["k8s.gcr.io/hyperkube:v1.0.7", "dockerhub.io/google_containers/hyperkube:v1.0.7"]
  666. repeated string names = 1;
  667. // The size of the image in bytes.
  668. // +optional
  669. optional int64 sizeBytes = 2;
  670. }
  671. // ContainerPort represents a network port in a single container.
  672. message ContainerPort {
  673. // If specified, this must be an IANA_SVC_NAME and unique within the pod. Each
  674. // named port in a pod must have a unique name. Name for the port that can be
  675. // referred to by services.
  676. // +optional
  677. optional string name = 1;
  678. // Number of port to expose on the host.
  679. // If specified, this must be a valid port number, 0 < x < 65536.
  680. // If HostNetwork is specified, this must match ContainerPort.
  681. // Most containers do not need this.
  682. // +optional
  683. optional int32 hostPort = 2;
  684. // Number of port to expose on the pod's IP address.
  685. // This must be a valid port number, 0 < x < 65536.
  686. optional int32 containerPort = 3;
  687. // Protocol for port. Must be UDP, TCP, or SCTP.
  688. // Defaults to "TCP".
  689. // +optional
  690. optional string protocol = 4;
  691. // What host IP to bind the external port to.
  692. // +optional
  693. optional string hostIP = 5;
  694. }
  695. // ContainerState holds a possible state of container.
  696. // Only one of its members may be specified.
  697. // If none of them is specified, the default one is ContainerStateWaiting.
  698. message ContainerState {
  699. // Details about a waiting container
  700. // +optional
  701. optional ContainerStateWaiting waiting = 1;
  702. // Details about a running container
  703. // +optional
  704. optional ContainerStateRunning running = 2;
  705. // Details about a terminated container
  706. // +optional
  707. optional ContainerStateTerminated terminated = 3;
  708. }
  709. // ContainerStateRunning is a running state of a container.
  710. message ContainerStateRunning {
  711. // Time at which the container was last (re-)started
  712. // +optional
  713. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 1;
  714. }
  715. // ContainerStateTerminated is a terminated state of a container.
  716. message ContainerStateTerminated {
  717. // Exit status from the last termination of the container
  718. optional int32 exitCode = 1;
  719. // Signal from the last termination of the container
  720. // +optional
  721. optional int32 signal = 2;
  722. // (brief) reason from the last termination of the container
  723. // +optional
  724. optional string reason = 3;
  725. // Message regarding the last termination of the container
  726. // +optional
  727. optional string message = 4;
  728. // Time at which previous execution of the container started
  729. // +optional
  730. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 5;
  731. // Time at which the container last terminated
  732. // +optional
  733. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time finishedAt = 6;
  734. // Container's ID in the format 'docker://<container_id>'
  735. // +optional
  736. optional string containerID = 7;
  737. }
  738. // ContainerStateWaiting is a waiting state of a container.
  739. message ContainerStateWaiting {
  740. // (brief) reason the container is not yet running.
  741. // +optional
  742. optional string reason = 1;
  743. // Message regarding why the container is not yet running.
  744. // +optional
  745. optional string message = 2;
  746. }
  747. // ContainerStatus contains details for the current status of this container.
  748. message ContainerStatus {
  749. // This must be a DNS_LABEL. Each container in a pod must have a unique name.
  750. // Cannot be updated.
  751. optional string name = 1;
  752. // Details about the container's current condition.
  753. // +optional
  754. optional ContainerState state = 2;
  755. // Details about the container's last termination condition.
  756. // +optional
  757. optional ContainerState lastState = 3;
  758. // Specifies whether the container has passed its readiness probe.
  759. optional bool ready = 4;
  760. // The number of times the container has been restarted, currently based on
  761. // the number of dead containers that have not yet been removed.
  762. // Note that this is calculated from dead containers. But those containers are subject to
  763. // garbage collection. This value will get capped at 5 by GC.
  764. optional int32 restartCount = 5;
  765. // The image the container is running.
  766. // More info: https://kubernetes.io/docs/concepts/containers/images
  767. // TODO(dchen1107): Which image the container is running with?
  768. optional string image = 6;
  769. // ImageID of the container's image.
  770. optional string imageID = 7;
  771. // Container's ID in the format 'docker://<container_id>'.
  772. // +optional
  773. optional string containerID = 8;
  774. // Specifies whether the container has passed its startup probe.
  775. // Initialized as false, becomes true after startupProbe is considered successful.
  776. // Resets to false when the container is restarted, or if kubelet loses state temporarily.
  777. // Is always true when no startupProbe is defined.
  778. // +optional
  779. optional bool started = 9;
  780. }
  781. // DaemonEndpoint contains information about a single Daemon endpoint.
  782. message DaemonEndpoint {
  783. // Port number of the given endpoint.
  784. optional int32 Port = 1;
  785. }
  786. // Represents downward API info for projecting into a projected volume.
  787. // Note that this is identical to a downwardAPI volume source without the default
  788. // mode.
  789. message DownwardAPIProjection {
  790. // Items is a list of DownwardAPIVolume file
  791. // +optional
  792. repeated DownwardAPIVolumeFile items = 1;
  793. }
  794. // DownwardAPIVolumeFile represents information to create the file containing the pod field
  795. message DownwardAPIVolumeFile {
  796. // Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'
  797. optional string path = 1;
  798. // Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.
  799. // +optional
  800. optional ObjectFieldSelector fieldRef = 2;
  801. // Selects a resource of the container: only resources limits and requests
  802. // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
  803. // +optional
  804. optional ResourceFieldSelector resourceFieldRef = 3;
  805. // Optional: mode bits used to set permissions on this file, must be an octal value
  806. // between 0000 and 0777 or a decimal value between 0 and 511.
  807. // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
  808. // If not specified, the volume defaultMode will be used.
  809. // This might be in conflict with other options that affect the file
  810. // mode, like fsGroup, and the result can be other mode bits set.
  811. // +optional
  812. optional int32 mode = 4;
  813. }
  814. // DownwardAPIVolumeSource represents a volume containing downward API info.
  815. // Downward API volumes support ownership management and SELinux relabeling.
  816. message DownwardAPIVolumeSource {
  817. // Items is a list of downward API volume file
  818. // +optional
  819. repeated DownwardAPIVolumeFile items = 1;
  820. // Optional: mode bits to use on created files by default. Must be a
  821. // Optional: mode bits used to set permissions on created files by default.
  822. // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
  823. // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
  824. // Defaults to 0644.
  825. // Directories within the path are not affected by this setting.
  826. // This might be in conflict with other options that affect the file
  827. // mode, like fsGroup, and the result can be other mode bits set.
  828. // +optional
  829. optional int32 defaultMode = 2;
  830. }
  831. // Represents an empty directory for a pod.
  832. // Empty directory volumes support ownership management and SELinux relabeling.
  833. message EmptyDirVolumeSource {
  834. // What type of storage medium should back this directory.
  835. // The default is "" which means to use the node's default medium.
  836. // Must be an empty string (default) or Memory.
  837. // More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
  838. // +optional
  839. optional string medium = 1;
  840. // Total amount of local storage required for this EmptyDir volume.
  841. // The size limit is also applicable for memory medium.
  842. // The maximum usage on memory medium EmptyDir would be the minimum value between
  843. // the SizeLimit specified here and the sum of memory limits of all containers in a pod.
  844. // The default is nil which means that the limit is undefined.
  845. // More info: http://kubernetes.io/docs/user-guide/volumes#emptydir
  846. // +optional
  847. optional k8s.io.apimachinery.pkg.api.resource.Quantity sizeLimit = 2;
  848. }
  849. // EndpointAddress is a tuple that describes single IP address.
  850. message EndpointAddress {
  851. // The IP of this endpoint.
  852. // May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16),
  853. // or link-local multicast ((224.0.0.0/24).
  854. // IPv6 is also accepted but not fully supported on all platforms. Also, certain
  855. // kubernetes components, like kube-proxy, are not IPv6 ready.
  856. // TODO: This should allow hostname or IP, See #4447.
  857. optional string ip = 1;
  858. // The Hostname of this endpoint
  859. // +optional
  860. optional string hostname = 3;
  861. // Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.
  862. // +optional
  863. optional string nodeName = 4;
  864. // Reference to object providing the endpoint.
  865. // +optional
  866. optional ObjectReference targetRef = 2;
  867. }
  868. // EndpointPort is a tuple that describes a single port.
  869. message EndpointPort {
  870. // The name of this port. This must match the 'name' field in the
  871. // corresponding ServicePort.
  872. // Must be a DNS_LABEL.
  873. // Optional only if one port is defined.
  874. // +optional
  875. optional string name = 1;
  876. // The port number of the endpoint.
  877. optional int32 port = 2;
  878. // The IP protocol for this port.
  879. // Must be UDP, TCP, or SCTP.
  880. // Default is TCP.
  881. // +optional
  882. optional string protocol = 3;
  883. // The application protocol for this port.
  884. // This field follows standard Kubernetes label syntax.
  885. // Un-prefixed names are reserved for IANA standard service names (as per
  886. // RFC-6335 and http://www.iana.org/assignments/service-names).
  887. // Non-standard protocols should use prefixed names such as
  888. // mycompany.com/my-custom-protocol.
  889. // This is a beta field that is guarded by the ServiceAppProtocol feature
  890. // gate and enabled by default.
  891. // +optional
  892. optional string appProtocol = 4;
  893. }
  894. // EndpointSubset is a group of addresses with a common set of ports. The
  895. // expanded set of endpoints is the Cartesian product of Addresses x Ports.
  896. // For example, given:
  897. // {
  898. // Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
  899. // Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
  900. // }
  901. // The resulting set of endpoints can be viewed as:
  902. // a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],
  903. // b: [ 10.10.1.1:309, 10.10.2.2:309 ]
  904. message EndpointSubset {
  905. // IP addresses which offer the related ports that are marked as ready. These endpoints
  906. // should be considered safe for load balancers and clients to utilize.
  907. // +optional
  908. repeated EndpointAddress addresses = 1;
  909. // IP addresses which offer the related ports but are not currently marked as ready
  910. // because they have not yet finished starting, have recently failed a readiness check,
  911. // or have recently failed a liveness check.
  912. // +optional
  913. repeated EndpointAddress notReadyAddresses = 2;
  914. // Port numbers available on the related IP addresses.
  915. // +optional
  916. repeated EndpointPort ports = 3;
  917. }
  918. // Endpoints is a collection of endpoints that implement the actual service. Example:
  919. // Name: "mysvc",
  920. // Subsets: [
  921. // {
  922. // Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
  923. // Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
  924. // },
  925. // {
  926. // Addresses: [{"ip": "10.10.3.3"}],
  927. // Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}]
  928. // },
  929. // ]
  930. message Endpoints {
  931. // Standard object's metadata.
  932. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  933. // +optional
  934. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  935. // The set of all endpoints is the union of all subsets. Addresses are placed into
  936. // subsets according to the IPs they share. A single address with multiple ports,
  937. // some of which are ready and some of which are not (because they come from
  938. // different containers) will result in the address being displayed in different
  939. // subsets for the different ports. No address will appear in both Addresses and
  940. // NotReadyAddresses in the same subset.
  941. // Sets of addresses and ports that comprise a service.
  942. // +optional
  943. repeated EndpointSubset subsets = 2;
  944. }
  945. // EndpointsList is a list of endpoints.
  946. message EndpointsList {
  947. // Standard list metadata.
  948. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  949. // +optional
  950. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  951. // List of endpoints.
  952. repeated Endpoints items = 2;
  953. }
  954. // EnvFromSource represents the source of a set of ConfigMaps
  955. message EnvFromSource {
  956. // An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.
  957. // +optional
  958. optional string prefix = 1;
  959. // The ConfigMap to select from
  960. // +optional
  961. optional ConfigMapEnvSource configMapRef = 2;
  962. // The Secret to select from
  963. // +optional
  964. optional SecretEnvSource secretRef = 3;
  965. }
  966. // EnvVar represents an environment variable present in a Container.
  967. message EnvVar {
  968. // Name of the environment variable. Must be a C_IDENTIFIER.
  969. optional string name = 1;
  970. // Variable references $(VAR_NAME) are expanded
  971. // using the previous defined environment variables in the container and
  972. // any service environment variables. If a variable cannot be resolved,
  973. // the reference in the input string will be unchanged. The $(VAR_NAME)
  974. // syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped
  975. // references will never be expanded, regardless of whether the variable
  976. // exists or not.
  977. // Defaults to "".
  978. // +optional
  979. optional string value = 2;
  980. // Source for the environment variable's value. Cannot be used if value is not empty.
  981. // +optional
  982. optional EnvVarSource valueFrom = 3;
  983. }
  984. // EnvVarSource represents a source for the value of an EnvVar.
  985. message EnvVarSource {
  986. // Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
  987. // spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
  988. // +optional
  989. optional ObjectFieldSelector fieldRef = 1;
  990. // Selects a resource of the container: only resources limits and requests
  991. // (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
  992. // +optional
  993. optional ResourceFieldSelector resourceFieldRef = 2;
  994. // Selects a key of a ConfigMap.
  995. // +optional
  996. optional ConfigMapKeySelector configMapKeyRef = 3;
  997. // Selects a key of a secret in the pod's namespace
  998. // +optional
  999. optional SecretKeySelector secretKeyRef = 4;
  1000. }
  1001. // An EphemeralContainer is a container that may be added temporarily to an existing pod for
  1002. // user-initiated activities such as debugging. Ephemeral containers have no resource or
  1003. // scheduling guarantees, and they will not be restarted when they exit or when a pod is
  1004. // removed or restarted. If an ephemeral container causes a pod to exceed its resource
  1005. // allocation, the pod may be evicted.
  1006. // Ephemeral containers may not be added by directly updating the pod spec. They must be added
  1007. // via the pod's ephemeralcontainers subresource, and they will appear in the pod spec
  1008. // once added.
  1009. // This is an alpha feature enabled by the EphemeralContainers feature flag.
  1010. message EphemeralContainer {
  1011. // Ephemeral containers have all of the fields of Container, plus additional fields
  1012. // specific to ephemeral containers. Fields in common with Container are in the
  1013. // following inlined struct so than an EphemeralContainer may easily be converted
  1014. // to a Container.
  1015. optional EphemeralContainerCommon ephemeralContainerCommon = 1;
  1016. // If set, the name of the container from PodSpec that this ephemeral container targets.
  1017. // The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container.
  1018. // If not set then the ephemeral container is run in whatever namespaces are shared
  1019. // for the pod. Note that the container runtime must support this feature.
  1020. // +optional
  1021. optional string targetContainerName = 2;
  1022. }
  1023. // EphemeralContainerCommon is a copy of all fields in Container to be inlined in
  1024. // EphemeralContainer. This separate type allows easy conversion from EphemeralContainer
  1025. // to Container and allows separate documentation for the fields of EphemeralContainer.
  1026. // When a new field is added to Container it must be added here as well.
  1027. message EphemeralContainerCommon {
  1028. // Name of the ephemeral container specified as a DNS_LABEL.
  1029. // This name must be unique among all containers, init containers and ephemeral containers.
  1030. optional string name = 1;
  1031. // Docker image name.
  1032. // More info: https://kubernetes.io/docs/concepts/containers/images
  1033. optional string image = 2;
  1034. // Entrypoint array. Not executed within a shell.
  1035. // The docker image's ENTRYPOINT is used if this is not provided.
  1036. // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
  1037. // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
  1038. // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
  1039. // regardless of whether the variable exists or not.
  1040. // Cannot be updated.
  1041. // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
  1042. // +optional
  1043. repeated string command = 3;
  1044. // Arguments to the entrypoint.
  1045. // The docker image's CMD is used if this is not provided.
  1046. // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
  1047. // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
  1048. // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
  1049. // regardless of whether the variable exists or not.
  1050. // Cannot be updated.
  1051. // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
  1052. // +optional
  1053. repeated string args = 4;
  1054. // Container's working directory.
  1055. // If not specified, the container runtime's default will be used, which
  1056. // might be configured in the container image.
  1057. // Cannot be updated.
  1058. // +optional
  1059. optional string workingDir = 5;
  1060. // Ports are not allowed for ephemeral containers.
  1061. repeated ContainerPort ports = 6;
  1062. // List of sources to populate environment variables in the container.
  1063. // The keys defined within a source must be a C_IDENTIFIER. All invalid keys
  1064. // will be reported as an event when the container is starting. When a key exists in multiple
  1065. // sources, the value associated with the last source will take precedence.
  1066. // Values defined by an Env with a duplicate key will take precedence.
  1067. // Cannot be updated.
  1068. // +optional
  1069. repeated EnvFromSource envFrom = 19;
  1070. // List of environment variables to set in the container.
  1071. // Cannot be updated.
  1072. // +optional
  1073. // +patchMergeKey=name
  1074. // +patchStrategy=merge
  1075. repeated EnvVar env = 7;
  1076. // Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources
  1077. // already allocated to the pod.
  1078. // +optional
  1079. optional ResourceRequirements resources = 8;
  1080. // Pod volumes to mount into the container's filesystem.
  1081. // Cannot be updated.
  1082. // +optional
  1083. // +patchMergeKey=mountPath
  1084. // +patchStrategy=merge
  1085. repeated VolumeMount volumeMounts = 9;
  1086. // volumeDevices is the list of block devices to be used by the container.
  1087. // +patchMergeKey=devicePath
  1088. // +patchStrategy=merge
  1089. // +optional
  1090. repeated VolumeDevice volumeDevices = 21;
  1091. // Probes are not allowed for ephemeral containers.
  1092. // +optional
  1093. optional Probe livenessProbe = 10;
  1094. // Probes are not allowed for ephemeral containers.
  1095. // +optional
  1096. optional Probe readinessProbe = 11;
  1097. // Probes are not allowed for ephemeral containers.
  1098. // +optional
  1099. optional Probe startupProbe = 22;
  1100. // Lifecycle is not allowed for ephemeral containers.
  1101. // +optional
  1102. optional Lifecycle lifecycle = 12;
  1103. // Optional: Path at which the file to which the container's termination message
  1104. // will be written is mounted into the container's filesystem.
  1105. // Message written is intended to be brief final status, such as an assertion failure message.
  1106. // Will be truncated by the node if greater than 4096 bytes. The total message length across
  1107. // all containers will be limited to 12kb.
  1108. // Defaults to /dev/termination-log.
  1109. // Cannot be updated.
  1110. // +optional
  1111. optional string terminationMessagePath = 13;
  1112. // Indicate how the termination message should be populated. File will use the contents of
  1113. // terminationMessagePath to populate the container status message on both success and failure.
  1114. // FallbackToLogsOnError will use the last chunk of container log output if the termination
  1115. // message file is empty and the container exited with an error.
  1116. // The log output is limited to 2048 bytes or 80 lines, whichever is smaller.
  1117. // Defaults to File.
  1118. // Cannot be updated.
  1119. // +optional
  1120. optional string terminationMessagePolicy = 20;
  1121. // Image pull policy.
  1122. // One of Always, Never, IfNotPresent.
  1123. // Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
  1124. // Cannot be updated.
  1125. // More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
  1126. // +optional
  1127. optional string imagePullPolicy = 14;
  1128. // SecurityContext is not allowed for ephemeral containers.
  1129. // +optional
  1130. optional SecurityContext securityContext = 15;
  1131. // Whether this container should allocate a buffer for stdin in the container runtime. If this
  1132. // is not set, reads from stdin in the container will always result in EOF.
  1133. // Default is false.
  1134. // +optional
  1135. optional bool stdin = 16;
  1136. // Whether the container runtime should close the stdin channel after it has been opened by
  1137. // a single attach. When stdin is true the stdin stream will remain open across multiple attach
  1138. // sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the
  1139. // first client attaches to stdin, and then remains open and accepts data until the client disconnects,
  1140. // at which time stdin is closed and remains closed until the container is restarted. If this
  1141. // flag is false, a container processes that reads from stdin will never receive an EOF.
  1142. // Default is false
  1143. // +optional
  1144. optional bool stdinOnce = 17;
  1145. // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true.
  1146. // Default is false.
  1147. // +optional
  1148. optional bool tty = 18;
  1149. }
  1150. // A list of ephemeral containers used with the Pod ephemeralcontainers subresource.
  1151. message EphemeralContainers {
  1152. // +optional
  1153. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  1154. // A list of ephemeral containers associated with this pod. New ephemeral containers
  1155. // may be appended to this list, but existing ephemeral containers may not be removed
  1156. // or modified.
  1157. // +patchMergeKey=name
  1158. // +patchStrategy=merge
  1159. repeated EphemeralContainer ephemeralContainers = 2;
  1160. }
  1161. // Represents an ephemeral volume that is handled by a normal storage driver.
  1162. message EphemeralVolumeSource {
  1163. // Will be used to create a stand-alone PVC to provision the volume.
  1164. // The pod in which this EphemeralVolumeSource is embedded will be the
  1165. // owner of the PVC, i.e. the PVC will be deleted together with the
  1166. // pod. The name of the PVC will be `<pod name>-<volume name>` where
  1167. // `<volume name>` is the name from the `PodSpec.Volumes` array
  1168. // entry. Pod validation will reject the pod if the concatenated name
  1169. // is not valid for a PVC (for example, too long).
  1170. //
  1171. // An existing PVC with that name that is not owned by the pod
  1172. // will *not* be used for the pod to avoid using an unrelated
  1173. // volume by mistake. Starting the pod is then blocked until
  1174. // the unrelated PVC is removed. If such a pre-created PVC is
  1175. // meant to be used by the pod, the PVC has to updated with an
  1176. // owner reference to the pod once the pod exists. Normally
  1177. // this should not be necessary, but it may be useful when
  1178. // manually reconstructing a broken cluster.
  1179. //
  1180. // This field is read-only and no changes will be made by Kubernetes
  1181. // to the PVC after it has been created.
  1182. //
  1183. // Required, must not be nil.
  1184. optional PersistentVolumeClaimTemplate volumeClaimTemplate = 1;
  1185. // Specifies a read-only configuration for the volume.
  1186. // Defaults to false (read/write).
  1187. // +optional
  1188. optional bool readOnly = 2;
  1189. }
  1190. // Event is a report of an event somewhere in the cluster.
  1191. message Event {
  1192. // Standard object's metadata.
  1193. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  1194. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  1195. // The object that this event is about.
  1196. optional ObjectReference involvedObject = 2;
  1197. // This should be a short, machine understandable string that gives the reason
  1198. // for the transition into the object's current status.
  1199. // TODO: provide exact specification for format.
  1200. // +optional
  1201. optional string reason = 3;
  1202. // A human-readable description of the status of this operation.
  1203. // TODO: decide on maximum length.
  1204. // +optional
  1205. optional string message = 4;
  1206. // The component reporting this event. Should be a short machine understandable string.
  1207. // +optional
  1208. optional EventSource source = 5;
  1209. // The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)
  1210. // +optional
  1211. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time firstTimestamp = 6;
  1212. // The time at which the most recent occurrence of this event was recorded.
  1213. // +optional
  1214. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTimestamp = 7;
  1215. // The number of times this event has occurred.
  1216. // +optional
  1217. optional int32 count = 8;
  1218. // Type of this event (Normal, Warning), new types could be added in the future
  1219. // +optional
  1220. optional string type = 9;
  1221. // Time when this Event was first observed.
  1222. // +optional
  1223. optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime eventTime = 10;
  1224. // Data about the Event series this event represents or nil if it's a singleton Event.
  1225. // +optional
  1226. optional EventSeries series = 11;
  1227. // What action was taken/failed regarding to the Regarding object.
  1228. // +optional
  1229. optional string action = 12;
  1230. // Optional secondary object for more complex actions.
  1231. // +optional
  1232. optional ObjectReference related = 13;
  1233. // Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
  1234. // +optional
  1235. optional string reportingComponent = 14;
  1236. // ID of the controller instance, e.g. `kubelet-xyzf`.
  1237. // +optional
  1238. optional string reportingInstance = 15;
  1239. }
  1240. // EventList is a list of events.
  1241. message EventList {
  1242. // Standard list metadata.
  1243. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  1244. // +optional
  1245. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  1246. // List of events
  1247. repeated Event items = 2;
  1248. }
  1249. // EventSeries contain information on series of events, i.e. thing that was/is happening
  1250. // continuously for some time.
  1251. message EventSeries {
  1252. // Number of occurrences in this series up to the last heartbeat time
  1253. optional int32 count = 1;
  1254. // Time of the last occurrence observed
  1255. optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime lastObservedTime = 2;
  1256. }
  1257. // EventSource contains information for an event.
  1258. message EventSource {
  1259. // Component from which the event is generated.
  1260. // +optional
  1261. optional string component = 1;
  1262. // Node name on which the event is generated.
  1263. // +optional
  1264. optional string host = 2;
  1265. }
  1266. // ExecAction describes a "run in container" action.
  1267. message ExecAction {
  1268. // Command is the command line to execute inside the container, the working directory for the
  1269. // command is root ('/') in the container's filesystem. The command is simply exec'd, it is
  1270. // not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use
  1271. // a shell, you need to explicitly call out to that shell.
  1272. // Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
  1273. // +optional
  1274. repeated string command = 1;
  1275. }
  1276. // Represents a Fibre Channel volume.
  1277. // Fibre Channel volumes can only be mounted as read/write once.
  1278. // Fibre Channel volumes support ownership management and SELinux relabeling.
  1279. message FCVolumeSource {
  1280. // Optional: FC target worldwide names (WWNs)
  1281. // +optional
  1282. repeated string targetWWNs = 1;
  1283. // Optional: FC target lun number
  1284. // +optional
  1285. optional int32 lun = 2;
  1286. // Filesystem type to mount.
  1287. // Must be a filesystem type supported by the host operating system.
  1288. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
  1289. // TODO: how do we prevent errors in the filesystem from compromising the machine
  1290. // +optional
  1291. optional string fsType = 3;
  1292. // Optional: Defaults to false (read/write). ReadOnly here will force
  1293. // the ReadOnly setting in VolumeMounts.
  1294. // +optional
  1295. optional bool readOnly = 4;
  1296. // Optional: FC volume world wide identifiers (wwids)
  1297. // Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.
  1298. // +optional
  1299. repeated string wwids = 5;
  1300. }
  1301. // FlexPersistentVolumeSource represents a generic persistent volume resource that is
  1302. // provisioned/attached using an exec based plugin.
  1303. message FlexPersistentVolumeSource {
  1304. // Driver is the name of the driver to use for this volume.
  1305. optional string driver = 1;
  1306. // Filesystem type to mount.
  1307. // Must be a filesystem type supported by the host operating system.
  1308. // Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script.
  1309. // +optional
  1310. optional string fsType = 2;
  1311. // Optional: SecretRef is reference to the secret object containing
  1312. // sensitive information to pass to the plugin scripts. This may be
  1313. // empty if no secret object is specified. If the secret object
  1314. // contains more than one secret, all secrets are passed to the plugin
  1315. // scripts.
  1316. // +optional
  1317. optional SecretReference secretRef = 3;
  1318. // Optional: Defaults to false (read/write). ReadOnly here will force
  1319. // the ReadOnly setting in VolumeMounts.
  1320. // +optional
  1321. optional bool readOnly = 4;
  1322. // Optional: Extra command options if any.
  1323. // +optional
  1324. map<string, string> options = 5;
  1325. }
  1326. // FlexVolume represents a generic volume resource that is
  1327. // provisioned/attached using an exec based plugin.
  1328. message FlexVolumeSource {
  1329. // Driver is the name of the driver to use for this volume.
  1330. optional string driver = 1;
  1331. // Filesystem type to mount.
  1332. // Must be a filesystem type supported by the host operating system.
  1333. // Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script.
  1334. // +optional
  1335. optional string fsType = 2;
  1336. // Optional: SecretRef is reference to the secret object containing
  1337. // sensitive information to pass to the plugin scripts. This may be
  1338. // empty if no secret object is specified. If the secret object
  1339. // contains more than one secret, all secrets are passed to the plugin
  1340. // scripts.
  1341. // +optional
  1342. optional LocalObjectReference secretRef = 3;
  1343. // Optional: Defaults to false (read/write). ReadOnly here will force
  1344. // the ReadOnly setting in VolumeMounts.
  1345. // +optional
  1346. optional bool readOnly = 4;
  1347. // Optional: Extra command options if any.
  1348. // +optional
  1349. map<string, string> options = 5;
  1350. }
  1351. // Represents a Flocker volume mounted by the Flocker agent.
  1352. // One and only one of datasetName and datasetUUID should be set.
  1353. // Flocker volumes do not support ownership management or SELinux relabeling.
  1354. message FlockerVolumeSource {
  1355. // Name of the dataset stored as metadata -> name on the dataset for Flocker
  1356. // should be considered as deprecated
  1357. // +optional
  1358. optional string datasetName = 1;
  1359. // UUID of the dataset. This is unique identifier of a Flocker dataset
  1360. // +optional
  1361. optional string datasetUUID = 2;
  1362. }
  1363. // Represents a Persistent Disk resource in Google Compute Engine.
  1364. //
  1365. // A GCE PD must exist before mounting to a container. The disk must
  1366. // also be in the same GCE project and zone as the kubelet. A GCE PD
  1367. // can only be mounted as read/write once or read-only many times. GCE
  1368. // PDs support ownership management and SELinux relabeling.
  1369. message GCEPersistentDiskVolumeSource {
  1370. // Unique name of the PD resource in GCE. Used to identify the disk in GCE.
  1371. // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
  1372. optional string pdName = 1;
  1373. // Filesystem type of the volume that you want to mount.
  1374. // Tip: Ensure that the filesystem type is supported by the host operating system.
  1375. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
  1376. // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
  1377. // TODO: how do we prevent errors in the filesystem from compromising the machine
  1378. // +optional
  1379. optional string fsType = 2;
  1380. // The partition in the volume that you want to mount.
  1381. // If omitted, the default is to mount by volume name.
  1382. // Examples: For volume /dev/sda1, you specify the partition as "1".
  1383. // Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).
  1384. // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
  1385. // +optional
  1386. optional int32 partition = 3;
  1387. // ReadOnly here will force the ReadOnly setting in VolumeMounts.
  1388. // Defaults to false.
  1389. // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
  1390. // +optional
  1391. optional bool readOnly = 4;
  1392. }
  1393. // Represents a volume that is populated with the contents of a git repository.
  1394. // Git repo volumes do not support ownership management.
  1395. // Git repo volumes support SELinux relabeling.
  1396. //
  1397. // DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an
  1398. // EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir
  1399. // into the Pod's container.
  1400. message GitRepoVolumeSource {
  1401. // Repository URL
  1402. optional string repository = 1;
  1403. // Commit hash for the specified revision.
  1404. // +optional
  1405. optional string revision = 2;
  1406. // Target directory name.
  1407. // Must not contain or start with '..'. If '.' is supplied, the volume directory will be the
  1408. // git repository. Otherwise, if specified, the volume will contain the git repository in
  1409. // the subdirectory with the given name.
  1410. // +optional
  1411. optional string directory = 3;
  1412. }
  1413. // Represents a Glusterfs mount that lasts the lifetime of a pod.
  1414. // Glusterfs volumes do not support ownership management or SELinux relabeling.
  1415. message GlusterfsPersistentVolumeSource {
  1416. // EndpointsName is the endpoint name that details Glusterfs topology.
  1417. // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
  1418. optional string endpoints = 1;
  1419. // Path is the Glusterfs volume path.
  1420. // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
  1421. optional string path = 2;
  1422. // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions.
  1423. // Defaults to false.
  1424. // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
  1425. // +optional
  1426. optional bool readOnly = 3;
  1427. // EndpointsNamespace is the namespace that contains Glusterfs endpoint.
  1428. // If this field is empty, the EndpointNamespace defaults to the same namespace as the bound PVC.
  1429. // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
  1430. // +optional
  1431. optional string endpointsNamespace = 4;
  1432. }
  1433. // Represents a Glusterfs mount that lasts the lifetime of a pod.
  1434. // Glusterfs volumes do not support ownership management or SELinux relabeling.
  1435. message GlusterfsVolumeSource {
  1436. // EndpointsName is the endpoint name that details Glusterfs topology.
  1437. // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
  1438. optional string endpoints = 1;
  1439. // Path is the Glusterfs volume path.
  1440. // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
  1441. optional string path = 2;
  1442. // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions.
  1443. // Defaults to false.
  1444. // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
  1445. // +optional
  1446. optional bool readOnly = 3;
  1447. }
  1448. // HTTPGetAction describes an action based on HTTP Get requests.
  1449. message HTTPGetAction {
  1450. // Path to access on the HTTP server.
  1451. // +optional
  1452. optional string path = 1;
  1453. // Name or number of the port to access on the container.
  1454. // Number must be in the range 1 to 65535.
  1455. // Name must be an IANA_SVC_NAME.
  1456. optional k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 2;
  1457. // Host name to connect to, defaults to the pod IP. You probably want to set
  1458. // "Host" in httpHeaders instead.
  1459. // +optional
  1460. optional string host = 3;
  1461. // Scheme to use for connecting to the host.
  1462. // Defaults to HTTP.
  1463. // +optional
  1464. optional string scheme = 4;
  1465. // Custom headers to set in the request. HTTP allows repeated headers.
  1466. // +optional
  1467. repeated HTTPHeader httpHeaders = 5;
  1468. }
  1469. // HTTPHeader describes a custom header to be used in HTTP probes
  1470. message HTTPHeader {
  1471. // The header field name
  1472. optional string name = 1;
  1473. // The header field value
  1474. optional string value = 2;
  1475. }
  1476. // Handler defines a specific action that should be taken
  1477. // TODO: pass structured data to these actions, and document that data here.
  1478. message Handler {
  1479. // One and only one of the following should be specified.
  1480. // Exec specifies the action to take.
  1481. // +optional
  1482. optional ExecAction exec = 1;
  1483. // HTTPGet specifies the http request to perform.
  1484. // +optional
  1485. optional HTTPGetAction httpGet = 2;
  1486. // TCPSocket specifies an action involving a TCP port.
  1487. // TCP hooks not yet supported
  1488. // TODO: implement a realistic TCP lifecycle hook
  1489. // +optional
  1490. optional TCPSocketAction tcpSocket = 3;
  1491. }
  1492. // HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
  1493. // pod's hosts file.
  1494. message HostAlias {
  1495. // IP address of the host file entry.
  1496. optional string ip = 1;
  1497. // Hostnames for the above IP address.
  1498. repeated string hostnames = 2;
  1499. }
  1500. // Represents a host path mapped into a pod.
  1501. // Host path volumes do not support ownership management or SELinux relabeling.
  1502. message HostPathVolumeSource {
  1503. // Path of the directory on the host.
  1504. // If the path is a symlink, it will follow the link to the real path.
  1505. // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
  1506. optional string path = 1;
  1507. // Type for HostPath Volume
  1508. // Defaults to ""
  1509. // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
  1510. // +optional
  1511. optional string type = 2;
  1512. }
  1513. // ISCSIPersistentVolumeSource represents an ISCSI disk.
  1514. // ISCSI volumes can only be mounted as read/write once.
  1515. // ISCSI volumes support ownership management and SELinux relabeling.
  1516. message ISCSIPersistentVolumeSource {
  1517. // iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port
  1518. // is other than default (typically TCP ports 860 and 3260).
  1519. optional string targetPortal = 1;
  1520. // Target iSCSI Qualified Name.
  1521. optional string iqn = 2;
  1522. // iSCSI Target Lun number.
  1523. optional int32 lun = 3;
  1524. // iSCSI Interface Name that uses an iSCSI transport.
  1525. // Defaults to 'default' (tcp).
  1526. // +optional
  1527. optional string iscsiInterface = 4;
  1528. // Filesystem type of the volume that you want to mount.
  1529. // Tip: Ensure that the filesystem type is supported by the host operating system.
  1530. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
  1531. // More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi
  1532. // TODO: how do we prevent errors in the filesystem from compromising the machine
  1533. // +optional
  1534. optional string fsType = 5;
  1535. // ReadOnly here will force the ReadOnly setting in VolumeMounts.
  1536. // Defaults to false.
  1537. // +optional
  1538. optional bool readOnly = 6;
  1539. // iSCSI Target Portal List. The Portal is either an IP or ip_addr:port if the port
  1540. // is other than default (typically TCP ports 860 and 3260).
  1541. // +optional
  1542. repeated string portals = 7;
  1543. // whether support iSCSI Discovery CHAP authentication
  1544. // +optional
  1545. optional bool chapAuthDiscovery = 8;
  1546. // whether support iSCSI Session CHAP authentication
  1547. // +optional
  1548. optional bool chapAuthSession = 11;
  1549. // CHAP Secret for iSCSI target and initiator authentication
  1550. // +optional
  1551. optional SecretReference secretRef = 10;
  1552. // Custom iSCSI Initiator Name.
  1553. // If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface
  1554. // <target portal>:<volume name> will be created for the connection.
  1555. // +optional
  1556. optional string initiatorName = 12;
  1557. }
  1558. // Represents an ISCSI disk.
  1559. // ISCSI volumes can only be mounted as read/write once.
  1560. // ISCSI volumes support ownership management and SELinux relabeling.
  1561. message ISCSIVolumeSource {
  1562. // iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port
  1563. // is other than default (typically TCP ports 860 and 3260).
  1564. optional string targetPortal = 1;
  1565. // Target iSCSI Qualified Name.
  1566. optional string iqn = 2;
  1567. // iSCSI Target Lun number.
  1568. optional int32 lun = 3;
  1569. // iSCSI Interface Name that uses an iSCSI transport.
  1570. // Defaults to 'default' (tcp).
  1571. // +optional
  1572. optional string iscsiInterface = 4;
  1573. // Filesystem type of the volume that you want to mount.
  1574. // Tip: Ensure that the filesystem type is supported by the host operating system.
  1575. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
  1576. // More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi
  1577. // TODO: how do we prevent errors in the filesystem from compromising the machine
  1578. // +optional
  1579. optional string fsType = 5;
  1580. // ReadOnly here will force the ReadOnly setting in VolumeMounts.
  1581. // Defaults to false.
  1582. // +optional
  1583. optional bool readOnly = 6;
  1584. // iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port
  1585. // is other than default (typically TCP ports 860 and 3260).
  1586. // +optional
  1587. repeated string portals = 7;
  1588. // whether support iSCSI Discovery CHAP authentication
  1589. // +optional
  1590. optional bool chapAuthDiscovery = 8;
  1591. // whether support iSCSI Session CHAP authentication
  1592. // +optional
  1593. optional bool chapAuthSession = 11;
  1594. // CHAP Secret for iSCSI target and initiator authentication
  1595. // +optional
  1596. optional LocalObjectReference secretRef = 10;
  1597. // Custom iSCSI Initiator Name.
  1598. // If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface
  1599. // <target portal>:<volume name> will be created for the connection.
  1600. // +optional
  1601. optional string initiatorName = 12;
  1602. }
  1603. // Maps a string key to a path within a volume.
  1604. message KeyToPath {
  1605. // The key to project.
  1606. optional string key = 1;
  1607. // The relative path of the file to map the key to.
  1608. // May not be an absolute path.
  1609. // May not contain the path element '..'.
  1610. // May not start with the string '..'.
  1611. optional string path = 2;
  1612. // Optional: mode bits used to set permissions on this file.
  1613. // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
  1614. // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
  1615. // If not specified, the volume defaultMode will be used.
  1616. // This might be in conflict with other options that affect the file
  1617. // mode, like fsGroup, and the result can be other mode bits set.
  1618. // +optional
  1619. optional int32 mode = 3;
  1620. }
  1621. // Lifecycle describes actions that the management system should take in response to container lifecycle
  1622. // events. For the PostStart and PreStop lifecycle handlers, management of the container blocks
  1623. // until the action is complete, unless the container process fails, in which case the handler is aborted.
  1624. message Lifecycle {
  1625. // PostStart is called immediately after a container is created. If the handler fails,
  1626. // the container is terminated and restarted according to its restart policy.
  1627. // Other management of the container blocks until the hook completes.
  1628. // More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
  1629. // +optional
  1630. optional Handler postStart = 1;
  1631. // PreStop is called immediately before a container is terminated due to an
  1632. // API request or management event such as liveness/startup probe failure,
  1633. // preemption, resource contention, etc. The handler is not called if the
  1634. // container crashes or exits. The reason for termination is passed to the
  1635. // handler. The Pod's termination grace period countdown begins before the
  1636. // PreStop hooked is executed. Regardless of the outcome of the handler, the
  1637. // container will eventually terminate within the Pod's termination grace
  1638. // period. Other management of the container blocks until the hook completes
  1639. // or until the termination grace period is reached.
  1640. // More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
  1641. // +optional
  1642. optional Handler preStop = 2;
  1643. }
  1644. // LimitRange sets resource usage limits for each kind of resource in a Namespace.
  1645. message LimitRange {
  1646. // Standard object's metadata.
  1647. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  1648. // +optional
  1649. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  1650. // Spec defines the limits enforced.
  1651. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  1652. // +optional
  1653. optional LimitRangeSpec spec = 2;
  1654. }
  1655. // LimitRangeItem defines a min/max usage limit for any resource that matches on kind.
  1656. message LimitRangeItem {
  1657. // Type of resource that this limit applies to.
  1658. optional string type = 1;
  1659. // Max usage constraints on this kind by resource name.
  1660. // +optional
  1661. map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> max = 2;
  1662. // Min usage constraints on this kind by resource name.
  1663. // +optional
  1664. map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> min = 3;
  1665. // Default resource requirement limit value by resource name if resource limit is omitted.
  1666. // +optional
  1667. map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> default = 4;
  1668. // DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.
  1669. // +optional
  1670. map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> defaultRequest = 5;
  1671. // MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.
  1672. // +optional
  1673. map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> maxLimitRequestRatio = 6;
  1674. }
  1675. // LimitRangeList is a list of LimitRange items.
  1676. message LimitRangeList {
  1677. // Standard list metadata.
  1678. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  1679. // +optional
  1680. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  1681. // Items is a list of LimitRange objects.
  1682. // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
  1683. repeated LimitRange items = 2;
  1684. }
  1685. // LimitRangeSpec defines a min/max usage limit for resources that match on kind.
  1686. message LimitRangeSpec {
  1687. // Limits is the list of LimitRangeItem objects that are enforced.
  1688. repeated LimitRangeItem limits = 1;
  1689. }
  1690. // List holds a list of objects, which may not be known by the server.
  1691. message List {
  1692. // Standard list metadata.
  1693. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  1694. // +optional
  1695. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  1696. // List of objects
  1697. repeated k8s.io.apimachinery.pkg.runtime.RawExtension items = 2;
  1698. }
  1699. // LoadBalancerIngress represents the status of a load-balancer ingress point:
  1700. // traffic intended for the service should be sent to an ingress point.
  1701. message LoadBalancerIngress {
  1702. // IP is set for load-balancer ingress points that are IP based
  1703. // (typically GCE or OpenStack load-balancers)
  1704. // +optional
  1705. optional string ip = 1;
  1706. // Hostname is set for load-balancer ingress points that are DNS based
  1707. // (typically AWS load-balancers)
  1708. // +optional
  1709. optional string hostname = 2;
  1710. }
  1711. // LoadBalancerStatus represents the status of a load-balancer.
  1712. message LoadBalancerStatus {
  1713. // Ingress is a list containing ingress points for the load-balancer.
  1714. // Traffic intended for the service should be sent to these ingress points.
  1715. // +optional
  1716. repeated LoadBalancerIngress ingress = 1;
  1717. }
  1718. // LocalObjectReference contains enough information to let you locate the
  1719. // referenced object inside the same namespace.
  1720. message LocalObjectReference {
  1721. // Name of the referent.
  1722. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  1723. // TODO: Add other useful fields. apiVersion, kind, uid?
  1724. // +optional
  1725. optional string name = 1;
  1726. }
  1727. // Local represents directly-attached storage with node affinity (Beta feature)
  1728. message LocalVolumeSource {
  1729. // The full path to the volume on the node.
  1730. // It can be either a directory or block device (disk, partition, ...).
  1731. optional string path = 1;
  1732. // Filesystem type to mount.
  1733. // It applies only when the Path is a block device.
  1734. // Must be a filesystem type supported by the host operating system.
  1735. // Ex. "ext4", "xfs", "ntfs". The default value is to auto-select a fileystem if unspecified.
  1736. // +optional
  1737. optional string fsType = 2;
  1738. }
  1739. // Represents an NFS mount that lasts the lifetime of a pod.
  1740. // NFS volumes do not support ownership management or SELinux relabeling.
  1741. message NFSVolumeSource {
  1742. // Server is the hostname or IP address of the NFS server.
  1743. // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
  1744. optional string server = 1;
  1745. // Path that is exported by the NFS server.
  1746. // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
  1747. optional string path = 2;
  1748. // ReadOnly here will force
  1749. // the NFS export to be mounted with read-only permissions.
  1750. // Defaults to false.
  1751. // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
  1752. // +optional
  1753. optional bool readOnly = 3;
  1754. }
  1755. // Namespace provides a scope for Names.
  1756. // Use of multiple namespaces is optional.
  1757. message Namespace {
  1758. // Standard object's metadata.
  1759. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  1760. // +optional
  1761. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  1762. // Spec defines the behavior of the Namespace.
  1763. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  1764. // +optional
  1765. optional NamespaceSpec spec = 2;
  1766. // Status describes the current status of a Namespace.
  1767. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  1768. // +optional
  1769. optional NamespaceStatus status = 3;
  1770. }
  1771. // NamespaceCondition contains details about state of namespace.
  1772. message NamespaceCondition {
  1773. // Type of namespace controller condition.
  1774. optional string type = 1;
  1775. // Status of the condition, one of True, False, Unknown.
  1776. optional string status = 2;
  1777. // +optional
  1778. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4;
  1779. // +optional
  1780. optional string reason = 5;
  1781. // +optional
  1782. optional string message = 6;
  1783. }
  1784. // NamespaceList is a list of Namespaces.
  1785. message NamespaceList {
  1786. // Standard list metadata.
  1787. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  1788. // +optional
  1789. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  1790. // Items is the list of Namespace objects in the list.
  1791. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
  1792. repeated Namespace items = 2;
  1793. }
  1794. // NamespaceSpec describes the attributes on a Namespace.
  1795. message NamespaceSpec {
  1796. // Finalizers is an opaque list of values that must be empty to permanently remove object from storage.
  1797. // More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/
  1798. // +optional
  1799. repeated string finalizers = 1;
  1800. }
  1801. // NamespaceStatus is information about the current status of a Namespace.
  1802. message NamespaceStatus {
  1803. // Phase is the current lifecycle phase of the namespace.
  1804. // More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/
  1805. // +optional
  1806. optional string phase = 1;
  1807. // Represents the latest available observations of a namespace's current state.
  1808. // +optional
  1809. // +patchMergeKey=type
  1810. // +patchStrategy=merge
  1811. repeated NamespaceCondition conditions = 2;
  1812. }
  1813. // Node is a worker node in Kubernetes.
  1814. // Each node will have a unique identifier in the cache (i.e. in etcd).
  1815. message Node {
  1816. // Standard object's metadata.
  1817. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  1818. // +optional
  1819. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  1820. // Spec defines the behavior of a node.
  1821. // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  1822. // +optional
  1823. optional NodeSpec spec = 2;
  1824. // Most recently observed status of the node.
  1825. // Populated by the system.
  1826. // Read-only.
  1827. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  1828. // +optional
  1829. optional NodeStatus status = 3;
  1830. }
  1831. // NodeAddress contains information for the node's address.
  1832. message NodeAddress {
  1833. // Node address type, one of Hostname, ExternalIP or InternalIP.
  1834. optional string type = 1;
  1835. // The node address.
  1836. optional string address = 2;
  1837. }
  1838. // Node affinity is a group of node affinity scheduling rules.
  1839. message NodeAffinity {
  1840. // If the affinity requirements specified by this field are not met at
  1841. // scheduling time, the pod will not be scheduled onto the node.
  1842. // If the affinity requirements specified by this field cease to be met
  1843. // at some point during pod execution (e.g. due to an update), the system
  1844. // may or may not try to eventually evict the pod from its node.
  1845. // +optional
  1846. optional NodeSelector requiredDuringSchedulingIgnoredDuringExecution = 1;
  1847. // The scheduler will prefer to schedule pods to nodes that satisfy
  1848. // the affinity expressions specified by this field, but it may choose
  1849. // a node that violates one or more of the expressions. The node that is
  1850. // most preferred is the one with the greatest sum of weights, i.e.
  1851. // for each node that meets all of the scheduling requirements (resource
  1852. // request, requiredDuringScheduling affinity expressions, etc.),
  1853. // compute a sum by iterating through the elements of this field and adding
  1854. // "weight" to the sum if the node matches the corresponding matchExpressions; the
  1855. // node(s) with the highest sum are the most preferred.
  1856. // +optional
  1857. repeated PreferredSchedulingTerm preferredDuringSchedulingIgnoredDuringExecution = 2;
  1858. }
  1859. // NodeCondition contains condition information for a node.
  1860. message NodeCondition {
  1861. // Type of node condition.
  1862. optional string type = 1;
  1863. // Status of the condition, one of True, False, Unknown.
  1864. optional string status = 2;
  1865. // Last time we got an update on a given condition.
  1866. // +optional
  1867. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastHeartbeatTime = 3;
  1868. // Last time the condition transit from one status to another.
  1869. // +optional
  1870. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4;
  1871. // (brief) reason for the condition's last transition.
  1872. // +optional
  1873. optional string reason = 5;
  1874. // Human readable message indicating details about last transition.
  1875. // +optional
  1876. optional string message = 6;
  1877. }
  1878. // NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil.
  1879. message NodeConfigSource {
  1880. // ConfigMap is a reference to a Node's ConfigMap
  1881. optional ConfigMapNodeConfigSource configMap = 2;
  1882. }
  1883. // NodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource.
  1884. message NodeConfigStatus {
  1885. // Assigned reports the checkpointed config the node will try to use.
  1886. // When Node.Spec.ConfigSource is updated, the node checkpoints the associated
  1887. // config payload to local disk, along with a record indicating intended
  1888. // config. The node refers to this record to choose its config checkpoint, and
  1889. // reports this record in Assigned. Assigned only updates in the status after
  1890. // the record has been checkpointed to disk. When the Kubelet is restarted,
  1891. // it tries to make the Assigned config the Active config by loading and
  1892. // validating the checkpointed payload identified by Assigned.
  1893. // +optional
  1894. optional NodeConfigSource assigned = 1;
  1895. // Active reports the checkpointed config the node is actively using.
  1896. // Active will represent either the current version of the Assigned config,
  1897. // or the current LastKnownGood config, depending on whether attempting to use the
  1898. // Assigned config results in an error.
  1899. // +optional
  1900. optional NodeConfigSource active = 2;
  1901. // LastKnownGood reports the checkpointed config the node will fall back to
  1902. // when it encounters an error attempting to use the Assigned config.
  1903. // The Assigned config becomes the LastKnownGood config when the node determines
  1904. // that the Assigned config is stable and correct.
  1905. // This is currently implemented as a 10-minute soak period starting when the local
  1906. // record of Assigned config is updated. If the Assigned config is Active at the end
  1907. // of this period, it becomes the LastKnownGood. Note that if Spec.ConfigSource is
  1908. // reset to nil (use local defaults), the LastKnownGood is also immediately reset to nil,
  1909. // because the local default config is always assumed good.
  1910. // You should not make assumptions about the node's method of determining config stability
  1911. // and correctness, as this may change or become configurable in the future.
  1912. // +optional
  1913. optional NodeConfigSource lastKnownGood = 3;
  1914. // Error describes any problems reconciling the Spec.ConfigSource to the Active config.
  1915. // Errors may occur, for example, attempting to checkpoint Spec.ConfigSource to the local Assigned
  1916. // record, attempting to checkpoint the payload associated with Spec.ConfigSource, attempting
  1917. // to load or validate the Assigned config, etc.
  1918. // Errors may occur at different points while syncing config. Earlier errors (e.g. download or
  1919. // checkpointing errors) will not result in a rollback to LastKnownGood, and may resolve across
  1920. // Kubelet retries. Later errors (e.g. loading or validating a checkpointed config) will result in
  1921. // a rollback to LastKnownGood. In the latter case, it is usually possible to resolve the error
  1922. // by fixing the config assigned in Spec.ConfigSource.
  1923. // You can find additional information for debugging by searching the error message in the Kubelet log.
  1924. // Error is a human-readable description of the error state; machines can check whether or not Error
  1925. // is empty, but should not rely on the stability of the Error text across Kubelet versions.
  1926. // +optional
  1927. optional string error = 4;
  1928. }
  1929. // NodeDaemonEndpoints lists ports opened by daemons running on the Node.
  1930. message NodeDaemonEndpoints {
  1931. // Endpoint on which Kubelet is listening.
  1932. // +optional
  1933. optional DaemonEndpoint kubeletEndpoint = 1;
  1934. }
  1935. // NodeList is the whole list of all Nodes which have been registered with master.
  1936. message NodeList {
  1937. // Standard list metadata.
  1938. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  1939. // +optional
  1940. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  1941. // List of nodes
  1942. repeated Node items = 2;
  1943. }
  1944. // NodeProxyOptions is the query options to a Node's proxy call.
  1945. message NodeProxyOptions {
  1946. // Path is the URL path to use for the current proxy request to node.
  1947. // +optional
  1948. optional string path = 1;
  1949. }
  1950. // NodeResources is an object for conveying resource information about a node.
  1951. // see https://kubernetes.io/docs/concepts/architecture/nodes/#capacity for more details.
  1952. message NodeResources {
  1953. // Capacity represents the available resources of a node
  1954. map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> capacity = 1;
  1955. }
  1956. // A node selector represents the union of the results of one or more label queries
  1957. // over a set of nodes; that is, it represents the OR of the selectors represented
  1958. // by the node selector terms.
  1959. message NodeSelector {
  1960. // Required. A list of node selector terms. The terms are ORed.
  1961. repeated NodeSelectorTerm nodeSelectorTerms = 1;
  1962. }
  1963. // A node selector requirement is a selector that contains values, a key, and an operator
  1964. // that relates the key and values.
  1965. message NodeSelectorRequirement {
  1966. // The label key that the selector applies to.
  1967. optional string key = 1;
  1968. // Represents a key's relationship to a set of values.
  1969. // Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
  1970. optional string operator = 2;
  1971. // An array of string values. If the operator is In or NotIn,
  1972. // the values array must be non-empty. If the operator is Exists or DoesNotExist,
  1973. // the values array must be empty. If the operator is Gt or Lt, the values
  1974. // array must have a single element, which will be interpreted as an integer.
  1975. // This array is replaced during a strategic merge patch.
  1976. // +optional
  1977. repeated string values = 3;
  1978. }
  1979. // A null or empty node selector term matches no objects. The requirements of
  1980. // them are ANDed.
  1981. // The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.
  1982. message NodeSelectorTerm {
  1983. // A list of node selector requirements by node's labels.
  1984. // +optional
  1985. repeated NodeSelectorRequirement matchExpressions = 1;
  1986. // A list of node selector requirements by node's fields.
  1987. // +optional
  1988. repeated NodeSelectorRequirement matchFields = 2;
  1989. }
  1990. // NodeSpec describes the attributes that a node is created with.
  1991. message NodeSpec {
  1992. // PodCIDR represents the pod IP range assigned to the node.
  1993. // +optional
  1994. optional string podCIDR = 1;
  1995. // podCIDRs represents the IP ranges assigned to the node for usage by Pods on that node. If this
  1996. // field is specified, the 0th entry must match the podCIDR field. It may contain at most 1 value for
  1997. // each of IPv4 and IPv6.
  1998. // +optional
  1999. // +patchStrategy=merge
  2000. repeated string podCIDRs = 7;
  2001. // ID of the node assigned by the cloud provider in the format: <ProviderName>://<ProviderSpecificNodeID>
  2002. // +optional
  2003. optional string providerID = 3;
  2004. // Unschedulable controls node schedulability of new pods. By default, node is schedulable.
  2005. // More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration
  2006. // +optional
  2007. optional bool unschedulable = 4;
  2008. // If specified, the node's taints.
  2009. // +optional
  2010. repeated Taint taints = 5;
  2011. // If specified, the source to get node configuration from
  2012. // The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field
  2013. // +optional
  2014. optional NodeConfigSource configSource = 6;
  2015. // Deprecated. Not all kubelets will set this field. Remove field after 1.13.
  2016. // see: https://issues.k8s.io/61966
  2017. // +optional
  2018. optional string externalID = 2;
  2019. }
  2020. // NodeStatus is information about the current status of a node.
  2021. message NodeStatus {
  2022. // Capacity represents the total resources of a node.
  2023. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity
  2024. // +optional
  2025. map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> capacity = 1;
  2026. // Allocatable represents the resources of a node that are available for scheduling.
  2027. // Defaults to Capacity.
  2028. // +optional
  2029. map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> allocatable = 2;
  2030. // NodePhase is the recently observed lifecycle phase of the node.
  2031. // More info: https://kubernetes.io/docs/concepts/nodes/node/#phase
  2032. // The field is never populated, and now is deprecated.
  2033. // +optional
  2034. optional string phase = 3;
  2035. // Conditions is an array of current observed node conditions.
  2036. // More info: https://kubernetes.io/docs/concepts/nodes/node/#condition
  2037. // +optional
  2038. // +patchMergeKey=type
  2039. // +patchStrategy=merge
  2040. repeated NodeCondition conditions = 4;
  2041. // List of addresses reachable to the node.
  2042. // Queried from cloud provider, if available.
  2043. // More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses
  2044. // Note: This field is declared as mergeable, but the merge key is not sufficiently
  2045. // unique, which can cause data corruption when it is merged. Callers should instead
  2046. // use a full-replacement patch. See http://pr.k8s.io/79391 for an example.
  2047. // +optional
  2048. // +patchMergeKey=type
  2049. // +patchStrategy=merge
  2050. repeated NodeAddress addresses = 5;
  2051. // Endpoints of daemons running on the Node.
  2052. // +optional
  2053. optional NodeDaemonEndpoints daemonEndpoints = 6;
  2054. // Set of ids/uuids to uniquely identify the node.
  2055. // More info: https://kubernetes.io/docs/concepts/nodes/node/#info
  2056. // +optional
  2057. optional NodeSystemInfo nodeInfo = 7;
  2058. // List of container images on this node
  2059. // +optional
  2060. repeated ContainerImage images = 8;
  2061. // List of attachable volumes in use (mounted) by the node.
  2062. // +optional
  2063. repeated string volumesInUse = 9;
  2064. // List of volumes that are attached to the node.
  2065. // +optional
  2066. repeated AttachedVolume volumesAttached = 10;
  2067. // Status of the config assigned to the node via the dynamic Kubelet config feature.
  2068. // +optional
  2069. optional NodeConfigStatus config = 11;
  2070. }
  2071. // NodeSystemInfo is a set of ids/uuids to uniquely identify the node.
  2072. message NodeSystemInfo {
  2073. // MachineID reported by the node. For unique machine identification
  2074. // in the cluster this field is preferred. Learn more from man(5)
  2075. // machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html
  2076. optional string machineID = 1;
  2077. // SystemUUID reported by the node. For unique machine identification
  2078. // MachineID is preferred. This field is specific to Red Hat hosts
  2079. // https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid
  2080. optional string systemUUID = 2;
  2081. // Boot ID reported by the node.
  2082. optional string bootID = 3;
  2083. // Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).
  2084. optional string kernelVersion = 4;
  2085. // OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).
  2086. optional string osImage = 5;
  2087. // ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0).
  2088. optional string containerRuntimeVersion = 6;
  2089. // Kubelet Version reported by the node.
  2090. optional string kubeletVersion = 7;
  2091. // KubeProxy Version reported by the node.
  2092. optional string kubeProxyVersion = 8;
  2093. // The Operating System reported by the node
  2094. optional string operatingSystem = 9;
  2095. // The Architecture reported by the node
  2096. optional string architecture = 10;
  2097. }
  2098. // ObjectFieldSelector selects an APIVersioned field of an object.
  2099. message ObjectFieldSelector {
  2100. // Version of the schema the FieldPath is written in terms of, defaults to "v1".
  2101. // +optional
  2102. optional string apiVersion = 1;
  2103. // Path of the field to select in the specified API version.
  2104. optional string fieldPath = 2;
  2105. }
  2106. // ObjectReference contains enough information to let you inspect or modify the referred object.
  2107. // ---
  2108. // New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs.
  2109. // 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage.
  2110. // 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular
  2111. // restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted".
  2112. // Those cannot be well described when embedded.
  2113. // 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen.
  2114. // 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity
  2115. // during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple
  2116. // and the version of the actual struct is irrelevant.
  2117. // 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type
  2118. // will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control.
  2119. // Instead of using this type, create a locally provided and used type that is well-focused on your reference.
  2120. // For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .
  2121. // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
  2122. message ObjectReference {
  2123. // Kind of the referent.
  2124. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  2125. // +optional
  2126. optional string kind = 1;
  2127. // Namespace of the referent.
  2128. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
  2129. // +optional
  2130. optional string namespace = 2;
  2131. // Name of the referent.
  2132. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  2133. // +optional
  2134. optional string name = 3;
  2135. // UID of the referent.
  2136. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
  2137. // +optional
  2138. optional string uid = 4;
  2139. // API version of the referent.
  2140. // +optional
  2141. optional string apiVersion = 5;
  2142. // Specific resourceVersion to which this reference is made, if any.
  2143. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
  2144. // +optional
  2145. optional string resourceVersion = 6;
  2146. // If referring to a piece of an object instead of an entire object, this string
  2147. // should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
  2148. // For example, if the object reference is to a container within a pod, this would take on a value like:
  2149. // "spec.containers{name}" (where "name" refers to the name of the container that triggered
  2150. // the event) or if no container name is specified "spec.containers[2]" (container with
  2151. // index 2 in this pod). This syntax is chosen only to have some well-defined way of
  2152. // referencing a part of an object.
  2153. // TODO: this design is not final and this field is subject to change in the future.
  2154. // +optional
  2155. optional string fieldPath = 7;
  2156. }
  2157. // PersistentVolume (PV) is a storage resource provisioned by an administrator.
  2158. // It is analogous to a node.
  2159. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
  2160. message PersistentVolume {
  2161. // Standard object's metadata.
  2162. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  2163. // +optional
  2164. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  2165. // Spec defines a specification of a persistent volume owned by the cluster.
  2166. // Provisioned by an administrator.
  2167. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes
  2168. // +optional
  2169. optional PersistentVolumeSpec spec = 2;
  2170. // Status represents the current information/status for the persistent volume.
  2171. // Populated by the system.
  2172. // Read-only.
  2173. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes
  2174. // +optional
  2175. optional PersistentVolumeStatus status = 3;
  2176. }
  2177. // PersistentVolumeClaim is a user's request for and claim to a persistent volume
  2178. message PersistentVolumeClaim {
  2179. // Standard object's metadata.
  2180. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  2181. // +optional
  2182. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  2183. // Spec defines the desired characteristics of a volume requested by a pod author.
  2184. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
  2185. // +optional
  2186. optional PersistentVolumeClaimSpec spec = 2;
  2187. // Status represents the current information/status of a persistent volume claim.
  2188. // Read-only.
  2189. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
  2190. // +optional
  2191. optional PersistentVolumeClaimStatus status = 3;
  2192. }
  2193. // PersistentVolumeClaimCondition contails details about state of pvc
  2194. message PersistentVolumeClaimCondition {
  2195. optional string type = 1;
  2196. optional string status = 2;
  2197. // Last time we probed the condition.
  2198. // +optional
  2199. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastProbeTime = 3;
  2200. // Last time the condition transitioned from one status to another.
  2201. // +optional
  2202. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4;
  2203. // Unique, this should be a short, machine understandable string that gives the reason
  2204. // for condition's last transition. If it reports "ResizeStarted" that means the underlying
  2205. // persistent volume is being resized.
  2206. // +optional
  2207. optional string reason = 5;
  2208. // Human-readable message indicating details about last transition.
  2209. // +optional
  2210. optional string message = 6;
  2211. }
  2212. // PersistentVolumeClaimList is a list of PersistentVolumeClaim items.
  2213. message PersistentVolumeClaimList {
  2214. // Standard list metadata.
  2215. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  2216. // +optional
  2217. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  2218. // A list of persistent volume claims.
  2219. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
  2220. repeated PersistentVolumeClaim items = 2;
  2221. }
  2222. // PersistentVolumeClaimSpec describes the common attributes of storage devices
  2223. // and allows a Source for provider-specific attributes
  2224. message PersistentVolumeClaimSpec {
  2225. // AccessModes contains the desired access modes the volume should have.
  2226. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
  2227. // +optional
  2228. repeated string accessModes = 1;
  2229. // A label query over volumes to consider for binding.
  2230. // +optional
  2231. optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
  2232. // Resources represents the minimum resources the volume should have.
  2233. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
  2234. // +optional
  2235. optional ResourceRequirements resources = 2;
  2236. // VolumeName is the binding reference to the PersistentVolume backing this claim.
  2237. // +optional
  2238. optional string volumeName = 3;
  2239. // Name of the StorageClass required by the claim.
  2240. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
  2241. // +optional
  2242. optional string storageClassName = 5;
  2243. // volumeMode defines what type of volume is required by the claim.
  2244. // Value of Filesystem is implied when not included in claim spec.
  2245. // +optional
  2246. optional string volumeMode = 6;
  2247. // This field can be used to specify either:
  2248. // * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - Beta)
  2249. // * An existing PVC (PersistentVolumeClaim)
  2250. // * An existing custom resource/object that implements data population (Alpha)
  2251. // In order to use VolumeSnapshot object types, the appropriate feature gate
  2252. // must be enabled (VolumeSnapshotDataSource or AnyVolumeDataSource)
  2253. // If the provisioner or an external controller can support the specified data source,
  2254. // it will create a new volume based on the contents of the specified data source.
  2255. // If the specified data source is not supported, the volume will
  2256. // not be created and the failure will be reported as an event.
  2257. // In the future, we plan to support more data source types and the behavior
  2258. // of the provisioner may change.
  2259. // +optional
  2260. optional TypedLocalObjectReference dataSource = 7;
  2261. }
  2262. // PersistentVolumeClaimStatus is the current status of a persistent volume claim.
  2263. message PersistentVolumeClaimStatus {
  2264. // Phase represents the current phase of PersistentVolumeClaim.
  2265. // +optional
  2266. optional string phase = 1;
  2267. // AccessModes contains the actual access modes the volume backing the PVC has.
  2268. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
  2269. // +optional
  2270. repeated string accessModes = 2;
  2271. // Represents the actual resources of the underlying volume.
  2272. // +optional
  2273. map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> capacity = 3;
  2274. // Current Condition of persistent volume claim. If underlying persistent volume is being
  2275. // resized then the Condition will be set to 'ResizeStarted'.
  2276. // +optional
  2277. // +patchMergeKey=type
  2278. // +patchStrategy=merge
  2279. repeated PersistentVolumeClaimCondition conditions = 4;
  2280. }
  2281. // PersistentVolumeClaimTemplate is used to produce
  2282. // PersistentVolumeClaim objects as part of an EphemeralVolumeSource.
  2283. message PersistentVolumeClaimTemplate {
  2284. // May contain labels and annotations that will be copied into the PVC
  2285. // when creating it. No other fields are allowed and will be rejected during
  2286. // validation.
  2287. //
  2288. // +optional
  2289. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  2290. // The specification for the PersistentVolumeClaim. The entire content is
  2291. // copied unchanged into the PVC that gets created from this
  2292. // template. The same fields as in a PersistentVolumeClaim
  2293. // are also valid here.
  2294. optional PersistentVolumeClaimSpec spec = 2;
  2295. }
  2296. // PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace.
  2297. // This volume finds the bound PV and mounts that volume for the pod. A
  2298. // PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another
  2299. // type of volume that is owned by someone else (the system).
  2300. message PersistentVolumeClaimVolumeSource {
  2301. // ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume.
  2302. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
  2303. optional string claimName = 1;
  2304. // Will force the ReadOnly setting in VolumeMounts.
  2305. // Default false.
  2306. // +optional
  2307. optional bool readOnly = 2;
  2308. }
  2309. // PersistentVolumeList is a list of PersistentVolume items.
  2310. message PersistentVolumeList {
  2311. // Standard list metadata.
  2312. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  2313. // +optional
  2314. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  2315. // List of persistent volumes.
  2316. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
  2317. repeated PersistentVolume items = 2;
  2318. }
  2319. // PersistentVolumeSource is similar to VolumeSource but meant for the
  2320. // administrator who creates PVs. Exactly one of its members must be set.
  2321. message PersistentVolumeSource {
  2322. // GCEPersistentDisk represents a GCE Disk resource that is attached to a
  2323. // kubelet's host machine and then exposed to the pod. Provisioned by an admin.
  2324. // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
  2325. // +optional
  2326. optional GCEPersistentDiskVolumeSource gcePersistentDisk = 1;
  2327. // AWSElasticBlockStore represents an AWS Disk resource that is attached to a
  2328. // kubelet's host machine and then exposed to the pod.
  2329. // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
  2330. // +optional
  2331. optional AWSElasticBlockStoreVolumeSource awsElasticBlockStore = 2;
  2332. // HostPath represents a directory on the host.
  2333. // Provisioned by a developer or tester.
  2334. // This is useful for single-node development and testing only!
  2335. // On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster.
  2336. // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
  2337. // +optional
  2338. optional HostPathVolumeSource hostPath = 3;
  2339. // Glusterfs represents a Glusterfs volume that is attached to a host and
  2340. // exposed to the pod. Provisioned by an admin.
  2341. // More info: https://examples.k8s.io/volumes/glusterfs/README.md
  2342. // +optional
  2343. optional GlusterfsPersistentVolumeSource glusterfs = 4;
  2344. // NFS represents an NFS mount on the host. Provisioned by an admin.
  2345. // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
  2346. // +optional
  2347. optional NFSVolumeSource nfs = 5;
  2348. // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime.
  2349. // More info: https://examples.k8s.io/volumes/rbd/README.md
  2350. // +optional
  2351. optional RBDPersistentVolumeSource rbd = 6;
  2352. // ISCSI represents an ISCSI Disk resource that is attached to a
  2353. // kubelet's host machine and then exposed to the pod. Provisioned by an admin.
  2354. // +optional
  2355. optional ISCSIPersistentVolumeSource iscsi = 7;
  2356. // Cinder represents a cinder volume attached and mounted on kubelets host machine.
  2357. // More info: https://examples.k8s.io/mysql-cinder-pd/README.md
  2358. // +optional
  2359. optional CinderPersistentVolumeSource cinder = 8;
  2360. // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
  2361. // +optional
  2362. optional CephFSPersistentVolumeSource cephfs = 9;
  2363. // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
  2364. // +optional
  2365. optional FCVolumeSource fc = 10;
  2366. // Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running
  2367. // +optional
  2368. optional FlockerVolumeSource flocker = 11;
  2369. // FlexVolume represents a generic volume resource that is
  2370. // provisioned/attached using an exec based plugin.
  2371. // +optional
  2372. optional FlexPersistentVolumeSource flexVolume = 12;
  2373. // AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
  2374. // +optional
  2375. optional AzureFilePersistentVolumeSource azureFile = 13;
  2376. // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
  2377. // +optional
  2378. optional VsphereVirtualDiskVolumeSource vsphereVolume = 14;
  2379. // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
  2380. // +optional
  2381. optional QuobyteVolumeSource quobyte = 15;
  2382. // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
  2383. // +optional
  2384. optional AzureDiskVolumeSource azureDisk = 16;
  2385. // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine
  2386. optional PhotonPersistentDiskVolumeSource photonPersistentDisk = 17;
  2387. // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine
  2388. // +optional
  2389. optional PortworxVolumeSource portworxVolume = 18;
  2390. // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
  2391. // +optional
  2392. optional ScaleIOPersistentVolumeSource scaleIO = 19;
  2393. // Local represents directly-attached storage with node affinity
  2394. // +optional
  2395. optional LocalVolumeSource local = 20;
  2396. // StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod
  2397. // More info: https://examples.k8s.io/volumes/storageos/README.md
  2398. // +optional
  2399. optional StorageOSPersistentVolumeSource storageos = 21;
  2400. // CSI represents storage that is handled by an external CSI driver (Beta feature).
  2401. // +optional
  2402. optional CSIPersistentVolumeSource csi = 22;
  2403. }
  2404. // PersistentVolumeSpec is the specification of a persistent volume.
  2405. message PersistentVolumeSpec {
  2406. // A description of the persistent volume's resources and capacity.
  2407. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity
  2408. // +optional
  2409. map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> capacity = 1;
  2410. // The actual volume backing the persistent volume.
  2411. optional PersistentVolumeSource persistentVolumeSource = 2;
  2412. // AccessModes contains all ways the volume can be mounted.
  2413. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes
  2414. // +optional
  2415. repeated string accessModes = 3;
  2416. // ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim.
  2417. // Expected to be non-nil when bound.
  2418. // claim.VolumeName is the authoritative bind between PV and PVC.
  2419. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding
  2420. // +optional
  2421. optional ObjectReference claimRef = 4;
  2422. // What happens to a persistent volume when released from its claim.
  2423. // Valid options are Retain (default for manually created PersistentVolumes), Delete (default
  2424. // for dynamically provisioned PersistentVolumes), and Recycle (deprecated).
  2425. // Recycle must be supported by the volume plugin underlying this PersistentVolume.
  2426. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming
  2427. // +optional
  2428. optional string persistentVolumeReclaimPolicy = 5;
  2429. // Name of StorageClass to which this persistent volume belongs. Empty value
  2430. // means that this volume does not belong to any StorageClass.
  2431. // +optional
  2432. optional string storageClassName = 6;
  2433. // A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will
  2434. // simply fail if one is invalid.
  2435. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options
  2436. // +optional
  2437. repeated string mountOptions = 7;
  2438. // volumeMode defines if a volume is intended to be used with a formatted filesystem
  2439. // or to remain in raw block state. Value of Filesystem is implied when not included in spec.
  2440. // +optional
  2441. optional string volumeMode = 8;
  2442. // NodeAffinity defines constraints that limit what nodes this volume can be accessed from.
  2443. // This field influences the scheduling of pods that use this volume.
  2444. // +optional
  2445. optional VolumeNodeAffinity nodeAffinity = 9;
  2446. }
  2447. // PersistentVolumeStatus is the current status of a persistent volume.
  2448. message PersistentVolumeStatus {
  2449. // Phase indicates if a volume is available, bound to a claim, or released by a claim.
  2450. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase
  2451. // +optional
  2452. optional string phase = 1;
  2453. // A human-readable message indicating details about why the volume is in this state.
  2454. // +optional
  2455. optional string message = 2;
  2456. // Reason is a brief CamelCase string that describes any failure and is meant
  2457. // for machine parsing and tidy display in the CLI.
  2458. // +optional
  2459. optional string reason = 3;
  2460. }
  2461. // Represents a Photon Controller persistent disk resource.
  2462. message PhotonPersistentDiskVolumeSource {
  2463. // ID that identifies Photon Controller persistent disk
  2464. optional string pdID = 1;
  2465. // Filesystem type to mount.
  2466. // Must be a filesystem type supported by the host operating system.
  2467. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
  2468. optional string fsType = 2;
  2469. }
  2470. // Pod is a collection of containers that can run on a host. This resource is created
  2471. // by clients and scheduled onto hosts.
  2472. message Pod {
  2473. // Standard object's metadata.
  2474. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  2475. // +optional
  2476. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  2477. // Specification of the desired behavior of the pod.
  2478. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  2479. // +optional
  2480. optional PodSpec spec = 2;
  2481. // Most recently observed status of the pod.
  2482. // This data may not be up to date.
  2483. // Populated by the system.
  2484. // Read-only.
  2485. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  2486. // +optional
  2487. optional PodStatus status = 3;
  2488. }
  2489. // Pod affinity is a group of inter pod affinity scheduling rules.
  2490. message PodAffinity {
  2491. // If the affinity requirements specified by this field are not met at
  2492. // scheduling time, the pod will not be scheduled onto the node.
  2493. // If the affinity requirements specified by this field cease to be met
  2494. // at some point during pod execution (e.g. due to a pod label update), the
  2495. // system may or may not try to eventually evict the pod from its node.
  2496. // When there are multiple elements, the lists of nodes corresponding to each
  2497. // podAffinityTerm are intersected, i.e. all terms must be satisfied.
  2498. // +optional
  2499. repeated PodAffinityTerm requiredDuringSchedulingIgnoredDuringExecution = 1;
  2500. // The scheduler will prefer to schedule pods to nodes that satisfy
  2501. // the affinity expressions specified by this field, but it may choose
  2502. // a node that violates one or more of the expressions. The node that is
  2503. // most preferred is the one with the greatest sum of weights, i.e.
  2504. // for each node that meets all of the scheduling requirements (resource
  2505. // request, requiredDuringScheduling affinity expressions, etc.),
  2506. // compute a sum by iterating through the elements of this field and adding
  2507. // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
  2508. // node(s) with the highest sum are the most preferred.
  2509. // +optional
  2510. repeated WeightedPodAffinityTerm preferredDuringSchedulingIgnoredDuringExecution = 2;
  2511. }
  2512. // Defines a set of pods (namely those matching the labelSelector
  2513. // relative to the given namespace(s)) that this pod should be
  2514. // co-located (affinity) or not co-located (anti-affinity) with,
  2515. // where co-located is defined as running on a node whose value of
  2516. // the label with key <topologyKey> matches that of any node on which
  2517. // a pod of the set of pods is running
  2518. message PodAffinityTerm {
  2519. // A label query over a set of resources, in this case pods.
  2520. // +optional
  2521. optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector labelSelector = 1;
  2522. // namespaces specifies which namespaces the labelSelector applies to (matches against);
  2523. // null or empty list means "this pod's namespace"
  2524. // +optional
  2525. repeated string namespaces = 2;
  2526. // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
  2527. // the labelSelector in the specified namespaces, where co-located is defined as running on a node
  2528. // whose value of the label with key topologyKey matches that of any node on which any of the
  2529. // selected pods is running.
  2530. // Empty topologyKey is not allowed.
  2531. optional string topologyKey = 3;
  2532. }
  2533. // Pod anti affinity is a group of inter pod anti affinity scheduling rules.
  2534. message PodAntiAffinity {
  2535. // If the anti-affinity requirements specified by this field are not met at
  2536. // scheduling time, the pod will not be scheduled onto the node.
  2537. // If the anti-affinity requirements specified by this field cease to be met
  2538. // at some point during pod execution (e.g. due to a pod label update), the
  2539. // system may or may not try to eventually evict the pod from its node.
  2540. // When there are multiple elements, the lists of nodes corresponding to each
  2541. // podAffinityTerm are intersected, i.e. all terms must be satisfied.
  2542. // +optional
  2543. repeated PodAffinityTerm requiredDuringSchedulingIgnoredDuringExecution = 1;
  2544. // The scheduler will prefer to schedule pods to nodes that satisfy
  2545. // the anti-affinity expressions specified by this field, but it may choose
  2546. // a node that violates one or more of the expressions. The node that is
  2547. // most preferred is the one with the greatest sum of weights, i.e.
  2548. // for each node that meets all of the scheduling requirements (resource
  2549. // request, requiredDuringScheduling anti-affinity expressions, etc.),
  2550. // compute a sum by iterating through the elements of this field and adding
  2551. // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
  2552. // node(s) with the highest sum are the most preferred.
  2553. // +optional
  2554. repeated WeightedPodAffinityTerm preferredDuringSchedulingIgnoredDuringExecution = 2;
  2555. }
  2556. // PodAttachOptions is the query options to a Pod's remote attach call.
  2557. // ---
  2558. // TODO: merge w/ PodExecOptions below for stdin, stdout, etc
  2559. // and also when we cut V2, we should export a "StreamOptions" or somesuch that contains Stdin, Stdout, Stder and TTY
  2560. message PodAttachOptions {
  2561. // Stdin if true, redirects the standard input stream of the pod for this call.
  2562. // Defaults to false.
  2563. // +optional
  2564. optional bool stdin = 1;
  2565. // Stdout if true indicates that stdout is to be redirected for the attach call.
  2566. // Defaults to true.
  2567. // +optional
  2568. optional bool stdout = 2;
  2569. // Stderr if true indicates that stderr is to be redirected for the attach call.
  2570. // Defaults to true.
  2571. // +optional
  2572. optional bool stderr = 3;
  2573. // TTY if true indicates that a tty will be allocated for the attach call.
  2574. // This is passed through the container runtime so the tty
  2575. // is allocated on the worker node by the container runtime.
  2576. // Defaults to false.
  2577. // +optional
  2578. optional bool tty = 4;
  2579. // The container in which to execute the command.
  2580. // Defaults to only container if there is only one container in the pod.
  2581. // +optional
  2582. optional string container = 5;
  2583. }
  2584. // PodCondition contains details for the current condition of this pod.
  2585. message PodCondition {
  2586. // Type is the type of the condition.
  2587. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
  2588. optional string type = 1;
  2589. // Status is the status of the condition.
  2590. // Can be True, False, Unknown.
  2591. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
  2592. optional string status = 2;
  2593. // Last time we probed the condition.
  2594. // +optional
  2595. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastProbeTime = 3;
  2596. // Last time the condition transitioned from one status to another.
  2597. // +optional
  2598. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4;
  2599. // Unique, one-word, CamelCase reason for the condition's last transition.
  2600. // +optional
  2601. optional string reason = 5;
  2602. // Human-readable message indicating details about last transition.
  2603. // +optional
  2604. optional string message = 6;
  2605. }
  2606. // PodDNSConfig defines the DNS parameters of a pod in addition to
  2607. // those generated from DNSPolicy.
  2608. message PodDNSConfig {
  2609. // A list of DNS name server IP addresses.
  2610. // This will be appended to the base nameservers generated from DNSPolicy.
  2611. // Duplicated nameservers will be removed.
  2612. // +optional
  2613. repeated string nameservers = 1;
  2614. // A list of DNS search domains for host-name lookup.
  2615. // This will be appended to the base search paths generated from DNSPolicy.
  2616. // Duplicated search paths will be removed.
  2617. // +optional
  2618. repeated string searches = 2;
  2619. // A list of DNS resolver options.
  2620. // This will be merged with the base options generated from DNSPolicy.
  2621. // Duplicated entries will be removed. Resolution options given in Options
  2622. // will override those that appear in the base DNSPolicy.
  2623. // +optional
  2624. repeated PodDNSConfigOption options = 3;
  2625. }
  2626. // PodDNSConfigOption defines DNS resolver options of a pod.
  2627. message PodDNSConfigOption {
  2628. // Required.
  2629. optional string name = 1;
  2630. // +optional
  2631. optional string value = 2;
  2632. }
  2633. // PodExecOptions is the query options to a Pod's remote exec call.
  2634. // ---
  2635. // TODO: This is largely identical to PodAttachOptions above, make sure they stay in sync and see about merging
  2636. // and also when we cut V2, we should export a "StreamOptions" or somesuch that contains Stdin, Stdout, Stder and TTY
  2637. message PodExecOptions {
  2638. // Redirect the standard input stream of the pod for this call.
  2639. // Defaults to false.
  2640. // +optional
  2641. optional bool stdin = 1;
  2642. // Redirect the standard output stream of the pod for this call.
  2643. // Defaults to true.
  2644. // +optional
  2645. optional bool stdout = 2;
  2646. // Redirect the standard error stream of the pod for this call.
  2647. // Defaults to true.
  2648. // +optional
  2649. optional bool stderr = 3;
  2650. // TTY if true indicates that a tty will be allocated for the exec call.
  2651. // Defaults to false.
  2652. // +optional
  2653. optional bool tty = 4;
  2654. // Container in which to execute the command.
  2655. // Defaults to only container if there is only one container in the pod.
  2656. // +optional
  2657. optional string container = 5;
  2658. // Command is the remote command to execute. argv array. Not executed within a shell.
  2659. repeated string command = 6;
  2660. }
  2661. // IP address information for entries in the (plural) PodIPs field.
  2662. // Each entry includes:
  2663. // IP: An IP address allocated to the pod. Routable at least within the cluster.
  2664. message PodIP {
  2665. // ip is an IP address (IPv4 or IPv6) assigned to the pod
  2666. optional string ip = 1;
  2667. }
  2668. // PodList is a list of Pods.
  2669. message PodList {
  2670. // Standard list metadata.
  2671. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  2672. // +optional
  2673. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  2674. // List of pods.
  2675. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md
  2676. repeated Pod items = 2;
  2677. }
  2678. // PodLogOptions is the query options for a Pod's logs REST call.
  2679. message PodLogOptions {
  2680. // The container for which to stream logs. Defaults to only container if there is one container in the pod.
  2681. // +optional
  2682. optional string container = 1;
  2683. // Follow the log stream of the pod. Defaults to false.
  2684. // +optional
  2685. optional bool follow = 2;
  2686. // Return previous terminated container logs. Defaults to false.
  2687. // +optional
  2688. optional bool previous = 3;
  2689. // A relative time in seconds before the current time from which to show logs. If this value
  2690. // precedes the time a pod was started, only logs since the pod start will be returned.
  2691. // If this value is in the future, no logs will be returned.
  2692. // Only one of sinceSeconds or sinceTime may be specified.
  2693. // +optional
  2694. optional int64 sinceSeconds = 4;
  2695. // An RFC3339 timestamp from which to show logs. If this value
  2696. // precedes the time a pod was started, only logs since the pod start will be returned.
  2697. // If this value is in the future, no logs will be returned.
  2698. // Only one of sinceSeconds or sinceTime may be specified.
  2699. // +optional
  2700. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time sinceTime = 5;
  2701. // If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line
  2702. // of log output. Defaults to false.
  2703. // +optional
  2704. optional bool timestamps = 6;
  2705. // If set, the number of lines from the end of the logs to show. If not specified,
  2706. // logs are shown from the creation of the container or sinceSeconds or sinceTime
  2707. // +optional
  2708. optional int64 tailLines = 7;
  2709. // If set, the number of bytes to read from the server before terminating the
  2710. // log output. This may not display a complete final line of logging, and may return
  2711. // slightly more or slightly less than the specified limit.
  2712. // +optional
  2713. optional int64 limitBytes = 8;
  2714. // insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the
  2715. // serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver
  2716. // and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real
  2717. // kubelet. If the kubelet is configured to verify the apiserver's TLS credentials, it does not mean the
  2718. // connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept
  2719. // the actual log data coming from the real kubelet).
  2720. // +optional
  2721. optional bool insecureSkipTLSVerifyBackend = 9;
  2722. }
  2723. // PodPortForwardOptions is the query options to a Pod's port forward call
  2724. // when using WebSockets.
  2725. // The `port` query parameter must specify the port or
  2726. // ports (comma separated) to forward over.
  2727. // Port forwarding over SPDY does not use these options. It requires the port
  2728. // to be passed in the `port` header as part of request.
  2729. message PodPortForwardOptions {
  2730. // List of ports to forward
  2731. // Required when using WebSockets
  2732. // +optional
  2733. repeated int32 ports = 1;
  2734. }
  2735. // PodProxyOptions is the query options to a Pod's proxy call.
  2736. message PodProxyOptions {
  2737. // Path is the URL path to use for the current proxy request to pod.
  2738. // +optional
  2739. optional string path = 1;
  2740. }
  2741. // PodReadinessGate contains the reference to a pod condition
  2742. message PodReadinessGate {
  2743. // ConditionType refers to a condition in the pod's condition list with matching type.
  2744. optional string conditionType = 1;
  2745. }
  2746. // PodSecurityContext holds pod-level security attributes and common container settings.
  2747. // Some fields are also present in container.securityContext. Field values of
  2748. // container.securityContext take precedence over field values of PodSecurityContext.
  2749. message PodSecurityContext {
  2750. // The SELinux context to be applied to all containers.
  2751. // If unspecified, the container runtime will allocate a random SELinux context for each
  2752. // container. May also be set in SecurityContext. If set in
  2753. // both SecurityContext and PodSecurityContext, the value specified in SecurityContext
  2754. // takes precedence for that container.
  2755. // +optional
  2756. optional SELinuxOptions seLinuxOptions = 1;
  2757. // The Windows specific settings applied to all containers.
  2758. // If unspecified, the options within a container's SecurityContext will be used.
  2759. // If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
  2760. // +optional
  2761. optional WindowsSecurityContextOptions windowsOptions = 8;
  2762. // The UID to run the entrypoint of the container process.
  2763. // Defaults to user specified in image metadata if unspecified.
  2764. // May also be set in SecurityContext. If set in both SecurityContext and
  2765. // PodSecurityContext, the value specified in SecurityContext takes precedence
  2766. // for that container.
  2767. // +optional
  2768. optional int64 runAsUser = 2;
  2769. // The GID to run the entrypoint of the container process.
  2770. // Uses runtime default if unset.
  2771. // May also be set in SecurityContext. If set in both SecurityContext and
  2772. // PodSecurityContext, the value specified in SecurityContext takes precedence
  2773. // for that container.
  2774. // +optional
  2775. optional int64 runAsGroup = 6;
  2776. // Indicates that the container must run as a non-root user.
  2777. // If true, the Kubelet will validate the image at runtime to ensure that it
  2778. // does not run as UID 0 (root) and fail to start the container if it does.
  2779. // If unset or false, no such validation will be performed.
  2780. // May also be set in SecurityContext. If set in both SecurityContext and
  2781. // PodSecurityContext, the value specified in SecurityContext takes precedence.
  2782. // +optional
  2783. optional bool runAsNonRoot = 3;
  2784. // A list of groups applied to the first process run in each container, in addition
  2785. // to the container's primary GID. If unspecified, no groups will be added to
  2786. // any container.
  2787. // +optional
  2788. repeated int64 supplementalGroups = 4;
  2789. // A special supplemental group that applies to all containers in a pod.
  2790. // Some volume types allow the Kubelet to change the ownership of that volume
  2791. // to be owned by the pod:
  2792. //
  2793. // 1. The owning GID will be the FSGroup
  2794. // 2. The setgid bit is set (new files created in the volume will be owned by FSGroup)
  2795. // 3. The permission bits are OR'd with rw-rw----
  2796. //
  2797. // If unset, the Kubelet will not modify the ownership and permissions of any volume.
  2798. // +optional
  2799. optional int64 fsGroup = 5;
  2800. // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported
  2801. // sysctls (by the container runtime) might fail to launch.
  2802. // +optional
  2803. repeated Sysctl sysctls = 7;
  2804. // fsGroupChangePolicy defines behavior of changing ownership and permission of the volume
  2805. // before being exposed inside Pod. This field will only apply to
  2806. // volume types which support fsGroup based ownership(and permissions).
  2807. // It will have no effect on ephemeral volume types such as: secret, configmaps
  2808. // and emptydir.
  2809. // Valid values are "OnRootMismatch" and "Always". If not specified defaults to "Always".
  2810. // +optional
  2811. optional string fsGroupChangePolicy = 9;
  2812. // The seccomp options to use by the containers in this pod.
  2813. // +optional
  2814. optional SeccompProfile seccompProfile = 10;
  2815. }
  2816. // Describes the class of pods that should avoid this node.
  2817. // Exactly one field should be set.
  2818. message PodSignature {
  2819. // Reference to controller whose pods should avoid this node.
  2820. // +optional
  2821. optional k8s.io.apimachinery.pkg.apis.meta.v1.OwnerReference podController = 1;
  2822. }
  2823. // PodSpec is a description of a pod.
  2824. message PodSpec {
  2825. // List of volumes that can be mounted by containers belonging to the pod.
  2826. // More info: https://kubernetes.io/docs/concepts/storage/volumes
  2827. // +optional
  2828. // +patchMergeKey=name
  2829. // +patchStrategy=merge,retainKeys
  2830. repeated Volume volumes = 1;
  2831. // List of initialization containers belonging to the pod.
  2832. // Init containers are executed in order prior to containers being started. If any
  2833. // init container fails, the pod is considered to have failed and is handled according
  2834. // to its restartPolicy. The name for an init container or normal container must be
  2835. // unique among all containers.
  2836. // Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes.
  2837. // The resourceRequirements of an init container are taken into account during scheduling
  2838. // by finding the highest request/limit for each resource type, and then using the max of
  2839. // of that value or the sum of the normal containers. Limits are applied to init containers
  2840. // in a similar fashion.
  2841. // Init containers cannot currently be added or removed.
  2842. // Cannot be updated.
  2843. // More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
  2844. // +patchMergeKey=name
  2845. // +patchStrategy=merge
  2846. repeated Container initContainers = 20;
  2847. // List of containers belonging to the pod.
  2848. // Containers cannot currently be added or removed.
  2849. // There must be at least one container in a Pod.
  2850. // Cannot be updated.
  2851. // +patchMergeKey=name
  2852. // +patchStrategy=merge
  2853. repeated Container containers = 2;
  2854. // List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing
  2855. // pod to perform user-initiated actions such as debugging. This list cannot be specified when
  2856. // creating a pod, and it cannot be modified by updating the pod spec. In order to add an
  2857. // ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource.
  2858. // This field is alpha-level and is only honored by servers that enable the EphemeralContainers feature.
  2859. // +optional
  2860. // +patchMergeKey=name
  2861. // +patchStrategy=merge
  2862. repeated EphemeralContainer ephemeralContainers = 34;
  2863. // Restart policy for all containers within the pod.
  2864. // One of Always, OnFailure, Never.
  2865. // Default to Always.
  2866. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
  2867. // +optional
  2868. optional string restartPolicy = 3;
  2869. // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request.
  2870. // Value must be non-negative integer. The value zero indicates delete immediately.
  2871. // If this value is nil, the default grace period will be used instead.
  2872. // The grace period is the duration in seconds after the processes running in the pod are sent
  2873. // a termination signal and the time when the processes are forcibly halted with a kill signal.
  2874. // Set this value longer than the expected cleanup time for your process.
  2875. // Defaults to 30 seconds.
  2876. // +optional
  2877. optional int64 terminationGracePeriodSeconds = 4;
  2878. // Optional duration in seconds the pod may be active on the node relative to
  2879. // StartTime before the system will actively try to mark it failed and kill associated containers.
  2880. // Value must be a positive integer.
  2881. // +optional
  2882. optional int64 activeDeadlineSeconds = 5;
  2883. // Set DNS policy for the pod.
  2884. // Defaults to "ClusterFirst".
  2885. // Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'.
  2886. // DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy.
  2887. // To have DNS options set along with hostNetwork, you have to specify DNS policy
  2888. // explicitly to 'ClusterFirstWithHostNet'.
  2889. // +optional
  2890. optional string dnsPolicy = 6;
  2891. // NodeSelector is a selector which must be true for the pod to fit on a node.
  2892. // Selector which must match a node's labels for the pod to be scheduled on that node.
  2893. // More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
  2894. // +optional
  2895. map<string, string> nodeSelector = 7;
  2896. // ServiceAccountName is the name of the ServiceAccount to use to run this pod.
  2897. // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
  2898. // +optional
  2899. optional string serviceAccountName = 8;
  2900. // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName.
  2901. // Deprecated: Use serviceAccountName instead.
  2902. // +k8s:conversion-gen=false
  2903. // +optional
  2904. optional string serviceAccount = 9;
  2905. // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.
  2906. // +optional
  2907. optional bool automountServiceAccountToken = 21;
  2908. // NodeName is a request to schedule this pod onto a specific node. If it is non-empty,
  2909. // the scheduler simply schedules this pod onto that node, assuming that it fits resource
  2910. // requirements.
  2911. // +optional
  2912. optional string nodeName = 10;
  2913. // Host networking requested for this pod. Use the host's network namespace.
  2914. // If this option is set, the ports that will be used must be specified.
  2915. // Default to false.
  2916. // +k8s:conversion-gen=false
  2917. // +optional
  2918. optional bool hostNetwork = 11;
  2919. // Use the host's pid namespace.
  2920. // Optional: Default to false.
  2921. // +k8s:conversion-gen=false
  2922. // +optional
  2923. optional bool hostPID = 12;
  2924. // Use the host's ipc namespace.
  2925. // Optional: Default to false.
  2926. // +k8s:conversion-gen=false
  2927. // +optional
  2928. optional bool hostIPC = 13;
  2929. // Share a single process namespace between all of the containers in a pod.
  2930. // When this is set containers will be able to view and signal processes from other containers
  2931. // in the same pod, and the first process in each container will not be assigned PID 1.
  2932. // HostPID and ShareProcessNamespace cannot both be set.
  2933. // Optional: Default to false.
  2934. // +k8s:conversion-gen=false
  2935. // +optional
  2936. optional bool shareProcessNamespace = 27;
  2937. // SecurityContext holds pod-level security attributes and common container settings.
  2938. // Optional: Defaults to empty. See type description for default values of each field.
  2939. // +optional
  2940. optional PodSecurityContext securityContext = 14;
  2941. // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
  2942. // If specified, these secrets will be passed to individual puller implementations for them to use. For example,
  2943. // in the case of docker, only DockerConfig type secrets are honored.
  2944. // More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod
  2945. // +optional
  2946. // +patchMergeKey=name
  2947. // +patchStrategy=merge
  2948. repeated LocalObjectReference imagePullSecrets = 15;
  2949. // Specifies the hostname of the Pod
  2950. // If not specified, the pod's hostname will be set to a system-defined value.
  2951. // +optional
  2952. optional string hostname = 16;
  2953. // If specified, the fully qualified Pod hostname will be "<hostname>.<subdomain>.<pod namespace>.svc.<cluster domain>".
  2954. // If not specified, the pod will not have a domainname at all.
  2955. // +optional
  2956. optional string subdomain = 17;
  2957. // If specified, the pod's scheduling constraints
  2958. // +optional
  2959. optional Affinity affinity = 18;
  2960. // If specified, the pod will be dispatched by specified scheduler.
  2961. // If not specified, the pod will be dispatched by default scheduler.
  2962. // +optional
  2963. optional string schedulerName = 19;
  2964. // If specified, the pod's tolerations.
  2965. // +optional
  2966. repeated Toleration tolerations = 22;
  2967. // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts
  2968. // file if specified. This is only valid for non-hostNetwork pods.
  2969. // +optional
  2970. // +patchMergeKey=ip
  2971. // +patchStrategy=merge
  2972. repeated HostAlias hostAliases = 23;
  2973. // If specified, indicates the pod's priority. "system-node-critical" and
  2974. // "system-cluster-critical" are two special keywords which indicate the
  2975. // highest priorities with the former being the highest priority. Any other
  2976. // name must be defined by creating a PriorityClass object with that name.
  2977. // If not specified, the pod priority will be default or zero if there is no
  2978. // default.
  2979. // +optional
  2980. optional string priorityClassName = 24;
  2981. // The priority value. Various system components use this field to find the
  2982. // priority of the pod. When Priority Admission Controller is enabled, it
  2983. // prevents users from setting this field. The admission controller populates
  2984. // this field from PriorityClassName.
  2985. // The higher the value, the higher the priority.
  2986. // +optional
  2987. optional int32 priority = 25;
  2988. // Specifies the DNS parameters of a pod.
  2989. // Parameters specified here will be merged to the generated DNS
  2990. // configuration based on DNSPolicy.
  2991. // +optional
  2992. optional PodDNSConfig dnsConfig = 26;
  2993. // If specified, all readiness gates will be evaluated for pod readiness.
  2994. // A pod is ready when all its containers are ready AND
  2995. // all conditions specified in the readiness gates have status equal to "True"
  2996. // More info: https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md
  2997. // +optional
  2998. repeated PodReadinessGate readinessGates = 28;
  2999. // RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used
  3000. // to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run.
  3001. // If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an
  3002. // empty definition that uses the default runtime handler.
  3003. // More info: https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md
  3004. // This is a beta feature as of Kubernetes v1.14.
  3005. // +optional
  3006. optional string runtimeClassName = 29;
  3007. // EnableServiceLinks indicates whether information about services should be injected into pod's
  3008. // environment variables, matching the syntax of Docker links.
  3009. // Optional: Defaults to true.
  3010. // +optional
  3011. optional bool enableServiceLinks = 30;
  3012. // PreemptionPolicy is the Policy for preempting pods with lower priority.
  3013. // One of Never, PreemptLowerPriority.
  3014. // Defaults to PreemptLowerPriority if unset.
  3015. // This field is beta-level, gated by the NonPreemptingPriority feature-gate.
  3016. // +optional
  3017. optional string preemptionPolicy = 31;
  3018. // Overhead represents the resource overhead associated with running a pod for a given RuntimeClass.
  3019. // This field will be autopopulated at admission time by the RuntimeClass admission controller. If
  3020. // the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests.
  3021. // The RuntimeClass admission controller will reject Pod create requests which have the overhead already
  3022. // set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value
  3023. // defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero.
  3024. // More info: https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md
  3025. // This field is alpha-level as of Kubernetes v1.16, and is only honored by servers that enable the PodOverhead feature.
  3026. // +optional
  3027. map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> overhead = 32;
  3028. // TopologySpreadConstraints describes how a group of pods ought to spread across topology
  3029. // domains. Scheduler will schedule pods in a way which abides by the constraints.
  3030. // All topologySpreadConstraints are ANDed.
  3031. // +optional
  3032. // +patchMergeKey=topologyKey
  3033. // +patchStrategy=merge
  3034. // +listType=map
  3035. // +listMapKey=topologyKey
  3036. // +listMapKey=whenUnsatisfiable
  3037. repeated TopologySpreadConstraint topologySpreadConstraints = 33;
  3038. // If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default).
  3039. // In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname).
  3040. // In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN.
  3041. // If a pod does not have FQDN, this has no effect.
  3042. // Default to false.
  3043. // +optional
  3044. optional bool setHostnameAsFQDN = 35;
  3045. }
  3046. // PodStatus represents information about the status of a pod. Status may trail the actual
  3047. // state of a system, especially if the node that hosts the pod cannot contact the control
  3048. // plane.
  3049. message PodStatus {
  3050. // The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle.
  3051. // The conditions array, the reason and message fields, and the individual container status
  3052. // arrays contain more detail about the pod's status.
  3053. // There are five possible phase values:
  3054. //
  3055. // Pending: The pod has been accepted by the Kubernetes system, but one or more of the
  3056. // container images has not been created. This includes time before being scheduled as
  3057. // well as time spent downloading images over the network, which could take a while.
  3058. // Running: The pod has been bound to a node, and all of the containers have been created.
  3059. // At least one container is still running, or is in the process of starting or restarting.
  3060. // Succeeded: All containers in the pod have terminated in success, and will not be restarted.
  3061. // Failed: All containers in the pod have terminated, and at least one container has
  3062. // terminated in failure. The container either exited with non-zero status or was terminated
  3063. // by the system.
  3064. // Unknown: For some reason the state of the pod could not be obtained, typically due to an
  3065. // error in communicating with the host of the pod.
  3066. //
  3067. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase
  3068. // +optional
  3069. optional string phase = 1;
  3070. // Current service state of pod.
  3071. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
  3072. // +optional
  3073. // +patchMergeKey=type
  3074. // +patchStrategy=merge
  3075. repeated PodCondition conditions = 2;
  3076. // A human readable message indicating details about why the pod is in this condition.
  3077. // +optional
  3078. optional string message = 3;
  3079. // A brief CamelCase message indicating details about why the pod is in this state.
  3080. // e.g. 'Evicted'
  3081. // +optional
  3082. optional string reason = 4;
  3083. // nominatedNodeName is set only when this pod preempts other pods on the node, but it cannot be
  3084. // scheduled right away as preemption victims receive their graceful termination periods.
  3085. // This field does not guarantee that the pod will be scheduled on this node. Scheduler may decide
  3086. // to place the pod elsewhere if other nodes become available sooner. Scheduler may also decide to
  3087. // give the resources on this node to a higher priority pod that is created after preemption.
  3088. // As a result, this field may be different than PodSpec.nodeName when the pod is
  3089. // scheduled.
  3090. // +optional
  3091. optional string nominatedNodeName = 11;
  3092. // IP address of the host to which the pod is assigned. Empty if not yet scheduled.
  3093. // +optional
  3094. optional string hostIP = 5;
  3095. // IP address allocated to the pod. Routable at least within the cluster.
  3096. // Empty if not yet allocated.
  3097. // +optional
  3098. optional string podIP = 6;
  3099. // podIPs holds the IP addresses allocated to the pod. If this field is specified, the 0th entry must
  3100. // match the podIP field. Pods may be allocated at most 1 value for each of IPv4 and IPv6. This list
  3101. // is empty if no IPs have been allocated yet.
  3102. // +optional
  3103. // +patchStrategy=merge
  3104. // +patchMergeKey=ip
  3105. repeated PodIP podIPs = 12;
  3106. // RFC 3339 date and time at which the object was acknowledged by the Kubelet.
  3107. // This is before the Kubelet pulled the container image(s) for the pod.
  3108. // +optional
  3109. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startTime = 7;
  3110. // The list has one entry per init container in the manifest. The most recent successful
  3111. // init container will have ready = true, the most recently started container will have
  3112. // startTime set.
  3113. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status
  3114. repeated ContainerStatus initContainerStatuses = 10;
  3115. // The list has one entry per container in the manifest. Each entry is currently the output
  3116. // of `docker inspect`.
  3117. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status
  3118. // +optional
  3119. repeated ContainerStatus containerStatuses = 8;
  3120. // The Quality of Service (QOS) classification assigned to the pod based on resource requirements
  3121. // See PodQOSClass type for available QOS classes
  3122. // More info: https://git.k8s.io/community/contributors/design-proposals/node/resource-qos.md
  3123. // +optional
  3124. optional string qosClass = 9;
  3125. // Status for any ephemeral containers that have run in this pod.
  3126. // This field is alpha-level and is only populated by servers that enable the EphemeralContainers feature.
  3127. // +optional
  3128. repeated ContainerStatus ephemeralContainerStatuses = 13;
  3129. }
  3130. // PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded
  3131. message PodStatusResult {
  3132. // Standard object's metadata.
  3133. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  3134. // +optional
  3135. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  3136. // Most recently observed status of the pod.
  3137. // This data may not be up to date.
  3138. // Populated by the system.
  3139. // Read-only.
  3140. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  3141. // +optional
  3142. optional PodStatus status = 2;
  3143. }
  3144. // PodTemplate describes a template for creating copies of a predefined pod.
  3145. message PodTemplate {
  3146. // Standard object's metadata.
  3147. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  3148. // +optional
  3149. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  3150. // Template defines the pods that will be created from this pod template.
  3151. // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  3152. // +optional
  3153. optional PodTemplateSpec template = 2;
  3154. }
  3155. // PodTemplateList is a list of PodTemplates.
  3156. message PodTemplateList {
  3157. // Standard list metadata.
  3158. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  3159. // +optional
  3160. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  3161. // List of pod templates
  3162. repeated PodTemplate items = 2;
  3163. }
  3164. // PodTemplateSpec describes the data a pod should have when created from a template
  3165. message PodTemplateSpec {
  3166. // Standard object's metadata.
  3167. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  3168. // +optional
  3169. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  3170. // Specification of the desired behavior of the pod.
  3171. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  3172. // +optional
  3173. optional PodSpec spec = 2;
  3174. }
  3175. // PortworxVolumeSource represents a Portworx volume resource.
  3176. message PortworxVolumeSource {
  3177. // VolumeID uniquely identifies a Portworx volume
  3178. optional string volumeID = 1;
  3179. // FSType represents the filesystem type to mount
  3180. // Must be a filesystem type supported by the host operating system.
  3181. // Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified.
  3182. optional string fsType = 2;
  3183. // Defaults to false (read/write). ReadOnly here will force
  3184. // the ReadOnly setting in VolumeMounts.
  3185. // +optional
  3186. optional bool readOnly = 3;
  3187. }
  3188. // Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
  3189. // +k8s:openapi-gen=false
  3190. message Preconditions {
  3191. // Specifies the target UID.
  3192. // +optional
  3193. optional string uid = 1;
  3194. }
  3195. // Describes a class of pods that should avoid this node.
  3196. message PreferAvoidPodsEntry {
  3197. // The class of pods.
  3198. optional PodSignature podSignature = 1;
  3199. // Time at which this entry was added to the list.
  3200. // +optional
  3201. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time evictionTime = 2;
  3202. // (brief) reason why this entry was added to the list.
  3203. // +optional
  3204. optional string reason = 3;
  3205. // Human readable message indicating why this entry was added to the list.
  3206. // +optional
  3207. optional string message = 4;
  3208. }
  3209. // An empty preferred scheduling term matches all objects with implicit weight 0
  3210. // (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).
  3211. message PreferredSchedulingTerm {
  3212. // Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
  3213. optional int32 weight = 1;
  3214. // A node selector term, associated with the corresponding weight.
  3215. optional NodeSelectorTerm preference = 2;
  3216. }
  3217. // Probe describes a health check to be performed against a container to determine whether it is
  3218. // alive or ready to receive traffic.
  3219. message Probe {
  3220. // The action taken to determine the health of a container
  3221. optional Handler handler = 1;
  3222. // Number of seconds after the container has started before liveness probes are initiated.
  3223. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
  3224. // +optional
  3225. optional int32 initialDelaySeconds = 2;
  3226. // Number of seconds after which the probe times out.
  3227. // Defaults to 1 second. Minimum value is 1.
  3228. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
  3229. // +optional
  3230. optional int32 timeoutSeconds = 3;
  3231. // How often (in seconds) to perform the probe.
  3232. // Default to 10 seconds. Minimum value is 1.
  3233. // +optional
  3234. optional int32 periodSeconds = 4;
  3235. // Minimum consecutive successes for the probe to be considered successful after having failed.
  3236. // Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.
  3237. // +optional
  3238. optional int32 successThreshold = 5;
  3239. // Minimum consecutive failures for the probe to be considered failed after having succeeded.
  3240. // Defaults to 3. Minimum value is 1.
  3241. // +optional
  3242. optional int32 failureThreshold = 6;
  3243. }
  3244. // Represents a projected volume source
  3245. message ProjectedVolumeSource {
  3246. // list of volume projections
  3247. repeated VolumeProjection sources = 1;
  3248. // Mode bits used to set permissions on created files by default.
  3249. // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
  3250. // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
  3251. // Directories within the path are not affected by this setting.
  3252. // This might be in conflict with other options that affect the file
  3253. // mode, like fsGroup, and the result can be other mode bits set.
  3254. // +optional
  3255. optional int32 defaultMode = 2;
  3256. }
  3257. // Represents a Quobyte mount that lasts the lifetime of a pod.
  3258. // Quobyte volumes do not support ownership management or SELinux relabeling.
  3259. message QuobyteVolumeSource {
  3260. // Registry represents a single or multiple Quobyte Registry services
  3261. // specified as a string as host:port pair (multiple entries are separated with commas)
  3262. // which acts as the central registry for volumes
  3263. optional string registry = 1;
  3264. // Volume is a string that references an already created Quobyte volume by name.
  3265. optional string volume = 2;
  3266. // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions.
  3267. // Defaults to false.
  3268. // +optional
  3269. optional bool readOnly = 3;
  3270. // User to map volume access to
  3271. // Defaults to serivceaccount user
  3272. // +optional
  3273. optional string user = 4;
  3274. // Group to map volume access to
  3275. // Default is no group
  3276. // +optional
  3277. optional string group = 5;
  3278. // Tenant owning the given Quobyte volume in the Backend
  3279. // Used with dynamically provisioned Quobyte volumes, value is set by the plugin
  3280. // +optional
  3281. optional string tenant = 6;
  3282. }
  3283. // Represents a Rados Block Device mount that lasts the lifetime of a pod.
  3284. // RBD volumes support ownership management and SELinux relabeling.
  3285. message RBDPersistentVolumeSource {
  3286. // A collection of Ceph monitors.
  3287. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  3288. repeated string monitors = 1;
  3289. // The rados image name.
  3290. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  3291. optional string image = 2;
  3292. // Filesystem type of the volume that you want to mount.
  3293. // Tip: Ensure that the filesystem type is supported by the host operating system.
  3294. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
  3295. // More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd
  3296. // TODO: how do we prevent errors in the filesystem from compromising the machine
  3297. // +optional
  3298. optional string fsType = 3;
  3299. // The rados pool name.
  3300. // Default is rbd.
  3301. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  3302. // +optional
  3303. optional string pool = 4;
  3304. // The rados user name.
  3305. // Default is admin.
  3306. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  3307. // +optional
  3308. optional string user = 5;
  3309. // Keyring is the path to key ring for RBDUser.
  3310. // Default is /etc/ceph/keyring.
  3311. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  3312. // +optional
  3313. optional string keyring = 6;
  3314. // SecretRef is name of the authentication secret for RBDUser. If provided
  3315. // overrides keyring.
  3316. // Default is nil.
  3317. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  3318. // +optional
  3319. optional SecretReference secretRef = 7;
  3320. // ReadOnly here will force the ReadOnly setting in VolumeMounts.
  3321. // Defaults to false.
  3322. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  3323. // +optional
  3324. optional bool readOnly = 8;
  3325. }
  3326. // Represents a Rados Block Device mount that lasts the lifetime of a pod.
  3327. // RBD volumes support ownership management and SELinux relabeling.
  3328. message RBDVolumeSource {
  3329. // A collection of Ceph monitors.
  3330. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  3331. repeated string monitors = 1;
  3332. // The rados image name.
  3333. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  3334. optional string image = 2;
  3335. // Filesystem type of the volume that you want to mount.
  3336. // Tip: Ensure that the filesystem type is supported by the host operating system.
  3337. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
  3338. // More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd
  3339. // TODO: how do we prevent errors in the filesystem from compromising the machine
  3340. // +optional
  3341. optional string fsType = 3;
  3342. // The rados pool name.
  3343. // Default is rbd.
  3344. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  3345. // +optional
  3346. optional string pool = 4;
  3347. // The rados user name.
  3348. // Default is admin.
  3349. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  3350. // +optional
  3351. optional string user = 5;
  3352. // Keyring is the path to key ring for RBDUser.
  3353. // Default is /etc/ceph/keyring.
  3354. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  3355. // +optional
  3356. optional string keyring = 6;
  3357. // SecretRef is name of the authentication secret for RBDUser. If provided
  3358. // overrides keyring.
  3359. // Default is nil.
  3360. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  3361. // +optional
  3362. optional LocalObjectReference secretRef = 7;
  3363. // ReadOnly here will force the ReadOnly setting in VolumeMounts.
  3364. // Defaults to false.
  3365. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  3366. // +optional
  3367. optional bool readOnly = 8;
  3368. }
  3369. // RangeAllocation is not a public type.
  3370. message RangeAllocation {
  3371. // Standard object's metadata.
  3372. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  3373. // +optional
  3374. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  3375. // Range is string that identifies the range represented by 'data'.
  3376. optional string range = 2;
  3377. // Data is a bit array containing all allocated addresses in the previous segment.
  3378. optional bytes data = 3;
  3379. }
  3380. // ReplicationController represents the configuration of a replication controller.
  3381. message ReplicationController {
  3382. // If the Labels of a ReplicationController are empty, they are defaulted to
  3383. // be the same as the Pod(s) that the replication controller manages.
  3384. // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  3385. // +optional
  3386. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  3387. // Spec defines the specification of the desired behavior of the replication controller.
  3388. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  3389. // +optional
  3390. optional ReplicationControllerSpec spec = 2;
  3391. // Status is the most recently observed status of the replication controller.
  3392. // This data may be out of date by some window of time.
  3393. // Populated by the system.
  3394. // Read-only.
  3395. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  3396. // +optional
  3397. optional ReplicationControllerStatus status = 3;
  3398. }
  3399. // ReplicationControllerCondition describes the state of a replication controller at a certain point.
  3400. message ReplicationControllerCondition {
  3401. // Type of replication controller condition.
  3402. optional string type = 1;
  3403. // Status of the condition, one of True, False, Unknown.
  3404. optional string status = 2;
  3405. // The last time the condition transitioned from one status to another.
  3406. // +optional
  3407. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
  3408. // The reason for the condition's last transition.
  3409. // +optional
  3410. optional string reason = 4;
  3411. // A human readable message indicating details about the transition.
  3412. // +optional
  3413. optional string message = 5;
  3414. }
  3415. // ReplicationControllerList is a collection of replication controllers.
  3416. message ReplicationControllerList {
  3417. // Standard list metadata.
  3418. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  3419. // +optional
  3420. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  3421. // List of replication controllers.
  3422. // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
  3423. repeated ReplicationController items = 2;
  3424. }
  3425. // ReplicationControllerSpec is the specification of a replication controller.
  3426. message ReplicationControllerSpec {
  3427. // Replicas is the number of desired replicas.
  3428. // This is a pointer to distinguish between explicit zero and unspecified.
  3429. // Defaults to 1.
  3430. // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller
  3431. // +optional
  3432. optional int32 replicas = 1;
  3433. // Minimum number of seconds for which a newly created pod should be ready
  3434. // without any of its container crashing, for it to be considered available.
  3435. // Defaults to 0 (pod will be considered available as soon as it is ready)
  3436. // +optional
  3437. optional int32 minReadySeconds = 4;
  3438. // Selector is a label query over pods that should match the Replicas count.
  3439. // If Selector is empty, it is defaulted to the labels present on the Pod template.
  3440. // Label keys and values that must match in order to be controlled by this replication
  3441. // controller, if empty defaulted to labels on Pod template.
  3442. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
  3443. // +optional
  3444. map<string, string> selector = 2;
  3445. // Template is the object that describes the pod that will be created if
  3446. // insufficient replicas are detected. This takes precedence over a TemplateRef.
  3447. // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
  3448. // +optional
  3449. optional PodTemplateSpec template = 3;
  3450. }
  3451. // ReplicationControllerStatus represents the current status of a replication
  3452. // controller.
  3453. message ReplicationControllerStatus {
  3454. // Replicas is the most recently oberved number of replicas.
  3455. // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller
  3456. optional int32 replicas = 1;
  3457. // The number of pods that have labels matching the labels of the pod template of the replication controller.
  3458. // +optional
  3459. optional int32 fullyLabeledReplicas = 2;
  3460. // The number of ready replicas for this replication controller.
  3461. // +optional
  3462. optional int32 readyReplicas = 4;
  3463. // The number of available replicas (ready for at least minReadySeconds) for this replication controller.
  3464. // +optional
  3465. optional int32 availableReplicas = 5;
  3466. // ObservedGeneration reflects the generation of the most recently observed replication controller.
  3467. // +optional
  3468. optional int64 observedGeneration = 3;
  3469. // Represents the latest available observations of a replication controller's current state.
  3470. // +optional
  3471. // +patchMergeKey=type
  3472. // +patchStrategy=merge
  3473. repeated ReplicationControllerCondition conditions = 6;
  3474. }
  3475. // ResourceFieldSelector represents container resources (cpu, memory) and their output format
  3476. message ResourceFieldSelector {
  3477. // Container name: required for volumes, optional for env vars
  3478. // +optional
  3479. optional string containerName = 1;
  3480. // Required: resource to select
  3481. optional string resource = 2;
  3482. // Specifies the output format of the exposed resources, defaults to "1"
  3483. // +optional
  3484. optional k8s.io.apimachinery.pkg.api.resource.Quantity divisor = 3;
  3485. }
  3486. // ResourceQuota sets aggregate quota restrictions enforced per namespace
  3487. message ResourceQuota {
  3488. // Standard object's metadata.
  3489. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  3490. // +optional
  3491. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  3492. // Spec defines the desired quota.
  3493. // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  3494. // +optional
  3495. optional ResourceQuotaSpec spec = 2;
  3496. // Status defines the actual enforced quota and its current usage.
  3497. // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  3498. // +optional
  3499. optional ResourceQuotaStatus status = 3;
  3500. }
  3501. // ResourceQuotaList is a list of ResourceQuota items.
  3502. message ResourceQuotaList {
  3503. // Standard list metadata.
  3504. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  3505. // +optional
  3506. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  3507. // Items is a list of ResourceQuota objects.
  3508. // More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
  3509. repeated ResourceQuota items = 2;
  3510. }
  3511. // ResourceQuotaSpec defines the desired hard limits to enforce for Quota.
  3512. message ResourceQuotaSpec {
  3513. // hard is the set of desired hard limits for each named resource.
  3514. // More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
  3515. // +optional
  3516. map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> hard = 1;
  3517. // A collection of filters that must match each object tracked by a quota.
  3518. // If not specified, the quota matches all objects.
  3519. // +optional
  3520. repeated string scopes = 2;
  3521. // scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota
  3522. // but expressed using ScopeSelectorOperator in combination with possible values.
  3523. // For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched.
  3524. // +optional
  3525. optional ScopeSelector scopeSelector = 3;
  3526. }
  3527. // ResourceQuotaStatus defines the enforced hard limits and observed use.
  3528. message ResourceQuotaStatus {
  3529. // Hard is the set of enforced hard limits for each named resource.
  3530. // More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
  3531. // +optional
  3532. map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> hard = 1;
  3533. // Used is the current observed total usage of the resource in the namespace.
  3534. // +optional
  3535. map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> used = 2;
  3536. }
  3537. // ResourceRequirements describes the compute resource requirements.
  3538. message ResourceRequirements {
  3539. // Limits describes the maximum amount of compute resources allowed.
  3540. // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
  3541. // +optional
  3542. map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> limits = 1;
  3543. // Requests describes the minimum amount of compute resources required.
  3544. // If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
  3545. // otherwise to an implementation-defined value.
  3546. // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
  3547. // +optional
  3548. map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> requests = 2;
  3549. }
  3550. // SELinuxOptions are the labels to be applied to the container
  3551. message SELinuxOptions {
  3552. // User is a SELinux user label that applies to the container.
  3553. // +optional
  3554. optional string user = 1;
  3555. // Role is a SELinux role label that applies to the container.
  3556. // +optional
  3557. optional string role = 2;
  3558. // Type is a SELinux type label that applies to the container.
  3559. // +optional
  3560. optional string type = 3;
  3561. // Level is SELinux level label that applies to the container.
  3562. // +optional
  3563. optional string level = 4;
  3564. }
  3565. // ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume
  3566. message ScaleIOPersistentVolumeSource {
  3567. // The host address of the ScaleIO API Gateway.
  3568. optional string gateway = 1;
  3569. // The name of the storage system as configured in ScaleIO.
  3570. optional string system = 2;
  3571. // SecretRef references to the secret for ScaleIO user and other
  3572. // sensitive information. If this is not provided, Login operation will fail.
  3573. optional SecretReference secretRef = 3;
  3574. // Flag to enable/disable SSL communication with Gateway, default false
  3575. // +optional
  3576. optional bool sslEnabled = 4;
  3577. // The name of the ScaleIO Protection Domain for the configured storage.
  3578. // +optional
  3579. optional string protectionDomain = 5;
  3580. // The ScaleIO Storage Pool associated with the protection domain.
  3581. // +optional
  3582. optional string storagePool = 6;
  3583. // Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned.
  3584. // Default is ThinProvisioned.
  3585. // +optional
  3586. optional string storageMode = 7;
  3587. // The name of a volume already created in the ScaleIO system
  3588. // that is associated with this volume source.
  3589. optional string volumeName = 8;
  3590. // Filesystem type to mount.
  3591. // Must be a filesystem type supported by the host operating system.
  3592. // Ex. "ext4", "xfs", "ntfs".
  3593. // Default is "xfs"
  3594. // +optional
  3595. optional string fsType = 9;
  3596. // Defaults to false (read/write). ReadOnly here will force
  3597. // the ReadOnly setting in VolumeMounts.
  3598. // +optional
  3599. optional bool readOnly = 10;
  3600. }
  3601. // ScaleIOVolumeSource represents a persistent ScaleIO volume
  3602. message ScaleIOVolumeSource {
  3603. // The host address of the ScaleIO API Gateway.
  3604. optional string gateway = 1;
  3605. // The name of the storage system as configured in ScaleIO.
  3606. optional string system = 2;
  3607. // SecretRef references to the secret for ScaleIO user and other
  3608. // sensitive information. If this is not provided, Login operation will fail.
  3609. optional LocalObjectReference secretRef = 3;
  3610. // Flag to enable/disable SSL communication with Gateway, default false
  3611. // +optional
  3612. optional bool sslEnabled = 4;
  3613. // The name of the ScaleIO Protection Domain for the configured storage.
  3614. // +optional
  3615. optional string protectionDomain = 5;
  3616. // The ScaleIO Storage Pool associated with the protection domain.
  3617. // +optional
  3618. optional string storagePool = 6;
  3619. // Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned.
  3620. // Default is ThinProvisioned.
  3621. // +optional
  3622. optional string storageMode = 7;
  3623. // The name of a volume already created in the ScaleIO system
  3624. // that is associated with this volume source.
  3625. optional string volumeName = 8;
  3626. // Filesystem type to mount.
  3627. // Must be a filesystem type supported by the host operating system.
  3628. // Ex. "ext4", "xfs", "ntfs".
  3629. // Default is "xfs".
  3630. // +optional
  3631. optional string fsType = 9;
  3632. // Defaults to false (read/write). ReadOnly here will force
  3633. // the ReadOnly setting in VolumeMounts.
  3634. // +optional
  3635. optional bool readOnly = 10;
  3636. }
  3637. // A scope selector represents the AND of the selectors represented
  3638. // by the scoped-resource selector requirements.
  3639. message ScopeSelector {
  3640. // A list of scope selector requirements by scope of the resources.
  3641. // +optional
  3642. repeated ScopedResourceSelectorRequirement matchExpressions = 1;
  3643. }
  3644. // A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator
  3645. // that relates the scope name and values.
  3646. message ScopedResourceSelectorRequirement {
  3647. // The name of the scope that the selector applies to.
  3648. optional string scopeName = 1;
  3649. // Represents a scope's relationship to a set of values.
  3650. // Valid operators are In, NotIn, Exists, DoesNotExist.
  3651. optional string operator = 2;
  3652. // An array of string values. If the operator is In or NotIn,
  3653. // the values array must be non-empty. If the operator is Exists or DoesNotExist,
  3654. // the values array must be empty.
  3655. // This array is replaced during a strategic merge patch.
  3656. // +optional
  3657. repeated string values = 3;
  3658. }
  3659. // SeccompProfile defines a pod/container's seccomp profile settings.
  3660. // Only one profile source may be set.
  3661. // +union
  3662. message SeccompProfile {
  3663. // type indicates which kind of seccomp profile will be applied.
  3664. // Valid options are:
  3665. //
  3666. // Localhost - a profile defined in a file on the node should be used.
  3667. // RuntimeDefault - the container runtime default profile should be used.
  3668. // Unconfined - no profile should be applied.
  3669. // +unionDiscriminator
  3670. optional string type = 1;
  3671. // localhostProfile indicates a profile defined in a file on the node should be used.
  3672. // The profile must be preconfigured on the node to work.
  3673. // Must be a descending path, relative to the kubelet's configured seccomp profile location.
  3674. // Must only be set if type is "Localhost".
  3675. // +optional
  3676. optional string localhostProfile = 2;
  3677. }
  3678. // Secret holds secret data of a certain type. The total bytes of the values in
  3679. // the Data field must be less than MaxSecretSize bytes.
  3680. message Secret {
  3681. // Standard object's metadata.
  3682. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  3683. // +optional
  3684. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  3685. // Immutable, if set to true, ensures that data stored in the Secret cannot
  3686. // be updated (only object metadata can be modified).
  3687. // If not set to true, the field can be modified at any time.
  3688. // Defaulted to nil.
  3689. // This is a beta field enabled by ImmutableEphemeralVolumes feature gate.
  3690. // +optional
  3691. optional bool immutable = 5;
  3692. // Data contains the secret data. Each key must consist of alphanumeric
  3693. // characters, '-', '_' or '.'. The serialized form of the secret data is a
  3694. // base64 encoded string, representing the arbitrary (possibly non-string)
  3695. // data value here. Described in https://tools.ietf.org/html/rfc4648#section-4
  3696. // +optional
  3697. map<string, bytes> data = 2;
  3698. // stringData allows specifying non-binary secret data in string form.
  3699. // It is provided as a write-only convenience method.
  3700. // All keys and values are merged into the data field on write, overwriting any existing values.
  3701. // It is never output when reading from the API.
  3702. // +k8s:conversion-gen=false
  3703. // +optional
  3704. map<string, string> stringData = 4;
  3705. // Used to facilitate programmatic handling of secret data.
  3706. // +optional
  3707. optional string type = 3;
  3708. }
  3709. // SecretEnvSource selects a Secret to populate the environment
  3710. // variables with.
  3711. //
  3712. // The contents of the target Secret's Data field will represent the
  3713. // key-value pairs as environment variables.
  3714. message SecretEnvSource {
  3715. // The Secret to select from.
  3716. optional LocalObjectReference localObjectReference = 1;
  3717. // Specify whether the Secret must be defined
  3718. // +optional
  3719. optional bool optional = 2;
  3720. }
  3721. // SecretKeySelector selects a key of a Secret.
  3722. message SecretKeySelector {
  3723. // The name of the secret in the pod's namespace to select from.
  3724. optional LocalObjectReference localObjectReference = 1;
  3725. // The key of the secret to select from. Must be a valid secret key.
  3726. optional string key = 2;
  3727. // Specify whether the Secret or its key must be defined
  3728. // +optional
  3729. optional bool optional = 3;
  3730. }
  3731. // SecretList is a list of Secret.
  3732. message SecretList {
  3733. // Standard list metadata.
  3734. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  3735. // +optional
  3736. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  3737. // Items is a list of secret objects.
  3738. // More info: https://kubernetes.io/docs/concepts/configuration/secret
  3739. repeated Secret items = 2;
  3740. }
  3741. // Adapts a secret into a projected volume.
  3742. //
  3743. // The contents of the target Secret's Data field will be presented in a
  3744. // projected volume as files using the keys in the Data field as the file names.
  3745. // Note that this is identical to a secret volume source without the default
  3746. // mode.
  3747. message SecretProjection {
  3748. optional LocalObjectReference localObjectReference = 1;
  3749. // If unspecified, each key-value pair in the Data field of the referenced
  3750. // Secret will be projected into the volume as a file whose name is the
  3751. // key and content is the value. If specified, the listed keys will be
  3752. // projected into the specified paths, and unlisted keys will not be
  3753. // present. If a key is specified which is not present in the Secret,
  3754. // the volume setup will error unless it is marked optional. Paths must be
  3755. // relative and may not contain the '..' path or start with '..'.
  3756. // +optional
  3757. repeated KeyToPath items = 2;
  3758. // Specify whether the Secret or its key must be defined
  3759. // +optional
  3760. optional bool optional = 4;
  3761. }
  3762. // SecretReference represents a Secret Reference. It has enough information to retrieve secret
  3763. // in any namespace
  3764. message SecretReference {
  3765. // Name is unique within a namespace to reference a secret resource.
  3766. // +optional
  3767. optional string name = 1;
  3768. // Namespace defines the space within which the secret name must be unique.
  3769. // +optional
  3770. optional string namespace = 2;
  3771. }
  3772. // Adapts a Secret into a volume.
  3773. //
  3774. // The contents of the target Secret's Data field will be presented in a volume
  3775. // as files using the keys in the Data field as the file names.
  3776. // Secret volumes support ownership management and SELinux relabeling.
  3777. message SecretVolumeSource {
  3778. // Name of the secret in the pod's namespace to use.
  3779. // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
  3780. // +optional
  3781. optional string secretName = 1;
  3782. // If unspecified, each key-value pair in the Data field of the referenced
  3783. // Secret will be projected into the volume as a file whose name is the
  3784. // key and content is the value. If specified, the listed keys will be
  3785. // projected into the specified paths, and unlisted keys will not be
  3786. // present. If a key is specified which is not present in the Secret,
  3787. // the volume setup will error unless it is marked optional. Paths must be
  3788. // relative and may not contain the '..' path or start with '..'.
  3789. // +optional
  3790. repeated KeyToPath items = 2;
  3791. // Optional: mode bits used to set permissions on created files by default.
  3792. // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
  3793. // YAML accepts both octal and decimal values, JSON requires decimal values
  3794. // for mode bits. Defaults to 0644.
  3795. // Directories within the path are not affected by this setting.
  3796. // This might be in conflict with other options that affect the file
  3797. // mode, like fsGroup, and the result can be other mode bits set.
  3798. // +optional
  3799. optional int32 defaultMode = 3;
  3800. // Specify whether the Secret or its keys must be defined
  3801. // +optional
  3802. optional bool optional = 4;
  3803. }
  3804. // SecurityContext holds security configuration that will be applied to a container.
  3805. // Some fields are present in both SecurityContext and PodSecurityContext. When both
  3806. // are set, the values in SecurityContext take precedence.
  3807. message SecurityContext {
  3808. // The capabilities to add/drop when running containers.
  3809. // Defaults to the default set of capabilities granted by the container runtime.
  3810. // +optional
  3811. optional Capabilities capabilities = 1;
  3812. // Run container in privileged mode.
  3813. // Processes in privileged containers are essentially equivalent to root on the host.
  3814. // Defaults to false.
  3815. // +optional
  3816. optional bool privileged = 2;
  3817. // The SELinux context to be applied to the container.
  3818. // If unspecified, the container runtime will allocate a random SELinux context for each
  3819. // container. May also be set in PodSecurityContext. If set in both SecurityContext and
  3820. // PodSecurityContext, the value specified in SecurityContext takes precedence.
  3821. // +optional
  3822. optional SELinuxOptions seLinuxOptions = 3;
  3823. // The Windows specific settings applied to all containers.
  3824. // If unspecified, the options from the PodSecurityContext will be used.
  3825. // If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
  3826. // +optional
  3827. optional WindowsSecurityContextOptions windowsOptions = 10;
  3828. // The UID to run the entrypoint of the container process.
  3829. // Defaults to user specified in image metadata if unspecified.
  3830. // May also be set in PodSecurityContext. If set in both SecurityContext and
  3831. // PodSecurityContext, the value specified in SecurityContext takes precedence.
  3832. // +optional
  3833. optional int64 runAsUser = 4;
  3834. // The GID to run the entrypoint of the container process.
  3835. // Uses runtime default if unset.
  3836. // May also be set in PodSecurityContext. If set in both SecurityContext and
  3837. // PodSecurityContext, the value specified in SecurityContext takes precedence.
  3838. // +optional
  3839. optional int64 runAsGroup = 8;
  3840. // Indicates that the container must run as a non-root user.
  3841. // If true, the Kubelet will validate the image at runtime to ensure that it
  3842. // does not run as UID 0 (root) and fail to start the container if it does.
  3843. // If unset or false, no such validation will be performed.
  3844. // May also be set in PodSecurityContext. If set in both SecurityContext and
  3845. // PodSecurityContext, the value specified in SecurityContext takes precedence.
  3846. // +optional
  3847. optional bool runAsNonRoot = 5;
  3848. // Whether this container has a read-only root filesystem.
  3849. // Default is false.
  3850. // +optional
  3851. optional bool readOnlyRootFilesystem = 6;
  3852. // AllowPrivilegeEscalation controls whether a process can gain more
  3853. // privileges than its parent process. This bool directly controls if
  3854. // the no_new_privs flag will be set on the container process.
  3855. // AllowPrivilegeEscalation is true always when the container is:
  3856. // 1) run as Privileged
  3857. // 2) has CAP_SYS_ADMIN
  3858. // +optional
  3859. optional bool allowPrivilegeEscalation = 7;
  3860. // procMount denotes the type of proc mount to use for the containers.
  3861. // The default is DefaultProcMount which uses the container runtime defaults for
  3862. // readonly paths and masked paths.
  3863. // This requires the ProcMountType feature flag to be enabled.
  3864. // +optional
  3865. optional string procMount = 9;
  3866. // The seccomp options to use by this container. If seccomp options are
  3867. // provided at both the pod & container level, the container options
  3868. // override the pod options.
  3869. // +optional
  3870. optional SeccompProfile seccompProfile = 11;
  3871. }
  3872. // SerializedReference is a reference to serialized object.
  3873. message SerializedReference {
  3874. // The reference to an object in the system.
  3875. // +optional
  3876. optional ObjectReference reference = 1;
  3877. }
  3878. // Service is a named abstraction of software service (for example, mysql) consisting of local port
  3879. // (for example 3306) that the proxy listens on, and the selector that determines which pods
  3880. // will answer requests sent through the proxy.
  3881. message Service {
  3882. // Standard object's metadata.
  3883. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  3884. // +optional
  3885. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  3886. // Spec defines the behavior of a service.
  3887. // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  3888. // +optional
  3889. optional ServiceSpec spec = 2;
  3890. // Most recently observed status of the service.
  3891. // Populated by the system.
  3892. // Read-only.
  3893. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  3894. // +optional
  3895. optional ServiceStatus status = 3;
  3896. }
  3897. // ServiceAccount binds together:
  3898. // * a name, understood by users, and perhaps by peripheral systems, for an identity
  3899. // * a principal that can be authenticated and authorized
  3900. // * a set of secrets
  3901. message ServiceAccount {
  3902. // Standard object's metadata.
  3903. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  3904. // +optional
  3905. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  3906. // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount.
  3907. // More info: https://kubernetes.io/docs/concepts/configuration/secret
  3908. // +optional
  3909. // +patchMergeKey=name
  3910. // +patchStrategy=merge
  3911. repeated ObjectReference secrets = 2;
  3912. // ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images
  3913. // in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets
  3914. // can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet.
  3915. // More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
  3916. // +optional
  3917. repeated LocalObjectReference imagePullSecrets = 3;
  3918. // AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted.
  3919. // Can be overridden at the pod level.
  3920. // +optional
  3921. optional bool automountServiceAccountToken = 4;
  3922. }
  3923. // ServiceAccountList is a list of ServiceAccount objects
  3924. message ServiceAccountList {
  3925. // Standard list metadata.
  3926. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  3927. // +optional
  3928. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  3929. // List of ServiceAccounts.
  3930. // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
  3931. repeated ServiceAccount items = 2;
  3932. }
  3933. // ServiceAccountTokenProjection represents a projected service account token
  3934. // volume. This projection can be used to insert a service account token into
  3935. // the pods runtime filesystem for use against APIs (Kubernetes API Server or
  3936. // otherwise).
  3937. message ServiceAccountTokenProjection {
  3938. // Audience is the intended audience of the token. A recipient of a token
  3939. // must identify itself with an identifier specified in the audience of the
  3940. // token, and otherwise should reject the token. The audience defaults to the
  3941. // identifier of the apiserver.
  3942. // +optional
  3943. optional string audience = 1;
  3944. // ExpirationSeconds is the requested duration of validity of the service
  3945. // account token. As the token approaches expiration, the kubelet volume
  3946. // plugin will proactively rotate the service account token. The kubelet will
  3947. // start trying to rotate the token if the token is older than 80 percent of
  3948. // its time to live or if the token is older than 24 hours.Defaults to 1 hour
  3949. // and must be at least 10 minutes.
  3950. // +optional
  3951. optional int64 expirationSeconds = 2;
  3952. // Path is the path relative to the mount point of the file to project the
  3953. // token into.
  3954. optional string path = 3;
  3955. }
  3956. // ServiceList holds a list of services.
  3957. message ServiceList {
  3958. // Standard list metadata.
  3959. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  3960. // +optional
  3961. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  3962. // List of services
  3963. repeated Service items = 2;
  3964. }
  3965. // ServicePort contains information on service's port.
  3966. message ServicePort {
  3967. // The name of this port within the service. This must be a DNS_LABEL.
  3968. // All ports within a ServiceSpec must have unique names. When considering
  3969. // the endpoints for a Service, this must match the 'name' field in the
  3970. // EndpointPort.
  3971. // Optional if only one ServicePort is defined on this service.
  3972. // +optional
  3973. optional string name = 1;
  3974. // The IP protocol for this port. Supports "TCP", "UDP", and "SCTP".
  3975. // Default is TCP.
  3976. // +optional
  3977. optional string protocol = 2;
  3978. // The application protocol for this port.
  3979. // This field follows standard Kubernetes label syntax.
  3980. // Un-prefixed names are reserved for IANA standard service names (as per
  3981. // RFC-6335 and http://www.iana.org/assignments/service-names).
  3982. // Non-standard protocols should use prefixed names such as
  3983. // mycompany.com/my-custom-protocol.
  3984. // This is a beta field that is guarded by the ServiceAppProtocol feature
  3985. // gate and enabled by default.
  3986. // +optional
  3987. optional string appProtocol = 6;
  3988. // The port that will be exposed by this service.
  3989. optional int32 port = 3;
  3990. // Number or name of the port to access on the pods targeted by the service.
  3991. // Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
  3992. // If this is a string, it will be looked up as a named port in the
  3993. // target Pod's container ports. If this is not specified, the value
  3994. // of the 'port' field is used (an identity map).
  3995. // This field is ignored for services with clusterIP=None, and should be
  3996. // omitted or set equal to the 'port' field.
  3997. // More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service
  3998. // +optional
  3999. optional k8s.io.apimachinery.pkg.util.intstr.IntOrString targetPort = 4;
  4000. // The port on each node on which this service is exposed when type=NodePort or LoadBalancer.
  4001. // Usually assigned by the system. If specified, it will be allocated to the service
  4002. // if unused or else creation of the service will fail.
  4003. // Default is to auto-allocate a port if the ServiceType of this Service requires one.
  4004. // More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
  4005. // +optional
  4006. optional int32 nodePort = 5;
  4007. }
  4008. // ServiceProxyOptions is the query options to a Service's proxy call.
  4009. message ServiceProxyOptions {
  4010. // Path is the part of URLs that include service endpoints, suffixes,
  4011. // and parameters to use for the current proxy request to service.
  4012. // For example, the whole request URL is
  4013. // http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy.
  4014. // Path is _search?q=user:kimchy.
  4015. // +optional
  4016. optional string path = 1;
  4017. }
  4018. // ServiceSpec describes the attributes that a user creates on a service.
  4019. message ServiceSpec {
  4020. // The list of ports that are exposed by this service.
  4021. // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
  4022. // +patchMergeKey=port
  4023. // +patchStrategy=merge
  4024. // +listType=map
  4025. // +listMapKey=port
  4026. // +listMapKey=protocol
  4027. repeated ServicePort ports = 1;
  4028. // Route service traffic to pods with label keys and values matching this
  4029. // selector. If empty or not present, the service is assumed to have an
  4030. // external process managing its endpoints, which Kubernetes will not
  4031. // modify. Only applies to types ClusterIP, NodePort, and LoadBalancer.
  4032. // Ignored if type is ExternalName.
  4033. // More info: https://kubernetes.io/docs/concepts/services-networking/service/
  4034. // +optional
  4035. map<string, string> selector = 2;
  4036. // clusterIP is the IP address of the service and is usually assigned
  4037. // randomly by the master. If an address is specified manually and is not in
  4038. // use by others, it will be allocated to the service; otherwise, creation
  4039. // of the service will fail. This field can not be changed through updates.
  4040. // Valid values are "None", empty string (""), or a valid IP address. "None"
  4041. // can be specified for headless services when proxying is not required.
  4042. // Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if
  4043. // type is ExternalName.
  4044. // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
  4045. // +optional
  4046. optional string clusterIP = 3;
  4047. // type determines how the Service is exposed. Defaults to ClusterIP. Valid
  4048. // options are ExternalName, ClusterIP, NodePort, and LoadBalancer.
  4049. // "ExternalName" maps to the specified externalName.
  4050. // "ClusterIP" allocates a cluster-internal IP address for load-balancing to
  4051. // endpoints. Endpoints are determined by the selector or if that is not
  4052. // specified, by manual construction of an Endpoints object. If clusterIP is
  4053. // "None", no virtual IP is allocated and the endpoints are published as a
  4054. // set of endpoints rather than a stable IP.
  4055. // "NodePort" builds on ClusterIP and allocates a port on every node which
  4056. // routes to the clusterIP.
  4057. // "LoadBalancer" builds on NodePort and creates an
  4058. // external load-balancer (if supported in the current cloud) which routes
  4059. // to the clusterIP.
  4060. // More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
  4061. // +optional
  4062. optional string type = 4;
  4063. // externalIPs is a list of IP addresses for which nodes in the cluster
  4064. // will also accept traffic for this service. These IPs are not managed by
  4065. // Kubernetes. The user is responsible for ensuring that traffic arrives
  4066. // at a node with this IP. A common example is external load-balancers
  4067. // that are not part of the Kubernetes system.
  4068. // +optional
  4069. repeated string externalIPs = 5;
  4070. // Supports "ClientIP" and "None". Used to maintain session affinity.
  4071. // Enable client IP based session affinity.
  4072. // Must be ClientIP or None.
  4073. // Defaults to None.
  4074. // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
  4075. // +optional
  4076. optional string sessionAffinity = 7;
  4077. // Only applies to Service Type: LoadBalancer
  4078. // LoadBalancer will get created with the IP specified in this field.
  4079. // This feature depends on whether the underlying cloud-provider supports specifying
  4080. // the loadBalancerIP when a load balancer is created.
  4081. // This field will be ignored if the cloud-provider does not support the feature.
  4082. // +optional
  4083. optional string loadBalancerIP = 8;
  4084. // If specified and supported by the platform, this will restrict traffic through the cloud-provider
  4085. // load-balancer will be restricted to the specified client IPs. This field will be ignored if the
  4086. // cloud-provider does not support the feature."
  4087. // More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/
  4088. // +optional
  4089. repeated string loadBalancerSourceRanges = 9;
  4090. // externalName is the external reference that kubedns or equivalent will
  4091. // return as a CNAME record for this service. No proxying will be involved.
  4092. // Must be a valid RFC-1123 hostname (https://tools.ietf.org/html/rfc1123)
  4093. // and requires Type to be ExternalName.
  4094. // +optional
  4095. optional string externalName = 10;
  4096. // externalTrafficPolicy denotes if this Service desires to route external
  4097. // traffic to node-local or cluster-wide endpoints. "Local" preserves the
  4098. // client source IP and avoids a second hop for LoadBalancer and Nodeport
  4099. // type services, but risks potentially imbalanced traffic spreading.
  4100. // "Cluster" obscures the client source IP and may cause a second hop to
  4101. // another node, but should have good overall load-spreading.
  4102. // +optional
  4103. optional string externalTrafficPolicy = 11;
  4104. // healthCheckNodePort specifies the healthcheck nodePort for the service.
  4105. // If not specified, HealthCheckNodePort is created by the service api
  4106. // backend with the allocated nodePort. Will use user-specified nodePort value
  4107. // if specified by the client. Only effects when Type is set to LoadBalancer
  4108. // and ExternalTrafficPolicy is set to Local.
  4109. // +optional
  4110. optional int32 healthCheckNodePort = 12;
  4111. // publishNotReadyAddresses indicates that any agent which deals with endpoints for this
  4112. // Service should disregard any indications of ready/not-ready.
  4113. // The primary use case for setting this field is for a StatefulSet's Headless Service to
  4114. // propagate SRV DNS records for its Pods for the purpose of peer discovery.
  4115. // The Kubernetes controllers that generate Endpoints and EndpointSlice resources for
  4116. // Services interpret this to mean that all endpoints are considered "ready" even if the
  4117. // Pods themselves are not. Agents which consume only Kubernetes generated endpoints
  4118. // through the Endpoints or EndpointSlice resources can safely assume this behavior.
  4119. // +optional
  4120. optional bool publishNotReadyAddresses = 13;
  4121. // sessionAffinityConfig contains the configurations of session affinity.
  4122. // +optional
  4123. optional SessionAffinityConfig sessionAffinityConfig = 14;
  4124. // ipFamily specifies whether this Service has a preference for a particular IP family (e.g.
  4125. // IPv4 vs. IPv6) when the IPv6DualStack feature gate is enabled. In a dual-stack cluster,
  4126. // you can specify ipFamily when creating a ClusterIP Service to determine whether the
  4127. // controller will allocate an IPv4 or IPv6 IP for it, and you can specify ipFamily when
  4128. // creating a headless Service to determine whether it will have IPv4 or IPv6 Endpoints. In
  4129. // either case, if you do not specify an ipFamily explicitly, it will default to the
  4130. // cluster's primary IP family.
  4131. // This field is part of an alpha feature, and you should not make any assumptions about its
  4132. // semantics other than those described above. In particular, you should not assume that it
  4133. // can (or cannot) be changed after creation time; that it can only have the values "IPv4"
  4134. // and "IPv6"; or that its current value on a given Service correctly reflects the current
  4135. // state of that Service. (For ClusterIP Services, look at clusterIP to see if the Service
  4136. // is IPv4 or IPv6. For headless Services, look at the endpoints, which may be dual-stack in
  4137. // the future. For ExternalName Services, ipFamily has no meaning, but it may be set to an
  4138. // irrelevant value anyway.)
  4139. // +optional
  4140. optional string ipFamily = 15;
  4141. // topologyKeys is a preference-order list of topology keys which
  4142. // implementations of services should use to preferentially sort endpoints
  4143. // when accessing this Service, it can not be used at the same time as
  4144. // externalTrafficPolicy=Local.
  4145. // Topology keys must be valid label keys and at most 16 keys may be specified.
  4146. // Endpoints are chosen based on the first topology key with available backends.
  4147. // If this field is specified and all entries have no backends that match
  4148. // the topology of the client, the service has no backends for that client
  4149. // and connections should fail.
  4150. // The special value "*" may be used to mean "any topology". This catch-all
  4151. // value, if used, only makes sense as the last value in the list.
  4152. // If this is not specified or empty, no topology constraints will be applied.
  4153. // +optional
  4154. repeated string topologyKeys = 16;
  4155. }
  4156. // ServiceStatus represents the current status of a service.
  4157. message ServiceStatus {
  4158. // LoadBalancer contains the current status of the load-balancer,
  4159. // if one is present.
  4160. // +optional
  4161. optional LoadBalancerStatus loadBalancer = 1;
  4162. }
  4163. // SessionAffinityConfig represents the configurations of session affinity.
  4164. message SessionAffinityConfig {
  4165. // clientIP contains the configurations of Client IP based session affinity.
  4166. // +optional
  4167. optional ClientIPConfig clientIP = 1;
  4168. }
  4169. // Represents a StorageOS persistent volume resource.
  4170. message StorageOSPersistentVolumeSource {
  4171. // VolumeName is the human-readable name of the StorageOS volume. Volume
  4172. // names are only unique within a namespace.
  4173. optional string volumeName = 1;
  4174. // VolumeNamespace specifies the scope of the volume within StorageOS. If no
  4175. // namespace is specified then the Pod's namespace will be used. This allows the
  4176. // Kubernetes name scoping to be mirrored within StorageOS for tighter integration.
  4177. // Set VolumeName to any name to override the default behaviour.
  4178. // Set to "default" if you are not using namespaces within StorageOS.
  4179. // Namespaces that do not pre-exist within StorageOS will be created.
  4180. // +optional
  4181. optional string volumeNamespace = 2;
  4182. // Filesystem type to mount.
  4183. // Must be a filesystem type supported by the host operating system.
  4184. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
  4185. // +optional
  4186. optional string fsType = 3;
  4187. // Defaults to false (read/write). ReadOnly here will force
  4188. // the ReadOnly setting in VolumeMounts.
  4189. // +optional
  4190. optional bool readOnly = 4;
  4191. // SecretRef specifies the secret to use for obtaining the StorageOS API
  4192. // credentials. If not specified, default values will be attempted.
  4193. // +optional
  4194. optional ObjectReference secretRef = 5;
  4195. }
  4196. // Represents a StorageOS persistent volume resource.
  4197. message StorageOSVolumeSource {
  4198. // VolumeName is the human-readable name of the StorageOS volume. Volume
  4199. // names are only unique within a namespace.
  4200. optional string volumeName = 1;
  4201. // VolumeNamespace specifies the scope of the volume within StorageOS. If no
  4202. // namespace is specified then the Pod's namespace will be used. This allows the
  4203. // Kubernetes name scoping to be mirrored within StorageOS for tighter integration.
  4204. // Set VolumeName to any name to override the default behaviour.
  4205. // Set to "default" if you are not using namespaces within StorageOS.
  4206. // Namespaces that do not pre-exist within StorageOS will be created.
  4207. // +optional
  4208. optional string volumeNamespace = 2;
  4209. // Filesystem type to mount.
  4210. // Must be a filesystem type supported by the host operating system.
  4211. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
  4212. // +optional
  4213. optional string fsType = 3;
  4214. // Defaults to false (read/write). ReadOnly here will force
  4215. // the ReadOnly setting in VolumeMounts.
  4216. // +optional
  4217. optional bool readOnly = 4;
  4218. // SecretRef specifies the secret to use for obtaining the StorageOS API
  4219. // credentials. If not specified, default values will be attempted.
  4220. // +optional
  4221. optional LocalObjectReference secretRef = 5;
  4222. }
  4223. // Sysctl defines a kernel parameter to be set
  4224. message Sysctl {
  4225. // Name of a property to set
  4226. optional string name = 1;
  4227. // Value of a property to set
  4228. optional string value = 2;
  4229. }
  4230. // TCPSocketAction describes an action based on opening a socket
  4231. message TCPSocketAction {
  4232. // Number or name of the port to access on the container.
  4233. // Number must be in the range 1 to 65535.
  4234. // Name must be an IANA_SVC_NAME.
  4235. optional k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 1;
  4236. // Optional: Host name to connect to, defaults to the pod IP.
  4237. // +optional
  4238. optional string host = 2;
  4239. }
  4240. // The node this Taint is attached to has the "effect" on
  4241. // any pod that does not tolerate the Taint.
  4242. message Taint {
  4243. // Required. The taint key to be applied to a node.
  4244. optional string key = 1;
  4245. // The taint value corresponding to the taint key.
  4246. // +optional
  4247. optional string value = 2;
  4248. // Required. The effect of the taint on pods
  4249. // that do not tolerate the taint.
  4250. // Valid effects are NoSchedule, PreferNoSchedule and NoExecute.
  4251. optional string effect = 3;
  4252. // TimeAdded represents the time at which the taint was added.
  4253. // It is only written for NoExecute taints.
  4254. // +optional
  4255. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time timeAdded = 4;
  4256. }
  4257. // The pod this Toleration is attached to tolerates any taint that matches
  4258. // the triple <key,value,effect> using the matching operator <operator>.
  4259. message Toleration {
  4260. // Key is the taint key that the toleration applies to. Empty means match all taint keys.
  4261. // If the key is empty, operator must be Exists; this combination means to match all values and all keys.
  4262. // +optional
  4263. optional string key = 1;
  4264. // Operator represents a key's relationship to the value.
  4265. // Valid operators are Exists and Equal. Defaults to Equal.
  4266. // Exists is equivalent to wildcard for value, so that a pod can
  4267. // tolerate all taints of a particular category.
  4268. // +optional
  4269. optional string operator = 2;
  4270. // Value is the taint value the toleration matches to.
  4271. // If the operator is Exists, the value should be empty, otherwise just a regular string.
  4272. // +optional
  4273. optional string value = 3;
  4274. // Effect indicates the taint effect to match. Empty means match all taint effects.
  4275. // When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
  4276. // +optional
  4277. optional string effect = 4;
  4278. // TolerationSeconds represents the period of time the toleration (which must be
  4279. // of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
  4280. // it is not set, which means tolerate the taint forever (do not evict). Zero and
  4281. // negative values will be treated as 0 (evict immediately) by the system.
  4282. // +optional
  4283. optional int64 tolerationSeconds = 5;
  4284. }
  4285. // A topology selector requirement is a selector that matches given label.
  4286. // This is an alpha feature and may change in the future.
  4287. message TopologySelectorLabelRequirement {
  4288. // The label key that the selector applies to.
  4289. optional string key = 1;
  4290. // An array of string values. One value must match the label to be selected.
  4291. // Each entry in Values is ORed.
  4292. repeated string values = 2;
  4293. }
  4294. // A topology selector term represents the result of label queries.
  4295. // A null or empty topology selector term matches no objects.
  4296. // The requirements of them are ANDed.
  4297. // It provides a subset of functionality as NodeSelectorTerm.
  4298. // This is an alpha feature and may change in the future.
  4299. message TopologySelectorTerm {
  4300. // A list of topology selector requirements by labels.
  4301. // +optional
  4302. repeated TopologySelectorLabelRequirement matchLabelExpressions = 1;
  4303. }
  4304. // TopologySpreadConstraint specifies how to spread matching pods among the given topology.
  4305. message TopologySpreadConstraint {
  4306. // MaxSkew describes the degree to which pods may be unevenly distributed.
  4307. // When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference
  4308. // between the number of matching pods in the target topology and the global minimum.
  4309. // For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same
  4310. // labelSelector spread as 1/1/0:
  4311. // +-------+-------+-------+
  4312. // | zone1 | zone2 | zone3 |
  4313. // +-------+-------+-------+
  4314. // | P | P | |
  4315. // +-------+-------+-------+
  4316. // - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1;
  4317. // scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2)
  4318. // violate MaxSkew(1).
  4319. // - if MaxSkew is 2, incoming pod can be scheduled onto any zone.
  4320. // When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence
  4321. // to topologies that satisfy it.
  4322. // It's a required field. Default value is 1 and 0 is not allowed.
  4323. optional int32 maxSkew = 1;
  4324. // TopologyKey is the key of node labels. Nodes that have a label with this key
  4325. // and identical values are considered to be in the same topology.
  4326. // We consider each <key, value> as a "bucket", and try to put balanced number
  4327. // of pods into each bucket.
  4328. // It's a required field.
  4329. optional string topologyKey = 2;
  4330. // WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy
  4331. // the spread constraint.
  4332. // - DoNotSchedule (default) tells the scheduler not to schedule it.
  4333. // - ScheduleAnyway tells the scheduler to schedule the pod in any location,
  4334. // but giving higher precedence to topologies that would help reduce the
  4335. // skew.
  4336. // A constraint is considered "Unsatisfiable" for an incoming pod
  4337. // if and only if every possible node assigment for that pod would violate
  4338. // "MaxSkew" on some topology.
  4339. // For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same
  4340. // labelSelector spread as 3/1/1:
  4341. // +-------+-------+-------+
  4342. // | zone1 | zone2 | zone3 |
  4343. // +-------+-------+-------+
  4344. // | P P P | P | P |
  4345. // +-------+-------+-------+
  4346. // If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled
  4347. // to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies
  4348. // MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler
  4349. // won't make it *more* imbalanced.
  4350. // It's a required field.
  4351. optional string whenUnsatisfiable = 3;
  4352. // LabelSelector is used to find matching pods.
  4353. // Pods that match this label selector are counted to determine the number of pods
  4354. // in their corresponding topology domain.
  4355. // +optional
  4356. optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector labelSelector = 4;
  4357. }
  4358. // TypedLocalObjectReference contains enough information to let you locate the
  4359. // typed referenced object inside the same namespace.
  4360. message TypedLocalObjectReference {
  4361. // APIGroup is the group for the resource being referenced.
  4362. // If APIGroup is not specified, the specified Kind must be in the core API group.
  4363. // For any other third-party types, APIGroup is required.
  4364. // +optional
  4365. optional string apiGroup = 1;
  4366. // Kind is the type of resource being referenced
  4367. optional string kind = 2;
  4368. // Name is the name of resource being referenced
  4369. optional string name = 3;
  4370. }
  4371. // Volume represents a named volume in a pod that may be accessed by any container in the pod.
  4372. message Volume {
  4373. // Volume's name.
  4374. // Must be a DNS_LABEL and unique within the pod.
  4375. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  4376. optional string name = 1;
  4377. // VolumeSource represents the location and type of the mounted volume.
  4378. // If not specified, the Volume is implied to be an EmptyDir.
  4379. // This implied behavior is deprecated and will be removed in a future version.
  4380. optional VolumeSource volumeSource = 2;
  4381. }
  4382. // volumeDevice describes a mapping of a raw block device within a container.
  4383. message VolumeDevice {
  4384. // name must match the name of a persistentVolumeClaim in the pod
  4385. optional string name = 1;
  4386. // devicePath is the path inside of the container that the device will be mapped to.
  4387. optional string devicePath = 2;
  4388. }
  4389. // VolumeMount describes a mounting of a Volume within a container.
  4390. message VolumeMount {
  4391. // This must match the Name of a Volume.
  4392. optional string name = 1;
  4393. // Mounted read-only if true, read-write otherwise (false or unspecified).
  4394. // Defaults to false.
  4395. // +optional
  4396. optional bool readOnly = 2;
  4397. // Path within the container at which the volume should be mounted. Must
  4398. // not contain ':'.
  4399. optional string mountPath = 3;
  4400. // Path within the volume from which the container's volume should be mounted.
  4401. // Defaults to "" (volume's root).
  4402. // +optional
  4403. optional string subPath = 4;
  4404. // mountPropagation determines how mounts are propagated from the host
  4405. // to container and the other way around.
  4406. // When not set, MountPropagationNone is used.
  4407. // This field is beta in 1.10.
  4408. // +optional
  4409. optional string mountPropagation = 5;
  4410. // Expanded path within the volume from which the container's volume should be mounted.
  4411. // Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment.
  4412. // Defaults to "" (volume's root).
  4413. // SubPathExpr and SubPath are mutually exclusive.
  4414. // +optional
  4415. optional string subPathExpr = 6;
  4416. }
  4417. // VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from.
  4418. message VolumeNodeAffinity {
  4419. // Required specifies hard node constraints that must be met.
  4420. optional NodeSelector required = 1;
  4421. }
  4422. // Projection that may be projected along with other supported volume types
  4423. message VolumeProjection {
  4424. // information about the secret data to project
  4425. // +optional
  4426. optional SecretProjection secret = 1;
  4427. // information about the downwardAPI data to project
  4428. // +optional
  4429. optional DownwardAPIProjection downwardAPI = 2;
  4430. // information about the configMap data to project
  4431. // +optional
  4432. optional ConfigMapProjection configMap = 3;
  4433. // information about the serviceAccountToken data to project
  4434. // +optional
  4435. optional ServiceAccountTokenProjection serviceAccountToken = 4;
  4436. }
  4437. // Represents the source of a volume to mount.
  4438. // Only one of its members may be specified.
  4439. message VolumeSource {
  4440. // HostPath represents a pre-existing file or directory on the host
  4441. // machine that is directly exposed to the container. This is generally
  4442. // used for system agents or other privileged things that are allowed
  4443. // to see the host machine. Most containers will NOT need this.
  4444. // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
  4445. // ---
  4446. // TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not
  4447. // mount host directories as read/write.
  4448. // +optional
  4449. optional HostPathVolumeSource hostPath = 1;
  4450. // EmptyDir represents a temporary directory that shares a pod's lifetime.
  4451. // More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
  4452. // +optional
  4453. optional EmptyDirVolumeSource emptyDir = 2;
  4454. // GCEPersistentDisk represents a GCE Disk resource that is attached to a
  4455. // kubelet's host machine and then exposed to the pod.
  4456. // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
  4457. // +optional
  4458. optional GCEPersistentDiskVolumeSource gcePersistentDisk = 3;
  4459. // AWSElasticBlockStore represents an AWS Disk resource that is attached to a
  4460. // kubelet's host machine and then exposed to the pod.
  4461. // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
  4462. // +optional
  4463. optional AWSElasticBlockStoreVolumeSource awsElasticBlockStore = 4;
  4464. // GitRepo represents a git repository at a particular revision.
  4465. // DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an
  4466. // EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir
  4467. // into the Pod's container.
  4468. // +optional
  4469. optional GitRepoVolumeSource gitRepo = 5;
  4470. // Secret represents a secret that should populate this volume.
  4471. // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
  4472. // +optional
  4473. optional SecretVolumeSource secret = 6;
  4474. // NFS represents an NFS mount on the host that shares a pod's lifetime
  4475. // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
  4476. // +optional
  4477. optional NFSVolumeSource nfs = 7;
  4478. // ISCSI represents an ISCSI Disk resource that is attached to a
  4479. // kubelet's host machine and then exposed to the pod.
  4480. // More info: https://examples.k8s.io/volumes/iscsi/README.md
  4481. // +optional
  4482. optional ISCSIVolumeSource iscsi = 8;
  4483. // Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime.
  4484. // More info: https://examples.k8s.io/volumes/glusterfs/README.md
  4485. // +optional
  4486. optional GlusterfsVolumeSource glusterfs = 9;
  4487. // PersistentVolumeClaimVolumeSource represents a reference to a
  4488. // PersistentVolumeClaim in the same namespace.
  4489. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
  4490. // +optional
  4491. optional PersistentVolumeClaimVolumeSource persistentVolumeClaim = 10;
  4492. // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime.
  4493. // More info: https://examples.k8s.io/volumes/rbd/README.md
  4494. // +optional
  4495. optional RBDVolumeSource rbd = 11;
  4496. // FlexVolume represents a generic volume resource that is
  4497. // provisioned/attached using an exec based plugin.
  4498. // +optional
  4499. optional FlexVolumeSource flexVolume = 12;
  4500. // Cinder represents a cinder volume attached and mounted on kubelets host machine.
  4501. // More info: https://examples.k8s.io/mysql-cinder-pd/README.md
  4502. // +optional
  4503. optional CinderVolumeSource cinder = 13;
  4504. // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
  4505. // +optional
  4506. optional CephFSVolumeSource cephfs = 14;
  4507. // Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
  4508. // +optional
  4509. optional FlockerVolumeSource flocker = 15;
  4510. // DownwardAPI represents downward API about the pod that should populate this volume
  4511. // +optional
  4512. optional DownwardAPIVolumeSource downwardAPI = 16;
  4513. // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
  4514. // +optional
  4515. optional FCVolumeSource fc = 17;
  4516. // AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
  4517. // +optional
  4518. optional AzureFileVolumeSource azureFile = 18;
  4519. // ConfigMap represents a configMap that should populate this volume
  4520. // +optional
  4521. optional ConfigMapVolumeSource configMap = 19;
  4522. // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
  4523. // +optional
  4524. optional VsphereVirtualDiskVolumeSource vsphereVolume = 20;
  4525. // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
  4526. // +optional
  4527. optional QuobyteVolumeSource quobyte = 21;
  4528. // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
  4529. // +optional
  4530. optional AzureDiskVolumeSource azureDisk = 22;
  4531. // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine
  4532. optional PhotonPersistentDiskVolumeSource photonPersistentDisk = 23;
  4533. // Items for all in one resources secrets, configmaps, and downward API
  4534. optional ProjectedVolumeSource projected = 26;
  4535. // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine
  4536. // +optional
  4537. optional PortworxVolumeSource portworxVolume = 24;
  4538. // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
  4539. // +optional
  4540. optional ScaleIOVolumeSource scaleIO = 25;
  4541. // StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.
  4542. // +optional
  4543. optional StorageOSVolumeSource storageos = 27;
  4544. // CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).
  4545. // +optional
  4546. optional CSIVolumeSource csi = 28;
  4547. // Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature).
  4548. // The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts,
  4549. // and deleted when the pod is removed.
  4550. //
  4551. // Use this if:
  4552. // a) the volume is only needed while the pod runs,
  4553. // b) features of normal volumes like restoring from snapshot or capacity
  4554. // tracking are needed,
  4555. // c) the storage driver is specified through a storage class, and
  4556. // d) the storage driver supports dynamic volume provisioning through
  4557. // a PersistentVolumeClaim (see EphemeralVolumeSource for more
  4558. // information on the connection between this volume type
  4559. // and PersistentVolumeClaim).
  4560. //
  4561. // Use PersistentVolumeClaim or one of the vendor-specific
  4562. // APIs for volumes that persist for longer than the lifecycle
  4563. // of an individual pod.
  4564. //
  4565. // Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to
  4566. // be used that way - see the documentation of the driver for
  4567. // more information.
  4568. //
  4569. // A pod can use both types of ephemeral volumes and
  4570. // persistent volumes at the same time.
  4571. //
  4572. // +optional
  4573. optional EphemeralVolumeSource ephemeral = 29;
  4574. }
  4575. // Represents a vSphere volume resource.
  4576. message VsphereVirtualDiskVolumeSource {
  4577. // Path that identifies vSphere volume vmdk
  4578. optional string volumePath = 1;
  4579. // Filesystem type to mount.
  4580. // Must be a filesystem type supported by the host operating system.
  4581. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
  4582. // +optional
  4583. optional string fsType = 2;
  4584. // Storage Policy Based Management (SPBM) profile name.
  4585. // +optional
  4586. optional string storagePolicyName = 3;
  4587. // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.
  4588. // +optional
  4589. optional string storagePolicyID = 4;
  4590. }
  4591. // The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)
  4592. message WeightedPodAffinityTerm {
  4593. // weight associated with matching the corresponding podAffinityTerm,
  4594. // in the range 1-100.
  4595. optional int32 weight = 1;
  4596. // Required. A pod affinity term, associated with the corresponding weight.
  4597. optional PodAffinityTerm podAffinityTerm = 2;
  4598. }
  4599. // WindowsSecurityContextOptions contain Windows-specific options and credentials.
  4600. message WindowsSecurityContextOptions {
  4601. // GMSACredentialSpecName is the name of the GMSA credential spec to use.
  4602. // +optional
  4603. optional string gmsaCredentialSpecName = 1;
  4604. // GMSACredentialSpec is where the GMSA admission webhook
  4605. // (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the
  4606. // GMSA credential spec named by the GMSACredentialSpecName field.
  4607. // +optional
  4608. optional string gmsaCredentialSpec = 2;
  4609. // The UserName in Windows to run the entrypoint of the container process.
  4610. // Defaults to the user specified in image metadata if unspecified.
  4611. // May also be set in PodSecurityContext. If set in both SecurityContext and
  4612. // PodSecurityContext, the value specified in SecurityContext takes precedence.
  4613. // +optional
  4614. optional string runAsUserName = 3;
  4615. }