kube-calico.yaml 197 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091
  1. ---
  2. # Source: calico/templates/calico-config.yaml
  3. # This ConfigMap is used to configure a self-hosted Calico installation.
  4. kind: ConfigMap
  5. apiVersion: v1
  6. metadata:
  7. name: calico-config
  8. namespace: kube-system
  9. data:
  10. # Typha is disabled.
  11. typha_service_name: "none"
  12. # Configure the backend to use.
  13. calico_backend: "bird"
  14. # Configure the MTU to use for workload interfaces and tunnels.
  15. # By default, MTU is auto-detected, and explicitly setting this field should not be required.
  16. # You can override auto-detection by providing a non-zero value.
  17. veth_mtu: "0"
  18. # The CNI network configuration to install on each node. The special
  19. # values in this config will be automatically populated.
  20. cni_network_config: |-
  21. {
  22. "name": "k8s-pod-network",
  23. "cniVersion": "0.3.1",
  24. "plugins": [
  25. {
  26. "type": "calico",
  27. "log_level": "info",
  28. "log_file_path": "/var/log/calico/cni/cni.log",
  29. "datastore_type": "kubernetes",
  30. "nodename": "__KUBERNETES_NODE_NAME__",
  31. "mtu": __CNI_MTU__,
  32. "ipam": {
  33. "type": "calico-ipam"
  34. },
  35. "policy": {
  36. "type": "k8s"
  37. },
  38. "kubernetes": {
  39. "kubeconfig": "__KUBECONFIG_FILEPATH__"
  40. }
  41. },
  42. {
  43. "type": "portmap",
  44. "snat": true,
  45. "capabilities": {"portMappings": true}
  46. },
  47. {
  48. "type": "bandwidth",
  49. "capabilities": {"bandwidth": true}
  50. }
  51. ]
  52. }
  53. ---
  54. # Source: calico/templates/kdd-crds.yaml
  55. apiVersion: apiextensions.k8s.io/v1
  56. kind: CustomResourceDefinition
  57. metadata:
  58. name: bgpconfigurations.crd.projectcalico.org
  59. spec:
  60. group: crd.projectcalico.org
  61. names:
  62. kind: BGPConfiguration
  63. listKind: BGPConfigurationList
  64. plural: bgpconfigurations
  65. singular: bgpconfiguration
  66. scope: Cluster
  67. versions:
  68. - name: v1
  69. schema:
  70. openAPIV3Schema:
  71. description: BGPConfiguration contains the configuration for any BGP routing.
  72. properties:
  73. apiVersion:
  74. description: 'APIVersion defines the versioned schema of this representation
  75. of an object. Servers should convert recognized schemas to the latest
  76. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  77. type: string
  78. kind:
  79. description: 'Kind is a string value representing the REST resource this
  80. object represents. Servers may infer this from the endpoint the client
  81. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  82. type: string
  83. metadata:
  84. type: object
  85. spec:
  86. description: BGPConfigurationSpec contains the values of the BGP configuration.
  87. properties:
  88. asNumber:
  89. description: 'ASNumber is the default AS number used by a node. [Default:
  90. 64512]'
  91. format: int32
  92. type: integer
  93. communities:
  94. description: Communities is a list of BGP community values and their
  95. arbitrary names for tagging routes.
  96. items:
  97. description: Community contains standard or large community value
  98. and its name.
  99. properties:
  100. name:
  101. description: Name given to community value.
  102. type: string
  103. value:
  104. description: Value must be of format `aa:nn` or `aa:nn:mm`.
  105. For standard community use `aa:nn` format, where `aa` and
  106. `nn` are 16 bit number. For large community use `aa:nn:mm`
  107. format, where `aa`, `nn` and `mm` are 32 bit number. Where,
  108. `aa` is an AS Number, `nn` and `mm` are per-AS identifier.
  109. pattern: ^(\d+):(\d+)$|^(\d+):(\d+):(\d+)$
  110. type: string
  111. type: object
  112. type: array
  113. listenPort:
  114. description: ListenPort is the port where BGP protocol should listen.
  115. Defaults to 179
  116. maximum: 65535
  117. minimum: 1
  118. type: integer
  119. logSeverityScreen:
  120. description: 'LogSeverityScreen is the log severity above which logs
  121. are sent to the stdout. [Default: INFO]'
  122. type: string
  123. nodeToNodeMeshEnabled:
  124. description: 'NodeToNodeMeshEnabled sets whether full node to node
  125. BGP mesh is enabled. [Default: true]'
  126. type: boolean
  127. prefixAdvertisements:
  128. description: PrefixAdvertisements contains per-prefix advertisement
  129. configuration.
  130. items:
  131. description: PrefixAdvertisement configures advertisement properties
  132. for the specified CIDR.
  133. properties:
  134. cidr:
  135. description: CIDR for which properties should be advertised.
  136. type: string
  137. communities:
  138. description: Communities can be list of either community names
  139. already defined in `Specs.Communities` or community value
  140. of format `aa:nn` or `aa:nn:mm`. For standard community use
  141. `aa:nn` format, where `aa` and `nn` are 16 bit number. For
  142. large community use `aa:nn:mm` format, where `aa`, `nn` and
  143. `mm` are 32 bit number. Where,`aa` is an AS Number, `nn` and
  144. `mm` are per-AS identifier.
  145. items:
  146. type: string
  147. type: array
  148. type: object
  149. type: array
  150. serviceClusterIPs:
  151. description: ServiceClusterIPs are the CIDR blocks from which service
  152. cluster IPs are allocated. If specified, Calico will advertise these
  153. blocks, as well as any cluster IPs within them.
  154. items:
  155. description: ServiceClusterIPBlock represents a single allowed ClusterIP
  156. CIDR block.
  157. properties:
  158. cidr:
  159. type: string
  160. type: object
  161. type: array
  162. serviceExternalIPs:
  163. description: ServiceExternalIPs are the CIDR blocks for Kubernetes
  164. Service External IPs. Kubernetes Service ExternalIPs will only be
  165. advertised if they are within one of these blocks.
  166. items:
  167. description: ServiceExternalIPBlock represents a single allowed
  168. External IP CIDR block.
  169. properties:
  170. cidr:
  171. type: string
  172. type: object
  173. type: array
  174. serviceLoadBalancerIPs:
  175. description: ServiceLoadBalancerIPs are the CIDR blocks for Kubernetes
  176. Service LoadBalancer IPs. Kubernetes Service status.LoadBalancer.Ingress
  177. IPs will only be advertised if they are within one of these blocks.
  178. items:
  179. description: ServiceLoadBalancerIPBlock represents a single allowed
  180. LoadBalancer IP CIDR block.
  181. properties:
  182. cidr:
  183. type: string
  184. type: object
  185. type: array
  186. type: object
  187. type: object
  188. served: true
  189. storage: true
  190. status:
  191. acceptedNames:
  192. kind: ""
  193. plural: ""
  194. conditions: []
  195. storedVersions: []
  196. ---
  197. apiVersion: apiextensions.k8s.io/v1
  198. kind: CustomResourceDefinition
  199. metadata:
  200. name: bgppeers.crd.projectcalico.org
  201. spec:
  202. group: crd.projectcalico.org
  203. names:
  204. kind: BGPPeer
  205. listKind: BGPPeerList
  206. plural: bgppeers
  207. singular: bgppeer
  208. scope: Cluster
  209. versions:
  210. - name: v1
  211. schema:
  212. openAPIV3Schema:
  213. properties:
  214. apiVersion:
  215. description: 'APIVersion defines the versioned schema of this representation
  216. of an object. Servers should convert recognized schemas to the latest
  217. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  218. type: string
  219. kind:
  220. description: 'Kind is a string value representing the REST resource this
  221. object represents. Servers may infer this from the endpoint the client
  222. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  223. type: string
  224. metadata:
  225. type: object
  226. spec:
  227. description: BGPPeerSpec contains the specification for a BGPPeer resource.
  228. properties:
  229. asNumber:
  230. description: The AS Number of the peer.
  231. format: int32
  232. type: integer
  233. keepOriginalNextHop:
  234. description: Option to keep the original nexthop field when routes
  235. are sent to a BGP Peer. Setting "true" configures the selected BGP
  236. Peers node to use the "next hop keep;" instead of "next hop self;"(default)
  237. in the specific branch of the Node on "bird.cfg".
  238. type: boolean
  239. maxRestartTime:
  240. description: Time to allow for software restart. When specified, this
  241. is configured as the graceful restart timeout. When not specified,
  242. the BIRD default of 120s is used.
  243. type: string
  244. node:
  245. description: The node name identifying the Calico node instance that
  246. is targeted by this peer. If this is not set, and no nodeSelector
  247. is specified, then this BGP peer selects all nodes in the cluster.
  248. type: string
  249. nodeSelector:
  250. description: Selector for the nodes that should have this peering. When
  251. this is set, the Node field must be empty.
  252. type: string
  253. password:
  254. description: Optional BGP password for the peerings generated by this
  255. BGPPeer resource.
  256. properties:
  257. secretKeyRef:
  258. description: Selects a key of a secret in the node pod's namespace.
  259. properties:
  260. key:
  261. description: The key of the secret to select from. Must be
  262. a valid secret key.
  263. type: string
  264. name:
  265. description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  266. TODO: Add other useful fields. apiVersion, kind, uid?'
  267. type: string
  268. optional:
  269. description: Specify whether the Secret or its key must be
  270. defined
  271. type: boolean
  272. required:
  273. - key
  274. type: object
  275. type: object
  276. peerIP:
  277. description: The IP address of the peer followed by an optional port
  278. number to peer with. If port number is given, format should be `[<IPv6>]:port`
  279. or `<IPv4>:<port>` for IPv4. If optional port number is not set,
  280. and this peer IP and ASNumber belongs to a calico/node with ListenPort
  281. set in BGPConfiguration, then we use that port to peer.
  282. type: string
  283. peerSelector:
  284. description: Selector for the remote nodes to peer with. When this
  285. is set, the PeerIP and ASNumber fields must be empty. For each
  286. peering between the local node and selected remote nodes, we configure
  287. an IPv4 peering if both ends have NodeBGPSpec.IPv4Address specified,
  288. and an IPv6 peering if both ends have NodeBGPSpec.IPv6Address specified. The
  289. remote AS number comes from the remote node's NodeBGPSpec.ASNumber,
  290. or the global default if that is not set.
  291. type: string
  292. sourceAddress:
  293. description: Specifies whether and how to configure a source address
  294. for the peerings generated by this BGPPeer resource. Default value
  295. "UseNodeIP" means to configure the node IP as the source address. "None"
  296. means not to configure a source address.
  297. type: string
  298. type: object
  299. type: object
  300. served: true
  301. storage: true
  302. status:
  303. acceptedNames:
  304. kind: ""
  305. plural: ""
  306. conditions: []
  307. storedVersions: []
  308. ---
  309. apiVersion: apiextensions.k8s.io/v1
  310. kind: CustomResourceDefinition
  311. metadata:
  312. name: blockaffinities.crd.projectcalico.org
  313. spec:
  314. group: crd.projectcalico.org
  315. names:
  316. kind: BlockAffinity
  317. listKind: BlockAffinityList
  318. plural: blockaffinities
  319. singular: blockaffinity
  320. scope: Cluster
  321. versions:
  322. - name: v1
  323. schema:
  324. openAPIV3Schema:
  325. properties:
  326. apiVersion:
  327. description: 'APIVersion defines the versioned schema of this representation
  328. of an object. Servers should convert recognized schemas to the latest
  329. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  330. type: string
  331. kind:
  332. description: 'Kind is a string value representing the REST resource this
  333. object represents. Servers may infer this from the endpoint the client
  334. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  335. type: string
  336. metadata:
  337. type: object
  338. spec:
  339. description: BlockAffinitySpec contains the specification for a BlockAffinity
  340. resource.
  341. properties:
  342. cidr:
  343. type: string
  344. deleted:
  345. description: Deleted indicates that this block affinity is being deleted.
  346. This field is a string for compatibility with older releases that
  347. mistakenly treat this field as a string.
  348. type: string
  349. node:
  350. type: string
  351. state:
  352. type: string
  353. required:
  354. - cidr
  355. - deleted
  356. - node
  357. - state
  358. type: object
  359. type: object
  360. served: true
  361. storage: true
  362. status:
  363. acceptedNames:
  364. kind: ""
  365. plural: ""
  366. conditions: []
  367. storedVersions: []
  368. ---
  369. apiVersion: apiextensions.k8s.io/v1
  370. kind: CustomResourceDefinition
  371. metadata:
  372. name: clusterinformations.crd.projectcalico.org
  373. spec:
  374. group: crd.projectcalico.org
  375. names:
  376. kind: ClusterInformation
  377. listKind: ClusterInformationList
  378. plural: clusterinformations
  379. singular: clusterinformation
  380. scope: Cluster
  381. versions:
  382. - name: v1
  383. schema:
  384. openAPIV3Schema:
  385. description: ClusterInformation contains the cluster specific information.
  386. properties:
  387. apiVersion:
  388. description: 'APIVersion defines the versioned schema of this representation
  389. of an object. Servers should convert recognized schemas to the latest
  390. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  391. type: string
  392. kind:
  393. description: 'Kind is a string value representing the REST resource this
  394. object represents. Servers may infer this from the endpoint the client
  395. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  396. type: string
  397. metadata:
  398. type: object
  399. spec:
  400. description: ClusterInformationSpec contains the values of describing
  401. the cluster.
  402. properties:
  403. calicoVersion:
  404. description: CalicoVersion is the version of Calico that the cluster
  405. is running
  406. type: string
  407. clusterGUID:
  408. description: ClusterGUID is the GUID of the cluster
  409. type: string
  410. clusterType:
  411. description: ClusterType describes the type of the cluster
  412. type: string
  413. datastoreReady:
  414. description: DatastoreReady is used during significant datastore migrations
  415. to signal to components such as Felix that it should wait before
  416. accessing the datastore.
  417. type: boolean
  418. variant:
  419. description: Variant declares which variant of Calico should be active.
  420. type: string
  421. type: object
  422. type: object
  423. served: true
  424. storage: true
  425. status:
  426. acceptedNames:
  427. kind: ""
  428. plural: ""
  429. conditions: []
  430. storedVersions: []
  431. ---
  432. apiVersion: apiextensions.k8s.io/v1
  433. kind: CustomResourceDefinition
  434. metadata:
  435. name: felixconfigurations.crd.projectcalico.org
  436. spec:
  437. group: crd.projectcalico.org
  438. names:
  439. kind: FelixConfiguration
  440. listKind: FelixConfigurationList
  441. plural: felixconfigurations
  442. singular: felixconfiguration
  443. scope: Cluster
  444. versions:
  445. - name: v1
  446. schema:
  447. openAPIV3Schema:
  448. description: Felix Configuration contains the configuration for Felix.
  449. properties:
  450. apiVersion:
  451. description: 'APIVersion defines the versioned schema of this representation
  452. of an object. Servers should convert recognized schemas to the latest
  453. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  454. type: string
  455. kind:
  456. description: 'Kind is a string value representing the REST resource this
  457. object represents. Servers may infer this from the endpoint the client
  458. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  459. type: string
  460. metadata:
  461. type: object
  462. spec:
  463. description: FelixConfigurationSpec contains the values of the Felix configuration.
  464. properties:
  465. allowIPIPPacketsFromWorkloads:
  466. description: 'AllowIPIPPacketsFromWorkloads controls whether Felix
  467. will add a rule to drop IPIP encapsulated traffic from workloads
  468. [Default: false]'
  469. type: boolean
  470. allowVXLANPacketsFromWorkloads:
  471. description: 'AllowVXLANPacketsFromWorkloads controls whether Felix
  472. will add a rule to drop VXLAN encapsulated traffic from workloads
  473. [Default: false]'
  474. type: boolean
  475. awsSrcDstCheck:
  476. description: 'Set source-destination-check on AWS EC2 instances. Accepted
  477. value must be one of "DoNothing", "Enabled" or "Disabled". [Default:
  478. DoNothing]'
  479. enum:
  480. - DoNothing
  481. - Enable
  482. - Disable
  483. type: string
  484. bpfConnectTimeLoadBalancingEnabled:
  485. description: 'BPFConnectTimeLoadBalancingEnabled when in BPF mode,
  486. controls whether Felix installs the connection-time load balancer. The
  487. connect-time load balancer is required for the host to be able to
  488. reach Kubernetes services and it improves the performance of pod-to-service
  489. connections. The only reason to disable it is for debugging purposes. [Default:
  490. true]'
  491. type: boolean
  492. bpfDataIfacePattern:
  493. description: BPFDataIfacePattern is a regular expression that controls
  494. which interfaces Felix should attach BPF programs to in order to
  495. catch traffic to/from the network. This needs to match the interfaces
  496. that Calico workload traffic flows over as well as any interfaces
  497. that handle incoming traffic to nodeports and services from outside
  498. the cluster. It should not match the workload interfaces (usually
  499. named cali...).
  500. type: string
  501. bpfDisableUnprivileged:
  502. description: 'BPFDisableUnprivileged, if enabled, Felix sets the kernel.unprivileged_bpf_disabled
  503. sysctl to disable unprivileged use of BPF. This ensures that unprivileged
  504. users cannot access Calico''s BPF maps and cannot insert their own
  505. BPF programs to interfere with Calico''s. [Default: true]'
  506. type: boolean
  507. bpfEnabled:
  508. description: 'BPFEnabled, if enabled Felix will use the BPF dataplane.
  509. [Default: false]'
  510. type: boolean
  511. bpfExternalServiceMode:
  512. description: 'BPFExternalServiceMode in BPF mode, controls how connections
  513. from outside the cluster to services (node ports and cluster IPs)
  514. are forwarded to remote workloads. If set to "Tunnel" then both
  515. request and response traffic is tunneled to the remote node. If
  516. set to "DSR", the request traffic is tunneled but the response traffic
  517. is sent directly from the remote node. In "DSR" mode, the remote
  518. node appears to use the IP of the ingress node; this requires a
  519. permissive L2 network. [Default: Tunnel]'
  520. type: string
  521. bpfExtToServiceConnmark:
  522. description: 'BPFExtToServiceConnmark in BPF mode, controls a
  523. 32bit mark that is set on connections from an external client to
  524. a local service. This mark allows us to control how packets of
  525. that connection are routed within the host and how is routing
  526. intepreted by RPF check. [Default: 0]'
  527. type: integer
  528. bpfKubeProxyEndpointSlicesEnabled:
  529. description: BPFKubeProxyEndpointSlicesEnabled in BPF mode, controls
  530. whether Felix's embedded kube-proxy accepts EndpointSlices or not.
  531. type: boolean
  532. bpfKubeProxyIptablesCleanupEnabled:
  533. description: 'BPFKubeProxyIptablesCleanupEnabled, if enabled in BPF
  534. mode, Felix will proactively clean up the upstream Kubernetes kube-proxy''s
  535. iptables chains. Should only be enabled if kube-proxy is not running. [Default:
  536. true]'
  537. type: boolean
  538. bpfKubeProxyMinSyncPeriod:
  539. description: 'BPFKubeProxyMinSyncPeriod, in BPF mode, controls the
  540. minimum time between updates to the dataplane for Felix''s embedded
  541. kube-proxy. Lower values give reduced set-up latency. Higher values
  542. reduce Felix CPU usage by batching up more work. [Default: 1s]'
  543. type: string
  544. bpfLogLevel:
  545. description: 'BPFLogLevel controls the log level of the BPF programs
  546. when in BPF dataplane mode. One of "Off", "Info", or "Debug". The
  547. logs are emitted to the BPF trace pipe, accessible with the command
  548. `tc exec bpf debug`. [Default: Off].'
  549. type: string
  550. chainInsertMode:
  551. description: 'ChainInsertMode controls whether Felix hooks the kernel''s
  552. top-level iptables chains by inserting a rule at the top of the
  553. chain or by appending a rule at the bottom. insert is the safe default
  554. since it prevents Calico''s rules from being bypassed. If you switch
  555. to append mode, be sure that the other rules in the chains signal
  556. acceptance by falling through to the Calico rules, otherwise the
  557. Calico policy will be bypassed. [Default: insert]'
  558. type: string
  559. dataplaneDriver:
  560. type: string
  561. debugDisableLogDropping:
  562. type: boolean
  563. debugMemoryProfilePath:
  564. type: string
  565. debugSimulateCalcGraphHangAfter:
  566. type: string
  567. debugSimulateDataplaneHangAfter:
  568. type: string
  569. defaultEndpointToHostAction:
  570. description: 'DefaultEndpointToHostAction controls what happens to
  571. traffic that goes from a workload endpoint to the host itself (after
  572. the traffic hits the endpoint egress policy). By default Calico
  573. blocks traffic from workload endpoints to the host itself with an
  574. iptables "DROP" action. If you want to allow some or all traffic
  575. from endpoint to host, set this parameter to RETURN or ACCEPT. Use
  576. RETURN if you have your own rules in the iptables "INPUT" chain;
  577. Calico will insert its rules at the top of that chain, then "RETURN"
  578. packets to the "INPUT" chain once it has completed processing workload
  579. endpoint egress policy. Use ACCEPT to unconditionally accept packets
  580. from workloads after processing workload endpoint egress policy.
  581. [Default: Drop]'
  582. type: string
  583. deviceRouteProtocol:
  584. description: This defines the route protocol added to programmed device
  585. routes, by default this will be RTPROT_BOOT when left blank.
  586. type: integer
  587. deviceRouteSourceAddress:
  588. description: This is the source address to use on programmed device
  589. routes. By default the source address is left blank, leaving the
  590. kernel to choose the source address used.
  591. type: string
  592. disableConntrackInvalidCheck:
  593. type: boolean
  594. endpointReportingDelay:
  595. type: string
  596. endpointReportingEnabled:
  597. type: boolean
  598. externalNodesList:
  599. description: ExternalNodesCIDRList is a list of CIDR's of external-non-calico-nodes
  600. which may source tunnel traffic and have the tunneled traffic be
  601. accepted at calico nodes.
  602. items:
  603. type: string
  604. type: array
  605. failsafeInboundHostPorts:
  606. description: 'FailsafeInboundHostPorts is a list of UDP/TCP ports
  607. and CIDRs that Felix will allow incoming traffic to host endpoints
  608. on irrespective of the security policy. This is useful to avoid
  609. accidentally cutting off a host with incorrect configuration. For
  610. back-compatibility, if the protocol is not specified, it defaults
  611. to "tcp". If a CIDR is not specified, it will allow traffic from
  612. all addresses. To disable all inbound host ports, use the value
  613. none. The default value allows ssh access and DHCP. [Default: tcp:22,
  614. udp:68, tcp:179, tcp:2379, tcp:2380, tcp:6443, tcp:6666, tcp:6667]'
  615. items:
  616. description: ProtoPort is combination of protocol, port, and CIDR.
  617. Protocol and port must be specified.
  618. properties:
  619. net:
  620. type: string
  621. port:
  622. type: integer
  623. protocol:
  624. type: string
  625. required:
  626. - port
  627. - protocol
  628. type: object
  629. type: array
  630. failsafeOutboundHostPorts:
  631. description: 'FailsafeOutboundHostPorts is a list of UDP/TCP ports
  632. and CIDRs that Felix will allow outgoing traffic from host endpoints
  633. to irrespective of the security policy. This is useful to avoid
  634. accidentally cutting off a host with incorrect configuration. For
  635. back-compatibility, if the protocol is not specified, it defaults
  636. to "tcp". If a CIDR is not specified, it will allow traffic from
  637. all addresses. To disable all outbound host ports, use the value
  638. none. The default value opens etcd''s standard ports to ensure that
  639. Felix does not get cut off from etcd as well as allowing DHCP and
  640. DNS. [Default: tcp:179, tcp:2379, tcp:2380, tcp:6443, tcp:6666,
  641. tcp:6667, udp:53, udp:67]'
  642. items:
  643. description: ProtoPort is combination of protocol, port, and CIDR.
  644. Protocol and port must be specified.
  645. properties:
  646. net:
  647. type: string
  648. port:
  649. type: integer
  650. protocol:
  651. type: string
  652. required:
  653. - port
  654. - protocol
  655. type: object
  656. type: array
  657. featureDetectOverride:
  658. description: FeatureDetectOverride is used to override the feature
  659. detection. Values are specified in a comma separated list with no
  660. spaces, example; "SNATFullyRandom=true,MASQFullyRandom=false,RestoreSupportsLock=".
  661. "true" or "false" will force the feature, empty or omitted values
  662. are auto-detected.
  663. type: string
  664. genericXDPEnabled:
  665. description: 'GenericXDPEnabled enables Generic XDP so network cards
  666. that don''t support XDP offload or driver modes can use XDP. This
  667. is not recommended since it doesn''t provide better performance
  668. than iptables. [Default: false]'
  669. type: boolean
  670. healthEnabled:
  671. type: boolean
  672. healthHost:
  673. type: string
  674. healthPort:
  675. type: integer
  676. interfaceExclude:
  677. description: 'InterfaceExclude is a comma-separated list of interfaces
  678. that Felix should exclude when monitoring for host endpoints. The
  679. default value ensures that Felix ignores Kubernetes'' IPVS dummy
  680. interface, which is used internally by kube-proxy. If you want to
  681. exclude multiple interface names using a single value, the list
  682. supports regular expressions. For regular expressions you must wrap
  683. the value with ''/''. For example having values ''/^kube/,veth1''
  684. will exclude all interfaces that begin with ''kube'' and also the
  685. interface ''veth1''. [Default: kube-ipvs0]'
  686. type: string
  687. interfacePrefix:
  688. description: 'InterfacePrefix is the interface name prefix that identifies
  689. workload endpoints and so distinguishes them from host endpoint
  690. interfaces. Note: in environments other than bare metal, the orchestrators
  691. configure this appropriately. For example our Kubernetes and Docker
  692. integrations set the ''cali'' value, and our OpenStack integration
  693. sets the ''tap'' value. [Default: cali]'
  694. type: string
  695. interfaceRefreshInterval:
  696. description: InterfaceRefreshInterval is the period at which Felix
  697. rescans local interfaces to verify their state. The rescan can be
  698. disabled by setting the interval to 0.
  699. type: string
  700. ipipEnabled:
  701. type: boolean
  702. ipipMTU:
  703. description: 'IPIPMTU is the MTU to set on the tunnel device. See
  704. Configuring MTU [Default: 1440]'
  705. type: integer
  706. ipsetsRefreshInterval:
  707. description: 'IpsetsRefreshInterval is the period at which Felix re-checks
  708. all iptables state to ensure that no other process has accidentally
  709. broken Calico''s rules. Set to 0 to disable iptables refresh. [Default:
  710. 90s]'
  711. type: string
  712. iptablesBackend:
  713. description: IptablesBackend specifies which backend of iptables will
  714. be used. The default is legacy.
  715. type: string
  716. iptablesFilterAllowAction:
  717. type: string
  718. iptablesLockFilePath:
  719. description: 'IptablesLockFilePath is the location of the iptables
  720. lock file. You may need to change this if the lock file is not in
  721. its standard location (for example if you have mapped it into Felix''s
  722. container at a different path). [Default: /run/xtables.lock]'
  723. type: string
  724. iptablesLockProbeInterval:
  725. description: 'IptablesLockProbeInterval is the time that Felix will
  726. wait between attempts to acquire the iptables lock if it is not
  727. available. Lower values make Felix more responsive when the lock
  728. is contended, but use more CPU. [Default: 50ms]'
  729. type: string
  730. iptablesLockTimeout:
  731. description: 'IptablesLockTimeout is the time that Felix will wait
  732. for the iptables lock, or 0, to disable. To use this feature, Felix
  733. must share the iptables lock file with all other processes that
  734. also take the lock. When running Felix inside a container, this
  735. requires the /run directory of the host to be mounted into the calico/node
  736. or calico/felix container. [Default: 0s disabled]'
  737. type: string
  738. iptablesMangleAllowAction:
  739. type: string
  740. iptablesMarkMask:
  741. description: 'IptablesMarkMask is the mask that Felix selects its
  742. IPTables Mark bits from. Should be a 32 bit hexadecimal number with
  743. at least 8 bits set, none of which clash with any other mark bits
  744. in use on the system. [Default: 0xff000000]'
  745. format: int32
  746. type: integer
  747. iptablesNATOutgoingInterfaceFilter:
  748. type: string
  749. iptablesPostWriteCheckInterval:
  750. description: 'IptablesPostWriteCheckInterval is the period after Felix
  751. has done a write to the dataplane that it schedules an extra read
  752. back in order to check the write was not clobbered by another process.
  753. This should only occur if another application on the system doesn''t
  754. respect the iptables lock. [Default: 1s]'
  755. type: string
  756. iptablesRefreshInterval:
  757. description: 'IptablesRefreshInterval is the period at which Felix
  758. re-checks the IP sets in the dataplane to ensure that no other process
  759. has accidentally broken Calico''s rules. Set to 0 to disable IP
  760. sets refresh. Note: the default for this value is lower than the
  761. other refresh intervals as a workaround for a Linux kernel bug that
  762. was fixed in kernel version 4.11. If you are using v4.11 or greater
  763. you may want to set this to, a higher value to reduce Felix CPU
  764. usage. [Default: 10s]'
  765. type: string
  766. ipv6Support:
  767. type: boolean
  768. kubeNodePortRanges:
  769. description: 'KubeNodePortRanges holds list of port ranges used for
  770. service node ports. Only used if felix detects kube-proxy running
  771. in ipvs mode. Felix uses these ranges to separate host and workload
  772. traffic. [Default: 30000:32767].'
  773. items:
  774. anyOf:
  775. - type: integer
  776. - type: string
  777. pattern: ^.*
  778. x-kubernetes-int-or-string: true
  779. type: array
  780. logFilePath:
  781. description: 'LogFilePath is the full path to the Felix log. Set to
  782. none to disable file logging. [Default: /var/log/calico/felix.log]'
  783. type: string
  784. logPrefix:
  785. description: 'LogPrefix is the log prefix that Felix uses when rendering
  786. LOG rules. [Default: calico-packet]'
  787. type: string
  788. logSeverityFile:
  789. description: 'LogSeverityFile is the log severity above which logs
  790. are sent to the log file. [Default: Info]'
  791. type: string
  792. logSeverityScreen:
  793. description: 'LogSeverityScreen is the log severity above which logs
  794. are sent to the stdout. [Default: Info]'
  795. type: string
  796. logSeveritySys:
  797. description: 'LogSeveritySys is the log severity above which logs
  798. are sent to the syslog. Set to None for no logging to syslog. [Default:
  799. Info]'
  800. type: string
  801. maxIpsetSize:
  802. type: integer
  803. metadataAddr:
  804. description: 'MetadataAddr is the IP address or domain name of the
  805. server that can answer VM queries for cloud-init metadata. In OpenStack,
  806. this corresponds to the machine running nova-api (or in Ubuntu,
  807. nova-api-metadata). A value of none (case insensitive) means that
  808. Felix should not set up any NAT rule for the metadata path. [Default:
  809. 127.0.0.1]'
  810. type: string
  811. metadataPort:
  812. description: 'MetadataPort is the port of the metadata server. This,
  813. combined with global.MetadataAddr (if not ''None''), is used to
  814. set up a NAT rule, from 169.254.169.254:80 to MetadataAddr:MetadataPort.
  815. In most cases this should not need to be changed [Default: 8775].'
  816. type: integer
  817. mtuIfacePattern:
  818. description: MTUIfacePattern is a regular expression that controls
  819. which interfaces Felix should scan in order to calculate the host's
  820. MTU. This should not match workload interfaces (usually named cali...).
  821. type: string
  822. natOutgoingAddress:
  823. description: NATOutgoingAddress specifies an address to use when performing
  824. source NAT for traffic in a natOutgoing pool that is leaving the
  825. network. By default the address used is an address on the interface
  826. the traffic is leaving on (ie it uses the iptables MASQUERADE target)
  827. type: string
  828. natPortRange:
  829. anyOf:
  830. - type: integer
  831. - type: string
  832. description: NATPortRange specifies the range of ports that is used
  833. for port mapping when doing outgoing NAT. When unset the default
  834. behavior of the network stack is used.
  835. pattern: ^.*
  836. x-kubernetes-int-or-string: true
  837. netlinkTimeout:
  838. type: string
  839. openstackRegion:
  840. description: 'OpenstackRegion is the name of the region that a particular
  841. Felix belongs to. In a multi-region Calico/OpenStack deployment,
  842. this must be configured somehow for each Felix (here in the datamodel,
  843. or in felix.cfg or the environment on each compute node), and must
  844. match the [calico] openstack_region value configured in neutron.conf
  845. on each node. [Default: Empty]'
  846. type: string
  847. policySyncPathPrefix:
  848. description: 'PolicySyncPathPrefix is used to by Felix to communicate
  849. policy changes to external services, like Application layer policy.
  850. [Default: Empty]'
  851. type: string
  852. prometheusGoMetricsEnabled:
  853. description: 'PrometheusGoMetricsEnabled disables Go runtime metrics
  854. collection, which the Prometheus client does by default, when set
  855. to false. This reduces the number of metrics reported, reducing
  856. Prometheus load. [Default: true]'
  857. type: boolean
  858. prometheusMetricsEnabled:
  859. description: 'PrometheusMetricsEnabled enables the Prometheus metrics
  860. server in Felix if set to true. [Default: false]'
  861. type: boolean
  862. prometheusMetricsHost:
  863. description: 'PrometheusMetricsHost is the host that the Prometheus
  864. metrics server should bind to. [Default: empty]'
  865. type: string
  866. prometheusMetricsPort:
  867. description: 'PrometheusMetricsPort is the TCP port that the Prometheus
  868. metrics server should bind to. [Default: 9091]'
  869. type: integer
  870. prometheusProcessMetricsEnabled:
  871. description: 'PrometheusProcessMetricsEnabled disables process metrics
  872. collection, which the Prometheus client does by default, when set
  873. to false. This reduces the number of metrics reported, reducing
  874. Prometheus load. [Default: true]'
  875. type: boolean
  876. removeExternalRoutes:
  877. description: Whether or not to remove device routes that have not
  878. been programmed by Felix. Disabling this will allow external applications
  879. to also add device routes. This is enabled by default which means
  880. we will remove externally added routes.
  881. type: boolean
  882. reportingInterval:
  883. description: 'ReportingInterval is the interval at which Felix reports
  884. its status into the datastore or 0 to disable. Must be non-zero
  885. in OpenStack deployments. [Default: 30s]'
  886. type: string
  887. reportingTTL:
  888. description: 'ReportingTTL is the time-to-live setting for process-wide
  889. status reports. [Default: 90s]'
  890. type: string
  891. routeRefreshInterval:
  892. description: 'RouteRefreshInterval is the period at which Felix re-checks
  893. the routes in the dataplane to ensure that no other process has
  894. accidentally broken Calico''s rules. Set to 0 to disable route refresh.
  895. [Default: 90s]'
  896. type: string
  897. routeSource:
  898. description: 'RouteSource configures where Felix gets its routing
  899. information. - WorkloadIPs: use workload endpoints to construct
  900. routes. - CalicoIPAM: the default - use IPAM data to construct routes.'
  901. type: string
  902. routeTableRange:
  903. description: Calico programs additional Linux route tables for various
  904. purposes. RouteTableRange specifies the indices of the route tables
  905. that Calico should use.
  906. properties:
  907. max:
  908. type: integer
  909. min:
  910. type: integer
  911. required:
  912. - max
  913. - min
  914. type: object
  915. serviceLoopPrevention:
  916. description: 'When service IP advertisement is enabled, prevent routing
  917. loops to service IPs that are not in use, by dropping or rejecting
  918. packets that do not get DNAT''d by kube-proxy. Unless set to "Disabled",
  919. in which case such routing loops continue to be allowed. [Default:
  920. Drop]'
  921. type: string
  922. sidecarAccelerationEnabled:
  923. description: 'SidecarAccelerationEnabled enables experimental sidecar
  924. acceleration [Default: false]'
  925. type: boolean
  926. usageReportingEnabled:
  927. description: 'UsageReportingEnabled reports anonymous Calico version
  928. number and cluster size to projectcalico.org. Logs warnings returned
  929. by the usage server. For example, if a significant security vulnerability
  930. has been discovered in the version of Calico being used. [Default:
  931. true]'
  932. type: boolean
  933. usageReportingInitialDelay:
  934. description: 'UsageReportingInitialDelay controls the minimum delay
  935. before Felix makes a report. [Default: 300s]'
  936. type: string
  937. usageReportingInterval:
  938. description: 'UsageReportingInterval controls the interval at which
  939. Felix makes reports. [Default: 86400s]'
  940. type: string
  941. useInternalDataplaneDriver:
  942. type: boolean
  943. vxlanEnabled:
  944. type: boolean
  945. vxlanMTU:
  946. description: 'VXLANMTU is the MTU to set on the tunnel device. See
  947. Configuring MTU [Default: 1440]'
  948. type: integer
  949. vxlanPort:
  950. type: integer
  951. vxlanVNI:
  952. type: integer
  953. wireguardEnabled:
  954. description: 'WireguardEnabled controls whether Wireguard is enabled.
  955. [Default: false]'
  956. type: boolean
  957. wireguardInterfaceName:
  958. description: 'WireguardInterfaceName specifies the name to use for
  959. the Wireguard interface. [Default: wg.calico]'
  960. type: string
  961. wireguardListeningPort:
  962. description: 'WireguardListeningPort controls the listening port used
  963. by Wireguard. [Default: 51820]'
  964. type: integer
  965. wireguardMTU:
  966. description: 'WireguardMTU controls the MTU on the Wireguard interface.
  967. See Configuring MTU [Default: 1420]'
  968. type: integer
  969. wireguardRoutingRulePriority:
  970. description: 'WireguardRoutingRulePriority controls the priority value
  971. to use for the Wireguard routing rule. [Default: 99]'
  972. type: integer
  973. xdpEnabled:
  974. description: 'XDPEnabled enables XDP acceleration for suitable untracked
  975. incoming deny rules. [Default: true]'
  976. type: boolean
  977. xdpRefreshInterval:
  978. description: 'XDPRefreshInterval is the period at which Felix re-checks
  979. all XDP state to ensure that no other process has accidentally broken
  980. Calico''s BPF maps or attached programs. Set to 0 to disable XDP
  981. refresh. [Default: 90s]'
  982. type: string
  983. type: object
  984. type: object
  985. served: true
  986. storage: true
  987. status:
  988. acceptedNames:
  989. kind: ""
  990. plural: ""
  991. conditions: []
  992. storedVersions: []
  993. ---
  994. apiVersion: apiextensions.k8s.io/v1
  995. kind: CustomResourceDefinition
  996. metadata:
  997. name: globalnetworkpolicies.crd.projectcalico.org
  998. spec:
  999. group: crd.projectcalico.org
  1000. names:
  1001. kind: GlobalNetworkPolicy
  1002. listKind: GlobalNetworkPolicyList
  1003. plural: globalnetworkpolicies
  1004. singular: globalnetworkpolicy
  1005. scope: Cluster
  1006. versions:
  1007. - name: v1
  1008. schema:
  1009. openAPIV3Schema:
  1010. properties:
  1011. apiVersion:
  1012. description: 'APIVersion defines the versioned schema of this representation
  1013. of an object. Servers should convert recognized schemas to the latest
  1014. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  1015. type: string
  1016. kind:
  1017. description: 'Kind is a string value representing the REST resource this
  1018. object represents. Servers may infer this from the endpoint the client
  1019. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  1020. type: string
  1021. metadata:
  1022. type: object
  1023. spec:
  1024. properties:
  1025. applyOnForward:
  1026. description: ApplyOnForward indicates to apply the rules in this policy
  1027. on forward traffic.
  1028. type: boolean
  1029. doNotTrack:
  1030. description: DoNotTrack indicates whether packets matched by the rules
  1031. in this policy should go through the data plane's connection tracking,
  1032. such as Linux conntrack. If True, the rules in this policy are
  1033. applied before any data plane connection tracking, and packets allowed
  1034. by this policy are marked as not to be tracked.
  1035. type: boolean
  1036. egress:
  1037. description: The ordered set of egress rules. Each rule contains
  1038. a set of packet match criteria and a corresponding action to apply.
  1039. items:
  1040. description: "A Rule encapsulates a set of match criteria and an
  1041. action. Both selector-based security Policy and security Profiles
  1042. reference rules - separated out as a list of rules for both ingress
  1043. and egress packet matching. \n Each positive match criteria has
  1044. a negated version, prefixed with \"Not\". All the match criteria
  1045. within a rule must be satisfied for a packet to match. A single
  1046. rule can contain the positive and negative version of a match
  1047. and both must be satisfied for the rule to match."
  1048. properties:
  1049. action:
  1050. type: string
  1051. destination:
  1052. description: Destination contains the match criteria that apply
  1053. to destination entity.
  1054. properties:
  1055. namespaceSelector:
  1056. description: "NamespaceSelector is an optional field that
  1057. contains a selector expression. Only traffic that originates
  1058. from (or terminates at) endpoints within the selected
  1059. namespaces will be matched. When both NamespaceSelector
  1060. and another selector are defined on the same rule, then
  1061. only workload endpoints that are matched by both selectors
  1062. will be selected by the rule. \n For NetworkPolicy, an
  1063. empty NamespaceSelector implies that the Selector is limited
  1064. to selecting only workload endpoints in the same namespace
  1065. as the NetworkPolicy. \n For NetworkPolicy, `global()`
  1066. NamespaceSelector implies that the Selector is limited
  1067. to selecting only GlobalNetworkSet or HostEndpoint. \n
  1068. For GlobalNetworkPolicy, an empty NamespaceSelector implies
  1069. the Selector applies to workload endpoints across all
  1070. namespaces."
  1071. type: string
  1072. nets:
  1073. description: Nets is an optional field that restricts the
  1074. rule to only apply to traffic that originates from (or
  1075. terminates at) IP addresses in any of the given subnets.
  1076. items:
  1077. type: string
  1078. type: array
  1079. notNets:
  1080. description: NotNets is the negated version of the Nets
  1081. field.
  1082. items:
  1083. type: string
  1084. type: array
  1085. notPorts:
  1086. description: NotPorts is the negated version of the Ports
  1087. field. Since only some protocols have ports, if any ports
  1088. are specified it requires the Protocol match in the Rule
  1089. to be set to "TCP" or "UDP".
  1090. items:
  1091. anyOf:
  1092. - type: integer
  1093. - type: string
  1094. pattern: ^.*
  1095. x-kubernetes-int-or-string: true
  1096. type: array
  1097. notSelector:
  1098. description: NotSelector is the negated version of the Selector
  1099. field. See Selector field for subtleties with negated
  1100. selectors.
  1101. type: string
  1102. ports:
  1103. description: "Ports is an optional field that restricts
  1104. the rule to only apply to traffic that has a source (destination)
  1105. port that matches one of these ranges/values. This value
  1106. is a list of integers or strings that represent ranges
  1107. of ports. \n Since only some protocols have ports, if
  1108. any ports are specified it requires the Protocol match
  1109. in the Rule to be set to \"TCP\" or \"UDP\"."
  1110. items:
  1111. anyOf:
  1112. - type: integer
  1113. - type: string
  1114. pattern: ^.*
  1115. x-kubernetes-int-or-string: true
  1116. type: array
  1117. selector:
  1118. description: "Selector is an optional field that contains
  1119. a selector expression (see Policy for sample syntax).
  1120. \ Only traffic that originates from (terminates at) endpoints
  1121. matching the selector will be matched. \n Note that: in
  1122. addition to the negated version of the Selector (see NotSelector
  1123. below), the selector expression syntax itself supports
  1124. negation. The two types of negation are subtly different.
  1125. One negates the set of matched endpoints, the other negates
  1126. the whole match: \n \tSelector = \"!has(my_label)\" matches
  1127. packets that are from other Calico-controlled \tendpoints
  1128. that do not have the label \"my_label\". \n \tNotSelector
  1129. = \"has(my_label)\" matches packets that are not from
  1130. Calico-controlled \tendpoints that do have the label \"my_label\".
  1131. \n The effect is that the latter will accept packets from
  1132. non-Calico sources whereas the former is limited to packets
  1133. from Calico-controlled endpoints."
  1134. type: string
  1135. serviceAccounts:
  1136. description: ServiceAccounts is an optional field that restricts
  1137. the rule to only apply to traffic that originates from
  1138. (or terminates at) a pod running as a matching service
  1139. account.
  1140. properties:
  1141. names:
  1142. description: Names is an optional field that restricts
  1143. the rule to only apply to traffic that originates
  1144. from (or terminates at) a pod running as a service
  1145. account whose name is in the list.
  1146. items:
  1147. type: string
  1148. type: array
  1149. selector:
  1150. description: Selector is an optional field that restricts
  1151. the rule to only apply to traffic that originates
  1152. from (or terminates at) a pod running as a service
  1153. account that matches the given label selector. If
  1154. both Names and Selector are specified then they are
  1155. AND'ed.
  1156. type: string
  1157. type: object
  1158. services:
  1159. description: "Services is an optional field that contains
  1160. options for matching Kubernetes Services. If specified,
  1161. only traffic that originates from or terminates at endpoints
  1162. within the selected service(s) will be matched, and only
  1163. to/from each endpoint's port. \n Services cannot be specified
  1164. on the same rule as Selector, NotSelector, NamespaceSelector,
  1165. Ports, NotPorts, Nets, NotNets or ServiceAccounts. \n
  1166. Only valid on egress rules."
  1167. properties:
  1168. name:
  1169. description: Name specifies the name of a Kubernetes
  1170. Service to match.
  1171. type: string
  1172. namespace:
  1173. description: Namespace specifies the namespace of the
  1174. given Service. If left empty, the rule will match
  1175. within this policy's namespace.
  1176. type: string
  1177. type: object
  1178. type: object
  1179. http:
  1180. description: HTTP contains match criteria that apply to HTTP
  1181. requests.
  1182. properties:
  1183. methods:
  1184. description: Methods is an optional field that restricts
  1185. the rule to apply only to HTTP requests that use one of
  1186. the listed HTTP Methods (e.g. GET, PUT, etc.) Multiple
  1187. methods are OR'd together.
  1188. items:
  1189. type: string
  1190. type: array
  1191. paths:
  1192. description: 'Paths is an optional field that restricts
  1193. the rule to apply to HTTP requests that use one of the
  1194. listed HTTP Paths. Multiple paths are OR''d together.
  1195. e.g: - exact: /foo - prefix: /bar NOTE: Each entry may
  1196. ONLY specify either a `exact` or a `prefix` match. The
  1197. validator will check for it.'
  1198. items:
  1199. description: 'HTTPPath specifies an HTTP path to match.
  1200. It may be either of the form: exact: <path>: which matches
  1201. the path exactly or prefix: <path-prefix>: which matches
  1202. the path prefix'
  1203. properties:
  1204. exact:
  1205. type: string
  1206. prefix:
  1207. type: string
  1208. type: object
  1209. type: array
  1210. type: object
  1211. icmp:
  1212. description: ICMP is an optional field that restricts the rule
  1213. to apply to a specific type and code of ICMP traffic. This
  1214. should only be specified if the Protocol field is set to "ICMP"
  1215. or "ICMPv6".
  1216. properties:
  1217. code:
  1218. description: Match on a specific ICMP code. If specified,
  1219. the Type value must also be specified. This is a technical
  1220. limitation imposed by the kernel's iptables firewall,
  1221. which Calico uses to enforce the rule.
  1222. type: integer
  1223. type:
  1224. description: Match on a specific ICMP type. For example
  1225. a value of 8 refers to ICMP Echo Request (i.e. pings).
  1226. type: integer
  1227. type: object
  1228. ipVersion:
  1229. description: IPVersion is an optional field that restricts the
  1230. rule to only match a specific IP version.
  1231. type: integer
  1232. metadata:
  1233. description: Metadata contains additional information for this
  1234. rule
  1235. properties:
  1236. annotations:
  1237. additionalProperties:
  1238. type: string
  1239. description: Annotations is a set of key value pairs that
  1240. give extra information about the rule
  1241. type: object
  1242. type: object
  1243. notICMP:
  1244. description: NotICMP is the negated version of the ICMP field.
  1245. properties:
  1246. code:
  1247. description: Match on a specific ICMP code. If specified,
  1248. the Type value must also be specified. This is a technical
  1249. limitation imposed by the kernel's iptables firewall,
  1250. which Calico uses to enforce the rule.
  1251. type: integer
  1252. type:
  1253. description: Match on a specific ICMP type. For example
  1254. a value of 8 refers to ICMP Echo Request (i.e. pings).
  1255. type: integer
  1256. type: object
  1257. notProtocol:
  1258. anyOf:
  1259. - type: integer
  1260. - type: string
  1261. description: NotProtocol is the negated version of the Protocol
  1262. field.
  1263. pattern: ^.*
  1264. x-kubernetes-int-or-string: true
  1265. protocol:
  1266. anyOf:
  1267. - type: integer
  1268. - type: string
  1269. description: "Protocol is an optional field that restricts the
  1270. rule to only apply to traffic of a specific IP protocol. Required
  1271. if any of the EntityRules contain Ports (because ports only
  1272. apply to certain protocols). \n Must be one of these string
  1273. values: \"TCP\", \"UDP\", \"ICMP\", \"ICMPv6\", \"SCTP\",
  1274. \"UDPLite\" or an integer in the range 1-255."
  1275. pattern: ^.*
  1276. x-kubernetes-int-or-string: true
  1277. source:
  1278. description: Source contains the match criteria that apply to
  1279. source entity.
  1280. properties:
  1281. namespaceSelector:
  1282. description: "NamespaceSelector is an optional field that
  1283. contains a selector expression. Only traffic that originates
  1284. from (or terminates at) endpoints within the selected
  1285. namespaces will be matched. When both NamespaceSelector
  1286. and another selector are defined on the same rule, then
  1287. only workload endpoints that are matched by both selectors
  1288. will be selected by the rule. \n For NetworkPolicy, an
  1289. empty NamespaceSelector implies that the Selector is limited
  1290. to selecting only workload endpoints in the same namespace
  1291. as the NetworkPolicy. \n For NetworkPolicy, `global()`
  1292. NamespaceSelector implies that the Selector is limited
  1293. to selecting only GlobalNetworkSet or HostEndpoint. \n
  1294. For GlobalNetworkPolicy, an empty NamespaceSelector implies
  1295. the Selector applies to workload endpoints across all
  1296. namespaces."
  1297. type: string
  1298. nets:
  1299. description: Nets is an optional field that restricts the
  1300. rule to only apply to traffic that originates from (or
  1301. terminates at) IP addresses in any of the given subnets.
  1302. items:
  1303. type: string
  1304. type: array
  1305. notNets:
  1306. description: NotNets is the negated version of the Nets
  1307. field.
  1308. items:
  1309. type: string
  1310. type: array
  1311. notPorts:
  1312. description: NotPorts is the negated version of the Ports
  1313. field. Since only some protocols have ports, if any ports
  1314. are specified it requires the Protocol match in the Rule
  1315. to be set to "TCP" or "UDP".
  1316. items:
  1317. anyOf:
  1318. - type: integer
  1319. - type: string
  1320. pattern: ^.*
  1321. x-kubernetes-int-or-string: true
  1322. type: array
  1323. notSelector:
  1324. description: NotSelector is the negated version of the Selector
  1325. field. See Selector field for subtleties with negated
  1326. selectors.
  1327. type: string
  1328. ports:
  1329. description: "Ports is an optional field that restricts
  1330. the rule to only apply to traffic that has a source (destination)
  1331. port that matches one of these ranges/values. This value
  1332. is a list of integers or strings that represent ranges
  1333. of ports. \n Since only some protocols have ports, if
  1334. any ports are specified it requires the Protocol match
  1335. in the Rule to be set to \"TCP\" or \"UDP\"."
  1336. items:
  1337. anyOf:
  1338. - type: integer
  1339. - type: string
  1340. pattern: ^.*
  1341. x-kubernetes-int-or-string: true
  1342. type: array
  1343. selector:
  1344. description: "Selector is an optional field that contains
  1345. a selector expression (see Policy for sample syntax).
  1346. \ Only traffic that originates from (terminates at) endpoints
  1347. matching the selector will be matched. \n Note that: in
  1348. addition to the negated version of the Selector (see NotSelector
  1349. below), the selector expression syntax itself supports
  1350. negation. The two types of negation are subtly different.
  1351. One negates the set of matched endpoints, the other negates
  1352. the whole match: \n \tSelector = \"!has(my_label)\" matches
  1353. packets that are from other Calico-controlled \tendpoints
  1354. that do not have the label \"my_label\". \n \tNotSelector
  1355. = \"has(my_label)\" matches packets that are not from
  1356. Calico-controlled \tendpoints that do have the label \"my_label\".
  1357. \n The effect is that the latter will accept packets from
  1358. non-Calico sources whereas the former is limited to packets
  1359. from Calico-controlled endpoints."
  1360. type: string
  1361. serviceAccounts:
  1362. description: ServiceAccounts is an optional field that restricts
  1363. the rule to only apply to traffic that originates from
  1364. (or terminates at) a pod running as a matching service
  1365. account.
  1366. properties:
  1367. names:
  1368. description: Names is an optional field that restricts
  1369. the rule to only apply to traffic that originates
  1370. from (or terminates at) a pod running as a service
  1371. account whose name is in the list.
  1372. items:
  1373. type: string
  1374. type: array
  1375. selector:
  1376. description: Selector is an optional field that restricts
  1377. the rule to only apply to traffic that originates
  1378. from (or terminates at) a pod running as a service
  1379. account that matches the given label selector. If
  1380. both Names and Selector are specified then they are
  1381. AND'ed.
  1382. type: string
  1383. type: object
  1384. services:
  1385. description: "Services is an optional field that contains
  1386. options for matching Kubernetes Services. If specified,
  1387. only traffic that originates from or terminates at endpoints
  1388. within the selected service(s) will be matched, and only
  1389. to/from each endpoint's port. \n Services cannot be specified
  1390. on the same rule as Selector, NotSelector, NamespaceSelector,
  1391. Ports, NotPorts, Nets, NotNets or ServiceAccounts. \n
  1392. Only valid on egress rules."
  1393. properties:
  1394. name:
  1395. description: Name specifies the name of a Kubernetes
  1396. Service to match.
  1397. type: string
  1398. namespace:
  1399. description: Namespace specifies the namespace of the
  1400. given Service. If left empty, the rule will match
  1401. within this policy's namespace.
  1402. type: string
  1403. type: object
  1404. type: object
  1405. required:
  1406. - action
  1407. type: object
  1408. type: array
  1409. ingress:
  1410. description: The ordered set of ingress rules. Each rule contains
  1411. a set of packet match criteria and a corresponding action to apply.
  1412. items:
  1413. description: "A Rule encapsulates a set of match criteria and an
  1414. action. Both selector-based security Policy and security Profiles
  1415. reference rules - separated out as a list of rules for both ingress
  1416. and egress packet matching. \n Each positive match criteria has
  1417. a negated version, prefixed with \"Not\". All the match criteria
  1418. within a rule must be satisfied for a packet to match. A single
  1419. rule can contain the positive and negative version of a match
  1420. and both must be satisfied for the rule to match."
  1421. properties:
  1422. action:
  1423. type: string
  1424. destination:
  1425. description: Destination contains the match criteria that apply
  1426. to destination entity.
  1427. properties:
  1428. namespaceSelector:
  1429. description: "NamespaceSelector is an optional field that
  1430. contains a selector expression. Only traffic that originates
  1431. from (or terminates at) endpoints within the selected
  1432. namespaces will be matched. When both NamespaceSelector
  1433. and another selector are defined on the same rule, then
  1434. only workload endpoints that are matched by both selectors
  1435. will be selected by the rule. \n For NetworkPolicy, an
  1436. empty NamespaceSelector implies that the Selector is limited
  1437. to selecting only workload endpoints in the same namespace
  1438. as the NetworkPolicy. \n For NetworkPolicy, `global()`
  1439. NamespaceSelector implies that the Selector is limited
  1440. to selecting only GlobalNetworkSet or HostEndpoint. \n
  1441. For GlobalNetworkPolicy, an empty NamespaceSelector implies
  1442. the Selector applies to workload endpoints across all
  1443. namespaces."
  1444. type: string
  1445. nets:
  1446. description: Nets is an optional field that restricts the
  1447. rule to only apply to traffic that originates from (or
  1448. terminates at) IP addresses in any of the given subnets.
  1449. items:
  1450. type: string
  1451. type: array
  1452. notNets:
  1453. description: NotNets is the negated version of the Nets
  1454. field.
  1455. items:
  1456. type: string
  1457. type: array
  1458. notPorts:
  1459. description: NotPorts is the negated version of the Ports
  1460. field. Since only some protocols have ports, if any ports
  1461. are specified it requires the Protocol match in the Rule
  1462. to be set to "TCP" or "UDP".
  1463. items:
  1464. anyOf:
  1465. - type: integer
  1466. - type: string
  1467. pattern: ^.*
  1468. x-kubernetes-int-or-string: true
  1469. type: array
  1470. notSelector:
  1471. description: NotSelector is the negated version of the Selector
  1472. field. See Selector field for subtleties with negated
  1473. selectors.
  1474. type: string
  1475. ports:
  1476. description: "Ports is an optional field that restricts
  1477. the rule to only apply to traffic that has a source (destination)
  1478. port that matches one of these ranges/values. This value
  1479. is a list of integers or strings that represent ranges
  1480. of ports. \n Since only some protocols have ports, if
  1481. any ports are specified it requires the Protocol match
  1482. in the Rule to be set to \"TCP\" or \"UDP\"."
  1483. items:
  1484. anyOf:
  1485. - type: integer
  1486. - type: string
  1487. pattern: ^.*
  1488. x-kubernetes-int-or-string: true
  1489. type: array
  1490. selector:
  1491. description: "Selector is an optional field that contains
  1492. a selector expression (see Policy for sample syntax).
  1493. \ Only traffic that originates from (terminates at) endpoints
  1494. matching the selector will be matched. \n Note that: in
  1495. addition to the negated version of the Selector (see NotSelector
  1496. below), the selector expression syntax itself supports
  1497. negation. The two types of negation are subtly different.
  1498. One negates the set of matched endpoints, the other negates
  1499. the whole match: \n \tSelector = \"!has(my_label)\" matches
  1500. packets that are from other Calico-controlled \tendpoints
  1501. that do not have the label \"my_label\". \n \tNotSelector
  1502. = \"has(my_label)\" matches packets that are not from
  1503. Calico-controlled \tendpoints that do have the label \"my_label\".
  1504. \n The effect is that the latter will accept packets from
  1505. non-Calico sources whereas the former is limited to packets
  1506. from Calico-controlled endpoints."
  1507. type: string
  1508. serviceAccounts:
  1509. description: ServiceAccounts is an optional field that restricts
  1510. the rule to only apply to traffic that originates from
  1511. (or terminates at) a pod running as a matching service
  1512. account.
  1513. properties:
  1514. names:
  1515. description: Names is an optional field that restricts
  1516. the rule to only apply to traffic that originates
  1517. from (or terminates at) a pod running as a service
  1518. account whose name is in the list.
  1519. items:
  1520. type: string
  1521. type: array
  1522. selector:
  1523. description: Selector is an optional field that restricts
  1524. the rule to only apply to traffic that originates
  1525. from (or terminates at) a pod running as a service
  1526. account that matches the given label selector. If
  1527. both Names and Selector are specified then they are
  1528. AND'ed.
  1529. type: string
  1530. type: object
  1531. services:
  1532. description: "Services is an optional field that contains
  1533. options for matching Kubernetes Services. If specified,
  1534. only traffic that originates from or terminates at endpoints
  1535. within the selected service(s) will be matched, and only
  1536. to/from each endpoint's port. \n Services cannot be specified
  1537. on the same rule as Selector, NotSelector, NamespaceSelector,
  1538. Ports, NotPorts, Nets, NotNets or ServiceAccounts. \n
  1539. Only valid on egress rules."
  1540. properties:
  1541. name:
  1542. description: Name specifies the name of a Kubernetes
  1543. Service to match.
  1544. type: string
  1545. namespace:
  1546. description: Namespace specifies the namespace of the
  1547. given Service. If left empty, the rule will match
  1548. within this policy's namespace.
  1549. type: string
  1550. type: object
  1551. type: object
  1552. http:
  1553. description: HTTP contains match criteria that apply to HTTP
  1554. requests.
  1555. properties:
  1556. methods:
  1557. description: Methods is an optional field that restricts
  1558. the rule to apply only to HTTP requests that use one of
  1559. the listed HTTP Methods (e.g. GET, PUT, etc.) Multiple
  1560. methods are OR'd together.
  1561. items:
  1562. type: string
  1563. type: array
  1564. paths:
  1565. description: 'Paths is an optional field that restricts
  1566. the rule to apply to HTTP requests that use one of the
  1567. listed HTTP Paths. Multiple paths are OR''d together.
  1568. e.g: - exact: /foo - prefix: /bar NOTE: Each entry may
  1569. ONLY specify either a `exact` or a `prefix` match. The
  1570. validator will check for it.'
  1571. items:
  1572. description: 'HTTPPath specifies an HTTP path to match.
  1573. It may be either of the form: exact: <path>: which matches
  1574. the path exactly or prefix: <path-prefix>: which matches
  1575. the path prefix'
  1576. properties:
  1577. exact:
  1578. type: string
  1579. prefix:
  1580. type: string
  1581. type: object
  1582. type: array
  1583. type: object
  1584. icmp:
  1585. description: ICMP is an optional field that restricts the rule
  1586. to apply to a specific type and code of ICMP traffic. This
  1587. should only be specified if the Protocol field is set to "ICMP"
  1588. or "ICMPv6".
  1589. properties:
  1590. code:
  1591. description: Match on a specific ICMP code. If specified,
  1592. the Type value must also be specified. This is a technical
  1593. limitation imposed by the kernel's iptables firewall,
  1594. which Calico uses to enforce the rule.
  1595. type: integer
  1596. type:
  1597. description: Match on a specific ICMP type. For example
  1598. a value of 8 refers to ICMP Echo Request (i.e. pings).
  1599. type: integer
  1600. type: object
  1601. ipVersion:
  1602. description: IPVersion is an optional field that restricts the
  1603. rule to only match a specific IP version.
  1604. type: integer
  1605. metadata:
  1606. description: Metadata contains additional information for this
  1607. rule
  1608. properties:
  1609. annotations:
  1610. additionalProperties:
  1611. type: string
  1612. description: Annotations is a set of key value pairs that
  1613. give extra information about the rule
  1614. type: object
  1615. type: object
  1616. notICMP:
  1617. description: NotICMP is the negated version of the ICMP field.
  1618. properties:
  1619. code:
  1620. description: Match on a specific ICMP code. If specified,
  1621. the Type value must also be specified. This is a technical
  1622. limitation imposed by the kernel's iptables firewall,
  1623. which Calico uses to enforce the rule.
  1624. type: integer
  1625. type:
  1626. description: Match on a specific ICMP type. For example
  1627. a value of 8 refers to ICMP Echo Request (i.e. pings).
  1628. type: integer
  1629. type: object
  1630. notProtocol:
  1631. anyOf:
  1632. - type: integer
  1633. - type: string
  1634. description: NotProtocol is the negated version of the Protocol
  1635. field.
  1636. pattern: ^.*
  1637. x-kubernetes-int-or-string: true
  1638. protocol:
  1639. anyOf:
  1640. - type: integer
  1641. - type: string
  1642. description: "Protocol is an optional field that restricts the
  1643. rule to only apply to traffic of a specific IP protocol. Required
  1644. if any of the EntityRules contain Ports (because ports only
  1645. apply to certain protocols). \n Must be one of these string
  1646. values: \"TCP\", \"UDP\", \"ICMP\", \"ICMPv6\", \"SCTP\",
  1647. \"UDPLite\" or an integer in the range 1-255."
  1648. pattern: ^.*
  1649. x-kubernetes-int-or-string: true
  1650. source:
  1651. description: Source contains the match criteria that apply to
  1652. source entity.
  1653. properties:
  1654. namespaceSelector:
  1655. description: "NamespaceSelector is an optional field that
  1656. contains a selector expression. Only traffic that originates
  1657. from (or terminates at) endpoints within the selected
  1658. namespaces will be matched. When both NamespaceSelector
  1659. and another selector are defined on the same rule, then
  1660. only workload endpoints that are matched by both selectors
  1661. will be selected by the rule. \n For NetworkPolicy, an
  1662. empty NamespaceSelector implies that the Selector is limited
  1663. to selecting only workload endpoints in the same namespace
  1664. as the NetworkPolicy. \n For NetworkPolicy, `global()`
  1665. NamespaceSelector implies that the Selector is limited
  1666. to selecting only GlobalNetworkSet or HostEndpoint. \n
  1667. For GlobalNetworkPolicy, an empty NamespaceSelector implies
  1668. the Selector applies to workload endpoints across all
  1669. namespaces."
  1670. type: string
  1671. nets:
  1672. description: Nets is an optional field that restricts the
  1673. rule to only apply to traffic that originates from (or
  1674. terminates at) IP addresses in any of the given subnets.
  1675. items:
  1676. type: string
  1677. type: array
  1678. notNets:
  1679. description: NotNets is the negated version of the Nets
  1680. field.
  1681. items:
  1682. type: string
  1683. type: array
  1684. notPorts:
  1685. description: NotPorts is the negated version of the Ports
  1686. field. Since only some protocols have ports, if any ports
  1687. are specified it requires the Protocol match in the Rule
  1688. to be set to "TCP" or "UDP".
  1689. items:
  1690. anyOf:
  1691. - type: integer
  1692. - type: string
  1693. pattern: ^.*
  1694. x-kubernetes-int-or-string: true
  1695. type: array
  1696. notSelector:
  1697. description: NotSelector is the negated version of the Selector
  1698. field. See Selector field for subtleties with negated
  1699. selectors.
  1700. type: string
  1701. ports:
  1702. description: "Ports is an optional field that restricts
  1703. the rule to only apply to traffic that has a source (destination)
  1704. port that matches one of these ranges/values. This value
  1705. is a list of integers or strings that represent ranges
  1706. of ports. \n Since only some protocols have ports, if
  1707. any ports are specified it requires the Protocol match
  1708. in the Rule to be set to \"TCP\" or \"UDP\"."
  1709. items:
  1710. anyOf:
  1711. - type: integer
  1712. - type: string
  1713. pattern: ^.*
  1714. x-kubernetes-int-or-string: true
  1715. type: array
  1716. selector:
  1717. description: "Selector is an optional field that contains
  1718. a selector expression (see Policy for sample syntax).
  1719. \ Only traffic that originates from (terminates at) endpoints
  1720. matching the selector will be matched. \n Note that: in
  1721. addition to the negated version of the Selector (see NotSelector
  1722. below), the selector expression syntax itself supports
  1723. negation. The two types of negation are subtly different.
  1724. One negates the set of matched endpoints, the other negates
  1725. the whole match: \n \tSelector = \"!has(my_label)\" matches
  1726. packets that are from other Calico-controlled \tendpoints
  1727. that do not have the label \"my_label\". \n \tNotSelector
  1728. = \"has(my_label)\" matches packets that are not from
  1729. Calico-controlled \tendpoints that do have the label \"my_label\".
  1730. \n The effect is that the latter will accept packets from
  1731. non-Calico sources whereas the former is limited to packets
  1732. from Calico-controlled endpoints."
  1733. type: string
  1734. serviceAccounts:
  1735. description: ServiceAccounts is an optional field that restricts
  1736. the rule to only apply to traffic that originates from
  1737. (or terminates at) a pod running as a matching service
  1738. account.
  1739. properties:
  1740. names:
  1741. description: Names is an optional field that restricts
  1742. the rule to only apply to traffic that originates
  1743. from (or terminates at) a pod running as a service
  1744. account whose name is in the list.
  1745. items:
  1746. type: string
  1747. type: array
  1748. selector:
  1749. description: Selector is an optional field that restricts
  1750. the rule to only apply to traffic that originates
  1751. from (or terminates at) a pod running as a service
  1752. account that matches the given label selector. If
  1753. both Names and Selector are specified then they are
  1754. AND'ed.
  1755. type: string
  1756. type: object
  1757. services:
  1758. description: "Services is an optional field that contains
  1759. options for matching Kubernetes Services. If specified,
  1760. only traffic that originates from or terminates at endpoints
  1761. within the selected service(s) will be matched, and only
  1762. to/from each endpoint's port. \n Services cannot be specified
  1763. on the same rule as Selector, NotSelector, NamespaceSelector,
  1764. Ports, NotPorts, Nets, NotNets or ServiceAccounts. \n
  1765. Only valid on egress rules."
  1766. properties:
  1767. name:
  1768. description: Name specifies the name of a Kubernetes
  1769. Service to match.
  1770. type: string
  1771. namespace:
  1772. description: Namespace specifies the namespace of the
  1773. given Service. If left empty, the rule will match
  1774. within this policy's namespace.
  1775. type: string
  1776. type: object
  1777. type: object
  1778. required:
  1779. - action
  1780. type: object
  1781. type: array
  1782. namespaceSelector:
  1783. description: NamespaceSelector is an optional field for an expression
  1784. used to select a pod based on namespaces.
  1785. type: string
  1786. order:
  1787. description: Order is an optional field that specifies the order in
  1788. which the policy is applied. Policies with higher "order" are applied
  1789. after those with lower order. If the order is omitted, it may be
  1790. considered to be "infinite" - i.e. the policy will be applied last. Policies
  1791. with identical order will be applied in alphanumerical order based
  1792. on the Policy "Name".
  1793. type: number
  1794. preDNAT:
  1795. description: PreDNAT indicates to apply the rules in this policy before
  1796. any DNAT.
  1797. type: boolean
  1798. selector:
  1799. description: "The selector is an expression used to pick pick out
  1800. the endpoints that the policy should be applied to. \n Selector
  1801. expressions follow this syntax: \n \tlabel == \"string_literal\"
  1802. \ -> comparison, e.g. my_label == \"foo bar\" \tlabel != \"string_literal\"
  1803. \ -> not equal; also matches if label is not present \tlabel in
  1804. { \"a\", \"b\", \"c\", ... } -> true if the value of label X is
  1805. one of \"a\", \"b\", \"c\" \tlabel not in { \"a\", \"b\", \"c\",
  1806. ... } -> true if the value of label X is not one of \"a\", \"b\",
  1807. \"c\" \thas(label_name) -> True if that label is present \t! expr
  1808. -> negation of expr \texpr && expr -> Short-circuit and \texpr
  1809. || expr -> Short-circuit or \t( expr ) -> parens for grouping \tall()
  1810. or the empty selector -> matches all endpoints. \n Label names are
  1811. allowed to contain alphanumerics, -, _ and /. String literals are
  1812. more permissive but they do not support escape characters. \n Examples
  1813. (with made-up labels): \n \ttype == \"webserver\" && deployment
  1814. == \"prod\" \ttype in {\"frontend\", \"backend\"} \tdeployment !=
  1815. \"dev\" \t! has(label_name)"
  1816. type: string
  1817. serviceAccountSelector:
  1818. description: ServiceAccountSelector is an optional field for an expression
  1819. used to select a pod based on service accounts.
  1820. type: string
  1821. types:
  1822. description: "Types indicates whether this policy applies to ingress,
  1823. or to egress, or to both. When not explicitly specified (and so
  1824. the value on creation is empty or nil), Calico defaults Types according
  1825. to what Ingress and Egress rules are present in the policy. The
  1826. default is: \n - [ PolicyTypeIngress ], if there are no Egress rules
  1827. (including the case where there are also no Ingress rules) \n
  1828. - [ PolicyTypeEgress ], if there are Egress rules but no Ingress
  1829. rules \n - [ PolicyTypeIngress, PolicyTypeEgress ], if there are
  1830. both Ingress and Egress rules. \n When the policy is read back again,
  1831. Types will always be one of these values, never empty or nil."
  1832. items:
  1833. description: PolicyType enumerates the possible values of the PolicySpec
  1834. Types field.
  1835. type: string
  1836. type: array
  1837. type: object
  1838. type: object
  1839. served: true
  1840. storage: true
  1841. status:
  1842. acceptedNames:
  1843. kind: ""
  1844. plural: ""
  1845. conditions: []
  1846. storedVersions: []
  1847. ---
  1848. apiVersion: apiextensions.k8s.io/v1
  1849. kind: CustomResourceDefinition
  1850. metadata:
  1851. name: globalnetworksets.crd.projectcalico.org
  1852. spec:
  1853. group: crd.projectcalico.org
  1854. names:
  1855. kind: GlobalNetworkSet
  1856. listKind: GlobalNetworkSetList
  1857. plural: globalnetworksets
  1858. singular: globalnetworkset
  1859. scope: Cluster
  1860. versions:
  1861. - name: v1
  1862. schema:
  1863. openAPIV3Schema:
  1864. description: GlobalNetworkSet contains a set of arbitrary IP sub-networks/CIDRs
  1865. that share labels to allow rules to refer to them via selectors. The labels
  1866. of GlobalNetworkSet are not namespaced.
  1867. properties:
  1868. apiVersion:
  1869. description: 'APIVersion defines the versioned schema of this representation
  1870. of an object. Servers should convert recognized schemas to the latest
  1871. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  1872. type: string
  1873. kind:
  1874. description: 'Kind is a string value representing the REST resource this
  1875. object represents. Servers may infer this from the endpoint the client
  1876. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  1877. type: string
  1878. metadata:
  1879. type: object
  1880. spec:
  1881. description: GlobalNetworkSetSpec contains the specification for a NetworkSet
  1882. resource.
  1883. properties:
  1884. nets:
  1885. description: The list of IP networks that belong to this set.
  1886. items:
  1887. type: string
  1888. type: array
  1889. type: object
  1890. type: object
  1891. served: true
  1892. storage: true
  1893. status:
  1894. acceptedNames:
  1895. kind: ""
  1896. plural: ""
  1897. conditions: []
  1898. storedVersions: []
  1899. ---
  1900. apiVersion: apiextensions.k8s.io/v1
  1901. kind: CustomResourceDefinition
  1902. metadata:
  1903. name: hostendpoints.crd.projectcalico.org
  1904. spec:
  1905. group: crd.projectcalico.org
  1906. names:
  1907. kind: HostEndpoint
  1908. listKind: HostEndpointList
  1909. plural: hostendpoints
  1910. singular: hostendpoint
  1911. scope: Cluster
  1912. versions:
  1913. - name: v1
  1914. schema:
  1915. openAPIV3Schema:
  1916. properties:
  1917. apiVersion:
  1918. description: 'APIVersion defines the versioned schema of this representation
  1919. of an object. Servers should convert recognized schemas to the latest
  1920. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  1921. type: string
  1922. kind:
  1923. description: 'Kind is a string value representing the REST resource this
  1924. object represents. Servers may infer this from the endpoint the client
  1925. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  1926. type: string
  1927. metadata:
  1928. type: object
  1929. spec:
  1930. description: HostEndpointSpec contains the specification for a HostEndpoint
  1931. resource.
  1932. properties:
  1933. expectedIPs:
  1934. description: "The expected IP addresses (IPv4 and IPv6) of the endpoint.
  1935. If \"InterfaceName\" is not present, Calico will look for an interface
  1936. matching any of the IPs in the list and apply policy to that. Note:
  1937. \tWhen using the selector match criteria in an ingress or egress
  1938. security Policy \tor Profile, Calico converts the selector into
  1939. a set of IP addresses. For host \tendpoints, the ExpectedIPs field
  1940. is used for that purpose. (If only the interface \tname is specified,
  1941. Calico does not learn the IPs of the interface for use in match
  1942. \tcriteria.)"
  1943. items:
  1944. type: string
  1945. type: array
  1946. interfaceName:
  1947. description: "Either \"*\", or the name of a specific Linux interface
  1948. to apply policy to; or empty. \"*\" indicates that this HostEndpoint
  1949. governs all traffic to, from or through the default network namespace
  1950. of the host named by the \"Node\" field; entering and leaving that
  1951. namespace via any interface, including those from/to non-host-networked
  1952. local workloads. \n If InterfaceName is not \"*\", this HostEndpoint
  1953. only governs traffic that enters or leaves the host through the
  1954. specific interface named by InterfaceName, or - when InterfaceName
  1955. is empty - through the specific interface that has one of the IPs
  1956. in ExpectedIPs. Therefore, when InterfaceName is empty, at least
  1957. one expected IP must be specified. Only external interfaces (such
  1958. as \"eth0\") are supported here; it isn't possible for a HostEndpoint
  1959. to protect traffic through a specific local workload interface.
  1960. \n Note: Only some kinds of policy are implemented for \"*\" HostEndpoints;
  1961. initially just pre-DNAT policy. Please check Calico documentation
  1962. for the latest position."
  1963. type: string
  1964. node:
  1965. description: The node name identifying the Calico node instance.
  1966. type: string
  1967. ports:
  1968. description: Ports contains the endpoint's named ports, which may
  1969. be referenced in security policy rules.
  1970. items:
  1971. properties:
  1972. name:
  1973. type: string
  1974. port:
  1975. type: integer
  1976. protocol:
  1977. anyOf:
  1978. - type: integer
  1979. - type: string
  1980. pattern: ^.*
  1981. x-kubernetes-int-or-string: true
  1982. required:
  1983. - name
  1984. - port
  1985. - protocol
  1986. type: object
  1987. type: array
  1988. profiles:
  1989. description: A list of identifiers of security Profile objects that
  1990. apply to this endpoint. Each profile is applied in the order that
  1991. they appear in this list. Profile rules are applied after the selector-based
  1992. security policy.
  1993. items:
  1994. type: string
  1995. type: array
  1996. type: object
  1997. type: object
  1998. served: true
  1999. storage: true
  2000. status:
  2001. acceptedNames:
  2002. kind: ""
  2003. plural: ""
  2004. conditions: []
  2005. storedVersions: []
  2006. ---
  2007. apiVersion: apiextensions.k8s.io/v1
  2008. kind: CustomResourceDefinition
  2009. metadata:
  2010. name: ipamblocks.crd.projectcalico.org
  2011. spec:
  2012. group: crd.projectcalico.org
  2013. names:
  2014. kind: IPAMBlock
  2015. listKind: IPAMBlockList
  2016. plural: ipamblocks
  2017. singular: ipamblock
  2018. scope: Cluster
  2019. versions:
  2020. - name: v1
  2021. schema:
  2022. openAPIV3Schema:
  2023. properties:
  2024. apiVersion:
  2025. description: 'APIVersion defines the versioned schema of this representation
  2026. of an object. Servers should convert recognized schemas to the latest
  2027. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  2028. type: string
  2029. kind:
  2030. description: 'Kind is a string value representing the REST resource this
  2031. object represents. Servers may infer this from the endpoint the client
  2032. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  2033. type: string
  2034. metadata:
  2035. type: object
  2036. spec:
  2037. description: IPAMBlockSpec contains the specification for an IPAMBlock
  2038. resource.
  2039. properties:
  2040. affinity:
  2041. type: string
  2042. allocations:
  2043. items:
  2044. type: integer
  2045. # TODO: This nullable is manually added in. We should update controller-gen
  2046. # to handle []*int properly itself.
  2047. nullable: true
  2048. type: array
  2049. attributes:
  2050. items:
  2051. properties:
  2052. handle_id:
  2053. type: string
  2054. secondary:
  2055. additionalProperties:
  2056. type: string
  2057. type: object
  2058. type: object
  2059. type: array
  2060. cidr:
  2061. type: string
  2062. deleted:
  2063. type: boolean
  2064. strictAffinity:
  2065. type: boolean
  2066. unallocated:
  2067. items:
  2068. type: integer
  2069. type: array
  2070. required:
  2071. - allocations
  2072. - attributes
  2073. - cidr
  2074. - strictAffinity
  2075. - unallocated
  2076. type: object
  2077. type: object
  2078. served: true
  2079. storage: true
  2080. status:
  2081. acceptedNames:
  2082. kind: ""
  2083. plural: ""
  2084. conditions: []
  2085. storedVersions: []
  2086. ---
  2087. apiVersion: apiextensions.k8s.io/v1
  2088. kind: CustomResourceDefinition
  2089. metadata:
  2090. name: ipamconfigs.crd.projectcalico.org
  2091. spec:
  2092. group: crd.projectcalico.org
  2093. names:
  2094. kind: IPAMConfig
  2095. listKind: IPAMConfigList
  2096. plural: ipamconfigs
  2097. singular: ipamconfig
  2098. scope: Cluster
  2099. versions:
  2100. - name: v1
  2101. schema:
  2102. openAPIV3Schema:
  2103. properties:
  2104. apiVersion:
  2105. description: 'APIVersion defines the versioned schema of this representation
  2106. of an object. Servers should convert recognized schemas to the latest
  2107. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  2108. type: string
  2109. kind:
  2110. description: 'Kind is a string value representing the REST resource this
  2111. object represents. Servers may infer this from the endpoint the client
  2112. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  2113. type: string
  2114. metadata:
  2115. type: object
  2116. spec:
  2117. description: IPAMConfigSpec contains the specification for an IPAMConfig
  2118. resource.
  2119. properties:
  2120. autoAllocateBlocks:
  2121. type: boolean
  2122. maxBlocksPerHost:
  2123. description: MaxBlocksPerHost, if non-zero, is the max number of blocks
  2124. that can be affine to each host.
  2125. type: integer
  2126. strictAffinity:
  2127. type: boolean
  2128. required:
  2129. - autoAllocateBlocks
  2130. - strictAffinity
  2131. type: object
  2132. type: object
  2133. served: true
  2134. storage: true
  2135. status:
  2136. acceptedNames:
  2137. kind: ""
  2138. plural: ""
  2139. conditions: []
  2140. storedVersions: []
  2141. ---
  2142. apiVersion: apiextensions.k8s.io/v1
  2143. kind: CustomResourceDefinition
  2144. metadata:
  2145. name: ipamhandles.crd.projectcalico.org
  2146. spec:
  2147. group: crd.projectcalico.org
  2148. names:
  2149. kind: IPAMHandle
  2150. listKind: IPAMHandleList
  2151. plural: ipamhandles
  2152. singular: ipamhandle
  2153. scope: Cluster
  2154. versions:
  2155. - name: v1
  2156. schema:
  2157. openAPIV3Schema:
  2158. properties:
  2159. apiVersion:
  2160. description: 'APIVersion defines the versioned schema of this representation
  2161. of an object. Servers should convert recognized schemas to the latest
  2162. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  2163. type: string
  2164. kind:
  2165. description: 'Kind is a string value representing the REST resource this
  2166. object represents. Servers may infer this from the endpoint the client
  2167. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  2168. type: string
  2169. metadata:
  2170. type: object
  2171. spec:
  2172. description: IPAMHandleSpec contains the specification for an IPAMHandle
  2173. resource.
  2174. properties:
  2175. block:
  2176. additionalProperties:
  2177. type: integer
  2178. type: object
  2179. deleted:
  2180. type: boolean
  2181. handleID:
  2182. type: string
  2183. required:
  2184. - block
  2185. - handleID
  2186. type: object
  2187. type: object
  2188. served: true
  2189. storage: true
  2190. status:
  2191. acceptedNames:
  2192. kind: ""
  2193. plural: ""
  2194. conditions: []
  2195. storedVersions: []
  2196. ---
  2197. apiVersion: apiextensions.k8s.io/v1
  2198. kind: CustomResourceDefinition
  2199. metadata:
  2200. name: ippools.crd.projectcalico.org
  2201. spec:
  2202. group: crd.projectcalico.org
  2203. names:
  2204. kind: IPPool
  2205. listKind: IPPoolList
  2206. plural: ippools
  2207. singular: ippool
  2208. scope: Cluster
  2209. versions:
  2210. - name: v1
  2211. schema:
  2212. openAPIV3Schema:
  2213. properties:
  2214. apiVersion:
  2215. description: 'APIVersion defines the versioned schema of this representation
  2216. of an object. Servers should convert recognized schemas to the latest
  2217. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  2218. type: string
  2219. kind:
  2220. description: 'Kind is a string value representing the REST resource this
  2221. object represents. Servers may infer this from the endpoint the client
  2222. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  2223. type: string
  2224. metadata:
  2225. type: object
  2226. spec:
  2227. description: IPPoolSpec contains the specification for an IPPool resource.
  2228. properties:
  2229. blockSize:
  2230. description: The block size to use for IP address assignments from
  2231. this pool. Defaults to 26 for IPv4 and 112 for IPv6.
  2232. type: integer
  2233. cidr:
  2234. description: The pool CIDR.
  2235. type: string
  2236. disabled:
  2237. description: When disabled is true, Calico IPAM will not assign addresses
  2238. from this pool.
  2239. type: boolean
  2240. ipip:
  2241. description: 'Deprecated: this field is only used for APIv1 backwards
  2242. compatibility. Setting this field is not allowed, this field is
  2243. for internal use only.'
  2244. properties:
  2245. enabled:
  2246. description: When enabled is true, ipip tunneling will be used
  2247. to deliver packets to destinations within this pool.
  2248. type: boolean
  2249. mode:
  2250. description: The IPIP mode. This can be one of "always" or "cross-subnet". A
  2251. mode of "always" will also use IPIP tunneling for routing to
  2252. destination IP addresses within this pool. A mode of "cross-subnet"
  2253. will only use IPIP tunneling when the destination node is on
  2254. a different subnet to the originating node. The default value
  2255. (if not specified) is "always".
  2256. type: string
  2257. type: object
  2258. ipipMode:
  2259. description: Contains configuration for IPIP tunneling for this pool.
  2260. If not specified, then this is defaulted to "Never" (i.e. IPIP tunneling
  2261. is disabled).
  2262. type: string
  2263. nat-outgoing:
  2264. description: 'Deprecated: this field is only used for APIv1 backwards
  2265. compatibility. Setting this field is not allowed, this field is
  2266. for internal use only.'
  2267. type: boolean
  2268. natOutgoing:
  2269. description: When nat-outgoing is true, packets sent from Calico networked
  2270. containers in this pool to destinations outside of this pool will
  2271. be masqueraded.
  2272. type: boolean
  2273. nodeSelector:
  2274. description: Allows IPPool to allocate for a specific node by label
  2275. selector.
  2276. type: string
  2277. vxlanMode:
  2278. description: Contains configuration for VXLAN tunneling for this pool.
  2279. If not specified, then this is defaulted to "Never" (i.e. VXLAN
  2280. tunneling is disabled).
  2281. type: string
  2282. required:
  2283. - cidr
  2284. type: object
  2285. type: object
  2286. served: true
  2287. storage: true
  2288. status:
  2289. acceptedNames:
  2290. kind: ""
  2291. plural: ""
  2292. conditions: []
  2293. storedVersions: []
  2294. ---
  2295. apiVersion: apiextensions.k8s.io/v1
  2296. kind: CustomResourceDefinition
  2297. metadata:
  2298. name: kubecontrollersconfigurations.crd.projectcalico.org
  2299. spec:
  2300. group: crd.projectcalico.org
  2301. names:
  2302. kind: KubeControllersConfiguration
  2303. listKind: KubeControllersConfigurationList
  2304. plural: kubecontrollersconfigurations
  2305. singular: kubecontrollersconfiguration
  2306. scope: Cluster
  2307. versions:
  2308. - name: v1
  2309. schema:
  2310. openAPIV3Schema:
  2311. properties:
  2312. apiVersion:
  2313. description: 'APIVersion defines the versioned schema of this representation
  2314. of an object. Servers should convert recognized schemas to the latest
  2315. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  2316. type: string
  2317. kind:
  2318. description: 'Kind is a string value representing the REST resource this
  2319. object represents. Servers may infer this from the endpoint the client
  2320. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  2321. type: string
  2322. metadata:
  2323. type: object
  2324. spec:
  2325. description: KubeControllersConfigurationSpec contains the values of the
  2326. Kubernetes controllers configuration.
  2327. properties:
  2328. controllers:
  2329. description: Controllers enables and configures individual Kubernetes
  2330. controllers
  2331. properties:
  2332. namespace:
  2333. description: Namespace enables and configures the namespace controller.
  2334. Enabled by default, set to nil to disable.
  2335. properties:
  2336. reconcilerPeriod:
  2337. description: 'ReconcilerPeriod is the period to perform reconciliation
  2338. with the Calico datastore. [Default: 5m]'
  2339. type: string
  2340. type: object
  2341. node:
  2342. description: Node enables and configures the node controller.
  2343. Enabled by default, set to nil to disable.
  2344. properties:
  2345. hostEndpoint:
  2346. description: HostEndpoint controls syncing nodes to host endpoints.
  2347. Disabled by default, set to nil to disable.
  2348. properties:
  2349. autoCreate:
  2350. description: 'AutoCreate enables automatic creation of
  2351. host endpoints for every node. [Default: Disabled]'
  2352. type: string
  2353. type: object
  2354. leakGracePeriod:
  2355. description: 'LeakGracePeriod is the period used by the controller
  2356. to determine if an IP address has been leaked. Set to 0
  2357. to disable IP garbage collection. [Default: 15m]'
  2358. type: string
  2359. reconcilerPeriod:
  2360. description: 'ReconcilerPeriod is the period to perform reconciliation
  2361. with the Calico datastore. [Default: 5m]'
  2362. type: string
  2363. syncLabels:
  2364. description: 'SyncLabels controls whether to copy Kubernetes
  2365. node labels to Calico nodes. [Default: Enabled]'
  2366. type: string
  2367. type: object
  2368. policy:
  2369. description: Policy enables and configures the policy controller.
  2370. Enabled by default, set to nil to disable.
  2371. properties:
  2372. reconcilerPeriod:
  2373. description: 'ReconcilerPeriod is the period to perform reconciliation
  2374. with the Calico datastore. [Default: 5m]'
  2375. type: string
  2376. type: object
  2377. serviceAccount:
  2378. description: ServiceAccount enables and configures the service
  2379. account controller. Enabled by default, set to nil to disable.
  2380. properties:
  2381. reconcilerPeriod:
  2382. description: 'ReconcilerPeriod is the period to perform reconciliation
  2383. with the Calico datastore. [Default: 5m]'
  2384. type: string
  2385. type: object
  2386. workloadEndpoint:
  2387. description: WorkloadEndpoint enables and configures the workload
  2388. endpoint controller. Enabled by default, set to nil to disable.
  2389. properties:
  2390. reconcilerPeriod:
  2391. description: 'ReconcilerPeriod is the period to perform reconciliation
  2392. with the Calico datastore. [Default: 5m]'
  2393. type: string
  2394. type: object
  2395. type: object
  2396. etcdV3CompactionPeriod:
  2397. description: 'EtcdV3CompactionPeriod is the period between etcdv3
  2398. compaction requests. Set to 0 to disable. [Default: 10m]'
  2399. type: string
  2400. healthChecks:
  2401. description: 'HealthChecks enables or disables support for health
  2402. checks [Default: Enabled]'
  2403. type: string
  2404. logSeverityScreen:
  2405. description: 'LogSeverityScreen is the log severity above which logs
  2406. are sent to the stdout. [Default: Info]'
  2407. type: string
  2408. prometheusMetricsPort:
  2409. description: 'PrometheusMetricsPort is the TCP port that the Prometheus
  2410. metrics server should bind to. Set to 0 to disable. [Default: 9094]'
  2411. type: integer
  2412. required:
  2413. - controllers
  2414. type: object
  2415. status:
  2416. description: KubeControllersConfigurationStatus represents the status
  2417. of the configuration. It's useful for admins to be able to see the actual
  2418. config that was applied, which can be modified by environment variables
  2419. on the kube-controllers process.
  2420. properties:
  2421. environmentVars:
  2422. additionalProperties:
  2423. type: string
  2424. description: EnvironmentVars contains the environment variables on
  2425. the kube-controllers that influenced the RunningConfig.
  2426. type: object
  2427. runningConfig:
  2428. description: RunningConfig contains the effective config that is running
  2429. in the kube-controllers pod, after merging the API resource with
  2430. any environment variables.
  2431. properties:
  2432. controllers:
  2433. description: Controllers enables and configures individual Kubernetes
  2434. controllers
  2435. properties:
  2436. namespace:
  2437. description: Namespace enables and configures the namespace
  2438. controller. Enabled by default, set to nil to disable.
  2439. properties:
  2440. reconcilerPeriod:
  2441. description: 'ReconcilerPeriod is the period to perform
  2442. reconciliation with the Calico datastore. [Default:
  2443. 5m]'
  2444. type: string
  2445. type: object
  2446. node:
  2447. description: Node enables and configures the node controller.
  2448. Enabled by default, set to nil to disable.
  2449. properties:
  2450. hostEndpoint:
  2451. description: HostEndpoint controls syncing nodes to host
  2452. endpoints. Disabled by default, set to nil to disable.
  2453. properties:
  2454. autoCreate:
  2455. description: 'AutoCreate enables automatic creation
  2456. of host endpoints for every node. [Default: Disabled]'
  2457. type: string
  2458. type: object
  2459. leakGracePeriod:
  2460. description: 'LeakGracePeriod is the period used by the
  2461. controller to determine if an IP address has been leaked.
  2462. Set to 0 to disable IP garbage collection. [Default:
  2463. 15m]'
  2464. type: string
  2465. reconcilerPeriod:
  2466. description: 'ReconcilerPeriod is the period to perform
  2467. reconciliation with the Calico datastore. [Default:
  2468. 5m]'
  2469. type: string
  2470. syncLabels:
  2471. description: 'SyncLabels controls whether to copy Kubernetes
  2472. node labels to Calico nodes. [Default: Enabled]'
  2473. type: string
  2474. type: object
  2475. policy:
  2476. description: Policy enables and configures the policy controller.
  2477. Enabled by default, set to nil to disable.
  2478. properties:
  2479. reconcilerPeriod:
  2480. description: 'ReconcilerPeriod is the period to perform
  2481. reconciliation with the Calico datastore. [Default:
  2482. 5m]'
  2483. type: string
  2484. type: object
  2485. serviceAccount:
  2486. description: ServiceAccount enables and configures the service
  2487. account controller. Enabled by default, set to nil to disable.
  2488. properties:
  2489. reconcilerPeriod:
  2490. description: 'ReconcilerPeriod is the period to perform
  2491. reconciliation with the Calico datastore. [Default:
  2492. 5m]'
  2493. type: string
  2494. type: object
  2495. workloadEndpoint:
  2496. description: WorkloadEndpoint enables and configures the workload
  2497. endpoint controller. Enabled by default, set to nil to disable.
  2498. properties:
  2499. reconcilerPeriod:
  2500. description: 'ReconcilerPeriod is the period to perform
  2501. reconciliation with the Calico datastore. [Default:
  2502. 5m]'
  2503. type: string
  2504. type: object
  2505. type: object
  2506. etcdV3CompactionPeriod:
  2507. description: 'EtcdV3CompactionPeriod is the period between etcdv3
  2508. compaction requests. Set to 0 to disable. [Default: 10m]'
  2509. type: string
  2510. healthChecks:
  2511. description: 'HealthChecks enables or disables support for health
  2512. checks [Default: Enabled]'
  2513. type: string
  2514. logSeverityScreen:
  2515. description: 'LogSeverityScreen is the log severity above which
  2516. logs are sent to the stdout. [Default: Info]'
  2517. type: string
  2518. prometheusMetricsPort:
  2519. description: 'PrometheusMetricsPort is the TCP port that the Prometheus
  2520. metrics server should bind to. Set to 0 to disable. [Default:
  2521. 9094]'
  2522. type: integer
  2523. required:
  2524. - controllers
  2525. type: object
  2526. type: object
  2527. type: object
  2528. served: true
  2529. storage: true
  2530. status:
  2531. acceptedNames:
  2532. kind: ""
  2533. plural: ""
  2534. conditions: []
  2535. storedVersions: []
  2536. ---
  2537. apiVersion: apiextensions.k8s.io/v1
  2538. kind: CustomResourceDefinition
  2539. metadata:
  2540. name: networkpolicies.crd.projectcalico.org
  2541. spec:
  2542. group: crd.projectcalico.org
  2543. names:
  2544. kind: NetworkPolicy
  2545. listKind: NetworkPolicyList
  2546. plural: networkpolicies
  2547. singular: networkpolicy
  2548. scope: Namespaced
  2549. versions:
  2550. - name: v1
  2551. schema:
  2552. openAPIV3Schema:
  2553. properties:
  2554. apiVersion:
  2555. description: 'APIVersion defines the versioned schema of this representation
  2556. of an object. Servers should convert recognized schemas to the latest
  2557. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  2558. type: string
  2559. kind:
  2560. description: 'Kind is a string value representing the REST resource this
  2561. object represents. Servers may infer this from the endpoint the client
  2562. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  2563. type: string
  2564. metadata:
  2565. type: object
  2566. spec:
  2567. properties:
  2568. egress:
  2569. description: The ordered set of egress rules. Each rule contains
  2570. a set of packet match criteria and a corresponding action to apply.
  2571. items:
  2572. description: "A Rule encapsulates a set of match criteria and an
  2573. action. Both selector-based security Policy and security Profiles
  2574. reference rules - separated out as a list of rules for both ingress
  2575. and egress packet matching. \n Each positive match criteria has
  2576. a negated version, prefixed with \"Not\". All the match criteria
  2577. within a rule must be satisfied for a packet to match. A single
  2578. rule can contain the positive and negative version of a match
  2579. and both must be satisfied for the rule to match."
  2580. properties:
  2581. action:
  2582. type: string
  2583. destination:
  2584. description: Destination contains the match criteria that apply
  2585. to destination entity.
  2586. properties:
  2587. namespaceSelector:
  2588. description: "NamespaceSelector is an optional field that
  2589. contains a selector expression. Only traffic that originates
  2590. from (or terminates at) endpoints within the selected
  2591. namespaces will be matched. When both NamespaceSelector
  2592. and another selector are defined on the same rule, then
  2593. only workload endpoints that are matched by both selectors
  2594. will be selected by the rule. \n For NetworkPolicy, an
  2595. empty NamespaceSelector implies that the Selector is limited
  2596. to selecting only workload endpoints in the same namespace
  2597. as the NetworkPolicy. \n For NetworkPolicy, `global()`
  2598. NamespaceSelector implies that the Selector is limited
  2599. to selecting only GlobalNetworkSet or HostEndpoint. \n
  2600. For GlobalNetworkPolicy, an empty NamespaceSelector implies
  2601. the Selector applies to workload endpoints across all
  2602. namespaces."
  2603. type: string
  2604. nets:
  2605. description: Nets is an optional field that restricts the
  2606. rule to only apply to traffic that originates from (or
  2607. terminates at) IP addresses in any of the given subnets.
  2608. items:
  2609. type: string
  2610. type: array
  2611. notNets:
  2612. description: NotNets is the negated version of the Nets
  2613. field.
  2614. items:
  2615. type: string
  2616. type: array
  2617. notPorts:
  2618. description: NotPorts is the negated version of the Ports
  2619. field. Since only some protocols have ports, if any ports
  2620. are specified it requires the Protocol match in the Rule
  2621. to be set to "TCP" or "UDP".
  2622. items:
  2623. anyOf:
  2624. - type: integer
  2625. - type: string
  2626. pattern: ^.*
  2627. x-kubernetes-int-or-string: true
  2628. type: array
  2629. notSelector:
  2630. description: NotSelector is the negated version of the Selector
  2631. field. See Selector field for subtleties with negated
  2632. selectors.
  2633. type: string
  2634. ports:
  2635. description: "Ports is an optional field that restricts
  2636. the rule to only apply to traffic that has a source (destination)
  2637. port that matches one of these ranges/values. This value
  2638. is a list of integers or strings that represent ranges
  2639. of ports. \n Since only some protocols have ports, if
  2640. any ports are specified it requires the Protocol match
  2641. in the Rule to be set to \"TCP\" or \"UDP\"."
  2642. items:
  2643. anyOf:
  2644. - type: integer
  2645. - type: string
  2646. pattern: ^.*
  2647. x-kubernetes-int-or-string: true
  2648. type: array
  2649. selector:
  2650. description: "Selector is an optional field that contains
  2651. a selector expression (see Policy for sample syntax).
  2652. \ Only traffic that originates from (terminates at) endpoints
  2653. matching the selector will be matched. \n Note that: in
  2654. addition to the negated version of the Selector (see NotSelector
  2655. below), the selector expression syntax itself supports
  2656. negation. The two types of negation are subtly different.
  2657. One negates the set of matched endpoints, the other negates
  2658. the whole match: \n \tSelector = \"!has(my_label)\" matches
  2659. packets that are from other Calico-controlled \tendpoints
  2660. that do not have the label \"my_label\". \n \tNotSelector
  2661. = \"has(my_label)\" matches packets that are not from
  2662. Calico-controlled \tendpoints that do have the label \"my_label\".
  2663. \n The effect is that the latter will accept packets from
  2664. non-Calico sources whereas the former is limited to packets
  2665. from Calico-controlled endpoints."
  2666. type: string
  2667. serviceAccounts:
  2668. description: ServiceAccounts is an optional field that restricts
  2669. the rule to only apply to traffic that originates from
  2670. (or terminates at) a pod running as a matching service
  2671. account.
  2672. properties:
  2673. names:
  2674. description: Names is an optional field that restricts
  2675. the rule to only apply to traffic that originates
  2676. from (or terminates at) a pod running as a service
  2677. account whose name is in the list.
  2678. items:
  2679. type: string
  2680. type: array
  2681. selector:
  2682. description: Selector is an optional field that restricts
  2683. the rule to only apply to traffic that originates
  2684. from (or terminates at) a pod running as a service
  2685. account that matches the given label selector. If
  2686. both Names and Selector are specified then they are
  2687. AND'ed.
  2688. type: string
  2689. type: object
  2690. services:
  2691. description: "Services is an optional field that contains
  2692. options for matching Kubernetes Services. If specified,
  2693. only traffic that originates from or terminates at endpoints
  2694. within the selected service(s) will be matched, and only
  2695. to/from each endpoint's port. \n Services cannot be specified
  2696. on the same rule as Selector, NotSelector, NamespaceSelector,
  2697. Ports, NotPorts, Nets, NotNets or ServiceAccounts. \n
  2698. Only valid on egress rules."
  2699. properties:
  2700. name:
  2701. description: Name specifies the name of a Kubernetes
  2702. Service to match.
  2703. type: string
  2704. namespace:
  2705. description: Namespace specifies the namespace of the
  2706. given Service. If left empty, the rule will match
  2707. within this policy's namespace.
  2708. type: string
  2709. type: object
  2710. type: object
  2711. http:
  2712. description: HTTP contains match criteria that apply to HTTP
  2713. requests.
  2714. properties:
  2715. methods:
  2716. description: Methods is an optional field that restricts
  2717. the rule to apply only to HTTP requests that use one of
  2718. the listed HTTP Methods (e.g. GET, PUT, etc.) Multiple
  2719. methods are OR'd together.
  2720. items:
  2721. type: string
  2722. type: array
  2723. paths:
  2724. description: 'Paths is an optional field that restricts
  2725. the rule to apply to HTTP requests that use one of the
  2726. listed HTTP Paths. Multiple paths are OR''d together.
  2727. e.g: - exact: /foo - prefix: /bar NOTE: Each entry may
  2728. ONLY specify either a `exact` or a `prefix` match. The
  2729. validator will check for it.'
  2730. items:
  2731. description: 'HTTPPath specifies an HTTP path to match.
  2732. It may be either of the form: exact: <path>: which matches
  2733. the path exactly or prefix: <path-prefix>: which matches
  2734. the path prefix'
  2735. properties:
  2736. exact:
  2737. type: string
  2738. prefix:
  2739. type: string
  2740. type: object
  2741. type: array
  2742. type: object
  2743. icmp:
  2744. description: ICMP is an optional field that restricts the rule
  2745. to apply to a specific type and code of ICMP traffic. This
  2746. should only be specified if the Protocol field is set to "ICMP"
  2747. or "ICMPv6".
  2748. properties:
  2749. code:
  2750. description: Match on a specific ICMP code. If specified,
  2751. the Type value must also be specified. This is a technical
  2752. limitation imposed by the kernel's iptables firewall,
  2753. which Calico uses to enforce the rule.
  2754. type: integer
  2755. type:
  2756. description: Match on a specific ICMP type. For example
  2757. a value of 8 refers to ICMP Echo Request (i.e. pings).
  2758. type: integer
  2759. type: object
  2760. ipVersion:
  2761. description: IPVersion is an optional field that restricts the
  2762. rule to only match a specific IP version.
  2763. type: integer
  2764. metadata:
  2765. description: Metadata contains additional information for this
  2766. rule
  2767. properties:
  2768. annotations:
  2769. additionalProperties:
  2770. type: string
  2771. description: Annotations is a set of key value pairs that
  2772. give extra information about the rule
  2773. type: object
  2774. type: object
  2775. notICMP:
  2776. description: NotICMP is the negated version of the ICMP field.
  2777. properties:
  2778. code:
  2779. description: Match on a specific ICMP code. If specified,
  2780. the Type value must also be specified. This is a technical
  2781. limitation imposed by the kernel's iptables firewall,
  2782. which Calico uses to enforce the rule.
  2783. type: integer
  2784. type:
  2785. description: Match on a specific ICMP type. For example
  2786. a value of 8 refers to ICMP Echo Request (i.e. pings).
  2787. type: integer
  2788. type: object
  2789. notProtocol:
  2790. anyOf:
  2791. - type: integer
  2792. - type: string
  2793. description: NotProtocol is the negated version of the Protocol
  2794. field.
  2795. pattern: ^.*
  2796. x-kubernetes-int-or-string: true
  2797. protocol:
  2798. anyOf:
  2799. - type: integer
  2800. - type: string
  2801. description: "Protocol is an optional field that restricts the
  2802. rule to only apply to traffic of a specific IP protocol. Required
  2803. if any of the EntityRules contain Ports (because ports only
  2804. apply to certain protocols). \n Must be one of these string
  2805. values: \"TCP\", \"UDP\", \"ICMP\", \"ICMPv6\", \"SCTP\",
  2806. \"UDPLite\" or an integer in the range 1-255."
  2807. pattern: ^.*
  2808. x-kubernetes-int-or-string: true
  2809. source:
  2810. description: Source contains the match criteria that apply to
  2811. source entity.
  2812. properties:
  2813. namespaceSelector:
  2814. description: "NamespaceSelector is an optional field that
  2815. contains a selector expression. Only traffic that originates
  2816. from (or terminates at) endpoints within the selected
  2817. namespaces will be matched. When both NamespaceSelector
  2818. and another selector are defined on the same rule, then
  2819. only workload endpoints that are matched by both selectors
  2820. will be selected by the rule. \n For NetworkPolicy, an
  2821. empty NamespaceSelector implies that the Selector is limited
  2822. to selecting only workload endpoints in the same namespace
  2823. as the NetworkPolicy. \n For NetworkPolicy, `global()`
  2824. NamespaceSelector implies that the Selector is limited
  2825. to selecting only GlobalNetworkSet or HostEndpoint. \n
  2826. For GlobalNetworkPolicy, an empty NamespaceSelector implies
  2827. the Selector applies to workload endpoints across all
  2828. namespaces."
  2829. type: string
  2830. nets:
  2831. description: Nets is an optional field that restricts the
  2832. rule to only apply to traffic that originates from (or
  2833. terminates at) IP addresses in any of the given subnets.
  2834. items:
  2835. type: string
  2836. type: array
  2837. notNets:
  2838. description: NotNets is the negated version of the Nets
  2839. field.
  2840. items:
  2841. type: string
  2842. type: array
  2843. notPorts:
  2844. description: NotPorts is the negated version of the Ports
  2845. field. Since only some protocols have ports, if any ports
  2846. are specified it requires the Protocol match in the Rule
  2847. to be set to "TCP" or "UDP".
  2848. items:
  2849. anyOf:
  2850. - type: integer
  2851. - type: string
  2852. pattern: ^.*
  2853. x-kubernetes-int-or-string: true
  2854. type: array
  2855. notSelector:
  2856. description: NotSelector is the negated version of the Selector
  2857. field. See Selector field for subtleties with negated
  2858. selectors.
  2859. type: string
  2860. ports:
  2861. description: "Ports is an optional field that restricts
  2862. the rule to only apply to traffic that has a source (destination)
  2863. port that matches one of these ranges/values. This value
  2864. is a list of integers or strings that represent ranges
  2865. of ports. \n Since only some protocols have ports, if
  2866. any ports are specified it requires the Protocol match
  2867. in the Rule to be set to \"TCP\" or \"UDP\"."
  2868. items:
  2869. anyOf:
  2870. - type: integer
  2871. - type: string
  2872. pattern: ^.*
  2873. x-kubernetes-int-or-string: true
  2874. type: array
  2875. selector:
  2876. description: "Selector is an optional field that contains
  2877. a selector expression (see Policy for sample syntax).
  2878. \ Only traffic that originates from (terminates at) endpoints
  2879. matching the selector will be matched. \n Note that: in
  2880. addition to the negated version of the Selector (see NotSelector
  2881. below), the selector expression syntax itself supports
  2882. negation. The two types of negation are subtly different.
  2883. One negates the set of matched endpoints, the other negates
  2884. the whole match: \n \tSelector = \"!has(my_label)\" matches
  2885. packets that are from other Calico-controlled \tendpoints
  2886. that do not have the label \"my_label\". \n \tNotSelector
  2887. = \"has(my_label)\" matches packets that are not from
  2888. Calico-controlled \tendpoints that do have the label \"my_label\".
  2889. \n The effect is that the latter will accept packets from
  2890. non-Calico sources whereas the former is limited to packets
  2891. from Calico-controlled endpoints."
  2892. type: string
  2893. serviceAccounts:
  2894. description: ServiceAccounts is an optional field that restricts
  2895. the rule to only apply to traffic that originates from
  2896. (or terminates at) a pod running as a matching service
  2897. account.
  2898. properties:
  2899. names:
  2900. description: Names is an optional field that restricts
  2901. the rule to only apply to traffic that originates
  2902. from (or terminates at) a pod running as a service
  2903. account whose name is in the list.
  2904. items:
  2905. type: string
  2906. type: array
  2907. selector:
  2908. description: Selector is an optional field that restricts
  2909. the rule to only apply to traffic that originates
  2910. from (or terminates at) a pod running as a service
  2911. account that matches the given label selector. If
  2912. both Names and Selector are specified then they are
  2913. AND'ed.
  2914. type: string
  2915. type: object
  2916. services:
  2917. description: "Services is an optional field that contains
  2918. options for matching Kubernetes Services. If specified,
  2919. only traffic that originates from or terminates at endpoints
  2920. within the selected service(s) will be matched, and only
  2921. to/from each endpoint's port. \n Services cannot be specified
  2922. on the same rule as Selector, NotSelector, NamespaceSelector,
  2923. Ports, NotPorts, Nets, NotNets or ServiceAccounts. \n
  2924. Only valid on egress rules."
  2925. properties:
  2926. name:
  2927. description: Name specifies the name of a Kubernetes
  2928. Service to match.
  2929. type: string
  2930. namespace:
  2931. description: Namespace specifies the namespace of the
  2932. given Service. If left empty, the rule will match
  2933. within this policy's namespace.
  2934. type: string
  2935. type: object
  2936. type: object
  2937. required:
  2938. - action
  2939. type: object
  2940. type: array
  2941. ingress:
  2942. description: The ordered set of ingress rules. Each rule contains
  2943. a set of packet match criteria and a corresponding action to apply.
  2944. items:
  2945. description: "A Rule encapsulates a set of match criteria and an
  2946. action. Both selector-based security Policy and security Profiles
  2947. reference rules - separated out as a list of rules for both ingress
  2948. and egress packet matching. \n Each positive match criteria has
  2949. a negated version, prefixed with \"Not\". All the match criteria
  2950. within a rule must be satisfied for a packet to match. A single
  2951. rule can contain the positive and negative version of a match
  2952. and both must be satisfied for the rule to match."
  2953. properties:
  2954. action:
  2955. type: string
  2956. destination:
  2957. description: Destination contains the match criteria that apply
  2958. to destination entity.
  2959. properties:
  2960. namespaceSelector:
  2961. description: "NamespaceSelector is an optional field that
  2962. contains a selector expression. Only traffic that originates
  2963. from (or terminates at) endpoints within the selected
  2964. namespaces will be matched. When both NamespaceSelector
  2965. and another selector are defined on the same rule, then
  2966. only workload endpoints that are matched by both selectors
  2967. will be selected by the rule. \n For NetworkPolicy, an
  2968. empty NamespaceSelector implies that the Selector is limited
  2969. to selecting only workload endpoints in the same namespace
  2970. as the NetworkPolicy. \n For NetworkPolicy, `global()`
  2971. NamespaceSelector implies that the Selector is limited
  2972. to selecting only GlobalNetworkSet or HostEndpoint. \n
  2973. For GlobalNetworkPolicy, an empty NamespaceSelector implies
  2974. the Selector applies to workload endpoints across all
  2975. namespaces."
  2976. type: string
  2977. nets:
  2978. description: Nets is an optional field that restricts the
  2979. rule to only apply to traffic that originates from (or
  2980. terminates at) IP addresses in any of the given subnets.
  2981. items:
  2982. type: string
  2983. type: array
  2984. notNets:
  2985. description: NotNets is the negated version of the Nets
  2986. field.
  2987. items:
  2988. type: string
  2989. type: array
  2990. notPorts:
  2991. description: NotPorts is the negated version of the Ports
  2992. field. Since only some protocols have ports, if any ports
  2993. are specified it requires the Protocol match in the Rule
  2994. to be set to "TCP" or "UDP".
  2995. items:
  2996. anyOf:
  2997. - type: integer
  2998. - type: string
  2999. pattern: ^.*
  3000. x-kubernetes-int-or-string: true
  3001. type: array
  3002. notSelector:
  3003. description: NotSelector is the negated version of the Selector
  3004. field. See Selector field for subtleties with negated
  3005. selectors.
  3006. type: string
  3007. ports:
  3008. description: "Ports is an optional field that restricts
  3009. the rule to only apply to traffic that has a source (destination)
  3010. port that matches one of these ranges/values. This value
  3011. is a list of integers or strings that represent ranges
  3012. of ports. \n Since only some protocols have ports, if
  3013. any ports are specified it requires the Protocol match
  3014. in the Rule to be set to \"TCP\" or \"UDP\"."
  3015. items:
  3016. anyOf:
  3017. - type: integer
  3018. - type: string
  3019. pattern: ^.*
  3020. x-kubernetes-int-or-string: true
  3021. type: array
  3022. selector:
  3023. description: "Selector is an optional field that contains
  3024. a selector expression (see Policy for sample syntax).
  3025. \ Only traffic that originates from (terminates at) endpoints
  3026. matching the selector will be matched. \n Note that: in
  3027. addition to the negated version of the Selector (see NotSelector
  3028. below), the selector expression syntax itself supports
  3029. negation. The two types of negation are subtly different.
  3030. One negates the set of matched endpoints, the other negates
  3031. the whole match: \n \tSelector = \"!has(my_label)\" matches
  3032. packets that are from other Calico-controlled \tendpoints
  3033. that do not have the label \"my_label\". \n \tNotSelector
  3034. = \"has(my_label)\" matches packets that are not from
  3035. Calico-controlled \tendpoints that do have the label \"my_label\".
  3036. \n The effect is that the latter will accept packets from
  3037. non-Calico sources whereas the former is limited to packets
  3038. from Calico-controlled endpoints."
  3039. type: string
  3040. serviceAccounts:
  3041. description: ServiceAccounts is an optional field that restricts
  3042. the rule to only apply to traffic that originates from
  3043. (or terminates at) a pod running as a matching service
  3044. account.
  3045. properties:
  3046. names:
  3047. description: Names is an optional field that restricts
  3048. the rule to only apply to traffic that originates
  3049. from (or terminates at) a pod running as a service
  3050. account whose name is in the list.
  3051. items:
  3052. type: string
  3053. type: array
  3054. selector:
  3055. description: Selector is an optional field that restricts
  3056. the rule to only apply to traffic that originates
  3057. from (or terminates at) a pod running as a service
  3058. account that matches the given label selector. If
  3059. both Names and Selector are specified then they are
  3060. AND'ed.
  3061. type: string
  3062. type: object
  3063. services:
  3064. description: "Services is an optional field that contains
  3065. options for matching Kubernetes Services. If specified,
  3066. only traffic that originates from or terminates at endpoints
  3067. within the selected service(s) will be matched, and only
  3068. to/from each endpoint's port. \n Services cannot be specified
  3069. on the same rule as Selector, NotSelector, NamespaceSelector,
  3070. Ports, NotPorts, Nets, NotNets or ServiceAccounts. \n
  3071. Only valid on egress rules."
  3072. properties:
  3073. name:
  3074. description: Name specifies the name of a Kubernetes
  3075. Service to match.
  3076. type: string
  3077. namespace:
  3078. description: Namespace specifies the namespace of the
  3079. given Service. If left empty, the rule will match
  3080. within this policy's namespace.
  3081. type: string
  3082. type: object
  3083. type: object
  3084. http:
  3085. description: HTTP contains match criteria that apply to HTTP
  3086. requests.
  3087. properties:
  3088. methods:
  3089. description: Methods is an optional field that restricts
  3090. the rule to apply only to HTTP requests that use one of
  3091. the listed HTTP Methods (e.g. GET, PUT, etc.) Multiple
  3092. methods are OR'd together.
  3093. items:
  3094. type: string
  3095. type: array
  3096. paths:
  3097. description: 'Paths is an optional field that restricts
  3098. the rule to apply to HTTP requests that use one of the
  3099. listed HTTP Paths. Multiple paths are OR''d together.
  3100. e.g: - exact: /foo - prefix: /bar NOTE: Each entry may
  3101. ONLY specify either a `exact` or a `prefix` match. The
  3102. validator will check for it.'
  3103. items:
  3104. description: 'HTTPPath specifies an HTTP path to match.
  3105. It may be either of the form: exact: <path>: which matches
  3106. the path exactly or prefix: <path-prefix>: which matches
  3107. the path prefix'
  3108. properties:
  3109. exact:
  3110. type: string
  3111. prefix:
  3112. type: string
  3113. type: object
  3114. type: array
  3115. type: object
  3116. icmp:
  3117. description: ICMP is an optional field that restricts the rule
  3118. to apply to a specific type and code of ICMP traffic. This
  3119. should only be specified if the Protocol field is set to "ICMP"
  3120. or "ICMPv6".
  3121. properties:
  3122. code:
  3123. description: Match on a specific ICMP code. If specified,
  3124. the Type value must also be specified. This is a technical
  3125. limitation imposed by the kernel's iptables firewall,
  3126. which Calico uses to enforce the rule.
  3127. type: integer
  3128. type:
  3129. description: Match on a specific ICMP type. For example
  3130. a value of 8 refers to ICMP Echo Request (i.e. pings).
  3131. type: integer
  3132. type: object
  3133. ipVersion:
  3134. description: IPVersion is an optional field that restricts the
  3135. rule to only match a specific IP version.
  3136. type: integer
  3137. metadata:
  3138. description: Metadata contains additional information for this
  3139. rule
  3140. properties:
  3141. annotations:
  3142. additionalProperties:
  3143. type: string
  3144. description: Annotations is a set of key value pairs that
  3145. give extra information about the rule
  3146. type: object
  3147. type: object
  3148. notICMP:
  3149. description: NotICMP is the negated version of the ICMP field.
  3150. properties:
  3151. code:
  3152. description: Match on a specific ICMP code. If specified,
  3153. the Type value must also be specified. This is a technical
  3154. limitation imposed by the kernel's iptables firewall,
  3155. which Calico uses to enforce the rule.
  3156. type: integer
  3157. type:
  3158. description: Match on a specific ICMP type. For example
  3159. a value of 8 refers to ICMP Echo Request (i.e. pings).
  3160. type: integer
  3161. type: object
  3162. notProtocol:
  3163. anyOf:
  3164. - type: integer
  3165. - type: string
  3166. description: NotProtocol is the negated version of the Protocol
  3167. field.
  3168. pattern: ^.*
  3169. x-kubernetes-int-or-string: true
  3170. protocol:
  3171. anyOf:
  3172. - type: integer
  3173. - type: string
  3174. description: "Protocol is an optional field that restricts the
  3175. rule to only apply to traffic of a specific IP protocol. Required
  3176. if any of the EntityRules contain Ports (because ports only
  3177. apply to certain protocols). \n Must be one of these string
  3178. values: \"TCP\", \"UDP\", \"ICMP\", \"ICMPv6\", \"SCTP\",
  3179. \"UDPLite\" or an integer in the range 1-255."
  3180. pattern: ^.*
  3181. x-kubernetes-int-or-string: true
  3182. source:
  3183. description: Source contains the match criteria that apply to
  3184. source entity.
  3185. properties:
  3186. namespaceSelector:
  3187. description: "NamespaceSelector is an optional field that
  3188. contains a selector expression. Only traffic that originates
  3189. from (or terminates at) endpoints within the selected
  3190. namespaces will be matched. When both NamespaceSelector
  3191. and another selector are defined on the same rule, then
  3192. only workload endpoints that are matched by both selectors
  3193. will be selected by the rule. \n For NetworkPolicy, an
  3194. empty NamespaceSelector implies that the Selector is limited
  3195. to selecting only workload endpoints in the same namespace
  3196. as the NetworkPolicy. \n For NetworkPolicy, `global()`
  3197. NamespaceSelector implies that the Selector is limited
  3198. to selecting only GlobalNetworkSet or HostEndpoint. \n
  3199. For GlobalNetworkPolicy, an empty NamespaceSelector implies
  3200. the Selector applies to workload endpoints across all
  3201. namespaces."
  3202. type: string
  3203. nets:
  3204. description: Nets is an optional field that restricts the
  3205. rule to only apply to traffic that originates from (or
  3206. terminates at) IP addresses in any of the given subnets.
  3207. items:
  3208. type: string
  3209. type: array
  3210. notNets:
  3211. description: NotNets is the negated version of the Nets
  3212. field.
  3213. items:
  3214. type: string
  3215. type: array
  3216. notPorts:
  3217. description: NotPorts is the negated version of the Ports
  3218. field. Since only some protocols have ports, if any ports
  3219. are specified it requires the Protocol match in the Rule
  3220. to be set to "TCP" or "UDP".
  3221. items:
  3222. anyOf:
  3223. - type: integer
  3224. - type: string
  3225. pattern: ^.*
  3226. x-kubernetes-int-or-string: true
  3227. type: array
  3228. notSelector:
  3229. description: NotSelector is the negated version of the Selector
  3230. field. See Selector field for subtleties with negated
  3231. selectors.
  3232. type: string
  3233. ports:
  3234. description: "Ports is an optional field that restricts
  3235. the rule to only apply to traffic that has a source (destination)
  3236. port that matches one of these ranges/values. This value
  3237. is a list of integers or strings that represent ranges
  3238. of ports. \n Since only some protocols have ports, if
  3239. any ports are specified it requires the Protocol match
  3240. in the Rule to be set to \"TCP\" or \"UDP\"."
  3241. items:
  3242. anyOf:
  3243. - type: integer
  3244. - type: string
  3245. pattern: ^.*
  3246. x-kubernetes-int-or-string: true
  3247. type: array
  3248. selector:
  3249. description: "Selector is an optional field that contains
  3250. a selector expression (see Policy for sample syntax).
  3251. \ Only traffic that originates from (terminates at) endpoints
  3252. matching the selector will be matched. \n Note that: in
  3253. addition to the negated version of the Selector (see NotSelector
  3254. below), the selector expression syntax itself supports
  3255. negation. The two types of negation are subtly different.
  3256. One negates the set of matched endpoints, the other negates
  3257. the whole match: \n \tSelector = \"!has(my_label)\" matches
  3258. packets that are from other Calico-controlled \tendpoints
  3259. that do not have the label \"my_label\". \n \tNotSelector
  3260. = \"has(my_label)\" matches packets that are not from
  3261. Calico-controlled \tendpoints that do have the label \"my_label\".
  3262. \n The effect is that the latter will accept packets from
  3263. non-Calico sources whereas the former is limited to packets
  3264. from Calico-controlled endpoints."
  3265. type: string
  3266. serviceAccounts:
  3267. description: ServiceAccounts is an optional field that restricts
  3268. the rule to only apply to traffic that originates from
  3269. (or terminates at) a pod running as a matching service
  3270. account.
  3271. properties:
  3272. names:
  3273. description: Names is an optional field that restricts
  3274. the rule to only apply to traffic that originates
  3275. from (or terminates at) a pod running as a service
  3276. account whose name is in the list.
  3277. items:
  3278. type: string
  3279. type: array
  3280. selector:
  3281. description: Selector is an optional field that restricts
  3282. the rule to only apply to traffic that originates
  3283. from (or terminates at) a pod running as a service
  3284. account that matches the given label selector. If
  3285. both Names and Selector are specified then they are
  3286. AND'ed.
  3287. type: string
  3288. type: object
  3289. services:
  3290. description: "Services is an optional field that contains
  3291. options for matching Kubernetes Services. If specified,
  3292. only traffic that originates from or terminates at endpoints
  3293. within the selected service(s) will be matched, and only
  3294. to/from each endpoint's port. \n Services cannot be specified
  3295. on the same rule as Selector, NotSelector, NamespaceSelector,
  3296. Ports, NotPorts, Nets, NotNets or ServiceAccounts. \n
  3297. Only valid on egress rules."
  3298. properties:
  3299. name:
  3300. description: Name specifies the name of a Kubernetes
  3301. Service to match.
  3302. type: string
  3303. namespace:
  3304. description: Namespace specifies the namespace of the
  3305. given Service. If left empty, the rule will match
  3306. within this policy's namespace.
  3307. type: string
  3308. type: object
  3309. type: object
  3310. required:
  3311. - action
  3312. type: object
  3313. type: array
  3314. order:
  3315. description: Order is an optional field that specifies the order in
  3316. which the policy is applied. Policies with higher "order" are applied
  3317. after those with lower order. If the order is omitted, it may be
  3318. considered to be "infinite" - i.e. the policy will be applied last. Policies
  3319. with identical order will be applied in alphanumerical order based
  3320. on the Policy "Name".
  3321. type: number
  3322. selector:
  3323. description: "The selector is an expression used to pick pick out
  3324. the endpoints that the policy should be applied to. \n Selector
  3325. expressions follow this syntax: \n \tlabel == \"string_literal\"
  3326. \ -> comparison, e.g. my_label == \"foo bar\" \tlabel != \"string_literal\"
  3327. \ -> not equal; also matches if label is not present \tlabel in
  3328. { \"a\", \"b\", \"c\", ... } -> true if the value of label X is
  3329. one of \"a\", \"b\", \"c\" \tlabel not in { \"a\", \"b\", \"c\",
  3330. ... } -> true if the value of label X is not one of \"a\", \"b\",
  3331. \"c\" \thas(label_name) -> True if that label is present \t! expr
  3332. -> negation of expr \texpr && expr -> Short-circuit and \texpr
  3333. || expr -> Short-circuit or \t( expr ) -> parens for grouping \tall()
  3334. or the empty selector -> matches all endpoints. \n Label names are
  3335. allowed to contain alphanumerics, -, _ and /. String literals are
  3336. more permissive but they do not support escape characters. \n Examples
  3337. (with made-up labels): \n \ttype == \"webserver\" && deployment
  3338. == \"prod\" \ttype in {\"frontend\", \"backend\"} \tdeployment !=
  3339. \"dev\" \t! has(label_name)"
  3340. type: string
  3341. serviceAccountSelector:
  3342. description: ServiceAccountSelector is an optional field for an expression
  3343. used to select a pod based on service accounts.
  3344. type: string
  3345. types:
  3346. description: "Types indicates whether this policy applies to ingress,
  3347. or to egress, or to both. When not explicitly specified (and so
  3348. the value on creation is empty or nil), Calico defaults Types according
  3349. to what Ingress and Egress are present in the policy. The default
  3350. is: \n - [ PolicyTypeIngress ], if there are no Egress rules (including
  3351. the case where there are also no Ingress rules) \n - [ PolicyTypeEgress
  3352. ], if there are Egress rules but no Ingress rules \n - [ PolicyTypeIngress,
  3353. PolicyTypeEgress ], if there are both Ingress and Egress rules.
  3354. \n When the policy is read back again, Types will always be one
  3355. of these values, never empty or nil."
  3356. items:
  3357. description: PolicyType enumerates the possible values of the PolicySpec
  3358. Types field.
  3359. type: string
  3360. type: array
  3361. type: object
  3362. type: object
  3363. served: true
  3364. storage: true
  3365. status:
  3366. acceptedNames:
  3367. kind: ""
  3368. plural: ""
  3369. conditions: []
  3370. storedVersions: []
  3371. ---
  3372. apiVersion: apiextensions.k8s.io/v1
  3373. kind: CustomResourceDefinition
  3374. metadata:
  3375. name: networksets.crd.projectcalico.org
  3376. spec:
  3377. group: crd.projectcalico.org
  3378. names:
  3379. kind: NetworkSet
  3380. listKind: NetworkSetList
  3381. plural: networksets
  3382. singular: networkset
  3383. scope: Namespaced
  3384. versions:
  3385. - name: v1
  3386. schema:
  3387. openAPIV3Schema:
  3388. description: NetworkSet is the Namespaced-equivalent of the GlobalNetworkSet.
  3389. properties:
  3390. apiVersion:
  3391. description: 'APIVersion defines the versioned schema of this representation
  3392. of an object. Servers should convert recognized schemas to the latest
  3393. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  3394. type: string
  3395. kind:
  3396. description: 'Kind is a string value representing the REST resource this
  3397. object represents. Servers may infer this from the endpoint the client
  3398. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  3399. type: string
  3400. metadata:
  3401. type: object
  3402. spec:
  3403. description: NetworkSetSpec contains the specification for a NetworkSet
  3404. resource.
  3405. properties:
  3406. nets:
  3407. description: The list of IP networks that belong to this set.
  3408. items:
  3409. type: string
  3410. type: array
  3411. type: object
  3412. type: object
  3413. served: true
  3414. storage: true
  3415. status:
  3416. acceptedNames:
  3417. kind: ""
  3418. plural: ""
  3419. conditions: []
  3420. storedVersions: []
  3421. ---
  3422. ---
  3423. # Source: calico/templates/calico-kube-controllers-rbac.yaml
  3424. # Include a clusterrole for the kube-controllers component,
  3425. # and bind it to the calico-kube-controllers serviceaccount.
  3426. kind: ClusterRole
  3427. apiVersion: rbac.authorization.k8s.io/v1
  3428. metadata:
  3429. name: calico-kube-controllers
  3430. rules:
  3431. # Nodes are watched to monitor for deletions.
  3432. - apiGroups: [""]
  3433. resources:
  3434. - nodes
  3435. verbs:
  3436. - watch
  3437. - list
  3438. - get
  3439. # Pods are watched to check for existence as part of IPAM controller.
  3440. - apiGroups: [""]
  3441. resources:
  3442. - pods
  3443. verbs:
  3444. - get
  3445. - list
  3446. - watch
  3447. # IPAM resources are manipulated when nodes are deleted.
  3448. - apiGroups: ["crd.projectcalico.org"]
  3449. resources:
  3450. - ippools
  3451. verbs:
  3452. - list
  3453. - apiGroups: ["crd.projectcalico.org"]
  3454. resources:
  3455. - blockaffinities
  3456. - ipamblocks
  3457. - ipamhandles
  3458. verbs:
  3459. - get
  3460. - list
  3461. - create
  3462. - update
  3463. - delete
  3464. - watch
  3465. # kube-controllers manages hostendpoints.
  3466. - apiGroups: ["crd.projectcalico.org"]
  3467. resources:
  3468. - hostendpoints
  3469. verbs:
  3470. - get
  3471. - list
  3472. - create
  3473. - update
  3474. - delete
  3475. # Needs access to update clusterinformations.
  3476. - apiGroups: ["crd.projectcalico.org"]
  3477. resources:
  3478. - clusterinformations
  3479. verbs:
  3480. - get
  3481. - create
  3482. - update
  3483. # KubeControllersConfiguration is where it gets its config
  3484. - apiGroups: ["crd.projectcalico.org"]
  3485. resources:
  3486. - kubecontrollersconfigurations
  3487. verbs:
  3488. # read its own config
  3489. - get
  3490. # create a default if none exists
  3491. - create
  3492. # update status
  3493. - update
  3494. # watch for changes
  3495. - watch
  3496. ---
  3497. kind: ClusterRoleBinding
  3498. apiVersion: rbac.authorization.k8s.io/v1
  3499. metadata:
  3500. name: calico-kube-controllers
  3501. roleRef:
  3502. apiGroup: rbac.authorization.k8s.io
  3503. kind: ClusterRole
  3504. name: calico-kube-controllers
  3505. subjects:
  3506. - kind: ServiceAccount
  3507. name: calico-kube-controllers
  3508. namespace: kube-system
  3509. ---
  3510. ---
  3511. # Source: calico/templates/calico-node-rbac.yaml
  3512. # Include a clusterrole for the calico-node DaemonSet,
  3513. # and bind it to the calico-node serviceaccount.
  3514. kind: ClusterRole
  3515. apiVersion: rbac.authorization.k8s.io/v1
  3516. metadata:
  3517. name: calico-node
  3518. rules:
  3519. # The CNI plugin needs to get pods, nodes, and namespaces.
  3520. - apiGroups: [""]
  3521. resources:
  3522. - pods
  3523. - nodes
  3524. - namespaces
  3525. verbs:
  3526. - get
  3527. # EndpointSlices are used for Service-based network policy rule
  3528. # enforcement.
  3529. - apiGroups: ["discovery.k8s.io"]
  3530. resources:
  3531. - endpointslices
  3532. verbs:
  3533. - watch
  3534. - list
  3535. - apiGroups: [""]
  3536. resources:
  3537. - endpoints
  3538. - services
  3539. verbs:
  3540. # Used to discover service IPs for advertisement.
  3541. - watch
  3542. - list
  3543. # Used to discover Typhas.
  3544. - get
  3545. # Pod CIDR auto-detection on kubeadm needs access to config maps.
  3546. - apiGroups: [""]
  3547. resources:
  3548. - configmaps
  3549. verbs:
  3550. - get
  3551. - apiGroups: [""]
  3552. resources:
  3553. - nodes/status
  3554. verbs:
  3555. # Needed for clearing NodeNetworkUnavailable flag.
  3556. - patch
  3557. # Calico stores some configuration information in node annotations.
  3558. - update
  3559. # Watch for changes to Kubernetes NetworkPolicies.
  3560. - apiGroups: ["networking.k8s.io"]
  3561. resources:
  3562. - networkpolicies
  3563. verbs:
  3564. - watch
  3565. - list
  3566. # Used by Calico for policy information.
  3567. - apiGroups: [""]
  3568. resources:
  3569. - pods
  3570. - namespaces
  3571. - serviceaccounts
  3572. verbs:
  3573. - list
  3574. - watch
  3575. # The CNI plugin patches pods/status.
  3576. - apiGroups: [""]
  3577. resources:
  3578. - pods/status
  3579. verbs:
  3580. - patch
  3581. # Calico monitors various CRDs for config.
  3582. - apiGroups: ["crd.projectcalico.org"]
  3583. resources:
  3584. - globalfelixconfigs
  3585. - felixconfigurations
  3586. - bgppeers
  3587. - globalbgpconfigs
  3588. - bgpconfigurations
  3589. - ippools
  3590. - ipamblocks
  3591. - globalnetworkpolicies
  3592. - globalnetworksets
  3593. - networkpolicies
  3594. - networksets
  3595. - clusterinformations
  3596. - hostendpoints
  3597. - blockaffinities
  3598. verbs:
  3599. - get
  3600. - list
  3601. - watch
  3602. # Calico must create and update some CRDs on startup.
  3603. - apiGroups: ["crd.projectcalico.org"]
  3604. resources:
  3605. - ippools
  3606. - felixconfigurations
  3607. - clusterinformations
  3608. verbs:
  3609. - create
  3610. - update
  3611. # Calico stores some configuration information on the node.
  3612. - apiGroups: [""]
  3613. resources:
  3614. - nodes
  3615. verbs:
  3616. - get
  3617. - list
  3618. - watch
  3619. # These permissions are only required for upgrade from v2.6, and can
  3620. # be removed after upgrade or on fresh installations.
  3621. - apiGroups: ["crd.projectcalico.org"]
  3622. resources:
  3623. - bgpconfigurations
  3624. - bgppeers
  3625. verbs:
  3626. - create
  3627. - update
  3628. # These permissions are required for Calico CNI to perform IPAM allocations.
  3629. - apiGroups: ["crd.projectcalico.org"]
  3630. resources:
  3631. - blockaffinities
  3632. - ipamblocks
  3633. - ipamhandles
  3634. verbs:
  3635. - get
  3636. - list
  3637. - create
  3638. - update
  3639. - delete
  3640. - apiGroups: ["crd.projectcalico.org"]
  3641. resources:
  3642. - ipamconfigs
  3643. verbs:
  3644. - get
  3645. # Block affinities must also be watchable by confd for route aggregation.
  3646. - apiGroups: ["crd.projectcalico.org"]
  3647. resources:
  3648. - blockaffinities
  3649. verbs:
  3650. - watch
  3651. # The Calico IPAM migration needs to get daemonsets. These permissions can be
  3652. # removed if not upgrading from an installation using host-local IPAM.
  3653. - apiGroups: ["apps"]
  3654. resources:
  3655. - daemonsets
  3656. verbs:
  3657. - get
  3658. ---
  3659. apiVersion: rbac.authorization.k8s.io/v1
  3660. kind: ClusterRoleBinding
  3661. metadata:
  3662. name: calico-node
  3663. roleRef:
  3664. apiGroup: rbac.authorization.k8s.io
  3665. kind: ClusterRole
  3666. name: calico-node
  3667. subjects:
  3668. - kind: ServiceAccount
  3669. name: calico-node
  3670. namespace: kube-system
  3671. ---
  3672. # Source: calico/templates/calico-node.yaml
  3673. # This manifest installs the calico-node container, as well
  3674. # as the CNI plugins and network config on
  3675. # each master and worker node in a Kubernetes cluster.
  3676. kind: DaemonSet
  3677. apiVersion: apps/v1
  3678. metadata:
  3679. name: calico-node
  3680. namespace: kube-system
  3681. labels:
  3682. k8s-app: calico-node
  3683. spec:
  3684. selector:
  3685. matchLabels:
  3686. k8s-app: calico-node
  3687. updateStrategy:
  3688. type: RollingUpdate
  3689. rollingUpdate:
  3690. maxUnavailable: 1
  3691. template:
  3692. metadata:
  3693. labels:
  3694. k8s-app: calico-node
  3695. spec:
  3696. nodeSelector:
  3697. kubernetes.io/os: linux
  3698. hostNetwork: true
  3699. tolerations:
  3700. # Make sure calico-node gets scheduled on all nodes.
  3701. - effect: NoSchedule
  3702. operator: Exists
  3703. # Mark the pod as a critical add-on for rescheduling.
  3704. - key: CriticalAddonsOnly
  3705. operator: Exists
  3706. - effect: NoExecute
  3707. operator: Exists
  3708. serviceAccountName: calico-node
  3709. # Minimize downtime during a rolling upgrade or deletion; tell Kubernetes to do a "force
  3710. # deletion": https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods.
  3711. terminationGracePeriodSeconds: 0
  3712. priorityClassName: system-node-critical
  3713. initContainers:
  3714. # This container performs upgrade from host-local IPAM to calico-ipam.
  3715. # It can be deleted if this is a fresh installation, or if you have already
  3716. # upgraded to use calico-ipam.
  3717. - name: upgrade-ipam
  3718. image: docker.io/calico/cni:v3.19.1
  3719. command: ["/opt/cni/bin/calico-ipam", "-upgrade"]
  3720. envFrom:
  3721. - configMapRef:
  3722. # Allow KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT to be overridden for eBPF mode.
  3723. name: kubernetes-services-endpoint
  3724. optional: true
  3725. env:
  3726. - name: KUBERNETES_NODE_NAME
  3727. valueFrom:
  3728. fieldRef:
  3729. fieldPath: spec.nodeName
  3730. - name: CALICO_NETWORKING_BACKEND
  3731. valueFrom:
  3732. configMapKeyRef:
  3733. name: calico-config
  3734. key: calico_backend
  3735. volumeMounts:
  3736. - mountPath: /var/lib/cni/networks
  3737. name: host-local-net-dir
  3738. - mountPath: /host/opt/cni/bin
  3739. name: cni-bin-dir
  3740. securityContext:
  3741. privileged: true
  3742. # This container installs the CNI binaries
  3743. # and CNI network config file on each node.
  3744. - name: install-cni
  3745. image: docker.io/calico/cni:v3.19.1
  3746. command: ["/opt/cni/bin/install"]
  3747. envFrom:
  3748. - configMapRef:
  3749. # Allow KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT to be overridden for eBPF mode.
  3750. name: kubernetes-services-endpoint
  3751. optional: true
  3752. env:
  3753. # Name of the CNI config file to create.
  3754. - name: CNI_CONF_NAME
  3755. value: "10-calico.conflist"
  3756. # The CNI network config to install on each node.
  3757. - name: CNI_NETWORK_CONFIG
  3758. valueFrom:
  3759. configMapKeyRef:
  3760. name: calico-config
  3761. key: cni_network_config
  3762. # Set the hostname based on the k8s node name.
  3763. - name: KUBERNETES_NODE_NAME
  3764. valueFrom:
  3765. fieldRef:
  3766. fieldPath: spec.nodeName
  3767. # CNI MTU Config variable
  3768. - name: CNI_MTU
  3769. valueFrom:
  3770. configMapKeyRef:
  3771. name: calico-config
  3772. key: veth_mtu
  3773. # Prevents the container from sleeping forever.
  3774. - name: SLEEP
  3775. value: "false"
  3776. volumeMounts:
  3777. - mountPath: /host/opt/cni/bin
  3778. name: cni-bin-dir
  3779. - mountPath: /host/etc/cni/net.d
  3780. name: cni-net-dir
  3781. securityContext:
  3782. privileged: true
  3783. # Adds a Flex Volume Driver that creates a per-pod Unix Domain Socket to allow Dikastes
  3784. # to communicate with Felix over the Policy Sync API.
  3785. - name: flexvol-driver
  3786. image: docker.io/calico/pod2daemon-flexvol:v3.19.1
  3787. volumeMounts:
  3788. - name: flexvol-driver-host
  3789. mountPath: /host/driver
  3790. securityContext:
  3791. privileged: true
  3792. containers:
  3793. # Runs calico-node container on each Kubernetes node. This
  3794. # container programs network policy and routes on each
  3795. # host.
  3796. - name: calico-node
  3797. image: docker.io/calico/node:v3.19.1
  3798. envFrom:
  3799. - configMapRef:
  3800. # Allow KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT to be overridden for eBPF mode.
  3801. name: kubernetes-services-endpoint
  3802. optional: true
  3803. env:
  3804. # Use Kubernetes API as the backing datastore.
  3805. - name: DATASTORE_TYPE
  3806. value: "kubernetes"
  3807. # Wait for the datastore.
  3808. - name: WAIT_FOR_DATASTORE
  3809. value: "true"
  3810. # Set based on the k8s node name.
  3811. - name: NODENAME
  3812. valueFrom:
  3813. fieldRef:
  3814. fieldPath: spec.nodeName
  3815. # Choose the backend to use.
  3816. - name: CALICO_NETWORKING_BACKEND
  3817. valueFrom:
  3818. configMapKeyRef:
  3819. name: calico-config
  3820. key: calico_backend
  3821. # Cluster type to identify the deployment type
  3822. - name: CLUSTER_TYPE
  3823. value: "k8s,bgp"
  3824. # Auto-detect the BGP IP address.
  3825. - name: IP
  3826. value: "autodetect"
  3827. # Enable IPIP
  3828. - name: CALICO_IPV4POOL_IPIP
  3829. value: "Always"
  3830. # Enable or Disable VXLAN on the default IP pool.
  3831. - name: CALICO_IPV4POOL_VXLAN
  3832. value: "Never"
  3833. # Set MTU for tunnel device used if ipip is enabled
  3834. - name: FELIX_IPINIPMTU
  3835. valueFrom:
  3836. configMapKeyRef:
  3837. name: calico-config
  3838. key: veth_mtu
  3839. # Set MTU for the VXLAN tunnel device.
  3840. - name: FELIX_VXLANMTU
  3841. valueFrom:
  3842. configMapKeyRef:
  3843. name: calico-config
  3844. key: veth_mtu
  3845. # Set MTU for the Wireguard tunnel device.
  3846. - name: FELIX_WIREGUARDMTU
  3847. valueFrom:
  3848. configMapKeyRef:
  3849. name: calico-config
  3850. key: veth_mtu
  3851. # The default IPv4 pool to create on startup if none exists. Pod IPs will be
  3852. # chosen from this range. Changing this value after installation will have
  3853. # no effect. This should fall within `--cluster-cidr`.
  3854. # - name: CALICO_IPV4POOL_CIDR
  3855. # value: "192.168.0.0/16"
  3856. # Disable file logging so `kubectl logs` works.
  3857. - name: CALICO_DISABLE_FILE_LOGGING
  3858. value: "true"
  3859. # Set Felix endpoint to host default action to ACCEPT.
  3860. - name: FELIX_DEFAULTENDPOINTTOHOSTACTION
  3861. value: "ACCEPT"
  3862. # Disable IPv6 on Kubernetes.
  3863. - name: FELIX_IPV6SUPPORT
  3864. value: "false"
  3865. - name: FELIX_HEALTHENABLED
  3866. value: "true"
  3867. securityContext:
  3868. privileged: true
  3869. resources:
  3870. requests:
  3871. cpu: 250m
  3872. livenessProbe:
  3873. exec:
  3874. command:
  3875. - /bin/calico-node
  3876. - -felix-live
  3877. - -bird-live
  3878. periodSeconds: 10
  3879. initialDelaySeconds: 10
  3880. failureThreshold: 6
  3881. timeoutSeconds: 10
  3882. readinessProbe:
  3883. exec:
  3884. command:
  3885. - /bin/calico-node
  3886. - -felix-ready
  3887. - -bird-ready
  3888. periodSeconds: 10
  3889. timeoutSeconds: 10
  3890. volumeMounts:
  3891. # For maintaining CNI plugin API credentials.
  3892. - mountPath: /host/etc/cni/net.d
  3893. name: cni-net-dir
  3894. readOnly: false
  3895. - mountPath: /lib/modules
  3896. name: lib-modules
  3897. readOnly: true
  3898. - mountPath: /run/xtables.lock
  3899. name: xtables-lock
  3900. readOnly: false
  3901. - mountPath: /var/run/calico
  3902. name: var-run-calico
  3903. readOnly: false
  3904. - mountPath: /var/lib/calico
  3905. name: var-lib-calico
  3906. readOnly: false
  3907. - name: policysync
  3908. mountPath: /var/run/nodeagent
  3909. # For eBPF mode, we need to be able to mount the BPF filesystem at /sys/fs/bpf so we mount in the
  3910. # parent directory.
  3911. - name: sysfs
  3912. mountPath: /sys/fs/
  3913. # Bidirectional means that, if we mount the BPF filesystem at /sys/fs/bpf it will propagate to the host.
  3914. # If the host is known to mount that filesystem already then Bidirectional can be omitted.
  3915. mountPropagation: Bidirectional
  3916. - name: cni-log-dir
  3917. mountPath: /var/log/calico/cni
  3918. readOnly: true
  3919. volumes:
  3920. # Used by calico-node.
  3921. - name: lib-modules
  3922. hostPath:
  3923. path: /lib/modules
  3924. - name: var-run-calico
  3925. hostPath:
  3926. path: /var/run/calico
  3927. - name: var-lib-calico
  3928. hostPath:
  3929. path: /var/lib/calico
  3930. - name: xtables-lock
  3931. hostPath:
  3932. path: /run/xtables.lock
  3933. type: FileOrCreate
  3934. - name: sysfs
  3935. hostPath:
  3936. path: /sys/fs/
  3937. type: DirectoryOrCreate
  3938. # Used to install CNI.
  3939. - name: cni-bin-dir
  3940. hostPath:
  3941. path: /opt/cni/bin
  3942. - name: cni-net-dir
  3943. hostPath:
  3944. path: /etc/cni/net.d
  3945. # Used to access CNI logs.
  3946. - name: cni-log-dir
  3947. hostPath:
  3948. path: /var/log/calico/cni
  3949. # Mount in the directory for host-local IPAM allocations. This is
  3950. # used when upgrading from host-local to calico-ipam, and can be removed
  3951. # if not using the upgrade-ipam init container.
  3952. - name: host-local-net-dir
  3953. hostPath:
  3954. path: /var/lib/cni/networks
  3955. # Used to create per-pod Unix Domain Sockets
  3956. - name: policysync
  3957. hostPath:
  3958. type: DirectoryOrCreate
  3959. path: /var/run/nodeagent
  3960. # Used to install Flex Volume Driver
  3961. - name: flexvol-driver-host
  3962. hostPath:
  3963. type: DirectoryOrCreate
  3964. path: /usr/libexec/kubernetes/kubelet-plugins/volume/exec/nodeagent~uds
  3965. ---
  3966. apiVersion: v1
  3967. kind: ServiceAccount
  3968. metadata:
  3969. name: calico-node
  3970. namespace: kube-system
  3971. ---
  3972. # Source: calico/templates/calico-kube-controllers.yaml
  3973. # See https://github.com/projectcalico/kube-controllers
  3974. apiVersion: apps/v1
  3975. kind: Deployment
  3976. metadata:
  3977. name: calico-kube-controllers
  3978. namespace: kube-system
  3979. labels:
  3980. k8s-app: calico-kube-controllers
  3981. spec:
  3982. # The controllers can only have a single active instance.
  3983. replicas: 1
  3984. selector:
  3985. matchLabels:
  3986. k8s-app: calico-kube-controllers
  3987. strategy:
  3988. type: Recreate
  3989. template:
  3990. metadata:
  3991. name: calico-kube-controllers
  3992. namespace: kube-system
  3993. labels:
  3994. k8s-app: calico-kube-controllers
  3995. spec:
  3996. nodeSelector:
  3997. kubernetes.io/os: linux
  3998. tolerations:
  3999. # Mark the pod as a critical add-on for rescheduling.
  4000. - key: CriticalAddonsOnly
  4001. operator: Exists
  4002. - key: node-role.kubernetes.io/master
  4003. effect: NoSchedule
  4004. serviceAccountName: calico-kube-controllers
  4005. priorityClassName: system-cluster-critical
  4006. containers:
  4007. - name: calico-kube-controllers
  4008. image: docker.io/calico/kube-controllers:v3.19.1
  4009. env:
  4010. # Choose which controllers to run.
  4011. - name: ENABLED_CONTROLLERS
  4012. value: node
  4013. - name: DATASTORE_TYPE
  4014. value: kubernetes
  4015. livenessProbe:
  4016. exec:
  4017. command:
  4018. - /usr/bin/check-status
  4019. - -l
  4020. periodSeconds: 10
  4021. initialDelaySeconds: 10
  4022. failureThreshold: 6
  4023. timeoutSeconds: 10
  4024. readinessProbe:
  4025. exec:
  4026. command:
  4027. - /usr/bin/check-status
  4028. - -r
  4029. periodSeconds: 10
  4030. ---
  4031. apiVersion: v1
  4032. kind: ServiceAccount
  4033. metadata:
  4034. name: calico-kube-controllers
  4035. namespace: kube-system
  4036. ---
  4037. # This manifest creates a Pod Disruption Budget for Controller to allow K8s Cluster Autoscaler to evict
  4038. apiVersion: policy/v1beta1
  4039. kind: PodDisruptionBudget
  4040. metadata:
  4041. name: calico-kube-controllers
  4042. namespace: kube-system
  4043. labels:
  4044. k8s-app: calico-kube-controllers
  4045. spec:
  4046. maxUnavailable: 1
  4047. selector:
  4048. matchLabels:
  4049. k8s-app: calico-kube-controllers
  4050. ---
  4051. # Source: calico/templates/calico-etcd-secrets.yaml
  4052. ---
  4053. # Source: calico/templates/calico-typha.yaml
  4054. ---
  4055. # Source: calico/templates/configure-canal.yaml