typekro 0.33.9 → 0.34.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/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/expressions/composition/composition-analyzer-helpers.d.ts.map +1 -1
- package/dist/core/expressions/composition/composition-analyzer-helpers.js +20 -2
- package/dist/core/expressions/composition/composition-analyzer-helpers.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/core.d.ts.map +1 -1
- package/dist/core/serialization/core.js +13 -2
- package/dist/core/serialization/core.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/searxng/compositions/searxng-bootstrap.d.ts +1 -1
- package/dist/factories/searxng/compositions/searxng-bootstrap.d.ts.map +1 -1
- package/dist/factories/searxng/compositions/searxng-bootstrap.js +18 -13
- package/dist/factories/searxng/compositions/searxng-bootstrap.js.map +1 -1
- package/dist/factories/searxng/index.d.ts +3 -0
- package/dist/factories/searxng/index.d.ts.map +1 -1
- package/dist/factories/searxng/index.js +3 -0
- package/dist/factories/searxng/index.js.map +1 -1
- package/dist/factories/searxng/types.js +1 -1
- package/dist/factories/searxng/types.js.map +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,449 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ClickStack storage consumption: TTL retention and the collector's
|
|
3
|
+
* persistent sending queue.
|
|
4
|
+
*
|
|
5
|
+
* The storage POLICY needs nothing here. The `clickhouse` factory sets
|
|
6
|
+
* `merge_tree/storage_policy` as the server default, so the gateway
|
|
7
|
+
* collector's goose migrations create `otel_logs` / `otel_traces` /
|
|
8
|
+
* `otel_metrics_*` / `hyperdx_sessions` on the S3 policy with no
|
|
9
|
+
* `SETTINGS storage_policy` clause and no per-table DDL from TypeKro. This
|
|
10
|
+
* module covers the two things a server default cannot express:
|
|
11
|
+
*
|
|
12
|
+
* 1. **Retention** — `TTL toDateTime(<timestamp>) + INTERVAL n UNIT DELETE`,
|
|
13
|
+
* applied by an idempotent CronJob because the tables do not exist until the
|
|
14
|
+
* collector has migrated, and because TypeKro does not own their DDL.
|
|
15
|
+
* LIVE-VERIFIED: the collector's own migration already sets a 30-day TTL
|
|
16
|
+
* (`toDateTime(Timestamp) + toIntervalDay(30)` with `ttl_only_drop_parts`),
|
|
17
|
+
* so `retention` OVERRIDES that default rather than establishing the first
|
|
18
|
+
* one — which is exactly why the idempotence probe compares the COMPLETE
|
|
19
|
+
* TTL clause rather than merely asking whether a TTL exists.
|
|
20
|
+
* 2. **Persistent queue** — a `file_storage`-backed exporter queue so a
|
|
21
|
+
* ClickHouse restart (which is exactly what an S3-backed node rebuild
|
|
22
|
+
* causes) does not drop in-flight telemetry. Its directory is backed by a
|
|
23
|
+
* STANDALONE PersistentVolumeClaim owned by the composition: an `emptyDir`
|
|
24
|
+
* or a generic ephemeral volume is deleted with the collector Pod, so
|
|
25
|
+
* neither survives the collector restart the queue exists to survive.
|
|
26
|
+
*
|
|
27
|
+
* S3_PLAIN_REWRITABLE NOTE: retention and that disk type are MUTUALLY
|
|
28
|
+
* EXCLUSIVE, and `resolveClickStackStorage` rejects the combination.
|
|
29
|
+
* `MODIFY TTL` normally schedules a materialization MUTATION, which
|
|
30
|
+
* plain_rewritable does not support — every statement this module emits
|
|
31
|
+
* therefore carries `SETTINGS materialize_ttl_after_modify = 0` so expiry
|
|
32
|
+
* happens during merges instead. LIVE-VERIFIED (ClickHouse 25.7) that this is
|
|
33
|
+
* not enough: the immutable metadata type refuses the metadata ALTER itself
|
|
34
|
+
* ("ALTER TABLE commands are not supported on immutable disk", code 344), and
|
|
35
|
+
* the identical statement succeeds against a table on the server's local
|
|
36
|
+
* policy. The setting is kept for the `diskType: 's3'` path, where the
|
|
37
|
+
* materialization pass is the only thing worth skipping.
|
|
38
|
+
*/
|
|
39
|
+
import type { ClickStackStorageOptions } from '../types.js';
|
|
40
|
+
import { type CollectorConfigFragment } from './collector-config.js';
|
|
41
|
+
/** Default cron schedule for the retention DDL CronJob. */
|
|
42
|
+
export declare const DEFAULT_RETENTION_SCHEDULE = "17 * * * *";
|
|
43
|
+
/**
|
|
44
|
+
* Default image for the retention DDL CronJob. The ClickStack chart vendors
|
|
45
|
+
* ClickHouse 25.7, so the matching server image supplies a compatible
|
|
46
|
+
* `clickhouse-client`.
|
|
47
|
+
*/
|
|
48
|
+
export declare const DEFAULT_RETENTION_IMAGE = "clickhouse/clickhouse-server:25.7";
|
|
49
|
+
/** Default persistent-queue directory inside the collector pod. */
|
|
50
|
+
export declare const DEFAULT_QUEUE_DIRECTORY = "/var/lib/otelcol/file_storage";
|
|
51
|
+
/** Default `file_storage` extension instance name. */
|
|
52
|
+
export declare const QUEUE_EXTENSION_NAME = "file_storage/hyperdx";
|
|
53
|
+
/**
|
|
54
|
+
* Default exporters whose `sending_queue` is switched to file storage.
|
|
55
|
+
*
|
|
56
|
+
* The ClickStack collector defines a single ClickHouse exporter, `clickhouse`,
|
|
57
|
+
* and all three signal pipelines export through it. A name that is NOT one the
|
|
58
|
+
* agent defines fails silently: the supervisor merges the overlay, the
|
|
59
|
+
* `exporters` map simply grows an exporter no pipeline uses, and the real one
|
|
60
|
+
* keeps its in-memory queue. That is why the integration suite asserts these
|
|
61
|
+
* names against the agent's own EFFECTIVE configuration instead of trusting
|
|
62
|
+
* the default.
|
|
63
|
+
*/
|
|
64
|
+
export declare const DEFAULT_QUEUE_EXPORTER_NAMES: readonly ["clickhouse"];
|
|
65
|
+
/**
|
|
66
|
+
* Default `service.extensions` list emitted with the queue overlay.
|
|
67
|
+
*
|
|
68
|
+
* A YAML list in `global.otelCollector.customConfig` REPLACES the supervisor's
|
|
69
|
+
* own list, so this must name every extension the collector needs — see the
|
|
70
|
+
* warning on {@link ClickStackPersistentQueueOptions}.
|
|
71
|
+
*/
|
|
72
|
+
export declare const DEFAULT_QUEUE_EXTENSIONS: readonly ["health_check", "file_storage/hyperdx"];
|
|
73
|
+
/** Volume name used for the persistent-queue directory. */
|
|
74
|
+
export declare const QUEUE_VOLUME_NAME = "otel-file-storage";
|
|
75
|
+
/**
|
|
76
|
+
* Deployment update strategy forced on the gateway whenever the queue is on.
|
|
77
|
+
*
|
|
78
|
+
* The collector chart's `rollout.strategy` (default `RollingUpdate`) becomes
|
|
79
|
+
* the Deployment's `spec.strategy.type` verbatim. `Recreate` is the only value
|
|
80
|
+
* under which a rollout terminates the old collector BEFORE creating its
|
|
81
|
+
* replacement, which is what a single-writer queue on a ReadWriteOnce claim
|
|
82
|
+
* requires — see {@link renderPersistentQueueValues} for why the replica pin
|
|
83
|
+
* does not cover this on its own.
|
|
84
|
+
*/
|
|
85
|
+
export declare const QUEUE_ROLLOUT_STRATEGY = "Recreate";
|
|
86
|
+
/**
|
|
87
|
+
* The gateway subchart's OWN `extraVolumes` entry, which we must re-emit.
|
|
88
|
+
*
|
|
89
|
+
* Helm REPLACES a list-valued override rather than appending to it, and the
|
|
90
|
+
* chart mounts the ConfigMap rendered from `global.otelCollector.customConfig`
|
|
91
|
+
* through exactly these two lists. Chart 3.2.0's `values.yaml` says so in a
|
|
92
|
+
* comment on the defaults:
|
|
93
|
+
*
|
|
94
|
+
* "NOTE: if you override extraVolumes/extraVolumeMounts yourself, Helm
|
|
95
|
+
* replaces these lists entirely -- re-include the entries below to keep
|
|
96
|
+
* global.otelCollector.customConfig working."
|
|
97
|
+
*
|
|
98
|
+
* LIVE-VERIFIED what happens when you don't: the queue volume alone evicts the
|
|
99
|
+
* custom-config mount, the OpAMP supervisor logs `Could not read local config
|
|
100
|
+
* file: open /etc/otelcol-contrib/custom/custom.config.yaml: no such file or
|
|
101
|
+
* directory` on every poll, never composes a merged agent config, and the
|
|
102
|
+
* collector never starts its OTLP receivers — while the Pod still reports
|
|
103
|
+
* Ready, because readiness comes from the SUPERVISOR's health_check and not
|
|
104
|
+
* from the agent. Enabling the persistent queue would silently take the whole
|
|
105
|
+
* gateway down.
|
|
106
|
+
*/
|
|
107
|
+
export declare const CHART_CUSTOM_CONFIG_VOLUME_NAME = "custom-config";
|
|
108
|
+
/** ConfigMap the chart renders `global.otelCollector.customConfig` into. */
|
|
109
|
+
export declare const CHART_CUSTOM_CONFIG_CONFIG_MAP_NAME = "clickstack-otel-custom-config";
|
|
110
|
+
/** Directory the chart mounts {@link CHART_CUSTOM_CONFIG_CONFIG_MAP_NAME} at. */
|
|
111
|
+
export declare const CHART_CUSTOM_CONFIG_MOUNT_PATH = "/etc/otelcol-contrib/custom";
|
|
112
|
+
/** Default size of the persistent-queue PersistentVolumeClaim. */
|
|
113
|
+
export declare const DEFAULT_QUEUE_SIZE = "10Gi";
|
|
114
|
+
/**
|
|
115
|
+
* Access modes of the persistent-queue PersistentVolumeClaim — not an option.
|
|
116
|
+
*
|
|
117
|
+
* `ReadWriteMany` used to be selectable, on the theory that a shared volume
|
|
118
|
+
* would let several collector replicas run off one queue directory. It does
|
|
119
|
+
* not, and the volume was never the binding constraint: the OTel `file_storage`
|
|
120
|
+
* extension stores the queue in a bbolt database, and bbolt takes an EXCLUSIVE
|
|
121
|
+
* FILE LOCK on open (the extension's own README says a single collector
|
|
122
|
+
* instance per directory; collector-contrib issue #5894 is the second instance
|
|
123
|
+
* hanging on that lock). Two replicas pointed at one directory therefore either
|
|
124
|
+
* block forever or, if the lock is lost across a node boundary the way a
|
|
125
|
+
* network filesystem can lose it, corrupt the database. Offering RWX advertised
|
|
126
|
+
* a multi-replica queue that cannot exist, so the knob is gone and the claim is
|
|
127
|
+
* always `ReadWriteOnce`.
|
|
128
|
+
*/
|
|
129
|
+
export declare const QUEUE_ACCESS_MODES: readonly ["ReadWriteOnce"];
|
|
130
|
+
/** Name suffix of the queue PersistentVolumeClaim (and its resource id). */
|
|
131
|
+
export declare const QUEUE_CLAIM_NAME_SUFFIX = "-otel-queue";
|
|
132
|
+
/**
|
|
133
|
+
* Name of the queue PersistentVolumeClaim for a release.
|
|
134
|
+
*
|
|
135
|
+
* Shared by the composition (which CREATES the claim) and the values mapper
|
|
136
|
+
* (which MOUNTS it by `claimName`), so the two cannot drift. Accepts a schema
|
|
137
|
+
* reference for `name` the same way every other name in this family does — the
|
|
138
|
+
* template literal serializes to CEL in KRO mode.
|
|
139
|
+
*
|
|
140
|
+
* @param releaseName - Helm release name (`spec.name`)
|
|
141
|
+
* @returns The claim name
|
|
142
|
+
*/
|
|
143
|
+
export declare function clickStackQueueClaimName(releaseName: string): string;
|
|
144
|
+
/** ConfigMap the ClickStack chart renders the shared non-secret env into. */
|
|
145
|
+
export declare const CLICKSTACK_CONFIG_MAP_NAME = "clickstack-config";
|
|
146
|
+
/** Secret the ClickStack chart renders the shared secret env into. */
|
|
147
|
+
export declare const CLICKSTACK_SECRET_NAME = "clickstack-secret";
|
|
148
|
+
/** One OTel table and the column its TTL is expressed against. */
|
|
149
|
+
export interface ClickStackRetentionTable {
|
|
150
|
+
/** Table name as created by the gateway collector's goose migrations. */
|
|
151
|
+
readonly table: string;
|
|
152
|
+
/** Timestamp column the TTL is expressed against. */
|
|
153
|
+
readonly column: string;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Tables per signal, with the timestamp column each one's TTL keys off.
|
|
157
|
+
*
|
|
158
|
+
* Columns mirror the `defaultSources` the values mapper emits (which mirror
|
|
159
|
+
* the chart's own defaults), so they track the schema HyperDX queries:
|
|
160
|
+
* `Timestamp` for logs/traces, `TimeUnix` for metrics, `TimestampTime` for
|
|
161
|
+
* sessions.
|
|
162
|
+
*/
|
|
163
|
+
export declare const CLICKSTACK_RETENTION_TABLES: Readonly<Record<'logs' | 'traces' | 'metrics', readonly ClickStackRetentionTable[]>>;
|
|
164
|
+
/** A retention duration parsed into a ClickHouse `INTERVAL`. */
|
|
165
|
+
export interface ParsedRetention {
|
|
166
|
+
readonly amount: number;
|
|
167
|
+
readonly unit: 'MINUTE' | 'HOUR' | 'DAY';
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Parse a retention duration string into a ClickHouse `INTERVAL`.
|
|
171
|
+
*
|
|
172
|
+
* @param context - Entry point name for the error message
|
|
173
|
+
* @param field - Offending field path (e.g. `storage.retention.logs`)
|
|
174
|
+
* @param value - Duration string such as `'30d'`, `'720h'`, or `'90m'`
|
|
175
|
+
* @returns The parsed amount and `INTERVAL` unit
|
|
176
|
+
* @throws Error when the duration cannot be parsed or is not positive
|
|
177
|
+
*/
|
|
178
|
+
export declare function parseRetentionDuration(context: string, field: string, value: string): ParsedRetention;
|
|
179
|
+
/** One resolved retention entry: which table, and the TTL expression for it. */
|
|
180
|
+
export interface ResolvedRetentionEntry extends ClickStackRetentionTable {
|
|
181
|
+
readonly signal: 'logs' | 'traces' | 'metrics';
|
|
182
|
+
readonly duration: string;
|
|
183
|
+
/** The `MODIFY TTL` expression to apply. */
|
|
184
|
+
readonly ttlExpression: string;
|
|
185
|
+
/**
|
|
186
|
+
* COMPLETE normalized TTL clauses that mean "the intended TTL is already
|
|
187
|
+
* applied" — matched by EQUALITY, never by substring.
|
|
188
|
+
*
|
|
189
|
+
* WHY EQUALITY: a substring probe is wrong in both directions. Looking for
|
|
190
|
+
* `toIntervalDay(3)` matches a table that actually carries
|
|
191
|
+
* `toIntervalDay(30)`, so a needed change is skipped; and a table carrying
|
|
192
|
+
* the intended interval plus extra clauses (`… + toIntervalDay(30) WHERE
|
|
193
|
+
* …`, or a second `TO VOLUME` entry) also matches, so a DIFFERENT retention
|
|
194
|
+
* policy is reported as converged. Comparing the whole clause makes both
|
|
195
|
+
* cases mismatches, which is the correct answer.
|
|
196
|
+
*
|
|
197
|
+
* TWO SPELLINGS: ClickHouse re-renders a stored TTL from its AST, so the
|
|
198
|
+
* text that comes back is not the text that went in — `INTERVAL 30 DAY`
|
|
199
|
+
* renders as `toIntervalDay(30)`, and the default `DELETE` action is not
|
|
200
|
+
* rendered at all. The AST form is what a live server returns
|
|
201
|
+
* (LIVE-VERIFIED); the source spelling is kept as a second accepted value so
|
|
202
|
+
* the probe does not degrade into "re-ALTER on every run" if a release
|
|
203
|
+
* renders the clause verbatim.
|
|
204
|
+
*/
|
|
205
|
+
readonly ttlRenderings: readonly string[];
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Collapse a TTL clause read back from ClickHouse into its comparable form.
|
|
209
|
+
*
|
|
210
|
+
* The server's own rendering is already canonical apart from whitespace, so
|
|
211
|
+
* this only collapses runs of blanks and trims — enough to compare clauses
|
|
212
|
+
* across formatting differences without pretending to normalize SQL.
|
|
213
|
+
*
|
|
214
|
+
* @param rendered - A TTL clause as extracted from `engine_full`
|
|
215
|
+
* @returns The clause with whitespace runs collapsed to single spaces
|
|
216
|
+
*/
|
|
217
|
+
export declare function normalizeRenderedTtl(rendered: string): string;
|
|
218
|
+
/**
|
|
219
|
+
* Whether a TTL clause read back from a live table already expresses the
|
|
220
|
+
* intended retention.
|
|
221
|
+
*
|
|
222
|
+
* This is the exact predicate the rendered CronJob script implements in shell
|
|
223
|
+
* (an equality test against {@link ResolvedRetentionEntry.ttlRenderings}); it
|
|
224
|
+
* exists as a function so the comparison semantics — in particular the
|
|
225
|
+
* near-miss cases a substring probe gets wrong — are directly testable.
|
|
226
|
+
*
|
|
227
|
+
* @param currentClause - TTL clause extracted from `system.tables.engine_full`
|
|
228
|
+
* @param entry - The resolved retention entry being converged
|
|
229
|
+
* @returns True when no `MODIFY TTL` is needed
|
|
230
|
+
*/
|
|
231
|
+
export declare function ttlAlreadyApplied(currentClause: string, entry: ResolvedRetentionEntry): boolean;
|
|
232
|
+
/** Fully defaulted, validated ClickStack storage consumption options. */
|
|
233
|
+
export interface ResolvedClickStackStorage {
|
|
234
|
+
readonly mode: 'pvc' | 's3';
|
|
235
|
+
readonly diskType?: 's3' | 's3_plain_rewritable';
|
|
236
|
+
readonly policyName?: string;
|
|
237
|
+
readonly retention?: {
|
|
238
|
+
readonly logs?: string;
|
|
239
|
+
readonly traces?: string;
|
|
240
|
+
readonly metrics?: string;
|
|
241
|
+
};
|
|
242
|
+
readonly retentionEntries: readonly ResolvedRetentionEntry[];
|
|
243
|
+
readonly retentionSchedule: string;
|
|
244
|
+
readonly retentionImage: string;
|
|
245
|
+
readonly persistentQueue?: {
|
|
246
|
+
readonly directory: string;
|
|
247
|
+
/** PVC size — always present: there is no ephemeral fallback. */
|
|
248
|
+
readonly size: string;
|
|
249
|
+
readonly storageClassName?: string;
|
|
250
|
+
/** Always {@link QUEUE_ACCESS_MODES} — see the constant for why. */
|
|
251
|
+
readonly accessModes: readonly string[];
|
|
252
|
+
/** Always non-empty — `resolveClickStackStorage` rejects an empty list. */
|
|
253
|
+
readonly exporterNames: readonly string[];
|
|
254
|
+
readonly extensions: readonly string[];
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Resolve and validate the build-time storage options.
|
|
259
|
+
*
|
|
260
|
+
* @param context - Entry point name for every error message
|
|
261
|
+
* @param options - Build-time storage options (omit for the PVC default)
|
|
262
|
+
* @returns The resolved options, with retention expanded per table
|
|
263
|
+
* @throws Error when a retention duration is unparseable, when an
|
|
264
|
+
* S3-specific option is set on the PVC default, or when a queue component
|
|
265
|
+
* name is an object-model member (see {@link assertQueueComponentNames})
|
|
266
|
+
*/
|
|
267
|
+
export declare function resolveClickStackStorage(context: string, options: ClickStackStorageOptions | undefined): ResolvedClickStackStorage;
|
|
268
|
+
/**
|
|
269
|
+
* Reject more than one gateway collector replica alongside a persistent queue.
|
|
270
|
+
*
|
|
271
|
+
* UNCONDITIONAL: `persistentQueue` means exactly one collector replica, and no
|
|
272
|
+
* volume choice changes that. The `file_storage` extension keeps the queue in a
|
|
273
|
+
* bbolt database, and bbolt takes an EXCLUSIVE FILE LOCK for the lifetime of
|
|
274
|
+
* the handle — the extension's README is explicit that one directory serves one
|
|
275
|
+
* collector instance, and collector-contrib issue #5894 is the report of the
|
|
276
|
+
* second instance hanging on that lock. So a second replica either blocks
|
|
277
|
+
* forever on `Open` or, where the lock does not hold across a node boundary,
|
|
278
|
+
* writes the same pages as the first.
|
|
279
|
+
*
|
|
280
|
+
* The claim's `ReadWriteOnce` mode is a second, weaker line of defence (extra
|
|
281
|
+
* Pods on other nodes stay `Pending` on `Multi-Attach`), not the reason.
|
|
282
|
+
* `ReadWriteMany` was previously accepted as a way to lift this guard; it is
|
|
283
|
+
* gone, because a shared filesystem hands both replicas the same locked
|
|
284
|
+
* database rather than giving each its own.
|
|
285
|
+
*
|
|
286
|
+
* PER-REPLICA STORAGE IS THE REAL ALTERNATIVE, and it is not modelled here:
|
|
287
|
+
* it needs the upstream chart's `mode: statefulset` with `volumeClaimTemplates`
|
|
288
|
+
* so every replica gets its OWN queue directory. This composition renders the
|
|
289
|
+
* gateway as the chart's default Deployment and mounts one standalone claim, so
|
|
290
|
+
* the error names that path as future work rather than pretending it exists.
|
|
291
|
+
*
|
|
292
|
+
* @param context - Entry point name for the error message
|
|
293
|
+
* @param resolved - Resolved storage options
|
|
294
|
+
* @param replicaCount - Collector replica count from the build-time chart
|
|
295
|
+
* values, when one was set
|
|
296
|
+
* @throws Error when a persistent queue is requested with more than one replica
|
|
297
|
+
*/
|
|
298
|
+
export declare function assertQueueReplicaCompatible(context: string, resolved: ResolvedClickStackStorage, replicaCount: unknown): void;
|
|
299
|
+
/**
|
|
300
|
+
* Render the idempotent retention DDL script.
|
|
301
|
+
*
|
|
302
|
+
* IDEMPOTENCE, and why this is a CronJob rather than a one-shot Job: the OTel
|
|
303
|
+
* tables do not exist until the gateway collector's goose migrations have run,
|
|
304
|
+
* and TypeKro does not own their DDL — so the script waits for each table to
|
|
305
|
+
* appear, and re-checks on every run. It only issues `MODIFY TTL` when the
|
|
306
|
+
* table's current TTL clause is not already the intended one, so a converged
|
|
307
|
+
* cluster does no metadata churn.
|
|
308
|
+
*
|
|
309
|
+
* THE IDEMPOTENCE PROBE COMPARES WHOLE CLAUSES. It extracts the complete TTL
|
|
310
|
+
* clause out of `system.tables.engine_full` — everything between `TTL ` and
|
|
311
|
+
* the trailing ` SETTINGS …`, whitespace-collapsed — and tests it for EQUALITY
|
|
312
|
+
* against {@link ResolvedRetentionEntry.ttlRenderings}. A substring probe was
|
|
313
|
+
* wrong in both directions (see the doc on `ttlRenderings`), and the actual
|
|
314
|
+
* clause is echoed on a mismatch so a rendering change is visible in the Job
|
|
315
|
+
* log instead of showing up as silent per-run churn.
|
|
316
|
+
*
|
|
317
|
+
* Notes on the SQL: the extraction deliberately contains no backslash escapes
|
|
318
|
+
* and no `$` anchors — it strips the `SETTINGS` tail with `replaceRegexpOne`
|
|
319
|
+
* first and uses the POSIX class `[[:space:]]` — because the expression has to
|
|
320
|
+
* survive being nested inside a double-quoted shell command substitution.
|
|
321
|
+
*
|
|
322
|
+
* @param resolved - Resolved storage options carrying `retentionEntries`
|
|
323
|
+
* @returns A POSIX shell script for `sh -c`
|
|
324
|
+
*/
|
|
325
|
+
export declare function renderRetentionScript(resolved: ResolvedClickStackStorage): string;
|
|
326
|
+
/**
|
|
327
|
+
* The persistent queue's contribution to the collector-config overlay.
|
|
328
|
+
*
|
|
329
|
+
* ⚠️ A STRUCTURED FRAGMENT, NOT YAML TEXT, and that is the whole point. This
|
|
330
|
+
* used to return a YAML string that the values mapper CONCATENATED onto the
|
|
331
|
+
* ingest-pipeline string. Both opened a top-level `service:` key, so the
|
|
332
|
+
* rendered `custom.config.yaml` declared `service` twice and the OpAMP
|
|
333
|
+
* supervisor rejected the WHOLE file on every poll:
|
|
334
|
+
*
|
|
335
|
+
* Could not merge local config file: …/custom/custom.config.yaml
|
|
336
|
+
* yaml: unmarshal errors: line 18: mapping key "service" already defined at line 1
|
|
337
|
+
*
|
|
338
|
+
* The agent then ran with NEITHER the ingest pipelines NOR the queue, while
|
|
339
|
+
* the Pod still reported Ready off the supervisor's own `health_check` — so
|
|
340
|
+
* enabling the queue was a silent no-op that also took OTLP ingestion down.
|
|
341
|
+
* Fragments are merged by `mergeCollectorConfig` (see
|
|
342
|
+
* `utils/collector-config.ts`) and serialised exactly once, which makes a
|
|
343
|
+
* duplicate key unrepresentable.
|
|
344
|
+
*
|
|
345
|
+
* ⚠️ The YAML lists here REPLACE the supervisor's own lists (the chart's
|
|
346
|
+
* `customConfig` is a merge, not a deep list append) — see the warning on
|
|
347
|
+
* {@link ClickStackPersistentQueueOptions}. `service.extensions` is a sequence,
|
|
348
|
+
* so it UNIONS with any other fragment's contribution before that replacement
|
|
349
|
+
* happens.
|
|
350
|
+
*
|
|
351
|
+
* Every name in `exporterNames` gets its own `sending_queue.storage`. A name
|
|
352
|
+
* the agent does not define is inert rather than fatal — see
|
|
353
|
+
* {@link DEFAULT_QUEUE_EXPORTER_NAMES} for why it cannot be checked here.
|
|
354
|
+
*
|
|
355
|
+
* ⚠️ THE EXPORTER MAP IS BUILT KEY BY KEY, on a NULL-PROTOTYPE dictionary, and
|
|
356
|
+
* every name is re-checked. It used to be an `Object.fromEntries` over
|
|
357
|
+
* `exporterNames`, which is honest enough on its own — `fromEntries` DEFINES an
|
|
358
|
+
* own property, so it does not pollute — but the overlay merge then copied the
|
|
359
|
+
* map with `copy[key] = …` onto a plain `{}`, where assigning `__proto__` calls
|
|
360
|
+
* the inherited SETTER and re-parents the copy instead of adding a key. An
|
|
361
|
+
* `exporterNames: ['__proto__']` install therefore rendered `exporters: {}`: a
|
|
362
|
+
* queue that configured nothing, reported no error, and left the real exporter
|
|
363
|
+
* on its in-memory queue. `resolveClickStackStorage` rejects such a name at the
|
|
364
|
+
* option, and this function refuses it again so no caller holding a
|
|
365
|
+
* hand-built `ResolvedClickStackStorage` can route around that.
|
|
366
|
+
*
|
|
367
|
+
* @param queue - Resolved persistent-queue configuration
|
|
368
|
+
* @returns A fragment for `global.otelCollector.customConfig`
|
|
369
|
+
* @throws Error when a component name is a JavaScript object-model member
|
|
370
|
+
*/
|
|
371
|
+
export declare function persistentQueueConfigFragment(queue: NonNullable<ResolvedClickStackStorage['persistentQueue']>): CollectorConfigFragment;
|
|
372
|
+
/**
|
|
373
|
+
* Chart values that mount the queue's PersistentVolumeClaim on the collector.
|
|
374
|
+
*
|
|
375
|
+
* The claim is a STANDALONE PersistentVolumeClaim owned by the composition
|
|
376
|
+
* (rendered next to the retention CronJob) and referenced here by
|
|
377
|
+
* `claimName` — never an `emptyDir` and never a *generic ephemeral volume*.
|
|
378
|
+
* Kubernetes deletes a generic ephemeral volume's PVC together with the Pod
|
|
379
|
+
* that owns it, so an ephemeral claim would be destroyed by exactly the
|
|
380
|
+
* collector restart the queue exists to survive.
|
|
381
|
+
*
|
|
382
|
+
* The collector is also PINNED to one replica, unconditionally: the queue is a
|
|
383
|
+
* bbolt database under an exclusive file lock, so a second replica cannot open
|
|
384
|
+
* it at all — see {@link assertQueueReplicaCompatible}, which rejects a
|
|
385
|
+
* build-time `replicaCount` above 1 at construction. The pin makes that
|
|
386
|
+
* guarantee explicit in the rendered values against later drift.
|
|
387
|
+
*
|
|
388
|
+
* ⚠️ `replicaCount: 1` IS NOT ENOUGH ON ITS OWN, which is why
|
|
389
|
+
* `rollout.strategy: 'Recreate'` travels with it. One replica bounds the
|
|
390
|
+
* STEADY state, not the state DURING a rollout: the chart leaves the
|
|
391
|
+
* Deployment on Kubernetes' default `RollingUpdate` (values.yaml `rollout`,
|
|
392
|
+
* collector chart 0.146.x), whose default `maxSurge: 25%` rounds UP to one
|
|
393
|
+
* extra Pod. A rollout therefore creates the replacement Pod while the old one
|
|
394
|
+
* is still running and still holding both the claim and the queue, and that
|
|
395
|
+
* overlap fails in one of two ways depending on where the replacement lands:
|
|
396
|
+
*
|
|
397
|
+
* - **On another node — a stuck rollout.** The ReadWriteOnce claim is still
|
|
398
|
+
* attached to the old Pod's node, so the replacement never leaves
|
|
399
|
+
* `ContainerCreating` (`Multi-Attach error for volume`). `RollingUpdate`
|
|
400
|
+
* will not terminate the old Pod until the new one is Ready, and
|
|
401
|
+
* `maxUnavailable: 25%` of one replica rounds DOWN to zero, so nothing gives:
|
|
402
|
+
* the rollout DEADLOCKS until `progressDeadlineSeconds` expires.
|
|
403
|
+
* - **On the same node — a silent two-writer window.** The replacement starts,
|
|
404
|
+
* and its `file_storage` extension cannot take bbolt's exclusive lock while
|
|
405
|
+
* the old collector holds it. Readiness does not notice: it comes from the
|
|
406
|
+
* OpAMP supervisor's own `health_check`, not from the agent's extensions
|
|
407
|
+
* (the same reason the missing `custom-config` mount below stayed invisible),
|
|
408
|
+
* so the Pod reports Ready and the rollout "succeeds" over a queue the new
|
|
409
|
+
* collector could not open. LIVE-OBSERVED on a single-node cluster: under
|
|
410
|
+
* `RollingUpdate` the replacement went Ready in under 10s.
|
|
411
|
+
*
|
|
412
|
+
* `Recreate` removes the overlap entirely: the old Pod is deleted, its claim
|
|
413
|
+
* detaches and its lock is released, and only then is the replacement created.
|
|
414
|
+
*
|
|
415
|
+
* The cost is a brief gateway outage on every rollout, and the persistent
|
|
416
|
+
* queue is precisely what makes that cost acceptable: producers upstream of
|
|
417
|
+
* the gateway retry, and telemetry the gateway already accepted is on the
|
|
418
|
+
* claim rather than in the departing Pod's memory, so the replacement resumes
|
|
419
|
+
* draining the same queue instead of starting from an empty one.
|
|
420
|
+
*
|
|
421
|
+
* `rollout.rollingUpdate` needs no clearing here. The chart's Deployment
|
|
422
|
+
* template emits that block only under `if eq .Values.rollout.strategy
|
|
423
|
+
* "RollingUpdate"`, so `Recreate` drops it — which matters, because a
|
|
424
|
+
* Deployment carrying `strategy.type: Recreate` alongside a
|
|
425
|
+
* `strategy.rollingUpdate` block is rejected by the API server.
|
|
426
|
+
*
|
|
427
|
+
* ⚠️ THE CHART'S OWN `custom-config` VOLUME IS RE-EMITTED HERE, and must be:
|
|
428
|
+
* Helm REPLACES a list override instead of appending to it, and these are the
|
|
429
|
+
* lists through which the chart mounts the ConfigMap it renders from
|
|
430
|
+
* `global.otelCollector.customConfig` — the overlay that carries the ingest
|
|
431
|
+
* pipelines AND this queue's own `file_storage` wiring. Dropping it makes the
|
|
432
|
+
* OpAMP supervisor fail to read `custom.config.yaml` and never start the
|
|
433
|
+
* agent's receivers, with the Pod still Ready. See
|
|
434
|
+
* {@link CHART_CUSTOM_CONFIG_VOLUME_NAME} for the live evidence.
|
|
435
|
+
*
|
|
436
|
+
* @param queue - Resolved persistent-queue configuration
|
|
437
|
+
* @param claimName - Name of the PVC the composition creates
|
|
438
|
+
* ({@link clickStackQueueClaimName})
|
|
439
|
+
* @returns Values under the `otel-collector` subchart alias
|
|
440
|
+
*/
|
|
441
|
+
export declare function renderPersistentQueueValues(queue: NonNullable<ResolvedClickStackStorage['persistentQueue']>, claimName: string): Record<string, unknown>;
|
|
442
|
+
/**
|
|
443
|
+
* Spec of the standalone PersistentVolumeClaim backing the collector queue.
|
|
444
|
+
*
|
|
445
|
+
* @param queue - Resolved persistent-queue configuration
|
|
446
|
+
* @returns A `V1PersistentVolumeClaim.spec` object
|
|
447
|
+
*/
|
|
448
|
+
export declare function renderPersistentQueueClaimSpec(queue: NonNullable<ResolvedClickStackStorage['persistentQueue']>): Record<string, unknown>;
|
|
449
|
+
//# sourceMappingURL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