calico.yaml 182 KB

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