typekro 0.33.10 → 0.35.0

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.
Files changed (364) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/alchemy/clickhouse-schema/executor.d.ts +25 -0
  3. package/dist/alchemy/clickhouse-schema/executor.d.ts.map +1 -0
  4. package/dist/alchemy/clickhouse-schema/executor.js +144 -0
  5. package/dist/alchemy/clickhouse-schema/executor.js.map +1 -0
  6. package/dist/alchemy/clickhouse-schema/index.d.ts +12 -0
  7. package/dist/alchemy/clickhouse-schema/index.d.ts.map +1 -0
  8. package/dist/alchemy/clickhouse-schema/index.js +11 -0
  9. package/dist/alchemy/clickhouse-schema/index.js.map +1 -0
  10. package/dist/alchemy/clickhouse-schema/resource.d.ts +54 -0
  11. package/dist/alchemy/clickhouse-schema/resource.d.ts.map +1 -0
  12. package/dist/alchemy/clickhouse-schema/resource.js +158 -0
  13. package/dist/alchemy/clickhouse-schema/resource.js.map +1 -0
  14. package/dist/alchemy/clickhouse-schema/runner.d.ts +154 -0
  15. package/dist/alchemy/clickhouse-schema/runner.d.ts.map +1 -0
  16. package/dist/alchemy/clickhouse-schema/runner.js +613 -0
  17. package/dist/alchemy/clickhouse-schema/runner.js.map +1 -0
  18. package/dist/alchemy/clickhouse-schema/sql.d.ts +109 -0
  19. package/dist/alchemy/clickhouse-schema/sql.d.ts.map +1 -0
  20. package/dist/alchemy/clickhouse-schema/sql.js +368 -0
  21. package/dist/alchemy/clickhouse-schema/sql.js.map +1 -0
  22. package/dist/alchemy/clickhouse-schema/types.d.ts +394 -0
  23. package/dist/alchemy/clickhouse-schema/types.d.ts.map +1 -0
  24. package/dist/alchemy/clickhouse-schema/types.js +370 -0
  25. package/dist/alchemy/clickhouse-schema/types.js.map +1 -0
  26. package/dist/alchemy/index.d.ts +1 -0
  27. package/dist/alchemy/index.d.ts.map +1 -1
  28. package/dist/alchemy/index.js +2 -0
  29. package/dist/alchemy/index.js.map +1 -1
  30. package/dist/compositions/typekro-runtime/typekro-runtime.d.ts +0 -33
  31. package/dist/compositions/typekro-runtime/typekro-runtime.d.ts.map +1 -1
  32. package/dist/compositions/typekro-runtime/typekro-runtime.js +63 -1
  33. package/dist/compositions/typekro-runtime/typekro-runtime.js.map +1 -1
  34. package/dist/compositions/typekro-runtime/types.d.ts +8 -0
  35. package/dist/compositions/typekro-runtime/types.d.ts.map +1 -1
  36. package/dist/compositions/typekro-runtime/types.js +1 -0
  37. package/dist/compositions/typekro-runtime/types.js.map +1 -1
  38. package/dist/core/aspects/values-merge.d.ts +17 -0
  39. package/dist/core/aspects/values-merge.d.ts.map +1 -1
  40. package/dist/core/aspects/values-merge.js +67 -8
  41. package/dist/core/aspects/values-merge.js.map +1 -1
  42. package/dist/core/deployment/direct-factory.d.ts +9 -0
  43. package/dist/core/deployment/direct-factory.d.ts.map +1 -1
  44. package/dist/core/deployment/direct-factory.js +37 -3
  45. package/dist/core/deployment/direct-factory.js.map +1 -1
  46. package/dist/core/deployment/engine.d.ts +34 -0
  47. package/dist/core/deployment/engine.d.ts.map +1 -1
  48. package/dist/core/deployment/engine.js +173 -29
  49. package/dist/core/deployment/engine.js.map +1 -1
  50. package/dist/core/deployment/index.d.ts +2 -0
  51. package/dist/core/deployment/index.d.ts.map +1 -1
  52. package/dist/core/deployment/index.js +1 -0
  53. package/dist/core/deployment/index.js.map +1 -1
  54. package/dist/core/deployment/k8s-helpers.d.ts +73 -0
  55. package/dist/core/deployment/k8s-helpers.d.ts.map +1 -1
  56. package/dist/core/deployment/k8s-helpers.js +198 -4
  57. package/dist/core/deployment/k8s-helpers.js.map +1 -1
  58. package/dist/core/deployment/kro-factory.d.ts.map +1 -1
  59. package/dist/core/deployment/kro-factory.js +21 -1
  60. package/dist/core/deployment/kro-factory.js.map +1 -1
  61. package/dist/core/deployment/status-leaf-resolution.d.ts +101 -0
  62. package/dist/core/deployment/status-leaf-resolution.d.ts.map +1 -0
  63. package/dist/core/deployment/status-leaf-resolution.js +232 -0
  64. package/dist/core/deployment/status-leaf-resolution.js.map +1 -0
  65. package/dist/core/deployment/strategies/base-strategy.d.ts.map +1 -1
  66. package/dist/core/deployment/strategies/base-strategy.js +31 -3
  67. package/dist/core/deployment/strategies/base-strategy.js.map +1 -1
  68. package/dist/core/deployment/strategies/kro-strategy.d.ts.map +1 -1
  69. package/dist/core/deployment/strategies/kro-strategy.js +8 -1
  70. package/dist/core/deployment/strategies/kro-strategy.js.map +1 -1
  71. package/dist/core/kro/index.d.ts +6 -0
  72. package/dist/core/kro/index.d.ts.map +1 -0
  73. package/dist/core/kro/index.js +6 -0
  74. package/dist/core/kro/index.js.map +1 -0
  75. package/dist/core/kro/label-guard-capability.d.ts +141 -0
  76. package/dist/core/kro/label-guard-capability.d.ts.map +1 -0
  77. package/dist/core/kro/label-guard-capability.js +257 -0
  78. package/dist/core/kro/label-guard-capability.js.map +1 -0
  79. package/dist/core/kro/labels.d.ts +56 -0
  80. package/dist/core/kro/labels.d.ts.map +1 -0
  81. package/dist/core/kro/labels.js +62 -0
  82. package/dist/core/kro/labels.js.map +1 -0
  83. package/dist/core/kubernetes/api-capability.d.ts +196 -0
  84. package/dist/core/kubernetes/api-capability.d.ts.map +1 -0
  85. package/dist/core/kubernetes/api-capability.js +301 -0
  86. package/dist/core/kubernetes/api-capability.js.map +1 -0
  87. package/dist/core/kubernetes/index.d.ts +2 -0
  88. package/dist/core/kubernetes/index.d.ts.map +1 -1
  89. package/dist/core/kubernetes/index.js +2 -0
  90. package/dist/core/kubernetes/index.js.map +1 -1
  91. package/dist/core/kubernetes/naming.d.ts +100 -0
  92. package/dist/core/kubernetes/naming.d.ts.map +1 -0
  93. package/dist/core/kubernetes/naming.js +93 -0
  94. package/dist/core/kubernetes/naming.js.map +1 -0
  95. package/dist/core/planning/direct-runtime-adapter.d.ts.map +1 -1
  96. package/dist/core/planning/direct-runtime-adapter.js +54 -17
  97. package/dist/core/planning/direct-runtime-adapter.js.map +1 -1
  98. package/dist/core/planning/planner.d.ts.map +1 -1
  99. package/dist/core/planning/planner.js +17 -0
  100. package/dist/core/planning/planner.js.map +1 -1
  101. package/dist/core/planning/schema.d.ts.map +1 -1
  102. package/dist/core/planning/schema.js +7 -3
  103. package/dist/core/planning/schema.js.map +1 -1
  104. package/dist/core/references/cel-lexical-scanner.d.ts +100 -1
  105. package/dist/core/references/cel-lexical-scanner.d.ts.map +1 -1
  106. package/dist/core/references/cel-lexical-scanner.js +196 -2
  107. package/dist/core/references/cel-lexical-scanner.js.map +1 -1
  108. package/dist/core/references/cel.d.ts +249 -1
  109. package/dist/core/references/cel.d.ts.map +1 -1
  110. package/dist/core/references/cel.js +289 -8
  111. package/dist/core/references/cel.js.map +1 -1
  112. package/dist/core/serialization/arktype-ast.d.ts +21 -0
  113. package/dist/core/serialization/arktype-ast.d.ts.map +1 -0
  114. package/dist/core/serialization/arktype-ast.js +29 -0
  115. package/dist/core/serialization/arktype-ast.js.map +1 -0
  116. package/dist/core/serialization/cel-references.d.ts +133 -32
  117. package/dist/core/serialization/cel-references.d.ts.map +1 -1
  118. package/dist/core/serialization/cel-references.js +908 -109
  119. package/dist/core/serialization/cel-references.js.map +1 -1
  120. package/dist/core/serialization/schema.d.ts +16 -2
  121. package/dist/core/serialization/schema.d.ts.map +1 -1
  122. package/dist/core/serialization/schema.js +113 -21
  123. package/dist/core/serialization/schema.js.map +1 -1
  124. package/dist/core/types/composable.d.ts +7 -1
  125. package/dist/core/types/composable.d.ts.map +1 -1
  126. package/dist/core/types/deployment.d.ts +32 -2
  127. package/dist/core/types/deployment.d.ts.map +1 -1
  128. package/dist/core/types/serialization.d.ts +37 -0
  129. package/dist/core/types/serialization.d.ts.map +1 -1
  130. package/dist/core/validation/cel-dialect.d.ts +246 -0
  131. package/dist/core/validation/cel-dialect.d.ts.map +1 -0
  132. package/dist/core/validation/cel-dialect.js +1997 -0
  133. package/dist/core/validation/cel-dialect.js.map +1 -0
  134. package/dist/core/validation/cel-validator.d.ts.map +1 -1
  135. package/dist/core/validation/cel-validator.js +8 -1
  136. package/dist/core/validation/cel-validator.js.map +1 -1
  137. package/dist/core/validation/literal-status.d.ts +107 -0
  138. package/dist/core/validation/literal-status.d.ts.map +1 -0
  139. package/dist/core/validation/literal-status.js +346 -0
  140. package/dist/core/validation/literal-status.js.map +1 -0
  141. package/dist/core/validation/structural-spec-dependence.d.ts +179 -0
  142. package/dist/core/validation/structural-spec-dependence.d.ts.map +1 -0
  143. package/dist/core/validation/structural-spec-dependence.js +911 -0
  144. package/dist/core/validation/structural-spec-dependence.js.map +1 -0
  145. package/dist/factories/apisix/compositions/apisix-bootstrap.d.ts.map +1 -1
  146. package/dist/factories/apisix/compositions/apisix-bootstrap.js +9 -0
  147. package/dist/factories/apisix/compositions/apisix-bootstrap.js.map +1 -1
  148. package/dist/factories/clickhouse/compositions/clickhouse-cluster.d.ts +6 -0
  149. package/dist/factories/clickhouse/compositions/clickhouse-cluster.d.ts.map +1 -1
  150. package/dist/factories/clickhouse/compositions/clickhouse-cluster.js +273 -23
  151. package/dist/factories/clickhouse/compositions/clickhouse-cluster.js.map +1 -1
  152. package/dist/factories/clickhouse/resources/index.d.ts +1 -0
  153. package/dist/factories/clickhouse/resources/index.d.ts.map +1 -1
  154. package/dist/factories/clickhouse/resources/index.js +1 -0
  155. package/dist/factories/clickhouse/resources/index.js.map +1 -1
  156. package/dist/factories/clickhouse/resources/installation.d.ts.map +1 -1
  157. package/dist/factories/clickhouse/resources/installation.js +31 -4
  158. package/dist/factories/clickhouse/resources/installation.js.map +1 -1
  159. package/dist/factories/clickhouse/resources/s3-backup.d.ts +215 -0
  160. package/dist/factories/clickhouse/resources/s3-backup.d.ts.map +1 -0
  161. package/dist/factories/clickhouse/resources/s3-backup.js +410 -0
  162. package/dist/factories/clickhouse/resources/s3-backup.js.map +1 -0
  163. package/dist/factories/clickhouse/types.d.ts +416 -20
  164. package/dist/factories/clickhouse/types.d.ts.map +1 -1
  165. package/dist/factories/clickhouse/types.js +235 -11
  166. package/dist/factories/clickhouse/types.js.map +1 -1
  167. package/dist/factories/clickhouse/utils/helm-values-mapper.d.ts +42 -0
  168. package/dist/factories/clickhouse/utils/helm-values-mapper.d.ts.map +1 -1
  169. package/dist/factories/clickhouse/utils/helm-values-mapper.js +48 -0
  170. package/dist/factories/clickhouse/utils/helm-values-mapper.js.map +1 -1
  171. package/dist/factories/clickhouse/utils/index.d.ts +2 -0
  172. package/dist/factories/clickhouse/utils/index.d.ts.map +1 -1
  173. package/dist/factories/clickhouse/utils/index.js +2 -0
  174. package/dist/factories/clickhouse/utils/index.js.map +1 -1
  175. package/dist/factories/clickhouse/utils/s3-storage.d.ts +503 -0
  176. package/dist/factories/clickhouse/utils/s3-storage.d.ts.map +1 -0
  177. package/dist/factories/clickhouse/utils/s3-storage.js +1139 -0
  178. package/dist/factories/clickhouse/utils/s3-storage.js.map +1 -0
  179. package/dist/factories/clickhouse/utils/validation.d.ts +103 -0
  180. package/dist/factories/clickhouse/utils/validation.d.ts.map +1 -1
  181. package/dist/factories/clickhouse/utils/validation.js +129 -0
  182. package/dist/factories/clickhouse/utils/validation.js.map +1 -1
  183. package/dist/factories/clickhouse/utils/xml.d.ts +87 -0
  184. package/dist/factories/clickhouse/utils/xml.d.ts.map +1 -0
  185. package/dist/factories/clickhouse/utils/xml.js +151 -0
  186. package/dist/factories/clickhouse/utils/xml.js.map +1 -0
  187. package/dist/factories/clickstack/compositions/clickstack-bootstrap.d.ts +57 -0
  188. package/dist/factories/clickstack/compositions/clickstack-bootstrap.d.ts.map +1 -1
  189. package/dist/factories/clickstack/compositions/clickstack-bootstrap.js +266 -7
  190. package/dist/factories/clickstack/compositions/clickstack-bootstrap.js.map +1 -1
  191. package/dist/factories/clickstack/types.d.ts +205 -26
  192. package/dist/factories/clickstack/types.d.ts.map +1 -1
  193. package/dist/factories/clickstack/types.js +106 -8
  194. package/dist/factories/clickstack/types.js.map +1 -1
  195. package/dist/factories/clickstack/utils/collector-config.d.ts +104 -0
  196. package/dist/factories/clickstack/utils/collector-config.d.ts.map +1 -0
  197. package/dist/factories/clickstack/utils/collector-config.js +266 -0
  198. package/dist/factories/clickstack/utils/collector-config.js.map +1 -0
  199. package/dist/factories/clickstack/utils/helm-values-mapper.d.ts +26 -0
  200. package/dist/factories/clickstack/utils/helm-values-mapper.d.ts.map +1 -1
  201. package/dist/factories/clickstack/utils/helm-values-mapper.js +53 -12
  202. package/dist/factories/clickstack/utils/helm-values-mapper.js.map +1 -1
  203. package/dist/factories/clickstack/utils/index.d.ts +2 -0
  204. package/dist/factories/clickstack/utils/index.d.ts.map +1 -1
  205. package/dist/factories/clickstack/utils/index.js +2 -0
  206. package/dist/factories/clickstack/utils/index.js.map +1 -1
  207. package/dist/factories/clickstack/utils/storage.d.ts +449 -0
  208. package/dist/factories/clickstack/utils/storage.d.ts.map +1 -0
  209. package/dist/factories/clickstack/utils/storage.js +698 -0
  210. package/dist/factories/clickstack/utils/storage.js.map +1 -0
  211. package/dist/factories/cnpg/resources/helm.d.ts.map +1 -1
  212. package/dist/factories/cnpg/resources/helm.js +4 -4
  213. package/dist/factories/cnpg/resources/helm.js.map +1 -1
  214. package/dist/factories/cnpg/types.d.ts +10 -1
  215. package/dist/factories/cnpg/types.d.ts.map +1 -1
  216. package/dist/factories/cnpg/types.js.map +1 -1
  217. package/dist/factories/cnpg/utils/helm-values-mapper.d.ts +19 -2
  218. package/dist/factories/cnpg/utils/helm-values-mapper.d.ts.map +1 -1
  219. package/dist/factories/cnpg/utils/helm-values-mapper.js +22 -4
  220. package/dist/factories/cnpg/utils/helm-values-mapper.js.map +1 -1
  221. package/dist/factories/envoy-ai-gateway/compositions/gateway.d.ts.map +1 -1
  222. package/dist/factories/envoy-ai-gateway/compositions/gateway.js +16 -3
  223. package/dist/factories/envoy-ai-gateway/compositions/gateway.js.map +1 -1
  224. package/dist/factories/envoy-ai-gateway/constants.d.ts +5 -2
  225. package/dist/factories/envoy-ai-gateway/constants.d.ts.map +1 -1
  226. package/dist/factories/envoy-ai-gateway/constants.js +5 -2
  227. package/dist/factories/envoy-ai-gateway/constants.js.map +1 -1
  228. package/dist/factories/envoy-ai-gateway/resources/gateway.d.ts +12 -0
  229. package/dist/factories/envoy-ai-gateway/resources/gateway.d.ts.map +1 -1
  230. package/dist/factories/envoy-ai-gateway/resources/gateway.js +27 -104
  231. package/dist/factories/envoy-ai-gateway/resources/gateway.js.map +1 -1
  232. package/dist/factories/envoy-ai-gateway/types.d.ts +15 -47
  233. package/dist/factories/envoy-ai-gateway/types.d.ts.map +1 -1
  234. package/dist/factories/envoy-ai-gateway/types.js.map +1 -1
  235. package/dist/factories/gateway-api/constants.d.ts +27 -0
  236. package/dist/factories/gateway-api/constants.d.ts.map +1 -0
  237. package/dist/factories/gateway-api/constants.js +27 -0
  238. package/dist/factories/gateway-api/constants.js.map +1 -0
  239. package/dist/factories/gateway-api/index.d.ts +14 -0
  240. package/dist/factories/gateway-api/index.d.ts.map +1 -0
  241. package/dist/factories/gateway-api/index.js +14 -0
  242. package/dist/factories/gateway-api/index.js.map +1 -0
  243. package/dist/factories/gateway-api/readiness.d.ts +67 -0
  244. package/dist/factories/gateway-api/readiness.d.ts.map +1 -0
  245. package/dist/factories/gateway-api/readiness.js +213 -0
  246. package/dist/factories/gateway-api/readiness.js.map +1 -0
  247. package/dist/factories/gateway-api/resources/gateway.d.ts +91 -0
  248. package/dist/factories/gateway-api/resources/gateway.d.ts.map +1 -0
  249. package/dist/factories/gateway-api/resources/gateway.js +99 -0
  250. package/dist/factories/gateway-api/resources/gateway.js.map +1 -0
  251. package/dist/factories/gateway-api/resources/index.d.ts +2 -0
  252. package/dist/factories/gateway-api/resources/index.d.ts.map +1 -0
  253. package/dist/factories/gateway-api/resources/index.js +2 -0
  254. package/dist/factories/gateway-api/resources/index.js.map +1 -0
  255. package/dist/factories/gateway-api/types.d.ts +1269 -0
  256. package/dist/factories/gateway-api/types.d.ts.map +1 -0
  257. package/dist/factories/gateway-api/types.js +417 -0
  258. package/dist/factories/gateway-api/types.js.map +1 -0
  259. package/dist/factories/helm/readiness-evaluators.d.ts +21 -3
  260. package/dist/factories/helm/readiness-evaluators.d.ts.map +1 -1
  261. package/dist/factories/helm/readiness-evaluators.js +117 -11
  262. package/dist/factories/helm/readiness-evaluators.js.map +1 -1
  263. package/dist/factories/helm/types.d.ts +28 -0
  264. package/dist/factories/helm/types.d.ts.map +1 -1
  265. package/dist/factories/index.d.ts +2 -0
  266. package/dist/factories/index.d.ts.map +1 -1
  267. package/dist/factories/index.js +8 -0
  268. package/dist/factories/index.js.map +1 -1
  269. package/dist/factories/inngest/compositions/inngest-bootstrap.d.ts.map +1 -1
  270. package/dist/factories/inngest/compositions/inngest-bootstrap.js +10 -0
  271. package/dist/factories/inngest/compositions/inngest-bootstrap.js.map +1 -1
  272. package/dist/factories/kubernetes/admission/index.d.ts +2 -0
  273. package/dist/factories/kubernetes/admission/index.d.ts.map +1 -1
  274. package/dist/factories/kubernetes/admission/index.js +2 -0
  275. package/dist/factories/kubernetes/admission/index.js.map +1 -1
  276. package/dist/factories/kubernetes/admission/label-propagation-guard.d.ts +108 -0
  277. package/dist/factories/kubernetes/admission/label-propagation-guard.d.ts.map +1 -0
  278. package/dist/factories/kubernetes/admission/label-propagation-guard.js +247 -0
  279. package/dist/factories/kubernetes/admission/label-propagation-guard.js.map +1 -0
  280. package/dist/factories/kubernetes/admission/mutating-admission-policy.d.ts +286 -0
  281. package/dist/factories/kubernetes/admission/mutating-admission-policy.d.ts.map +1 -0
  282. package/dist/factories/kubernetes/admission/mutating-admission-policy.js +157 -0
  283. package/dist/factories/kubernetes/admission/mutating-admission-policy.js.map +1 -0
  284. package/dist/factories/opensearch/compositions/cluster.d.ts.map +1 -1
  285. package/dist/factories/opensearch/compositions/cluster.js +6 -1
  286. package/dist/factories/opensearch/compositions/cluster.js.map +1 -1
  287. package/dist/factories/ory/compositions/ory-identity-stack.d.ts +8 -8
  288. package/dist/factories/ory/types.d.ts +16 -16
  289. package/dist/factories/rook/compositions/object-storage-claim.d.ts +1 -1
  290. package/dist/factories/rook/compositions/rook-ceph-platform.js +8 -1
  291. package/dist/factories/rook/compositions/rook-ceph-platform.js.map +1 -1
  292. package/dist/factories/rook/types.d.ts +1 -1
  293. package/dist/factories/traefik/compositions/index.d.ts +6 -0
  294. package/dist/factories/traefik/compositions/index.d.ts.map +1 -0
  295. package/dist/factories/traefik/compositions/index.js +6 -0
  296. package/dist/factories/traefik/compositions/index.js.map +1 -0
  297. package/dist/factories/traefik/compositions/traefik-bootstrap.d.ts +185 -0
  298. package/dist/factories/traefik/compositions/traefik-bootstrap.d.ts.map +1 -0
  299. package/dist/factories/traefik/compositions/traefik-bootstrap.js +339 -0
  300. package/dist/factories/traefik/compositions/traefik-bootstrap.js.map +1 -0
  301. package/dist/factories/traefik/compositions/traefik-helm-repository.d.ts +16 -0
  302. package/dist/factories/traefik/compositions/traefik-helm-repository.d.ts.map +1 -0
  303. package/dist/factories/traefik/compositions/traefik-helm-repository.js +31 -0
  304. package/dist/factories/traefik/compositions/traefik-helm-repository.js.map +1 -0
  305. package/dist/factories/traefik/constants.d.ts +78 -0
  306. package/dist/factories/traefik/constants.d.ts.map +1 -0
  307. package/dist/factories/traefik/constants.js +104 -0
  308. package/dist/factories/traefik/constants.js.map +1 -0
  309. package/dist/factories/traefik/index.d.ts +25 -0
  310. package/dist/factories/traefik/index.d.ts.map +1 -0
  311. package/dist/factories/traefik/index.js +25 -0
  312. package/dist/factories/traefik/index.js.map +1 -0
  313. package/dist/factories/traefik/resources/common.d.ts +68 -0
  314. package/dist/factories/traefik/resources/common.d.ts.map +1 -0
  315. package/dist/factories/traefik/resources/common.js +59 -0
  316. package/dist/factories/traefik/resources/common.js.map +1 -0
  317. package/dist/factories/traefik/resources/gateway.d.ts +85 -0
  318. package/dist/factories/traefik/resources/gateway.d.ts.map +1 -0
  319. package/dist/factories/traefik/resources/gateway.js +109 -0
  320. package/dist/factories/traefik/resources/gateway.js.map +1 -0
  321. package/dist/factories/traefik/resources/helm.d.ts +56 -0
  322. package/dist/factories/traefik/resources/helm.d.ts.map +1 -0
  323. package/dist/factories/traefik/resources/helm.js +131 -0
  324. package/dist/factories/traefik/resources/helm.js.map +1 -0
  325. package/dist/factories/traefik/resources/index.d.ts +10 -0
  326. package/dist/factories/traefik/resources/index.d.ts.map +1 -0
  327. package/dist/factories/traefik/resources/index.js +10 -0
  328. package/dist/factories/traefik/resources/index.js.map +1 -0
  329. package/dist/factories/traefik/resources/middleware.d.ts +169 -0
  330. package/dist/factories/traefik/resources/middleware.d.ts.map +1 -0
  331. package/dist/factories/traefik/resources/middleware.js +225 -0
  332. package/dist/factories/traefik/resources/middleware.js.map +1 -0
  333. package/dist/factories/traefik/resources/routing.d.ts +113 -0
  334. package/dist/factories/traefik/resources/routing.d.ts.map +1 -0
  335. package/dist/factories/traefik/resources/routing.js +119 -0
  336. package/dist/factories/traefik/resources/routing.js.map +1 -0
  337. package/dist/factories/traefik/resources/tls.d.ts +85 -0
  338. package/dist/factories/traefik/resources/tls.d.ts.map +1 -0
  339. package/dist/factories/traefik/resources/tls.js +93 -0
  340. package/dist/factories/traefik/resources/tls.js.map +1 -0
  341. package/dist/factories/traefik/types.d.ts +2690 -0
  342. package/dist/factories/traefik/types.d.ts.map +1 -0
  343. package/dist/factories/traefik/types.js +1084 -0
  344. package/dist/factories/traefik/types.js.map +1 -0
  345. package/dist/factories/traefik/utils/helm-values-mapper.d.ts +198 -0
  346. package/dist/factories/traefik/utils/helm-values-mapper.d.ts.map +1 -0
  347. package/dist/factories/traefik/utils/helm-values-mapper.js +372 -0
  348. package/dist/factories/traefik/utils/helm-values-mapper.js.map +1 -0
  349. package/dist/factories/traefik/utils/index.d.ts +6 -0
  350. package/dist/factories/traefik/utils/index.d.ts.map +1 -0
  351. package/dist/factories/traefik/utils/index.js +6 -0
  352. package/dist/factories/traefik/utils/index.js.map +1 -0
  353. package/dist/factories/traefik/utils/middleware-validation.d.ts +42 -0
  354. package/dist/factories/traefik/utils/middleware-validation.d.ts.map +1 -0
  355. package/dist/factories/traefik/utils/middleware-validation.js +78 -0
  356. package/dist/factories/traefik/utils/middleware-validation.js.map +1 -0
  357. package/dist/factories/webapp/compositions/web-app-with-processing.d.ts.map +1 -1
  358. package/dist/factories/webapp/compositions/web-app-with-processing.js +10 -0
  359. package/dist/factories/webapp/compositions/web-app-with-processing.js.map +1 -1
  360. package/dist/index.d.ts +4 -3
  361. package/dist/index.d.ts.map +1 -1
  362. package/dist/index.js +3 -1
  363. package/dist/index.js.map +1 -1
  364. package/package.json +9 -1
