[{"data":1,"prerenderedAt":989},["ShallowReactive",2],{"docs-\u002Fdocs\u002Freference\u002Fapplication-spec":3},{"id":4,"title":5,"body":6,"description":981,"extension":982,"meta":983,"navigation":984,"path":985,"seo":986,"stem":987,"__hash__":988},"docs\u002Fdocs\u002Freference\u002Fapplication-spec.md","application.yaml",{"type":7,"value":8,"toc":974},"minimark",[9,13,17,114,120,387,390,403,407,541,545,561,773,778,781,917,923,927,951,959,970],[10,11,5],"h1",{"id":12},"applicationyaml",[14,15,16],"p",{},"An application spec names a cluster and declares groups of instances, optionally with volumes, services and one load balancer.",[18,19,24],"pre",{"className":20,"code":21,"language":22,"meta":23,"style":23},"language-yaml shiki shiki-themes github-dark-high-contrast","api_version: genesis\u002Fv1\napplication:\n  name: shop                  # DNS-safe; instances are \u003Cname>-\u003Cgroup>-\u003Cn>\n  cluster: lab                # a cluster registered in this ledger\n  groups: [...]\n  load_balancers: [...]       # optional, at most one\n","yaml","",[25,26,27,44,53,68,82,98],"code",{"__ignoreMap":23},[28,29,32,36,40],"span",{"class":30,"line":31},"line",1,[28,33,35],{"class":34},"sKpQp","api_version",[28,37,39],{"class":38},"sMAXC",": ",[28,41,43],{"class":42},"sTRMh","genesis\u002Fv1\n",[28,45,47,50],{"class":30,"line":46},2,[28,48,49],{"class":34},"application",[28,51,52],{"class":38},":\n",[28,54,56,59,61,64],{"class":30,"line":55},3,[28,57,58],{"class":34},"  name",[28,60,39],{"class":38},[28,62,63],{"class":42},"shop",[28,65,67],{"class":66},"sQrFR","                  # DNS-safe; instances are \u003Cname>-\u003Cgroup>-\u003Cn>\n",[28,69,71,74,76,79],{"class":30,"line":70},4,[28,72,73],{"class":34},"  cluster",[28,75,39],{"class":38},[28,77,78],{"class":42},"lab",[28,80,81],{"class":66},"                # a cluster registered in this ledger\n",[28,83,85,88,91,95],{"class":30,"line":84},5,[28,86,87],{"class":34},"  groups",[28,89,90],{"class":38},": [",[28,92,94],{"class":93},"sCcAr","...",[28,96,97],{"class":38},"]\n",[28,99,101,104,106,108,111],{"class":30,"line":100},6,[28,102,103],{"class":34},"  load_balancers",[28,105,90],{"class":38},[28,107,94],{"class":93},[28,109,110],{"class":38},"]       ",[28,112,113],{"class":66},"# optional, at most one\n",[115,116,117,118],"h2",{"id":117},"groups",[28,119],{},[121,122,123,139],"table",{},[124,125,126],"thead",{},[127,128,129,133,136],"tr",{},[130,131,132],"th",{},"Field",[130,134,135],{},"Default",[130,137,138],{},"Rules",[140,141,142,167,184,205,225,249,266,289,305,317,331,347,363,375],"tbody",{},[127,143,144,150,156],{},[145,146,147],"td",{},[25,148,149],{},"name",[145,151,152],{},[153,154,155],"em",{},"(required)",[145,157,158,159,162,163,166],{},"Unique. Instance keys are ",[25,160,161],{},"\u003Cname>-0",", ",[25,164,165],{},"\u003Cname>-1",", …",[127,168,169,174,178],{},[145,170,171],{},[25,172,173],{},"count",[145,175,176],{},[153,177,155],{},[145,179,180,183],{},[25,181,182],{},"0"," or more",[127,185,186,191,195],{},[145,187,188],{},[25,189,190],{},"image",[145,192,193],{},[153,194,155],{},[145,196,197,198,162,201,204],{},"Any image the cluster can resolve: ",[25,199,200],{},"ubuntu:24.04",[25,202,203],{},"images:debian\u002F12",", or an alias you published",[127,206,207,212,217],{},[145,208,209],{},[25,210,211],{},"type",[145,213,214],{},[25,215,216],{},"container",[145,218,219,221,222],{},[25,220,216],{}," or ",[25,223,224],{},"vm",[127,226,227,232,236],{},[145,228,229],{},[25,230,231],{},"target",[145,233,234],{},[153,235,155],{},[145,237,238,239,241,242,244,245,248],{},"Exactly ",[25,240,173],{}," entries, keyed ",[25,243,161],{}," to ",[25,246,247],{},"\u003Cname>-(count-1)",", each naming a cluster member",[127,250,251,256,260],{},[145,252,253],{},[25,254,255],{},"size.cpu",[145,257,258],{},[153,259,155],{},[145,261,262,263],{},"Positive integer. Becomes ",[25,264,265],{},"limits.cpu",[127,267,268,273,277],{},[145,269,270],{},[25,271,272],{},"size.memory",[145,274,275],{},[153,276,155],{},[145,278,279,221,282,285,286],{},[25,280,281],{},"NMiB",[25,283,284],{},"NGiB",". Becomes ",[25,287,288],{},"limits.memory",[127,290,291,296,298],{},[145,292,293],{},[25,294,295],{},"size.root_disk",[145,297],{},[145,299,300,221,302,304],{},[25,301,281],{},[25,303,284],{},". Root disk size",[127,306,307,312,314],{},[145,308,309],{},[25,310,311],{},"env",[145,313],{},[145,315,316],{},"Environment variable name to string value",[127,318,319,324,326],{},[145,320,321],{},[25,322,323],{},"refs",[145,325],{},[145,327,328,329],{},"Environment variable name to an instance key or load balancer name. Keys can't overlap with ",[25,330,311],{},[127,332,333,338,340],{},[145,334,335],{},[25,336,337],{},"expose",[145,339],{},[145,341,342,343,346],{},"List of ",[25,344,345],{},"port: N\u002Ftcp",", unique per group. Published on the member's tailnet address",[127,348,349,354,356],{},[145,350,351],{},[25,352,353],{},"health",[145,355],{},[145,357,358,359],{},"Command argv run inside each instance; exit 0 means healthy. ",[360,361,362],"strong",{},"Required for container groups",[127,364,365,370,372],{},[145,366,367],{},[25,368,369],{},"volumes",[145,371],{},[145,373,374],{},"See below",[127,376,377,382,384],{},[145,378,379],{},[25,380,381],{},"services",[145,383],{},[145,385,386],{},"See below. At most one",[14,388,389],{},"Exposed ports can't collide on a member, and never use the SSH or LXD control ports.",[14,391,392,394,395,398,399,402],{},[25,393,323],{}," is checked (the target must exist) and, when it points at a service group, opens that path in the guard. In ",[25,396,397],{},"0.1.0-dev"," it is ",[360,400,401],{},"not"," set inside the instance, and the general instance-to-instance traffic policy is undecided.",[115,404,369,405],{"id":369},[28,406],{},[121,408,409,419],{},[124,410,411],{},[127,412,413,415,417],{},[130,414,132],{},[130,416,135],{},[130,418,138],{},[140,420,421,434,451,469,489,503,520],{},[127,422,423,427,431],{},[145,424,425],{},[25,426,149],{},[145,428,429],{},[153,430,155],{},[145,432,433],{},"Unique across the application",[127,435,436,441,445],{},[145,437,438],{},[25,439,440],{},"pool",[145,442,443],{},[153,444,155],{},[145,446,447,448],{},"A storage pool on the member, usually ",[25,449,450],{},"default",[127,452,453,458,462],{},[145,454,455],{},[25,456,457],{},"size",[145,459,460],{},[153,461,155],{},[145,463,464,221,466,468],{},[25,465,281],{},[25,467,284],{},". Volumes grow; they never shrink",[127,470,471,476,481],{},[145,472,473],{},[25,474,475],{},"content_type",[145,477,478],{},[25,479,480],{},"filesystem",[145,482,483,221,485,488],{},[25,484,480],{},[25,486,487],{},"block",". Never changes after creation. Block volumes attach only to VM groups",[127,490,491,496,500],{},[145,492,493],{},[25,494,495],{},"attach",[145,497,498],{},[153,499,155],{},[145,501,502],{},"Instance keys from this group",[127,504,505,510,514],{},[145,506,507],{},[25,508,509],{},"mount",[145,511,512],{},[153,513,155],{},[145,515,516,517],{},"Absolute path, not ",[25,518,519],{},"\u002F",[127,521,522,527,532],{},[145,523,524],{},[25,525,526],{},"security.shared",[145,528,529],{},[25,530,531],{},"false",[145,533,534,535,537,538],{},"Required when ",[25,536,495],{}," lists more than one instance. All of them must be on one member, and you approve the share with ",[25,539,540],{},"--force-volume-share",[115,542,381,543],{"id":381},[28,544],{},[14,546,547,548,162,551,554,555,221,558,560],{},"A group with a service must be ",[25,549,550],{},"type: vm",[25,552,553],{},"count: 1",", with image ",[25,556,557],{},"ubuntu:22.04",[25,559,200],{},".",[121,562,563,573],{},[124,564,565],{},[127,566,567,569,571],{},[130,568,132],{},[130,570,135],{},[130,572,138],{},[140,574,575,594,619,641,657,677,696,709,721,737,749],{},[127,576,577,582,586],{},[145,578,579],{},[25,580,581],{},"kind",[145,583,584],{},[153,585,155],{},[145,587,588,221,591],{},[25,589,590],{},"postgres",[25,592,593],{},"clickhouse",[127,595,596,601,605],{},[145,597,598],{},[25,599,600],{},"version",[145,602,603],{},[153,604,155],{},[145,606,607,608,611,612,615,616],{},"Never ",[25,609,610],{},"latest",". PostgreSQL: a major (",[25,613,614],{},"\"17\"",", newest release frozen at plan time) or an exact package version. ClickHouse: an exact numeric release like ",[25,617,618],{},"\"24.8.4.13\"",[127,620,621,626,630],{},[145,622,623],{},[25,624,625],{},"admin_password_env",[145,627,628],{},[153,629,155],{},[145,631,632,633,636,637,640],{},"Name of the variable holding the admin password. ",[25,634,635],{},"plan"," and ",[25,638,639],{},"deploy"," refuse if unset or empty",[127,642,643,648,650],{},[145,644,645],{},[25,646,647],{},"admin_user_env",[145,649],{},[145,651,652,653,221,655],{},"Name of a variable holding the admin user. Otherwise ",[25,654,590],{},[25,656,450],{},[127,658,659,663,666],{},[145,660,661],{},[25,662,149],{},[145,664,665],{},"the kind",[145,667,668,669,672,673,676],{},"Unique; used by ",[25,670,671],{},"upgrade --service"," and in plan rows (",[25,674,675],{},"services.\u003Cname>",")",[127,678,679,684,693],{},[145,680,681],{},[25,682,683],{},"port",[145,685,686,689,690],{},[25,687,688],{},"5432"," \u002F ",[25,691,692],{},"9000",[145,694,695],{},"1 to 65535",[127,697,698,703,706],{},[145,699,700],{},[25,701,702],{},"data_volume",[145,704,705],{},"the only block volume",[145,707,708],{},"Required unless exactly one block volume is attached",[127,710,711,716,718],{},[145,712,713],{},[25,714,715],{},"data_path",[145,717],{},[145,719,720],{},"Data directory inside the volume",[127,722,723,728,730],{},[145,724,725],{},[25,726,727],{},"mount_device",[145,729],{},[145,731,732,733,736],{},"A ",[25,734,735],{},"\u002Fdev\u002Fdisk\u002Fby-id\u002F…"," path",[127,738,739,743,746],{},[145,740,741],{},[25,742,353],{},[145,744,745],{},"generated",[145,747,748],{},"Must match the generated health command if given",[127,750,751,756,758],{},[145,752,753],{},[25,754,755],{},"tuning",[145,757],{},[145,759,760,761,764,765,768,769,772],{},"PostgreSQL: ",[25,762,763],{},"max_connections"," (positive integer), ",[25,766,767],{},"shared_buffers"," (size). ClickHouse: ",[25,770,771],{},"max_memory_usage"," (size)",[115,774,775,776],{"id":775},"load_balancers",[28,777],{},[14,779,780],{},"At most one.",[121,782,783,793],{},[124,784,785],{},[127,786,787,789,791],{},[130,788,132],{},[130,790,135],{},[130,792,138],{},[140,794,795,808,823,837,853,870,889,904],{},[127,796,797,801,805],{},[145,798,799],{},[25,800,149],{},[145,802,803],{},[153,804,155],{},[145,806,807],{},"Must not collide with a group name or instance key",[127,809,810,814,818],{},[145,811,812],{},[25,813,581],{},[145,815,816],{},[153,817,155],{},[145,819,820],{},[25,821,822],{},"haproxy",[127,824,825,830,834],{},[145,826,827],{},[25,828,829],{},"balances",[145,831,832],{},[153,833,155],{},[145,835,836],{},"The group or groups whose instances become backends",[127,838,839,843,847],{},[145,840,841],{},[25,842,231],{},[145,844,845],{},[153,846,155],{},[145,848,849,850],{},"Exactly one replica: ",[25,851,852],{},"{\u003Cname>-0: \u003Cmember>}",[127,854,855,860,864],{},[145,856,857],{},[25,858,859],{},"listen",[145,861,862],{},[153,863,155],{},[145,865,866,869],{},[25,867,868],{},"N\u002Ftcp",", published on the member's tailnet address. Can't clash with a balanced group's exposure",[127,871,872,877,882],{},[145,873,874],{},[25,875,876],{},"check.type",[145,878,879],{},[25,880,881],{},"tcp",[145,883,884,221,886],{},[25,885,881],{},[25,887,888],{},"http",[127,890,891,896,898],{},[145,892,893],{},[25,894,895],{},"check.path",[145,897],{},[145,899,900,901,903],{},"For ",[25,902,888],{}," checks",[127,905,906,911,913],{},[145,907,908],{},[25,909,910],{},"check.expect_status",[145,912],{},[145,914,900,915,903],{},[25,916,888],{},[14,918,919,920,922],{},"The load balancer's check is separate from the group's ",[25,921,353],{}," command.",[115,924,926],{"id":925},"registration-rules","Registration rules",[928,929,930],"ul",{},[931,932,933,934,937,938,162,940,162,942,162,944,636,947,950],"li",{},"A name is bound to one spec path and one cluster the first time you ",[25,935,936],{},"init"," it. ",[25,939,936],{},[25,941,635],{},[25,943,639],{},[25,945,946],{},"rollback",[25,948,949],{},"destroy"," refuse if either changes:",[18,952,957],{"className":953,"code":955,"language":956,"meta":23},[954],"language-text","application \"\u003Cname>\" is registered at \u003Cpath> on cluster \"\u003Cc>\", not \u003Cpath> on \"\u003Cc>\"\n","text",[25,958,955],{"__ignoreMap":23},[928,960,961],{},[931,962,963,965,966,969],{},[25,964,231],{}," members must belong to the registered cluster. Change the cluster spec and the application refuses with ",[25,967,968],{},"sg:application-cluster-mismatch"," until placements match.",[971,972,973],"style",{},"html pre.shiki code .sKpQp, html code.shiki .sKpQp{--shiki-default:#72F088}html pre.shiki code .sMAXC, html code.shiki .sMAXC{--shiki-default:#F0F3F6}html pre.shiki code .sTRMh, html code.shiki .sTRMh{--shiki-default:#ADDCFF}html pre.shiki code .sQrFR, html code.shiki .sQrFR{--shiki-default:#BDC4CC}html pre.shiki code .sCcAr, html code.shiki .sCcAr{--shiki-default:#91CBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":23,"searchDepth":46,"depth":46,"links":975},[976,977,978,979,980],{"id":117,"depth":46,"text":117},{"id":369,"depth":46,"text":369},{"id":381,"depth":46,"text":381},{"id":775,"depth":46,"text":775},{"id":925,"depth":46,"text":926},"Every application.yaml field for groups, volumes, services and load balancers, with the validation rules sg applies.","md",{},true,"\u002Fdocs\u002Freference\u002Fapplication-spec",{"title":5,"description":981},"docs\u002Freference\u002Fapplication-spec","i3FtaeUOA0ymYuX0NhWC10VZEl6vqDItOxD1nZuVJQs",1796464240887]