PageSourceSearch

https://kubeedge.io/assets/js/7b7b9394.4ece2b5e.js

js kubeedge.io collected 2026-10-02 16:41:51 UTC 8,466 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkmy_website=globalThis.webpackChunkmy_website||[]).push([[3076],{15680(e,t,n){n.d(t,{xA:()=>d,yg:()=>u});var a=n(96540);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 o(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?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),p=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=p(e.components);return a.createElement(l.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},g=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),g=p(n),u=r,m=g["".concat(l,".").concat(u)]||g[u]||c[u]||o;return n?a.createElement(m,i(i({ref:t},d),{},{components:n})):a.createElement(m,i({ref:t},d))}));function u(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=g;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:r,i[1]=s;for(var p=2;p<o;p++)i[p]=n[p];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}g.displayName="MDXCreateElement"},36236(e,t,n){n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>c,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var a=n(58168),r=(n(96540),n(15680));const o={title:"MetaManager",sidebar_position:5},i=void 0,s={unversionedId:"architecture/edge/metamanager",id:"architecture/edge/metamanager",title:"MetaManager",description:"Overview",source:"@site/docs/architecture/edge/metamanager.md",sourceDirName:"architecture/edge",slug:"/architecture/edge/metamanager",permalink:"/docs/architecture/edge/metamanager",draft:!1,editUrl:"https://github.com/kubeedge/website/blob/master/docs/architecture/edge/metamanager.md",tags:[],version:"current",lastUpdatedBy:"lingyu",lastUpdatedAt:1725352264,formattedLastUpdatedAt:"Sep 3, 2024",sidebarPosition:5,frontMatter:{title:"MetaManager",sidebar_position:5},sidebar:"documentationSideBar",previous:{title:"DeviceTwin",permalink:"/docs/architecture/edge/devicetwin"},next:{title:"ServiceBus",permalink:"/docs/architecture/edge/servicebus"}},l={},p=[{value:"Overview",id:"overview",level:2},{value:"Insert Operation",id:"insert-operation",level:2},{value:"Update Operation",id:"update-operation",level:2},{value:"Delete Operation",id:"delete-operation",level:2},{value:"Query Operation",id:"query-operation",level:2},{value:"Response Operation",id:"response-operation",level:2},{value:"NodeConnection Operation",id:"nodeconnection-operation",level:2},{value:"MetaSync Operation",id:"metasync-operation",level:2}],d={toc:p};function c(e){let{components:t,...o}=e;return(0,r.yg)("wrapper",(0,a.A)({},d,o,{components:t,mdxType:"MDXLayout"}),(0,r.yg)("h2",{id:"overview"},"Overview"),(0,r.yg)("p",null,"MetaManager is the message processor between edged and edgehub.\nIt's also responsible for storing/retrieving metadata to/from a lightweight database(SQLite)."),(0,r.yg)("p",null,"Metamanager receives different types of messages based on the operations listed below :"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"Insert"),(0,r.yg)("li",{parentName:"ul"},"Update"),(0,r.yg)("li",{parentName:"ul"},"Delete"),(0,r.yg)("li",{parentName:"ul"},"Query"),(0,r.yg)("li",{parentName:"ul"},"Response"),(0,r.yg)("li",{parentName:"ul"},"NodeConnection"),(0,r.yg)("li",{parentName:"ul"},"MetaSync")),(0,r.yg)("h2",{id:"insert-operation"},"Insert Operation"),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"Insert")," operation messages are received via the cloud when new objects are created.\nAn example could be a new user application pod created/deployed through the cloud."),(0,r.yg)("p",null,(0,r.yg)("img",{alt:"Insert Operation",src:n(8772).A,width:"726",height:"364"})),(0,r.yg)("p",null,"The insert operation request is received via the cloud by edgehub. It dispatches the\nrequest to the metamanager which saves this message in the local database.\nmetamanager then sends an asynchronous message to edged. edged processes the insert request e,g.\nby starting the pod and populates the response in the message.\nmetamanager inspects the message, extracts the response and sends it back to edged\nwhich sends it back to the cloud."),(0,r.yg)("h2",{id:"update-operation"},"Update Operation"),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"Update")," operations can happen on objects at the cloud/edge."),(0,r.yg)("p",null,"The update message flow is similar to an insert operation. Additionally, metamanager checks if the resource being updated has changed locally.\nIf there is a delta, only then the update is stored locally and the message is\npassed to edged and response is sent back to the cloud."),(0,r.yg)("p",null,(0,r.yg)("img",{alt:"Update Operation",src:n(43560).A,width:"725",height:"698"})),(0,r.yg)("h2",{id:"delete-operation"},"Delete Operation"),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"Delete")," operations are triggered when objects like pods are deleted from the\ncloud."),(0,r.yg)("p",null,(0,r.yg)("img",{alt:"Delete Operation",src:n(55546).A,width:"722",height:"360"})),(0,r.yg)("h2",{id:"query-operation"},"Query Operation"),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"Query")," operations let you query for metadata either locally at the edge or for some remote resources like config maps/secrets from the cloud. Edged queries this\nmetadata from metamanager which further handles local/remote query processing and\nreturns the response back to edged. A Message resource can be broken into 3 parts\n(resKey,resType,resId) based on separator \u2018/\u2019."),(0,r.yg)("p",null,(0,r.yg)("img",{alt:"Query Operation",src:n(67111).A,width:"706",height:"684"})),(0,r.yg)("h2",{id:"response-operation"},"Response Operation"),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"Responses")," are returned for any operations performed at the cloud/edge. Previous operations\nshowed the response flow either from the cloud or locally at the edge."),(0,r.yg)("h2",{id:"nodeconnection-operation"},"NodeConnection Operation"),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"NodeConnection")," operation messages are received from edgeHub to give information about the cloud connection status. metamanager tracks this state in-memory and uses it in certain operations\nlike remote query to the cloud."),(0,r.yg)("h2",{id:"metasync-operation"},"MetaSync Operation"),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"MetaSync")," operation messages are periodically sent by metamanager to sync the status of the\npods running on the edge node. The sync interval is configurable in ",(0,r.yg)("inlineCode",{parentName:"p"},"conf/edgecore.yaml"),"\n( defaults to ",(0,r.yg)("inlineCode",{parentName:"p"},"60")," seconds )."),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-yaml"},"meta:\n  sync:\n    podstatus:\n      interval: 60 #seconds\n")))}c.isMDXComponent=!0},55546(e,t,n){n.d(t,{A:()=>a});const a=n.p+"assets/images/meta-delete-56a34eae9c8e2051573afaff1350c65e.png"},8772(e,t,n){n.d(t,{A:()=>a});const a=n.p+"assets/images/meta-insert-c621eaa7c15a04cc6eec6a1ac00f938c.png"},67111(e,t,n){n.d(t,{A:()=>a});const a=n.p+"assets/images/meta-query-187af9df5c441b591f63ddfc2dbcfe46.png"},43560(e,t,n){n.d(t,{A:()=>a});const a=n.p+"assets/images/meta-update-816c9e626d823c7cb36eaeda971be81e.png"}}]);

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.