@@ -0,0 +1,503 @@
1
+ /**
2
+ * S3-backed ClickHouse storage compilation.
3
+ *
4
+ * Compiles the typed `storage` discriminated union into the three things the
5
+ * Altinity operator needs to make a ClickHouse cluster keep its data in object
6
+ * storage with only a local cache on the node:
7
+ *
8
+ * 1. a `storage_configuration` XML document dropped into the CHI's
9
+ * `configuration.files` under `config.d/storage.xml` (disks + policies),
10
+ * 2. the `merge_tree/storage_policy` default in `configuration.settings`, so
11
+ * tables created by OTHER tooling (HyperDX/OTel goose migrations, SigNoz)
12
+ * land on object storage with NO per-table DDL, and
13
+ * 3. the pod-template patch that gives the server its credentials — an
14
+ * IRSA-annotated ServiceAccount plus `use_environment_credentials`, or
15
+ * Secret-backed env vars referenced from the XML with `from_env`.
16
+ *
17
+ * ## Two disk types, two DIFFERENT durability stories
18
+ *
19
+ * The distinction is the whole point of the discriminated `diskType` — a
20
+ * boolean `s3: true` would hide it:
21
+ *
22
+ * - `s3` (classic): part METADATA lives on the local disk; only the part data
23
+ * goes to the bucket. The bucket is NOT self-describing — losing the node
24
+ * loses the map to the objects. Durability comes from backups, which is why
25
+ * `backup` exists.
26
+ * - `s3_plain_rewritable`: metadata lives in the bucket, so the bucket IS
27
+ * self-describing and node loss is a restart + re-attach. The cost is hard
28
+ * engine restrictions (see below).
29
+ *
30
+ * ## `s3_plain_rewritable` restrictions (verified against the ClickHouse docs)
31
+ *
32
+ * `s3_plain_rewritable` arrived in 24.4, and from **24.5** any object-storage
33
+ * disk can be configured with the `plain_rewritable` metadata type — the
34
+ * explicit `type: object_storage` + `object_storage_type: s3` +
35
+ * `metadata_type: plain_rewritable` form this module emits. It executes merges
36
+ * and supports `INSERT`, but the ClickHouse documentation is explicit that
37
+ * **mutations and table replication are NOT supported**. So:
38
+ * - single replica only (the factory rejects `replicas > 1`),
39
+ * - no `ALTER ... UPDATE/DELETE`, no lightweight deletes,
40
+ * - `ALTER TABLE ... MODIFY TTL` must be issued with
41
+ * `materialize_ttl_after_modify = 0` (the materialization step is a
42
+ * mutation); TTL-driven part expiry itself runs in merges and works.
43
+ *
44
+ * @see https://clickhouse.com/docs/operations/storing-data
45
+ */
46
+ import type { ClickHouseInstallationStorage, ClickHouseS3StorageOptions, ClickHouseStorageTopology } from '../types.js';
47
+ /**
48
+ * Deeply loosen optional properties so a `Composable<T>` value — where TypeKro's
49
+ * proxy mapping turns `x?: T` into `x: T | undefined` — assigns under
50
+ * `exactOptionalPropertyTypes`.
51
+ */
52
+ type Loosen<T> = T extends (...args: never[]) => unknown ? T : T extends readonly unknown[] ? T : T extends object ? {
53
+ readonly [K in keyof T]?: Loosen<T[K]> | undefined;
54
+ } : T;
55
+ /**
56
+ * Storage input accepted by {@link resolveClickHouseStorage}: either the full
57
+ * installation storage (local volume sizing + mode) or the build-time topology
58
+ * alone (`makeClickHouseCluster` resolves it before the runtime `size` exists).
59
+ *
60
+ * Every field is loosened to optional because this function's whole job is to
61
+ * validate the shape at runtime — the type is a convenience, not the contract.
62
+ */
63
+ export type ClickHouseStorageInput = Loosen<ClickHouseInstallationStorage> | Loosen<ClickHouseStorageTopology>;
64
+ /** Default MergeTree storage policy name created for S3-backed clusters. */
65
+ export declare const DEFAULT_S3_POLICY_NAME = "s3_main";
66
+ /** Disk name of the raw object-storage disk inside `storage_configuration`. */
67
+ export declare const S3_DISK_NAME = "s3";
68
+ /** Disk name of the local read-through cache wrapping {@link S3_DISK_NAME}. */
69
+ export declare const S3_CACHE_DISK_NAME = "s3_cache";
70
+ /** Volume name inside the generated storage policy. */
71
+ export declare const S3_POLICY_VOLUME_NAME = "main";
72
+ /**
73
+ * Default filesystem path of the local cache. It sits UNDER the operator's
74
+ * data volume mount (`/var/lib/clickhouse`), so the thin local PVC declared by
75
+ * `storage.size` backs the cache without an extra volume.
76
+ */
77
+ export declare const DEFAULT_S3_CACHE_PATH = "/var/lib/clickhouse/disks/s3_cache/";
78
+ /** CHI `configuration.files` key for the rendered storage configuration. */
79
+ export declare const CHI_STORAGE_CONFIG_FILE = "config.d/storage.xml";
80
+ /** CHI `configuration.settings` key that makes the S3 policy the default. */
81
+ export declare const MERGE_TREE_STORAGE_POLICY_SETTING = "merge_tree/storage_policy";
82
+ /** Env var name the rendered XML reads the access key id from. */
83
+ export declare const S3_ACCESS_KEY_ID_ENV = "CLICKHOUSE_S3_ACCESS_KEY_ID";
84
+ /** Env var name the rendered XML reads the secret access key from. */
85
+ export declare const S3_SECRET_ACCESS_KEY_ENV = "CLICKHOUSE_S3_SECRET_ACCESS_KEY";
86
+ /** Default Secret key holding the access key id. */
87
+ export declare const DEFAULT_ACCESS_KEY_ID_SECRET_KEY = "AWS_ACCESS_KEY_ID";
88
+ /** Default Secret key holding the secret access key. */
89
+ export declare const DEFAULT_SECRET_ACCESS_KEY_SECRET_KEY = "AWS_SECRET_ACCESS_KEY";
90
+ /** IRSA annotation the EKS pod identity webhook keys off. */
91
+ export declare const IRSA_ROLE_ARN_ANNOTATION = "eks.amazonaws.com/role-arn";
92
+ /** Default object-key prefix for scheduled backups. */
93
+ export declare const DEFAULT_BACKUP_PREFIX = "backups";
94
+ /** Default database backed up by the generated backup CronJob. */
95
+ export declare const DEFAULT_BACKUP_DATABASE = "default";
96
+ /** `<s3>` credential section name used by `BACKUP ... TO S3(...)`. */
97
+ export declare const S3_BACKUP_CONFIG_SECTION = "backup";
98
+ /**
99
+ * Shape of an S3 bucket name, per AWS's general-purpose bucket naming rules.
100
+ *
101
+ * 3-63 characters of lowercase letters, digits, dots and hyphens, starting and
102
+ * ending alphanumeric. Two further AWS rules are not expressible in one
103
+ * readable pattern and are checked separately in {@link assertS3BucketName}:
104
+ * no `..`, and not IP-address-shaped.
105
+ *
106
+ * The length bound lives in the pattern (`{1,61}` between the two anchored
107
+ * alphanumerics) so the pattern alone is the whole character rule.
108
+ *
109
+ * @see https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html
110
+ */
111
+ export declare const S3_BUCKET_NAME_PATTERN: RegExp;
112
+ /**
113
+ * Region shape accepted for `storage.region`.
114
+ *
115
+ * Two lowercase letters (the geography — `us`, `eu`, `ap`, `cn`), one or more
116
+ * lowercase words, then a single digit: `us-east-2`, `eu-central-1`,
117
+ * `ap-southeast-3`, and the three-part partitions `us-gov-west-1` /
118
+ * `cn-north-1`. Deliberately a SHAPE rather than an enumeration of today's
119
+ * regions — a new region must not need a TypeKro release — but tight enough
120
+ * that the value cannot carry a quote, a dot or a slash into the composed URL,
121
+ * where it sits inside the host name.
122
+ */
123
+ export declare const AWS_REGION_PATTERN: RegExp;
124
+ /**
125
+ * Minimum ClickHouse version this factory accepts for
126
+ * `diskType: 's3_plain_rewritable'`.
127
+ *
128
+ * 24.4 introduced the `s3_plain_rewritable` disk; 24.5 generalized it to the
129
+ * `metadata_type: plain_rewritable` form emitted here, so 24.5 is the floor.
130
+ */
131
+ export declare const MIN_S3_PLAIN_REWRITABLE_VERSION = "24.5";
132
+ /**
133
+ * The {@link MIN_S3_PLAIN_REWRITABLE_VERSION} floor, expressed as a PATTERN so
134
+ * it can travel into a generated KRO schema.
135
+ *
136
+ * WHY A PATTERN AND NOT ONLY A BUILD-TIME COMPARISON. `storage.diskType` is a
137
+ * build-time choice, but `version` is per-INSTANCE runtime spec: in kro mode it
138
+ * arrives at construction as a schema reference, so no build-time comparison
139
+ * can see the value an instance will actually carry. Encoding the floor as a
140
+ * pattern lets `makeClickHouseCluster` put it on `spec.version` in the
141
+ * generated RGD (`string | pattern="…"`), so the API server / KRO REJECT an
142
+ * instance that selects an unsupported server — the case the build-time check
143
+ * structurally cannot reach.
144
+ *
145
+ * Reads as "major.minor >= 24.5": `24.5`-`24.9` and `24.10`+, any `25`-`99`
146
+ * major, and any three-or-more-digit major. A trailing `.patch.build`, or a
147
+ * `-`/`_` suffix, is accepted after the minor because ClickHouse tags look
148
+ * like `25.7`, `25.12.5`, and `24.8.14.39`.
149
+ *
150
+ * RE2-compatible on purpose (no lookaround, no backreferences): the same
151
+ * source becomes the `pattern=` marker of the generated KRO schema, and
152
+ * Kubernetes validates OpenAPI patterns with RE2.
153
+ */
154
+ export declare const S3_PLAIN_REWRITABLE_VERSION_PATTERN: RegExp;
155
+ /**
156
+ * ArkType schema for a `version` that may back
157
+ * `diskType: 's3_plain_rewritable'`.
158
+ *
159
+ * `makeClickHouseCluster` uses this as the spec-schema type of `version`
160
+ * whenever the build-time topology selects `s3_plain_rewritable`, so the floor
161
+ * travels into the generated RGD and KRO rejects a bad INSTANCE. Compositions
162
+ * that wire `clickHouseInstallation()` by hand should do the same — see
163
+ * {@link assertS3PlainRewritableVersion} for why a build-time check alone is
164
+ * not enough there.
165
+ */
166
+ export declare const ClickHouseS3PlainRewritableVersionSchema: import("arktype/internal/variants/string.ts").StringType<string, {}>;
167
+ /**
168
+ * What `storage` has to be, quoted into the ArkType error on a bad value.
169
+ *
170
+ * It is attached to the `mode` DISCRIMINANT of
171
+ * {@link ResolvedClickHouseS3StorageSchema} (via ArkType's `.describe()`), so a
172
+ * value that never came out of the S3 branch of the resolver — a PVC
173
+ * resolution, an unrelated object — is reported against `storage.mode` with
174
+ * this sentence, while every other field keeps its own precise, path-named
175
+ * error.
176
+ */
177
+ export declare const RESOLVED_S3_STORAGE_REQUIREMENT = "a resolved S3 storage (mode: 's3'), as returned by resolveClickHouseStorage()";
178
+ /**
179
+ * Credentials as resolved for rendering (never carries key material).
180
+ *
181
+ * A real ArkType union rather than a `kind` field plus optional siblings: the
182
+ * two transports have DISJOINT payloads, and the union is what makes
183
+ * `{ kind: 'irsa', secretName: … }` a validation error instead of a value the
184
+ * renderer silently reads the wrong half of.
185
+ */
186
+ export declare const ResolvedClickHouseS3AuthSchema: import("arktype/internal/variants/object.ts").ObjectType<{
187
+ kind: "irsa";
188
+ roleArn: string;
189
+ serviceAccountName?: string;
190
+ } | {
191
+ kind: "secretRef";
192
+ secretName: string;
193
+ accessKeyIdKey: string;
194
+ secretAccessKeyKey: string;
195
+ }, {}>;
196
+ /** Credentials as resolved for rendering (see {@link ResolvedClickHouseS3AuthSchema}). */
197
+ export type ResolvedClickHouseS3Auth = typeof ResolvedClickHouseS3AuthSchema.infer;
198
+ /** Backup schedule with every default applied. */
199
+ export declare const ResolvedClickHouseS3BackupSchema: import("arktype/internal/variants/object.ts").ObjectType<{
200
+ schedule: string;
201
+ bucket: string;
202
+ prefix: string;
203
+ database: string;
204
+ endpointUrl: string;
205
+ retentionDays?: number;
206
+ auth?: {
207
+ secretName: string;
208
+ usernameKey: string;
209
+ passwordKey: string;
210
+ };
211
+ }, {}>;
212
+ /** Backup schedule with every default applied (see {@link ResolvedClickHouseS3BackupSchema}). */
213
+ export type ResolvedClickHouseS3Backup = typeof ResolvedClickHouseS3BackupSchema.infer;
214
+ /** Fully defaulted, validated S3 storage configuration. */
215
+ export declare const ResolvedClickHouseS3StorageSchema: import("arktype/internal/variants/object.ts").ObjectType<{
216
+ mode: "s3";
217
+ bucket: string;
218
+ prefix: string;
219
+ diskType: "s3" | "s3_plain_rewritable";
220
+ policyName: string;
221
+ cacheMaxSizeBytes: number;
222
+ cachePath: string;
223
+ auth: {
224
+ kind: "irsa";
225
+ roleArn: string;
226
+ serviceAccountName?: string;
227
+ } | {
228
+ kind: "secretRef";
229
+ secretName: string;
230
+ accessKeyIdKey: string;
231
+ secretAccessKeyKey: string;
232
+ };
233
+ endpointUrl: string;
234
+ region?: string;
235
+ endpoint?: string;
236
+ backup?: {
237
+ schedule: string;
238
+ bucket: string;
239
+ prefix: string;
240
+ database: string;
241
+ endpointUrl: string;
242
+ retentionDays?: number;
243
+ auth?: {
244
+ secretName: string;
245
+ usernameKey: string;
246
+ passwordKey: string;
247
+ };
248
+ };
249
+ }, {}>;
250
+ /** Fully defaulted, validated S3 storage (see {@link ResolvedClickHouseS3StorageSchema}). */
251
+ export type ResolvedClickHouseS3Storage = typeof ResolvedClickHouseS3StorageSchema.infer;
252
+ /** Fully defaulted, validated PVC storage configuration (today's behaviour). */
253
+ export declare const ResolvedClickHousePvcStorageSchema: import("arktype/internal/variants/object.ts").ObjectType<{
254
+ mode: "pvc";
255
+ }, {}>;
256
+ /** Fully defaulted PVC storage (see {@link ResolvedClickHousePvcStorageSchema}). */
257
+ export type ResolvedClickHousePvcStorage = typeof ResolvedClickHousePvcStorageSchema.infer;
258
+ /** Discriminated resolution of the `storage` input. */
259
+ export declare const ResolvedClickHouseStorageSchema: import("arktype/internal/variants/object.ts").ObjectType<{
260
+ mode: "s3";
261
+ bucket: string;
262
+ prefix: string;
263
+ diskType: "s3" | "s3_plain_rewritable";
264
+ policyName: string;
265
+ cacheMaxSizeBytes: number;
266
+ cachePath: string;
267
+ auth: {
268
+ kind: "irsa";
269
+ roleArn: string;
270
+ serviceAccountName?: string;
271
+ } | {
272
+ kind: "secretRef";
273
+ secretName: string;
274
+ accessKeyIdKey: string;
275
+ secretAccessKeyKey: string;
276
+ };
277
+ endpointUrl: string;
278
+ region?: string;
279
+ endpoint?: string;
280
+ backup?: {
281
+ schedule: string;
282
+ bucket: string;
283
+ prefix: string;
284
+ database: string;
285
+ endpointUrl: string;
286
+ retentionDays?: number;
287
+ auth?: {
288
+ secretName: string;
289
+ usernameKey: string;
290
+ passwordKey: string;
291
+ };
292
+ };
293
+ } | {
294
+ mode: "pvc";
295
+ }, {}>;
296
+ /** Discriminated resolution of the `storage` input. */
297
+ export type ResolvedClickHouseStorage = typeof ResolvedClickHouseStorageSchema.infer;
298
+ /**
299
+ * Parse a Kubernetes-style quantity into bytes.
300
+ *
301
+ * ClickHouse's cache `max_size` wants a byte count, while every other size in
302
+ * this factory family is a Kubernetes quantity — so the input stays a quantity
303
+ * and the conversion happens here (loudly) instead of the caller guessing.
304
+ *
305
+ * @param context - Entry point name for the error message
306
+ * @param field - Offending field path (e.g. `storage.cache.size`)
307
+ * @param value - Quantity string such as `'100Gi'`, `'50G'`, or `'1048576'`
308
+ * @returns The value in bytes
309
+ * @throws Error when the quantity cannot be parsed or is not positive
310
+ */
311
+ export declare function parseByteQuantity(context: string, field: string, value: string): number;
312
+ /**
313
+ * Extract `{ major, minor }` from a ClickHouse version tag.
314
+ *
315
+ * Returns `undefined` for tags this function cannot read (`'latest'`, a digest
316
+ * pin, a schema reference) so callers can skip version gating rather than
317
+ * reject a legitimate but unparseable pin.
318
+ */
319
+ export declare function parseClickHouseVersion(version: unknown): {
320
+ major: number;
321
+ minor: number;
322
+ } | undefined;
323
+ /**
324
+ * Assert the server version can run `s3_plain_rewritable` MergeTree writes.
325
+ *
326
+ * TWO ENFORCEMENT SITES, ONE FLOOR. A CONCRETE version is checked here and
327
+ * rejected loudly — including a version this function cannot READ (`'latest'`,
328
+ * a digest pin), because "unreadable" is not evidence that the server supports
329
+ * the `plain_rewritable` metadata type, and silently accepting it was the gap
330
+ * this replaces. A version that is NOT a concrete string is a per-instance
331
+ * schema reference: its value does not exist at construction, so no check here
332
+ * can see it, and the floor must instead travel into the generated schema as
333
+ * {@link ClickHouseS3PlainRewritableVersionSchema} — which
334
+ * `makeClickHouseCluster` does automatically, so KRO rejects an instance that
335
+ * selects an older server. A composition that wires `clickHouseInstallation()`
336
+ * by hand with a schema-reference `version` MUST use that schema for its own
337
+ * `version` field; nothing else can enforce the floor for it.
338
+ *
339
+ * @param context - Entry point name for the error message
340
+ * @param version - The configured ClickHouse server version tag, or a schema
341
+ * reference (skipped — see above)
342
+ * @throws Error when a concrete version is below
343
+ * {@link MIN_S3_PLAIN_REWRITABLE_VERSION} or cannot be parsed as
344
+ * `major.minor`
345
+ */
346
+ export declare function assertS3PlainRewritableVersion(context: string, version: unknown): void;
347
+ /**
348
+ * Assert a value is a legal S3 bucket name.
349
+ *
350
+ * ONE validator for both bucket-shaped options — `storage.bucket` and the
351
+ * `storage.backup.bucket` override — because both are appended into the same
352
+ * composed URL and therefore into the same `BACKUP … TO S3('<url>')` string
353
+ * literal. A second, hand-inlined copy for the override is exactly how the
354
+ * override came to be unchecked in the first place.
355
+ *
356
+ * @param context - Entry point name for the error message
357
+ * @param field - Offending option path (e.g. `storage.backup.bucket`)
358
+ * @param value - The bucket name received
359
+ * @throws Error naming the option and the value when the name breaks AWS's
360
+ * naming rules
361
+ */
362
+ export declare function assertS3BucketName(context: string, field: string, value: unknown): void;
363
+ /**
364
+ * Assert a value is an AWS region identifier.
365
+ *
366
+ * The region is interpolated into the HOST of the composed endpoint
367
+ * (`<bucket>.s3.<region>.amazonaws.com`), so an unconstrained value reaches the
368
+ * XML and the backup SQL literal exactly like the bucket does.
369
+ *
370
+ * @param context - Entry point name for the error message
371
+ * @param field - Offending option path (e.g. `storage.region`)
372
+ * @param value - The region received
373
+ * @throws Error naming the option and the value when the region is not
374
+ * {@link AWS_REGION_PATTERN}-shaped
375
+ */
376
+ export declare function assertAwsRegion(context: string, field: string, value: unknown): void;
377
+ /**
378
+ * True when the storage input selects the object-storage mode.
379
+ *
380
+ * The predicate claims exactly what the check ESTABLISHES and no more: `mode`
381
+ * is `'s3'`, so the S3-only options are the ones that MAY be present — hence
382
+ * `Loosen<…>`, which leaves every one of them optional. Claiming the full
383
+ * `ClickHouseS3StorageOptions` here would assert `bucket: string`,
384
+ * `cache: { size: string }` and a valid `auth` on the strength of one
385
+ * discriminant, and the compiler would then stop asking
386
+ * {@link resolveClickHouseStorage} to check them — which is precisely the job
387
+ * that function exists to do.
388
+ */
389
+ export declare function isS3Storage(storage: ClickHouseStorageInput): storage is ClickHouseStorageInput & Loosen<ClickHouseS3StorageOptions>;
390
+ /**
391
+ * Parse and VALIDATE a custom S3-compatible endpoint, returning it normalized
392
+ * with no trailing slash so the caller can append `/<bucket>/<prefix>/`.
393
+ *
394
+ * STRUCTURE, not just characters. The character allow-list on the composed URL
395
+ * ({@link ENDPOINT_URL_CHARACTERS}) stops injection into the storage XML and
396
+ * the `BACKUP … TO S3('<url>')` SQL literal, but it happily accepts strings
397
+ * that are not usable endpoints — a userinfo section that would write
398
+ * credentials into `config.d/storage.xml`, a query string or fragment that the
399
+ * appended bucket path turns into nonsense, or an out-of-range port. Each of
400
+ * those is a different mistake and gets its own message.
401
+ *
402
+ * @param context - Entry point name for the error message
403
+ * @param endpoint - The caller's `storage.endpoint` value
404
+ * @returns The endpoint as `<scheme>://<host>[:<port>][<path>]`, no trailing
405
+ * slash
406
+ * @throws Error naming the specific part of the URL that is unusable
407
+ */
408
+ export declare function parseS3EndpointUrl(context: string, endpoint: string): string;
409
+ /**
410
+ * Compose the disk/backup endpoint URL, then validate what was composed.
411
+ *
412
+ * ORDER IS THE POINT. Every component reaching this function is already
413
+ * checked on its own — bucket ({@link assertS3BucketName}), region
414
+ * ({@link assertAwsRegion}), prefix ({@link normalizePrefix}), and the
415
+ * `endpoint` right below — and each of those checks exists so the error can
416
+ * name the OPTION the caller set. But per-component checks are a set of doors
417
+ * that has to be complete, and the string that actually matters is the one the
418
+ * runtime sees: the `<endpoint>` text of `config.d/storage.xml` and the
419
+ * `BACKUP … TO S3('<url>')` literal the CronJob builds, where a `'` is extra
420
+ * SQL rather than a bad URL. So the composed result is re-checked against the
421
+ * same RFC 3986 allow-list as a BACKSTOP — a component check that is ever
422
+ * loosened, or a component that is ever added, cannot open that door quietly.
423
+ *
424
+ * @param context - Entry point name for the error message
425
+ * @param field - Option path prefix for the error (`storage` or
426
+ * `storage.backup`), so a bad backup override does not report `storage.*`
427
+ * @param bucket - Validated bucket name
428
+ * @param prefix - Normalized, validated key prefix ('' for the bucket root)
429
+ * @param region - Validated region; required when `endpoint` is absent
430
+ * @param endpoint - Custom S3-compatible base URL, if any
431
+ * @returns The composed URL, always with a trailing slash
432
+ * @throws Error when the endpoint is not an absolute http(s) URL, when the
433
+ * region is missing for AWS, or when the COMPOSED URL carries a character
434
+ * the allow-list forbids
435
+ */
436
+ export declare function composeS3EndpointUrl(context: string, field: string, bucket: string, prefix: string, region: string | undefined, endpoint: string | undefined): string;
437
+ /**
438
+ * Resolve and validate the `storage` input into a discriminated result.
439
+ *
440
+ * The S3 branch is BUILD-TIME data: it compiles into an XML document and
441
+ * selects which resources exist (ServiceAccount, backup CronJob), so a schema
442
+ * reference anywhere inside it can never serialize — this function rejects one
443
+ * loudly rather than emitting `__KUBERNETES_REF__` markers into server config.
444
+ *
445
+ * @param context - Entry point name used in every error message
446
+ * @param storage - The `storage` field as supplied by the caller
447
+ * @param version - The configured ClickHouse version (gates
448
+ * `s3_plain_rewritable`); pass `undefined` to skip the gate
449
+ * @returns The resolved storage configuration
450
+ * @throws Error when PVC and S3 options are mixed, when a required S3 field is
451
+ * missing, or when a value is not build-time concrete
452
+ */
453
+ export declare function resolveClickHouseStorage(context: string, storage: ClickHouseStorageInput, version?: unknown): ResolvedClickHouseStorage;
454
+ /**
455
+ * Render the `storage_configuration` (and, with a backup schedule, the `<s3>`
456
+ * credential section) XML for the CHI's `configuration.files`.
457
+ *
458
+ * The document is fully STATIC: credentials arrive through
459
+ * `use_environment_credentials` or `from_env`, so no secret material is ever
460
+ * rendered here.
461
+ *
462
+ * @param resolved - Resolved S3 storage configuration
463
+ * @returns The XML document text, newline-terminated
464
+ */
465
+ export declare function renderStorageConfigurationXml(resolved: ResolvedClickHouseS3Storage): string;
466
+ /** CHI `configuration.files` entry for the resolved S3 storage. */
467
+ export declare function clickHouseS3ConfigurationFiles(resolved: ResolvedClickHouseS3Storage): Record<string, string>;
468
+ /**
469
+ * CHI `configuration.settings` entry that makes the S3 policy the DEFAULT.
470
+ *
471
+ * This is what lets tooling outside TypeKro — the ClickStack/HyperDX gateway
472
+ * collector's goose migrations, SigNoz's migrator — create its tables with no
473
+ * `SETTINGS storage_policy` clause and still land on object storage.
474
+ */
475
+ export declare function clickHouseS3ConfigurationSettings(resolved: ResolvedClickHouseS3Storage): Record<string, string>;
476
+ /** A pod-template env var entry (the CRD's pod spec is an open structure). */
477
+ interface PodEnvVar {
478
+ name: string;
479
+ valueFrom: {
480
+ secretKeyRef: {
481
+ name: string;
482
+ key: string;
483
+ optional: false;
484
+ };
485
+ };
486
+ }
487
+ /**
488
+ * Env vars the ClickHouse container needs for Secret-backed credentials.
489
+ *
490
+ * Empty for IRSA. `optional: false` so a missing Secret fails the pod loudly
491
+ * instead of starting a server whose S3 disk silently 403s.
492
+ */
493
+ export declare function clickHouseS3ContainerEnv(resolved: ResolvedClickHouseS3Storage): PodEnvVar[];
494
+ /**
495
+ * ServiceAccount name the CHI pod template must run as, when IRSA is used.
496
+ *
497
+ * @param resolved - Resolved S3 storage configuration
498
+ * @param installationName - CHI name, used for the derived default
499
+ * @returns The ServiceAccount name, or `undefined` for non-IRSA credentials
500
+ */
501
+ export declare function clickHouseS3ServiceAccountName(resolved: ResolvedClickHouseS3Storage, installationName: string): string | undefined;
502
+ export {};
503
+ //# sourceMappingURL=s3-storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"s3-storage.d.ts","sourceRoot":"","sources":["../../../../src/factories/clickhouse/utils/s3-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAIH,OAAO,KAAK,EACV,6BAA6B,EAE7B,0BAA0B,EAC1B,yBAAyB,EAC1B,MAAM,aAAa,CAAC;AAIrB;;;;GAIG;AACH,KAAK,MAAM,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,OAAO,GACpD,CAAC,GACD,CAAC,SAAS,SAAS,OAAO,EAAE,GAC1B,CAAC,GACD,CAAC,SAAS,MAAM,GACd;IAAE,QAAQ,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAA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