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.
- package/dist/.tsbuildinfo +1 -1
- package/dist/alchemy/clickhouse-schema/executor.d.ts +25 -0
- package/dist/alchemy/clickhouse-schema/executor.d.ts.map +1 -0
- package/dist/alchemy/clickhouse-schema/executor.js +144 -0
- package/dist/alchemy/clickhouse-schema/executor.js.map +1 -0
- package/dist/alchemy/clickhouse-schema/index.d.ts +12 -0
- package/dist/alchemy/clickhouse-schema/index.d.ts.map +1 -0
- package/dist/alchemy/clickhouse-schema/index.js +11 -0
- package/dist/alchemy/clickhouse-schema/index.js.map +1 -0
- package/dist/alchemy/clickhouse-schema/resource.d.ts +54 -0
- package/dist/alchemy/clickhouse-schema/resource.d.ts.map +1 -0
- package/dist/alchemy/clickhouse-schema/resource.js +158 -0
- package/dist/alchemy/clickhouse-schema/resource.js.map +1 -0
- package/dist/alchemy/clickhouse-schema/runner.d.ts +154 -0
- package/dist/alchemy/clickhouse-schema/runner.d.ts.map +1 -0
- package/dist/alchemy/clickhouse-schema/runner.js +613 -0
- package/dist/alchemy/clickhouse-schema/runner.js.map +1 -0
- package/dist/alchemy/clickhouse-schema/sql.d.ts +109 -0
- package/dist/alchemy/clickhouse-schema/sql.d.ts.map +1 -0
- package/dist/alchemy/clickhouse-schema/sql.js +368 -0
- package/dist/alchemy/clickhouse-schema/sql.js.map +1 -0
- package/dist/alchemy/clickhouse-schema/types.d.ts +394 -0
- package/dist/alchemy/clickhouse-schema/types.d.ts.map +1 -0
- package/dist/alchemy/clickhouse-schema/types.js +370 -0
- package/dist/alchemy/clickhouse-schema/types.js.map +1 -0
- package/dist/alchemy/index.d.ts +1 -0
- package/dist/alchemy/index.d.ts.map +1 -1
- package/dist/alchemy/index.js +2 -0
- package/dist/alchemy/index.js.map +1 -1
- package/dist/compositions/typekro-runtime/typekro-runtime.d.ts +0 -33
- package/dist/compositions/typekro-runtime/typekro-runtime.d.ts.map +1 -1
- package/dist/compositions/typekro-runtime/typekro-runtime.js +63 -1
- package/dist/compositions/typekro-runtime/typekro-runtime.js.map +1 -1
- package/dist/compositions/typekro-runtime/types.d.ts +8 -0
- package/dist/compositions/typekro-runtime/types.d.ts.map +1 -1
- package/dist/compositions/typekro-runtime/types.js +1 -0
- package/dist/compositions/typekro-runtime/types.js.map +1 -1
- package/dist/core/aspects/values-merge.d.ts +17 -0
- package/dist/core/aspects/values-merge.d.ts.map +1 -1
- package/dist/core/aspects/values-merge.js +67 -8
- package/dist/core/aspects/values-merge.js.map +1 -1
- package/dist/core/deployment/direct-factory.d.ts +9 -0
- package/dist/core/deployment/direct-factory.d.ts.map +1 -1
- package/dist/core/deployment/direct-factory.js +37 -3
- package/dist/core/deployment/direct-factory.js.map +1 -1
- package/dist/core/deployment/engine.d.ts +34 -0
- package/dist/core/deployment/engine.d.ts.map +1 -1
- package/dist/core/deployment/engine.js +173 -29
- package/dist/core/deployment/engine.js.map +1 -1
- package/dist/core/deployment/index.d.ts +2 -0
- package/dist/core/deployment/index.d.ts.map +1 -1
- package/dist/core/deployment/index.js +1 -0
- package/dist/core/deployment/index.js.map +1 -1
- package/dist/core/deployment/k8s-helpers.d.ts +73 -0
- package/dist/core/deployment/k8s-helpers.d.ts.map +1 -1
- package/dist/core/deployment/k8s-helpers.js +198 -4
- package/dist/core/deployment/k8s-helpers.js.map +1 -1
- package/dist/core/deployment/kro-factory.d.ts.map +1 -1
- package/dist/core/deployment/kro-factory.js +21 -1
- package/dist/core/deployment/kro-factory.js.map +1 -1
- package/dist/core/deployment/status-leaf-resolution.d.ts +101 -0
- package/dist/core/deployment/status-leaf-resolution.d.ts.map +1 -0
- package/dist/core/deployment/status-leaf-resolution.js +232 -0
- package/dist/core/deployment/status-leaf-resolution.js.map +1 -0
- package/dist/core/deployment/strategies/base-strategy.d.ts.map +1 -1
- package/dist/core/deployment/strategies/base-strategy.js +31 -3
- package/dist/core/deployment/strategies/base-strategy.js.map +1 -1
- package/dist/core/deployment/strategies/kro-strategy.d.ts.map +1 -1
- package/dist/core/deployment/strategies/kro-strategy.js +8 -1
- package/dist/core/deployment/strategies/kro-strategy.js.map +1 -1
- package/dist/core/kro/index.d.ts +6 -0
- package/dist/core/kro/index.d.ts.map +1 -0
- package/dist/core/kro/index.js +6 -0
- package/dist/core/kro/index.js.map +1 -0
- package/dist/core/kro/label-guard-capability.d.ts +141 -0
- package/dist/core/kro/label-guard-capability.d.ts.map +1 -0
- package/dist/core/kro/label-guard-capability.js +257 -0
- package/dist/core/kro/label-guard-capability.js.map +1 -0
- package/dist/core/kro/labels.d.ts +56 -0
- package/dist/core/kro/labels.d.ts.map +1 -0
- package/dist/core/kro/labels.js +62 -0
- package/dist/core/kro/labels.js.map +1 -0
- package/dist/core/kubernetes/api-capability.d.ts +196 -0
- package/dist/core/kubernetes/api-capability.d.ts.map +1 -0
- package/dist/core/kubernetes/api-capability.js +301 -0
- package/dist/core/kubernetes/api-capability.js.map +1 -0
- package/dist/core/kubernetes/index.d.ts +2 -0
- package/dist/core/kubernetes/index.d.ts.map +1 -1
- package/dist/core/kubernetes/index.js +2 -0
- package/dist/core/kubernetes/index.js.map +1 -1
- package/dist/core/kubernetes/naming.d.ts +100 -0
- package/dist/core/kubernetes/naming.d.ts.map +1 -0
- package/dist/core/kubernetes/naming.js +93 -0
- package/dist/core/kubernetes/naming.js.map +1 -0
- package/dist/core/planning/direct-runtime-adapter.d.ts.map +1 -1
- package/dist/core/planning/direct-runtime-adapter.js +54 -17
- package/dist/core/planning/direct-runtime-adapter.js.map +1 -1
- package/dist/core/planning/planner.d.ts.map +1 -1
- package/dist/core/planning/planner.js +17 -0
- package/dist/core/planning/planner.js.map +1 -1
- package/dist/core/planning/schema.d.ts.map +1 -1
- package/dist/core/planning/schema.js +7 -3
- package/dist/core/planning/schema.js.map +1 -1
- package/dist/core/references/cel-lexical-scanner.d.ts +100 -1
- package/dist/core/references/cel-lexical-scanner.d.ts.map +1 -1
- package/dist/core/references/cel-lexical-scanner.js +196 -2
- package/dist/core/references/cel-lexical-scanner.js.map +1 -1
- package/dist/core/references/cel.d.ts +249 -1
- package/dist/core/references/cel.d.ts.map +1 -1
- package/dist/core/references/cel.js +289 -8
- package/dist/core/references/cel.js.map +1 -1
- package/dist/core/serialization/arktype-ast.d.ts +21 -0
- package/dist/core/serialization/arktype-ast.d.ts.map +1 -0
- package/dist/core/serialization/arktype-ast.js +29 -0
- package/dist/core/serialization/arktype-ast.js.map +1 -0
- package/dist/core/serialization/cel-references.d.ts +133 -32
- package/dist/core/serialization/cel-references.d.ts.map +1 -1
- package/dist/core/serialization/cel-references.js +908 -109
- package/dist/core/serialization/cel-references.js.map +1 -1
- package/dist/core/serialization/schema.d.ts +16 -2
- package/dist/core/serialization/schema.d.ts.map +1 -1
- package/dist/core/serialization/schema.js +113 -21
- package/dist/core/serialization/schema.js.map +1 -1
- package/dist/core/types/composable.d.ts +7 -1
- package/dist/core/types/composable.d.ts.map +1 -1
- package/dist/core/types/deployment.d.ts +32 -2
- package/dist/core/types/deployment.d.ts.map +1 -1
- package/dist/core/types/serialization.d.ts +37 -0
- package/dist/core/types/serialization.d.ts.map +1 -1
- package/dist/core/validation/cel-dialect.d.ts +246 -0
- package/dist/core/validation/cel-dialect.d.ts.map +1 -0
- package/dist/core/validation/cel-dialect.js +1997 -0
- package/dist/core/validation/cel-dialect.js.map +1 -0
- package/dist/core/validation/cel-validator.d.ts.map +1 -1
- package/dist/core/validation/cel-validator.js +8 -1
- package/dist/core/validation/cel-validator.js.map +1 -1
- package/dist/core/validation/literal-status.d.ts +107 -0
- package/dist/core/validation/literal-status.d.ts.map +1 -0
- package/dist/core/validation/literal-status.js +346 -0
- package/dist/core/validation/literal-status.js.map +1 -0
- package/dist/core/validation/structural-spec-dependence.d.ts +179 -0
- package/dist/core/validation/structural-spec-dependence.d.ts.map +1 -0
- package/dist/core/validation/structural-spec-dependence.js +911 -0
- package/dist/core/validation/structural-spec-dependence.js.map +1 -0
- package/dist/factories/apisix/compositions/apisix-bootstrap.d.ts.map +1 -1
- package/dist/factories/apisix/compositions/apisix-bootstrap.js +9 -0
- package/dist/factories/apisix/compositions/apisix-bootstrap.js.map +1 -1
- package/dist/factories/clickhouse/compositions/clickhouse-cluster.d.ts +6 -0
- package/dist/factories/clickhouse/compositions/clickhouse-cluster.d.ts.map +1 -1
- package/dist/factories/clickhouse/compositions/clickhouse-cluster.js +273 -23
- package/dist/factories/clickhouse/compositions/clickhouse-cluster.js.map +1 -1
- package/dist/factories/clickhouse/resources/index.d.ts +1 -0
- package/dist/factories/clickhouse/resources/index.d.ts.map +1 -1
- package/dist/factories/clickhouse/resources/index.js +1 -0
- package/dist/factories/clickhouse/resources/index.js.map +1 -1
- package/dist/factories/clickhouse/resources/installation.d.ts.map +1 -1
- package/dist/factories/clickhouse/resources/installation.js +31 -4
- package/dist/factories/clickhouse/resources/installation.js.map +1 -1
- package/dist/factories/clickhouse/resources/s3-backup.d.ts +215 -0
- package/dist/factories/clickhouse/resources/s3-backup.d.ts.map +1 -0
- package/dist/factories/clickhouse/resources/s3-backup.js +410 -0
- package/dist/factories/clickhouse/resources/s3-backup.js.map +1 -0
- package/dist/factories/clickhouse/types.d.ts +416 -20
- package/dist/factories/clickhouse/types.d.ts.map +1 -1
- package/dist/factories/clickhouse/types.js +235 -11
- package/dist/factories/clickhouse/types.js.map +1 -1
- package/dist/factories/clickhouse/utils/helm-values-mapper.d.ts +42 -0
- package/dist/factories/clickhouse/utils/helm-values-mapper.d.ts.map +1 -1
- package/dist/factories/clickhouse/utils/helm-values-mapper.js +48 -0
- package/dist/factories/clickhouse/utils/helm-values-mapper.js.map +1 -1
- package/dist/factories/clickhouse/utils/index.d.ts +2 -0
- package/dist/factories/clickhouse/utils/index.d.ts.map +1 -1
- package/dist/factories/clickhouse/utils/index.js +2 -0
- package/dist/factories/clickhouse/utils/index.js.map +1 -1
- package/dist/factories/clickhouse/utils/s3-storage.d.ts +503 -0
- package/dist/factories/clickhouse/utils/s3-storage.d.ts.map +1 -0
- package/dist/factories/clickhouse/utils/s3-storage.js +1139 -0
- package/dist/factories/clickhouse/utils/s3-storage.js.map +1 -0
- package/dist/factories/clickhouse/utils/validation.d.ts +103 -0
- package/dist/factories/clickhouse/utils/validation.d.ts.map +1 -1
- package/dist/factories/clickhouse/utils/validation.js +129 -0
- package/dist/factories/clickhouse/utils/validation.js.map +1 -1
- package/dist/factories/clickhouse/utils/xml.d.ts +87 -0
- package/dist/factories/clickhouse/utils/xml.d.ts.map +1 -0
- package/dist/factories/clickhouse/utils/xml.js +151 -0
- package/dist/factories/clickhouse/utils/xml.js.map +1 -0
- package/dist/factories/clickstack/compositions/clickstack-bootstrap.d.ts +57 -0
- package/dist/factories/clickstack/compositions/clickstack-bootstrap.d.ts.map +1 -1
- package/dist/factories/clickstack/compositions/clickstack-bootstrap.js +266 -7
- package/dist/factories/clickstack/compositions/clickstack-bootstrap.js.map +1 -1
- package/dist/factories/clickstack/types.d.ts +205 -26
- package/dist/factories/clickstack/types.d.ts.map +1 -1
- package/dist/factories/clickstack/types.js +106 -8
- package/dist/factories/clickstack/types.js.map +1 -1
- package/dist/factories/clickstack/utils/collector-config.d.ts +104 -0
- package/dist/factories/clickstack/utils/collector-config.d.ts.map +1 -0
- package/dist/factories/clickstack/utils/collector-config.js +266 -0
- package/dist/factories/clickstack/utils/collector-config.js.map +1 -0
- package/dist/factories/clickstack/utils/helm-values-mapper.d.ts +26 -0
- package/dist/factories/clickstack/utils/helm-values-mapper.d.ts.map +1 -1
- package/dist/factories/clickstack/utils/helm-values-mapper.js +53 -12
- package/dist/factories/clickstack/utils/helm-values-mapper.js.map +1 -1
- package/dist/factories/clickstack/utils/index.d.ts +2 -0
- package/dist/factories/clickstack/utils/index.d.ts.map +1 -1
- package/dist/factories/clickstack/utils/index.js +2 -0
- package/dist/factories/clickstack/utils/index.js.map +1 -1
- package/dist/factories/clickstack/utils/storage.d.ts +449 -0
- package/dist/factories/clickstack/utils/storage.d.ts.map +1 -0
- package/dist/factories/clickstack/utils/storage.js +698 -0
- package/dist/factories/clickstack/utils/storage.js.map +1 -0
- package/dist/factories/cnpg/resources/helm.d.ts.map +1 -1
- package/dist/factories/cnpg/resources/helm.js +4 -4
- package/dist/factories/cnpg/resources/helm.js.map +1 -1
- package/dist/factories/cnpg/types.d.ts +10 -1
- package/dist/factories/cnpg/types.d.ts.map +1 -1
- package/dist/factories/cnpg/types.js.map +1 -1
- package/dist/factories/cnpg/utils/helm-values-mapper.d.ts +19 -2
- package/dist/factories/cnpg/utils/helm-values-mapper.d.ts.map +1 -1
- package/dist/factories/cnpg/utils/helm-values-mapper.js +22 -4
- package/dist/factories/cnpg/utils/helm-values-mapper.js.map +1 -1
- package/dist/factories/envoy-ai-gateway/compositions/gateway.d.ts.map +1 -1
- package/dist/factories/envoy-ai-gateway/compositions/gateway.js +16 -3
- package/dist/factories/envoy-ai-gateway/compositions/gateway.js.map +1 -1
- package/dist/factories/envoy-ai-gateway/constants.d.ts +5 -2
- package/dist/factories/envoy-ai-gateway/constants.d.ts.map +1 -1
- package/dist/factories/envoy-ai-gateway/constants.js +5 -2
- package/dist/factories/envoy-ai-gateway/constants.js.map +1 -1
- package/dist/factories/envoy-ai-gateway/resources/gateway.d.ts +12 -0
- package/dist/factories/envoy-ai-gateway/resources/gateway.d.ts.map +1 -1
- package/dist/factories/envoy-ai-gateway/resources/gateway.js +27 -104
- package/dist/factories/envoy-ai-gateway/resources/gateway.js.map +1 -1
- package/dist/factories/envoy-ai-gateway/types.d.ts +15 -47
- package/dist/factories/envoy-ai-gateway/types.d.ts.map +1 -1
- package/dist/factories/envoy-ai-gateway/types.js.map +1 -1
- package/dist/factories/gateway-api/constants.d.ts +27 -0
- package/dist/factories/gateway-api/constants.d.ts.map +1 -0
- package/dist/factories/gateway-api/constants.js +27 -0
- package/dist/factories/gateway-api/constants.js.map +1 -0
- package/dist/factories/gateway-api/index.d.ts +14 -0
- package/dist/factories/gateway-api/index.d.ts.map +1 -0
- package/dist/factories/gateway-api/index.js +14 -0
- package/dist/factories/gateway-api/index.js.map +1 -0
- package/dist/factories/gateway-api/readiness.d.ts +67 -0
- package/dist/factories/gateway-api/readiness.d.ts.map +1 -0
- package/dist/factories/gateway-api/readiness.js +213 -0
- package/dist/factories/gateway-api/readiness.js.map +1 -0
- package/dist/factories/gateway-api/resources/gateway.d.ts +91 -0
- package/dist/factories/gateway-api/resources/gateway.d.ts.map +1 -0
- package/dist/factories/gateway-api/resources/gateway.js +99 -0
- package/dist/factories/gateway-api/resources/gateway.js.map +1 -0
- package/dist/factories/gateway-api/resources/index.d.ts +2 -0
- package/dist/factories/gateway-api/resources/index.d.ts.map +1 -0
- package/dist/factories/gateway-api/resources/index.js +2 -0
- package/dist/factories/gateway-api/resources/index.js.map +1 -0
- package/dist/factories/gateway-api/types.d.ts +1269 -0
- package/dist/factories/gateway-api/types.d.ts.map +1 -0
- package/dist/factories/gateway-api/types.js +417 -0
- package/dist/factories/gateway-api/types.js.map +1 -0
- package/dist/factories/helm/readiness-evaluators.d.ts +21 -3
- package/dist/factories/helm/readiness-evaluators.d.ts.map +1 -1
- package/dist/factories/helm/readiness-evaluators.js +117 -11
- package/dist/factories/helm/readiness-evaluators.js.map +1 -1
- package/dist/factories/helm/types.d.ts +28 -0
- package/dist/factories/helm/types.d.ts.map +1 -1
- package/dist/factories/index.d.ts +2 -0
- package/dist/factories/index.d.ts.map +1 -1
- package/dist/factories/index.js +8 -0
- package/dist/factories/index.js.map +1 -1
- package/dist/factories/inngest/compositions/inngest-bootstrap.d.ts.map +1 -1
- package/dist/factories/inngest/compositions/inngest-bootstrap.js +10 -0
- package/dist/factories/inngest/compositions/inngest-bootstrap.js.map +1 -1
- package/dist/factories/kubernetes/admission/index.d.ts +2 -0
- package/dist/factories/kubernetes/admission/index.d.ts.map +1 -1
- package/dist/factories/kubernetes/admission/index.js +2 -0
- package/dist/factories/kubernetes/admission/index.js.map +1 -1
- package/dist/factories/kubernetes/admission/label-propagation-guard.d.ts +108 -0
- package/dist/factories/kubernetes/admission/label-propagation-guard.d.ts.map +1 -0
- package/dist/factories/kubernetes/admission/label-propagation-guard.js +247 -0
- package/dist/factories/kubernetes/admission/label-propagation-guard.js.map +1 -0
- package/dist/factories/kubernetes/admission/mutating-admission-policy.d.ts +286 -0
- package/dist/factories/kubernetes/admission/mutating-admission-policy.d.ts.map +1 -0
- package/dist/factories/kubernetes/admission/mutating-admission-policy.js +157 -0
- package/dist/factories/kubernetes/admission/mutating-admission-policy.js.map +1 -0
- package/dist/factories/opensearch/compositions/cluster.d.ts.map +1 -1
- package/dist/factories/opensearch/compositions/cluster.js +6 -1
- package/dist/factories/opensearch/compositions/cluster.js.map +1 -1
- package/dist/factories/ory/compositions/ory-identity-stack.d.ts +8 -8
- package/dist/factories/ory/types.d.ts +16 -16
- package/dist/factories/rook/compositions/object-storage-claim.d.ts +1 -1
- package/dist/factories/rook/compositions/rook-ceph-platform.js +8 -1
- package/dist/factories/rook/compositions/rook-ceph-platform.js.map +1 -1
- package/dist/factories/rook/types.d.ts +1 -1
- package/dist/factories/traefik/compositions/index.d.ts +6 -0
- package/dist/factories/traefik/compositions/index.d.ts.map +1 -0
- package/dist/factories/traefik/compositions/index.js +6 -0
- package/dist/factories/traefik/compositions/index.js.map +1 -0
- package/dist/factories/traefik/compositions/traefik-bootstrap.d.ts +185 -0
- package/dist/factories/traefik/compositions/traefik-bootstrap.d.ts.map +1 -0
- package/dist/factories/traefik/compositions/traefik-bootstrap.js +339 -0
- package/dist/factories/traefik/compositions/traefik-bootstrap.js.map +1 -0
- package/dist/factories/traefik/compositions/traefik-helm-repository.d.ts +16 -0
- package/dist/factories/traefik/compositions/traefik-helm-repository.d.ts.map +1 -0
- package/dist/factories/traefik/compositions/traefik-helm-repository.js +31 -0
- package/dist/factories/traefik/compositions/traefik-helm-repository.js.map +1 -0
- package/dist/factories/traefik/constants.d.ts +78 -0
- package/dist/factories/traefik/constants.d.ts.map +1 -0
- package/dist/factories/traefik/constants.js +104 -0
- package/dist/factories/traefik/constants.js.map +1 -0
- package/dist/factories/traefik/index.d.ts +25 -0
- package/dist/factories/traefik/index.d.ts.map +1 -0
- package/dist/factories/traefik/index.js +25 -0
- package/dist/factories/traefik/index.js.map +1 -0
- package/dist/factories/traefik/resources/common.d.ts +68 -0
- package/dist/factories/traefik/resources/common.d.ts.map +1 -0
- package/dist/factories/traefik/resources/common.js +59 -0
- package/dist/factories/traefik/resources/common.js.map +1 -0
- package/dist/factories/traefik/resources/gateway.d.ts +85 -0
- package/dist/factories/traefik/resources/gateway.d.ts.map +1 -0
- package/dist/factories/traefik/resources/gateway.js +109 -0
- package/dist/factories/traefik/resources/gateway.js.map +1 -0
- package/dist/factories/traefik/resources/helm.d.ts +56 -0
- package/dist/factories/traefik/resources/helm.d.ts.map +1 -0
- package/dist/factories/traefik/resources/helm.js +131 -0
- package/dist/factories/traefik/resources/helm.js.map +1 -0
- package/dist/factories/traefik/resources/index.d.ts +10 -0
- package/dist/factories/traefik/resources/index.d.ts.map +1 -0
- package/dist/factories/traefik/resources/index.js +10 -0
- package/dist/factories/traefik/resources/index.js.map +1 -0
- package/dist/factories/traefik/resources/middleware.d.ts +169 -0
- package/dist/factories/traefik/resources/middleware.d.ts.map +1 -0
- package/dist/factories/traefik/resources/middleware.js +225 -0
- package/dist/factories/traefik/resources/middleware.js.map +1 -0
- package/dist/factories/traefik/resources/routing.d.ts +113 -0
- package/dist/factories/traefik/resources/routing.d.ts.map +1 -0
- package/dist/factories/traefik/resources/routing.js +119 -0
- package/dist/factories/traefik/resources/routing.js.map +1 -0
- package/dist/factories/traefik/resources/tls.d.ts +85 -0
- package/dist/factories/traefik/resources/tls.d.ts.map +1 -0
- package/dist/factories/traefik/resources/tls.js +93 -0
- package/dist/factories/traefik/resources/tls.js.map +1 -0
- package/dist/factories/traefik/types.d.ts +2690 -0
- package/dist/factories/traefik/types.d.ts.map +1 -0
- package/dist/factories/traefik/types.js +1084 -0
- package/dist/factories/traefik/types.js.map +1 -0
- package/dist/factories/traefik/utils/helm-values-mapper.d.ts +198 -0
- package/dist/factories/traefik/utils/helm-values-mapper.d.ts.map +1 -0
- package/dist/factories/traefik/utils/helm-values-mapper.js +372 -0
- package/dist/factories/traefik/utils/helm-values-mapper.js.map +1 -0
- package/dist/factories/traefik/utils/index.d.ts +6 -0
- package/dist/factories/traefik/utils/index.d.ts.map +1 -0
- package/dist/factories/traefik/utils/index.js +6 -0
- package/dist/factories/traefik/utils/index.js.map +1 -0
- package/dist/factories/traefik/utils/middleware-validation.d.ts +42 -0
- package/dist/factories/traefik/utils/middleware-validation.d.ts.map +1 -0
- package/dist/factories/traefik/utils/middleware-validation.js +78 -0
- package/dist/factories/traefik/utils/middleware-validation.js.map +1 -0
- package/dist/factories/webapp/compositions/web-app-with-processing.d.ts.map +1 -1
- package/dist/factories/webapp/compositions/web-app-with-processing.js +10 -0
- package/dist/factories/webapp/compositions/web-app-with-processing.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- 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,E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