calico.yaml.j2 256 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355
  1. # FROM: https://raw.githubusercontent.com/projectcalico/calico/v3.27.5/manifests/calico.yaml
  2. ---
  3. # Source: calico/templates/calico-kube-controllers.yaml
  4. # This manifest creates a Pod Disruption Budget for Controller to allow K8s Cluster Autoscaler to evict
  5. apiVersion: policy/v1
  6. kind: PodDisruptionBudget
  7. metadata:
  8. name: calico-kube-controllers
  9. namespace: kube-system
  10. labels:
  11. k8s-app: calico-kube-controllers
  12. spec:
  13. maxUnavailable: 1
  14. selector:
  15. matchLabels:
  16. k8s-app: calico-kube-controllers
  17. ---
  18. # Source: calico/templates/calico-kube-controllers.yaml
  19. apiVersion: v1
  20. kind: ServiceAccount
  21. metadata:
  22. name: calico-kube-controllers
  23. namespace: kube-system
  24. ---
  25. # Source: calico/templates/calico-node.yaml
  26. apiVersion: v1
  27. kind: ServiceAccount
  28. metadata:
  29. name: calico-node
  30. namespace: kube-system
  31. ---
  32. # Source: calico/templates/calico-node.yaml
  33. apiVersion: v1
  34. kind: ServiceAccount
  35. metadata:
  36. name: calico-cni-plugin
  37. namespace: kube-system
  38. ---
  39. # Source: calico/templates/calico-config.yaml
  40. # This ConfigMap is used to configure a self-hosted Calico installation.
  41. kind: ConfigMap
  42. apiVersion: v1
  43. metadata:
  44. name: calico-config
  45. namespace: kube-system
  46. data:
  47. # Typha is disabled.
  48. typha_service_name: "none"
  49. # Configure the backend to use.
  50. {% if ip_type == 'ipv6' %}
  51. calico_backend: "vxlan"
  52. {% else %}
  53. calico_backend: "bird"
  54. {% endif %}
  55. # Configure the MTU to use for workload interfaces and tunnels.
  56. # By default, MTU is auto-detected, and explicitly setting this field should not be required.
  57. # You can override auto-detection by providing a non-zero value.
  58. veth_mtu: "0"
  59. # The CNI network configuration to install on each node. The special
  60. # values in this config will be automatically populated.
  61. cni_network_config: |-
  62. {
  63. "name": "k8s-pod-network",
  64. "cniVersion": "0.3.1",
  65. "plugins": [
  66. {
  67. "type": "calico",
  68. "log_level": "info",
  69. "log_file_path": "/var/log/calico/cni/cni.log",
  70. "datastore_type": "kubernetes",
  71. "nodename": "__KUBERNETES_NODE_NAME__",
  72. "mtu": __CNI_MTU__,
  73. "ipam": {
  74. "type": "calico-ipam"{% if ip_type == 'ipv6' %},
  75. "assign_ipv4": "false",
  76. "assign_ipv6": "true"{% elif ip_type == 'dual-stack' %},
  77. "assign_ipv4": "true",
  78. "assign_ipv6": "true"{% else %},
  79. "assign_ipv4": "true",
  80. "assign_ipv6": "false"{% endif %}
  81. },
  82. "container_settings": {
  83. "allow_ip_forwarding": true
  84. },
  85. "policy": {
  86. "type": "k8s"
  87. },
  88. "kubernetes": {
  89. "kubeconfig": "__KUBECONFIG_FILEPATH__"
  90. }
  91. },
  92. {
  93. "type": "portmap",
  94. "snat": true,
  95. "capabilities": {"portMappings": true}
  96. },
  97. {
  98. "type": "bandwidth",
  99. "capabilities": {"bandwidth": true}
  100. }
  101. ]
  102. }
  103. ---
  104. # Source: calico/templates/kubernetes-services-endpoint.yaml
  105. # This ConfigMap is used to configure where Calico should connect to the Kubernetes API server
  106. # In high availability and IPv6 environments, we need to explicitly set this to avoid connectivity issues
  107. {% if high_availability_vip is defined or ip_type == 'ipv6' or ip_type == 'dual-stack' %}
  108. apiVersion: v1
  109. kind: ConfigMap
  110. metadata:
  111. name: kubernetes-services-endpoint
  112. namespace: kube-system
  113. data:
  114. KUBERNETES_SERVICE_HOST: "{{ api_endpoint }}"
  115. KUBERNETES_SERVICE_PORT: "{{ api_port | default('6443') }}"
  116. ---
  117. {% endif %}
  118. # BGP configuration for VXLAN mode - disable BGP mesh
  119. {% if ip_type == 'ipv6' %}
  120. apiVersion: crd.projectcalico.org/v1
  121. kind: BGPConfiguration
  122. metadata:
  123. name: default
  124. spec:
  125. nodeToNodeMeshEnabled: false
  126. asNumber: 64512
  127. ---
  128. {% endif %}
  129. # BGP configuration for dual-stack mode - disable BGP mesh for VXLAN
  130. {% if ip_type == 'dual-stack' %}
  131. apiVersion: crd.projectcalico.org/v1
  132. kind: BGPConfiguration
  133. metadata:
  134. name: default
  135. spec:
  136. nodeToNodeMeshEnabled: false
  137. asNumber: 64512
  138. ---
  139. {% endif %}
  140. # BGP configuration for IPv4 mode - disable BGP mesh for VXLAN
  141. {% if ip_type == 'ipv4' %}
  142. apiVersion: crd.projectcalico.org/v1
  143. kind: BGPConfiguration
  144. metadata:
  145. name: default
  146. spec:
  147. nodeToNodeMeshEnabled: false
  148. asNumber: 64512
  149. ---
  150. {% endif %}
  151. # Source: calico/templates/kdd-crds.yaml
  152. apiVersion: apiextensions.k8s.io/v1
  153. kind: CustomResourceDefinition
  154. metadata:
  155. name: bgpconfigurations.crd.projectcalico.org
  156. spec:
  157. group: crd.projectcalico.org
  158. names:
  159. kind: BGPConfiguration
  160. listKind: BGPConfigurationList
  161. plural: bgpconfigurations
  162. singular: bgpconfiguration
  163. preserveUnknownFields: false
  164. scope: Cluster
  165. versions:
  166. - name: v1
  167. schema:
  168. openAPIV3Schema:
  169. description: BGPConfiguration contains the configuration for any BGP routing.
  170. properties:
  171. apiVersion:
  172. description: 'APIVersion defines the versioned schema of this representation
  173. of an object. Servers should convert recognized schemas to the latest
  174. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  175. type: string
  176. kind:
  177. description: 'Kind is a string value representing the REST resource this
  178. object represents. Servers may infer this from the endpoint the client
  179. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  180. type: string
  181. metadata:
  182. type: object
  183. spec:
  184. description: BGPConfigurationSpec contains the values of the BGP configuration.
  185. properties:
  186. asNumber:
  187. description: 'ASNumber is the default AS number used by a node. [Default:
  188. 64512]'
  189. format: int32
  190. type: integer
  191. bindMode:
  192. description: BindMode indicates whether to listen for BGP connections
  193. on all addresses (None) or only on the node's canonical IP address
  194. Node.Spec.BGP.IPvXAddress (NodeIP). Default behaviour is to listen
  195. for BGP connections on all addresses.
  196. type: string
  197. communities:
  198. description: Communities is a list of BGP community values and their
  199. arbitrary names for tagging routes.
  200. items:
  201. description: Community contains standard or large community value
  202. and its name.
  203. properties:
  204. name:
  205. description: Name given to community value.
  206. type: string
  207. value:
  208. description: Value must be of format `aa:nn` or `aa:nn:mm`.
  209. For standard community use `aa:nn` format, where `aa` and
  210. `nn` are 16 bit number. For large community use `aa:nn:mm`
  211. format, where `aa`, `nn` and `mm` are 32 bit number. Where,
  212. `aa` is an AS Number, `nn` and `mm` are per-AS identifier.
  213. pattern: ^(\d+):(\d+)$|^(\d+):(\d+):(\d+)$
  214. type: string
  215. type: object
  216. type: array
  217. ignoredInterfaces:
  218. description: IgnoredInterfaces indicates the network interfaces that
  219. needs to be excluded when reading device routes.
  220. items:
  221. type: string
  222. type: array
  223. listenPort:
  224. description: ListenPort is the port where BGP protocol should listen.
  225. Defaults to 179
  226. maximum: 65535
  227. minimum: 1
  228. type: integer
  229. logSeverityScreen:
  230. description: 'LogSeverityScreen is the log severity above which logs
  231. are sent to the stdout. [Default: INFO]'
  232. type: string
  233. nodeMeshMaxRestartTime:
  234. description: Time to allow for software restart for node-to-mesh peerings. When
  235. specified, this is configured as the graceful restart timeout. When
  236. not specified, the BIRD default of 120s is used. This field can
  237. only be set on the default BGPConfiguration instance and requires
  238. that NodeMesh is enabled
  239. type: string
  240. nodeMeshPassword:
  241. description: Optional BGP password for full node-to-mesh peerings.
  242. This field can only be set on the default BGPConfiguration instance
  243. and requires that NodeMesh is enabled
  244. properties:
  245. secretKeyRef:
  246. description: Selects a key of a secret in the node pod's namespace.
  247. properties:
  248. key:
  249. description: The key of the secret to select from. Must be
  250. a valid secret key.
  251. type: string
  252. name:
  253. description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  254. TODO: Add other useful fields. apiVersion, kind, uid?'
  255. type: string
  256. optional:
  257. description: Specify whether the Secret or its key must be
  258. defined
  259. type: boolean
  260. required:
  261. - key
  262. type: object
  263. type: object
  264. nodeToNodeMeshEnabled:
  265. description: 'NodeToNodeMeshEnabled sets whether full node to node
  266. BGP mesh is enabled. [Default: true]'
  267. type: boolean
  268. prefixAdvertisements:
  269. description: PrefixAdvertisements contains per-prefix advertisement
  270. configuration.
  271. items:
  272. description: PrefixAdvertisement configures advertisement properties
  273. for the specified CIDR.
  274. properties:
  275. cidr:
  276. description: CIDR for which properties should be advertised.
  277. type: string
  278. communities:
  279. description: Communities can be list of either community names
  280. already defined in `Specs.Communities` or community value
  281. of format `aa:nn` or `aa:nn:mm`. For standard community use
  282. `aa:nn` format, where `aa` and `nn` are 16 bit number. For
  283. large community use `aa:nn:mm` format, where `aa`, `nn` and
  284. `mm` are 32 bit number. Where,`aa` is an AS Number, `nn` and
  285. `mm` are per-AS identifier.
  286. items:
  287. type: string
  288. type: array
  289. type: object
  290. type: array
  291. serviceClusterIPs:
  292. description: ServiceClusterIPs are the CIDR blocks from which service
  293. cluster IPs are allocated. If specified, Calico will advertise these
  294. blocks, as well as any cluster IPs within them.
  295. items:
  296. description: ServiceClusterIPBlock represents a single allowed ClusterIP
  297. CIDR block.
  298. properties:
  299. cidr:
  300. type: string
  301. type: object
  302. type: array
  303. serviceExternalIPs:
  304. description: ServiceExternalIPs are the CIDR blocks for Kubernetes
  305. Service External IPs. Kubernetes Service ExternalIPs will only be
  306. advertised if they are within one of these blocks.
  307. items:
  308. description: ServiceExternalIPBlock represents a single allowed
  309. External IP CIDR block.
  310. properties:
  311. cidr:
  312. type: string
  313. type: object
  314. type: array
  315. serviceLoadBalancerIPs:
  316. description: ServiceLoadBalancerIPs are the CIDR blocks for Kubernetes
  317. Service LoadBalancer IPs. Kubernetes Service status.LoadBalancer.Ingress
  318. IPs will only be advertised if they are within one of these blocks.
  319. items:
  320. description: ServiceLoadBalancerIPBlock represents a single allowed
  321. LoadBalancer IP CIDR block.
  322. properties:
  323. cidr:
  324. type: string
  325. type: object
  326. type: array
  327. type: object
  328. type: object
  329. served: true
  330. storage: true
  331. status:
  332. acceptedNames:
  333. kind: ""
  334. plural: ""
  335. conditions: []
  336. storedVersions: []
  337. ---
  338. # Source: calico/templates/kdd-crds.yaml
  339. apiVersion: apiextensions.k8s.io/v1
  340. kind: CustomResourceDefinition
  341. metadata:
  342. annotations:
  343. controller-gen.kubebuilder.io/version: (devel)
  344. creationTimestamp: null
  345. name: bgpfilters.crd.projectcalico.org
  346. spec:
  347. group: crd.projectcalico.org
  348. names:
  349. kind: BGPFilter
  350. listKind: BGPFilterList
  351. plural: bgpfilters
  352. singular: bgpfilter
  353. scope: Cluster
  354. versions:
  355. - name: v1
  356. schema:
  357. openAPIV3Schema:
  358. properties:
  359. apiVersion:
  360. description: 'APIVersion defines the versioned schema of this representation
  361. of an object. Servers should convert recognized schemas to the latest
  362. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  363. type: string
  364. kind:
  365. description: 'Kind is a string value representing the REST resource this
  366. object represents. Servers may infer this from the endpoint the client
  367. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  368. type: string
  369. metadata:
  370. type: object
  371. spec:
  372. description: BGPFilterSpec contains the IPv4 and IPv6 filter rules of
  373. the BGP Filter.
  374. properties:
  375. exportV4:
  376. description: The ordered set of IPv4 BGPFilter rules acting on exporting
  377. routes to a peer.
  378. items:
  379. description: BGPFilterRuleV4 defines a BGP filter rule consisting
  380. a single IPv4 CIDR block and a filter action for this CIDR.
  381. properties:
  382. action:
  383. type: string
  384. cidr:
  385. type: string
  386. interface:
  387. type: string
  388. matchOperator:
  389. type: string
  390. source:
  391. type: string
  392. required:
  393. - action
  394. type: object
  395. type: array
  396. exportV6:
  397. description: The ordered set of IPv6 BGPFilter rules acting on exporting
  398. routes to a peer.
  399. items:
  400. description: BGPFilterRuleV6 defines a BGP filter rule consisting
  401. a single IPv6 CIDR block and a filter action for this CIDR.
  402. properties:
  403. action:
  404. type: string
  405. cidr:
  406. type: string
  407. interface:
  408. type: string
  409. matchOperator:
  410. type: string
  411. source:
  412. type: string
  413. required:
  414. - action
  415. type: object
  416. type: array
  417. importV4:
  418. description: The ordered set of IPv4 BGPFilter rules acting on importing
  419. routes from a peer.
  420. items:
  421. description: BGPFilterRuleV4 defines a BGP filter rule consisting
  422. a single IPv4 CIDR block and a filter action for this CIDR.
  423. properties:
  424. action:
  425. type: string
  426. cidr:
  427. type: string
  428. interface:
  429. type: string
  430. matchOperator:
  431. type: string
  432. source:
  433. type: string
  434. required:
  435. - action
  436. type: object
  437. type: array
  438. importV6:
  439. description: The ordered set of IPv6 BGPFilter rules acting on importing
  440. routes from a peer.
  441. items:
  442. description: BGPFilterRuleV6 defines a BGP filter rule consisting
  443. a single IPv6 CIDR block and a filter action for this CIDR.
  444. properties:
  445. action:
  446. type: string
  447. cidr:
  448. type: string
  449. interface:
  450. type: string
  451. matchOperator:
  452. type: string
  453. source:
  454. type: string
  455. required:
  456. - action
  457. type: object
  458. type: array
  459. type: object
  460. type: object
  461. served: true
  462. storage: true
  463. status:
  464. acceptedNames:
  465. kind: ""
  466. plural: ""
  467. conditions: []
  468. storedVersions: []
  469. ---
  470. # Source: calico/templates/kdd-crds.yaml
  471. apiVersion: apiextensions.k8s.io/v1
  472. kind: CustomResourceDefinition
  473. metadata:
  474. name: bgppeers.crd.projectcalico.org
  475. spec:
  476. group: crd.projectcalico.org
  477. names:
  478. kind: BGPPeer
  479. listKind: BGPPeerList
  480. plural: bgppeers
  481. singular: bgppeer
  482. preserveUnknownFields: false
  483. scope: Cluster
  484. versions:
  485. - name: v1
  486. schema:
  487. openAPIV3Schema:
  488. properties:
  489. apiVersion:
  490. description: 'APIVersion defines the versioned schema of this representation
  491. of an object. Servers should convert recognized schemas to the latest
  492. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  493. type: string
  494. kind:
  495. description: 'Kind is a string value representing the REST resource this
  496. object represents. Servers may infer this from the endpoint the client
  497. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  498. type: string
  499. metadata:
  500. type: object
  501. spec:
  502. description: BGPPeerSpec contains the specification for a BGPPeer resource.
  503. properties:
  504. asNumber:
  505. description: The AS Number of the peer.
  506. format: int32
  507. type: integer
  508. filters:
  509. description: The ordered set of BGPFilters applied on this BGP peer.
  510. items:
  511. type: string
  512. type: array
  513. keepOriginalNextHop:
  514. description: Option to keep the original nexthop field when routes
  515. are sent to a BGP Peer. Setting "true" configures the selected BGP
  516. Peers node to use the "next hop keep;" instead of "next hop self;"(default)
  517. in the specific branch of the Node on "bird.cfg".
  518. type: boolean
  519. maxRestartTime:
  520. description: Time to allow for software restart. When specified,
  521. this is configured as the graceful restart timeout. When not specified,
  522. the BIRD default of 120s is used.
  523. type: string
  524. node:
  525. description: The node name identifying the Calico node instance that
  526. is targeted by this peer. If this is not set, and no nodeSelector
  527. is specified, then this BGP peer selects all nodes in the cluster.
  528. type: string
  529. nodeSelector:
  530. description: Selector for the nodes that should have this peering. When
  531. this is set, the Node field must be empty.
  532. type: string
  533. numAllowedLocalASNumbers:
  534. description: Maximum number of local AS numbers that are allowed in
  535. the AS path for received routes. This removes BGP loop prevention
  536. and should only be used if absolutely necesssary.
  537. format: int32
  538. type: integer
  539. password:
  540. description: Optional BGP password for the peerings generated by this
  541. BGPPeer resource.
  542. properties:
  543. secretKeyRef:
  544. description: Selects a key of a secret in the node pod's namespace.
  545. properties:
  546. key:
  547. description: The key of the secret to select from. Must be
  548. a valid secret key.
  549. type: string
  550. name:
  551. description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  552. TODO: Add other useful fields. apiVersion, kind, uid?'
  553. type: string
  554. optional:
  555. description: Specify whether the Secret or its key must be
  556. defined
  557. type: boolean
  558. required:
  559. - key
  560. type: object
  561. type: object
  562. peerIP:
  563. description: The IP address of the peer followed by an optional port
  564. number to peer with. If port number is given, format should be `[<IPv6>]:port`
  565. or `<IPv4>:<port>` for IPv4. If optional port number is not set,
  566. and this peer IP and ASNumber belongs to a calico/node with ListenPort
  567. set in BGPConfiguration, then we use that port to peer.
  568. type: string
  569. peerSelector:
  570. description: Selector for the remote nodes to peer with. When this
  571. is set, the PeerIP and ASNumber fields must be empty. For each
  572. peering between the local node and selected remote nodes, we configure
  573. an IPv4 peering if both ends have NodeBGPSpec.IPv4Address specified,
  574. and an IPv6 peering if both ends have NodeBGPSpec.IPv6Address specified. The
  575. remote AS number comes from the remote node's NodeBGPSpec.ASNumber,
  576. or the global default if that is not set.
  577. type: string
  578. reachableBy:
  579. description: Add an exact, i.e. /32, static route toward peer IP in
  580. order to prevent route flapping. ReachableBy contains the address
  581. of the gateway which peer can be reached by.
  582. type: string
  583. sourceAddress:
  584. description: Specifies whether and how to configure a source address
  585. for the peerings generated by this BGPPeer resource. Default value
  586. "UseNodeIP" means to configure the node IP as the source address. "None"
  587. means not to configure a source address.
  588. type: string
  589. ttlSecurity:
  590. description: TTLSecurity enables the generalized TTL security mechanism
  591. (GTSM) which protects against spoofed packets by ignoring received
  592. packets with a smaller than expected TTL value. The provided value
  593. is the number of hops (edges) between the peers.
  594. type: integer
  595. type: object
  596. type: object
  597. served: true
  598. storage: true
  599. status:
  600. acceptedNames:
  601. kind: ""
  602. plural: ""
  603. conditions: []
  604. storedVersions: []
  605. ---
  606. # Source: calico/templates/kdd-crds.yaml
  607. apiVersion: apiextensions.k8s.io/v1
  608. kind: CustomResourceDefinition
  609. metadata:
  610. name: blockaffinities.crd.projectcalico.org
  611. spec:
  612. group: crd.projectcalico.org
  613. names:
  614. kind: BlockAffinity
  615. listKind: BlockAffinityList
  616. plural: blockaffinities
  617. singular: blockaffinity
  618. preserveUnknownFields: false
  619. scope: Cluster
  620. versions:
  621. - name: v1
  622. schema:
  623. openAPIV3Schema:
  624. properties:
  625. apiVersion:
  626. description: 'APIVersion defines the versioned schema of this representation
  627. of an object. Servers should convert recognized schemas to the latest
  628. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  629. type: string
  630. kind:
  631. description: 'Kind is a string value representing the REST resource this
  632. object represents. Servers may infer this from the endpoint the client
  633. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  634. type: string
  635. metadata:
  636. type: object
  637. spec:
  638. description: BlockAffinitySpec contains the specification for a BlockAffinity
  639. resource.
  640. properties:
  641. cidr:
  642. type: string
  643. deleted:
  644. description: Deleted indicates that this block affinity is being deleted.
  645. This field is a string for compatibility with older releases that
  646. mistakenly treat this field as a string.
  647. type: string
  648. node:
  649. type: string
  650. state:
  651. type: string
  652. required:
  653. - cidr
  654. - deleted
  655. - node
  656. - state
  657. type: object
  658. type: object
  659. served: true
  660. storage: true
  661. status:
  662. acceptedNames:
  663. kind: ""
  664. plural: ""
  665. conditions: []
  666. storedVersions: []
  667. ---
  668. # Source: calico/templates/kdd-crds.yaml
  669. apiVersion: apiextensions.k8s.io/v1
  670. kind: CustomResourceDefinition
  671. metadata:
  672. annotations:
  673. controller-gen.kubebuilder.io/version: (devel)
  674. creationTimestamp: null
  675. name: caliconodestatuses.crd.projectcalico.org
  676. spec:
  677. group: crd.projectcalico.org
  678. names:
  679. kind: CalicoNodeStatus
  680. listKind: CalicoNodeStatusList
  681. plural: caliconodestatuses
  682. singular: caliconodestatus
  683. preserveUnknownFields: false
  684. scope: Cluster
  685. versions:
  686. - name: v1
  687. schema:
  688. openAPIV3Schema:
  689. properties:
  690. apiVersion:
  691. description: 'APIVersion defines the versioned schema of this representation
  692. of an object. Servers should convert recognized schemas to the latest
  693. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  694. type: string
  695. kind:
  696. description: 'Kind is a string value representing the REST resource this
  697. object represents. Servers may infer this from the endpoint the client
  698. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  699. type: string
  700. metadata:
  701. type: object
  702. spec:
  703. description: CalicoNodeStatusSpec contains the specification for a CalicoNodeStatus
  704. resource.
  705. properties:
  706. classes:
  707. description: Classes declares the types of information to monitor
  708. for this calico/node, and allows for selective status reporting
  709. about certain subsets of information.
  710. items:
  711. type: string
  712. type: array
  713. node:
  714. description: The node name identifies the Calico node instance for
  715. node status.
  716. type: string
  717. updatePeriodSeconds:
  718. description: UpdatePeriodSeconds is the period at which CalicoNodeStatus
  719. should be updated. Set to 0 to disable CalicoNodeStatus refresh.
  720. Maximum update period is one day.
  721. format: int32
  722. type: integer
  723. type: object
  724. status:
  725. description: CalicoNodeStatusStatus defines the observed state of CalicoNodeStatus.
  726. No validation needed for status since it is updated by Calico.
  727. properties:
  728. agent:
  729. description: Agent holds agent status on the node.
  730. properties:
  731. birdV4:
  732. description: BIRDV4 represents the latest observed status of bird4.
  733. properties:
  734. lastBootTime:
  735. description: LastBootTime holds the value of lastBootTime
  736. from bird.ctl output.
  737. type: string
  738. lastReconfigurationTime:
  739. description: LastReconfigurationTime holds the value of lastReconfigTime
  740. from bird.ctl output.
  741. type: string
  742. routerID:
  743. description: Router ID used by bird.
  744. type: string
  745. state:
  746. description: The state of the BGP Daemon.
  747. type: string
  748. version:
  749. description: Version of the BGP daemon
  750. type: string
  751. type: object
  752. birdV6:
  753. description: BIRDV6 represents the latest observed status of bird6.
  754. properties:
  755. lastBootTime:
  756. description: LastBootTime holds the value of lastBootTime
  757. from bird.ctl output.
  758. type: string
  759. lastReconfigurationTime:
  760. description: LastReconfigurationTime holds the value of lastReconfigTime
  761. from bird.ctl output.
  762. type: string
  763. routerID:
  764. description: Router ID used by bird.
  765. type: string
  766. state:
  767. description: The state of the BGP Daemon.
  768. type: string
  769. version:
  770. description: Version of the BGP daemon
  771. type: string
  772. type: object
  773. type: object
  774. bgp:
  775. description: BGP holds node BGP status.
  776. properties:
  777. numberEstablishedV4:
  778. description: The total number of IPv4 established bgp sessions.
  779. type: integer
  780. numberEstablishedV6:
  781. description: The total number of IPv6 established bgp sessions.
  782. type: integer
  783. numberNotEstablishedV4:
  784. description: The total number of IPv4 non-established bgp sessions.
  785. type: integer
  786. numberNotEstablishedV6:
  787. description: The total number of IPv6 non-established bgp sessions.
  788. type: integer
  789. peersV4:
  790. description: PeersV4 represents IPv4 BGP peers status on the node.
  791. items:
  792. description: CalicoNodePeer contains the status of BGP peers
  793. on the node.
  794. properties:
  795. peerIP:
  796. description: IP address of the peer whose condition we are
  797. reporting.
  798. type: string
  799. since:
  800. description: Since the state or reason last changed.
  801. type: string
  802. state:
  803. description: State is the BGP session state.
  804. type: string
  805. type:
  806. description: Type indicates whether this peer is configured
  807. via the node-to-node mesh, or via en explicit global or
  808. per-node BGPPeer object.
  809. type: string
  810. type: object
  811. type: array
  812. peersV6:
  813. description: PeersV6 represents IPv6 BGP peers status on the node.
  814. items:
  815. description: CalicoNodePeer contains the status of BGP peers
  816. on the node.
  817. properties:
  818. peerIP:
  819. description: IP address of the peer whose condition we are
  820. reporting.
  821. type: string
  822. since:
  823. description: Since the state or reason last changed.
  824. type: string
  825. state:
  826. description: State is the BGP session state.
  827. type: string
  828. type:
  829. description: Type indicates whether this peer is configured
  830. via the node-to-node mesh, or via en explicit global or
  831. per-node BGPPeer object.
  832. type: string
  833. type: object
  834. type: array
  835. required:
  836. - numberEstablishedV4
  837. - numberEstablishedV6
  838. - numberNotEstablishedV4
  839. - numberNotEstablishedV6
  840. type: object
  841. lastUpdated:
  842. description: LastUpdated is a timestamp representing the server time
  843. when CalicoNodeStatus object last updated. It is represented in
  844. RFC3339 form and is in UTC.
  845. format: date-time
  846. nullable: true
  847. type: string
  848. routes:
  849. description: Routes reports routes known to the Calico BGP daemon
  850. on the node.
  851. properties:
  852. routesV4:
  853. description: RoutesV4 represents IPv4 routes on the node.
  854. items:
  855. description: CalicoNodeRoute contains the status of BGP routes
  856. on the node.
  857. properties:
  858. destination:
  859. description: Destination of the route.
  860. type: string
  861. gateway:
  862. description: Gateway for the destination.
  863. type: string
  864. interface:
  865. description: Interface for the destination
  866. type: string
  867. learnedFrom:
  868. description: LearnedFrom contains information regarding
  869. where this route originated.
  870. properties:
  871. peerIP:
  872. description: If sourceType is NodeMesh or BGPPeer, IP
  873. address of the router that sent us this route.
  874. type: string
  875. sourceType:
  876. description: Type of the source where a route is learned
  877. from.
  878. type: string
  879. type: object
  880. type:
  881. description: Type indicates if the route is being used for
  882. forwarding or not.
  883. type: string
  884. type: object
  885. type: array
  886. routesV6:
  887. description: RoutesV6 represents IPv6 routes on the node.
  888. items:
  889. description: CalicoNodeRoute contains the status of BGP routes
  890. on the node.
  891. properties:
  892. destination:
  893. description: Destination of the route.
  894. type: string
  895. gateway:
  896. description: Gateway for the destination.
  897. type: string
  898. interface:
  899. description: Interface for the destination
  900. type: string
  901. learnedFrom:
  902. description: LearnedFrom contains information regarding
  903. where this route originated.
  904. properties:
  905. peerIP:
  906. description: If sourceType is NodeMesh or BGPPeer, IP
  907. address of the router that sent us this route.
  908. type: string
  909. sourceType:
  910. description: Type of the source where a route is learned
  911. from.
  912. type: string
  913. type: object
  914. type:
  915. description: Type indicates if the route is being used for
  916. forwarding or not.
  917. type: string
  918. type: object
  919. type: array
  920. type: object
  921. type: object
  922. type: object
  923. served: true
  924. storage: true
  925. status:
  926. acceptedNames:
  927. kind: ""
  928. plural: ""
  929. conditions: []
  930. storedVersions: []
  931. ---
  932. # Source: calico/templates/kdd-crds.yaml
  933. apiVersion: apiextensions.k8s.io/v1
  934. kind: CustomResourceDefinition
  935. metadata:
  936. name: clusterinformations.crd.projectcalico.org
  937. spec:
  938. group: crd.projectcalico.org
  939. names:
  940. kind: ClusterInformation
  941. listKind: ClusterInformationList
  942. plural: clusterinformations
  943. singular: clusterinformation
  944. preserveUnknownFields: false
  945. scope: Cluster
  946. versions:
  947. - name: v1
  948. schema:
  949. openAPIV3Schema:
  950. description: ClusterInformation contains the cluster specific information.
  951. properties:
  952. apiVersion:
  953. description: 'APIVersion defines the versioned schema of this representation
  954. of an object. Servers should convert recognized schemas to the latest
  955. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  956. type: string
  957. kind:
  958. description: 'Kind is a string value representing the REST resource this
  959. object represents. Servers may infer this from the endpoint the client
  960. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  961. type: string
  962. metadata:
  963. type: object
  964. spec:
  965. description: ClusterInformationSpec contains the values of describing
  966. the cluster.
  967. properties:
  968. calicoVersion:
  969. description: CalicoVersion is the version of Calico that the cluster
  970. is running
  971. type: string
  972. clusterGUID:
  973. description: ClusterGUID is the GUID of the cluster
  974. type: string
  975. clusterType:
  976. description: ClusterType describes the type of the cluster
  977. type: string
  978. datastoreReady:
  979. description: DatastoreReady is used during significant datastore migrations
  980. to signal to components such as Felix that it should wait before
  981. accessing the datastore.
  982. type: boolean
  983. variant:
  984. description: Variant declares which variant of Calico should be active.
  985. type: string
  986. type: object
  987. type: object
  988. served: true
  989. storage: true
  990. status:
  991. acceptedNames:
  992. kind: ""
  993. plural: ""
  994. conditions: []
  995. storedVersions: []
  996. ---
  997. # Source: calico/templates/kdd-crds.yaml
  998. apiVersion: apiextensions.k8s.io/v1
  999. kind: CustomResourceDefinition
  1000. metadata:
  1001. name: felixconfigurations.crd.projectcalico.org
  1002. spec:
  1003. group: crd.projectcalico.org
  1004. names:
  1005. kind: FelixConfiguration
  1006. listKind: FelixConfigurationList
  1007. plural: felixconfigurations
  1008. singular: felixconfiguration
  1009. preserveUnknownFields: false
  1010. scope: Cluster
  1011. versions:
  1012. - name: v1
  1013. schema:
  1014. openAPIV3Schema:
  1015. description: Felix Configuration contains the configuration for Felix.
  1016. properties:
  1017. apiVersion:
  1018. description: 'APIVersion defines the versioned schema of this representation
  1019. of an object. Servers should convert recognized schemas to the latest
  1020. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  1021. type: string
  1022. kind:
  1023. description: 'Kind is a string value representing the REST resource this
  1024. object represents. Servers may infer this from the endpoint the client
  1025. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  1026. type: string
  1027. metadata:
  1028. type: object
  1029. spec:
  1030. description: FelixConfigurationSpec contains the values of the Felix configuration.
  1031. properties:
  1032. allowIPIPPacketsFromWorkloads:
  1033. description: 'AllowIPIPPacketsFromWorkloads controls whether Felix
  1034. will add a rule to drop IPIP encapsulated traffic from workloads
  1035. [Default: false]'
  1036. type: boolean
  1037. allowVXLANPacketsFromWorkloads:
  1038. description: 'AllowVXLANPacketsFromWorkloads controls whether Felix
  1039. will add a rule to drop VXLAN encapsulated traffic from workloads
  1040. [Default: false]'
  1041. type: boolean
  1042. awsSrcDstCheck:
  1043. description: 'Set source-destination-check on AWS EC2 instances. Accepted
  1044. value must be one of "DoNothing", "Enable" or "Disable". [Default:
  1045. DoNothing]'
  1046. enum:
  1047. - DoNothing
  1048. - Enable
  1049. - Disable
  1050. type: string
  1051. bpfCTLBLogFilter:
  1052. description: 'BPFCTLBLogFilter specifies, what is logged by connect
  1053. time load balancer when BPFLogLevel is debug. Currently has to be
  1054. specified as ''all'' when BPFLogFilters is set to see CTLB logs.
  1055. [Default: unset - means logs are emitted when BPFLogLevel id debug
  1056. and BPFLogFilters not set.]'
  1057. type: string
  1058. bpfConnectTimeLoadBalancing:
  1059. description: 'BPFConnectTimeLoadBalancing when in BPF mode, controls
  1060. whether Felix installs the connect-time load balancer. The connect-time
  1061. load balancer is required for the host to be able to reach Kubernetes
  1062. services and it improves the performance of pod-to-service connections.When
  1063. set to TCP, connect time load balancing is available only for services
  1064. with TCP ports. [Default: TCP]'
  1065. enum:
  1066. - TCP
  1067. - Enabled
  1068. - Disabled
  1069. type: string
  1070. bpfConnectTimeLoadBalancingEnabled:
  1071. description: 'BPFConnectTimeLoadBalancingEnabled when in BPF mode,
  1072. controls whether Felix installs the connection-time load balancer. The
  1073. connect-time load balancer is required for the host to be able to
  1074. reach Kubernetes services and it improves the performance of pod-to-service
  1075. connections. The only reason to disable it is for debugging purposes.
  1076. This will be deprecated. Use BPFConnectTimeLoadBalancing [Default:
  1077. true]'
  1078. type: boolean
  1079. bpfDSROptoutCIDRs:
  1080. description: BPFDSROptoutCIDRs is a list of CIDRs which are excluded
  1081. from DSR. That is, clients in those CIDRs will accesses nodeports
  1082. as if BPFExternalServiceMode was set to Tunnel.
  1083. items:
  1084. type: string
  1085. type: array
  1086. bpfDataIfacePattern:
  1087. description: BPFDataIfacePattern is a regular expression that controls
  1088. which interfaces Felix should attach BPF programs to in order to
  1089. catch traffic to/from the network. This needs to match the interfaces
  1090. that Calico workload traffic flows over as well as any interfaces
  1091. that handle incoming traffic to nodeports and services from outside
  1092. the cluster. It should not match the workload interfaces (usually
  1093. named cali...).
  1094. type: string
  1095. bpfDisableGROForIfaces:
  1096. description: BPFDisableGROForIfaces is a regular expression that controls
  1097. which interfaces Felix should disable the Generic Receive Offload
  1098. [GRO] option. It should not match the workload interfaces (usually
  1099. named cali...).
  1100. type: string
  1101. bpfDisableUnprivileged:
  1102. description: 'BPFDisableUnprivileged, if enabled, Felix sets the kernel.unprivileged_bpf_disabled
  1103. sysctl to disable unprivileged use of BPF. This ensures that unprivileged
  1104. users cannot access Calico''s BPF maps and cannot insert their own
  1105. BPF programs to interfere with Calico''s. [Default: true]'
  1106. type: boolean
  1107. bpfEnabled:
  1108. description: 'BPFEnabled, if enabled Felix will use the BPF dataplane.
  1109. [Default: false]'
  1110. type: boolean
  1111. bpfEnforceRPF:
  1112. description: 'BPFEnforceRPF enforce strict RPF on all host interfaces
  1113. with BPF programs regardless of what is the per-interfaces or global
  1114. setting. Possible values are Disabled, Strict or Loose. [Default:
  1115. Loose]'
  1116. pattern: ^(?i)(Disabled|Strict|Loose)?$
  1117. type: string
  1118. bpfExcludeCIDRsFromNAT:
  1119. description: BPFExcludeCIDRsFromNAT is a list of CIDRs that are to
  1120. be excluded from NAT resolution so that host can handle them. A
  1121. typical usecase is node local DNS cache.
  1122. items:
  1123. type: string
  1124. type: array
  1125. bpfExtToServiceConnmark:
  1126. description: 'BPFExtToServiceConnmark in BPF mode, control a 32bit
  1127. mark that is set on connections from an external client to a local
  1128. service. This mark allows us to control how packets of that connection
  1129. are routed within the host and how is routing interpreted by RPF
  1130. check. [Default: 0]'
  1131. type: integer
  1132. bpfExternalServiceMode:
  1133. description: 'BPFExternalServiceMode in BPF mode, controls how connections
  1134. from outside the cluster to services (node ports and cluster IPs)
  1135. are forwarded to remote workloads. If set to "Tunnel" then both
  1136. request and response traffic is tunneled to the remote node. If
  1137. set to "DSR", the request traffic is tunneled but the response traffic
  1138. is sent directly from the remote node. In "DSR" mode, the remote
  1139. node appears to use the IP of the ingress node; this requires a
  1140. permissive L2 network. [Default: Tunnel]'
  1141. pattern: ^(?i)(Tunnel|DSR)?$
  1142. type: string
  1143. bpfForceTrackPacketsFromIfaces:
  1144. description: 'BPFForceTrackPacketsFromIfaces in BPF mode, forces traffic
  1145. from these interfaces to skip Calico''s iptables NOTRACK rule, allowing
  1146. traffic from those interfaces to be tracked by Linux conntrack. Should
  1147. only be used for interfaces that are not used for the Calico fabric. For
  1148. example, a docker bridge device for non-Calico-networked containers.
  1149. [Default: docker+]'
  1150. items:
  1151. type: string
  1152. type: array
  1153. bpfHostConntrackBypass:
  1154. description: 'BPFHostConntrackBypass Controls whether to bypass Linux
  1155. conntrack in BPF mode for workloads and services. [Default: true
  1156. - bypass Linux conntrack]'
  1157. type: boolean
  1158. bpfHostNetworkedNATWithoutCTLB:
  1159. description: 'BPFHostNetworkedNATWithoutCTLB when in BPF mode, controls
  1160. whether Felix does a NAT without CTLB. This along with BPFConnectTimeLoadBalancing
  1161. determines the CTLB behavior. [Default: Enabled]'
  1162. enum:
  1163. - Enabled
  1164. - Disabled
  1165. type: string
  1166. bpfKubeProxyEndpointSlicesEnabled:
  1167. description: BPFKubeProxyEndpointSlicesEnabled in BPF mode, controls
  1168. whether Felix's embedded kube-proxy accepts EndpointSlices or not.
  1169. type: boolean
  1170. bpfKubeProxyIptablesCleanupEnabled:
  1171. description: 'BPFKubeProxyIptablesCleanupEnabled, if enabled in BPF
  1172. mode, Felix will proactively clean up the upstream Kubernetes kube-proxy''s
  1173. iptables chains. Should only be enabled if kube-proxy is not running. [Default:
  1174. true]'
  1175. type: boolean
  1176. bpfKubeProxyMinSyncPeriod:
  1177. description: 'BPFKubeProxyMinSyncPeriod, in BPF mode, controls the
  1178. minimum time between updates to the dataplane for Felix''s embedded
  1179. kube-proxy. Lower values give reduced set-up latency. Higher values
  1180. reduce Felix CPU usage by batching up more work. [Default: 1s]'
  1181. pattern: ^([0-9]+(\\.[0-9]+)?(ms|s|m|h))*$
  1182. type: string
  1183. bpfL3IfacePattern:
  1184. description: BPFL3IfacePattern is a regular expression that allows
  1185. to list tunnel devices like wireguard or vxlan (i.e., L3 devices)
  1186. in addition to BPFDataIfacePattern. That is, tunnel interfaces not
  1187. created by Calico, that Calico workload traffic flows over as well
  1188. as any interfaces that handle incoming traffic to nodeports and
  1189. services from outside the cluster.
  1190. type: string
  1191. bpfLogFilters:
  1192. additionalProperties:
  1193. type: string
  1194. description: "BPFLogFilters is a map of key=values where the value
  1195. is a pcap filter expression and the key is an interface name with
  1196. 'all' denoting all interfaces, 'weps' all workload endpoints and
  1197. 'heps' all host endpoints. \n When specified as an env var, it accepts
  1198. a comma-separated list of key=values. [Default: unset - means all
  1199. debug logs are emitted]"
  1200. type: object
  1201. bpfLogLevel:
  1202. description: 'BPFLogLevel controls the log level of the BPF programs
  1203. when in BPF dataplane mode. One of "Off", "Info", or "Debug". The
  1204. logs are emitted to the BPF trace pipe, accessible with the command
  1205. `tc exec bpf debug`. [Default: Off].'
  1206. pattern: ^(?i)(Off|Info|Debug)?$
  1207. type: string
  1208. bpfMapSizeConntrack:
  1209. description: 'BPFMapSizeConntrack sets the size for the conntrack
  1210. map. This map must be large enough to hold an entry for each active
  1211. connection. Warning: changing the size of the conntrack map can
  1212. cause disruption.'
  1213. type: integer
  1214. bpfMapSizeIPSets:
  1215. description: BPFMapSizeIPSets sets the size for ipsets map. The IP
  1216. sets map must be large enough to hold an entry for each endpoint
  1217. matched by every selector in the source/destination matches in network
  1218. policy. Selectors such as "all()" can result in large numbers of
  1219. entries (one entry per endpoint in that case).
  1220. type: integer
  1221. bpfMapSizeIfState:
  1222. description: BPFMapSizeIfState sets the size for ifstate map. The
  1223. ifstate map must be large enough to hold an entry for each device
  1224. (host + workloads) on a host.
  1225. type: integer
  1226. bpfMapSizeNATAffinity:
  1227. type: integer
  1228. bpfMapSizeNATBackend:
  1229. description: BPFMapSizeNATBackend sets the size for nat back end map.
  1230. This is the total number of endpoints. This is mostly more than
  1231. the size of the number of services.
  1232. type: integer
  1233. bpfMapSizeNATFrontend:
  1234. description: BPFMapSizeNATFrontend sets the size for nat front end
  1235. map. FrontendMap should be large enough to hold an entry for each
  1236. nodeport, external IP and each port in each service.
  1237. type: integer
  1238. bpfMapSizeRoute:
  1239. description: BPFMapSizeRoute sets the size for the routes map. The
  1240. routes map should be large enough to hold one entry per workload
  1241. and a handful of entries per host (enough to cover its own IPs and
  1242. tunnel IPs).
  1243. type: integer
  1244. bpfPSNATPorts:
  1245. anyOf:
  1246. - type: integer
  1247. - type: string
  1248. description: 'BPFPSNATPorts sets the range from which we randomly
  1249. pick a port if there is a source port collision. This should be
  1250. within the ephemeral range as defined by RFC 6056 (1024–65535) and
  1251. preferably outside the ephemeral ranges used by common operating
  1252. systems. Linux uses 32768–60999, while others mostly use the IANA
  1253. defined range 49152–65535. It is not necessarily a problem if this
  1254. range overlaps with the operating systems. Both ends of the range
  1255. are inclusive. [Default: 20000:29999]'
  1256. pattern: ^.*
  1257. x-kubernetes-int-or-string: true
  1258. bpfPolicyDebugEnabled:
  1259. description: BPFPolicyDebugEnabled when true, Felix records detailed
  1260. information about the BPF policy programs, which can be examined
  1261. with the calico-bpf command-line tool.
  1262. type: boolean
  1263. chainInsertMode:
  1264. description: 'ChainInsertMode controls whether Felix hooks the kernel''s
  1265. top-level iptables chains by inserting a rule at the top of the
  1266. chain or by appending a rule at the bottom. insert is the safe default
  1267. since it prevents Calico''s rules from being bypassed. If you switch
  1268. to append mode, be sure that the other rules in the chains signal
  1269. acceptance by falling through to the Calico rules, otherwise the
  1270. Calico policy will be bypassed. [Default: insert]'
  1271. pattern: ^(?i)(insert|append)?$
  1272. type: string
  1273. dataplaneDriver:
  1274. description: DataplaneDriver filename of the external dataplane driver
  1275. to use. Only used if UseInternalDataplaneDriver is set to false.
  1276. type: string
  1277. dataplaneWatchdogTimeout:
  1278. description: "DataplaneWatchdogTimeout is the readiness/liveness timeout
  1279. used for Felix's (internal) dataplane driver. Increase this value
  1280. if you experience spurious non-ready or non-live events when Felix
  1281. is under heavy load. Decrease the value to get felix to report non-live
  1282. or non-ready more quickly. [Default: 90s] \n Deprecated: replaced
  1283. by the generic HealthTimeoutOverrides."
  1284. type: string
  1285. debugDisableLogDropping:
  1286. type: boolean
  1287. debugMemoryProfilePath:
  1288. type: string
  1289. debugSimulateCalcGraphHangAfter:
  1290. pattern: ^([0-9]+(\\.[0-9]+)?(ms|s|m|h))*$
  1291. type: string
  1292. debugSimulateDataplaneHangAfter:
  1293. pattern: ^([0-9]+(\\.[0-9]+)?(ms|s|m|h))*$
  1294. type: string
  1295. defaultEndpointToHostAction:
  1296. description: 'DefaultEndpointToHostAction controls what happens to
  1297. traffic that goes from a workload endpoint to the host itself (after
  1298. the traffic hits the endpoint egress policy). By default Calico
  1299. blocks traffic from workload endpoints to the host itself with an
  1300. iptables "DROP" action. If you want to allow some or all traffic
  1301. from endpoint to host, set this parameter to RETURN or ACCEPT. Use
  1302. RETURN if you have your own rules in the iptables "INPUT" chain;
  1303. Calico will insert its rules at the top of that chain, then "RETURN"
  1304. packets to the "INPUT" chain once it has completed processing workload
  1305. endpoint egress policy. Use ACCEPT to unconditionally accept packets
  1306. from workloads after processing workload endpoint egress policy.
  1307. [Default: Drop]'
  1308. pattern: ^(?i)(Drop|Accept|Return)?$
  1309. type: string
  1310. deviceRouteProtocol:
  1311. description: This defines the route protocol added to programmed device
  1312. routes, by default this will be RTPROT_BOOT when left blank.
  1313. type: integer
  1314. deviceRouteSourceAddress:
  1315. description: This is the IPv4 source address to use on programmed
  1316. device routes. By default the source address is left blank, leaving
  1317. the kernel to choose the source address used.
  1318. type: string
  1319. deviceRouteSourceAddressIPv6:
  1320. description: This is the IPv6 source address to use on programmed
  1321. device routes. By default the source address is left blank, leaving
  1322. the kernel to choose the source address used.
  1323. type: string
  1324. disableConntrackInvalidCheck:
  1325. type: boolean
  1326. endpointReportingDelay:
  1327. pattern: ^([0-9]+(\\.[0-9]+)?(ms|s|m|h))*$
  1328. type: string
  1329. endpointReportingEnabled:
  1330. type: boolean
  1331. externalNodesList:
  1332. description: ExternalNodesCIDRList is a list of CIDR's of external-non-calico-nodes
  1333. which may source tunnel traffic and have the tunneled traffic be
  1334. accepted at calico nodes.
  1335. items:
  1336. type: string
  1337. type: array
  1338. failsafeInboundHostPorts:
  1339. description: 'FailsafeInboundHostPorts is a list of UDP/TCP ports
  1340. and CIDRs that Felix will allow incoming traffic to host endpoints
  1341. on irrespective of the security policy. This is useful to avoid
  1342. accidentally cutting off a host with incorrect configuration. For
  1343. back-compatibility, if the protocol is not specified, it defaults
  1344. to "tcp". If a CIDR is not specified, it will allow traffic from
  1345. all addresses. To disable all inbound host ports, use the value
  1346. none. The default value allows ssh access and DHCP. [Default: tcp:22,
  1347. udp:68, tcp:179, tcp:2379, tcp:2380, tcp:6443, tcp:6666, tcp:6667]'
  1348. items:
  1349. description: ProtoPort is combination of protocol, port, and CIDR.
  1350. Protocol and port must be specified.
  1351. properties:
  1352. net:
  1353. type: string
  1354. port:
  1355. type: integer
  1356. protocol:
  1357. type: string
  1358. required:
  1359. - port
  1360. - protocol
  1361. type: object
  1362. type: array
  1363. failsafeOutboundHostPorts:
  1364. description: 'FailsafeOutboundHostPorts is a list of UDP/TCP ports
  1365. and CIDRs that Felix will allow outgoing traffic from host endpoints
  1366. to irrespective of the security policy. This is useful to avoid
  1367. accidentally cutting off a host with incorrect configuration. For
  1368. back-compatibility, if the protocol is not specified, it defaults
  1369. to "tcp". If a CIDR is not specified, it will allow traffic from
  1370. all addresses. To disable all outbound host ports, use the value
  1371. none. The default value opens etcd''s standard ports to ensure that
  1372. Felix does not get cut off from etcd as well as allowing DHCP and
  1373. DNS. [Default: tcp:179, tcp:2379, tcp:2380, tcp:6443, tcp:6666,
  1374. tcp:6667, udp:53, udp:67]'
  1375. items:
  1376. description: ProtoPort is combination of protocol, port, and CIDR.
  1377. Protocol and port must be specified.
  1378. properties:
  1379. net:
  1380. type: string
  1381. port:
  1382. type: integer
  1383. protocol:
  1384. type: string
  1385. required:
  1386. - port
  1387. - protocol
  1388. type: object
  1389. type: array
  1390. featureDetectOverride:
  1391. description: FeatureDetectOverride is used to override feature detection
  1392. based on auto-detected platform capabilities. Values are specified
  1393. in a comma separated list with no spaces, example; "SNATFullyRandom=true,MASQFullyRandom=false,RestoreSupportsLock=". "true"
  1394. or "false" will force the feature, empty or omitted values are auto-detected.
  1395. pattern: ^([a-zA-Z0-9-_]+=(true|false|),)*([a-zA-Z0-9-_]+=(true|false|))?$
  1396. type: string
  1397. featureGates:
  1398. description: FeatureGates is used to enable or disable tech-preview
  1399. Calico features. Values are specified in a comma separated list
  1400. with no spaces, example; "BPFConnectTimeLoadBalancingWorkaround=enabled,XyZ=false".
  1401. This is used to enable features that are not fully production ready.
  1402. pattern: ^([a-zA-Z0-9-_]+=([^=]+),)*([a-zA-Z0-9-_]+=([^=]+))?$
  1403. type: string
  1404. floatingIPs:
  1405. description: FloatingIPs configures whether or not Felix will program
  1406. non-OpenStack floating IP addresses. (OpenStack-derived floating
  1407. IPs are always programmed, regardless of this setting.)
  1408. enum:
  1409. - Enabled
  1410. - Disabled
  1411. type: string
  1412. genericXDPEnabled:
  1413. description: 'GenericXDPEnabled enables Generic XDP so network cards
  1414. that don''t support XDP offload or driver modes can use XDP. This
  1415. is not recommended since it doesn''t provide better performance
  1416. than iptables. [Default: false]'
  1417. type: boolean
  1418. healthEnabled:
  1419. type: boolean
  1420. healthHost:
  1421. type: string
  1422. healthPort:
  1423. type: integer
  1424. healthTimeoutOverrides:
  1425. description: HealthTimeoutOverrides allows the internal watchdog timeouts
  1426. of individual subcomponents to be overridden. This is useful for
  1427. working around "false positive" liveness timeouts that can occur
  1428. in particularly stressful workloads or if CPU is constrained. For
  1429. a list of active subcomponents, see Felix's logs.
  1430. items:
  1431. properties:
  1432. name:
  1433. type: string
  1434. timeout:
  1435. type: string
  1436. required:
  1437. - name
  1438. - timeout
  1439. type: object
  1440. type: array
  1441. interfaceExclude:
  1442. description: 'InterfaceExclude is a comma-separated list of interfaces
  1443. that Felix should exclude when monitoring for host endpoints. The
  1444. default value ensures that Felix ignores Kubernetes'' IPVS dummy
  1445. interface, which is used internally by kube-proxy. If you want to
  1446. exclude multiple interface names using a single value, the list
  1447. supports regular expressions. For regular expressions you must wrap
  1448. the value with ''/''. For example having values ''/^kube/,veth1''
  1449. will exclude all interfaces that begin with ''kube'' and also the
  1450. interface ''veth1''. [Default: kube-ipvs0]'
  1451. type: string
  1452. interfacePrefix:
  1453. description: 'InterfacePrefix is the interface name prefix that identifies
  1454. workload endpoints and so distinguishes them from host endpoint
  1455. interfaces. Note: in environments other than bare metal, the orchestrators
  1456. configure this appropriately. For example our Kubernetes and Docker
  1457. integrations set the ''cali'' value, and our OpenStack integration
  1458. sets the ''tap'' value. [Default: cali]'
  1459. type: string
  1460. interfaceRefreshInterval:
  1461. description: InterfaceRefreshInterval is the period at which Felix
  1462. rescans local interfaces to verify their state. The rescan can be
  1463. disabled by setting the interval to 0.
  1464. pattern: ^([0-9]+(\\.[0-9]+)?(ms|s|m|h))*$
  1465. type: string
  1466. ipipEnabled:
  1467. description: 'IPIPEnabled overrides whether Felix should configure
  1468. an IPIP interface on the host. Optional as Felix determines this
  1469. based on the existing IP pools. [Default: nil (unset)]'
  1470. type: boolean
  1471. ipipMTU:
  1472. description: 'IPIPMTU is the MTU to set on the tunnel device. See
  1473. Configuring MTU [Default: 1440]'
  1474. type: integer
  1475. ipsetsRefreshInterval:
  1476. description: 'IpsetsRefreshInterval is the period at which Felix re-checks
  1477. all iptables state to ensure that no other process has accidentally
  1478. broken Calico''s rules. Set to 0 to disable iptables refresh. [Default:
  1479. 90s]'
  1480. pattern: ^([0-9]+(\\.[0-9]+)?(ms|s|m|h))*$
  1481. type: string
  1482. iptablesBackend:
  1483. description: IptablesBackend specifies which backend of iptables will
  1484. be used. The default is Auto.
  1485. pattern: ^(?i)(Auto|FelixConfiguration|FelixConfigurationList|Legacy|NFT)?$
  1486. type: string
  1487. iptablesFilterAllowAction:
  1488. pattern: ^(?i)(Accept|Return)?$
  1489. type: string
  1490. iptablesFilterDenyAction:
  1491. description: IptablesFilterDenyAction controls what happens to traffic
  1492. that is denied by network policy. By default Calico blocks traffic
  1493. with an iptables "DROP" action. If you want to use "REJECT" action
  1494. instead you can configure it in here.
  1495. pattern: ^(?i)(Drop|Reject)?$
  1496. type: string
  1497. iptablesLockFilePath:
  1498. description: 'IptablesLockFilePath is the location of the iptables
  1499. lock file. You may need to change this if the lock file is not in
  1500. its standard location (for example if you have mapped it into Felix''s
  1501. container at a different path). [Default: /run/xtables.lock]'
  1502. type: string
  1503. iptablesLockProbeInterval:
  1504. description: 'IptablesLockProbeInterval is the time that Felix will
  1505. wait between attempts to acquire the iptables lock if it is not
  1506. available. Lower values make Felix more responsive when the lock
  1507. is contended, but use more CPU. [Default: 50ms]'
  1508. pattern: ^([0-9]+(\\.[0-9]+)?(ms|s|m|h))*$
  1509. type: string
  1510. iptablesLockTimeout:
  1511. description: 'IptablesLockTimeout is the time that Felix will wait
  1512. for the iptables lock, or 0, to disable. To use this feature, Felix
  1513. must share the iptables lock file with all other processes that
  1514. also take the lock. When running Felix inside a container, this
  1515. requires the /run directory of the host to be mounted into the calico/node
  1516. or calico/felix container. [Default: 0s disabled]'
  1517. pattern: ^([0-9]+(\\.[0-9]+)?(ms|s|m|h))*$
  1518. type: string
  1519. iptablesMangleAllowAction:
  1520. pattern: ^(?i)(Accept|Return)?$
  1521. type: string
  1522. iptablesMarkMask:
  1523. description: 'IptablesMarkMask is the mask that Felix selects its
  1524. IPTables Mark bits from. Should be a 32 bit hexadecimal number with
  1525. at least 8 bits set, none of which clash with any other mark bits
  1526. in use on the system. [Default: 0xff000000]'
  1527. format: int32
  1528. type: integer
  1529. iptablesNATOutgoingInterfaceFilter:
  1530. type: string
  1531. iptablesPostWriteCheckInterval:
  1532. description: 'IptablesPostWriteCheckInterval is the period after Felix
  1533. has done a write to the dataplane that it schedules an extra read
  1534. back in order to check the write was not clobbered by another process.
  1535. This should only occur if another application on the system doesn''t
  1536. respect the iptables lock. [Default: 1s]'
  1537. pattern: ^([0-9]+(\\.[0-9]+)?(ms|s|m|h))*$
  1538. type: string
  1539. iptablesRefreshInterval:
  1540. description: 'IptablesRefreshInterval is the period at which Felix
  1541. re-checks the IP sets in the dataplane to ensure that no other process
  1542. has accidentally broken Calico''s rules. Set to 0 to disable IP
  1543. sets refresh. Note: the default for this value is lower than the
  1544. other refresh intervals as a workaround for a Linux kernel bug that
  1545. was fixed in kernel version 4.11. If you are using v4.11 or greater
  1546. you may want to set this to, a higher value to reduce Felix CPU
  1547. usage. [Default: 10s]'
  1548. pattern: ^([0-9]+(\\.[0-9]+)?(ms|s|m|h))*$
  1549. type: string
  1550. ipv6Support:
  1551. description: IPv6Support controls whether Felix enables support for
  1552. IPv6 (if supported by the in-use dataplane).
  1553. type: boolean
  1554. kubeNodePortRanges:
  1555. description: 'KubeNodePortRanges holds list of port ranges used for
  1556. service node ports. Only used if felix detects kube-proxy running
  1557. in ipvs mode. Felix uses these ranges to separate host and workload
  1558. traffic. [Default: 30000:32767].'
  1559. items:
  1560. anyOf:
  1561. - type: integer
  1562. - type: string
  1563. pattern: ^.*
  1564. x-kubernetes-int-or-string: true
  1565. type: array
  1566. logDebugFilenameRegex:
  1567. description: LogDebugFilenameRegex controls which source code files
  1568. have their Debug log output included in the logs. Only logs from
  1569. files with names that match the given regular expression are included. The
  1570. filter only applies to Debug level logs.
  1571. type: string
  1572. logFilePath:
  1573. description: 'LogFilePath is the full path to the Felix log. Set to
  1574. none to disable file logging. [Default: /var/log/calico/felix.log]'
  1575. type: string
  1576. logPrefix:
  1577. description: 'LogPrefix is the log prefix that Felix uses when rendering
  1578. LOG rules. [Default: calico-packet]'
  1579. type: string
  1580. logSeverityFile:
  1581. description: 'LogSeverityFile is the log severity above which logs
  1582. are sent to the log file. [Default: Info]'
  1583. pattern: ^(?i)(Debug|Info|Warning|Error|Fatal)?$
  1584. type: string
  1585. logSeverityScreen:
  1586. description: 'LogSeverityScreen is the log severity above which logs
  1587. are sent to the stdout. [Default: Info]'
  1588. pattern: ^(?i)(Debug|Info|Warning|Error|Fatal)?$
  1589. type: string
  1590. logSeveritySys:
  1591. description: 'LogSeveritySys is the log severity above which logs
  1592. are sent to the syslog. Set to None for no logging to syslog. [Default:
  1593. Info]'
  1594. pattern: ^(?i)(Debug|Info|Warning|Error|Fatal)?$
  1595. type: string
  1596. maxIpsetSize:
  1597. type: integer
  1598. metadataAddr:
  1599. description: 'MetadataAddr is the IP address or domain name of the
  1600. server that can answer VM queries for cloud-init metadata. In OpenStack,
  1601. this corresponds to the machine running nova-api (or in Ubuntu,
  1602. nova-api-metadata). A value of none (case insensitive) means that
  1603. Felix should not set up any NAT rule for the metadata path. [Default:
  1604. 127.0.0.1]'
  1605. type: string
  1606. metadataPort:
  1607. description: 'MetadataPort is the port of the metadata server. This,
  1608. combined with global.MetadataAddr (if not ''None''), is used to
  1609. set up a NAT rule, from 169.254.169.254:80 to MetadataAddr:MetadataPort.
  1610. In most cases this should not need to be changed [Default: 8775].'
  1611. type: integer
  1612. mtuIfacePattern:
  1613. description: MTUIfacePattern is a regular expression that controls
  1614. which interfaces Felix should scan in order to calculate the host's
  1615. MTU. This should not match workload interfaces (usually named cali...).
  1616. type: string
  1617. natOutgoingAddress:
  1618. description: NATOutgoingAddress specifies an address to use when performing
  1619. source NAT for traffic in a natOutgoing pool that is leaving the
  1620. network. By default the address used is an address on the interface
  1621. the traffic is leaving on (ie it uses the iptables MASQUERADE target)
  1622. type: string
  1623. natPortRange:
  1624. anyOf:
  1625. - type: integer
  1626. - type: string
  1627. description: NATPortRange specifies the range of ports that is used
  1628. for port mapping when doing outgoing NAT. When unset the default
  1629. behavior of the network stack is used.
  1630. pattern: ^.*
  1631. x-kubernetes-int-or-string: true
  1632. netlinkTimeout:
  1633. pattern: ^([0-9]+(\\.[0-9]+)?(ms|s|m|h))*$
  1634. type: string
  1635. openstackRegion:
  1636. description: 'OpenstackRegion is the name of the region that a particular
  1637. Felix belongs to. In a multi-region Calico/OpenStack deployment,
  1638. this must be configured somehow for each Felix (here in the datamodel,
  1639. or in felix.cfg or the environment on each compute node), and must
  1640. match the [calico] openstack_region value configured in neutron.conf
  1641. on each node. [Default: Empty]'
  1642. type: string
  1643. policySyncPathPrefix:
  1644. description: 'PolicySyncPathPrefix is used to by Felix to communicate
  1645. policy changes to external services, like Application layer policy.
  1646. [Default: Empty]'
  1647. type: string
  1648. prometheusGoMetricsEnabled:
  1649. description: 'PrometheusGoMetricsEnabled disables Go runtime metrics
  1650. collection, which the Prometheus client does by default, when set
  1651. to false. This reduces the number of metrics reported, reducing
  1652. Prometheus load. [Default: true]'
  1653. type: boolean
  1654. prometheusMetricsEnabled:
  1655. description: 'PrometheusMetricsEnabled enables the Prometheus metrics
  1656. server in Felix if set to true. [Default: false]'
  1657. type: boolean
  1658. prometheusMetricsHost:
  1659. description: 'PrometheusMetricsHost is the host that the Prometheus
  1660. metrics server should bind to. [Default: empty]'
  1661. type: string
  1662. prometheusMetricsPort:
  1663. description: 'PrometheusMetricsPort is the TCP port that the Prometheus
  1664. metrics server should bind to. [Default: 9091]'
  1665. type: integer
  1666. prometheusProcessMetricsEnabled:
  1667. description: 'PrometheusProcessMetricsEnabled disables process metrics
  1668. collection, which the Prometheus client does by default, when set
  1669. to false. This reduces the number of metrics reported, reducing
  1670. Prometheus load. [Default: true]'
  1671. type: boolean
  1672. prometheusWireGuardMetricsEnabled:
  1673. description: 'PrometheusWireGuardMetricsEnabled disables wireguard
  1674. metrics collection, which the Prometheus client does by default,
  1675. when set to false. This reduces the number of metrics reported,
  1676. reducing Prometheus load. [Default: true]'
  1677. type: boolean
  1678. removeExternalRoutes:
  1679. description: Whether or not to remove device routes that have not
  1680. been programmed by Felix. Disabling this will allow external applications
  1681. to also add device routes. This is enabled by default which means
  1682. we will remove externally added routes.
  1683. type: boolean
  1684. reportingInterval:
  1685. description: 'ReportingInterval is the interval at which Felix reports
  1686. its status into the datastore or 0 to disable. Must be non-zero
  1687. in OpenStack deployments. [Default: 30s]'
  1688. pattern: ^([0-9]+(\\.[0-9]+)?(ms|s|m|h))*$
  1689. type: string
  1690. reportingTTL:
  1691. description: 'ReportingTTL is the time-to-live setting for process-wide
  1692. status reports. [Default: 90s]'
  1693. pattern: ^([0-9]+(\\.[0-9]+)?(ms|s|m|h))*$
  1694. type: string
  1695. routeRefreshInterval:
  1696. description: 'RouteRefreshInterval is the period at which Felix re-checks
  1697. the routes in the dataplane to ensure that no other process has
  1698. accidentally broken Calico''s rules. Set to 0 to disable route refresh.
  1699. [Default: 90s]'
  1700. pattern: ^([0-9]+(\\.[0-9]+)?(ms|s|m|h))*$
  1701. type: string
  1702. routeSource:
  1703. description: 'RouteSource configures where Felix gets its routing
  1704. information. - WorkloadIPs: use workload endpoints to construct
  1705. routes. - CalicoIPAM: the default - use IPAM data to construct routes.'
  1706. pattern: ^(?i)(WorkloadIPs|CalicoIPAM)?$
  1707. type: string
  1708. routeSyncDisabled:
  1709. description: RouteSyncDisabled will disable all operations performed
  1710. on the route table. Set to true to run in network-policy mode only.
  1711. type: boolean
  1712. routeTableRange:
  1713. description: Deprecated in favor of RouteTableRanges. Calico programs
  1714. additional Linux route tables for various purposes. RouteTableRange
  1715. specifies the indices of the route tables that Calico should use.
  1716. properties:
  1717. max:
  1718. type: integer
  1719. min:
  1720. type: integer
  1721. required:
  1722. - max
  1723. - min
  1724. type: object
  1725. routeTableRanges:
  1726. description: Calico programs additional Linux route tables for various
  1727. purposes. RouteTableRanges specifies a set of table index ranges
  1728. that Calico should use. Deprecates`RouteTableRange`, overrides `RouteTableRange`.
  1729. items:
  1730. properties:
  1731. max:
  1732. type: integer
  1733. min:
  1734. type: integer
  1735. required:
  1736. - max
  1737. - min
  1738. type: object
  1739. type: array
  1740. serviceLoopPrevention:
  1741. description: 'When service IP advertisement is enabled, prevent routing
  1742. loops to service IPs that are not in use, by dropping or rejecting
  1743. packets that do not get DNAT''d by kube-proxy. Unless set to "Disabled",
  1744. in which case such routing loops continue to be allowed. [Default:
  1745. Drop]'
  1746. pattern: ^(?i)(Drop|Reject|Disabled)?$
  1747. type: string
  1748. sidecarAccelerationEnabled:
  1749. description: 'SidecarAccelerationEnabled enables experimental sidecar
  1750. acceleration [Default: false]'
  1751. type: boolean
  1752. usageReportingEnabled:
  1753. description: 'UsageReportingEnabled reports anonymous Calico version
  1754. number and cluster size to projectcalico.org. Logs warnings returned
  1755. by the usage server. For example, if a significant security vulnerability
  1756. has been discovered in the version of Calico being used. [Default:
  1757. true]'
  1758. type: boolean
  1759. usageReportingInitialDelay:
  1760. description: 'UsageReportingInitialDelay controls the minimum delay
  1761. before Felix makes a report. [Default: 300s]'
  1762. pattern: ^([0-9]+(\\.[0-9]+)?(ms|s|m|h))*$
  1763. type: string
  1764. usageReportingInterval:
  1765. description: 'UsageReportingInterval controls the interval at which
  1766. Felix makes reports. [Default: 86400s]'
  1767. pattern: ^([0-9]+(\\.[0-9]+)?(ms|s|m|h))*$
  1768. type: string
  1769. useInternalDataplaneDriver:
  1770. description: UseInternalDataplaneDriver, if true, Felix will use its
  1771. internal dataplane programming logic. If false, it will launch
  1772. an external dataplane driver and communicate with it over protobuf.
  1773. type: boolean
  1774. vxlanEnabled:
  1775. description: 'VXLANEnabled overrides whether Felix should create the
  1776. VXLAN tunnel device for IPv4 VXLAN networking. Optional as Felix
  1777. determines this based on the existing IP pools. [Default: nil (unset)]'
  1778. type: boolean
  1779. vxlanMTU:
  1780. description: 'VXLANMTU is the MTU to set on the IPv4 VXLAN tunnel
  1781. device. See Configuring MTU [Default: 1410]'
  1782. type: integer
  1783. vxlanMTUV6:
  1784. description: 'VXLANMTUV6 is the MTU to set on the IPv6 VXLAN tunnel
  1785. device. See Configuring MTU [Default: 1390]'
  1786. type: integer
  1787. vxlanPort:
  1788. type: integer
  1789. vxlanVNI:
  1790. type: integer
  1791. windowsManageFirewallRules:
  1792. description: 'WindowsManageFirewallRules configures whether or not
  1793. Felix will program Windows Firewall rules. (to allow inbound access
  1794. to its own metrics ports) [Default: Disabled]'
  1795. enum:
  1796. - Enabled
  1797. - Disabled
  1798. type: string
  1799. wireguardEnabled:
  1800. description: 'WireguardEnabled controls whether Wireguard is enabled
  1801. for IPv4 (encapsulating IPv4 traffic over an IPv4 underlay network).
  1802. [Default: false]'
  1803. type: boolean
  1804. wireguardEnabledV6:
  1805. description: 'WireguardEnabledV6 controls whether Wireguard is enabled
  1806. for IPv6 (encapsulating IPv6 traffic over an IPv6 underlay network).
  1807. [Default: false]'
  1808. type: boolean
  1809. wireguardHostEncryptionEnabled:
  1810. description: 'WireguardHostEncryptionEnabled controls whether Wireguard
  1811. host-to-host encryption is enabled. [Default: false]'
  1812. type: boolean
  1813. wireguardInterfaceName:
  1814. description: 'WireguardInterfaceName specifies the name to use for
  1815. the IPv4 Wireguard interface. [Default: wireguard.cali]'
  1816. type: string
  1817. wireguardInterfaceNameV6:
  1818. description: 'WireguardInterfaceNameV6 specifies the name to use for
  1819. the IPv6 Wireguard interface. [Default: wg-v6.cali]'
  1820. type: string
  1821. wireguardKeepAlive:
  1822. description: 'WireguardKeepAlive controls Wireguard PersistentKeepalive
  1823. option. Set 0 to disable. [Default: 0]'
  1824. pattern: ^([0-9]+(\\.[0-9]+)?(ms|s|m|h))*$
  1825. type: string
  1826. wireguardListeningPort:
  1827. description: 'WireguardListeningPort controls the listening port used
  1828. by IPv4 Wireguard. [Default: 51820]'
  1829. type: integer
  1830. wireguardListeningPortV6:
  1831. description: 'WireguardListeningPortV6 controls the listening port
  1832. used by IPv6 Wireguard. [Default: 51821]'
  1833. type: integer
  1834. wireguardMTU:
  1835. description: 'WireguardMTU controls the MTU on the IPv4 Wireguard
  1836. interface. See Configuring MTU [Default: 1440]'
  1837. type: integer
  1838. wireguardMTUV6:
  1839. description: 'WireguardMTUV6 controls the MTU on the IPv6 Wireguard
  1840. interface. See Configuring MTU [Default: 1420]'
  1841. type: integer
  1842. wireguardRoutingRulePriority:
  1843. description: 'WireguardRoutingRulePriority controls the priority value
  1844. to use for the Wireguard routing rule. [Default: 99]'
  1845. type: integer
  1846. workloadSourceSpoofing:
  1847. description: WorkloadSourceSpoofing controls whether pods can use
  1848. the allowedSourcePrefixes annotation to send traffic with a source
  1849. IP address that is not theirs. This is disabled by default. When
  1850. set to "Any", pods can request any prefix.
  1851. pattern: ^(?i)(Disabled|Any)?$
  1852. type: string
  1853. xdpEnabled:
  1854. description: 'XDPEnabled enables XDP acceleration for suitable untracked
  1855. incoming deny rules. [Default: true]'
  1856. type: boolean
  1857. xdpRefreshInterval:
  1858. description: 'XDPRefreshInterval is the period at which Felix re-checks
  1859. all XDP state to ensure that no other process has accidentally broken
  1860. Calico''s BPF maps or attached programs. Set to 0 to disable XDP
  1861. refresh. [Default: 90s]'
  1862. pattern: ^([0-9]+(\\.[0-9]+)?(ms|s|m|h))*$
  1863. type: string
  1864. type: object
  1865. type: object
  1866. served: true
  1867. storage: true
  1868. status:
  1869. acceptedNames:
  1870. kind: ""
  1871. plural: ""
  1872. conditions: []
  1873. storedVersions: []
  1874. ---
  1875. # Source: calico/templates/kdd-crds.yaml
  1876. apiVersion: apiextensions.k8s.io/v1
  1877. kind: CustomResourceDefinition
  1878. metadata:
  1879. name: globalnetworkpolicies.crd.projectcalico.org
  1880. spec:
  1881. group: crd.projectcalico.org
  1882. names:
  1883. kind: GlobalNetworkPolicy
  1884. listKind: GlobalNetworkPolicyList
  1885. plural: globalnetworkpolicies
  1886. singular: globalnetworkpolicy
  1887. preserveUnknownFields: false
  1888. scope: Cluster
  1889. versions:
  1890. - name: v1
  1891. schema:
  1892. openAPIV3Schema:
  1893. properties:
  1894. apiVersion:
  1895. description: 'APIVersion defines the versioned schema of this representation
  1896. of an object. Servers should convert recognized schemas to the latest
  1897. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  1898. type: string
  1899. kind:
  1900. description: 'Kind is a string value representing the REST resource this
  1901. object represents. Servers may infer this from the endpoint the client
  1902. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  1903. type: string
  1904. metadata:
  1905. type: object
  1906. spec:
  1907. properties:
  1908. applyOnForward:
  1909. description: ApplyOnForward indicates to apply the rules in this policy
  1910. on forward traffic.
  1911. type: boolean
  1912. doNotTrack:
  1913. description: DoNotTrack indicates whether packets matched by the rules
  1914. in this policy should go through the data plane's connection tracking,
  1915. such as Linux conntrack. If True, the rules in this policy are
  1916. applied before any data plane connection tracking, and packets allowed
  1917. by this policy are marked as not to be tracked.
  1918. type: boolean
  1919. egress:
  1920. description: The ordered set of egress rules. Each rule contains
  1921. a set of packet match criteria and a corresponding action to apply.
  1922. items:
  1923. description: "A Rule encapsulates a set of match criteria and an
  1924. action. Both selector-based security Policy and security Profiles
  1925. reference rules - separated out as a list of rules for both ingress
  1926. and egress packet matching. \n Each positive match criteria has
  1927. a negated version, prefixed with \"Not\". All the match criteria
  1928. within a rule must be satisfied for a packet to match. A single
  1929. rule can contain the positive and negative version of a match
  1930. and both must be satisfied for the rule to match."
  1931. properties:
  1932. action:
  1933. type: string
  1934. destination:
  1935. description: Destination contains the match criteria that apply
  1936. to destination entity.
  1937. properties:
  1938. namespaceSelector:
  1939. description: "NamespaceSelector is an optional field that
  1940. contains a selector expression. Only traffic that originates
  1941. from (or terminates at) endpoints within the selected
  1942. namespaces will be matched. When both NamespaceSelector
  1943. and another selector are defined on the same rule, then
  1944. only workload endpoints that are matched by both selectors
  1945. will be selected by the rule. \n For NetworkPolicy, an
  1946. empty NamespaceSelector implies that the Selector is limited
  1947. to selecting only workload endpoints in the same namespace
  1948. as the NetworkPolicy. \n For NetworkPolicy, `global()`
  1949. NamespaceSelector implies that the Selector is limited
  1950. to selecting only GlobalNetworkSet or HostEndpoint. \n
  1951. For GlobalNetworkPolicy, an empty NamespaceSelector implies
  1952. the Selector applies to workload endpoints across all
  1953. namespaces."
  1954. type: string
  1955. nets:
  1956. description: Nets is an optional field that restricts the
  1957. rule to only apply to traffic that originates from (or
  1958. terminates at) IP addresses in any of the given subnets.
  1959. items:
  1960. type: string
  1961. type: array
  1962. notNets:
  1963. description: NotNets is the negated version of the Nets
  1964. field.
  1965. items:
  1966. type: string
  1967. type: array
  1968. notPorts:
  1969. description: NotPorts is the negated version of the Ports
  1970. field. Since only some protocols have ports, if any ports
  1971. are specified it requires the Protocol match in the Rule
  1972. to be set to "TCP" or "UDP".
  1973. items:
  1974. anyOf:
  1975. - type: integer
  1976. - type: string
  1977. pattern: ^.*
  1978. x-kubernetes-int-or-string: true
  1979. type: array
  1980. notSelector:
  1981. description: NotSelector is the negated version of the Selector
  1982. field. See Selector field for subtleties with negated
  1983. selectors.
  1984. type: string
  1985. ports:
  1986. description: "Ports is an optional field that restricts
  1987. the rule to only apply to traffic that has a source (destination)
  1988. port that matches one of these ranges/values. This value
  1989. is a list of integers or strings that represent ranges
  1990. of ports. \n Since only some protocols have ports, if
  1991. any ports are specified it requires the Protocol match
  1992. in the Rule to be set to \"TCP\" or \"UDP\"."
  1993. items:
  1994. anyOf:
  1995. - type: integer
  1996. - type: string
  1997. pattern: ^.*
  1998. x-kubernetes-int-or-string: true
  1999. type: array
  2000. selector:
  2001. description: "Selector is an optional field that contains
  2002. a selector expression (see Policy for sample syntax).
  2003. \ Only traffic that originates from (terminates at) endpoints
  2004. matching the selector will be matched. \n Note that: in
  2005. addition to the negated version of the Selector (see NotSelector
  2006. below), the selector expression syntax itself supports
  2007. negation. The two types of negation are subtly different.
  2008. One negates the set of matched endpoints, the other negates
  2009. the whole match: \n \tSelector = \"!has(my_label)\" matches
  2010. packets that are from other Calico-controlled \tendpoints
  2011. that do not have the label \"my_label\". \n \tNotSelector
  2012. = \"has(my_label)\" matches packets that are not from
  2013. Calico-controlled \tendpoints that do have the label \"my_label\".
  2014. \n The effect is that the latter will accept packets from
  2015. non-Calico sources whereas the former is limited to packets
  2016. from Calico-controlled endpoints."
  2017. type: string
  2018. serviceAccounts:
  2019. description: ServiceAccounts is an optional field that restricts
  2020. the rule to only apply to traffic that originates from
  2021. (or terminates at) a pod running as a matching service
  2022. account.
  2023. properties:
  2024. names:
  2025. description: Names is an optional field that restricts
  2026. the rule to only apply to traffic that originates
  2027. from (or terminates at) a pod running as a service
  2028. account whose name is in the list.
  2029. items:
  2030. type: string
  2031. type: array
  2032. selector:
  2033. description: Selector is an optional field that restricts
  2034. the rule to only apply to traffic that originates
  2035. from (or terminates at) a pod running as a service
  2036. account that matches the given label selector. If
  2037. both Names and Selector are specified then they are
  2038. AND'ed.
  2039. type: string
  2040. type: object
  2041. services:
  2042. description: "Services is an optional field that contains
  2043. options for matching Kubernetes Services. If specified,
  2044. only traffic that originates from or terminates at endpoints
  2045. within the selected service(s) will be matched, and only
  2046. to/from each endpoint's port. \n Services cannot be specified
  2047. on the same rule as Selector, NotSelector, NamespaceSelector,
  2048. Nets, NotNets or ServiceAccounts. \n Ports and NotPorts
  2049. can only be specified with Services on ingress rules."
  2050. properties:
  2051. name:
  2052. description: Name specifies the name of a Kubernetes
  2053. Service to match.
  2054. type: string
  2055. namespace:
  2056. description: Namespace specifies the namespace of the
  2057. given Service. If left empty, the rule will match
  2058. within this policy's namespace.
  2059. type: string
  2060. type: object
  2061. type: object
  2062. http:
  2063. description: HTTP contains match criteria that apply to HTTP
  2064. requests.
  2065. properties:
  2066. methods:
  2067. description: Methods is an optional field that restricts
  2068. the rule to apply only to HTTP requests that use one of
  2069. the listed HTTP Methods (e.g. GET, PUT, etc.) Multiple
  2070. methods are OR'd together.
  2071. items:
  2072. type: string
  2073. type: array
  2074. paths:
  2075. description: 'Paths is an optional field that restricts
  2076. the rule to apply to HTTP requests that use one of the
  2077. listed HTTP Paths. Multiple paths are OR''d together.
  2078. e.g: - exact: /foo - prefix: /bar NOTE: Each entry may
  2079. ONLY specify either a `exact` or a `prefix` match. The
  2080. validator will check for it.'
  2081. items:
  2082. description: 'HTTPPath specifies an HTTP path to match.
  2083. It may be either of the form: exact: <path>: which matches
  2084. the path exactly or prefix: <path-prefix>: which matches
  2085. the path prefix'
  2086. properties:
  2087. exact:
  2088. type: string
  2089. prefix:
  2090. type: string
  2091. type: object
  2092. type: array
  2093. type: object
  2094. icmp:
  2095. description: ICMP is an optional field that restricts the rule
  2096. to apply to a specific type and code of ICMP traffic. This
  2097. should only be specified if the Protocol field is set to "ICMP"
  2098. or "ICMPv6".
  2099. properties:
  2100. code:
  2101. description: Match on a specific ICMP code. If specified,
  2102. the Type value must also be specified. This is a technical
  2103. limitation imposed by the kernel's iptables firewall,
  2104. which Calico uses to enforce the rule.
  2105. type: integer
  2106. type:
  2107. description: Match on a specific ICMP type. For example
  2108. a value of 8 refers to ICMP Echo Request (i.e. pings).
  2109. type: integer
  2110. type: object
  2111. ipVersion:
  2112. description: IPVersion is an optional field that restricts the
  2113. rule to only match a specific IP version.
  2114. type: integer
  2115. metadata:
  2116. description: Metadata contains additional information for this
  2117. rule
  2118. properties:
  2119. annotations:
  2120. additionalProperties:
  2121. type: string
  2122. description: Annotations is a set of key value pairs that
  2123. give extra information about the rule
  2124. type: object
  2125. type: object
  2126. notICMP:
  2127. description: NotICMP is the negated version of the ICMP field.
  2128. properties:
  2129. code:
  2130. description: Match on a specific ICMP code. If specified,
  2131. the Type value must also be specified. This is a technical
  2132. limitation imposed by the kernel's iptables firewall,
  2133. which Calico uses to enforce the rule.
  2134. type: integer
  2135. type:
  2136. description: Match on a specific ICMP type. For example
  2137. a value of 8 refers to ICMP Echo Request (i.e. pings).
  2138. type: integer
  2139. type: object
  2140. notProtocol:
  2141. anyOf:
  2142. - type: integer
  2143. - type: string
  2144. description: NotProtocol is the negated version of the Protocol
  2145. field.
  2146. pattern: ^.*
  2147. x-kubernetes-int-or-string: true
  2148. protocol:
  2149. anyOf:
  2150. - type: integer
  2151. - type: string
  2152. description: "Protocol is an optional field that restricts the
  2153. rule to only apply to traffic of a specific IP protocol. Required
  2154. if any of the EntityRules contain Ports (because ports only
  2155. apply to certain protocols). \n Must be one of these string
  2156. values: \"TCP\", \"UDP\", \"ICMP\", \"ICMPv6\", \"SCTP\",
  2157. \"UDPLite\" or an integer in the range 1-255."
  2158. pattern: ^.*
  2159. x-kubernetes-int-or-string: true
  2160. source:
  2161. description: Source contains the match criteria that apply to
  2162. source entity.
  2163. properties:
  2164. namespaceSelector:
  2165. description: "NamespaceSelector is an optional field that
  2166. contains a selector expression. Only traffic that originates
  2167. from (or terminates at) endpoints within the selected
  2168. namespaces will be matched. When both NamespaceSelector
  2169. and another selector are defined on the same rule, then
  2170. only workload endpoints that are matched by both selectors
  2171. will be selected by the rule. \n For NetworkPolicy, an
  2172. empty NamespaceSelector implies that the Selector is limited
  2173. to selecting only workload endpoints in the same namespace
  2174. as the NetworkPolicy. \n For NetworkPolicy, `global()`
  2175. NamespaceSelector implies that the Selector is limited
  2176. to selecting only GlobalNetworkSet or HostEndpoint. \n
  2177. For GlobalNetworkPolicy, an empty NamespaceSelector implies
  2178. the Selector applies to workload endpoints across all
  2179. namespaces."
  2180. type: string
  2181. nets:
  2182. description: Nets is an optional field that restricts the
  2183. rule to only apply to traffic that originates from (or
  2184. terminates at) IP addresses in any of the given subnets.
  2185. items:
  2186. type: string
  2187. type: array
  2188. notNets:
  2189. description: NotNets is the negated version of the Nets
  2190. field.
  2191. items:
  2192. type: string
  2193. type: array
  2194. notPorts:
  2195. description: NotPorts is the negated version of the Ports
  2196. field. Since only some protocols have ports, if any ports
  2197. are specified it requires the Protocol match in the Rule
  2198. to be set to "TCP" or "UDP".
  2199. items:
  2200. anyOf:
  2201. - type: integer
  2202. - type: string
  2203. pattern: ^.*
  2204. x-kubernetes-int-or-string: true
  2205. type: array
  2206. notSelector:
  2207. description: NotSelector is the negated version of the Selector
  2208. field. See Selector field for subtleties with negated
  2209. selectors.
  2210. type: string
  2211. ports:
  2212. description: "Ports is an optional field that restricts
  2213. the rule to only apply to traffic that has a source (destination)
  2214. port that matches one of these ranges/values. This value
  2215. is a list of integers or strings that represent ranges
  2216. of ports. \n Since only some protocols have ports, if
  2217. any ports are specified it requires the Protocol match
  2218. in the Rule to be set to \"TCP\" or \"UDP\"."
  2219. items:
  2220. anyOf:
  2221. - type: integer
  2222. - type: string
  2223. pattern: ^.*
  2224. x-kubernetes-int-or-string: true
  2225. type: array
  2226. selector:
  2227. description: "Selector is an optional field that contains
  2228. a selector expression (see Policy for sample syntax).
  2229. \ Only traffic that originates from (terminates at) endpoints
  2230. matching the selector will be matched. \n Note that: in
  2231. addition to the negated version of the Selector (see NotSelector
  2232. below), the selector expression syntax itself supports
  2233. negation. The two types of negation are subtly different.
  2234. One negates the set of matched endpoints, the other negates
  2235. the whole match: \n \tSelector = \"!has(my_label)\" matches
  2236. packets that are from other Calico-controlled \tendpoints
  2237. that do not have the label \"my_label\". \n \tNotSelector
  2238. = \"has(my_label)\" matches packets that are not from
  2239. Calico-controlled \tendpoints that do have the label \"my_label\".
  2240. \n The effect is that the latter will accept packets from
  2241. non-Calico sources whereas the former is limited to packets
  2242. from Calico-controlled endpoints."
  2243. type: string
  2244. serviceAccounts:
  2245. description: ServiceAccounts is an optional field that restricts
  2246. the rule to only apply to traffic that originates from
  2247. (or terminates at) a pod running as a matching service
  2248. account.
  2249. properties:
  2250. names:
  2251. description: Names is an optional field that restricts
  2252. the rule to only apply to traffic that originates
  2253. from (or terminates at) a pod running as a service
  2254. account whose name is in the list.
  2255. items:
  2256. type: string
  2257. type: array
  2258. selector:
  2259. description: Selector is an optional field that restricts
  2260. the rule to only apply to traffic that originates
  2261. from (or terminates at) a pod running as a service
  2262. account that matches the given label selector. If
  2263. both Names and Selector are specified then they are
  2264. AND'ed.
  2265. type: string
  2266. type: object
  2267. services:
  2268. description: "Services is an optional field that contains
  2269. options for matching Kubernetes Services. If specified,
  2270. only traffic that originates from or terminates at endpoints
  2271. within the selected service(s) will be matched, and only
  2272. to/from each endpoint's port. \n Services cannot be specified
  2273. on the same rule as Selector, NotSelector, NamespaceSelector,
  2274. Nets, NotNets or ServiceAccounts. \n Ports and NotPorts
  2275. can only be specified with Services on ingress rules."
  2276. properties:
  2277. name:
  2278. description: Name specifies the name of a Kubernetes
  2279. Service to match.
  2280. type: string
  2281. namespace:
  2282. description: Namespace specifies the namespace of the
  2283. given Service. If left empty, the rule will match
  2284. within this policy's namespace.
  2285. type: string
  2286. type: object
  2287. type: object
  2288. required:
  2289. - action
  2290. type: object
  2291. type: array
  2292. ingress:
  2293. description: The ordered set of ingress rules. Each rule contains
  2294. a set of packet match criteria and a corresponding action to apply.
  2295. items:
  2296. description: "A Rule encapsulates a set of match criteria and an
  2297. action. Both selector-based security Policy and security Profiles
  2298. reference rules - separated out as a list of rules for both ingress
  2299. and egress packet matching. \n Each positive match criteria has
  2300. a negated version, prefixed with \"Not\". All the match criteria
  2301. within a rule must be satisfied for a packet to match. A single
  2302. rule can contain the positive and negative version of a match
  2303. and both must be satisfied for the rule to match."
  2304. properties:
  2305. action:
  2306. type: string
  2307. destination:
  2308. description: Destination contains the match criteria that apply
  2309. to destination entity.
  2310. properties:
  2311. namespaceSelector:
  2312. description: "NamespaceSelector is an optional field that
  2313. contains a selector expression. Only traffic that originates
  2314. from (or terminates at) endpoints within the selected
  2315. namespaces will be matched. When both NamespaceSelector
  2316. and another selector are defined on the same rule, then
  2317. only workload endpoints that are matched by both selectors
  2318. will be selected by the rule. \n For NetworkPolicy, an
  2319. empty NamespaceSelector implies that the Selector is limited
  2320. to selecting only workload endpoints in the same namespace
  2321. as the NetworkPolicy. \n For NetworkPolicy, `global()`
  2322. NamespaceSelector implies that the Selector is limited
  2323. to selecting only GlobalNetworkSet or HostEndpoint. \n
  2324. For GlobalNetworkPolicy, an empty NamespaceSelector implies
  2325. the Selector applies to workload endpoints across all
  2326. namespaces."
  2327. type: string
  2328. nets:
  2329. description: Nets is an optional field that restricts the
  2330. rule to only apply to traffic that originates from (or
  2331. terminates at) IP addresses in any of the given subnets.
  2332. items:
  2333. type: string
  2334. type: array
  2335. notNets:
  2336. description: NotNets is the negated version of the Nets
  2337. field.
  2338. items:
  2339. type: string
  2340. type: array
  2341. notPorts:
  2342. description: NotPorts is the negated version of the Ports
  2343. field. Since only some protocols have ports, if any ports
  2344. are specified it requires the Protocol match in the Rule
  2345. to be set to "TCP" or "UDP".
  2346. items:
  2347. anyOf:
  2348. - type: integer
  2349. - type: string
  2350. pattern: ^.*
  2351. x-kubernetes-int-or-string: true
  2352. type: array
  2353. notSelector:
  2354. description: NotSelector is the negated version of the Selector
  2355. field. See Selector field for subtleties with negated
  2356. selectors.
  2357. type: string
  2358. ports:
  2359. description: "Ports is an optional field that restricts
  2360. the rule to only apply to traffic that has a source (destination)
  2361. port that matches one of these ranges/values. This value
  2362. is a list of integers or strings that represent ranges
  2363. of ports. \n Since only some protocols have ports, if
  2364. any ports are specified it requires the Protocol match
  2365. in the Rule to be set to \"TCP\" or \"UDP\"."
  2366. items:
  2367. anyOf:
  2368. - type: integer
  2369. - type: string
  2370. pattern: ^.*
  2371. x-kubernetes-int-or-string: true
  2372. type: array
  2373. selector:
  2374. description: "Selector is an optional field that contains
  2375. a selector expression (see Policy for sample syntax).
  2376. \ Only traffic that originates from (terminates at) endpoints
  2377. matching the selector will be matched. \n Note that: in
  2378. addition to the negated version of the Selector (see NotSelector
  2379. below), the selector expression syntax itself supports
  2380. negation. The two types of negation are subtly different.
  2381. One negates the set of matched endpoints, the other negates
  2382. the whole match: \n \tSelector = \"!has(my_label)\" matches
  2383. packets that are from other Calico-controlled \tendpoints
  2384. that do not have the label \"my_label\". \n \tNotSelector
  2385. = \"has(my_label)\" matches packets that are not from
  2386. Calico-controlled \tendpoints that do have the label \"my_label\".
  2387. \n The effect is that the latter will accept packets from
  2388. non-Calico sources whereas the former is limited to packets
  2389. from Calico-controlled endpoints."
  2390. type: string
  2391. serviceAccounts:
  2392. description: ServiceAccounts is an optional field that restricts
  2393. the rule to only apply to traffic that originates from
  2394. (or terminates at) a pod running as a matching service
  2395. account.
  2396. properties:
  2397. names:
  2398. description: Names is an optional field that restricts
  2399. the rule to only apply to traffic that originates
  2400. from (or terminates at) a pod running as a service
  2401. account whose name is in the list.
  2402. items:
  2403. type: string
  2404. type: array
  2405. selector:
  2406. description: Selector is an optional field that restricts
  2407. the rule to only apply to traffic that originates
  2408. from (or terminates at) a pod running as a service
  2409. account that matches the given label selector. If
  2410. both Names and Selector are specified then they are
  2411. AND'ed.
  2412. type: string
  2413. type: object
  2414. services:
  2415. description: "Services is an optional field that contains
  2416. options for matching Kubernetes Services. If specified,
  2417. only traffic that originates from or terminates at endpoints
  2418. within the selected service(s) will be matched, and only
  2419. to/from each endpoint's port. \n Services cannot be specified
  2420. on the same rule as Selector, NotSelector, NamespaceSelector,
  2421. Nets, NotNets or ServiceAccounts. \n Ports and NotPorts
  2422. can only be specified with Services on ingress rules."
  2423. properties:
  2424. name:
  2425. description: Name specifies the name of a Kubernetes
  2426. Service to match.
  2427. type: string
  2428. namespace:
  2429. description: Namespace specifies the namespace of the
  2430. given Service. If left empty, the rule will match
  2431. within this policy's namespace.
  2432. type: string
  2433. type: object
  2434. type: object
  2435. http:
  2436. description: HTTP contains match criteria that apply to HTTP
  2437. requests.
  2438. properties:
  2439. methods:
  2440. description: Methods is an optional field that restricts
  2441. the rule to apply only to HTTP requests that use one of
  2442. the listed HTTP Methods (e.g. GET, PUT, etc.) Multiple
  2443. methods are OR'd together.
  2444. items:
  2445. type: string
  2446. type: array
  2447. paths:
  2448. description: 'Paths is an optional field that restricts
  2449. the rule to apply to HTTP requests that use one of the
  2450. listed HTTP Paths. Multiple paths are OR''d together.
  2451. e.g: - exact: /foo - prefix: /bar NOTE: Each entry may
  2452. ONLY specify either a `exact` or a `prefix` match. The
  2453. validator will check for it.'
  2454. items:
  2455. description: 'HTTPPath specifies an HTTP path to match.
  2456. It may be either of the form: exact: <path>: which matches
  2457. the path exactly or prefix: <path-prefix>: which matches
  2458. the path prefix'
  2459. properties:
  2460. exact:
  2461. type: string
  2462. prefix:
  2463. type: string
  2464. type: object
  2465. type: array
  2466. type: object
  2467. icmp:
  2468. description: ICMP is an optional field that restricts the rule
  2469. to apply to a specific type and code of ICMP traffic. This
  2470. should only be specified if the Protocol field is set to "ICMP"
  2471. or "ICMPv6".
  2472. properties:
  2473. code:
  2474. description: Match on a specific ICMP code. If specified,
  2475. the Type value must also be specified. This is a technical
  2476. limitation imposed by the kernel's iptables firewall,
  2477. which Calico uses to enforce the rule.
  2478. type: integer
  2479. type:
  2480. description: Match on a specific ICMP type. For example
  2481. a value of 8 refers to ICMP Echo Request (i.e. pings).
  2482. type: integer
  2483. type: object
  2484. ipVersion:
  2485. description: IPVersion is an optional field that restricts the
  2486. rule to only match a specific IP version.
  2487. type: integer
  2488. metadata:
  2489. description: Metadata contains additional information for this
  2490. rule
  2491. properties:
  2492. annotations:
  2493. additionalProperties:
  2494. type: string
  2495. description: Annotations is a set of key value pairs that
  2496. give extra information about the rule
  2497. type: object
  2498. type: object
  2499. notICMP:
  2500. description: NotICMP is the negated version of the ICMP field.
  2501. properties:
  2502. code:
  2503. description: Match on a specific ICMP code. If specified,
  2504. the Type value must also be specified. This is a technical
  2505. limitation imposed by the kernel's iptables firewall,
  2506. which Calico uses to enforce the rule.
  2507. type: integer
  2508. type:
  2509. description: Match on a specific ICMP type. For example
  2510. a value of 8 refers to ICMP Echo Request (i.e. pings).
  2511. type: integer
  2512. type: object
  2513. notProtocol:
  2514. anyOf:
  2515. - type: integer
  2516. - type: string
  2517. description: NotProtocol is the negated version of the Protocol
  2518. field.
  2519. pattern: ^.*
  2520. x-kubernetes-int-or-string: true
  2521. protocol:
  2522. anyOf:
  2523. - type: integer
  2524. - type: string
  2525. description: "Protocol is an optional field that restricts the
  2526. rule to only apply to traffic of a specific IP protocol. Required
  2527. if any of the EntityRules contain Ports (because ports only
  2528. apply to certain protocols). \n Must be one of these string
  2529. values: \"TCP\", \"UDP\", \"ICMP\", \"ICMPv6\", \"SCTP\",
  2530. \"UDPLite\" or an integer in the range 1-255."
  2531. pattern: ^.*
  2532. x-kubernetes-int-or-string: true
  2533. source:
  2534. description: Source contains the match criteria that apply to
  2535. source entity.
  2536. properties:
  2537. namespaceSelector:
  2538. description: "NamespaceSelector is an optional field that
  2539. contains a selector expression. Only traffic that originates
  2540. from (or terminates at) endpoints within the selected
  2541. namespaces will be matched. When both NamespaceSelector
  2542. and another selector are defined on the same rule, then
  2543. only workload endpoints that are matched by both selectors
  2544. will be selected by the rule. \n For NetworkPolicy, an
  2545. empty NamespaceSelector implies that the Selector is limited
  2546. to selecting only workload endpoints in the same namespace
  2547. as the NetworkPolicy. \n For NetworkPolicy, `global()`
  2548. NamespaceSelector implies that the Selector is limited
  2549. to selecting only GlobalNetworkSet or HostEndpoint. \n
  2550. For GlobalNetworkPolicy, an empty NamespaceSelector implies
  2551. the Selector applies to workload endpoints across all
  2552. namespaces."
  2553. type: string
  2554. nets:
  2555. description: Nets is an optional field that restricts the
  2556. rule to only apply to traffic that originates from (or
  2557. terminates at) IP addresses in any of the given subnets.
  2558. items:
  2559. type: string
  2560. type: array
  2561. notNets:
  2562. description: NotNets is the negated version of the Nets
  2563. field.
  2564. items:
  2565. type: string
  2566. type: array
  2567. notPorts:
  2568. description: NotPorts is the negated version of the Ports
  2569. field. Since only some protocols have ports, if any ports
  2570. are specified it requires the Protocol match in the Rule
  2571. to be set to "TCP" or "UDP".
  2572. items:
  2573. anyOf:
  2574. - type: integer
  2575. - type: string
  2576. pattern: ^.*
  2577. x-kubernetes-int-or-string: true
  2578. type: array
  2579. notSelector:
  2580. description: NotSelector is the negated version of the Selector
  2581. field. See Selector field for subtleties with negated
  2582. selectors.
  2583. type: string
  2584. ports:
  2585. description: "Ports is an optional field that restricts
  2586. the rule to only apply to traffic that has a source (destination)
  2587. port that matches one of these ranges/values. This value
  2588. is a list of integers or strings that represent ranges
  2589. of ports. \n Since only some protocols have ports, if
  2590. any ports are specified it requires the Protocol match
  2591. in the Rule to be set to \"TCP\" or \"UDP\"."
  2592. items:
  2593. anyOf:
  2594. - type: integer
  2595. - type: string
  2596. pattern: ^.*
  2597. x-kubernetes-int-or-string: true
  2598. type: array
  2599. selector:
  2600. description: "Selector is an optional field that contains
  2601. a selector expression (see Policy for sample syntax).
  2602. \ Only traffic that originates from (terminates at) endpoints
  2603. matching the selector will be matched. \n Note that: in
  2604. addition to the negated version of the Selector (see NotSelector
  2605. below), the selector expression syntax itself supports
  2606. negation. The two types of negation are subtly different.
  2607. One negates the set of matched endpoints, the other negates
  2608. the whole match: \n \tSelector = \"!has(my_label)\" matches
  2609. packets that are from other Calico-controlled \tendpoints
  2610. that do not have the label \"my_label\". \n \tNotSelector
  2611. = \"has(my_label)\" matches packets that are not from
  2612. Calico-controlled \tendpoints that do have the label \"my_label\".
  2613. \n The effect is that the latter will accept packets from
  2614. non-Calico sources whereas the former is limited to packets
  2615. from Calico-controlled endpoints."
  2616. type: string
  2617. serviceAccounts:
  2618. description: ServiceAccounts is an optional field that restricts
  2619. the rule to only apply to traffic that originates from
  2620. (or terminates at) a pod running as a matching service
  2621. account.
  2622. properties:
  2623. names:
  2624. description: Names is an optional field that restricts
  2625. the rule to only apply to traffic that originates
  2626. from (or terminates at) a pod running as a service
  2627. account whose name is in the list.
  2628. items:
  2629. type: string
  2630. type: array
  2631. selector:
  2632. description: Selector is an optional field that restricts
  2633. the rule to only apply to traffic that originates
  2634. from (or terminates at) a pod running as a service
  2635. account that matches the given label selector. If
  2636. both Names and Selector are specified then they are
  2637. AND'ed.
  2638. type: string
  2639. type: object
  2640. services:
  2641. description: "Services is an optional field that contains
  2642. options for matching Kubernetes Services. If specified,
  2643. only traffic that originates from or terminates at endpoints
  2644. within the selected service(s) will be matched, and only
  2645. to/from each endpoint's port. \n Services cannot be specified
  2646. on the same rule as Selector, NotSelector, NamespaceSelector,
  2647. Nets, NotNets or ServiceAccounts. \n Ports and NotPorts
  2648. can only be specified with Services on ingress rules."
  2649. properties:
  2650. name:
  2651. description: Name specifies the name of a Kubernetes
  2652. Service to match.
  2653. type: string
  2654. namespace:
  2655. description: Namespace specifies the namespace of the
  2656. given Service. If left empty, the rule will match
  2657. within this policy's namespace.
  2658. type: string
  2659. type: object
  2660. type: object
  2661. required:
  2662. - action
  2663. type: object
  2664. type: array
  2665. namespaceSelector:
  2666. description: NamespaceSelector is an optional field for an expression
  2667. used to select a pod based on namespaces.
  2668. type: string
  2669. order:
  2670. description: Order is an optional field that specifies the order in
  2671. which the policy is applied. Policies with higher "order" are applied
  2672. after those with lower order. If the order is omitted, it may be
  2673. considered to be "infinite" - i.e. the policy will be applied last. Policies
  2674. with identical order will be applied in alphanumerical order based
  2675. on the Policy "Name".
  2676. type: number
  2677. performanceHints:
  2678. description: "PerformanceHints contains a list of hints to Calico's
  2679. policy engine to help process the policy more efficiently. Hints
  2680. never change the enforcement behaviour of the policy. \n Currently,
  2681. the only available hint is \"AssumeNeededOnEveryNode\". When that
  2682. hint is set on a policy, Felix will act as if the policy matches
  2683. a local endpoint even if it does not. This is useful for \"preloading\"
  2684. any large static policies that are known to be used on every node.
  2685. If the policy is _not_ used on a particular node then the work done
  2686. to preload the policy (and to maintain it) is wasted."
  2687. items:
  2688. type: string
  2689. type: array
  2690. preDNAT:
  2691. description: PreDNAT indicates to apply the rules in this policy before
  2692. any DNAT.
  2693. type: boolean
  2694. selector:
  2695. description: "The selector is an expression used to pick pick out
  2696. the endpoints that the policy should be applied to. \n Selector
  2697. expressions follow this syntax: \n \tlabel == \"string_literal\"
  2698. \ -> comparison, e.g. my_label == \"foo bar\" \tlabel != \"string_literal\"
  2699. \ -> not equal; also matches if label is not present \tlabel in
  2700. { \"a\", \"b\", \"c\", ... } -> true if the value of label X is
  2701. one of \"a\", \"b\", \"c\" \tlabel not in { \"a\", \"b\", \"c\",
  2702. ... } -> true if the value of label X is not one of \"a\", \"b\",
  2703. \"c\" \thas(label_name) -> True if that label is present \t! expr
  2704. -> negation of expr \texpr && expr -> Short-circuit and \texpr
  2705. || expr -> Short-circuit or \t( expr ) -> parens for grouping \tall()
  2706. or the empty selector -> matches all endpoints. \n Label names are
  2707. allowed to contain alphanumerics, -, _ and /. String literals are
  2708. more permissive but they do not support escape characters. \n Examples
  2709. (with made-up labels): \n \ttype == \"webserver\" && deployment
  2710. == \"prod\" \ttype in {\"frontend\", \"backend\"} \tdeployment !=
  2711. \"dev\" \t! has(label_name)"
  2712. type: string
  2713. serviceAccountSelector:
  2714. description: ServiceAccountSelector is an optional field for an expression
  2715. used to select a pod based on service accounts.
  2716. type: string
  2717. types:
  2718. description: "Types indicates whether this policy applies to ingress,
  2719. or to egress, or to both. When not explicitly specified (and so
  2720. the value on creation is empty or nil), Calico defaults Types according
  2721. to what Ingress and Egress rules are present in the policy. The
  2722. default is: \n - [ PolicyTypeIngress ], if there are no Egress rules
  2723. (including the case where there are also no Ingress rules) \n
  2724. - [ PolicyTypeEgress ], if there are Egress rules but no Ingress
  2725. rules \n - [ PolicyTypeIngress, PolicyTypeEgress ], if there are
  2726. both Ingress and Egress rules. \n When the policy is read back again,
  2727. Types will always be one of these values, never empty or nil."
  2728. items:
  2729. description: PolicyType enumerates the possible values of the PolicySpec
  2730. Types field.
  2731. type: string
  2732. type: array
  2733. type: object
  2734. type: object
  2735. served: true
  2736. storage: true
  2737. status:
  2738. acceptedNames:
  2739. kind: ""
  2740. plural: ""
  2741. conditions: []
  2742. storedVersions: []
  2743. ---
  2744. # Source: calico/templates/kdd-crds.yaml
  2745. apiVersion: apiextensions.k8s.io/v1
  2746. kind: CustomResourceDefinition
  2747. metadata:
  2748. name: globalnetworksets.crd.projectcalico.org
  2749. spec:
  2750. group: crd.projectcalico.org
  2751. names:
  2752. kind: GlobalNetworkSet
  2753. listKind: GlobalNetworkSetList
  2754. plural: globalnetworksets
  2755. singular: globalnetworkset
  2756. preserveUnknownFields: false
  2757. scope: Cluster
  2758. versions:
  2759. - name: v1
  2760. schema:
  2761. openAPIV3Schema:
  2762. description: GlobalNetworkSet contains a set of arbitrary IP sub-networks/CIDRs
  2763. that share labels to allow rules to refer to them via selectors. The labels
  2764. of GlobalNetworkSet are not namespaced.
  2765. properties:
  2766. apiVersion:
  2767. description: 'APIVersion defines the versioned schema of this representation
  2768. of an object. Servers should convert recognized schemas to the latest
  2769. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  2770. type: string
  2771. kind:
  2772. description: 'Kind is a string value representing the REST resource this
  2773. object represents. Servers may infer this from the endpoint the client
  2774. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  2775. type: string
  2776. metadata:
  2777. type: object
  2778. spec:
  2779. description: GlobalNetworkSetSpec contains the specification for a NetworkSet
  2780. resource.
  2781. properties:
  2782. nets:
  2783. description: The list of IP networks that belong to this set.
  2784. items:
  2785. type: string
  2786. type: array
  2787. type: object
  2788. type: object
  2789. served: true
  2790. storage: true
  2791. status:
  2792. acceptedNames:
  2793. kind: ""
  2794. plural: ""
  2795. conditions: []
  2796. storedVersions: []
  2797. ---
  2798. # Source: calico/templates/kdd-crds.yaml
  2799. apiVersion: apiextensions.k8s.io/v1
  2800. kind: CustomResourceDefinition
  2801. metadata:
  2802. name: hostendpoints.crd.projectcalico.org
  2803. spec:
  2804. group: crd.projectcalico.org
  2805. names:
  2806. kind: HostEndpoint
  2807. listKind: HostEndpointList
  2808. plural: hostendpoints
  2809. singular: hostendpoint
  2810. preserveUnknownFields: false
  2811. scope: Cluster
  2812. versions:
  2813. - name: v1
  2814. schema:
  2815. openAPIV3Schema:
  2816. properties:
  2817. apiVersion:
  2818. description: 'APIVersion defines the versioned schema of this representation
  2819. of an object. Servers should convert recognized schemas to the latest
  2820. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  2821. type: string
  2822. kind:
  2823. description: 'Kind is a string value representing the REST resource this
  2824. object represents. Servers may infer this from the endpoint the client
  2825. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  2826. type: string
  2827. metadata:
  2828. type: object
  2829. spec:
  2830. description: HostEndpointSpec contains the specification for a HostEndpoint
  2831. resource.
  2832. properties:
  2833. expectedIPs:
  2834. description: "The expected IP addresses (IPv4 and IPv6) of the endpoint.
  2835. If \"InterfaceName\" is not present, Calico will look for an interface
  2836. matching any of the IPs in the list and apply policy to that. Note:
  2837. \tWhen using the selector match criteria in an ingress or egress
  2838. security Policy \tor Profile, Calico converts the selector into
  2839. a set of IP addresses. For host \tendpoints, the ExpectedIPs field
  2840. is used for that purpose. (If only the interface \tname is specified,
  2841. Calico does not learn the IPs of the interface for use in match
  2842. \tcriteria.)"
  2843. items:
  2844. type: string
  2845. type: array
  2846. interfaceName:
  2847. description: "Either \"*\", or the name of a specific Linux interface
  2848. to apply policy to; or empty. \"*\" indicates that this HostEndpoint
  2849. governs all traffic to, from or through the default network namespace
  2850. of the host named by the \"Node\" field; entering and leaving that
  2851. namespace via any interface, including those from/to non-host-networked
  2852. local workloads. \n If InterfaceName is not \"*\", this HostEndpoint
  2853. only governs traffic that enters or leaves the host through the
  2854. specific interface named by InterfaceName, or - when InterfaceName
  2855. is empty - through the specific interface that has one of the IPs
  2856. in ExpectedIPs. Therefore, when InterfaceName is empty, at least
  2857. one expected IP must be specified. Only external interfaces (such
  2858. as \"eth0\") are supported here; it isn't possible for a HostEndpoint
  2859. to protect traffic through a specific local workload interface.
  2860. \n Note: Only some kinds of policy are implemented for \"*\" HostEndpoints;
  2861. initially just pre-DNAT policy. Please check Calico documentation
  2862. for the latest position."
  2863. type: string
  2864. node:
  2865. description: The node name identifying the Calico node instance.
  2866. type: string
  2867. ports:
  2868. description: Ports contains the endpoint's named ports, which may
  2869. be referenced in security policy rules.
  2870. items:
  2871. properties:
  2872. name:
  2873. type: string
  2874. port:
  2875. type: integer
  2876. protocol:
  2877. anyOf:
  2878. - type: integer
  2879. - type: string
  2880. pattern: ^.*
  2881. x-kubernetes-int-or-string: true
  2882. required:
  2883. - name
  2884. - port
  2885. - protocol
  2886. type: object
  2887. type: array
  2888. profiles:
  2889. description: A list of identifiers of security Profile objects that
  2890. apply to this endpoint. Each profile is applied in the order that
  2891. they appear in this list. Profile rules are applied after the selector-based
  2892. security policy.
  2893. items:
  2894. type: string
  2895. type: array
  2896. type: object
  2897. type: object
  2898. served: true
  2899. storage: true
  2900. status:
  2901. acceptedNames:
  2902. kind: ""
  2903. plural: ""
  2904. conditions: []
  2905. storedVersions: []
  2906. ---
  2907. # Source: calico/templates/kdd-crds.yaml
  2908. apiVersion: apiextensions.k8s.io/v1
  2909. kind: CustomResourceDefinition
  2910. metadata:
  2911. name: ipamblocks.crd.projectcalico.org
  2912. spec:
  2913. group: crd.projectcalico.org
  2914. names:
  2915. kind: IPAMBlock
  2916. listKind: IPAMBlockList
  2917. plural: ipamblocks
  2918. singular: ipamblock
  2919. preserveUnknownFields: false
  2920. scope: Cluster
  2921. versions:
  2922. - name: v1
  2923. schema:
  2924. openAPIV3Schema:
  2925. properties:
  2926. apiVersion:
  2927. description: 'APIVersion defines the versioned schema of this representation
  2928. of an object. Servers should convert recognized schemas to the latest
  2929. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  2930. type: string
  2931. kind:
  2932. description: 'Kind is a string value representing the REST resource this
  2933. object represents. Servers may infer this from the endpoint the client
  2934. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  2935. type: string
  2936. metadata:
  2937. type: object
  2938. spec:
  2939. description: IPAMBlockSpec contains the specification for an IPAMBlock
  2940. resource.
  2941. properties:
  2942. affinity:
  2943. description: Affinity of the block, if this block has one. If set,
  2944. it will be of the form "host:<hostname>". If not set, this block
  2945. is not affine to a host.
  2946. type: string
  2947. allocations:
  2948. description: Array of allocations in-use within this block. nil entries
  2949. mean the allocation is free. For non-nil entries at index i, the
  2950. index is the ordinal of the allocation within this block and the
  2951. value is the index of the associated attributes in the Attributes
  2952. array.
  2953. items:
  2954. type: integer
  2955. # TODO: This nullable is manually added in. We should update controller-gen
  2956. # to handle []*int properly itself.
  2957. nullable: true
  2958. type: array
  2959. attributes:
  2960. description: Attributes is an array of arbitrary metadata associated
  2961. with allocations in the block. To find attributes for a given allocation,
  2962. use the value of the allocation's entry in the Allocations array
  2963. as the index of the element in this array.
  2964. items:
  2965. properties:
  2966. handle_id:
  2967. type: string
  2968. secondary:
  2969. additionalProperties:
  2970. type: string
  2971. type: object
  2972. type: object
  2973. type: array
  2974. cidr:
  2975. description: The block's CIDR.
  2976. type: string
  2977. deleted:
  2978. description: Deleted is an internal boolean used to workaround a limitation
  2979. in the Kubernetes API whereby deletion will not return a conflict
  2980. error if the block has been updated. It should not be set manually.
  2981. type: boolean
  2982. sequenceNumber:
  2983. default: 0
  2984. description: We store a sequence number that is updated each time
  2985. the block is written. Each allocation will also store the sequence
  2986. number of the block at the time of its creation. When releasing
  2987. an IP, passing the sequence number associated with the allocation
  2988. allows us to protect against a race condition and ensure the IP
  2989. hasn't been released and re-allocated since the release request.
  2990. format: int64
  2991. type: integer
  2992. sequenceNumberForAllocation:
  2993. additionalProperties:
  2994. format: int64
  2995. type: integer
  2996. description: Map of allocated ordinal within the block to sequence
  2997. number of the block at the time of allocation. Kubernetes does not
  2998. allow numerical keys for maps, so the key is cast to a string.
  2999. type: object
  3000. strictAffinity:
  3001. description: StrictAffinity on the IPAMBlock is deprecated and no
  3002. longer used by the code. Use IPAMConfig StrictAffinity instead.
  3003. type: boolean
  3004. unallocated:
  3005. description: Unallocated is an ordered list of allocations which are
  3006. free in the block.
  3007. items:
  3008. type: integer
  3009. type: array
  3010. required:
  3011. - allocations
  3012. - attributes
  3013. - cidr
  3014. - strictAffinity
  3015. - unallocated
  3016. type: object
  3017. type: object
  3018. served: true
  3019. storage: true
  3020. status:
  3021. acceptedNames:
  3022. kind: ""
  3023. plural: ""
  3024. conditions: []
  3025. storedVersions: []
  3026. ---
  3027. # Source: calico/templates/kdd-crds.yaml
  3028. apiVersion: apiextensions.k8s.io/v1
  3029. kind: CustomResourceDefinition
  3030. metadata:
  3031. name: ipamconfigs.crd.projectcalico.org
  3032. spec:
  3033. group: crd.projectcalico.org
  3034. names:
  3035. kind: IPAMConfig
  3036. listKind: IPAMConfigList
  3037. plural: ipamconfigs
  3038. singular: ipamconfig
  3039. preserveUnknownFields: false
  3040. scope: Cluster
  3041. versions:
  3042. - name: v1
  3043. schema:
  3044. openAPIV3Schema:
  3045. properties:
  3046. apiVersion:
  3047. description: 'APIVersion defines the versioned schema of this representation
  3048. of an object. Servers should convert recognized schemas to the latest
  3049. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  3050. type: string
  3051. kind:
  3052. description: 'Kind is a string value representing the REST resource this
  3053. object represents. Servers may infer this from the endpoint the client
  3054. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  3055. type: string
  3056. metadata:
  3057. type: object
  3058. spec:
  3059. description: IPAMConfigSpec contains the specification for an IPAMConfig
  3060. resource.
  3061. properties:
  3062. autoAllocateBlocks:
  3063. type: boolean
  3064. maxBlocksPerHost:
  3065. description: MaxBlocksPerHost, if non-zero, is the max number of blocks
  3066. that can be affine to each host.
  3067. maximum: 2147483647
  3068. minimum: 0
  3069. type: integer
  3070. strictAffinity:
  3071. type: boolean
  3072. required:
  3073. - autoAllocateBlocks
  3074. - strictAffinity
  3075. type: object
  3076. type: object
  3077. served: true
  3078. storage: true
  3079. status:
  3080. acceptedNames:
  3081. kind: ""
  3082. plural: ""
  3083. conditions: []
  3084. storedVersions: []
  3085. ---
  3086. # Source: calico/templates/kdd-crds.yaml
  3087. apiVersion: apiextensions.k8s.io/v1
  3088. kind: CustomResourceDefinition
  3089. metadata:
  3090. name: ipamhandles.crd.projectcalico.org
  3091. spec:
  3092. group: crd.projectcalico.org
  3093. names:
  3094. kind: IPAMHandle
  3095. listKind: IPAMHandleList
  3096. plural: ipamhandles
  3097. singular: ipamhandle
  3098. preserveUnknownFields: false
  3099. scope: Cluster
  3100. versions:
  3101. - name: v1
  3102. schema:
  3103. openAPIV3Schema:
  3104. properties:
  3105. apiVersion:
  3106. description: 'APIVersion defines the versioned schema of this representation
  3107. of an object. Servers should convert recognized schemas to the latest
  3108. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  3109. type: string
  3110. kind:
  3111. description: 'Kind is a string value representing the REST resource this
  3112. object represents. Servers may infer this from the endpoint the client
  3113. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  3114. type: string
  3115. metadata:
  3116. type: object
  3117. spec:
  3118. description: IPAMHandleSpec contains the specification for an IPAMHandle
  3119. resource.
  3120. properties:
  3121. block:
  3122. additionalProperties:
  3123. type: integer
  3124. type: object
  3125. deleted:
  3126. type: boolean
  3127. handleID:
  3128. type: string
  3129. required:
  3130. - block
  3131. - handleID
  3132. type: object
  3133. type: object
  3134. served: true
  3135. storage: true
  3136. status:
  3137. acceptedNames:
  3138. kind: ""
  3139. plural: ""
  3140. conditions: []
  3141. storedVersions: []
  3142. ---
  3143. # Source: calico/templates/kdd-crds.yaml
  3144. apiVersion: apiextensions.k8s.io/v1
  3145. kind: CustomResourceDefinition
  3146. metadata:
  3147. name: ippools.crd.projectcalico.org
  3148. spec:
  3149. group: crd.projectcalico.org
  3150. names:
  3151. kind: IPPool
  3152. listKind: IPPoolList
  3153. plural: ippools
  3154. singular: ippool
  3155. preserveUnknownFields: false
  3156. scope: Cluster
  3157. versions:
  3158. - name: v1
  3159. schema:
  3160. openAPIV3Schema:
  3161. properties:
  3162. apiVersion:
  3163. description: 'APIVersion defines the versioned schema of this representation
  3164. of an object. Servers should convert recognized schemas to the latest
  3165. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  3166. type: string
  3167. kind:
  3168. description: 'Kind is a string value representing the REST resource this
  3169. object represents. Servers may infer this from the endpoint the client
  3170. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  3171. type: string
  3172. metadata:
  3173. type: object
  3174. spec:
  3175. description: IPPoolSpec contains the specification for an IPPool resource.
  3176. properties:
  3177. allowedUses:
  3178. description: AllowedUse controls what the IP pool will be used for. If
  3179. not specified or empty, defaults to ["Tunnel", "Workload"] for back-compatibility
  3180. items:
  3181. type: string
  3182. type: array
  3183. blockSize:
  3184. description: The block size to use for IP address assignments from
  3185. this pool. Defaults to 26 for IPv4 and 122 for IPv6.
  3186. type: integer
  3187. cidr:
  3188. description: The pool CIDR.
  3189. type: string
  3190. disableBGPExport:
  3191. description: 'Disable exporting routes from this IP Pool''s CIDR over
  3192. BGP. [Default: false]'
  3193. type: boolean
  3194. disabled:
  3195. description: When disabled is true, Calico IPAM will not assign addresses
  3196. from this pool.
  3197. type: boolean
  3198. ipip:
  3199. description: 'Deprecated: this field is only used for APIv1 backwards
  3200. compatibility. Setting this field is not allowed, this field is
  3201. for internal use only.'
  3202. properties:
  3203. enabled:
  3204. description: When enabled is true, ipip tunneling will be used
  3205. to deliver packets to destinations within this pool.
  3206. type: boolean
  3207. mode:
  3208. description: The IPIP mode. This can be one of "always" or "cross-subnet". A
  3209. mode of "always" will also use IPIP tunneling for routing to
  3210. destination IP addresses within this pool. A mode of "cross-subnet"
  3211. will only use IPIP tunneling when the destination node is on
  3212. a different subnet to the originating node. The default value
  3213. (if not specified) is "always".
  3214. type: string
  3215. type: object
  3216. ipipMode:
  3217. description: Contains configuration for IPIP tunneling for this pool.
  3218. If not specified, then this is defaulted to "Never" (i.e. IPIP tunneling
  3219. is disabled).
  3220. type: string
  3221. nat-outgoing:
  3222. description: 'Deprecated: this field is only used for APIv1 backwards
  3223. compatibility. Setting this field is not allowed, this field is
  3224. for internal use only.'
  3225. type: boolean
  3226. natOutgoing:
  3227. description: When natOutgoing is true, packets sent from Calico networked
  3228. containers in this pool to destinations outside of this pool will
  3229. be masqueraded.
  3230. type: boolean
  3231. nodeSelector:
  3232. description: Allows IPPool to allocate for a specific node by label
  3233. selector.
  3234. type: string
  3235. vxlanMode:
  3236. description: Contains configuration for VXLAN tunneling for this pool.
  3237. If not specified, then this is defaulted to "Never" (i.e. VXLAN
  3238. tunneling is disabled).
  3239. type: string
  3240. required:
  3241. - cidr
  3242. type: object
  3243. type: object
  3244. served: true
  3245. storage: true
  3246. status:
  3247. acceptedNames:
  3248. kind: ""
  3249. plural: ""
  3250. conditions: []
  3251. storedVersions: []
  3252. ---
  3253. # Source: calico/templates/kdd-crds.yaml
  3254. apiVersion: apiextensions.k8s.io/v1
  3255. kind: CustomResourceDefinition
  3256. metadata:
  3257. annotations:
  3258. controller-gen.kubebuilder.io/version: (devel)
  3259. creationTimestamp: null
  3260. name: ipreservations.crd.projectcalico.org
  3261. spec:
  3262. group: crd.projectcalico.org
  3263. names:
  3264. kind: IPReservation
  3265. listKind: IPReservationList
  3266. plural: ipreservations
  3267. singular: ipreservation
  3268. preserveUnknownFields: false
  3269. scope: Cluster
  3270. versions:
  3271. - name: v1
  3272. schema:
  3273. openAPIV3Schema:
  3274. properties:
  3275. apiVersion:
  3276. description: 'APIVersion defines the versioned schema of this representation
  3277. of an object. Servers should convert recognized schemas to the latest
  3278. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  3279. type: string
  3280. kind:
  3281. description: 'Kind is a string value representing the REST resource this
  3282. object represents. Servers may infer this from the endpoint the client
  3283. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  3284. type: string
  3285. metadata:
  3286. type: object
  3287. spec:
  3288. description: IPReservationSpec contains the specification for an IPReservation
  3289. resource.
  3290. properties:
  3291. reservedCIDRs:
  3292. description: ReservedCIDRs is a list of CIDRs and/or IP addresses
  3293. that Calico IPAM will exclude from new allocations.
  3294. items:
  3295. type: string
  3296. type: array
  3297. type: object
  3298. type: object
  3299. served: true
  3300. storage: true
  3301. status:
  3302. acceptedNames:
  3303. kind: ""
  3304. plural: ""
  3305. conditions: []
  3306. storedVersions: []
  3307. ---
  3308. # Source: calico/templates/kdd-crds.yaml
  3309. apiVersion: apiextensions.k8s.io/v1
  3310. kind: CustomResourceDefinition
  3311. metadata:
  3312. name: kubecontrollersconfigurations.crd.projectcalico.org
  3313. spec:
  3314. group: crd.projectcalico.org
  3315. names:
  3316. kind: KubeControllersConfiguration
  3317. listKind: KubeControllersConfigurationList
  3318. plural: kubecontrollersconfigurations
  3319. singular: kubecontrollersconfiguration
  3320. preserveUnknownFields: false
  3321. scope: Cluster
  3322. versions:
  3323. - name: v1
  3324. schema:
  3325. openAPIV3Schema:
  3326. properties:
  3327. apiVersion:
  3328. description: 'APIVersion defines the versioned schema of this representation
  3329. of an object. Servers should convert recognized schemas to the latest
  3330. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  3331. type: string
  3332. kind:
  3333. description: 'Kind is a string value representing the REST resource this
  3334. object represents. Servers may infer this from the endpoint the client
  3335. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  3336. type: string
  3337. metadata:
  3338. type: object
  3339. spec:
  3340. description: KubeControllersConfigurationSpec contains the values of the
  3341. Kubernetes controllers configuration.
  3342. properties:
  3343. controllers:
  3344. description: Controllers enables and configures individual Kubernetes
  3345. controllers
  3346. properties:
  3347. namespace:
  3348. description: Namespace enables and configures the namespace controller.
  3349. Enabled by default, set to nil to disable.
  3350. properties:
  3351. reconcilerPeriod:
  3352. description: 'ReconcilerPeriod is the period to perform reconciliation
  3353. with the Calico datastore. [Default: 5m]'
  3354. type: string
  3355. type: object
  3356. node:
  3357. description: Node enables and configures the node controller.
  3358. Enabled by default, set to nil to disable.
  3359. properties:
  3360. hostEndpoint:
  3361. description: HostEndpoint controls syncing nodes to host endpoints.
  3362. Disabled by default, set to nil to disable.
  3363. properties:
  3364. autoCreate:
  3365. description: 'AutoCreate enables automatic creation of
  3366. host endpoints for every node. [Default: Disabled]'
  3367. type: string
  3368. type: object
  3369. leakGracePeriod:
  3370. description: 'LeakGracePeriod is the period used by the controller
  3371. to determine if an IP address has been leaked. Set to 0
  3372. to disable IP garbage collection. [Default: 15m]'
  3373. type: string
  3374. reconcilerPeriod:
  3375. description: 'ReconcilerPeriod is the period to perform reconciliation
  3376. with the Calico datastore. [Default: 5m]'
  3377. type: string
  3378. syncLabels:
  3379. description: 'SyncLabels controls whether to copy Kubernetes
  3380. node labels to Calico nodes. [Default: Enabled]'
  3381. type: string
  3382. type: object
  3383. policy:
  3384. description: Policy enables and configures the policy controller.
  3385. Enabled by default, set to nil to disable.
  3386. properties:
  3387. reconcilerPeriod:
  3388. description: 'ReconcilerPeriod is the period to perform reconciliation
  3389. with the Calico datastore. [Default: 5m]'
  3390. type: string
  3391. type: object
  3392. serviceAccount:
  3393. description: ServiceAccount enables and configures the service
  3394. account controller. Enabled by default, set to nil to disable.
  3395. properties:
  3396. reconcilerPeriod:
  3397. description: 'ReconcilerPeriod is the period to perform reconciliation
  3398. with the Calico datastore. [Default: 5m]'
  3399. type: string
  3400. type: object
  3401. workloadEndpoint:
  3402. description: WorkloadEndpoint enables and configures the workload
  3403. endpoint controller. Enabled by default, set to nil to disable.
  3404. properties:
  3405. reconcilerPeriod:
  3406. description: 'ReconcilerPeriod is the period to perform reconciliation
  3407. with the Calico datastore. [Default: 5m]'
  3408. type: string
  3409. type: object
  3410. type: object
  3411. debugProfilePort:
  3412. description: DebugProfilePort configures the port to serve memory
  3413. and cpu profiles on. If not specified, profiling is disabled.
  3414. format: int32
  3415. type: integer
  3416. etcdV3CompactionPeriod:
  3417. description: 'EtcdV3CompactionPeriod is the period between etcdv3
  3418. compaction requests. Set to 0 to disable. [Default: 10m]'
  3419. type: string
  3420. healthChecks:
  3421. description: 'HealthChecks enables or disables support for health
  3422. checks [Default: Enabled]'
  3423. type: string
  3424. logSeverityScreen:
  3425. description: 'LogSeverityScreen is the log severity above which logs
  3426. are sent to the stdout. [Default: Info]'
  3427. type: string
  3428. prometheusMetricsPort:
  3429. description: 'PrometheusMetricsPort is the TCP port that the Prometheus
  3430. metrics server should bind to. Set to 0 to disable. [Default: 9094]'
  3431. type: integer
  3432. required:
  3433. - controllers
  3434. type: object
  3435. status:
  3436. description: KubeControllersConfigurationStatus represents the status
  3437. of the configuration. It's useful for admins to be able to see the actual
  3438. config that was applied, which can be modified by environment variables
  3439. on the kube-controllers process.
  3440. properties:
  3441. environmentVars:
  3442. additionalProperties:
  3443. type: string
  3444. description: EnvironmentVars contains the environment variables on
  3445. the kube-controllers that influenced the RunningConfig.
  3446. type: object
  3447. runningConfig:
  3448. description: RunningConfig contains the effective config that is running
  3449. in the kube-controllers pod, after merging the API resource with
  3450. any environment variables.
  3451. properties:
  3452. controllers:
  3453. description: Controllers enables and configures individual Kubernetes
  3454. controllers
  3455. properties:
  3456. namespace:
  3457. description: Namespace enables and configures the namespace
  3458. controller. Enabled by default, set to nil to disable.
  3459. properties:
  3460. reconcilerPeriod:
  3461. description: 'ReconcilerPeriod is the period to perform
  3462. reconciliation with the Calico datastore. [Default:
  3463. 5m]'
  3464. type: string
  3465. type: object
  3466. node:
  3467. description: Node enables and configures the node controller.
  3468. Enabled by default, set to nil to disable.
  3469. properties:
  3470. hostEndpoint:
  3471. description: HostEndpoint controls syncing nodes to host
  3472. endpoints. Disabled by default, set to nil to disable.
  3473. properties:
  3474. autoCreate:
  3475. description: 'AutoCreate enables automatic creation
  3476. of host endpoints for every node. [Default: Disabled]'
  3477. type: string
  3478. type: object
  3479. leakGracePeriod:
  3480. description: 'LeakGracePeriod is the period used by the
  3481. controller to determine if an IP address has been leaked.
  3482. Set to 0 to disable IP garbage collection. [Default:
  3483. 15m]'
  3484. type: string
  3485. reconcilerPeriod:
  3486. description: 'ReconcilerPeriod is the period to perform
  3487. reconciliation with the Calico datastore. [Default:
  3488. 5m]'
  3489. type: string
  3490. syncLabels:
  3491. description: 'SyncLabels controls whether to copy Kubernetes
  3492. node labels to Calico nodes. [Default: Enabled]'
  3493. type: string
  3494. type: object
  3495. policy:
  3496. description: Policy enables and configures the policy controller.
  3497. Enabled by default, set to nil to disable.
  3498. properties:
  3499. reconcilerPeriod:
  3500. description: 'ReconcilerPeriod is the period to perform
  3501. reconciliation with the Calico datastore. [Default:
  3502. 5m]'
  3503. type: string
  3504. type: object
  3505. serviceAccount:
  3506. description: ServiceAccount enables and configures the service
  3507. account controller. Enabled by default, set to nil to disable.
  3508. properties:
  3509. reconcilerPeriod:
  3510. description: 'ReconcilerPeriod is the period to perform
  3511. reconciliation with the Calico datastore. [Default:
  3512. 5m]'
  3513. type: string
  3514. type: object
  3515. workloadEndpoint:
  3516. description: WorkloadEndpoint enables and configures the workload
  3517. endpoint controller. Enabled by default, set to nil to disable.
  3518. properties:
  3519. reconcilerPeriod:
  3520. description: 'ReconcilerPeriod is the period to perform
  3521. reconciliation with the Calico datastore. [Default:
  3522. 5m]'
  3523. type: string
  3524. type: object
  3525. type: object
  3526. debugProfilePort:
  3527. description: DebugProfilePort configures the port to serve memory
  3528. and cpu profiles on. If not specified, profiling is disabled.
  3529. format: int32
  3530. type: integer
  3531. etcdV3CompactionPeriod:
  3532. description: 'EtcdV3CompactionPeriod is the period between etcdv3
  3533. compaction requests. Set to 0 to disable. [Default: 10m]'
  3534. type: string
  3535. healthChecks:
  3536. description: 'HealthChecks enables or disables support for health
  3537. checks [Default: Enabled]'
  3538. type: string
  3539. logSeverityScreen:
  3540. description: 'LogSeverityScreen is the log severity above which
  3541. logs are sent to the stdout. [Default: Info]'
  3542. type: string
  3543. prometheusMetricsPort:
  3544. description: 'PrometheusMetricsPort is the TCP port that the Prometheus
  3545. metrics server should bind to. Set to 0 to disable. [Default:
  3546. 9094]'
  3547. type: integer
  3548. required:
  3549. - controllers
  3550. type: object
  3551. type: object
  3552. type: object
  3553. served: true
  3554. storage: true
  3555. status:
  3556. acceptedNames:
  3557. kind: ""
  3558. plural: ""
  3559. conditions: []
  3560. storedVersions: []
  3561. ---
  3562. # Source: calico/templates/kdd-crds.yaml
  3563. apiVersion: apiextensions.k8s.io/v1
  3564. kind: CustomResourceDefinition
  3565. metadata:
  3566. name: networkpolicies.crd.projectcalico.org
  3567. spec:
  3568. group: crd.projectcalico.org
  3569. names:
  3570. kind: NetworkPolicy
  3571. listKind: NetworkPolicyList
  3572. plural: networkpolicies
  3573. singular: networkpolicy
  3574. preserveUnknownFields: false
  3575. scope: Namespaced
  3576. versions:
  3577. - name: v1
  3578. schema:
  3579. openAPIV3Schema:
  3580. properties:
  3581. apiVersion:
  3582. description: 'APIVersion defines the versioned schema of this representation
  3583. of an object. Servers should convert recognized schemas to the latest
  3584. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  3585. type: string
  3586. kind:
  3587. description: 'Kind is a string value representing the REST resource this
  3588. object represents. Servers may infer this from the endpoint the client
  3589. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  3590. type: string
  3591. metadata:
  3592. type: object
  3593. spec:
  3594. properties:
  3595. egress:
  3596. description: The ordered set of egress rules. Each rule contains
  3597. a set of packet match criteria and a corresponding action to apply.
  3598. items:
  3599. description: "A Rule encapsulates a set of match criteria and an
  3600. action. Both selector-based security Policy and security Profiles
  3601. reference rules - separated out as a list of rules for both ingress
  3602. and egress packet matching. \n Each positive match criteria has
  3603. a negated version, prefixed with \"Not\". All the match criteria
  3604. within a rule must be satisfied for a packet to match. A single
  3605. rule can contain the positive and negative version of a match
  3606. and both must be satisfied for the rule to match."
  3607. properties:
  3608. action:
  3609. type: string
  3610. destination:
  3611. description: Destination contains the match criteria that apply
  3612. to destination entity.
  3613. properties:
  3614. namespaceSelector:
  3615. description: "NamespaceSelector is an optional field that
  3616. contains a selector expression. Only traffic that originates
  3617. from (or terminates at) endpoints within the selected
  3618. namespaces will be matched. When both NamespaceSelector
  3619. and another selector are defined on the same rule, then
  3620. only workload endpoints that are matched by both selectors
  3621. will be selected by the rule. \n For NetworkPolicy, an
  3622. empty NamespaceSelector implies that the Selector is limited
  3623. to selecting only workload endpoints in the same namespace
  3624. as the NetworkPolicy. \n For NetworkPolicy, `global()`
  3625. NamespaceSelector implies that the Selector is limited
  3626. to selecting only GlobalNetworkSet or HostEndpoint. \n
  3627. For GlobalNetworkPolicy, an empty NamespaceSelector implies
  3628. the Selector applies to workload endpoints across all
  3629. namespaces."
  3630. type: string
  3631. nets:
  3632. description: Nets is an optional field that restricts the
  3633. rule to only apply to traffic that originates from (or
  3634. terminates at) IP addresses in any of the given subnets.
  3635. items:
  3636. type: string
  3637. type: array
  3638. notNets:
  3639. description: NotNets is the negated version of the Nets
  3640. field.
  3641. items:
  3642. type: string
  3643. type: array
  3644. notPorts:
  3645. description: NotPorts is the negated version of the Ports
  3646. field. Since only some protocols have ports, if any ports
  3647. are specified it requires the Protocol match in the Rule
  3648. to be set to "TCP" or "UDP".
  3649. items:
  3650. anyOf:
  3651. - type: integer
  3652. - type: string
  3653. pattern: ^.*
  3654. x-kubernetes-int-or-string: true
  3655. type: array
  3656. notSelector:
  3657. description: NotSelector is the negated version of the Selector
  3658. field. See Selector field for subtleties with negated
  3659. selectors.
  3660. type: string
  3661. ports:
  3662. description: "Ports is an optional field that restricts
  3663. the rule to only apply to traffic that has a source (destination)
  3664. port that matches one of these ranges/values. This value
  3665. is a list of integers or strings that represent ranges
  3666. of ports. \n Since only some protocols have ports, if
  3667. any ports are specified it requires the Protocol match
  3668. in the Rule to be set to \"TCP\" or \"UDP\"."
  3669. items:
  3670. anyOf:
  3671. - type: integer
  3672. - type: string
  3673. pattern: ^.*
  3674. x-kubernetes-int-or-string: true
  3675. type: array
  3676. selector:
  3677. description: "Selector is an optional field that contains
  3678. a selector expression (see Policy for sample syntax).
  3679. \ Only traffic that originates from (terminates at) endpoints
  3680. matching the selector will be matched. \n Note that: in
  3681. addition to the negated version of the Selector (see NotSelector
  3682. below), the selector expression syntax itself supports
  3683. negation. The two types of negation are subtly different.
  3684. One negates the set of matched endpoints, the other negates
  3685. the whole match: \n \tSelector = \"!has(my_label)\" matches
  3686. packets that are from other Calico-controlled \tendpoints
  3687. that do not have the label \"my_label\". \n \tNotSelector
  3688. = \"has(my_label)\" matches packets that are not from
  3689. Calico-controlled \tendpoints that do have the label \"my_label\".
  3690. \n The effect is that the latter will accept packets from
  3691. non-Calico sources whereas the former is limited to packets
  3692. from Calico-controlled endpoints."
  3693. type: string
  3694. serviceAccounts:
  3695. description: ServiceAccounts is an optional field that restricts
  3696. the rule to only apply to traffic that originates from
  3697. (or terminates at) a pod running as a matching service
  3698. account.
  3699. properties:
  3700. names:
  3701. description: Names is an optional field that restricts
  3702. the rule to only apply to traffic that originates
  3703. from (or terminates at) a pod running as a service
  3704. account whose name is in the list.
  3705. items:
  3706. type: string
  3707. type: array
  3708. selector:
  3709. description: Selector is an optional field that restricts
  3710. the rule to only apply to traffic that originates
  3711. from (or terminates at) a pod running as a service
  3712. account that matches the given label selector. If
  3713. both Names and Selector are specified then they are
  3714. AND'ed.
  3715. type: string
  3716. type: object
  3717. services:
  3718. description: "Services is an optional field that contains
  3719. options for matching Kubernetes Services. If specified,
  3720. only traffic that originates from or terminates at endpoints
  3721. within the selected service(s) will be matched, and only
  3722. to/from each endpoint's port. \n Services cannot be specified
  3723. on the same rule as Selector, NotSelector, NamespaceSelector,
  3724. Nets, NotNets or ServiceAccounts. \n Ports and NotPorts
  3725. can only be specified with Services on ingress rules."
  3726. properties:
  3727. name:
  3728. description: Name specifies the name of a Kubernetes
  3729. Service to match.
  3730. type: string
  3731. namespace:
  3732. description: Namespace specifies the namespace of the
  3733. given Service. If left empty, the rule will match
  3734. within this policy's namespace.
  3735. type: string
  3736. type: object
  3737. type: object
  3738. http:
  3739. description: HTTP contains match criteria that apply to HTTP
  3740. requests.
  3741. properties:
  3742. methods:
  3743. description: Methods is an optional field that restricts
  3744. the rule to apply only to HTTP requests that use one of
  3745. the listed HTTP Methods (e.g. GET, PUT, etc.) Multiple
  3746. methods are OR'd together.
  3747. items:
  3748. type: string
  3749. type: array
  3750. paths:
  3751. description: 'Paths is an optional field that restricts
  3752. the rule to apply to HTTP requests that use one of the
  3753. listed HTTP Paths. Multiple paths are OR''d together.
  3754. e.g: - exact: /foo - prefix: /bar NOTE: Each entry may
  3755. ONLY specify either a `exact` or a `prefix` match. The
  3756. validator will check for it.'
  3757. items:
  3758. description: 'HTTPPath specifies an HTTP path to match.
  3759. It may be either of the form: exact: <path>: which matches
  3760. the path exactly or prefix: <path-prefix>: which matches
  3761. the path prefix'
  3762. properties:
  3763. exact:
  3764. type: string
  3765. prefix:
  3766. type: string
  3767. type: object
  3768. type: array
  3769. type: object
  3770. icmp:
  3771. description: ICMP is an optional field that restricts the rule
  3772. to apply to a specific type and code of ICMP traffic. This
  3773. should only be specified if the Protocol field is set to "ICMP"
  3774. or "ICMPv6".
  3775. properties:
  3776. code:
  3777. description: Match on a specific ICMP code. If specified,
  3778. the Type value must also be specified. This is a technical
  3779. limitation imposed by the kernel's iptables firewall,
  3780. which Calico uses to enforce the rule.
  3781. type: integer
  3782. type:
  3783. description: Match on a specific ICMP type. For example
  3784. a value of 8 refers to ICMP Echo Request (i.e. pings).
  3785. type: integer
  3786. type: object
  3787. ipVersion:
  3788. description: IPVersion is an optional field that restricts the
  3789. rule to only match a specific IP version.
  3790. type: integer
  3791. metadata:
  3792. description: Metadata contains additional information for this
  3793. rule
  3794. properties:
  3795. annotations:
  3796. additionalProperties:
  3797. type: string
  3798. description: Annotations is a set of key value pairs that
  3799. give extra information about the rule
  3800. type: object
  3801. type: object
  3802. notICMP:
  3803. description: NotICMP is the negated version of the ICMP field.
  3804. properties:
  3805. code:
  3806. description: Match on a specific ICMP code. If specified,
  3807. the Type value must also be specified. This is a technical
  3808. limitation imposed by the kernel's iptables firewall,
  3809. which Calico uses to enforce the rule.
  3810. type: integer
  3811. type:
  3812. description: Match on a specific ICMP type. For example
  3813. a value of 8 refers to ICMP Echo Request (i.e. pings).
  3814. type: integer
  3815. type: object
  3816. notProtocol:
  3817. anyOf:
  3818. - type: integer
  3819. - type: string
  3820. description: NotProtocol is the negated version of the Protocol
  3821. field.
  3822. pattern: ^.*
  3823. x-kubernetes-int-or-string: true
  3824. protocol:
  3825. anyOf:
  3826. - type: integer
  3827. - type: string
  3828. description: "Protocol is an optional field that restricts the
  3829. rule to only apply to traffic of a specific IP protocol. Required
  3830. if any of the EntityRules contain Ports (because ports only
  3831. apply to certain protocols). \n Must be one of these string
  3832. values: \"TCP\", \"UDP\", \"ICMP\", \"ICMPv6\", \"SCTP\",
  3833. \"UDPLite\" or an integer in the range 1-255."
  3834. pattern: ^.*
  3835. x-kubernetes-int-or-string: true
  3836. source:
  3837. description: Source contains the match criteria that apply to
  3838. source entity.
  3839. properties:
  3840. namespaceSelector:
  3841. description: "NamespaceSelector is an optional field that
  3842. contains a selector expression. Only traffic that originates
  3843. from (or terminates at) endpoints within the selected
  3844. namespaces will be matched. When both NamespaceSelector
  3845. and another selector are defined on the same rule, then
  3846. only workload endpoints that are matched by both selectors
  3847. will be selected by the rule. \n For NetworkPolicy, an
  3848. empty NamespaceSelector implies that the Selector is limited
  3849. to selecting only workload endpoints in the same namespace
  3850. as the NetworkPolicy. \n For NetworkPolicy, `global()`
  3851. NamespaceSelector implies that the Selector is limited
  3852. to selecting only GlobalNetworkSet or HostEndpoint. \n
  3853. For GlobalNetworkPolicy, an empty NamespaceSelector implies
  3854. the Selector applies to workload endpoints across all
  3855. namespaces."
  3856. type: string
  3857. nets:
  3858. description: Nets is an optional field that restricts the
  3859. rule to only apply to traffic that originates from (or
  3860. terminates at) IP addresses in any of the given subnets.
  3861. items:
  3862. type: string
  3863. type: array
  3864. notNets:
  3865. description: NotNets is the negated version of the Nets
  3866. field.
  3867. items:
  3868. type: string
  3869. type: array
  3870. notPorts:
  3871. description: NotPorts is the negated version of the Ports
  3872. field. Since only some protocols have ports, if any ports
  3873. are specified it requires the Protocol match in the Rule
  3874. to be set to "TCP" or "UDP".
  3875. items:
  3876. anyOf:
  3877. - type: integer
  3878. - type: string
  3879. pattern: ^.*
  3880. x-kubernetes-int-or-string: true
  3881. type: array
  3882. notSelector:
  3883. description: NotSelector is the negated version of the Selector
  3884. field. See Selector field for subtleties with negated
  3885. selectors.
  3886. type: string
  3887. ports:
  3888. description: "Ports is an optional field that restricts
  3889. the rule to only apply to traffic that has a source (destination)
  3890. port that matches one of these ranges/values. This value
  3891. is a list of integers or strings that represent ranges
  3892. of ports. \n Since only some protocols have ports, if
  3893. any ports are specified it requires the Protocol match
  3894. in the Rule to be set to \"TCP\" or \"UDP\"."
  3895. items:
  3896. anyOf:
  3897. - type: integer
  3898. - type: string
  3899. pattern: ^.*
  3900. x-kubernetes-int-or-string: true
  3901. type: array
  3902. selector:
  3903. description: "Selector is an optional field that contains
  3904. a selector expression (see Policy for sample syntax).
  3905. \ Only traffic that originates from (terminates at) endpoints
  3906. matching the selector will be matched. \n Note that: in
  3907. addition to the negated version of the Selector (see NotSelector
  3908. below), the selector expression syntax itself supports
  3909. negation. The two types of negation are subtly different.
  3910. One negates the set of matched endpoints, the other negates
  3911. the whole match: \n \tSelector = \"!has(my_label)\" matches
  3912. packets that are from other Calico-controlled \tendpoints
  3913. that do not have the label \"my_label\". \n \tNotSelector
  3914. = \"has(my_label)\" matches packets that are not from
  3915. Calico-controlled \tendpoints that do have the label \"my_label\".
  3916. \n The effect is that the latter will accept packets from
  3917. non-Calico sources whereas the former is limited to packets
  3918. from Calico-controlled endpoints."
  3919. type: string
  3920. serviceAccounts:
  3921. description: ServiceAccounts is an optional field that restricts
  3922. the rule to only apply to traffic that originates from
  3923. (or terminates at) a pod running as a matching service
  3924. account.
  3925. properties:
  3926. names:
  3927. description: Names is an optional field that restricts
  3928. the rule to only apply to traffic that originates
  3929. from (or terminates at) a pod running as a service
  3930. account whose name is in the list.
  3931. items:
  3932. type: string
  3933. type: array
  3934. selector:
  3935. description: Selector is an optional field that restricts
  3936. the rule to only apply to traffic that originates
  3937. from (or terminates at) a pod running as a service
  3938. account that matches the given label selector. If
  3939. both Names and Selector are specified then they are
  3940. AND'ed.
  3941. type: string
  3942. type: object
  3943. services:
  3944. description: "Services is an optional field that contains
  3945. options for matching Kubernetes Services. If specified,
  3946. only traffic that originates from or terminates at endpoints
  3947. within the selected service(s) will be matched, and only
  3948. to/from each endpoint's port. \n Services cannot be specified
  3949. on the same rule as Selector, NotSelector, NamespaceSelector,
  3950. Nets, NotNets or ServiceAccounts. \n Ports and NotPorts
  3951. can only be specified with Services on ingress rules."
  3952. properties:
  3953. name:
  3954. description: Name specifies the name of a Kubernetes
  3955. Service to match.
  3956. type: string
  3957. namespace:
  3958. description: Namespace specifies the namespace of the
  3959. given Service. If left empty, the rule will match
  3960. within this policy's namespace.
  3961. type: string
  3962. type: object
  3963. type: object
  3964. required:
  3965. - action
  3966. type: object
  3967. type: array
  3968. ingress:
  3969. description: The ordered set of ingress rules. Each rule contains
  3970. a set of packet match criteria and a corresponding action to apply.
  3971. items:
  3972. description: "A Rule encapsulates a set of match criteria and an
  3973. action. Both selector-based security Policy and security Profiles
  3974. reference rules - separated out as a list of rules for both ingress
  3975. and egress packet matching. \n Each positive match criteria has
  3976. a negated version, prefixed with \"Not\". All the match criteria
  3977. within a rule must be satisfied for a packet to match. A single
  3978. rule can contain the positive and negative version of a match
  3979. and both must be satisfied for the rule to match."
  3980. properties:
  3981. action:
  3982. type: string
  3983. destination:
  3984. description: Destination contains the match criteria that apply
  3985. to destination entity.
  3986. properties:
  3987. namespaceSelector:
  3988. description: "NamespaceSelector is an optional field that
  3989. contains a selector expression. Only traffic that originates
  3990. from (or terminates at) endpoints within the selected
  3991. namespaces will be matched. When both NamespaceSelector
  3992. and another selector are defined on the same rule, then
  3993. only workload endpoints that are matched by both selectors
  3994. will be selected by the rule. \n For NetworkPolicy, an
  3995. empty NamespaceSelector implies that the Selector is limited
  3996. to selecting only workload endpoints in the same namespace
  3997. as the NetworkPolicy. \n For NetworkPolicy, `global()`
  3998. NamespaceSelector implies that the Selector is limited
  3999. to selecting only GlobalNetworkSet or HostEndpoint. \n
  4000. For GlobalNetworkPolicy, an empty NamespaceSelector implies
  4001. the Selector applies to workload endpoints across all
  4002. namespaces."
  4003. type: string
  4004. nets:
  4005. description: Nets is an optional field that restricts the
  4006. rule to only apply to traffic that originates from (or
  4007. terminates at) IP addresses in any of the given subnets.
  4008. items:
  4009. type: string
  4010. type: array
  4011. notNets:
  4012. description: NotNets is the negated version of the Nets
  4013. field.
  4014. items:
  4015. type: string
  4016. type: array
  4017. notPorts:
  4018. description: NotPorts is the negated version of the Ports
  4019. field. Since only some protocols have ports, if any ports
  4020. are specified it requires the Protocol match in the Rule
  4021. to be set to "TCP" or "UDP".
  4022. items:
  4023. anyOf:
  4024. - type: integer
  4025. - type: string
  4026. pattern: ^.*
  4027. x-kubernetes-int-or-string: true
  4028. type: array
  4029. notSelector:
  4030. description: NotSelector is the negated version of the Selector
  4031. field. See Selector field for subtleties with negated
  4032. selectors.
  4033. type: string
  4034. ports:
  4035. description: "Ports is an optional field that restricts
  4036. the rule to only apply to traffic that has a source (destination)
  4037. port that matches one of these ranges/values. This value
  4038. is a list of integers or strings that represent ranges
  4039. of ports. \n Since only some protocols have ports, if
  4040. any ports are specified it requires the Protocol match
  4041. in the Rule to be set to \"TCP\" or \"UDP\"."
  4042. items:
  4043. anyOf:
  4044. - type: integer
  4045. - type: string
  4046. pattern: ^.*
  4047. x-kubernetes-int-or-string: true
  4048. type: array
  4049. selector:
  4050. description: "Selector is an optional field that contains
  4051. a selector expression (see Policy for sample syntax).
  4052. \ Only traffic that originates from (terminates at) endpoints
  4053. matching the selector will be matched. \n Note that: in
  4054. addition to the negated version of the Selector (see NotSelector
  4055. below), the selector expression syntax itself supports
  4056. negation. The two types of negation are subtly different.
  4057. One negates the set of matched endpoints, the other negates
  4058. the whole match: \n \tSelector = \"!has(my_label)\" matches
  4059. packets that are from other Calico-controlled \tendpoints
  4060. that do not have the label \"my_label\". \n \tNotSelector
  4061. = \"has(my_label)\" matches packets that are not from
  4062. Calico-controlled \tendpoints that do have the label \"my_label\".
  4063. \n The effect is that the latter will accept packets from
  4064. non-Calico sources whereas the former is limited to packets
  4065. from Calico-controlled endpoints."
  4066. type: string
  4067. serviceAccounts:
  4068. description: ServiceAccounts is an optional field that restricts
  4069. the rule to only apply to traffic that originates from
  4070. (or terminates at) a pod running as a matching service
  4071. account.
  4072. properties:
  4073. names:
  4074. description: Names is an optional field that restricts
  4075. the rule to only apply to traffic that originates
  4076. from (or terminates at) a pod running as a service
  4077. account whose name is in the list.
  4078. items:
  4079. type: string
  4080. type: array
  4081. selector:
  4082. description: Selector is an optional field that restricts
  4083. the rule to only apply to traffic that originates
  4084. from (or terminates at) a pod running as a service
  4085. account that matches the given label selector. If
  4086. both Names and Selector are specified then they are
  4087. AND'ed.
  4088. type: string
  4089. type: object
  4090. services:
  4091. description: "Services is an optional field that contains
  4092. options for matching Kubernetes Services. If specified,
  4093. only traffic that originates from or terminates at endpoints
  4094. within the selected service(s) will be matched, and only
  4095. to/from each endpoint's port. \n Services cannot be specified
  4096. on the same rule as Selector, NotSelector, NamespaceSelector,
  4097. Nets, NotNets or ServiceAccounts. \n Ports and NotPorts
  4098. can only be specified with Services on ingress rules."
  4099. properties:
  4100. name:
  4101. description: Name specifies the name of a Kubernetes
  4102. Service to match.
  4103. type: string
  4104. namespace:
  4105. description: Namespace specifies the namespace of the
  4106. given Service. If left empty, the rule will match
  4107. within this policy's namespace.
  4108. type: string
  4109. type: object
  4110. type: object
  4111. http:
  4112. description: HTTP contains match criteria that apply to HTTP
  4113. requests.
  4114. properties:
  4115. methods:
  4116. description: Methods is an optional field that restricts
  4117. the rule to apply only to HTTP requests that use one of
  4118. the listed HTTP Methods (e.g. GET, PUT, etc.) Multiple
  4119. methods are OR'd together.
  4120. items:
  4121. type: string
  4122. type: array
  4123. paths:
  4124. description: 'Paths is an optional field that restricts
  4125. the rule to apply to HTTP requests that use one of the
  4126. listed HTTP Paths. Multiple paths are OR''d together.
  4127. e.g: - exact: /foo - prefix: /bar NOTE: Each entry may
  4128. ONLY specify either a `exact` or a `prefix` match. The
  4129. validator will check for it.'
  4130. items:
  4131. description: 'HTTPPath specifies an HTTP path to match.
  4132. It may be either of the form: exact: <path>: which matches
  4133. the path exactly or prefix: <path-prefix>: which matches
  4134. the path prefix'
  4135. properties:
  4136. exact:
  4137. type: string
  4138. prefix:
  4139. type: string
  4140. type: object
  4141. type: array
  4142. type: object
  4143. icmp:
  4144. description: ICMP is an optional field that restricts the rule
  4145. to apply to a specific type and code of ICMP traffic. This
  4146. should only be specified if the Protocol field is set to "ICMP"
  4147. or "ICMPv6".
  4148. properties:
  4149. code:
  4150. description: Match on a specific ICMP code. If specified,
  4151. the Type value must also be specified. This is a technical
  4152. limitation imposed by the kernel's iptables firewall,
  4153. which Calico uses to enforce the rule.
  4154. type: integer
  4155. type:
  4156. description: Match on a specific ICMP type. For example
  4157. a value of 8 refers to ICMP Echo Request (i.e. pings).
  4158. type: integer
  4159. type: object
  4160. ipVersion:
  4161. description: IPVersion is an optional field that restricts the
  4162. rule to only match a specific IP version.
  4163. type: integer
  4164. metadata:
  4165. description: Metadata contains additional information for this
  4166. rule
  4167. properties:
  4168. annotations:
  4169. additionalProperties:
  4170. type: string
  4171. description: Annotations is a set of key value pairs that
  4172. give extra information about the rule
  4173. type: object
  4174. type: object
  4175. notICMP:
  4176. description: NotICMP is the negated version of the ICMP field.
  4177. properties:
  4178. code:
  4179. description: Match on a specific ICMP code. If specified,
  4180. the Type value must also be specified. This is a technical
  4181. limitation imposed by the kernel's iptables firewall,
  4182. which Calico uses to enforce the rule.
  4183. type: integer
  4184. type:
  4185. description: Match on a specific ICMP type. For example
  4186. a value of 8 refers to ICMP Echo Request (i.e. pings).
  4187. type: integer
  4188. type: object
  4189. notProtocol:
  4190. anyOf:
  4191. - type: integer
  4192. - type: string
  4193. description: NotProtocol is the negated version of the Protocol
  4194. field.
  4195. pattern: ^.*
  4196. x-kubernetes-int-or-string: true
  4197. protocol:
  4198. anyOf:
  4199. - type: integer
  4200. - type: string
  4201. description: "Protocol is an optional field that restricts the
  4202. rule to only apply to traffic of a specific IP protocol. Required
  4203. if any of the EntityRules contain Ports (because ports only
  4204. apply to certain protocols). \n Must be one of these string
  4205. values: \"TCP\", \"UDP\", \"ICMP\", \"ICMPv6\", \"SCTP\",
  4206. \"UDPLite\" or an integer in the range 1-255."
  4207. pattern: ^.*
  4208. x-kubernetes-int-or-string: true
  4209. source:
  4210. description: Source contains the match criteria that apply to
  4211. source entity.
  4212. properties:
  4213. namespaceSelector:
  4214. description: "NamespaceSelector is an optional field that
  4215. contains a selector expression. Only traffic that originates
  4216. from (or terminates at) endpoints within the selected
  4217. namespaces will be matched. When both NamespaceSelector
  4218. and another selector are defined on the same rule, then
  4219. only workload endpoints that are matched by both selectors
  4220. will be selected by the rule. \n For NetworkPolicy, an
  4221. empty NamespaceSelector implies that the Selector is limited
  4222. to selecting only workload endpoints in the same namespace
  4223. as the NetworkPolicy. \n For NetworkPolicy, `global()`
  4224. NamespaceSelector implies that the Selector is limited
  4225. to selecting only GlobalNetworkSet or HostEndpoint. \n
  4226. For GlobalNetworkPolicy, an empty NamespaceSelector implies
  4227. the Selector applies to workload endpoints across all
  4228. namespaces."
  4229. type: string
  4230. nets:
  4231. description: Nets is an optional field that restricts the
  4232. rule to only apply to traffic that originates from (or
  4233. terminates at) IP addresses in any of the given subnets.
  4234. items:
  4235. type: string
  4236. type: array
  4237. notNets:
  4238. description: NotNets is the negated version of the Nets
  4239. field.
  4240. items:
  4241. type: string
  4242. type: array
  4243. notPorts:
  4244. description: NotPorts is the negated version of the Ports
  4245. field. Since only some protocols have ports, if any ports
  4246. are specified it requires the Protocol match in the Rule
  4247. to be set to "TCP" or "UDP".
  4248. items:
  4249. anyOf:
  4250. - type: integer
  4251. - type: string
  4252. pattern: ^.*
  4253. x-kubernetes-int-or-string: true
  4254. type: array
  4255. notSelector:
  4256. description: NotSelector is the negated version of the Selector
  4257. field. See Selector field for subtleties with negated
  4258. selectors.
  4259. type: string
  4260. ports:
  4261. description: "Ports is an optional field that restricts
  4262. the rule to only apply to traffic that has a source (destination)
  4263. port that matches one of these ranges/values. This value
  4264. is a list of integers or strings that represent ranges
  4265. of ports. \n Since only some protocols have ports, if
  4266. any ports are specified it requires the Protocol match
  4267. in the Rule to be set to \"TCP\" or \"UDP\"."
  4268. items:
  4269. anyOf:
  4270. - type: integer
  4271. - type: string
  4272. pattern: ^.*
  4273. x-kubernetes-int-or-string: true
  4274. type: array
  4275. selector:
  4276. description: "Selector is an optional field that contains
  4277. a selector expression (see Policy for sample syntax).
  4278. \ Only traffic that originates from (terminates at) endpoints
  4279. matching the selector will be matched. \n Note that: in
  4280. addition to the negated version of the Selector (see NotSelector
  4281. below), the selector expression syntax itself supports
  4282. negation. The two types of negation are subtly different.
  4283. One negates the set of matched endpoints, the other negates
  4284. the whole match: \n \tSelector = \"!has(my_label)\" matches
  4285. packets that are from other Calico-controlled \tendpoints
  4286. that do not have the label \"my_label\". \n \tNotSelector
  4287. = \"has(my_label)\" matches packets that are not from
  4288. Calico-controlled \tendpoints that do have the label \"my_label\".
  4289. \n The effect is that the latter will accept packets from
  4290. non-Calico sources whereas the former is limited to packets
  4291. from Calico-controlled endpoints."
  4292. type: string
  4293. serviceAccounts:
  4294. description: ServiceAccounts is an optional field that restricts
  4295. the rule to only apply to traffic that originates from
  4296. (or terminates at) a pod running as a matching service
  4297. account.
  4298. properties:
  4299. names:
  4300. description: Names is an optional field that restricts
  4301. the rule to only apply to traffic that originates
  4302. from (or terminates at) a pod running as a service
  4303. account whose name is in the list.
  4304. items:
  4305. type: string
  4306. type: array
  4307. selector:
  4308. description: Selector is an optional field that restricts
  4309. the rule to only apply to traffic that originates
  4310. from (or terminates at) a pod running as a service
  4311. account that matches the given label selector. If
  4312. both Names and Selector are specified then they are
  4313. AND'ed.
  4314. type: string
  4315. type: object
  4316. services:
  4317. description: "Services is an optional field that contains
  4318. options for matching Kubernetes Services. If specified,
  4319. only traffic that originates from or terminates at endpoints
  4320. within the selected service(s) will be matched, and only
  4321. to/from each endpoint's port. \n Services cannot be specified
  4322. on the same rule as Selector, NotSelector, NamespaceSelector,
  4323. Nets, NotNets or ServiceAccounts. \n Ports and NotPorts
  4324. can only be specified with Services on ingress rules."
  4325. properties:
  4326. name:
  4327. description: Name specifies the name of a Kubernetes
  4328. Service to match.
  4329. type: string
  4330. namespace:
  4331. description: Namespace specifies the namespace of the
  4332. given Service. If left empty, the rule will match
  4333. within this policy's namespace.
  4334. type: string
  4335. type: object
  4336. type: object
  4337. required:
  4338. - action
  4339. type: object
  4340. type: array
  4341. order:
  4342. description: Order is an optional field that specifies the order in
  4343. which the policy is applied. Policies with higher "order" are applied
  4344. after those with lower order. If the order is omitted, it may be
  4345. considered to be "infinite" - i.e. the policy will be applied last. Policies
  4346. with identical order will be applied in alphanumerical order based
  4347. on the Policy "Name".
  4348. type: number
  4349. performanceHints:
  4350. description: "PerformanceHints contains a list of hints to Calico's
  4351. policy engine to help process the policy more efficiently. Hints
  4352. never change the enforcement behaviour of the policy. \n Currently,
  4353. the only available hint is \"AssumeNeededOnEveryNode\". When that
  4354. hint is set on a policy, Felix will act as if the policy matches
  4355. a local endpoint even if it does not. This is useful for \"preloading\"
  4356. any large static policies that are known to be used on every node.
  4357. If the policy is _not_ used on a particular node then the work done
  4358. to preload the policy (and to maintain it) is wasted."
  4359. items:
  4360. type: string
  4361. type: array
  4362. selector:
  4363. description: "The selector is an expression used to pick pick out
  4364. the endpoints that the policy should be applied to. \n Selector
  4365. expressions follow this syntax: \n \tlabel == \"string_literal\"
  4366. \ -> comparison, e.g. my_label == \"foo bar\" \tlabel != \"string_literal\"
  4367. \ -> not equal; also matches if label is not present \tlabel in
  4368. { \"a\", \"b\", \"c\", ... } -> true if the value of label X is
  4369. one of \"a\", \"b\", \"c\" \tlabel not in { \"a\", \"b\", \"c\",
  4370. ... } -> true if the value of label X is not one of \"a\", \"b\",
  4371. \"c\" \thas(label_name) -> True if that label is present \t! expr
  4372. -> negation of expr \texpr && expr -> Short-circuit and \texpr
  4373. || expr -> Short-circuit or \t( expr ) -> parens for grouping \tall()
  4374. or the empty selector -> matches all endpoints. \n Label names are
  4375. allowed to contain alphanumerics, -, _ and /. String literals are
  4376. more permissive but they do not support escape characters. \n Examples
  4377. (with made-up labels): \n \ttype == \"webserver\" && deployment
  4378. == \"prod\" \ttype in {\"frontend\", \"backend\"} \tdeployment !=
  4379. \"dev\" \t! has(label_name)"
  4380. type: string
  4381. serviceAccountSelector:
  4382. description: ServiceAccountSelector is an optional field for an expression
  4383. used to select a pod based on service accounts.
  4384. type: string
  4385. types:
  4386. description: "Types indicates whether this policy applies to ingress,
  4387. or to egress, or to both. When not explicitly specified (and so
  4388. the value on creation is empty or nil), Calico defaults Types according
  4389. to what Ingress and Egress are present in the policy. The default
  4390. is: \n - [ PolicyTypeIngress ], if there are no Egress rules (including
  4391. the case where there are also no Ingress rules) \n - [ PolicyTypeEgress
  4392. ], if there are Egress rules but no Ingress rules \n - [ PolicyTypeIngress,
  4393. PolicyTypeEgress ], if there are both Ingress and Egress rules.
  4394. \n When the policy is read back again, Types will always be one
  4395. of these values, never empty or nil."
  4396. items:
  4397. description: PolicyType enumerates the possible values of the PolicySpec
  4398. Types field.
  4399. type: string
  4400. type: array
  4401. type: object
  4402. type: object
  4403. served: true
  4404. storage: true
  4405. status:
  4406. acceptedNames:
  4407. kind: ""
  4408. plural: ""
  4409. conditions: []
  4410. storedVersions: []
  4411. ---
  4412. # Source: calico/templates/kdd-crds.yaml
  4413. apiVersion: apiextensions.k8s.io/v1
  4414. kind: CustomResourceDefinition
  4415. metadata:
  4416. name: networksets.crd.projectcalico.org
  4417. spec:
  4418. group: crd.projectcalico.org
  4419. names:
  4420. kind: NetworkSet
  4421. listKind: NetworkSetList
  4422. plural: networksets
  4423. singular: networkset
  4424. preserveUnknownFields: false
  4425. scope: Namespaced
  4426. versions:
  4427. - name: v1
  4428. schema:
  4429. openAPIV3Schema:
  4430. description: NetworkSet is the Namespaced-equivalent of the GlobalNetworkSet.
  4431. properties:
  4432. apiVersion:
  4433. description: 'APIVersion defines the versioned schema of this representation
  4434. of an object. Servers should convert recognized schemas to the latest
  4435. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  4436. type: string
  4437. kind:
  4438. description: 'Kind is a string value representing the REST resource this
  4439. object represents. Servers may infer this from the endpoint the client
  4440. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  4441. type: string
  4442. metadata:
  4443. type: object
  4444. spec:
  4445. description: NetworkSetSpec contains the specification for a NetworkSet
  4446. resource.
  4447. properties:
  4448. nets:
  4449. description: The list of IP networks that belong to this set.
  4450. items:
  4451. type: string
  4452. type: array
  4453. type: object
  4454. type: object
  4455. served: true
  4456. storage: true
  4457. status:
  4458. acceptedNames:
  4459. kind: ""
  4460. plural: ""
  4461. conditions: []
  4462. storedVersions: []
  4463. ---
  4464. # Source: calico/templates/calico-kube-controllers-rbac.yaml
  4465. # Include a clusterrole for the kube-controllers component,
  4466. # and bind it to the calico-kube-controllers serviceaccount.
  4467. kind: ClusterRole
  4468. apiVersion: rbac.authorization.k8s.io/v1
  4469. metadata:
  4470. name: calico-kube-controllers
  4471. rules:
  4472. # Nodes are watched to monitor for deletions.
  4473. - apiGroups: [""]
  4474. resources:
  4475. - nodes
  4476. verbs:
  4477. - watch
  4478. - list
  4479. - get
  4480. # Pods are watched to check for existence as part of IPAM controller.
  4481. - apiGroups: [""]
  4482. resources:
  4483. - pods
  4484. verbs:
  4485. - get
  4486. - list
  4487. - watch
  4488. # IPAM resources are manipulated in response to node and block updates, as well as periodic triggers.
  4489. - apiGroups: ["crd.projectcalico.org"]
  4490. resources:
  4491. - ipreservations
  4492. verbs:
  4493. - list
  4494. - apiGroups: ["crd.projectcalico.org"]
  4495. resources:
  4496. - blockaffinities
  4497. - ipamblocks
  4498. - ipamhandles
  4499. verbs:
  4500. - get
  4501. - list
  4502. - create
  4503. - update
  4504. - delete
  4505. - watch
  4506. # Pools are watched to maintain a mapping of blocks to IP pools.
  4507. - apiGroups: ["crd.projectcalico.org"]
  4508. resources:
  4509. - ippools
  4510. verbs:
  4511. - list
  4512. - watch
  4513. # kube-controllers manages hostendpoints.
  4514. - apiGroups: ["crd.projectcalico.org"]
  4515. resources:
  4516. - hostendpoints
  4517. verbs:
  4518. - get
  4519. - list
  4520. - create
  4521. - update
  4522. - delete
  4523. # Needs access to update clusterinformations.
  4524. - apiGroups: ["crd.projectcalico.org"]
  4525. resources:
  4526. - clusterinformations
  4527. verbs:
  4528. - get
  4529. - list
  4530. - create
  4531. - update
  4532. - watch
  4533. # KubeControllersConfiguration is where it gets its config
  4534. - apiGroups: ["crd.projectcalico.org"]
  4535. resources:
  4536. - kubecontrollersconfigurations
  4537. verbs:
  4538. # read its own config
  4539. - get
  4540. # create a default if none exists
  4541. - create
  4542. # update status
  4543. - update
  4544. # watch for changes
  4545. - watch
  4546. ---
  4547. # Source: calico/templates/calico-node-rbac.yaml
  4548. # Include a clusterrole for the calico-node DaemonSet,
  4549. # and bind it to the calico-node serviceaccount.
  4550. kind: ClusterRole
  4551. apiVersion: rbac.authorization.k8s.io/v1
  4552. metadata:
  4553. name: calico-node
  4554. rules:
  4555. # Used for creating service account tokens to be used by the CNI plugin
  4556. - apiGroups: [""]
  4557. resources:
  4558. - serviceaccounts/token
  4559. resourceNames:
  4560. - calico-cni-plugin
  4561. verbs:
  4562. - create
  4563. # The CNI plugin needs to get pods, nodes, and namespaces.
  4564. - apiGroups: [""]
  4565. resources:
  4566. - pods
  4567. - nodes
  4568. - namespaces
  4569. verbs:
  4570. - get
  4571. # EndpointSlices are used for Service-based network policy rule
  4572. # enforcement.
  4573. - apiGroups: ["discovery.k8s.io"]
  4574. resources:
  4575. - endpointslices
  4576. verbs:
  4577. - watch
  4578. - list
  4579. - apiGroups: [""]
  4580. resources:
  4581. - endpoints
  4582. - services
  4583. verbs:
  4584. # Used to discover service IPs for advertisement.
  4585. - watch
  4586. - list
  4587. # Used to discover Typhas.
  4588. - get
  4589. # Pod CIDR auto-detection on kubeadm needs access to config maps.
  4590. - apiGroups: [""]
  4591. resources:
  4592. - configmaps
  4593. verbs:
  4594. - get
  4595. - apiGroups: [""]
  4596. resources:
  4597. - nodes/status
  4598. verbs:
  4599. # Needed for clearing NodeNetworkUnavailable flag.
  4600. - patch
  4601. # Calico stores some configuration information in node annotations.
  4602. - update
  4603. # Watch for changes to Kubernetes NetworkPolicies.
  4604. - apiGroups: ["networking.k8s.io"]
  4605. resources:
  4606. - networkpolicies
  4607. verbs:
  4608. - watch
  4609. - list
  4610. # Used by Calico for policy information.
  4611. - apiGroups: [""]
  4612. resources:
  4613. - pods
  4614. - namespaces
  4615. - serviceaccounts
  4616. verbs:
  4617. - list
  4618. - watch
  4619. # The CNI plugin patches pods/status.
  4620. - apiGroups: [""]
  4621. resources:
  4622. - pods/status
  4623. verbs:
  4624. - patch
  4625. # Calico monitors various CRDs for config.
  4626. - apiGroups: ["crd.projectcalico.org"]
  4627. resources:
  4628. - globalfelixconfigs
  4629. - felixconfigurations
  4630. - bgppeers
  4631. - bgpfilters
  4632. - globalbgpconfigs
  4633. - bgpconfigurations
  4634. - ippools
  4635. - ipreservations
  4636. - ipamblocks
  4637. - globalnetworkpolicies
  4638. - globalnetworksets
  4639. - networkpolicies
  4640. - networksets
  4641. - clusterinformations
  4642. - hostendpoints
  4643. - blockaffinities
  4644. - caliconodestatuses
  4645. verbs:
  4646. - get
  4647. - list
  4648. - watch
  4649. # Calico must create and update some CRDs on startup.
  4650. - apiGroups: ["crd.projectcalico.org"]
  4651. resources:
  4652. - ippools
  4653. - felixconfigurations
  4654. - clusterinformations
  4655. verbs:
  4656. - create
  4657. - update
  4658. # Calico must update some CRDs.
  4659. - apiGroups: [ "crd.projectcalico.org" ]
  4660. resources:
  4661. - caliconodestatuses
  4662. verbs:
  4663. - update
  4664. # Calico stores some configuration information on the node.
  4665. - apiGroups: [""]
  4666. resources:
  4667. - nodes
  4668. verbs:
  4669. - get
  4670. - list
  4671. - watch
  4672. # These permissions are only required for upgrade from v2.6, and can
  4673. # be removed after upgrade or on fresh installations.
  4674. - apiGroups: ["crd.projectcalico.org"]
  4675. resources:
  4676. - bgpconfigurations
  4677. - bgppeers
  4678. verbs:
  4679. - create
  4680. - update
  4681. # These permissions are required for Calico CNI to perform IPAM allocations.
  4682. - apiGroups: ["crd.projectcalico.org"]
  4683. resources:
  4684. - blockaffinities
  4685. - ipamblocks
  4686. - ipamhandles
  4687. verbs:
  4688. - get
  4689. - list
  4690. - create
  4691. - update
  4692. - delete
  4693. # The CNI plugin and calico/node need to be able to create a default
  4694. # IPAMConfiguration
  4695. - apiGroups: ["crd.projectcalico.org"]
  4696. resources:
  4697. - ipamconfigs
  4698. verbs:
  4699. - get
  4700. - create
  4701. # Block affinities must also be watchable by confd for route aggregation.
  4702. - apiGroups: ["crd.projectcalico.org"]
  4703. resources:
  4704. - blockaffinities
  4705. verbs:
  4706. - watch
  4707. # The Calico IPAM migration needs to get daemonsets. These permissions can be
  4708. # removed if not upgrading from an installation using host-local IPAM.
  4709. - apiGroups: ["apps"]
  4710. resources:
  4711. - daemonsets
  4712. verbs:
  4713. - get
  4714. ---
  4715. # Source: calico/templates/calico-node-rbac.yaml
  4716. # CNI cluster role
  4717. kind: ClusterRole
  4718. apiVersion: rbac.authorization.k8s.io/v1
  4719. metadata:
  4720. name: calico-cni-plugin
  4721. rules:
  4722. - apiGroups: [""]
  4723. resources:
  4724. - pods
  4725. - nodes
  4726. - namespaces
  4727. verbs:
  4728. - get
  4729. - apiGroups: [""]
  4730. resources:
  4731. - pods/status
  4732. verbs:
  4733. - patch
  4734. - apiGroups: ["crd.projectcalico.org"]
  4735. resources:
  4736. - blockaffinities
  4737. - ipamblocks
  4738. - ipamhandles
  4739. - clusterinformations
  4740. - ippools
  4741. - ipreservations
  4742. - ipamconfigs
  4743. verbs:
  4744. - get
  4745. - list
  4746. - create
  4747. - update
  4748. - delete
  4749. ---
  4750. # Source: calico/templates/calico-kube-controllers-rbac.yaml
  4751. kind: ClusterRoleBinding
  4752. apiVersion: rbac.authorization.k8s.io/v1
  4753. metadata:
  4754. name: calico-kube-controllers
  4755. roleRef:
  4756. apiGroup: rbac.authorization.k8s.io
  4757. kind: ClusterRole
  4758. name: calico-kube-controllers
  4759. subjects:
  4760. - kind: ServiceAccount
  4761. name: calico-kube-controllers
  4762. namespace: kube-system
  4763. ---
  4764. # Source: calico/templates/calico-node-rbac.yaml
  4765. apiVersion: rbac.authorization.k8s.io/v1
  4766. kind: ClusterRoleBinding
  4767. metadata:
  4768. name: calico-node
  4769. roleRef:
  4770. apiGroup: rbac.authorization.k8s.io
  4771. kind: ClusterRole
  4772. name: calico-node
  4773. subjects:
  4774. - kind: ServiceAccount
  4775. name: calico-node
  4776. namespace: kube-system
  4777. ---
  4778. # Source: calico/templates/calico-node-rbac.yaml
  4779. apiVersion: rbac.authorization.k8s.io/v1
  4780. kind: ClusterRoleBinding
  4781. metadata:
  4782. name: calico-cni-plugin
  4783. roleRef:
  4784. apiGroup: rbac.authorization.k8s.io
  4785. kind: ClusterRole
  4786. name: calico-cni-plugin
  4787. subjects:
  4788. - kind: ServiceAccount
  4789. name: calico-cni-plugin
  4790. namespace: kube-system
  4791. ---
  4792. # Source: calico/templates/calico-node.yaml
  4793. # This manifest installs the calico-node container, as well
  4794. # as the CNI plugins and network config on
  4795. # each master and worker node in a Kubernetes cluster.
  4796. kind: DaemonSet
  4797. apiVersion: apps/v1
  4798. metadata:
  4799. name: calico-node
  4800. namespace: kube-system
  4801. labels:
  4802. k8s-app: calico-node
  4803. spec:
  4804. selector:
  4805. matchLabels:
  4806. k8s-app: calico-node
  4807. updateStrategy:
  4808. type: RollingUpdate
  4809. rollingUpdate:
  4810. maxUnavailable: 1
  4811. template:
  4812. metadata:
  4813. labels:
  4814. k8s-app: calico-node
  4815. spec:
  4816. nodeSelector:
  4817. kubernetes.io/os: linux
  4818. hostNetwork: true
  4819. tolerations:
  4820. # Make sure calico-node gets scheduled on all nodes.
  4821. - effect: NoSchedule
  4822. operator: Exists
  4823. # Mark the pod as a critical add-on for rescheduling.
  4824. - key: CriticalAddonsOnly
  4825. operator: Exists
  4826. - effect: NoExecute
  4827. operator: Exists
  4828. serviceAccountName: calico-node
  4829. # Minimize downtime during a rolling upgrade or deletion; tell Kubernetes to do a "force
  4830. # deletion": https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods.
  4831. terminationGracePeriodSeconds: 0
  4832. priorityClassName: system-node-critical
  4833. initContainers:
  4834. # This container performs upgrade from host-local IPAM to calico-ipam.
  4835. # It can be deleted if this is a fresh installation, or if you have already
  4836. # upgraded to use calico-ipam.
  4837. - name: upgrade-ipam
  4838. image: {{ image_repository }}/calico-cni:v3.27.5
  4839. imagePullPolicy: IfNotPresent
  4840. command: ["/opt/cni/bin/calico-ipam", "-upgrade"]
  4841. envFrom:
  4842. - configMapRef:
  4843. # Allow KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT to be overridden for eBPF mode.
  4844. name: kubernetes-services-endpoint
  4845. optional: true
  4846. env:
  4847. - name: KUBERNETES_NODE_NAME
  4848. valueFrom:
  4849. fieldRef:
  4850. fieldPath: spec.nodeName
  4851. - name: CALICO_NETWORKING_BACKEND
  4852. valueFrom:
  4853. configMapKeyRef:
  4854. name: calico-config
  4855. key: calico_backend
  4856. volumeMounts:
  4857. - mountPath: /var/lib/cni/networks
  4858. name: host-local-net-dir
  4859. - mountPath: /host/opt/cni/bin
  4860. name: cni-bin-dir
  4861. securityContext:
  4862. privileged: true
  4863. # This container installs the CNI binaries
  4864. # and CNI network config file on each node.
  4865. - name: install-cni
  4866. image: {{ image_repository }}/calico-cni:v3.27.5
  4867. imagePullPolicy: IfNotPresent
  4868. command: ["/opt/cni/bin/install"]
  4869. envFrom:
  4870. - configMapRef:
  4871. # Allow KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT to be overridden for eBPF mode.
  4872. name: kubernetes-services-endpoint
  4873. optional: true
  4874. env:
  4875. # Name of the CNI config file to create.
  4876. - name: CNI_CONF_NAME
  4877. value: "10-calico.conflist"
  4878. # The CNI network config to install on each node.
  4879. - name: CNI_NETWORK_CONFIG
  4880. valueFrom:
  4881. configMapKeyRef:
  4882. name: calico-config
  4883. key: cni_network_config
  4884. # Set the hostname based on the k8s node name.
  4885. - name: KUBERNETES_NODE_NAME
  4886. valueFrom:
  4887. fieldRef:
  4888. fieldPath: spec.nodeName
  4889. # CNI MTU Config variable
  4890. - name: CNI_MTU
  4891. valueFrom:
  4892. configMapKeyRef:
  4893. name: calico-config
  4894. key: veth_mtu
  4895. # Prevents the container from sleeping forever.
  4896. - name: SLEEP
  4897. value: "false"
  4898. volumeMounts:
  4899. - mountPath: /host/opt/cni/bin
  4900. name: cni-bin-dir
  4901. - mountPath: /host/etc/cni/net.d
  4902. name: cni-net-dir
  4903. securityContext:
  4904. privileged: true
  4905. # This init container mounts the necessary filesystems needed by the BPF data plane
  4906. # i.e. bpf at /sys/fs/bpf and cgroup2 at /run/calico/cgroup. Calico-node initialisation is executed
  4907. # in best effort fashion, i.e. no failure for errors, to not disrupt pod creation in iptable mode.
  4908. - name: "mount-bpffs"
  4909. image: {{ image_repository }}/calico-node:v3.27.5
  4910. imagePullPolicy: IfNotPresent
  4911. command: ["calico-node", "-init", "-best-effort"]
  4912. volumeMounts:
  4913. - mountPath: /sys/fs
  4914. name: sys-fs
  4915. # Bidirectional is required to ensure that the new mount we make at /sys/fs/bpf propagates to the host
  4916. # so that it outlives the init container.
  4917. mountPropagation: Bidirectional
  4918. - mountPath: /var/run/calico
  4919. name: var-run-calico
  4920. # Bidirectional is required to ensure that the new mount we make at /run/calico/cgroup propagates to the host
  4921. # so that it outlives the init container.
  4922. mountPropagation: Bidirectional
  4923. # Mount /proc/ from host which usually is an init program at /nodeproc. It's needed by mountns binary,
  4924. # executed by calico-node, to mount root cgroup2 fs at /run/calico/cgroup to attach CTLB programs correctly.
  4925. - mountPath: /nodeproc
  4926. name: nodeproc
  4927. readOnly: true
  4928. securityContext:
  4929. privileged: true
  4930. containers:
  4931. # Runs calico-node container on each Kubernetes node. This
  4932. # container programs network policy and routes on each
  4933. # host.
  4934. - name: calico-node
  4935. image: {{ image_repository }}/calico-node:v3.27.5
  4936. imagePullPolicy: IfNotPresent
  4937. envFrom:
  4938. - configMapRef:
  4939. # Allow KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT to be overridden for eBPF mode.
  4940. name: kubernetes-services-endpoint
  4941. optional: true
  4942. env:
  4943. # Use Kubernetes API as the backing datastore.
  4944. - name: DATASTORE_TYPE
  4945. value: "kubernetes"
  4946. # Wait for the datastore.
  4947. - name: WAIT_FOR_DATASTORE
  4948. value: "true"
  4949. # Set based on the k8s node name.
  4950. - name: NODENAME
  4951. valueFrom:
  4952. fieldRef:
  4953. fieldPath: spec.nodeName
  4954. # Choose the backend to use.
  4955. - name: CALICO_NETWORKING_BACKEND
  4956. valueFrom:
  4957. configMapKeyRef:
  4958. name: calico-config
  4959. key: calico_backend
  4960. # Cluster type to identify the deployment type
  4961. - name: CLUSTER_TYPE
  4962. value: "k8s,vxlan"
  4963. # Auto-detect the BGP IP address.
  4964. {% if ip_type == 'ipv6' %}
  4965. # IPv6 environment: disable IPv4 and enable IPv6
  4966. - name: IP
  4967. value: "none"
  4968. - name: IP6
  4969. value: "autodetect"
  4970. # Use hash-based router ID for IPv6-only environment
  4971. - name: CALICO_ROUTER_ID
  4972. value: "hash"
  4973. # IPIP is not supported in IPv6, disable it
  4974. - name: CALICO_IPV4POOL_IPIP
  4975. value: "Never"
  4976. # Enable or Disable VXLAN on the default IP pool.
  4977. - name: CALICO_IPV4POOL_VXLAN
  4978. value: "Never"
  4979. # Enable or Disable VXLAN on the default IPv6 IP pool.
  4980. - name: CALICO_IPV6POOL_VXLAN
  4981. value: "Always"
  4982. {% elif ip_type == 'dual-stack' %}
  4983. # Dual-stack environment: enable both IPv4 and IPv6
  4984. - name: IP
  4985. value: "autodetect"
  4986. - name: IP6
  4987. value: "autodetect"
  4988. # Use hash-based router ID for dual-stack environment
  4989. - name: CALICO_ROUTER_ID
  4990. value: "hash"
  4991. # VXLAN configuration for dual-stack (both IPv4 and IPv6)
  4992. - name: CALICO_IPV4POOL_IPIP
  4993. value: "{% if enable_ipip is defined and enable_ipip %}Always{% else %}Never{% endif %}"
  4994. - name: CALICO_IPV4POOL_VXLAN
  4995. value: "{% if enable_ipip is defined and enable_ipip %}Never{% else %}Always{% endif %}"
  4996. - name: CALICO_IPV6POOL_VXLAN
  4997. value: "Always"
  4998. {% else %}
  4999. - name: IP
  5000. value: "autodetect"
  5001. # Enable VXLAN for IPv4 (default) or IPIP if enabled
  5002. - name: CALICO_IPV4POOL_IPIP
  5003. value: "{% if enable_ipip is defined and enable_ipip %}Always{% else %}Never{% endif %}"
  5004. # Enable or Disable VXLAN on the default IP pool.
  5005. - name: CALICO_IPV4POOL_VXLAN
  5006. value: "{% if enable_ipip is defined and enable_ipip %}Never{% else %}Always{% endif %}"
  5007. # Enable or Disable VXLAN on the default IPv6 IP pool.
  5008. - name: CALICO_IPV6POOL_VXLAN
  5009. value: "Never"
  5010. {% endif %}
  5011. # Set MTU for tunnel device used if ipip is enabled
  5012. - name: FELIX_IPINIPMTU
  5013. valueFrom:
  5014. configMapKeyRef:
  5015. name: calico-config
  5016. key: veth_mtu
  5017. # Set MTU for the VXLAN tunnel device.
  5018. - name: FELIX_VXLANMTU
  5019. valueFrom:
  5020. configMapKeyRef:
  5021. name: calico-config
  5022. key: veth_mtu
  5023. {% if ip_type == 'ipv6' %}
  5024. # Set MTU for the IPv6 VXLAN tunnel device.
  5025. - name: FELIX_VXLANMTUV6
  5026. value: "1390"
  5027. {% endif %}
  5028. # Set MTU for the Wireguard tunnel device.
  5029. - name: FELIX_WIREGUARDMTU
  5030. valueFrom:
  5031. configMapKeyRef:
  5032. name: calico-config
  5033. key: veth_mtu
  5034. # The default IPv4 pool to create on startup if none exists. Pod IPs will be
  5035. # chosen from this range. Changing this value after installation will have
  5036. # no effect. This should fall within `--cluster-cidr`.
  5037. {% if ip_type == 'ipv6' %}
  5038. # IPv6 environment: disable IPv4 pool and enable IPv6 pool
  5039. - name: CALICO_IPV4POOL_CIDR
  5040. value: ""
  5041. - name: CALICO_IPV6POOL_CIDR
  5042. value: "{{ pod_network_cidr }}"
  5043. - name: CALICO_IPV6POOL_BLOCK_SIZE
  5044. value: "122"
  5045. - name: CALICO_IPV6POOL_NAT_OUTGOING
  5046. value: "true"
  5047. # Set VXLAN mode for IPv6 pool
  5048. - name: CALICO_IPV6POOL_VXLAN_MODE
  5049. value: "Always"
  5050. - name: IP6_AUTODETECTION_METHOD
  5051. value: {{ ip_autodetection_method }}
  5052. {% elif ip_type == 'dual-stack' %}
  5053. # Dual-stack environment: enable both IPv4 and IPv6 pools
  5054. - name: CALICO_IPV4POOL_CIDR
  5055. value: "{{ pod_network_cidr_v4 }}"
  5056. - name: CALICO_IPV4POOL_BLOCK_SIZE
  5057. value: "26"
  5058. - name: CALICO_IPV6POOL_CIDR
  5059. value: "{{ pod_network_cidr }}"
  5060. - name: CALICO_IPV6POOL_BLOCK_SIZE
  5061. value: "122"
  5062. - name: CALICO_IPV6POOL_NAT_OUTGOING
  5063. value: "true"
  5064. # Set VXLAN mode for IPv6 pool
  5065. - name: CALICO_IPV6POOL_VXLAN_MODE
  5066. value: "Always"
  5067. - name: IP_AUTODETECTION_METHOD
  5068. value: "can-reach={{ node_ip_v4 if node_ip_v4 is defined else node_ip }}"
  5069. - name: IP6_AUTODETECTION_METHOD
  5070. value: "can-reach={{ node_ip_v6 if node_ip_v6 is defined else node_ip }}"
  5071. {% else %}
  5072. - name: CALICO_IPV4POOL_CIDR
  5073. value: "{{ pod_network_cidr }}"
  5074. - name: CALICO_IPV4POOL_BLOCK_SIZE
  5075. value: "26"
  5076. - name: IP_AUTODETECTION_METHOD
  5077. value: {{ ip_autodetection_method }}
  5078. {% endif %}
  5079. - name: FELIX_CHAININSERTMODE
  5080. value: "Append"
  5081. # Disable file logging so `kubectl logs` works.
  5082. - name: CALICO_DISABLE_FILE_LOGGING
  5083. value: "true"
  5084. # Set Felix endpoint to host default action to ACCEPT.
  5085. - name: FELIX_DEFAULTENDPOINTTOHOSTACTION
  5086. value: "ACCEPT"
  5087. # Configure IPv6 support based on IP type
  5088. - name: FELIX_IPV6SUPPORT
  5089. value: "{{ 'true' if ip_type == 'ipv6' or ip_type == 'dual-stack' else 'false' }}"
  5090. {% if ip_type == 'ipv6' %}
  5091. # IPv6 specific configurations
  5092. - name: FELIX_IPIPENABLED
  5093. value: "false"
  5094. - name: FELIX_VXLANENABLED
  5095. value: "true"
  5096. # VXLAN configuration for IPv6
  5097. - name: FELIX_VXLANPORT
  5098. value: "4789"
  5099. - name: FELIX_VXLANVNI
  5100. value: "4096"
  5101. # VXLAN interface name
  5102. - name: FELIX_VXLANINTERFACENAME
  5103. value: "vxlan.calico"
  5104. # Disable BGP in VXLAN mode
  5105. - name: FELIX_NODETONODEMESHENABLED
  5106. value: "false"
  5107. # Additional VXLAN optimizations
  5108. - name: FELIX_ALLOWVXLANPACKETSFROMWORKLOADS
  5109. value: "false"
  5110. - name: FELIX_ROUTEREFRESHINTERVAL
  5111. value: "90s"
  5112. - name: FELIX_DEVICEROUTESOURCEADDRESS
  5113. value: "{{ node_ip_v6 if node_ip_v6 is defined else node_ip }}"
  5114. {% elif ip_type == 'dual-stack' %}
  5115. # Dual-stack specific configurations
  5116. - name: FELIX_IPIPENABLED
  5117. value: "{{ 'true' if enable_ipip is defined and enable_ipip else 'false' }}"
  5118. - name: FELIX_VXLANENABLED
  5119. value: "{{ 'false' if enable_ipip is defined and enable_ipip else 'true' }}"
  5120. # VXLAN configuration for dual-stack
  5121. - name: FELIX_VXLANPORT
  5122. value: "4789"
  5123. - name: FELIX_VXLANVNI
  5124. value: "4096"
  5125. # VXLAN interface name
  5126. - name: FELIX_VXLANINTERFACENAME
  5127. value: "vxlan.calico"
  5128. # Disable BGP in VXLAN mode for dual-stack
  5129. - name: FELIX_NODETONODEMESHENABLED
  5130. value: "false"
  5131. # Additional dual-stack optimizations
  5132. - name: FELIX_ALLOWVXLANPACKETSFROMWORKLOADS
  5133. value: "false"
  5134. - name: FELIX_ROUTEREFRESHINTERVAL
  5135. value: "90s"
  5136. - name: FELIX_DEVICEROUTESOURCEADDRESS
  5137. value: "{{ node_ip_v4 if node_ip_v4 is defined else node_ip }}"
  5138. {% else %}
  5139. # IPv4 specific configurations (VXLAN mode by default, IPIP if enabled)
  5140. - name: FELIX_IPIPENABLED
  5141. value: "{{ 'true' if enable_ipip is defined and enable_ipip else 'false' }}"
  5142. - name: FELIX_VXLANENABLED
  5143. value: "{{ 'false' if enable_ipip is defined and enable_ipip else 'true' }}"
  5144. # VXLAN configuration for IPv4
  5145. - name: FELIX_VXLANPORT
  5146. value: "4789"
  5147. - name: FELIX_VXLANVNI
  5148. value: "4096"
  5149. # VXLAN interface name
  5150. - name: FELIX_VXLANINTERFACENAME
  5151. value: "vxlan.calico"
  5152. # Disable BGP in VXLAN mode
  5153. - name: FELIX_NODETONODEMESHENABLED
  5154. value: "false"
  5155. # Additional IPv4 optimizations
  5156. - name: FELIX_ALLOWVXLANPACKETSFROMWORKLOADS
  5157. value: "false"
  5158. - name: FELIX_ROUTEREFRESHINTERVAL
  5159. value: "90s"
  5160. {% endif %}
  5161. - name: FELIX_HEALTHENABLED
  5162. value: "true"
  5163. securityContext:
  5164. privileged: true
  5165. resources:
  5166. requests:
  5167. cpu: 250m
  5168. lifecycle:
  5169. preStop:
  5170. exec:
  5171. command:
  5172. - /bin/calico-node
  5173. - -shutdown
  5174. livenessProbe:
  5175. exec:
  5176. command:
  5177. - /bin/calico-node
  5178. - -felix-live
  5179. {% if ip_type == 'ipv6' %}
  5180. periodSeconds: 10
  5181. initialDelaySeconds: 10
  5182. failureThreshold: 6
  5183. timeoutSeconds: 10
  5184. readinessProbe:
  5185. exec:
  5186. command:
  5187. - /bin/calico-node
  5188. - -felix-ready
  5189. {% else %}
  5190. - -bird-live
  5191. periodSeconds: 10
  5192. initialDelaySeconds: 10
  5193. failureThreshold: 6
  5194. timeoutSeconds: 10
  5195. readinessProbe:
  5196. exec:
  5197. command:
  5198. - /bin/calico-node
  5199. - -felix-ready
  5200. - -bird-ready
  5201. {% endif %}
  5202. periodSeconds: 10
  5203. timeoutSeconds: 10
  5204. volumeMounts:
  5205. # For maintaining CNI plugin API credentials.
  5206. - mountPath: /host/etc/cni/net.d
  5207. name: cni-net-dir
  5208. readOnly: false
  5209. - mountPath: /lib/modules
  5210. name: lib-modules
  5211. readOnly: true
  5212. - mountPath: /run/xtables.lock
  5213. name: xtables-lock
  5214. readOnly: false
  5215. - mountPath: /var/run/calico
  5216. name: var-run-calico
  5217. readOnly: false
  5218. - mountPath: /var/lib/calico
  5219. name: var-lib-calico
  5220. readOnly: false
  5221. - name: policysync
  5222. mountPath: /var/run/nodeagent
  5223. # For eBPF mode, we need to be able to mount the BPF filesystem at /sys/fs/bpf so we mount in the
  5224. # parent directory.
  5225. - name: bpffs
  5226. mountPath: /sys/fs/bpf
  5227. - name: cni-log-dir
  5228. mountPath: /var/log/calico/cni
  5229. readOnly: true
  5230. volumes:
  5231. # Used by calico-node.
  5232. - name: lib-modules
  5233. hostPath:
  5234. path: /lib/modules
  5235. - name: var-run-calico
  5236. hostPath:
  5237. path: /var/run/calico
  5238. type: DirectoryOrCreate
  5239. - name: var-lib-calico
  5240. hostPath:
  5241. path: /var/lib/calico
  5242. type: DirectoryOrCreate
  5243. - name: xtables-lock
  5244. hostPath:
  5245. path: /run/xtables.lock
  5246. type: FileOrCreate
  5247. - name: sys-fs
  5248. hostPath:
  5249. path: /sys/fs/
  5250. type: DirectoryOrCreate
  5251. - name: bpffs
  5252. hostPath:
  5253. path: /sys/fs/bpf
  5254. type: Directory
  5255. # mount /proc at /nodeproc to be used by mount-bpffs initContainer to mount root cgroup2 fs.
  5256. - name: nodeproc
  5257. hostPath:
  5258. path: /proc
  5259. # Used to install CNI.
  5260. - name: cni-bin-dir
  5261. hostPath:
  5262. path: /opt/cni/bin
  5263. type: DirectoryOrCreate
  5264. - name: cni-net-dir
  5265. hostPath:
  5266. path: /etc/cni/net.d
  5267. # Used to access CNI logs.
  5268. - name: cni-log-dir
  5269. hostPath:
  5270. path: /var/log/calico/cni
  5271. # Mount in the directory for host-local IPAM allocations. This is
  5272. # used when upgrading from host-local to calico-ipam, and can be removed
  5273. # if not using the upgrade-ipam init container.
  5274. - name: host-local-net-dir
  5275. hostPath:
  5276. path: /var/lib/cni/networks
  5277. # Used to create per-pod Unix Domain Sockets
  5278. - name: policysync
  5279. hostPath:
  5280. type: DirectoryOrCreate
  5281. path: /var/run/nodeagent
  5282. ---
  5283. # Source: calico/templates/calico-kube-controllers.yaml
  5284. # See https://github.com/projectcalico/kube-controllers
  5285. apiVersion: apps/v1
  5286. kind: Deployment
  5287. metadata:
  5288. name: calico-kube-controllers
  5289. namespace: kube-system
  5290. labels:
  5291. k8s-app: calico-kube-controllers
  5292. spec:
  5293. # The controllers can only have a single active instance.
  5294. replicas: 1
  5295. selector:
  5296. matchLabels:
  5297. k8s-app: calico-kube-controllers
  5298. strategy:
  5299. type: Recreate
  5300. template:
  5301. metadata:
  5302. name: calico-kube-controllers
  5303. namespace: kube-system
  5304. labels:
  5305. k8s-app: calico-kube-controllers
  5306. spec:
  5307. affinity:
  5308. nodeAffinity:
  5309. requiredDuringSchedulingIgnoredDuringExecution:
  5310. nodeSelectorTerms:
  5311. - matchExpressions:
  5312. - key: onecloud.yunion.io/controller
  5313. operator: In
  5314. values:
  5315. - enable
  5316. nodeSelector:
  5317. kubernetes.io/os: linux
  5318. tolerations:
  5319. # Mark the pod as a critical add-on for rescheduling.
  5320. - key: CriticalAddonsOnly
  5321. operator: Exists
  5322. - key: node-role.kubernetes.io/master
  5323. effect: NoSchedule
  5324. - key: node-role.kubernetes.io/control-plane
  5325. effect: NoSchedule
  5326. serviceAccountName: calico-kube-controllers
  5327. priorityClassName: system-cluster-critical
  5328. containers:
  5329. - name: calico-kube-controllers
  5330. image: {{ image_repository }}/calico-kube-controllers:v3.27.5
  5331. imagePullPolicy: IfNotPresent
  5332. env:
  5333. # Choose which controllers to run.
  5334. - name: ENABLED_CONTROLLERS
  5335. value: node
  5336. - name: DATASTORE_TYPE
  5337. value: kubernetes
  5338. livenessProbe:
  5339. exec:
  5340. command:
  5341. - /usr/bin/check-status
  5342. - -l
  5343. periodSeconds: 10
  5344. initialDelaySeconds: 10
  5345. failureThreshold: 6
  5346. timeoutSeconds: 10
  5347. readinessProbe:
  5348. exec:
  5349. command:
  5350. - /usr/bin/check-status
  5351. - -r
  5352. periodSeconds: 10