1"use strict";(self.webpackChunktigera_docs=self.webpackChunktigera_docs||[]).push([[3396],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>c});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=a.createContext({}),s=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=s(e.components);return a.createElement(p.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,p=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),u=s(n),c=r,k=u["".concat(p,".").concat(c)]||u[c]||m[c]||l;return n?a.createElement(k,i(i({ref:t},d),{},{components:n})):a.createElement(k,i({ref:t},d))}));function c(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=u;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o.mdxType="string"==typeof e?e:r,i[1]=o;for(var s=2;s<l;s++)i[s]=n[s];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}u.displayName="MDXCreateElement"},70139:(e,t,n)=>{n.d(t,{ZP:()=>i});var a=n(87462),r=(n(67294),n(3905));const l={toc:[]};function i(e){let{components:t,...n}=e;return(0,r.kt)("wrapper",(0,a.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"A label selector is an expression which either matches or does not match a resource based on its labels."),(0,r.kt)("p",null,"Calico Enterprise label selectors support a number of operators, which can be combined into larger expressions\nusing the boolean operators and parentheses."),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Expression"),(0,r.kt)("th",{parentName:"tr",align:null},"Meaning"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},"Logical operators")),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"( <expression> )")),(0,r.kt)("td",{parentName:"tr",align:null},"Matches if and only if ",(0,r.kt)("inlineCode",{parentName:"td"},"<expression>")," matches. (Parentheses are used for grouping expressions.)")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"! <expression>")),(0,r.kt)("td",{parentName:"tr",align:null},"Matches if and only if ",(0,r.kt)("inlineCode",{parentName:"td"},"<expression>")," does not match. ",(0,r.kt)("strong",{parentName:"td"},"Tip:")," ",(0,r.kt)("inlineCode",{parentName:"td"},"!")," is a special character at the start of a YAML string, if you need to use ",(0,r.kt)("inlineCode",{parentName:"td"},"!")," at the start of a YAML string, enclose the string in quotes.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"<expression 1> && <expression 2>")),(0,r.kt)("td",{parentName:"tr",align:null},'"And": matches if and only if both ',(0,r.kt)("inlineCode",{parentName:"td"},"<expression 1>"),", and, ",(0,r.kt)("inlineCode",{parentName:"td"},"<expression 2>")," matches")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("code",null,"<expression 1> ","|","|"," <expression 2>")),(0,r.kt)("td",{parentName:"tr",align:null},'"Or": matches if and only if either ',(0,r.kt)("inlineCode",{parentName:"td"},"<expression 1>"),", or, ",(0,r.kt)("inlineCode",{parentName:"td"},"<expression 2>")," matches.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},"Match operators")),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"}
1,"all()")),(0,r.kt)("td",{parentName:"tr",align:null},"Match all in-scope resources. To match ",(0,r.kt)("em",{parentName:"td"},"no")," resources, combine this operator with ",(0,r.kt)("inlineCode",{parentName:"td"},"!")," to form ",(0,r.kt)("inlineCode",{parentName:"td"},"!all()"),".")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"global()")),(0,r.kt)("td",{parentName:"tr",align:null},"Match all non-namespaced resources. Useful in a ",(0,r.kt)("inlineCode",{parentName:"td"},"namespaceSelector")," to select global resources such as global network sets.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"k == 'v'")),(0,r.kt)("td",{parentName:"tr",align:null},"Matches resources with the label 'k' and value 'v'.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"k != 'v'")),(0,r.kt)("td",{parentName:"tr",align:null},"Matches resources without label 'k' or with label 'k' and value ",(0,r.kt)("em",{parentName:"td"},"not")," equal to ",(0,r.kt)("inlineCode",{parentName:"td"},"v"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"has(k)")),(0,r.kt)("td",{parentName:"tr",align:null},"Matches resources with label 'k', independent of value. To match pods that do not have label ",(0,r.kt)("inlineCode",{parentName:"td"},"k"),", combine this operator with ",(0,r.kt)("inlineCode",{parentName:"td"},"!")," to form ",(0,r.kt)("inlineCode",{parentName:"td"},"!has(k)"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"k in { 'v1', 'v2' }")),(0,r.kt)("td",{parentName:"tr",align:null},"Matches resources with label 'k' and value in the given set")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"k not in { 'v1', 'v2' }")),(0,r.kt)("td",{parentName:"tr",align:null},"Matches resources without label 'k' or with label 'k' and value ",(0,r.kt)("em",{parentName:"td"},"not")," in the given set")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"k contains 's'")),(0,r.kt)("td",{parentName:"tr",align:null},"Matches resources with label 'k' and value containing the substring 's'")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"k starts with 's'")),(0,r.kt)("td",{parentName:"tr",align:null},"Matches resources with label 'k' and value starting with the substring 's'")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"k ends with 's'")),(0,r.kt)("td",{parentName:"tr",align:null},"Matches resources with label 'k' and value ending with the substring 's'")))),(0,r.kt)("p",null,"Operators have the following precedence:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Highest"),": all the match operators"),(0,r.kt)("li",{parentName:"ul"},"Parentheses ",(0,r.kt)("inlineCode",{parentName:"li"},"( ... )")),(0,r.kt)("li",{parentName:"ul"},"Negation with ",(0,r.kt)("inlineCode",{parentName:"li"},"!")),(0,r.kt)("li",{parentName:"ul"},"Conjunction with ",(0,r.kt)("inlineCode",{parentName:"li"},"&&")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Lowest"),": Disjunction with ",(0,r.kt)("inlineCode",{parentName:"li"},"||"))),(0,r.kt)("p",null,"For example, the expression"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"! has(my-label) || my-label starts with 'prod' && role in {'frontend','business'}\n")),(0,r.kt)("p",null,'Would be "bracketed" like this:'),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"((!(has(my-label)) || ((my-label starts with 'prod') && (role in {'frontend','business'}))\n")),(0,r.kt)("p",null,"It would match:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},'Any resource that did not have label "my-label".'),(0,r.kt)("li",{parentName:"ul"},"Any resource that both:",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Has a value for ",(0,r.kt)("inlineCode",{parentName:"li"},"my-label"),' that starts with "prod", and,'),(0,r.kt)("li",{parentName:"ul"},'Has a role label with value either "frontend", or "business".')))))}i.isMDXComponent=!0},38397:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>p,toc:()=>d});var a=n(87462),r=(n(67294),n(3905)),l=n(70139);const i={description:"API for this Calico Enterprise resource."},o="BGP peer",p={unversionedId:"reference/resources/bgppeer",id:"version-3.14/reference/resources/bgppeer",title:"BGP peer",description:"API for this Calico Enterprise resource.",source:"@site/calico-enterprise_versioned_docs/version-3.14/reference/resources/bgppeer.mdx",sourceDirName:"reference/resources",slug:"/reference/resources/bgppeer",permalink:"/calico-enterprise/3.14/reference/resources/bgppeer",draft:!1,editUrl:"https://github.com/tigera/docs/edit/main/calico-enterprise_versioned_docs/version-3.14/reference/resources/bgppeer.mdx",tags:[],version:"3.14",frontMatter:{description:"API for this Calico Enterprise resource."},sidebar:"calicoEnterpriseSidebar",previous:{title:"BGP configuration",permalink:"/calico-enterprise/3.14/reference/resources/bgpconfig"},next:{title:"Calico node status",permalink:"/calico-enterprise/3.14/reference/resources/caliconodestatus"}},s={},d=[{value:"Sample YAML",id:"sample-yaml",level:2},{value:"BGP peer definition",id:"bgp-peer-definition",level:2},{value:"Metadata",id:"metadata",level:3},{value:"Spec",id:"spec",level:3},{value:"BGPPassword",id:"bgppassword",level:3},{value:"KeyRef",id:"keyref",level:3},{value:"Peer scopes",id:"peer-scopes",level:2},{value:"Global peer",id:"global-peer",level:3},{value:"Node-specific peer",id:"node-specific-peer",level:3},{value:"Supported operations",id:"supported-operations",level:2},{value:"Selector",id:"selector",level:2}],m={toc:d};
1function u(e){let{components:t,...n}=e;return(0,r.kt)("wrapper",(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"bgp-peer"},"BGP peer"),(0,r.kt)("p",null,"A BGP peer resource (",(0,r.kt)("inlineCode",{parentName:"p"},"BGPPeer"),") represents a remote BGP peer with\nwhich the node(s) in a Calico Enterprise cluster will peer.\nConfiguring BGP peers allows you to peer a Calico Enterprise network\nwith your datacenter fabric (e.g. ToR). For more\ninformation on cluster layouts, see Calico Enterprise's documentation on\n",(0,r.kt)("a",{parentName:"p",href:"/calico-enterprise/3.14/reference/architecture/design/l3-interconnect-fabric"},"Calico Enterprise over IP fabrics"),"."),(0,r.kt)("p",null,"For ",(0,r.kt)("inlineCode",{parentName:"p"},"kubectl")," commands, the following case-insensitive aliases may be used to specify the resource type on the CLI: ",(0,r.kt)("inlineCode",{parentName:"p"},"bgppeer.projectcalico.org"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"bgppeers.projectcalico.org")," as well as abbreviations such as ",(0,r.kt)("inlineCode",{parentName:"p"},"bgppeer.p")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"bgppeers.p"),"."),(0,r.kt)("h2",{id:"sample-yaml"},"Sample YAML"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"apiVersion: projectcalico.org/v3\nkind: BGPPeer\nmetadata:\n name: some.name\nspec:\n node: rack1-host1\n peerIP: 192.168.1.1\n asNumber: 63400\n")),(0,r.kt)("h2",{id:"bgp-peer-definition"},"BGP peer definition"),(0,r.kt)("h3",{id:"metadata"},"Metadata"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Field"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Accepted Values"),(0,r.kt)("th",{parentName:"tr",align:null},"Schema"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"name"),(0,r.kt)("td",{parentName:"tr",align:null},"Unique name to describe this resource instance. Must be specified."),(0,r.kt)("td",{parentName:"tr",align:null},"Alphanumeric string with optional ",(0,r.kt)("inlineCode",{parentName:"td"},"."),", ",(0,r.kt)("inlineCode",{parentName:"td"},"_"),", or ",(0,r.kt)("inlineCode",{parentName:"td"},"-"),"."),(0,r.kt)("td",{parentName:"tr",align:null},"string")))),(0,r.kt)("h3",{id:"spec"},"Spec"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Field"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Accepted Values"),(0,r.kt)("th",{parentName:"tr",align:null},"Schema"),(0,r.kt)("th",{parentName:"tr",align:null},"Default"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"node"),(0,r.kt)("td",{parentName:"tr",align:null},"If specified, the scope is node level, otherwise the scope is global."),(0,r.kt)("td",{parentName:"tr",align:null},"The hostname of the node to which this peer applies."),(0,r.kt)("td",{parentName:"tr",align:null},"string"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"peerIP"),(0,r.kt)("td",{parentName:"tr",align:null},"The IP address of this peer and an optional port number. If port number is not set, and peer is Calico node with ",(0,r.kt)("inlineCode",{parentName:"td"},"listenPort")," set, then ",(0,r.kt)("inlineCode",{parentName:"td"},"listenPort")," is used."),(0,r.kt)("td",{parentName:"tr",align:null},"Valid IPv4 or IPv6 address. If port number is set use, ",(0,r.kt)("inlineCode",{parentName:"td"},"IPv4:port")," or ",(0,r.kt)("inlineCode",{parentName:"td"},"[IPv6]:port")," format."),(0,r.kt)("td",{parentName:"tr",align:null},"string"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"asNumber"),(0,r.kt)("td",{parentName:"tr",align:null},"The remote AS Number of the peer."),(0,r.kt)("td",{parentName:"tr",align:null},"A valid AS Number, may be specified in dotted notation."),(0,r.kt)("td",{parentName:"tr",align:null},"integer/string"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"nodeSelector"),(0,r.kt)("td",{parentName:"tr",align:null},"Selector for the nodes that should have this peering. When this is set, the ",(0,r.kt)("inlineCode",{parentName:"td"},"node")," field must be empty."),(0,r.kt)("td",{parentName:"tr",align:null}),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"#selector"},"selector")),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"peerSelector"),(0,r.kt)("td",{parentName:"tr",align:null},"Selector for the remote nodes to peer with. When this is set, the ",(0,r.kt)("inlineCode",{parentName:"td"},"peerIP")," and ",(0,r.kt)("inlineCode",{parentName:"td"},"asNumber")," fields must be empty."),(0,r.kt)("td",{parentName:"tr",align:null}),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"#selector"},"selector")),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"keepOriginalNextHop"),(0,r.kt)("td",{parentName:"tr",align:null},"Maintain and forward the original next hop BGP route attribute to a specific Peer within a different AS."),(0,r.kt)("td",{parentName:"tr",align:null}),(0,r.kt)("td",{parentName:"tr",align:null},"boolean"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"extensions"),(0,r.kt)("td",{parentName:"tr",align:null},"Additional mapping of keys and values. Used for setting values in custom BGP configurations."),(0,r.kt)("td",{parentName:"tr",align:null},"valid strings for both keys and values"),(0,r.kt)("td",{parentName:"tr",align:null},"map"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"password"),(0,r.kt)("td",{parentName:"tr",align:null},"BGP password for the peerings generated by this BGPPeer resource."),(0,r.kt)("td",{parentName:"tr",align:null}),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"#bgppassword"},"BGPPassword")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"nil")," (no password)")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"sourceAddress"),(0,r.kt)("td",{parentName:"tr",align:null},'Specifies whether and how to configure a source address for the peerings generated by this BGPPeer resource. Default value "UseNodeIP" means to configure the node IP as the source address. "None" means not to configure a source address.'),(0,r.kt)("td",{parentName:"tr",align:null},'"UseNodeIP", "None"'),(0,r.kt)("td",{parentName:"tr",align:null},"string"),(0,r.kt)("td",{parentName:"tr",align:null},'"UseNodeIP"')),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"failureDetectionMode"),(0,r.kt)("td",{parentName:"tr",align:null},'Specifies whether and how to detect loss of connectivity on the peerings generated by this BGPPeer resource. Default value "None" means nothing beyond BGP\'s own (slow) hold timer. "BFDIfDirectlyConnected" means to use BFD when the peer is directly connected.'),(0,r.kt)("td",{parentName:"tr",align:null},'"None", "BFDIfDirectlyConnected"'),(0,r.kt)("td",{parentName:"tr",align:null},"string"),(0,r.kt)("td",{parentName:"tr",align:null},'"None"')),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"restartMode"),(0,r.kt)("td",{parentName:"tr",align:null},'Specifies restart behaviour to configure on the peerings generated by this BGPPeer resource. Default value "GracefulRestart" means traditional graceful restart. "LongLivedGracefulRestart" means LLGR according to draft
1-uttaro-idr-bgp-persistence-05.'),(0,r.kt)("td",{parentName:"tr",align:null},'"GracefulRestart", "LongLivedGracefulRestart"'),(0,r.kt)("td",{parentName:"tr",align:null},"string"),(0,r.kt)("td",{parentName:"tr",align:null},'"GracefulRestart"')),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"maxRestartTime"),(0,r.kt)("td",{parentName:"tr",align:null},"Restart time that is announced by BIRD in the BGP graceful restart capability and that specifies how long the neighbor would wait for the BGP session to re-establish after a restart before deleting stale routes. When specified, this is configured as the graceful restart timeout when ",(0,r.kt)("inlineCode",{parentName:"td"},"RestartMode"),' is "GracefulRestart", and as the LLGR stale time when ',(0,r.kt)("inlineCode",{parentName:"td"},"RestartMode"),' is "LongLivedGracefulRestart". When not specified, the BIRD defaults are used, which are 120s for "GracefulRestart" and 3600s for "LongLivedGracefulRestart". Note: extra care should be taken when changing this configuration, as it may break networking in your cluster.'),(0,r.kt)("td",{parentName:"tr",align:null}),(0,r.kt)("td",{parentName:"tr",align:null},"duration"),(0,r.kt)("td",{parentName:"tr",align:null},"None")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"birdGatewayMode"),(0,r.kt)("td",{parentName:"tr",align:null},'Specifies the BIRD "gateway" mode, i.e. method for computing the immediate next hop for each received route, for peerings generated by this BGPPeer resource. Default value "Recursive" means "gateway recursive". "DirectIfDirectlyConnected" means to configure "gateway direct" when the peer is directly connected.'),(0,r.kt)("td",{parentName:"tr",align:null},'"Recursive", "DirectIfDirectlyConnected"'),(0,r.kt)("td",{parentName:"tr",align:null},"string"),(0,r.kt)("td",{parentName:"tr",align:null},'"Recursive"')),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"numAllowedLocalASNumbers"),(0,r.kt)("td",{parentName:"tr",align:null},"The number of local AS numbers to allow in the AS path for received routes. This disables BGP loop prevention and should only be used if necessary."),(0,r.kt)("td",{parentName:"tr",align:null}),(0,r.kt)("td",{parentName:"tr",align:null},"integer"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"nil")," (BIRD will default to 0 meaning no change to loop prevention behavior)")))),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"The cluster-wide default local AS number used when speaking with a peer is controlled by the\n",(0,r.kt)("a",{parentName:"p",href:"/calico-enterprise/3.14/reference/resources/bgpconfig"},"BGPConfiguration resource"),". That value can be overridden per-node by using the ",(0,r.kt)("inlineCode",{parentName:"p"},"bgp")," field of\nthe ",(0,r.kt)("a",{parentName:"p",href:"/calico-enterprise/3.14/reference/resources/node"},"node resource"),".")),(0,r.kt)("h3",{id:"bgppassword"},"BGPPassword"),(0,r.kt)("admonition",{type:"note"},(0,r.kt)("p",{parentName:"admonition"},"BGP passwords must be 80 characters or fewer. If a password longer than that\nis configured, the BGP sessions with that password will fail to be established.")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Field"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Schema"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"secretKeyRef"),(0,r.kt)("td",{parentName:"tr",align:null},"Get the password from a secret."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"#keyref"},"KeyRef"))))),(0,r.kt)("h3",{id:"keyref"},"KeyRef"),(0,r.kt)("p",null,"KeyRef tells Calico Enterprise where to get a BGP password. The referenced Kubernetes\nsecret must be in the same namespace as the cnx-node pod."),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Field"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Schema"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"name"),(0,r.kt)("td",{parentName:"tr",align:null},"The name of the secret"),(0,r.kt)("td",{parentName:"tr",align:null},"string")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"key"),(0,r.kt)("td",{parentName:"tr",align:null},"The key within the secret"),(0,r.kt)("td",{parentName:"tr",align:null},"string")))),(0,r.kt)("h2",{id:"peer-scopes"},"Peer scopes"),(0,r.kt)("p",null,"BGP Peers can exist at either global or node-specific scope. A peer's scope\ndetermines which ",(0,r.kt)("inlineCode",{parentName:"p"},"cnx-node"),"s will attempt to establish a BGP session with that peer.\nIf ",(0,r.kt)("inlineCode",{parentName:"p"},"cnx-node")," has a ",(0,r.kt)("inlineCode",{parentName:"p"},"listenPort")," set in ",(0,r.kt)("inlineCode",{parentName:"p"},"BGPConfiguration"),", it will be used in peering."),(0,r.kt)("h3",{id:"global-peer"},"Global peer"),(0,r.kt)("p",null,"To assign a BGP peer a global scope, omit the ",(0,r.kt)("inlineCode",{parentName:"p"},"node")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"nodeSelector")," fields. All nodes in\nthe cluster will attempt to establish BGP connections with it"),(0,r.kt)("h3",{id:"node-specific-peer"},"Node-specific peer"),(0,r.kt)("p",null,"A BGP peer can also be node-specific. When the ",(0,r.kt)("inlineCode",{parentName:"p"},"node")," field is included, only the specified node\nwill peer with it. When the ",(0,r.kt)("inlineCode",{parentName:"p"},"nodeSelector")," field is included, the nodes with labels that match that selector\nwill peer with it."),(0,r.kt)("h2",{id:"supported-operations"},"Supported operations"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Datastore type"),(0,r.kt)("th",{parentName:"tr",align:null},"Create/Delete"),(0,r.kt)("th",{parentName:"tr",align:null},"Update"),(0,r.kt)("th",{parentName:"tr",align:null},"Get/List"),(0,r.kt)("th",{parentName:"tr",align:null},"Notes"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Kubernetes API server"),(0,r.kt)("td",{parentName:"tr",align:null},"Yes"),(0,r.kt)("td",{parentName:"tr",align:null},"Yes"),(0,r.kt)("td",{parentName:"tr",align:null},"Yes"),(0,r.kt)("td",{parentName:"tr",align:null})))),(0,r.kt)("h2",{id:"selector"},"Selector"),(0,r.kt)(l.ZP,{mdxType:"Selectors"}))}u.isMDXComponent=!0}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.