hammerkit 2.1.0-next.1 → 2.1.0-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build.schema.json +126 -28
- package/dist/cli.js +5 -0
- package/dist/dashboard/assets/graph-canvas-BFnEN5i0.js +8 -0
- package/dist/dashboard/assets/{index-DRSwIRXd.js → index-CE5PSB3y.js} +15 -9
- package/dist/dashboard/assets/index-Dt3ITvRO.css +2 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/docker/item-network.js +6 -5
- package/dist/docker/remove-orphaned-containers.js +5 -4
- package/dist/environment/replace-env-variables.js +8 -5
- package/dist/environment/run-source-envs.js +2 -1
- package/dist/executer/check-readiness.js +8 -4
- package/dist/executer/docker-healthcheck.js +73 -0
- package/dist/executer/docker-service.js +21 -15
- package/dist/kubernetes/ensure-kubernetes-deployment-exists.js +62 -14
- package/dist/network/healthcheck-request.js +38 -0
- package/dist/optimizer/work-task-cache-description.js +5 -3
- package/dist/planner/image-build.js +5 -0
- package/dist/planner/service-definition.js +2 -1
- package/dist/planner/utils/append-work-service.js +12 -4
- package/dist/planner/utils/dependency-outputs.js +7 -6
- package/dist/planner/validate.js +41 -0
- package/dist/planner/work-healthcheck.js +23 -2
- package/dist/planner/work-runtime-docker.js +24 -1
- package/dist/planner/work-runtime-kubernetes.js +37 -16
- package/dist/planner/work-secret.js +33 -11
- package/dist/planner/work-service-id.js +30 -6
- package/dist/planner/work-service.js +2 -2
- package/dist/program.js +19 -1
- package/dist/remote/annotations.js +8 -2
- package/dist/remote/remote-work-commands.js +5 -3
- package/dist/schema/build-file-base-task-schema.js +16 -1
- package/dist/schema/build-file-image-build-schema.js +5 -8
- package/dist/schema/build-file-service-container-healthcheck.js +25 -7
- package/dist/schema/reference-parser.js +108 -43
- package/dist/schema/work-scope-parser.js +8 -0
- package/dist/secrets/prefetch-secrets.js +20 -1
- package/dist/server/kubernetes-sandbox-storage.js +3 -2
- package/dist/server/overview.js +7 -1
- package/dist/server/plan.js +16 -1
- package/dist/server/run-source-environment.js +1 -1
- package/dist/server/sandbox-files-api.js +27 -12
- package/dist/server/sandbox-files.js +3 -2
- package/dist/server/sandbox-pod.js +1 -1
- package/dist/server/sandboxes-api.js +65 -14
- package/dist/server/sandboxes.js +19 -3
- package/package.json +1 -1
- package/dist/dashboard/assets/graph-canvas-DtJSpova.js +0 -8
- package/dist/dashboard/assets/index-BndChMep.css +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:block))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-800:oklch(43.2% .095 166.913);--color-emerald-900:oklch(37.8% .077 168.94);--color-emerald-950:oklch(26.2% .051 172.552);--color-teal-600:oklch(60% .118 184.704);--color-sky-50:oklch(97.7% .013 236.62);--color-sky-200:oklch(90.1% .058 230.902);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-sky-600:oklch(58.8% .158 241.966);--color-sky-700:oklch(50% .134 242.749);--color-sky-900:oklch(39.1% .09 240.876);--color-sky-950:oklch(29.3% .066 243.157);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-violet-300:oklch(81.1% .111 293.571);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-500:oklch(60.6% .25 292.717);--color-violet-700:oklch(49.1% .27 292.581);--color-fuchsia-400:oklch(74% .238 322.16);--color-fuchsia-600:oklch(59.1% .293 322.896);--color-stone-50:oklch(98.5% .001 106.423);--color-stone-100:oklch(97% .001 106.424);--color-stone-200:oklch(92.3% .003 48.717);--color-stone-300:oklch(86.9% .005 56.366);--color-stone-400:oklch(70.9% .01 56.259);--color-stone-500:oklch(55.3% .013 58.071);--color-stone-600:oklch(44.4% .011 73.639);--color-stone-700:oklch(37.4% .01 67.558);--color-stone-800:oklch(26.8% .007 34.298);--color-stone-900:oklch(21.6% .006 56.043);--color-stone-950:oklch(14.7% .004 49.25);--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-lg:32rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--tracking-wide:.025em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-3xl:1.5rem;--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}html{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;scrollbar-gutter:stable}@media (prefers-color-scheme:dark){html{--lightningcss-light: ;--lightningcss-dark:initial}}body{background-color:var(--color-stone-50);color:var(--color-stone-900);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){body{background-color:var(--color-stone-950);color:var(--color-stone-100)}}}@layer components{.link{color:var(--color-emerald-700);text-underline-offset:2px}@media (hover:hover){.link:hover{text-decoration-line:underline}}@media (prefers-color-scheme:dark){.link{color:var(--color-emerald-400)}}.log{border-radius:var(--radius-lg);background-color:var(--color-stone-950);padding:calc(var(--spacing) * 3);font-family:var(--font-mono);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed);white-space:pre;color:var(--color-stone-200);overflow-x:auto}@media (prefers-color-scheme:dark){.log{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-stone-800)}}}@layer utilities{.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.-inset-y-0\.5{inset-block:calc(var(--spacing) * -.5)}.inset-y-0{inset-block:0}.top-0{top:0}.top-full{top:100%}.right-0{right:0}.left-0{left:0}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.order-last{order:9999}.col-span-2{grid-column:span 2/span 2}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.-mx-3{margin-inline:calc(var(--spacing) * -3)}.mx-3{margin-inline:calc(var(--spacing) * 3)}.mx-auto{margin-inline:auto}.my-1{margin-block:var(--spacing)}.my-2{margin-block:calc(var(--spacing) * 2)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mr-1{margin-right:var(--spacing)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:var(--spacing)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.-ml-1{margin-left:calc(var(--spacing) * -1)}.ml-1{margin-left:var(--spacing)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-0{height:0}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-40{height:calc(var(--spacing) * 40)}.h-\[52px\]{height:52px}.h-px{height:1px}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-96{max-height:calc(var(--spacing) * 96)}.min-h-0{min-height:0}.min-h-screen{min-height:100vh}.w-1{width:var(--spacing)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-10{width:calc(var(--spacing) * 10)}.w-64{width:calc(var(--spacing) * 64)}.w-80{width:calc(var(--spacing) * 80)}.w-\[184px\]{width:184px}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.max-w-72{max-width:calc(var(--spacing) * 72)}.max-w-80{max-width:calc(var(--spacing) * 80)}.max-w-\[calc\(100vw-2rem\)\]{max-width:calc(100vw - 2rem)}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.min-w-0{min-width:0}.min-w-0\.5{min-width:calc(var(--spacing) * .5)}.min-w-48{min-width:calc(var(--spacing) * 48)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.origin-center{transform-origin:50%}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-90{rotate:90deg}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-help{cursor:help}.cursor-pointer{cursor:pointer}.\[scrollbar-width\:none\]{scrollbar-width:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\[7rem_1fr\]{grid-template-columns:7rem 1fr}.grid-cols-\[9rem_1fr\]{grid-template-columns:9rem 1fr}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-\[auto_auto\]{grid-template-columns:auto auto}.grid-cols-\[max-content_1fr\]{grid-template-columns:max-content 1fr}.grid-cols-\[minmax\(6rem\,max-content\)_1fr_3\.5rem\]{grid-template-columns:minmax(6rem,max-content) 1fr 3.5rem}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-x-6{column-gap:calc(var(--spacing) * 6)}.gap-y-0\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-stone-100>:not(:last-child)){border-color:var(--color-stone-100)}.self-center{align-self:center}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-y-hidden{overflow-y:hidden}.rounded{border-radius:.25rem}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-amber-500{border-color:var(--color-amber-500)}.border-amber-500\/50{border-color:#f99c0080}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/50{border-color:color-mix(in oklab, var(--color-amber-500) 50%, transparent)}}.border-amber-600\/40{border-color:#dd740066}@supports (color:color-mix(in lab, red, red)){.border-amber-600\/40{border-color:color-mix(in oklab, var(--color-amber-600) 40%, transparent)}}.border-emerald-300{border-color:var(--color-emerald-300)}.border-emerald-500{border-color:var(--color-emerald-500)}.border-emerald-600{border-color:var(--color-emerald-600)}.border-emerald-600\/40{border-color:#00976766}@supports (color:color-mix(in lab, red, red)){.border-emerald-600\/40{border-color:color-mix(in oklab, var(--color-emerald-600) 40%, transparent)}}.border-emerald-600\/50{border-color:#00976780}@supports (color:color-mix(in lab, red, red)){.border-emerald-600\/50{border-color:color-mix(in oklab, var(--color-emerald-600) 50%, transparent)}}.border-emerald-700{border-color:var(--color-emerald-700)}.border-red-200{border-color:var(--color-red-200)}.border-red-300{border-color:var(--color-red-300)}.border-red-500{border-color:var(--color-red-500)}.border-red-600\/40{border-color:#e4001466}@supports (color:color-mix(in lab, red, red)){.border-red-600\/40{border-color:color-mix(in oklab, var(--color-red-600) 40%, transparent)}}.border-sky-200{border-color:var(--color-sky-200)}.border-sky-300{border-color:var(--color-sky-300)}.border-sky-500{border-color:var(--color-sky-500)}.border-sky-600\/40{border-color:#0084cc66}@supports (color:color-mix(in lab, red, red)){.border-sky-600\/40{border-color:color-mix(in oklab, var(--color-sky-600) 40%, transparent)}}.border-stone-200{border-color:var(--color-stone-200)}.border-stone-300{border-color:var(--color-stone-300)}.border-stone-400{border-color:var(--color-stone-400)}.border-transparent{border-color:#0000}.border-violet-400{border-color:var(--color-violet-400)}.border-violet-500{border-color:var(--color-violet-500)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-700{background-color:var(--color-amber-700)}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-emerald-300{background-color:var(--color-emerald-300)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/15{background-color:color-mix(in oklab, var(--color-emerald-500) 15%, transparent)}}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-emerald-600\/30{background-color:#0097674d}@supports (color:color-mix(in lab, red, red)){.bg-emerald-600\/30{background-color:color-mix(in oklab, var(--color-emerald-600) 30%, transparent)}}.bg-fuchsia-400{background-color:var(--color-fuchsia-400)}.bg-indigo-500{background-color:var(--color-indigo-500)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab, red, red)){.bg-red-500\/15{background-color:color-mix(in oklab, var(--color-red-500) 15%, transparent)}}.bg-sky-50{background-color:var(--color-sky-50)}.bg-sky-500{background-color:var(--color-sky-500)}.bg-stone-50{background-color:var(--color-stone-50)}.bg-stone-50\/60{background-color:#fafaf999}@supports (color:color-mix(in lab, red, red)){.bg-stone-50\/60{background-color:color-mix(in oklab, var(--color-stone-50) 60%, transparent)}}.bg-stone-100{background-color:var(--color-stone-100)}.bg-stone-200{background-color:var(--color-stone-200)}.bg-stone-300{background-color:var(--color-stone-300)}.bg-stone-400{background-color:var(--color-stone-400)}.bg-teal-600{background-color:var(--color-teal-600)}.bg-violet-400{background-color:var(--color-violet-400)}.bg-white{background-color:var(--color-white)}.fill-current{fill:currentColor}.fill-none{fill:none}.stroke-current{stroke:currentColor}.stroke-none{stroke:none}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\!{padding:calc(var(--spacing) * 3)!important}.p-4{padding:calc(var(--spacing) * 4)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-6{padding-block:calc(var(--spacing) * 6)}.pt-1{padding-top:var(--spacing)}.pt-1\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pb-0\.5{padding-bottom:calc(var(--spacing) * .5)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pl-5{padding-left:calc(var(--spacing) * 5)}.pl-9{padding-left:calc(var(--spacing) * 9)}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.align-top{vertical-align:top}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[0\.7rem\]{font-size:.7rem}.text-\[0\.8rem\]{font-size:.8rem}.text-\[0\.65rem\]{font-size:.65rem}.text-\[0\.85em\]{font-size:.85em}.leading-none{--tw-leading:1;line-height:1}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-normal{overflow-wrap:normal;word-break:normal}.\[overflow-wrap\:anywhere\]{overflow-wrap:anywhere}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-700{color:var(--color-emerald-700)}.text-emerald-800{color:var(--color-emerald-800)}.text-red-300{color:var(--color-red-300)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-sky-400{color:var(--color-sky-400)}.text-sky-700{color:var(--color-sky-700)}.text-sky-900{color:var(--color-sky-900)}.text-stone-400{color:var(--color-stone-400)}.text-stone-500{color:var(--color-stone-500)}.text-stone-600{color:var(--color-stone-600)}.text-stone-700{color:var(--color-stone-700)}.text-stone-800{color:var(--color-stone-800)}.text-stone-900{color:var(--color-stone-900)}.text-violet-700{color:var(--color-violet-700)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal, ) var(--tw-slashed-zero, ) var(--tw-numeric-figure, ) var(--tw-numeric-spacing, ) var(--tw-numeric-fraction, )}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.decoration-stone-400\/40{text-decoration-color:#a6a09b66}@supports (color:color-mix(in lab, red, red)){.decoration-stone-400\/40{-webkit-text-decoration-color:color-mix(in oklab, var(--color-stone-400) 40%, transparent);-webkit-text-decoration-color:color-mix(in oklab, var(--color-stone-400) 40%, transparent);-webkit-text-decoration-color:color-mix(in oklab, var(--color-stone-400) 40%, transparent);text-decoration-color:color-mix(in oklab, var(--color-stone-400) 40%, transparent)}}.decoration-stone-400\/70{text-decoration-color:#a6a09bb3}@supports (color:color-mix(in lab, red, red)){.decoration-stone-400\/70{-webkit-text-decoration-color:color-mix(in oklab, var(--color-stone-400) 70%, transparent);-webkit-text-decoration-color:color-mix(in oklab, var(--color-stone-400) 70%, transparent);-webkit-text-decoration-color:color-mix(in oklab, var(--color-stone-400) 70%, transparent);text-decoration-color:color-mix(in oklab, var(--color-stone-400) 70%, transparent)}}.decoration-dotted{text-decoration-style:dotted}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.accent-emerald-600{accent-color:var(--color-emerald-600)}.opacity-35{opacity:.35}.opacity-60{opacity:.6}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-emerald-500{--tw-ring-color:var(--color-emerald-500)}.ring-white{--tw-ring-color:var(--color-white)}.ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset, ) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.ring-offset-white{--tw-ring-offset-color:var(--color-white)}.outline-1{outline-style:var(--tw-outline-style);outline-width:1px}.outline-amber-400{outline-color:var(--color-amber-400)}.filter{filter:var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, )}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}@media (hover:hover){.hover\:border-stone-300:hover{border-color:var(--color-stone-300)}.hover\:border-stone-400:hover{border-color:var(--color-stone-400)}.hover\:bg-amber-600:hover{background-color:var(--color-amber-600)}.hover\:bg-emerald-50:hover{background-color:var(--color-emerald-50)}.hover\:bg-emerald-700:hover{background-color:var(--color-emerald-700)}.hover\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\:bg-stone-50:hover{background-color:var(--color-stone-50)}.hover\:bg-stone-100:hover{background-color:var(--color-stone-100)}.hover\:bg-stone-200:hover{background-color:var(--color-stone-200)}.hover\:text-stone-600:hover{color:var(--color-stone-600)}.hover\:text-stone-900:hover{color:var(--color-stone-900)}.hover\:underline:hover{text-decoration-line:underline}.hover\:decoration-current:hover{text-decoration-color:currentColor}.hover\:brightness-95:hover{--tw-brightness:brightness(95%);filter:var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, )}}.focus-visible\:rounded-sm:focus-visible{border-radius:var(--radius-sm)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-emerald-500:focus-visible{--tw-ring-color:var(--color-emerald-500)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:opacity-50:disabled{opacity:.5}@media (width>=40rem){.sm\:ml-auto{margin-left:auto}.sm\:w-80{width:calc(var(--spacing) * 80)}.sm\:max-w-sm{max-width:var(--container-sm)}.sm\:max-w-xs{max-width:var(--container-xs)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (width>=48rem){.md\:sticky{position:sticky}.md\:top-4{top:calc(var(--spacing) * 4)}.md\:order-none{order:0}.md\:max-h-\[80vh\]{max-height:80vh}.md\:w-auto{width:auto}.md\:flex-1{flex:1}.md\:grid-cols-\[minmax\(12rem\,18rem\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(12rem,18rem) minmax(0,1fr)}.md\:overflow-y-auto{overflow-y:auto}}@media (width>=64rem){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-\[max-content_1fr\]{grid-template-columns:max-content 1fr}}@media (prefers-color-scheme:dark){:where(.dark\:divide-stone-800>:not(:last-child)){border-color:var(--color-stone-800)}.dark\:border-emerald-400{border-color:var(--color-emerald-400)}.dark\:border-emerald-500{border-color:var(--color-emerald-500)}.dark\:border-emerald-700{border-color:var(--color-emerald-700)}.dark\:border-red-400{border-color:var(--color-red-400)}.dark\:border-red-900{border-color:var(--color-red-900)}.dark\:border-sky-400{border-color:var(--color-sky-400)}.dark\:border-sky-700{border-color:var(--color-sky-700)}.dark\:border-sky-900{border-color:var(--color-sky-900)}.dark\:border-stone-500{border-color:var(--color-stone-500)}.dark\:border-stone-600{border-color:var(--color-stone-600)}.dark\:border-stone-700{border-color:var(--color-stone-700)}.dark\:border-stone-800{border-color:var(--color-stone-800)}.dark\:border-violet-500{border-color:var(--color-violet-500)}.dark\:bg-amber-500{background-color:var(--color-amber-500)}.dark\:bg-amber-900\/50{background-color:#7b330680}@supports (color:color-mix(in lab, red, red)){.dark\:bg-amber-900\/50{background-color:color-mix(in oklab, var(--color-amber-900) 50%, transparent)}}.dark\:bg-amber-950{background-color:var(--color-amber-950)}.dark\:bg-amber-950\/30{background-color:#4619014d}@supports (color:color-mix(in lab, red, red)){.dark\:bg-amber-950\/30{background-color:color-mix(in oklab, var(--color-amber-950) 30%, transparent)}}.dark\:bg-emerald-400{background-color:var(--color-emerald-400)}.dark\:bg-emerald-400\/30{background-color:#00d2944d}@supports (color:color-mix(in lab, red, red)){.dark\:bg-emerald-400\/30{background-color:color-mix(in oklab, var(--color-emerald-400) 30%, transparent)}}.dark\:bg-emerald-500{background-color:var(--color-emerald-500)}.dark\:bg-emerald-700{background-color:var(--color-emerald-700)}.dark\:bg-emerald-900\/50{background-color:#004e3b80}@supports (color:color-mix(in lab, red, red)){.dark\:bg-emerald-900\/50{background-color:color-mix(in oklab, var(--color-emerald-900) 50%, transparent)}}.dark\:bg-emerald-950{background-color:var(--color-emerald-950)}.dark\:bg-fuchsia-600{background-color:var(--color-fuchsia-600)}.dark\:bg-indigo-400{background-color:var(--color-indigo-400)}.dark\:bg-red-400{background-color:var(--color-red-400)}.dark\:bg-red-950{background-color:var(--color-red-950)}.dark\:bg-sky-400{background-color:var(--color-sky-400)}.dark\:bg-sky-950{background-color:var(--color-sky-950)}.dark\:bg-stone-500{background-color:var(--color-stone-500)}.dark\:bg-stone-600{background-color:var(--color-stone-600)}.dark\:bg-stone-700{background-color:var(--color-stone-700)}.dark\:bg-stone-800{background-color:var(--color-stone-800)}.dark\:bg-stone-800\/60{background-color:#29252499}@supports (color:color-mix(in lab, red, red)){.dark\:bg-stone-800\/60{background-color:color-mix(in oklab, var(--color-stone-800) 60%, transparent)}}.dark\:bg-stone-900{background-color:var(--color-stone-900)}.dark\:bg-stone-950{background-color:var(--color-stone-950)}.dark\:bg-stone-950\/30{background-color:#0c0a094d}@supports (color:color-mix(in lab, red, red)){.dark\:bg-stone-950\/30{background-color:color-mix(in oklab, var(--color-stone-950) 30%, transparent)}}.dark\:bg-stone-950\/40{background-color:#0c0a0966}@supports (color:color-mix(in lab, red, red)){.dark\:bg-stone-950\/40{background-color:color-mix(in oklab, var(--color-stone-950) 40%, transparent)}}.dark\:bg-teal-600{background-color:var(--color-teal-600)}.dark\:bg-violet-500{background-color:var(--color-violet-500)}.dark\:text-amber-300{color:var(--color-amber-300)}.dark\:text-amber-400{color:var(--color-amber-400)}.dark\:text-emerald-200{color:var(--color-emerald-200)}.dark\:text-emerald-300{color:var(--color-emerald-300)}.dark\:text-emerald-400{color:var(--color-emerald-400)}.dark\:text-red-300{color:var(--color-red-300)}.dark\:text-red-400{color:var(--color-red-400)}.dark\:text-sky-200{color:var(--color-sky-200)}.dark\:text-sky-300{color:var(--color-sky-300)}.dark\:text-stone-100{color:var(--color-stone-100)}.dark\:text-stone-200{color:var(--color-stone-200)}.dark\:text-stone-300{color:var(--color-stone-300)}.dark\:text-stone-400{color:var(--color-stone-400)}.dark\:text-stone-500{color:var(--color-stone-500)}.dark\:text-stone-950{color:var(--color-stone-950)}.dark\:text-violet-300{color:var(--color-violet-300)}.dark\:text-white{color:var(--color-white)}.dark\:decoration-stone-500\/50{text-decoration-color:#79716b80}@supports (color:color-mix(in lab, red, red)){.dark\:decoration-stone-500\/50{-webkit-text-decoration-color:color-mix(in oklab, var(--color-stone-500) 50%, transparent);-webkit-text-decoration-color:color-mix(in oklab, var(--color-stone-500) 50%, transparent);-webkit-text-decoration-color:color-mix(in oklab, var(--color-stone-500) 50%, transparent);text-decoration-color:color-mix(in oklab, var(--color-stone-500) 50%, transparent)}}.dark\:decoration-stone-500\/70{text-decoration-color:#79716bb3}@supports (color:color-mix(in lab, red, red)){.dark\:decoration-stone-500\/70{-webkit-text-decoration-color:color-mix(in oklab, var(--color-stone-500) 70%, transparent);-webkit-text-decoration-color:color-mix(in oklab, var(--color-stone-500) 70%, transparent);-webkit-text-decoration-color:color-mix(in oklab, var(--color-stone-500) 70%, transparent);text-decoration-color:color-mix(in oklab, var(--color-stone-500) 70%, transparent)}}.dark\:ring-stone-900{--tw-ring-color:var(--color-stone-900)}.dark\:ring-offset-stone-950{--tw-ring-offset-color:var(--color-stone-950)}@media (hover:hover){.dark\:hover\:border-stone-500:hover{border-color:var(--color-stone-500)}.dark\:hover\:border-stone-600:hover{border-color:var(--color-stone-600)}.dark\:hover\:bg-emerald-400:hover{background-color:var(--color-emerald-400)}.dark\:hover\:bg-emerald-950:hover{background-color:var(--color-emerald-950)}.dark\:hover\:bg-red-950:hover{background-color:var(--color-red-950)}.dark\:hover\:bg-stone-700:hover{background-color:var(--color-stone-700)}.dark\:hover\:bg-stone-800:hover{background-color:var(--color-stone-800)}.dark\:hover\:bg-stone-800\/40:hover{background-color:#29252466}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-stone-800\/40:hover{background-color:color-mix(in oklab, var(--color-stone-800) 40%, transparent)}}.dark\:hover\:text-stone-300:hover{color:var(--color-stone-300)}.dark\:hover\:text-white:hover{color:var(--color-white)}}}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
<meta name="robots" content="noindex" />
|
|
7
7
|
<link rel="icon" href="/logo.png" type="image/png" />
|
|
8
8
|
<title>hammerkit</title>
|
|
9
|
-
<script type="module" crossorigin src="/assets/index-
|
|
10
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
9
|
+
<script type="module" crossorigin src="/assets/index-CE5PSB3y.js"></script>
|
|
10
|
+
<link rel="stylesheet" crossorigin href="/assets/index-Dt3ITvRO.css">
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
|
13
13
|
<div id="root"></div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.removeOrphanedNetworks = exports.removeItemNetworks = exports.getNetworkHostConfig = exports.getPortBinding = exports.removeItemNetwork = exports.prepareItemNetwork = exports.createInternalNetwork = exports.checkNetworkLimitSupport = exports.getNeedNetworkName = exports.getProxyNetworkName = exports.getRunNetworkName = exports.getItemNetworkName = void 0;
|
|
3
|
+
exports.removeOrphanedNetworks = exports.removeItemNetworks = exports.getNetworkHostConfig = exports.getPortBinding = exports.removeItemNetwork = exports.prepareItemNetwork = exports.HELPER_HOST_CONFIG = exports.createInternalNetwork = exports.checkNetworkLimitSupport = exports.getNeedNetworkName = exports.getProxyNetworkName = exports.getRunNetworkName = exports.getItemNetworkName = void 0;
|
|
4
4
|
const readline_1 = require("readline");
|
|
5
5
|
const stream_1 = require("stream");
|
|
6
6
|
const work_service_1 = require("../planner/work-service");
|
|
@@ -154,8 +154,9 @@ async function createInternalNetwork(docker, name, labels) {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
exports.createInternalNetwork = createInternalNetwork;
|
|
157
|
-
// What the proxy
|
|
158
|
-
|
|
157
|
+
// What the proxy, the relay and the container of a healthcheck may do: serve or connect,
|
|
158
|
+
// nothing else.
|
|
159
|
+
exports.HELPER_HOST_CONFIG = {
|
|
159
160
|
CapDrop: ['ALL'],
|
|
160
161
|
SecurityOpt: ['no-new-privileges'],
|
|
161
162
|
ReadonlyRootfs: true,
|
|
@@ -340,7 +341,7 @@ async function startEgressProxy(docker, item, environment, networkName, network,
|
|
|
340
341
|
Env: Object.entries((0, egress_proxy_1.getItemProxyEnvironment)(item, egress_proxy_1.EGRESS_PROXY_HOST)).map(([key, value]) => `${key}=${value}`),
|
|
341
342
|
Labels: getHelperLabels(networkName, options),
|
|
342
343
|
// unprivileged, it still listens on the port of a TCP forward below 1024
|
|
343
|
-
HostConfig: { ...HELPER_HOST_CONFIG, Sysctls: { 'net.ipv4.ip_unprivileged_port_start': '0' } },
|
|
344
|
+
HostConfig: { ...exports.HELPER_HOST_CONFIG, Sysctls: { 'net.ipv4.ip_unprivileged_port_start': '0' } },
|
|
344
345
|
};
|
|
345
346
|
const container = await docker.createContainer(createOptions);
|
|
346
347
|
await docker.getNetwork(getProxyNetworkName(networkName)).connect({
|
|
@@ -402,7 +403,7 @@ async function startPortRelay(docker, item, environment, networkName, service, p
|
|
|
402
403
|
Labels: getHelperLabels(networkName, options),
|
|
403
404
|
ExposedPorts: Object.fromEntries(ports.map((port) => [`${port.containerPort}/tcp`, {}])),
|
|
404
405
|
HostConfig: {
|
|
405
|
-
...HELPER_HOST_CONFIG,
|
|
406
|
+
...exports.HELPER_HOST_CONFIG,
|
|
406
407
|
PortBindings: Object.fromEntries(ports.map((port) => [`${port.containerPort}/tcp`, [getPortBinding(port)]])),
|
|
407
408
|
},
|
|
408
409
|
});
|
|
@@ -4,8 +4,8 @@ exports.removeOrphanedContainers = exports.isDockerUnreachable = exports.isProce
|
|
|
4
4
|
const os_1 = require("os");
|
|
5
5
|
const remove_container_1 = require("./remove-container");
|
|
6
6
|
// A hammerkit container nothing will remove any more: a task container (they
|
|
7
|
-
// never outlive their run), a service
|
|
8
|
-
// gone, started by a hammerkit process of this machine that no longer exists,
|
|
7
|
+
// never outlive their run), a service, an egress proxy or the container of a
|
|
8
|
+
// healthcheck of a run that is gone, started by a hammerkit process of this machine that no longer exists,
|
|
9
9
|
// and the paused state records hammerkit kept before 1.9. Services of `up --daemon` and
|
|
10
10
|
// containers of other machines or of running processes stay.
|
|
11
11
|
function isOrphanedContainer(container, isProcessAlive) {
|
|
@@ -14,8 +14,9 @@ function isOrphanedContainer(container, isProcessAlive) {
|
|
|
14
14
|
if (type === 'task' && container.State === 'paused') {
|
|
15
15
|
return true;
|
|
16
16
|
}
|
|
17
|
-
// a proxy goes with the task or service it serves
|
|
18
|
-
|
|
17
|
+
// a proxy goes with the task or service it serves, the container of a healthcheck with
|
|
18
|
+
// the wait for its service
|
|
19
|
+
if (type !== 'task' && type !== 'service' && type !== 'proxy' && type !== 'healthcheck') {
|
|
19
20
|
return false;
|
|
20
21
|
}
|
|
21
22
|
return isOfStoppedRun(labels, isProcessAlive);
|
|
@@ -37,8 +37,9 @@ function buildEnvironmentVariables(envs, environment, context) {
|
|
|
37
37
|
}
|
|
38
38
|
else if (value.includes('${')) {
|
|
39
39
|
const interpolated = interpolate(value, envs, environment, context, fromProcess);
|
|
40
|
-
if (interpolated.missing) {
|
|
41
|
-
|
|
40
|
+
if (interpolated.missing.length > 0) {
|
|
41
|
+
const [name] = interpolated.missing;
|
|
42
|
+
replacements.push({ key, name, available: false, value: null, missing: interpolated.missing });
|
|
42
43
|
}
|
|
43
44
|
else {
|
|
44
45
|
variables[key] = interpolated.value;
|
|
@@ -53,13 +54,15 @@ function buildEnvironmentVariables(envs, environment, context) {
|
|
|
53
54
|
exports.buildEnvironmentVariables = buildEnvironmentVariables;
|
|
54
55
|
// Each `${NAME}` comes from the process environment or a .env file, else from a
|
|
55
56
|
// literal value of the same build file / task `envs`, else from its
|
|
56
|
-
// `:-default`. A reference without any of them is missing.
|
|
57
|
+
// `:-default`. A reference without any of them is missing; each is listed once.
|
|
57
58
|
function interpolate(value, envs, environment, context, fromProcess) {
|
|
58
|
-
|
|
59
|
+
const missing = [];
|
|
59
60
|
const result = value.replace(INTERPOLATION, (match, name, fallback) => {
|
|
60
61
|
const resolved = resolveReference(name, environment, context, fromProcess) ?? getLiteral(envs, name) ?? fallback ?? null;
|
|
61
62
|
if (resolved === null) {
|
|
62
|
-
|
|
63
|
+
if (!missing.includes(name)) {
|
|
64
|
+
missing.push(name);
|
|
65
|
+
}
|
|
63
66
|
return match;
|
|
64
67
|
}
|
|
65
68
|
return resolved;
|
|
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.isRunSourceEnv = exports.RUN_SOURCE_ENVS = void 0;
|
|
4
4
|
// The variables a server sets for the process of a run, from what the run is from (see
|
|
5
5
|
// src/server/run-source-environment.ts). Nothing else sets them: the operator's `runs.env`
|
|
6
|
-
// can't name them, and a run that isn't from that source has none of them.
|
|
6
|
+
// can't name them, and a run that isn't from that source has none of them. `validate` reads
|
|
7
|
+
// this list too, so an env that reads one of them isn't a variable set nowhere.
|
|
7
8
|
exports.RUN_SOURCE_ENVS = [
|
|
8
9
|
'HAMMERKIT_RUN_REPO',
|
|
9
10
|
'HAMMERKIT_RUN_REF',
|
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.checkReadiness = void 0;
|
|
4
4
|
const execute_docker_1 = require("./execute-docker");
|
|
5
|
-
async function checkReadiness(status, command, environment, container, user, abort, env
|
|
6
|
-
|
|
5
|
+
async function checkReadiness(status, command, environment, container, user, abort, env,
|
|
6
|
+
// `timeout`: how long one check may take; `name`: the check in the log, else its command
|
|
7
|
+
options = {}) {
|
|
8
|
+
const timeout = options.timeout ?? 2000;
|
|
9
|
+
const name = options.name ?? command.join(' ');
|
|
10
|
+
const result = await (0, execute_docker_1.execCommand)(status, environment, container, undefined, command, user, timeout, abort, env);
|
|
7
11
|
if (result.type === 'timeout') {
|
|
8
12
|
return false;
|
|
9
13
|
}
|
|
@@ -12,11 +16,11 @@ async function checkReadiness(status, command, environment, container, user, abo
|
|
|
12
16
|
}
|
|
13
17
|
else {
|
|
14
18
|
if (result.result.ExitCode === 0) {
|
|
15
|
-
status.write('debug', `healthcheck ${
|
|
19
|
+
status.write('debug', `healthcheck ${name} succeeded`);
|
|
16
20
|
return true;
|
|
17
21
|
}
|
|
18
22
|
else {
|
|
19
|
-
status.write('debug', `healthcheck ${
|
|
23
|
+
status.write('debug', `healthcheck ${name} failed with ${result.result.ExitCode}`);
|
|
20
24
|
return false;
|
|
21
25
|
}
|
|
22
26
|
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.prepareDockerHealthcheck = void 0;
|
|
4
|
+
const work_service_1 = require("../planner/work-service");
|
|
5
|
+
const work_healthcheck_1 = require("../planner/work-healthcheck");
|
|
6
|
+
const check_readiness_1 = require("./check-readiness");
|
|
7
|
+
const main_process_user_1 = require("./main-process-user");
|
|
8
|
+
const pull_1 = require("../docker/pull");
|
|
9
|
+
const transfer_tools_1 = require("../kubernetes/transfer-tools");
|
|
10
|
+
const item_network_1 = require("../docker/item-network");
|
|
11
|
+
const run_labels_1 = require("../docker/run-labels");
|
|
12
|
+
const work_instance_id_1 = require("../planner/work-instance-id");
|
|
13
|
+
const remove_container_1 = require("../docker/remove-container");
|
|
14
|
+
const healthcheck_request_1 = require("../network/healthcheck-request");
|
|
15
|
+
// how long docker may take to run one check of a request: its own bound, and the exec around it
|
|
16
|
+
const REQUEST_EXEC_TIMEOUT_MS = (healthcheck_request_1.HEALTHCHECK_REQUEST_SECONDS + 3) * 1000;
|
|
17
|
+
/**
|
|
18
|
+
* The checks of a service's healthcheck on Docker. A `cmd` runs in the service's container,
|
|
19
|
+
* as the user of its main process. An `http` or `tcp` check runs in a container of the pinned
|
|
20
|
+
* busybox that shares the service's network namespace: it needs no tool of the image and no
|
|
21
|
+
* published port, and reaches the service whatever network it is on. That container lives
|
|
22
|
+
* while the service is waited for.
|
|
23
|
+
*/
|
|
24
|
+
async function prepareDockerHealthcheck(docker, item, healthcheck, container, environment, abort,
|
|
25
|
+
// the variables of a `cmd` on top of the container's
|
|
26
|
+
env) {
|
|
27
|
+
if ('cmd' in healthcheck) {
|
|
28
|
+
const command = (0, work_service_1.getHealthcheckCommand)(item.data) ?? [];
|
|
29
|
+
return {
|
|
30
|
+
async check() {
|
|
31
|
+
const user = await (0, main_process_user_1.getMainProcessUser)(container);
|
|
32
|
+
return (0, check_readiness_1.checkReadiness)(item.status, command, environment, container, user, abort, env);
|
|
33
|
+
},
|
|
34
|
+
async remove() { },
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
await (0, pull_1.pull)(item.status, docker, transfer_tools_1.HELPER_TOOLS_IMAGE, environment);
|
|
38
|
+
const helper = await docker.createContainer({
|
|
39
|
+
Image: transfer_tools_1.HELPER_TOOLS_IMAGE,
|
|
40
|
+
Cmd: ['sleep', '86400'],
|
|
41
|
+
User: '65534:65534',
|
|
42
|
+
Labels: {
|
|
43
|
+
app: 'hammerkit',
|
|
44
|
+
'hammerkit-type': 'healthcheck',
|
|
45
|
+
'hammerkit-healthcheck-of': (0, work_instance_id_1.getWorkInstanceId)(item),
|
|
46
|
+
...(0, run_labels_1.getRunLabels)(),
|
|
47
|
+
// gone once the service is up, also of `up --daemon`
|
|
48
|
+
'hammerkit-daemon': 'false',
|
|
49
|
+
},
|
|
50
|
+
HostConfig: { ...item_network_1.HELPER_HOST_CONFIG, NetworkMode: `container:${container.id}` },
|
|
51
|
+
});
|
|
52
|
+
try {
|
|
53
|
+
await helper.start();
|
|
54
|
+
}
|
|
55
|
+
catch (e) {
|
|
56
|
+
await (0, remove_container_1.removeContainer)(helper).catch(() => undefined);
|
|
57
|
+
throw e;
|
|
58
|
+
}
|
|
59
|
+
const command = (0, healthcheck_request_1.getHealthcheckRequestCommand)('/bin/busybox', healthcheck);
|
|
60
|
+
return {
|
|
61
|
+
check() {
|
|
62
|
+
return (0, check_readiness_1.checkReadiness)(item.status, command, environment, helper, null, abort, undefined, {
|
|
63
|
+
timeout: REQUEST_EXEC_TIMEOUT_MS,
|
|
64
|
+
name: (0, work_healthcheck_1.describeHealthcheck)(healthcheck),
|
|
65
|
+
});
|
|
66
|
+
},
|
|
67
|
+
remove() {
|
|
68
|
+
return (0, remove_container_1.removeContainer)(helper);
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
exports.prepareDockerHealthcheck = prepareDockerHealthcheck;
|
|
73
|
+
//# sourceMappingURL=docker-healthcheck.js.map
|
|
@@ -11,8 +11,7 @@ const stream_1 = require("../docker/stream");
|
|
|
11
11
|
const abort_event_1 = require("../utils/abort-event");
|
|
12
12
|
const log_1 = require("../log");
|
|
13
13
|
const remove_container_1 = require("../docker/remove-container");
|
|
14
|
-
const
|
|
15
|
-
const main_process_user_1 = require("./main-process-user");
|
|
14
|
+
const docker_healthcheck_1 = require("./docker-healthcheck");
|
|
16
15
|
const execution_steps_1 = require("./execution-steps");
|
|
17
16
|
const check_container_binds_1 = require("./check-container-binds");
|
|
18
17
|
const server_tools_1 = require("../docker/server-tools");
|
|
@@ -164,21 +163,28 @@ async function dockerService(docker, item, options, environment) {
|
|
|
164
163
|
}
|
|
165
164
|
else {
|
|
166
165
|
const healthcheck = item.data.healthcheck;
|
|
166
|
+
const checks = await (0, docker_healthcheck_1.prepareDockerHealthcheck)(docker, item, healthcheck, container, environment, options.abort, (0, egress_proxy_1.getProxylessEnvironment)(network.options.env ?? {}));
|
|
167
167
|
const deadline = Date.now() + healthcheck.timeout;
|
|
168
168
|
let ready = false;
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
169
|
+
try {
|
|
170
|
+
do {
|
|
171
|
+
// The first check waits one interval too, so an entrypoint that drops
|
|
172
|
+
// privileges (`exec su-exec app …`) has done so before anything runs.
|
|
173
|
+
await new Promise((resolve) => setTimeout(() => resolve(), HEALTHCHECK_INTERVAL_MS));
|
|
174
|
+
if (options.abort.aborted) {
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
177
|
+
ready = await checks.check();
|
|
178
|
+
if (!ready && Date.now() >= deadline) {
|
|
179
|
+
throw new Error((0, work_healthcheck_1.getHealthcheckTimeoutMessage)(item.name, healthcheck));
|
|
180
|
+
}
|
|
181
|
+
} while (!ready && !options.abort.aborted);
|
|
182
|
+
}
|
|
183
|
+
finally {
|
|
184
|
+
await checks
|
|
185
|
+
.remove()
|
|
186
|
+
.catch((e) => item.status.write('error', `remove of healthcheck container failed ${(0, log_1.getErrorMessage)(e)}`));
|
|
187
|
+
}
|
|
182
188
|
if (ready) {
|
|
183
189
|
options.state.set({
|
|
184
190
|
type: 'running',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getServiceContainerName = exports.MIN_READY_SECONDS = exports.getPodTemplateHash = exports.POD_ANNOTATION = exports.ROLLOUT_DEADLINE_SECONDS = exports.ensureKubernetesDeploymentExists = exports.DEBUG_CONTAINER_RESOURCES = exports.DEFINITION_LABEL = void 0;
|
|
3
|
+
exports.getHealthcheckProbe = exports.getServiceContainerName = exports.MIN_READY_SECONDS = exports.getPodTemplateHash = exports.POD_ANNOTATION = exports.ROLLOUT_DEADLINE_SECONDS = exports.ensureKubernetesDeploymentExists = exports.DEBUG_CONTAINER_RESOURCES = exports.DEFINITION_LABEL = void 0;
|
|
4
4
|
const service_definition_1 = require("../planner/service-definition");
|
|
5
5
|
const work_service_1 = require("../planner/work-service");
|
|
6
6
|
const volumes_1 = require("./volumes");
|
|
@@ -18,6 +18,8 @@ const network_policy_1 = require("./network-policy");
|
|
|
18
18
|
const egress_proxy_1 = require("../network/egress-proxy");
|
|
19
19
|
const service_rollouts_1 = require("./service-rollouts");
|
|
20
20
|
const quota_wait_1 = require("./quota-wait");
|
|
21
|
+
const transfer_tools_1 = require("./transfer-tools");
|
|
22
|
+
const healthcheck_request_1 = require("../network/healthcheck-request");
|
|
21
23
|
// what the service was created from, to tell a changed one
|
|
22
24
|
exports.DEFINITION_LABEL = 'hammerkit.dev/definition';
|
|
23
25
|
// how often a starting container is checked: as the liveness probe
|
|
@@ -34,18 +36,15 @@ network,
|
|
|
34
36
|
rollout = {}) {
|
|
35
37
|
const envs = (0, replace_env_variables_1.getEnvironmentVariables)(service.data.envs);
|
|
36
38
|
const name = (0, resources_1.getResourceName)(service, env);
|
|
37
|
-
const healthcheckCommand = (0, work_service_1.getHealthcheckCommand)(service.data);
|
|
38
39
|
const serviceCommand = (0, work_service_1.getServiceCommand)(service.data, { kubernetes: true });
|
|
39
|
-
const probe =
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
periodSeconds: 5,
|
|
46
|
-
failureThreshold: 3,
|
|
40
|
+
const probe = getHealthcheckProbe(service.data, network.env);
|
|
41
|
+
const probeTools = needsProbeTools(service.data);
|
|
42
|
+
if (probeTools) {
|
|
43
|
+
const over = [...persistence.mounts.map((m) => m.mount), ...secrets.mounts].find((mount) => (0, transfer_tools_1.isTransferToolsPath)(mount.mountPath));
|
|
44
|
+
if (over) {
|
|
45
|
+
throw new Error(`service ${service.name} mounts ${over.mountPath}, over ${transfer_tools_1.TRANSFER_TOOLS_PATH} where its healthcheck's tools are`);
|
|
47
46
|
}
|
|
48
|
-
|
|
47
|
+
}
|
|
49
48
|
// the healthcheck's `timeout` for each start: until it passed once, the liveness probe
|
|
50
49
|
// doesn't kill a container that starts slowly, and the wait fails it with the timeout
|
|
51
50
|
const startupProbe = probe && service.data.healthcheck
|
|
@@ -96,7 +95,7 @@ rollout = {}) {
|
|
|
96
95
|
// the pod resolves its own service name, as with Docker's Hostname
|
|
97
96
|
hostname: (0, service_hostname_1.getServiceHostname)(service.name),
|
|
98
97
|
hostAliases: network.hostAliases,
|
|
99
|
-
initContainers: network.initContainers,
|
|
98
|
+
initContainers: [...network.initContainers, ...(probeTools ? [(0, transfer_tools_1.getTransferToolsInitContainer)()] : [])],
|
|
100
99
|
// on a server the pod is the build's: no token of the namespace, and the
|
|
101
100
|
// nodes of the first pool
|
|
102
101
|
...(placement
|
|
@@ -127,7 +126,11 @@ rollout = {}) {
|
|
|
127
126
|
livenessProbe: probe,
|
|
128
127
|
startupProbe,
|
|
129
128
|
...(0, container_resources_1.getKubernetesResources)(service.data.resources),
|
|
130
|
-
volumeMounts: [
|
|
129
|
+
volumeMounts: [
|
|
130
|
+
...persistence.mounts.map((m) => m.mount),
|
|
131
|
+
...secrets.mounts,
|
|
132
|
+
...(probeTools ? [transfer_tools_1.TRANSFER_TOOLS_MOUNT] : []),
|
|
133
|
+
],
|
|
131
134
|
...(0, job_placement_1.getContainerSecurity)(env),
|
|
132
135
|
},
|
|
133
136
|
{
|
|
@@ -142,7 +145,12 @@ rollout = {}) {
|
|
|
142
145
|
...(0, job_placement_1.getContainerSecurity)(env),
|
|
143
146
|
},
|
|
144
147
|
],
|
|
145
|
-
volumes: [
|
|
148
|
+
volumes: [
|
|
149
|
+
...persistence.volumes,
|
|
150
|
+
...persistence.workspace,
|
|
151
|
+
...secrets.volumes,
|
|
152
|
+
...(probeTools ? transfer_tools_1.TRANSFER_TOOLS_VOLUMES : []),
|
|
153
|
+
],
|
|
146
154
|
},
|
|
147
155
|
},
|
|
148
156
|
},
|
|
@@ -276,6 +284,46 @@ function getKubernetesCommand(command) {
|
|
|
276
284
|
}
|
|
277
285
|
return {};
|
|
278
286
|
}
|
|
287
|
+
/**
|
|
288
|
+
* The healthcheck as the probe of the service's container: a `cmd` as an exec probe, `tcp`
|
|
289
|
+
* and `http` as the kubelet's own tcpSocket and httpGet, which no NetworkPolicy of a limited
|
|
290
|
+
* service keeps out. httpGet counts 200 to 399 as healthy, so an `http` check with status
|
|
291
|
+
* codes of its own is an exec probe of the busybox an init container copies into the pod
|
|
292
|
+
* (needsProbeTools), the check a service on Docker runs (getHealthcheckRequestCommand).
|
|
293
|
+
*/
|
|
294
|
+
function getHealthcheckProbe(service, env) {
|
|
295
|
+
const healthcheck = service.healthcheck;
|
|
296
|
+
if (!healthcheck) {
|
|
297
|
+
return undefined;
|
|
298
|
+
}
|
|
299
|
+
const timing = { periodSeconds: STARTUP_PERIOD_SECONDS, failureThreshold: 3 };
|
|
300
|
+
if ('cmd' in healthcheck) {
|
|
301
|
+
// the service itself, not through the proxy (see getProxylessEnvironment)
|
|
302
|
+
return { exec: { command: withoutProxy((0, work_service_1.getHealthcheckCommand)(service) ?? [], env) }, ...timing };
|
|
303
|
+
}
|
|
304
|
+
if ('tcp' in healthcheck) {
|
|
305
|
+
return { tcpSocket: { port: healthcheck.tcp.port }, timeoutSeconds: healthcheck_request_1.HEALTHCHECK_REQUEST_SECONDS, ...timing };
|
|
306
|
+
}
|
|
307
|
+
if (needsProbeTools(service)) {
|
|
308
|
+
return {
|
|
309
|
+
exec: { command: (0, healthcheck_request_1.getHealthcheckRequestCommand)(transfer_tools_1.TRANSFER_BUSYBOX, healthcheck) },
|
|
310
|
+
// its request's bound, and the start of the busybox
|
|
311
|
+
timeoutSeconds: healthcheck_request_1.HEALTHCHECK_REQUEST_SECONDS + 1,
|
|
312
|
+
...timing,
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
const { port, path, scheme } = healthcheck.http;
|
|
316
|
+
return {
|
|
317
|
+
httpGet: { port, path, scheme: scheme === 'https' ? 'HTTPS' : 'HTTP' },
|
|
318
|
+
timeoutSeconds: healthcheck_request_1.HEALTHCHECK_REQUEST_SECONDS,
|
|
319
|
+
...timing,
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
exports.getHealthcheckProbe = getHealthcheckProbe;
|
|
323
|
+
// an `http` healthcheck with status codes of its own, which the kubelet's httpGet can't check
|
|
324
|
+
function needsProbeTools(service) {
|
|
325
|
+
return !!service.healthcheck && 'http' in service.healthcheck && service.healthcheck.http.status !== null;
|
|
326
|
+
}
|
|
279
327
|
// A probe runs with the container's variables, so it empties the proxy ones
|
|
280
328
|
// through `env`, as a Docker healthcheck does with the exec's own variables.
|
|
281
329
|
function withoutProxy(command, env) {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getHealthcheckRequestCommand = exports.HEALTHCHECK_REQUEST_SECONDS = void 0;
|
|
4
|
+
// how long the request or connection of one check may take
|
|
5
|
+
exports.HEALTHCHECK_REQUEST_SECONDS = 2;
|
|
6
|
+
/**
|
|
7
|
+
* An `http` or `tcp` healthcheck, run by a static busybox in the network namespace of the
|
|
8
|
+
* service: no tool of the image does it. It connects to the address the service's hostname
|
|
9
|
+
* names, the one its dependents reach (as the kubelet connects to the pod's), else to
|
|
10
|
+
* 127.0.0.1. Of a request, the status of the first response counts: a redirect is not
|
|
11
|
+
* followed, and a certificate is not checked. Without status codes, any 2xx or 3xx is
|
|
12
|
+
* healthy. Exits 0 when the service is healthy.
|
|
13
|
+
*/
|
|
14
|
+
const SCRIPT = `b=$1; kind=$2; port=$3; shift 3
|
|
15
|
+
addr=127.0.0.1
|
|
16
|
+
for a in $($b hostname -i 2>/dev/null); do case $a in *:*) ;; *) addr=$a; break ;; esac; done
|
|
17
|
+
if [ "$kind" = tcp ]; then exec $b nc -z -w ${exports.HEALTHCHECK_REQUEST_SECONDS} "$addr" "$port"; fi
|
|
18
|
+
scheme=$1; path=$2; shift 2
|
|
19
|
+
code=$($b timeout ${exports.HEALTHCHECK_REQUEST_SECONDS} $b wget -S -O /dev/null -Y off --no-check-certificate "$scheme://$addr:$port$path" 2>&1 | $b awk '/^ HTTP\\//{print $2; exit}') 2>/dev/null
|
|
20
|
+
[ -n "$code" ] || exit 1
|
|
21
|
+
if [ $# -eq 0 ]; then case $code in 2??|3??) exit 0 ;; esac; exit 1; fi
|
|
22
|
+
for s in "$@"; do [ "$code" = "$s" ] && exit 0; done
|
|
23
|
+
exit 1`;
|
|
24
|
+
// The check as a command of the busybox at `busybox`.
|
|
25
|
+
function getHealthcheckRequestCommand(busybox, healthcheck) {
|
|
26
|
+
const args = 'http' in healthcheck
|
|
27
|
+
? [
|
|
28
|
+
'http',
|
|
29
|
+
`${healthcheck.http.port}`,
|
|
30
|
+
healthcheck.http.scheme,
|
|
31
|
+
healthcheck.http.path,
|
|
32
|
+
...(healthcheck.http.status ?? []).map((status) => `${status}`),
|
|
33
|
+
]
|
|
34
|
+
: ['tcp', `${healthcheck.tcp.port}`];
|
|
35
|
+
return [busybox, 'sh', '-c', SCRIPT, 'hammerkit-healthcheck', busybox, ...args];
|
|
36
|
+
}
|
|
37
|
+
exports.getHealthcheckRequestCommand = getHealthcheckRequestCommand;
|
|
38
|
+
//# sourceMappingURL=healthcheck-request.js.map
|
|
@@ -10,6 +10,7 @@ const claim_layout_1 = require("../kubernetes/claim-layout");
|
|
|
10
10
|
const work_service_1 = require("../planner/work-service");
|
|
11
11
|
const work_service_id_1 = require("../planner/work-service-id");
|
|
12
12
|
const work_cache_id_1 = require("../planner/work-cache-id");
|
|
13
|
+
const work_healthcheck_1 = require("../planner/work-healthcheck");
|
|
13
14
|
// Every path is made project-relative (portablePath) so the description, and the
|
|
14
15
|
// task id hashed from it, is identical wherever the project is checked out.
|
|
15
16
|
//
|
|
@@ -87,14 +88,15 @@ function isInitOf(item, service) {
|
|
|
87
88
|
// Everything that makes a service what a task needing it talks to: its definition, the ids of
|
|
88
89
|
// the tasks it depends on and of its init task, and the services it needs in turn. The source
|
|
89
90
|
// of those tasks and of the service is in the state key (computeStateKey), like a dependency's.
|
|
90
|
-
// Not the service id, which leaves out what a service runs
|
|
91
|
+
// Not the service id, which leaves out what a service runs, and without its name: to a task,
|
|
92
|
+
// a renamed service is the same (getUnnamedWorkServiceId).
|
|
91
93
|
function getWorkServiceCacheIdentity(item, visiting = new Set()) {
|
|
92
94
|
const service = item.data;
|
|
93
95
|
const definition = (0, work_service_1.isContainerWorkService)(service)
|
|
94
96
|
? {
|
|
95
97
|
cmd: service.cmd?.cmd ?? null,
|
|
96
98
|
envs: (0, replace_env_variables_1.getEnvironmentVariables)(service.envs),
|
|
97
|
-
healthcheck: service.healthcheck
|
|
99
|
+
healthcheck: service.healthcheck ? (0, work_healthcheck_1.getHealthcheckDefinition)(service.healthcheck) : null,
|
|
98
100
|
secrets: service.secrets
|
|
99
101
|
.filter((secret) => secret.cache)
|
|
100
102
|
.map((secret) => `${(0, work_secret_1.getPortableSecretName)(service.projectRoot, secret)}=${secret.digest()}`)
|
|
@@ -109,7 +111,7 @@ function getWorkServiceCacheIdentity(item, visiting = new Set()) {
|
|
|
109
111
|
: { namespace: service.namespace };
|
|
110
112
|
return (0, crypto_1.createHash)('sha256')
|
|
111
113
|
.update(JSON.stringify({
|
|
112
|
-
id: (0, work_service_id_1.
|
|
114
|
+
id: (0, work_service_id_1.getUnnamedWorkServiceId)(service),
|
|
113
115
|
...definition,
|
|
114
116
|
ports: service.ports.map((port) => `${port.hostPort ?? ''}:${port.containerPort}`).sort(),
|
|
115
117
|
deps: item.deps.map((dep) => dep.id()).sort(),
|
|
@@ -25,6 +25,11 @@ const METADATA_FILE = '/tmp/hammerkit-build.json';
|
|
|
25
25
|
const IMAGE = /^[a-z0-9][a-z0-9._/:@-]*$/i;
|
|
26
26
|
// The build of a task, with the values of its envs in place
|
|
27
27
|
function parseWorkImageBuild(cwd, build, envs, taskName) {
|
|
28
|
+
// checked here, not in the schema: a base of `extend` may set push for tasks that set their tags
|
|
29
|
+
const needsTags = build.push ? 'push' : build.digest !== undefined ? 'digest' : null;
|
|
30
|
+
if (needsTags && build.tags === undefined) {
|
|
31
|
+
throw new Error(`task ${taskName}: build ${needsTags} needs tags, the names of the image`);
|
|
32
|
+
}
|
|
28
33
|
const context = (0, path_1.join)(cwd, (0, template_value_1.templateValue)(build.context ?? '.', envs));
|
|
29
34
|
const dockerfile = build.dockerfile ? (0, path_1.join)(cwd, (0, template_value_1.templateValue)(build.dockerfile, envs)) : (0, path_1.join)(context, 'Dockerfile');
|
|
30
35
|
const tags = (build.tags === undefined ? [] : Array.isArray(build.tags) ? build.tags : [build.tags]).map((tag) => checkImage((0, template_value_1.templateValue)(tag, envs), 'tag', taskName));
|
|
@@ -7,6 +7,7 @@ const work_service_1 = require("./work-service");
|
|
|
7
7
|
const work_network_1 = require("./work-network");
|
|
8
8
|
const work_cache_id_1 = require("./work-cache-id");
|
|
9
9
|
const portable_path_1 = require("./utils/portable-path");
|
|
10
|
+
const work_healthcheck_1 = require("./work-healthcheck");
|
|
10
11
|
// Everything a running container of the service was created from, plus the
|
|
11
12
|
// definitions of the services it needs: a dependent links to the container it
|
|
12
13
|
// started with, so a recreated need means a recreated dependent too. Stored as
|
|
@@ -32,7 +33,7 @@ function getServiceDefinitionHash(item) {
|
|
|
32
33
|
// the volume of a dep's output is named by where it is, which its path says already
|
|
33
34
|
volumes: service.volumes.map((v) => `${v.inherited ? '' : v.name}:${portable(v.containerPath)}:${v.readOnly ? 'ro' : 'rw'}`),
|
|
34
35
|
src: service.src.map((s) => portable(s.absolutePath)),
|
|
35
|
-
healthcheck: service.healthcheck
|
|
36
|
+
healthcheck: service.healthcheck ? (0, work_healthcheck_1.getHealthcheckDefinition)(service.healthcheck) : null,
|
|
36
37
|
// where secrets go, never their values: a rotated value needs a `down`
|
|
37
38
|
secrets: service.secrets.map((s) => s.source.type === 'provider'
|
|
38
39
|
? `provider:${(0, work_secret_1.getSecretName)(s)}:${(0, work_secret_1.describeSecretSource)(s)}`
|