typekro 0.35.0 → 0.36.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/kro-delete.d.ts +7 -0
- package/dist/alchemy/kro-delete.d.ts.map +1 -1
- package/dist/alchemy/kro-delete.js +28 -4
- package/dist/alchemy/kro-delete.js.map +1 -1
- package/dist/alchemy/resource-registration.d.ts +9 -2
- package/dist/alchemy/resource-registration.d.ts.map +1 -1
- package/dist/alchemy/resource-registration.js +117 -33
- package/dist/alchemy/resource-registration.js.map +1 -1
- package/dist/core/deployment/k8s-helpers.d.ts +77 -1
- package/dist/core/deployment/k8s-helpers.d.ts.map +1 -1
- package/dist/core/deployment/k8s-helpers.js +298 -17
- package/dist/core/deployment/k8s-helpers.js.map +1 -1
- package/dist/core/deployment/kro-artifact-binding-migration.d.ts +17 -6
- package/dist/core/deployment/kro-artifact-binding-migration.d.ts.map +1 -1
- package/dist/core/deployment/kro-artifact-binding-migration.js +16 -2
- package/dist/core/deployment/kro-artifact-binding-migration.js.map +1 -1
- package/dist/core/deployment/kro-namespace-teardown.d.ts +15 -1
- package/dist/core/deployment/kro-namespace-teardown.d.ts.map +1 -1
- package/dist/core/deployment/kro-namespace-teardown.js +34 -9
- package/dist/core/deployment/kro-namespace-teardown.js.map +1 -1
- package/dist/core/deployment/kro-readiness.d.ts +35 -0
- package/dist/core/deployment/kro-readiness.d.ts.map +1 -1
- package/dist/core/deployment/kro-readiness.js +201 -25
- package/dist/core/deployment/kro-readiness.js.map +1 -1
- package/dist/core/deployment/poll-timeout.d.ts +80 -2
- package/dist/core/deployment/poll-timeout.d.ts.map +1 -1
- package/dist/core/deployment/poll-timeout.js +164 -4
- package/dist/core/deployment/poll-timeout.js.map +1 -1
- package/dist/core/kubernetes/bun-http-library.d.ts +24 -0
- package/dist/core/kubernetes/bun-http-library.d.ts.map +1 -1
- package/dist/core/kubernetes/bun-http-library.js +146 -19
- package/dist/core/kubernetes/bun-http-library.js.map +1 -1
- package/dist/core/kubernetes/errors.d.ts +9 -0
- package/dist/core/kubernetes/errors.d.ts.map +1 -1
- package/dist/core/kubernetes/errors.js +7 -3
- package/dist/core/kubernetes/errors.js.map +1 -1
- package/dist/factories/clickhouse/compositions/clickhouse-cluster.d.ts +24 -2
- package/dist/factories/clickhouse/compositions/clickhouse-cluster.d.ts.map +1 -1
- package/dist/factories/clickhouse/compositions/clickhouse-cluster.js +24 -2
- package/dist/factories/clickhouse/compositions/clickhouse-cluster.js.map +1 -1
- package/dist/factories/clickhouse/resources/keeper.d.ts +61 -0
- package/dist/factories/clickhouse/resources/keeper.d.ts.map +1 -1
- package/dist/factories/clickhouse/resources/keeper.js +216 -2
- package/dist/factories/clickhouse/resources/keeper.js.map +1 -1
- package/dist/factories/clickhouse/resources/s3-backup.d.ts.map +1 -1
- package/dist/factories/clickhouse/resources/s3-backup.js +4 -3
- package/dist/factories/clickhouse/resources/s3-backup.js.map +1 -1
- package/dist/factories/clickhouse/types.d.ts +3 -2
- package/dist/factories/clickhouse/types.d.ts.map +1 -1
- package/dist/factories/clickhouse/types.js +28 -1
- package/dist/factories/clickhouse/types.js.map +1 -1
- package/dist/factories/clickhouse/utils/validation.d.ts +133 -10
- package/dist/factories/clickhouse/utils/validation.d.ts.map +1 -1
- package/dist/factories/clickhouse/utils/validation.js +165 -18
- package/dist/factories/clickhouse/utils/validation.js.map +1 -1
- package/dist/factories/clickstack/compositions/clickstack-bootstrap.d.ts +15 -1
- package/dist/factories/clickstack/compositions/clickstack-bootstrap.d.ts.map +1 -1
- package/dist/factories/clickstack/compositions/clickstack-bootstrap.js +15 -1
- package/dist/factories/clickstack/compositions/clickstack-bootstrap.js.map +1 -1
- package/dist/factories/rook/types.d.ts +16 -16
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"s3-backup.js","sourceRoot":"","sources":["../../../../src/factories/clickhouse/resources/s3-backup.ts"],"names":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,CAAC,4BAA4B,CAAC,CAAC,CAAC,EAAE,CAAC;IACtE,OAAO;QACL,SAAS;QACT,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACxC,2EAA2E;QAC3E,8DAA8D;QAC9D,yEAAyE;QACzE,6EAA6E;QAC7E,kEAAkE;QAClE,wEAAwE;QACxE,4EAA4E;QAC5E,2EAA2E;QAC3E,2EAA2E;QAC3E,0EAA0E;QAC1E,wEAAwE;QACxE,iCAAiC;QACjC,SAAS;YACP,CAAC,CAAC,2DAA2D;gBAC3D,KAAK,kBAAkB,4BAA4B;YACrD,CAAC,CAAC,0EAA0E;QAC9E,2EAA2E;QAC3E,4EAA4E;QAC5E,uEAAuE;QACvE,2EAA2E;QAC3E,mEAAmE;QACnE,uEAAuE;YACrE,8DAA8D;YAC9D,iDAAiD,eAAe,KAAK;YACrE,6BAA6B;QAC/B,8BAA8B;KAC/B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,SAAS,gBAAgB;IACvB,OAAO;QACL,aAAa,kBAAkB,GAAG;QAClC,iEAAiE;QACjE,2EAA2E;QAC3E,
|
|
1
|
+
{"version":3,"file":"s3-backup.js","sourceRoot":"","sources":["../../../../src/factories/clickhouse/resources/s3-backup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAQH,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AAEjE,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EACL,iCAAiC,EACjC,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,EACxB,8BAA8B,GAC/B,MAAM,wBAAwB,CAAC;AAEhC;;;;;;GAMG;AACH,OAAO,E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ACrB,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,eAAe,CAAC,EAAE;gCACnC,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,eAAe,CAAC,EAAE,UAAU,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;yBAChE;qBACF;iBACF;aACF;SACF;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -787,7 +787,7 @@ export type ClickHouseClusterSpec = ClickHouseClusterSpecBase & {
|
|
|
787
787
|
* `storage` durability block. Rather than emit them as literals (which KRO
|
|
788
788
|
* drops from the instance status, so the declared schema would promise fields
|
|
789
789
|
* the live CR never carries), the composition writes them into a ConfigMap it
|
|
790
|
-
* OWNS (`<installation>-contract`) and projects them back from that resource.
|
|
790
|
+
* OWNS (`<installation>-clickhouse-contract`) and projects them back from that resource.
|
|
791
791
|
* The result is that `kubectl get clickhouseclusters -o yaml` shows the whole
|
|
792
792
|
* contract, durability included, in both factory modes.
|
|
793
793
|
*
|
|
@@ -860,7 +860,7 @@ export interface ClickHouseClusterStatus {
|
|
|
860
860
|
*
|
|
861
861
|
* PROJECTED FROM THE OWNED CONTRACT CONFIGMAP: these come from the
|
|
862
862
|
* construction-time topology, not from the owned CHI, so the composition
|
|
863
|
-
* writes them into a ConfigMap it owns (`<installation>-contract`) and reads
|
|
863
|
+
* writes them into a ConfigMap it owns (`<installation>-clickhouse-contract`) and reads
|
|
864
864
|
* them back from there. That gives them a resource anchor, so — unlike a
|
|
865
865
|
* bare literal, which KRO omits — they appear on the live KRO CR status.
|
|
866
866
|
*/
|
|
@@ -936,6 +936,7 @@ export declare const ClickHouseKeeperInstallationConfigSchema: import("arktype/i
|
|
|
936
936
|
name: string;
|
|
937
937
|
namespace?: string;
|
|
938
938
|
id?: string;
|
|
939
|
+
clusterName?: string;
|
|
939
940
|
replicas?: number;
|
|
940
941
|
storage?: {
|
|
941
942
|
size: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/factories/clickhouse/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/factories/clickhouse/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAUpE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uCAAuC;;;;;;;;;;;;;;;;;;;;;;MA2ClD,CAAC;AAEH,8EAA8E;AAC9E,MAAM,MAAM,iCAAiC,GAC3C,OAAO,uCAAuC,CAAC,KAAK,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD,2EAA2E;IAC3E,KAAK,EAAE,OAAO,GAAG,YAAY,GAAG,QAAQ,CAAC;IACzC,6DAA6D;IAC7D,KAAK,EAAE,OAAO,CAAC;IACf,mEAAmE;IACnE,MAAM,EAAE,OAAO,CAAC;IAChB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,4DAA4D;AAC5D,eAAO,MAAM,uCAAuC;;;;;MAKlD,CAAC;AAMH,uEAAuE;AACvE,eAAO,MAAM,2CAA2C;;;;MAItD,CAAC;AAEH,yEAAyE;AACzE,eAAO,MAAM,6CAA6C;;MAExD,CAAC;AAMH;;;;GAIG;AACH,eAAO,MAAM,oCAAoC;;;;;;MAW/C,CAAC;AAEH,4DAA4D;AAC5D,MAAM,MAAM,8BAA8B,GAAG,OAAO,oCAAoC,CAAC,KAAK,CAAC;AAE/F;;;;GAIG;AACH,eAAO,MAAM,yCAAyC;;;;;;;MAapD,CAAC;AAEH;;;;;;;GAOG;AACH,MAAM,MAAM,mCAAmC,GAAG,IAAI,CACpD,OAAO,yCAAyC,CAAC,KAAK,EACtD,QAAQ,CACT,GAAG;IACF,MAAM,CAAC,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;;GAMG;AACH,MAAM,MAAM,kCAAkC,GAAG,4BAA4B,CAAC"}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* @see https://docs.altinity.com/altinitykubernetesoperator/
|
|
15
15
|
*/
|
|
16
16
|
import { type } from 'arktype';
|
|
17
|
+
import { ClickHouseClusterNameSchema, ClickHouseKeeperClusterNameSchema, } from './utils/validation.js';
|
|
17
18
|
// ============================================================================
|
|
18
19
|
// Bootstrap Config (Helm Operator Install)
|
|
19
20
|
// ============================================================================
|
|
@@ -411,8 +412,12 @@ export const ClickHouseInstallationConfigSchema = type({
|
|
|
411
412
|
* SIGNOZ COMPATIBILITY: SigNoz's ClickHouse migrations hardcode the cluster
|
|
412
413
|
* name `cluster` — a SigNoz deployment pointed at this CHI only works when
|
|
413
414
|
* the default is kept. Override only for non-SigNoz consumers.
|
|
415
|
+
*
|
|
416
|
+
* CAPPED AT 15 BYTES by the Altinity CRD (`namePartClusterMaxLen`). The
|
|
417
|
+
* bound rides on the schema, and a concrete over-long value is additionally
|
|
418
|
+
* rejected at BUILD time by `assertClickHouseClusterName`.
|
|
414
419
|
*/
|
|
415
|
-
'clusterName?':
|
|
420
|
+
'clusterName?': ClickHouseClusterNameSchema,
|
|
416
421
|
/**
|
|
417
422
|
* ClickHouse server image tag (e.g. '25.12.5'). Compiled into the pod
|
|
418
423
|
* template image `clickhouse/clickhouse-server:<version>` unless `image`
|
|
@@ -518,6 +523,28 @@ export const ClickHouseKeeperInstallationConfigSchema = type({
|
|
|
518
523
|
'namespace?': 'string',
|
|
519
524
|
/** Resource ID for composition references. */
|
|
520
525
|
'id?': 'string',
|
|
526
|
+
/**
|
|
527
|
+
* Logical cluster name inside the CHK (default: the installation `name`).
|
|
528
|
+
*
|
|
529
|
+
* REQUIRED when `name` cannot be one. The Altinity CRD constrains
|
|
530
|
+
* `spec.configuration.clusters[].name` to minLength 1 / maxLength 15 /
|
|
531
|
+
* `^[a-zA-Z0-9-]{0,15}$` while `metadata.name` is uncapped — so the factory
|
|
532
|
+
* throws at BUILD time, naming the cap and suggesting
|
|
533
|
+
* `DEFAULT_CHK_CLUSTER_NAME`, rather than silently renaming the cluster
|
|
534
|
+
* (which would replace the StatefulSet and lose the keeper's coordination
|
|
535
|
+
* state).
|
|
536
|
+
*
|
|
537
|
+
* Unlike the CHI's `clusterName`, the keeper's adds no leading-letter
|
|
538
|
+
* requirement, because the keeper's generated configuration never uses the
|
|
539
|
+
* value as an XML element name — so `9keeper` and `-keeper` are fine. The one
|
|
540
|
+
* thing added to the CRD rule is AT LEAST ONE ALPHANUMERIC: the operator
|
|
541
|
+
* sanitizes the cluster name with `strings.Trim(s, "-_.")`, so an all-dash
|
|
542
|
+
* name becomes the empty string and the CHK's default PodDisruptionBudget
|
|
543
|
+
* (`chk-{chk}-{cluster}`) gets a name ending in a dash, which Kubernetes
|
|
544
|
+
* rejects. The bound rides on the schema, and a concrete illegal override is
|
|
545
|
+
* additionally rejected by `assertClickHouseKeeperClusterName`.
|
|
546
|
+
*/
|
|
547
|
+
'clusterName?': ClickHouseKeeperClusterNameSchema,
|
|
521
548
|
/** Keeper replica count (default: 1; use an odd number for quorum). */
|
|
522
549
|
'replicas?': 'number.integer',
|
|
523
550
|
/** Persistent storage for the keeper log/snapshot data. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/factories/clickhouse/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/factories/clickhouse/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,OAAO,EACL,2BAA2B,EAC3B,iCAAiC,GAClC,MAAM,uBAAuB,CAAC;AAE/B,+EAA+E;AAC/E,2CAA2C;AAC3C,+EA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C;IAC1C,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,QAAQ;QACnB,OAAO,EAAE,QAAQ;QACjB,WAAW,EAAE,QAAQ;QACrB,QAAQ,EAAE,QAAQ;QAClB,OAAO,EAAE,QAAQ;KAClB;IACD,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,gBAAgB,EAAE;IACrD,OAAO,EAAE;QACP,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,8BAA8B;QAC3C,aAAa,EAAE,QAAQ;QACvB,SAAS,EAAE,QAAQ;QACnB,uBAAuB,EAAE,SAAS;QAClC,iBAAiB,EAAE,QAAQ;KAC5B;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,QAAQ;QACnB,WAAW,EAAE,QAAQ;QACrB,aAAa,EAAE,gBAAgB;QAC/B,sBAAsB,EAAE,gBAAgB;KACzC;CACF,CAAC,CAAC;AAEH,+EAA+E;AAC/E,8CAA8C;AAC9C,+EAA+E;AAE/E;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,wCAAwC,GAAG,IAAI,CAAC;IAC3D,gCAAgC;IAChC,IAAI,EAAE,QAAQ;IACd,wBAAwB;IACxB,YAAY,EAAE,QAAQ;IACtB,8CAA8C;IAC9C,KAAK,EAAE,QAAQ;IACf;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,cAAc,EAAE,iCAAiC;IACjD,uEAAuE;IACvE,WAAW,EAAE,gBAAgB;IAC7B,2DAA2D;IAC3D,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,mBAAmB,EAAE,QAAQ;KAC9B;CACF,CAAC,CAAC"}
|
|
@@ -7,10 +7,11 @@
|
|
|
7
7
|
* zone-pinned path, the keeper compiler, and the `makeClickHouseCluster`
|
|
8
8
|
* constructor — validates counts here BEFORE emitting operator input.
|
|
9
9
|
*
|
|
10
|
-
* The cluster NAME is validated here
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
10
|
+
* The cluster NAME is validated here too, and the CHI and the CHK have
|
|
11
|
+
* SEPARATE rules: the keeper's is Altinity's alphabet and cap plus the one rule
|
|
12
|
+
* the operator's own naming requires (at least one alphanumeric), while the
|
|
13
|
+
* CHI's adds a LEADING-letter requirement that its own generated configuration
|
|
14
|
+
* demands. See the two patterns below for which is which and why.
|
|
14
15
|
*/
|
|
15
16
|
/**
|
|
16
17
|
* Assert that a topology count is a positive integer (>= 1).
|
|
@@ -41,15 +42,55 @@ export declare function assertPositiveIntegerCount(context: string, field: strin
|
|
|
41
42
|
* into a SQL string literal. A quote, a semicolon or whitespace there is not
|
|
42
43
|
* a naming problem, it is extra SQL.
|
|
43
44
|
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
45
|
+
* ONE RESTRICTION BEYOND THE CRD, AND ONLY ONE: a LEADING LETTER.
|
|
46
|
+
*
|
|
47
|
+
* The CRD's alphabet (`^[a-zA-Z0-9-]{0,15}$`) admits a leading digit and a
|
|
48
|
+
* leading dash, but the operator writes the cluster name VERBATIM AS AN XML
|
|
49
|
+
* ELEMENT NAME when it renders `remote_servers.xml`:
|
|
50
|
+
*
|
|
51
|
+
* util.Iline(b, indent, "<%s>", cluster.GetName())
|
|
52
|
+
* — pkg/model/chi/config/generator.go (release-0.27.1), the
|
|
53
|
+
* getRemoteServers cluster block
|
|
54
|
+
*
|
|
55
|
+
* Nothing escapes or sanitises that path, and an XML `NameStartChar` may be
|
|
56
|
+
* neither a digit nor a hyphen — so a cluster named `9cluster` renders
|
|
57
|
+
* `<9cluster>`, an unparseable `remote_servers.xml`, and a server that will not
|
|
58
|
+
* start. Such a name is therefore not a working deployment TypeKro is
|
|
59
|
+
* regressing; it could never have worked. The rule is kept as an INTENTIONAL
|
|
60
|
+
* TypeKro restriction on the CHI.
|
|
61
|
+
*
|
|
62
|
+
* IT DOES NOT APPLY TO THE CHK, which has its own, wider rule — see
|
|
63
|
+
* {@link CLICKHOUSE_KEEPER_CLUSTER_NAME_PATTERN}. The keeper's generator emits
|
|
64
|
+
* no element named after the cluster, so `9keeper` is legal there.
|
|
65
|
+
*
|
|
66
|
+
* The leading letter also closes, for free, the hole the CHK's rule has to
|
|
67
|
+
* close explicitly: a name this pattern accepts always has an alphanumeric, so
|
|
68
|
+
* it can never be ALL DASHES, can never sanitize to the empty string through
|
|
69
|
+
* the operator's `strings.Trim(s, "-_.")`, and can never generate an object
|
|
70
|
+
* name ending in a dash.
|
|
71
|
+
*
|
|
72
|
+
* This pattern is also the one the backup CronJob's in-container guard mirrors,
|
|
73
|
+
* because the `ON CLUSTER` target is a CHI cluster name.
|
|
74
|
+
*
|
|
75
|
+
* A TRAILING dash is ALLOWED, matching the CRD. `-` is a legal XML `NameChar`
|
|
76
|
+
* everywhere but the first position, and `chi-<chi>-<cluster>--0-0` is still a
|
|
77
|
+
* valid DNS-1123 label, so the prohibition this rule used to carry was
|
|
78
|
+
* cosmetic.
|
|
48
79
|
*
|
|
49
80
|
* RE2-compatible on purpose: the same source is the `pattern=` marker of the
|
|
50
81
|
* generated KRO schema, and Kubernetes validates OpenAPI patterns with RE2.
|
|
51
82
|
*/
|
|
52
83
|
export declare const CLICKHOUSE_CLUSTER_NAME_PATTERN: RegExp;
|
|
84
|
+
/**
|
|
85
|
+
* The CRD's own byte cap on a cluster name (`namePartClusterMaxLen`).
|
|
86
|
+
*
|
|
87
|
+
* The identical 15-byte cap — with `minLength: 1` and the same pattern —
|
|
88
|
+
* applies to the shard name, the replica name and
|
|
89
|
+
* `spec.templates.hostTemplates[].spec.name` (the generated host's name), on
|
|
90
|
+
* the CHI, the CHIT and the CHK alike. TypeKro emits none of those today. Pod,
|
|
91
|
+
* volume-claim and service TEMPLATE names carry no cap in the CRD.
|
|
92
|
+
*/
|
|
93
|
+
export declare const CLICKHOUSE_CLUSTER_NAME_MAX_BYTES = 15;
|
|
53
94
|
/**
|
|
54
95
|
* ArkType schema for a runtime `clusterName`.
|
|
55
96
|
*
|
|
@@ -61,8 +102,60 @@ export declare const CLICKHOUSE_CLUSTER_NAME_PATTERN: RegExp;
|
|
|
61
102
|
*/
|
|
62
103
|
export declare const ClickHouseClusterNameSchema: import("arktype/internal/variants/string.ts").StringType<string, {}>;
|
|
63
104
|
/**
|
|
64
|
-
*
|
|
65
|
-
*
|
|
105
|
+
* Characters a KEEPER (CHK) cluster name may use — the Altinity CRD's alphabet,
|
|
106
|
+
* plus the ONE rule the operator's own naming requires: AT LEAST ONE
|
|
107
|
+
* ALPHANUMERIC.
|
|
108
|
+
*
|
|
109
|
+
* DELIBERATELY WIDER THAN {@link CLICKHOUSE_CLUSTER_NAME_PATTERN}, because the
|
|
110
|
+
* justification for the CHI's extra LEADING-LETTER rule does not exist here.
|
|
111
|
+
* The CHI generator renders the cluster name as a raw XML element name
|
|
112
|
+
* (`util.Iline(b, indent, "<%s>", cluster.GetName())` in
|
|
113
|
+
* `pkg/model/chi/config/generator.go`), so `9cluster` would produce
|
|
114
|
+
* `<9cluster>` and an unparseable `remote_servers.xml`. The KEEPER generator
|
|
115
|
+
* emits no such element: its configuration is
|
|
116
|
+
* `<server><id>…</id><hostname>…</hostname><port>…</port></server>` built from
|
|
117
|
+
* HOST names (`pkg/model/chk/config/generator.go`, `getRaftConfig`), and the
|
|
118
|
+
* cluster name reaches only the sanitized `MacrosClusterName` that feeds
|
|
119
|
+
* generated StatefulSet / Service / ConfigMap names, where a leading digit is
|
|
120
|
+
* a perfectly good DNS-1123 label. So a CHK named `9keeper` was valid upstream
|
|
121
|
+
* and stays valid here, and `-keeper`, `keeper-` and `2024` do too.
|
|
122
|
+
*
|
|
123
|
+
* THE ONE ADDITION: AT LEAST ONE LETTER OR DIGIT. An ALL-DASH name (`-`,
|
|
124
|
+
* `---`) satisfies the CRD's `^[a-zA-Z0-9-]{0,15}$`, so admission accepts it,
|
|
125
|
+
* and the object can then never reconcile. The operator runs the cluster name
|
|
126
|
+
* through its short-name sanitizer, `strings.Trim(s, "-_.")`, which strips
|
|
127
|
+
* every leading and trailing `-`, `_` and `.` — an all-dash name sanitizes to
|
|
128
|
+
* the EMPTY string. The CHK defaults `pdbManaged` to true and names the
|
|
129
|
+
* PodDisruptionBudget it creates by the pattern `chk-{chk}-{cluster}`, so the
|
|
130
|
+
* empty sanitized cluster yields `chk-keeper-`: a name ending in a dash, which
|
|
131
|
+
* is not a valid DNS-1123 subdomain and is rejected as Kubernetes metadata.
|
|
132
|
+
* Requiring one alphanumeric is therefore not TypeKro tightening Altinity's
|
|
133
|
+
* contract for taste — it is the smallest rule that keeps the operator's own
|
|
134
|
+
* generated names legal.
|
|
135
|
+
*
|
|
136
|
+
* THE 15-BYTE CAP LIVES SEPARATELY, in
|
|
137
|
+
* {@link CLICKHOUSE_CLUSTER_NAME_MAX_BYTES}: this pattern carries the alphabet
|
|
138
|
+
* only, {@link ClickHouseKeeperClusterNameSchema} adds the bound for the
|
|
139
|
+
* generated RGD, and {@link assertClickHouseKeeperClusterName} checks it
|
|
140
|
+
* alongside the pattern for a concrete value.
|
|
141
|
+
*
|
|
142
|
+
* RE2-compatible (no lookahead), for the same reason as the CHI pattern.
|
|
143
|
+
*/
|
|
144
|
+
export declare const CLICKHOUSE_KEEPER_CLUSTER_NAME_PATTERN: RegExp;
|
|
145
|
+
/**
|
|
146
|
+
* ArkType schema for a runtime CHK `clusterName`.
|
|
147
|
+
*
|
|
148
|
+
* Carries the keeper's own bound into a generated RGD, the way
|
|
149
|
+
* {@link ClickHouseClusterNameSchema} does for the CHI. The pattern holds the
|
|
150
|
+
* alphabet, the `string <= 15` half holds the CRD's cap.
|
|
151
|
+
*/
|
|
152
|
+
export declare const ClickHouseKeeperClusterNameSchema: import("arktype/internal/variants/string.ts").StringType<string, {}>;
|
|
153
|
+
/**
|
|
154
|
+
* Assert that a CONCRETE **CHI** cluster name is safe to compile into operator
|
|
155
|
+
* input and into the `ON CLUSTER` clause.
|
|
156
|
+
*
|
|
157
|
+
* The CHK has its own, wider rule — see
|
|
158
|
+
* {@link assertClickHouseKeeperClusterName}.
|
|
66
159
|
*
|
|
67
160
|
* Only meaningful for literals: in kro mode `spec.clusterName` arrives as a
|
|
68
161
|
* schema reference, and {@link ClickHouseClusterNameSchema} carries the same
|
|
@@ -76,6 +169,36 @@ export declare const ClickHouseClusterNameSchema: import("arktype/internal/varia
|
|
|
76
169
|
* concrete string does not match {@link CLICKHOUSE_CLUSTER_NAME_PATTERN}
|
|
77
170
|
*/
|
|
78
171
|
export declare function assertClickHouseClusterName(context: string, field: string, value: unknown): void;
|
|
172
|
+
/**
|
|
173
|
+
* Assert that a CONCRETE **CHK** cluster name is legal operator input.
|
|
174
|
+
*
|
|
175
|
+
* This is the Altinity CRD's alphabet and 15-byte cap, plus the one rule the
|
|
176
|
+
* operator's own naming requires — at least one alphanumeric — and none of the
|
|
177
|
+
* CHI's extra leading-letter rule, because the keeper's generator never renders
|
|
178
|
+
* the cluster name as an XML element name (see
|
|
179
|
+
* {@link CLICKHOUSE_KEEPER_CLUSTER_NAME_PATTERN}). `9keeper` is therefore
|
|
180
|
+
* accepted here and rejected by {@link assertClickHouseClusterName}, and that
|
|
181
|
+
* difference is the point; an ALL-DASH name is rejected by both, because the
|
|
182
|
+
* operator's short-name sanitizer would reduce it to the empty string and the
|
|
183
|
+
* generated PDB name would end in a dash.
|
|
184
|
+
*
|
|
185
|
+
* The pattern carries no length bound, so the cap is checked here explicitly
|
|
186
|
+
* against {@link CLICKHOUSE_CLUSTER_NAME_MAX_BYTES}.
|
|
187
|
+
*
|
|
188
|
+
* Only meaningful for literals, like its CHI counterpart: a schema reference is
|
|
189
|
+
* bounded by {@link ClickHouseKeeperClusterNameSchema} in the generated RGD
|
|
190
|
+
* instead.
|
|
191
|
+
*
|
|
192
|
+
* @param context - The entry point name for the error message
|
|
193
|
+
* @param field - The offending config field (e.g. `clusterName`)
|
|
194
|
+
* @param value - The value received; non-strings are ignored (they are
|
|
195
|
+
* references, validated by KRO instead)
|
|
196
|
+
* @throws Error naming the entry point, field, and received value when a
|
|
197
|
+
* concrete string does not match
|
|
198
|
+
* {@link CLICKHOUSE_KEEPER_CLUSTER_NAME_PATTERN} or exceeds
|
|
199
|
+
* {@link CLICKHOUSE_CLUSTER_NAME_MAX_BYTES}
|
|
200
|
+
*/
|
|
201
|
+
export declare function assertClickHouseKeeperClusterName(context: string, field: string, value: unknown): void;
|
|
79
202
|
/**
|
|
80
203
|
* Characters a value may use when it becomes a ClickHouse configuration
|
|
81
204
|
* IDENTIFIER — a bare `<name>` element inside a server-configuration document.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../../src/factories/clickhouse/utils/validation.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../../src/factories/clickhouse/utils/validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,GACZ,IAAI,CAQN;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,eAAO,MAAM,+BAA+B,QAAiC,CAAC;AAE9E;;;;;;;;GAQG;AACH,eAAO,MAAM,iCAAiC,KAAK,CAAC;AAEpD;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B,sEAEvC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,sCAAsC,QAA4C,CAAC;AAEhG;;;;;;GAMG;AACH,eAAO,MAAM,iCAAiC,sEAE7C,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,OAAO,GACb,IAAI,CAcN;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,OAAO,GACb,IAAI,CAyBN;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,6BAA6B,QAA6B,CAAC;AAExE;;;;;;;GAOG;AACH,eAAO,MAAM,gCAAgC,KAAK,CAAC;AAEnD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAiB/F"}
|
|
@@ -7,10 +7,11 @@
|
|
|
7
7
|
* zone-pinned path, the keeper compiler, and the `makeClickHouseCluster`
|
|
8
8
|
* constructor — validates counts here BEFORE emitting operator input.
|
|
9
9
|
*
|
|
10
|
-
* The cluster NAME is validated here
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
10
|
+
* The cluster NAME is validated here too, and the CHI and the CHK have
|
|
11
|
+
* SEPARATE rules: the keeper's is Altinity's alphabet and cap plus the one rule
|
|
12
|
+
* the operator's own naming requires (at least one alphanumeric), while the
|
|
13
|
+
* CHI's adds a LEADING-letter requirement that its own generated configuration
|
|
14
|
+
* demands. See the two patterns below for which is which and why.
|
|
14
15
|
*/
|
|
15
16
|
import { type } from 'arktype';
|
|
16
17
|
/**
|
|
@@ -48,15 +49,55 @@ export function assertPositiveIntegerCount(context, field, value) {
|
|
|
48
49
|
* into a SQL string literal. A quote, a semicolon or whitespace there is not
|
|
49
50
|
* a naming problem, it is extra SQL.
|
|
50
51
|
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
52
|
+
* ONE RESTRICTION BEYOND THE CRD, AND ONLY ONE: a LEADING LETTER.
|
|
53
|
+
*
|
|
54
|
+
* The CRD's alphabet (`^[a-zA-Z0-9-]{0,15}$`) admits a leading digit and a
|
|
55
|
+
* leading dash, but the operator writes the cluster name VERBATIM AS AN XML
|
|
56
|
+
* ELEMENT NAME when it renders `remote_servers.xml`:
|
|
57
|
+
*
|
|
58
|
+
* util.Iline(b, indent, "<%s>", cluster.GetName())
|
|
59
|
+
* — pkg/model/chi/config/generator.go (release-0.27.1), the
|
|
60
|
+
* getRemoteServers cluster block
|
|
61
|
+
*
|
|
62
|
+
* Nothing escapes or sanitises that path, and an XML `NameStartChar` may be
|
|
63
|
+
* neither a digit nor a hyphen — so a cluster named `9cluster` renders
|
|
64
|
+
* `<9cluster>`, an unparseable `remote_servers.xml`, and a server that will not
|
|
65
|
+
* start. Such a name is therefore not a working deployment TypeKro is
|
|
66
|
+
* regressing; it could never have worked. The rule is kept as an INTENTIONAL
|
|
67
|
+
* TypeKro restriction on the CHI.
|
|
68
|
+
*
|
|
69
|
+
* IT DOES NOT APPLY TO THE CHK, which has its own, wider rule — see
|
|
70
|
+
* {@link CLICKHOUSE_KEEPER_CLUSTER_NAME_PATTERN}. The keeper's generator emits
|
|
71
|
+
* no element named after the cluster, so `9keeper` is legal there.
|
|
72
|
+
*
|
|
73
|
+
* The leading letter also closes, for free, the hole the CHK's rule has to
|
|
74
|
+
* close explicitly: a name this pattern accepts always has an alphanumeric, so
|
|
75
|
+
* it can never be ALL DASHES, can never sanitize to the empty string through
|
|
76
|
+
* the operator's `strings.Trim(s, "-_.")`, and can never generate an object
|
|
77
|
+
* name ending in a dash.
|
|
78
|
+
*
|
|
79
|
+
* This pattern is also the one the backup CronJob's in-container guard mirrors,
|
|
80
|
+
* because the `ON CLUSTER` target is a CHI cluster name.
|
|
81
|
+
*
|
|
82
|
+
* A TRAILING dash is ALLOWED, matching the CRD. `-` is a legal XML `NameChar`
|
|
83
|
+
* everywhere but the first position, and `chi-<chi>-<cluster>--0-0` is still a
|
|
84
|
+
* valid DNS-1123 label, so the prohibition this rule used to carry was
|
|
85
|
+
* cosmetic.
|
|
55
86
|
*
|
|
56
87
|
* RE2-compatible on purpose: the same source is the `pattern=` marker of the
|
|
57
88
|
* generated KRO schema, and Kubernetes validates OpenAPI patterns with RE2.
|
|
58
89
|
*/
|
|
59
|
-
export const CLICKHOUSE_CLUSTER_NAME_PATTERN = /^[a-zA-Z]
|
|
90
|
+
export const CLICKHOUSE_CLUSTER_NAME_PATTERN = /^[a-zA-Z][a-zA-Z0-9-]{0,14}$/;
|
|
91
|
+
/**
|
|
92
|
+
* The CRD's own byte cap on a cluster name (`namePartClusterMaxLen`).
|
|
93
|
+
*
|
|
94
|
+
* The identical 15-byte cap — with `minLength: 1` and the same pattern —
|
|
95
|
+
* applies to the shard name, the replica name and
|
|
96
|
+
* `spec.templates.hostTemplates[].spec.name` (the generated host's name), on
|
|
97
|
+
* the CHI, the CHIT and the CHK alike. TypeKro emits none of those today. Pod,
|
|
98
|
+
* volume-claim and service TEMPLATE names carry no cap in the CRD.
|
|
99
|
+
*/
|
|
100
|
+
export const CLICKHOUSE_CLUSTER_NAME_MAX_BYTES = 15;
|
|
60
101
|
/**
|
|
61
102
|
* ArkType schema for a runtime `clusterName`.
|
|
62
103
|
*
|
|
@@ -68,8 +109,60 @@ export const CLICKHOUSE_CLUSTER_NAME_PATTERN = /^[a-zA-Z]([a-zA-Z0-9-]{0,13}[a-z
|
|
|
68
109
|
*/
|
|
69
110
|
export const ClickHouseClusterNameSchema = type(CLICKHOUSE_CLUSTER_NAME_PATTERN).and('string <= 15');
|
|
70
111
|
/**
|
|
71
|
-
*
|
|
72
|
-
*
|
|
112
|
+
* Characters a KEEPER (CHK) cluster name may use — the Altinity CRD's alphabet,
|
|
113
|
+
* plus the ONE rule the operator's own naming requires: AT LEAST ONE
|
|
114
|
+
* ALPHANUMERIC.
|
|
115
|
+
*
|
|
116
|
+
* DELIBERATELY WIDER THAN {@link CLICKHOUSE_CLUSTER_NAME_PATTERN}, because the
|
|
117
|
+
* justification for the CHI's extra LEADING-LETTER rule does not exist here.
|
|
118
|
+
* The CHI generator renders the cluster name as a raw XML element name
|
|
119
|
+
* (`util.Iline(b, indent, "<%s>", cluster.GetName())` in
|
|
120
|
+
* `pkg/model/chi/config/generator.go`), so `9cluster` would produce
|
|
121
|
+
* `<9cluster>` and an unparseable `remote_servers.xml`. The KEEPER generator
|
|
122
|
+
* emits no such element: its configuration is
|
|
123
|
+
* `<server><id>…</id><hostname>…</hostname><port>…</port></server>` built from
|
|
124
|
+
* HOST names (`pkg/model/chk/config/generator.go`, `getRaftConfig`), and the
|
|
125
|
+
* cluster name reaches only the sanitized `MacrosClusterName` that feeds
|
|
126
|
+
* generated StatefulSet / Service / ConfigMap names, where a leading digit is
|
|
127
|
+
* a perfectly good DNS-1123 label. So a CHK named `9keeper` was valid upstream
|
|
128
|
+
* and stays valid here, and `-keeper`, `keeper-` and `2024` do too.
|
|
129
|
+
*
|
|
130
|
+
* THE ONE ADDITION: AT LEAST ONE LETTER OR DIGIT. An ALL-DASH name (`-`,
|
|
131
|
+
* `---`) satisfies the CRD's `^[a-zA-Z0-9-]{0,15}$`, so admission accepts it,
|
|
132
|
+
* and the object can then never reconcile. The operator runs the cluster name
|
|
133
|
+
* through its short-name sanitizer, `strings.Trim(s, "-_.")`, which strips
|
|
134
|
+
* every leading and trailing `-`, `_` and `.` — an all-dash name sanitizes to
|
|
135
|
+
* the EMPTY string. The CHK defaults `pdbManaged` to true and names the
|
|
136
|
+
* PodDisruptionBudget it creates by the pattern `chk-{chk}-{cluster}`, so the
|
|
137
|
+
* empty sanitized cluster yields `chk-keeper-`: a name ending in a dash, which
|
|
138
|
+
* is not a valid DNS-1123 subdomain and is rejected as Kubernetes metadata.
|
|
139
|
+
* Requiring one alphanumeric is therefore not TypeKro tightening Altinity's
|
|
140
|
+
* contract for taste — it is the smallest rule that keeps the operator's own
|
|
141
|
+
* generated names legal.
|
|
142
|
+
*
|
|
143
|
+
* THE 15-BYTE CAP LIVES SEPARATELY, in
|
|
144
|
+
* {@link CLICKHOUSE_CLUSTER_NAME_MAX_BYTES}: this pattern carries the alphabet
|
|
145
|
+
* only, {@link ClickHouseKeeperClusterNameSchema} adds the bound for the
|
|
146
|
+
* generated RGD, and {@link assertClickHouseKeeperClusterName} checks it
|
|
147
|
+
* alongside the pattern for a concrete value.
|
|
148
|
+
*
|
|
149
|
+
* RE2-compatible (no lookahead), for the same reason as the CHI pattern.
|
|
150
|
+
*/
|
|
151
|
+
export const CLICKHOUSE_KEEPER_CLUSTER_NAME_PATTERN = /^[A-Za-z0-9-]*[A-Za-z0-9][A-Za-z0-9-]*$/;
|
|
152
|
+
/**
|
|
153
|
+
* ArkType schema for a runtime CHK `clusterName`.
|
|
154
|
+
*
|
|
155
|
+
* Carries the keeper's own bound into a generated RGD, the way
|
|
156
|
+
* {@link ClickHouseClusterNameSchema} does for the CHI. The pattern holds the
|
|
157
|
+
* alphabet, the `string <= 15` half holds the CRD's cap.
|
|
158
|
+
*/
|
|
159
|
+
export const ClickHouseKeeperClusterNameSchema = type(CLICKHOUSE_KEEPER_CLUSTER_NAME_PATTERN).and('string <= 15');
|
|
160
|
+
/**
|
|
161
|
+
* Assert that a CONCRETE **CHI** cluster name is safe to compile into operator
|
|
162
|
+
* input and into the `ON CLUSTER` clause.
|
|
163
|
+
*
|
|
164
|
+
* The CHK has its own, wider rule — see
|
|
165
|
+
* {@link assertClickHouseKeeperClusterName}.
|
|
73
166
|
*
|
|
74
167
|
* Only meaningful for literals: in kro mode `spec.clusterName` arrives as a
|
|
75
168
|
* schema reference, and {@link ClickHouseClusterNameSchema} carries the same
|
|
@@ -87,13 +180,67 @@ export function assertClickHouseClusterName(context, field, value) {
|
|
|
87
180
|
return;
|
|
88
181
|
if (CLICKHOUSE_CLUSTER_NAME_PATTERN.test(value))
|
|
89
182
|
return;
|
|
90
|
-
throw new Error(`${context}: '${field}' must match ${CLICKHOUSE_CLUSTER_NAME_PATTERN.source} — a
|
|
91
|
-
`then up to
|
|
92
|
-
`${JSON.stringify(value)}). The
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
`
|
|
96
|
-
|
|
183
|
+
throw new Error(`${context}: '${field}' must match ${CLICKHOUSE_CLUSTER_NAME_PATTERN.source} — a LETTER, ` +
|
|
184
|
+
`then up to ${CLICKHOUSE_CLUSTER_NAME_MAX_BYTES - 1} more letters, digits or dashes (got ` +
|
|
185
|
+
`${JSON.stringify(value)}). The alphabet and the ${CLICKHOUSE_CLUSTER_NAME_MAX_BYTES}-byte ` +
|
|
186
|
+
`cap are the Altinity CRD's own \`^[a-zA-Z0-9-]{0,15}\$\` / minLength 1 / maxLength 15 on ` +
|
|
187
|
+
`\`clusters[].name\`; the leading-letter rule is TypeKro's one addition, because the ` +
|
|
188
|
+
`operator writes the cluster name verbatim as an XML ELEMENT NAME in ` +
|
|
189
|
+
`\`remote_servers.xml\` (pkg/model/chi/config/generator.go: \`Iline(b, indent, "<%s>", ` +
|
|
190
|
+
`cluster.GetName())\`) and an XML name may not begin with a digit or a dash — the server ` +
|
|
191
|
+
`would fail to parse its own configuration. A trailing dash is fine.`);
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Assert that a CONCRETE **CHK** cluster name is legal operator input.
|
|
195
|
+
*
|
|
196
|
+
* This is the Altinity CRD's alphabet and 15-byte cap, plus the one rule the
|
|
197
|
+
* operator's own naming requires — at least one alphanumeric — and none of the
|
|
198
|
+
* CHI's extra leading-letter rule, because the keeper's generator never renders
|
|
199
|
+
* the cluster name as an XML element name (see
|
|
200
|
+
* {@link CLICKHOUSE_KEEPER_CLUSTER_NAME_PATTERN}). `9keeper` is therefore
|
|
201
|
+
* accepted here and rejected by {@link assertClickHouseClusterName}, and that
|
|
202
|
+
* difference is the point; an ALL-DASH name is rejected by both, because the
|
|
203
|
+
* operator's short-name sanitizer would reduce it to the empty string and the
|
|
204
|
+
* generated PDB name would end in a dash.
|
|
205
|
+
*
|
|
206
|
+
* The pattern carries no length bound, so the cap is checked here explicitly
|
|
207
|
+
* against {@link CLICKHOUSE_CLUSTER_NAME_MAX_BYTES}.
|
|
208
|
+
*
|
|
209
|
+
* Only meaningful for literals, like its CHI counterpart: a schema reference is
|
|
210
|
+
* bounded by {@link ClickHouseKeeperClusterNameSchema} in the generated RGD
|
|
211
|
+
* instead.
|
|
212
|
+
*
|
|
213
|
+
* @param context - The entry point name for the error message
|
|
214
|
+
* @param field - The offending config field (e.g. `clusterName`)
|
|
215
|
+
* @param value - The value received; non-strings are ignored (they are
|
|
216
|
+
* references, validated by KRO instead)
|
|
217
|
+
* @throws Error naming the entry point, field, and received value when a
|
|
218
|
+
* concrete string does not match
|
|
219
|
+
* {@link CLICKHOUSE_KEEPER_CLUSTER_NAME_PATTERN} or exceeds
|
|
220
|
+
* {@link CLICKHOUSE_CLUSTER_NAME_MAX_BYTES}
|
|
221
|
+
*/
|
|
222
|
+
export function assertClickHouseKeeperClusterName(context, field, value) {
|
|
223
|
+
if (typeof value !== 'string')
|
|
224
|
+
return;
|
|
225
|
+
if (CLICKHOUSE_KEEPER_CLUSTER_NAME_PATTERN.test(value) &&
|
|
226
|
+
Buffer.byteLength(value, 'utf8') <= CLICKHOUSE_CLUSTER_NAME_MAX_BYTES) {
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
throw new Error(`${context}: '${field}' must match ${CLICKHOUSE_KEEPER_CLUSTER_NAME_PATTERN.source} and be at ` +
|
|
230
|
+
`most ${CLICKHOUSE_CLUSTER_NAME_MAX_BYTES} bytes — one to ` +
|
|
231
|
+
`${CLICKHOUSE_CLUSTER_NAME_MAX_BYTES} letters, digits or dashes, WITH AT LEAST ONE LETTER ` +
|
|
232
|
+
`OR DIGIT (got ${JSON.stringify(value)}). The alphabet and the cap are the Altinity CRD's ` +
|
|
233
|
+
`own rule for \`spec.configuration.clusters[].name\` on the ClickHouseKeeperInstallation — ` +
|
|
234
|
+
`\`^[a-zA-Z0-9-]{0,15}\$\` with minLength 1 and maxLength 15 ` +
|
|
235
|
+
`(\`See namePartClusterMaxLen const\`). The at-least-one-alphanumeric rule is the only ` +
|
|
236
|
+
`addition, and the operator's own naming requires it: the operator passes the cluster name ` +
|
|
237
|
+
`through its short-name sanitizer, \`strings.Trim(s, "-_.")\`, which strips every leading ` +
|
|
238
|
+
`and trailing \`-\`, \`_\` and \`.\`, so an all-dash name sanitizes to the EMPTY string — ` +
|
|
239
|
+
`and the CHK (whose \`pdbManaged\` defaults to true) then creates a PodDisruptionBudget ` +
|
|
240
|
+
`named \`chk-{chk}-{cluster}\`, e.g. \`chk-keeper-\`, which ends in a dash and is not valid ` +
|
|
241
|
+
`Kubernetes metadata, so such a keeper can never reconcile. Unlike the CHI, the keeper's ` +
|
|
242
|
+
`generated configuration never uses the value as an XML element name, so a LEADING digit ` +
|
|
243
|
+
`or dash is fine here.`);
|
|
97
244
|
}
|
|
98
245
|
/**
|
|
99
246
|
* Characters a value may use when it becomes a ClickHouse configuration
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../../src/factories/clickhouse/utils/validation.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../../src/factories/clickhouse/utils/validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B;;;;;;;;;GASG;AACH,MAAM,UAAU,0BAA0B,CACxC,OAAe,EACf,KAAa,EACb,KAAa;IAEb,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;QAC1C,MAAM,IAAI,KAAK,CACb,GAAG,OAAO,MAAM,KAAK,qCAAqC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK;YAClF,uEAAuE;YACvE,OAAO,KAAK,mDAAmD,CAClE,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;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/
|
|
78
78
|
import { type ClickStackInlineExternalMongoBuildOptions, type ClickStackInlineInternalMongoBuildOptions, type ClickStackSecretValuesExternalMongoBuildOptions, type ClickStackSecretValuesInternalMongoBuildOptions } from '../types.js';
|
|
79
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* Suffix of the contract ConfigMap's name (`<release>-contract`).
|
|
81
|
+
*
|
|
82
|
+
* THIS COMPOSITION IS THE SOLE DECLARER of `<release>-contract`. The ClickHouse
|
|
83
|
+
* cluster composition used to append the same bare `-contract` to its
|
|
84
|
+
* installation name, so a stack that named its ClickHouse cluster and its
|
|
85
|
+
* ClickStack release after the stack put two independently-owned ConfigMaps on
|
|
86
|
+
* one `(kind, namespace, name)` and KRO refused the second instance with
|
|
87
|
+
* `resource belongs to a different ApplySet … cannot reassign`. That one is now
|
|
88
|
+
* `<installation>-clickhouse-contract`; this name and its keys are unchanged.
|
|
89
|
+
*
|
|
90
|
+
* Any new contract ConfigMap in a composition that can share a namespace and a
|
|
91
|
+
* name with these must be component-scoped the same way —
|
|
92
|
+
* `assertNoDuplicateDeclarations` in the test utilities is the guard.
|
|
93
|
+
*/
|
|
80
94
|
export declare const CLICKSTACK_CONTRACT_CONFIGMAP_SUFFIX = "-contract";
|
|
81
95
|
declare function buildInternalInlineComposition(options: ClickStackInlineInternalMongoBuildOptions): import("../../../index.js").CallableComposition<{
|
|
82
96
|
apiKey: string;
|