typekro 0.5.0 → 0.8.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 +1 -1
- package/dist/compositions/typekro-runtime/typekro-runtime.d.ts.map +1 -1
- package/dist/compositions/typekro-runtime/typekro-runtime.js +16 -2
- package/dist/compositions/typekro-runtime/typekro-runtime.js.map +1 -1
- package/dist/core/composition/context.d.ts +14 -0
- package/dist/core/composition/context.d.ts.map +1 -1
- package/dist/core/composition/context.js.map +1 -1
- package/dist/core/composition/imperative.d.ts.map +1 -1
- package/dist/core/composition/imperative.js +59 -30
- package/dist/core/composition/imperative.js.map +1 -1
- package/dist/core/composition/nested-status-cel.d.ts +50 -0
- package/dist/core/composition/nested-status-cel.d.ts.map +1 -0
- package/dist/core/composition/nested-status-cel.js +169 -0
- package/dist/core/composition/nested-status-cel.js.map +1 -0
- package/dist/core/constants/brands.d.ts +1 -1
- package/dist/core/constants/brands.d.ts.map +1 -1
- package/dist/core/constants/brands.js +1 -1
- package/dist/core/constants/brands.js.map +1 -1
- package/dist/core/containers/build.d.ts +50 -0
- package/dist/core/containers/build.d.ts.map +1 -0
- package/dist/core/containers/build.js +146 -0
- package/dist/core/containers/build.js.map +1 -0
- package/dist/core/containers/errors.d.ts +14 -0
- package/dist/core/containers/errors.d.ts.map +1 -0
- package/dist/core/containers/errors.js +48 -0
- package/dist/core/containers/errors.js.map +1 -0
- package/dist/core/containers/exec.d.ts +36 -0
- package/dist/core/containers/exec.d.ts.map +1 -0
- package/dist/core/containers/exec.js +110 -0
- package/dist/core/containers/exec.js.map +1 -0
- package/dist/core/containers/index.d.ts +21 -0
- package/dist/core/containers/index.d.ts.map +1 -0
- package/dist/core/containers/index.js +20 -0
- package/dist/core/containers/index.js.map +1 -0
- package/dist/core/containers/registries/ecr.d.ts +22 -0
- package/dist/core/containers/registries/ecr.d.ts.map +1 -0
- package/dist/core/containers/registries/ecr.js +118 -0
- package/dist/core/containers/registries/ecr.js.map +1 -0
- package/dist/core/containers/registries/index.d.ts +9 -0
- package/dist/core/containers/registries/index.d.ts.map +1 -0
- package/dist/core/containers/registries/index.js +23 -0
- package/dist/core/containers/registries/index.js.map +1 -0
- package/dist/core/containers/registries/orbstack.d.ts +14 -0
- package/dist/core/containers/registries/orbstack.d.ts.map +1 -0
- package/dist/core/containers/registries/orbstack.js +24 -0
- package/dist/core/containers/registries/orbstack.js.map +1 -0
- package/dist/core/containers/registries/types.d.ts +94 -0
- package/dist/core/containers/registries/types.d.ts.map +1 -0
- package/dist/core/containers/registries/types.js +11 -0
- package/dist/core/containers/registries/types.js.map +1 -0
- package/dist/core/dependencies/graph.d.ts +4 -0
- package/dist/core/dependencies/graph.d.ts.map +1 -1
- package/dist/core/dependencies/graph.js +6 -0
- package/dist/core/dependencies/graph.js.map +1 -1
- package/dist/core/dependencies/resolver.d.ts +28 -0
- package/dist/core/dependencies/resolver.d.ts.map +1 -1
- package/dist/core/dependencies/resolver.js +138 -5
- package/dist/core/dependencies/resolver.js.map +1 -1
- package/dist/core/deployment/direct-factory.d.ts +13 -0
- package/dist/core/deployment/direct-factory.d.ts.map +1 -1
- package/dist/core/deployment/direct-factory.js +99 -0
- package/dist/core/deployment/direct-factory.js.map +1 -1
- package/dist/core/deployment/engine.d.ts.map +1 -1
- package/dist/core/deployment/engine.js +45 -2
- package/dist/core/deployment/engine.js.map +1 -1
- package/dist/core/deployment/kro-factory.d.ts +28 -0
- package/dist/core/deployment/kro-factory.d.ts.map +1 -1
- package/dist/core/deployment/kro-factory.js +243 -13
- package/dist/core/deployment/kro-factory.js.map +1 -1
- package/dist/core/deployment/kro-readiness.d.ts.map +1 -1
- package/dist/core/deployment/kro-readiness.js +10 -1
- package/dist/core/deployment/kro-readiness.js.map +1 -1
- package/dist/core/deployment/nested-composition-status.d.ts +33 -0
- package/dist/core/deployment/nested-composition-status.d.ts.map +1 -0
- package/dist/core/deployment/nested-composition-status.js +101 -0
- package/dist/core/deployment/nested-composition-status.js.map +1 -0
- package/dist/core/deployment/readiness-waiter.d.ts.map +1 -1
- package/dist/core/deployment/readiness-waiter.js +23 -6
- package/dist/core/deployment/readiness-waiter.js.map +1 -1
- package/dist/core/deployment/rollback-manager.d.ts.map +1 -1
- package/dist/core/deployment/rollback-manager.js +19 -0
- package/dist/core/deployment/rollback-manager.js.map +1 -1
- package/dist/core/deployment/strategies/direct-strategy.d.ts +6 -0
- package/dist/core/deployment/strategies/direct-strategy.d.ts.map +1 -1
- package/dist/core/deployment/strategies/direct-strategy.js +133 -35
- package/dist/core/deployment/strategies/direct-strategy.js.map +1 -1
- package/dist/core/expressions/composition/composition-analyzer-helpers.d.ts +8 -2
- package/dist/core/expressions/composition/composition-analyzer-helpers.d.ts.map +1 -1
- package/dist/core/expressions/composition/composition-analyzer-helpers.js +34 -2
- package/dist/core/expressions/composition/composition-analyzer-helpers.js.map +1 -1
- package/dist/core/expressions/composition/composition-analyzer-ternary.d.ts.map +1 -1
- package/dist/core/expressions/composition/composition-analyzer-ternary.js +52 -28
- package/dist/core/expressions/composition/composition-analyzer-ternary.js.map +1 -1
- package/dist/core/expressions/composition/composition-analyzer-traversal.d.ts.map +1 -1
- package/dist/core/expressions/composition/composition-analyzer-traversal.js +11 -4
- package/dist/core/expressions/composition/composition-analyzer-traversal.js.map +1 -1
- package/dist/core/expressions/composition/composition-analyzer-types.d.ts +8 -0
- package/dist/core/expressions/composition/composition-analyzer-types.d.ts.map +1 -1
- package/dist/core/expressions/composition/composition-analyzer.d.ts +1 -1
- package/dist/core/expressions/composition/composition-analyzer.d.ts.map +1 -1
- package/dist/core/expressions/composition/composition-analyzer.js +8 -2
- package/dist/core/expressions/composition/composition-analyzer.js.map +1 -1
- package/dist/core/expressions/composition/imperative-analyzer.d.ts +8 -0
- package/dist/core/expressions/composition/imperative-analyzer.d.ts.map +1 -1
- package/dist/core/expressions/composition/imperative-analyzer.js +111 -16
- package/dist/core/expressions/composition/imperative-analyzer.js.map +1 -1
- package/dist/core/metadata/resource-metadata.d.ts +4 -0
- package/dist/core/metadata/resource-metadata.d.ts.map +1 -1
- package/dist/core/metadata/resource-metadata.js.map +1 -1
- package/dist/core/proxy/create-resource.d.ts.map +1 -1
- package/dist/core/proxy/create-resource.js +63 -21
- package/dist/core/proxy/create-resource.js.map +1 -1
- package/dist/core/references/cel.d.ts +48 -0
- package/dist/core/references/cel.d.ts.map +1 -1
- package/dist/core/references/cel.js +82 -0
- package/dist/core/references/cel.js.map +1 -1
- package/dist/core/references/external-refs.d.ts +2 -0
- package/dist/core/references/external-refs.d.ts.map +1 -1
- package/dist/core/references/external-refs.js +3 -0
- package/dist/core/references/external-refs.js.map +1 -1
- package/dist/core/references/resolver.d.ts +12 -4
- package/dist/core/references/resolver.d.ts.map +1 -1
- package/dist/core/references/resolver.js +152 -69
- package/dist/core/references/resolver.js.map +1 -1
- package/dist/core/references/schema-proxy.d.ts.map +1 -1
- package/dist/core/references/schema-proxy.js +5 -4
- package/dist/core/references/schema-proxy.js.map +1 -1
- package/dist/core/serialization/cel-references.d.ts +1 -1
- package/dist/core/serialization/cel-references.d.ts.map +1 -1
- package/dist/core/serialization/cel-references.js +191 -24
- package/dist/core/serialization/cel-references.js.map +1 -1
- package/dist/core/serialization/core.d.ts +8 -1
- package/dist/core/serialization/core.d.ts.map +1 -1
- package/dist/core/serialization/core.js +434 -7
- package/dist/core/serialization/core.js.map +1 -1
- package/dist/core/serialization/kro-post-processing.d.ts +46 -0
- package/dist/core/serialization/kro-post-processing.d.ts.map +1 -0
- package/dist/core/serialization/kro-post-processing.js +103 -0
- package/dist/core/serialization/kro-post-processing.js.map +1 -0
- package/dist/core/serialization/schema.d.ts +61 -3
- package/dist/core/serialization/schema.d.ts.map +1 -1
- package/dist/core/serialization/schema.js +520 -18
- package/dist/core/serialization/schema.js.map +1 -1
- package/dist/core/serialization/status-analysis-pipeline.d.ts +4 -0
- package/dist/core/serialization/status-analysis-pipeline.d.ts.map +1 -1
- package/dist/core/serialization/status-analysis-pipeline.js +127 -10
- package/dist/core/serialization/status-analysis-pipeline.js.map +1 -1
- package/dist/core/serialization/yaml.d.ts.map +1 -1
- package/dist/core/serialization/yaml.js +27 -4
- package/dist/core/serialization/yaml.js.map +1 -1
- package/dist/core/types/composable.d.ts +62 -0
- package/dist/core/types/composable.d.ts.map +1 -0
- package/dist/core/types/composable.js +51 -0
- package/dist/core/types/composable.js.map +1 -0
- package/dist/core/types/deployment.d.ts +2 -1
- package/dist/core/types/deployment.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +1 -0
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/core/types/index.js +1 -0
- package/dist/core/types/index.js.map +1 -1
- package/dist/core/types/serialization.d.ts +40 -1
- package/dist/core/types/serialization.d.ts.map +1 -1
- package/dist/core/validation/cel-validator.d.ts.map +1 -1
- package/dist/core/validation/cel-validator.js +55 -31
- package/dist/core/validation/cel-validator.js.map +1 -1
- package/dist/factories/cnpg/compositions/cnpg-bootstrap.d.ts +55 -0
- package/dist/factories/cnpg/compositions/cnpg-bootstrap.d.ts.map +1 -0
- package/dist/factories/cnpg/compositions/cnpg-bootstrap.js +92 -0
- package/dist/factories/cnpg/compositions/cnpg-bootstrap.js.map +1 -0
- package/dist/factories/cnpg/compositions/index.d.ts +2 -0
- package/dist/factories/cnpg/compositions/index.d.ts.map +1 -0
- package/dist/factories/cnpg/compositions/index.js +2 -0
- package/dist/factories/cnpg/compositions/index.js.map +1 -0
- package/dist/factories/cnpg/index.d.ts +42 -0
- package/dist/factories/cnpg/index.d.ts.map +1 -0
- package/dist/factories/cnpg/index.js +42 -0
- package/dist/factories/cnpg/index.js.map +1 -0
- package/dist/factories/cnpg/resources/backup.d.ts +34 -0
- package/dist/factories/cnpg/resources/backup.d.ts.map +1 -0
- package/dist/factories/cnpg/resources/backup.js +87 -0
- package/dist/factories/cnpg/resources/backup.js.map +1 -0
- package/dist/factories/cnpg/resources/cluster.d.ts +55 -0
- package/dist/factories/cnpg/resources/cluster.d.ts.map +1 -0
- package/dist/factories/cnpg/resources/cluster.js +123 -0
- package/dist/factories/cnpg/resources/cluster.js.map +1 -0
- package/dist/factories/cnpg/resources/helm.d.ts +45 -0
- package/dist/factories/cnpg/resources/helm.d.ts.map +1 -0
- package/dist/factories/cnpg/resources/helm.js +78 -0
- package/dist/factories/cnpg/resources/helm.js.map +1 -0
- package/dist/factories/cnpg/resources/index.d.ts +6 -0
- package/dist/factories/cnpg/resources/index.d.ts.map +1 -0
- package/dist/factories/cnpg/resources/index.js +6 -0
- package/dist/factories/cnpg/resources/index.js.map +1 -0
- package/dist/factories/cnpg/resources/pooler.d.ts +38 -0
- package/dist/factories/cnpg/resources/pooler.d.ts.map +1 -0
- package/dist/factories/cnpg/resources/pooler.js +97 -0
- package/dist/factories/cnpg/resources/pooler.js.map +1 -0
- package/dist/factories/cnpg/resources/scheduled-backup.d.ts +35 -0
- package/dist/factories/cnpg/resources/scheduled-backup.d.ts.map +1 -0
- package/dist/factories/cnpg/resources/scheduled-backup.js +68 -0
- package/dist/factories/cnpg/resources/scheduled-backup.js.map +1 -0
- package/dist/factories/cnpg/types.d.ts +507 -0
- package/dist/factories/cnpg/types.d.ts.map +1 -0
- package/dist/factories/cnpg/types.js +398 -0
- package/dist/factories/cnpg/types.js.map +1 -0
- package/dist/factories/cnpg/utils/helm-values-mapper.d.ts +70 -0
- package/dist/factories/cnpg/utils/helm-values-mapper.d.ts.map +1 -0
- package/dist/factories/cnpg/utils/helm-values-mapper.js +79 -0
- package/dist/factories/cnpg/utils/helm-values-mapper.js.map +1 -0
- package/dist/factories/cnpg/utils/index.d.ts +2 -0
- package/dist/factories/cnpg/utils/index.d.ts.map +1 -0
- package/dist/factories/cnpg/utils/index.js +2 -0
- package/dist/factories/cnpg/utils/index.js.map +1 -0
- package/dist/factories/helm/helm-release.d.ts.map +1 -1
- package/dist/factories/helm/helm-release.js +4 -0
- package/dist/factories/helm/helm-release.js.map +1 -1
- package/dist/factories/helm/types.d.ts +2 -0
- package/dist/factories/helm/types.d.ts.map +1 -1
- package/dist/factories/inngest/compositions/index.d.ts +2 -0
- package/dist/factories/inngest/compositions/index.d.ts.map +1 -0
- package/dist/factories/inngest/compositions/index.js +2 -0
- package/dist/factories/inngest/compositions/index.js.map +1 -0
- package/dist/factories/inngest/compositions/inngest-bootstrap.d.ts +150 -0
- package/dist/factories/inngest/compositions/inngest-bootstrap.d.ts.map +1 -0
- package/dist/factories/inngest/compositions/inngest-bootstrap.js +90 -0
- package/dist/factories/inngest/compositions/inngest-bootstrap.js.map +1 -0
- package/dist/factories/inngest/index.d.ts +45 -0
- package/dist/factories/inngest/index.d.ts.map +1 -0
- package/dist/factories/inngest/index.js +45 -0
- package/dist/factories/inngest/index.js.map +1 -0
- package/dist/factories/inngest/resources/helm.d.ts +53 -0
- package/dist/factories/inngest/resources/helm.d.ts.map +1 -0
- package/dist/factories/inngest/resources/helm.js +88 -0
- package/dist/factories/inngest/resources/helm.js.map +1 -0
- package/dist/factories/inngest/resources/index.d.ts +2 -0
- package/dist/factories/inngest/resources/index.d.ts.map +1 -0
- package/dist/factories/inngest/resources/index.js +2 -0
- package/dist/factories/inngest/resources/index.js.map +1 -0
- package/dist/factories/inngest/types.d.ts +177 -0
- package/dist/factories/inngest/types.d.ts.map +1 -0
- package/dist/factories/inngest/types.js +189 -0
- package/dist/factories/inngest/types.js.map +1 -0
- package/dist/factories/inngest/utils/helm-values-mapper.d.ts +127 -0
- package/dist/factories/inngest/utils/helm-values-mapper.d.ts.map +1 -0
- package/dist/factories/inngest/utils/helm-values-mapper.js +116 -0
- package/dist/factories/inngest/utils/helm-values-mapper.js.map +1 -0
- package/dist/factories/inngest/utils/index.d.ts +2 -0
- package/dist/factories/inngest/utils/index.d.ts.map +1 -0
- package/dist/factories/inngest/utils/index.js +2 -0
- package/dist/factories/inngest/utils/index.js.map +1 -0
- package/dist/factories/kubernetes/config/secret.d.ts.map +1 -1
- package/dist/factories/kubernetes/config/secret.js +11 -1
- package/dist/factories/kubernetes/config/secret.js.map +1 -1
- package/dist/factories/kubernetes/core/namespace.d.ts.map +1 -1
- package/dist/factories/kubernetes/core/namespace.js +1 -1
- package/dist/factories/kubernetes/core/namespace.js.map +1 -1
- package/dist/factories/searxng/compositions/index.d.ts +2 -0
- package/dist/factories/searxng/compositions/index.d.ts.map +1 -0
- package/dist/factories/searxng/compositions/index.js +2 -0
- package/dist/factories/searxng/compositions/index.js.map +1 -0
- package/dist/factories/searxng/compositions/searxng-bootstrap.d.ts +65 -0
- package/dist/factories/searxng/compositions/searxng-bootstrap.d.ts.map +1 -0
- package/dist/factories/searxng/compositions/searxng-bootstrap.js +237 -0
- package/dist/factories/searxng/compositions/searxng-bootstrap.js.map +1 -0
- package/dist/factories/searxng/index.d.ts +29 -0
- package/dist/factories/searxng/index.d.ts.map +1 -0
- package/dist/factories/searxng/index.js +27 -0
- package/dist/factories/searxng/index.js.map +1 -0
- package/dist/factories/searxng/resources/index.d.ts +2 -0
- package/dist/factories/searxng/resources/index.d.ts.map +1 -0
- package/dist/factories/searxng/resources/index.js +2 -0
- package/dist/factories/searxng/resources/index.js.map +1 -0
- package/dist/factories/searxng/resources/searxng.d.ts +65 -0
- package/dist/factories/searxng/resources/searxng.d.ts.map +1 -0
- package/dist/factories/searxng/resources/searxng.js +188 -0
- package/dist/factories/searxng/resources/searxng.js.map +1 -0
- package/dist/factories/searxng/types.d.ts +126 -0
- package/dist/factories/searxng/types.d.ts.map +1 -0
- package/dist/factories/searxng/types.js +176 -0
- package/dist/factories/searxng/types.js.map +1 -0
- package/dist/factories/searxng/utils/settings-builder.d.ts +46 -0
- package/dist/factories/searxng/utils/settings-builder.d.ts.map +1 -0
- package/dist/factories/searxng/utils/settings-builder.js +52 -0
- package/dist/factories/searxng/utils/settings-builder.js.map +1 -0
- package/dist/factories/simple/config/secret.d.ts.map +1 -1
- package/dist/factories/simple/config/secret.js +28 -0
- package/dist/factories/simple/config/secret.js.map +1 -1
- package/dist/factories/valkey/compositions/index.d.ts +2 -0
- package/dist/factories/valkey/compositions/index.d.ts.map +1 -0
- package/dist/factories/valkey/compositions/index.js +2 -0
- package/dist/factories/valkey/compositions/index.js.map +1 -0
- package/dist/factories/valkey/compositions/valkey-bootstrap.d.ts +41 -0
- package/dist/factories/valkey/compositions/valkey-bootstrap.d.ts.map +1 -0
- package/dist/factories/valkey/compositions/valkey-bootstrap.js +105 -0
- package/dist/factories/valkey/compositions/valkey-bootstrap.js.map +1 -0
- package/dist/factories/valkey/index.d.ts +50 -0
- package/dist/factories/valkey/index.d.ts.map +1 -0
- package/dist/factories/valkey/index.js +50 -0
- package/dist/factories/valkey/index.js.map +1 -0
- package/dist/factories/valkey/resources/helm.d.ts +53 -0
- package/dist/factories/valkey/resources/helm.d.ts.map +1 -0
- package/dist/factories/valkey/resources/helm.js +82 -0
- package/dist/factories/valkey/resources/helm.js.map +1 -0
- package/dist/factories/valkey/resources/index.d.ts +3 -0
- package/dist/factories/valkey/resources/index.d.ts.map +1 -0
- package/dist/factories/valkey/resources/index.js +3 -0
- package/dist/factories/valkey/resources/index.js.map +1 -0
- package/dist/factories/valkey/resources/valkey.d.ts +46 -0
- package/dist/factories/valkey/resources/valkey.d.ts.map +1 -0
- package/dist/factories/valkey/resources/valkey.js +123 -0
- package/dist/factories/valkey/resources/valkey.js.map +1 -0
- package/dist/factories/valkey/types.d.ts +185 -0
- package/dist/factories/valkey/types.d.ts.map +1 -0
- package/dist/factories/valkey/types.js +204 -0
- package/dist/factories/valkey/types.js.map +1 -0
- package/dist/factories/valkey/utils/helm-values-mapper.d.ts +32 -0
- package/dist/factories/valkey/utils/helm-values-mapper.d.ts.map +1 -0
- package/dist/factories/valkey/utils/helm-values-mapper.js +58 -0
- package/dist/factories/valkey/utils/helm-values-mapper.js.map +1 -0
- package/dist/factories/valkey/utils/index.d.ts +2 -0
- package/dist/factories/valkey/utils/index.d.ts.map +1 -0
- package/dist/factories/valkey/utils/index.js +2 -0
- package/dist/factories/valkey/utils/index.js.map +1 -0
- package/dist/factories/webapp/compositions/index.d.ts +2 -0
- package/dist/factories/webapp/compositions/index.d.ts.map +1 -0
- package/dist/factories/webapp/compositions/index.js +2 -0
- package/dist/factories/webapp/compositions/index.js.map +1 -0
- package/dist/factories/webapp/compositions/web-app-with-processing.d.ts +97 -0
- package/dist/factories/webapp/compositions/web-app-with-processing.d.ts.map +1 -0
- package/dist/factories/webapp/compositions/web-app-with-processing.js +220 -0
- package/dist/factories/webapp/compositions/web-app-with-processing.js.map +1 -0
- package/dist/factories/webapp/index.d.ts +53 -0
- package/dist/factories/webapp/index.d.ts.map +1 -0
- package/dist/factories/webapp/index.js +53 -0
- package/dist/factories/webapp/index.js.map +1 -0
- package/dist/factories/webapp/types.d.ts +69 -0
- package/dist/factories/webapp/types.d.ts.map +1 -0
- package/dist/factories/webapp/types.js +92 -0
- package/dist/factories/webapp/types.js.map +1 -0
- package/dist/shared/brands.d.ts +16 -0
- package/dist/shared/brands.d.ts.map +1 -1
- package/dist/shared/brands.js +16 -0
- package/dist/shared/brands.js.map +1 -1
- package/package.json +29 -1
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hyperspike Valkey Cluster Factory
|
|
3
|
+
*
|
|
4
|
+
* Creates a Valkey CRD resource representing a Valkey cluster
|
|
5
|
+
* managed by the Hyperspike operator.
|
|
6
|
+
*/
|
|
7
|
+
import { createConditionBasedReadinessEvaluator } from '../../../core/readiness/index.js';
|
|
8
|
+
import { createResource } from '../../shared.js';
|
|
9
|
+
/** Base condition-based evaluator for Valkey Ready condition. */
|
|
10
|
+
const baseValkeyEvaluator = createConditionBasedReadinessEvaluator({ kind: 'Valkey' });
|
|
11
|
+
/**
|
|
12
|
+
* Valkey Readiness Evaluator
|
|
13
|
+
*
|
|
14
|
+
* Checks the standard Ready condition first. If status has a top-level
|
|
15
|
+
* `ready` boolean (Hyperspike pattern), uses that as a fast path.
|
|
16
|
+
* Falls back to condition-based evaluation for detailed state.
|
|
17
|
+
*/
|
|
18
|
+
function valkeyReadinessEvaluator(liveResource) {
|
|
19
|
+
const resource = liveResource;
|
|
20
|
+
const status = resource?.status;
|
|
21
|
+
if (!status) {
|
|
22
|
+
return {
|
|
23
|
+
ready: false,
|
|
24
|
+
message: 'Valkey cluster has no status yet',
|
|
25
|
+
reason: 'StatusMissing',
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
// Fast path: Hyperspike reports a top-level ready boolean
|
|
29
|
+
if (status.ready === true) {
|
|
30
|
+
return {
|
|
31
|
+
ready: true,
|
|
32
|
+
message: 'Valkey cluster is ready',
|
|
33
|
+
reason: 'Ready',
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
if (status.ready === false) {
|
|
37
|
+
// Check conditions for a more specific reason
|
|
38
|
+
const readyCondition = status.conditions?.find((c) => c.type === 'Ready');
|
|
39
|
+
if (readyCondition) {
|
|
40
|
+
return {
|
|
41
|
+
ready: false,
|
|
42
|
+
message: readyCondition.message || 'Valkey cluster is not ready',
|
|
43
|
+
reason: readyCondition.reason || 'NotReady',
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
ready: false,
|
|
48
|
+
message: 'Valkey cluster is not ready',
|
|
49
|
+
reason: 'NotReady',
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
// Fall back to condition-based evaluation
|
|
53
|
+
return baseValkeyEvaluator(liveResource);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Hyperspike Valkey Cluster Factory
|
|
57
|
+
*
|
|
58
|
+
* Creates a Valkey cluster managed by the Hyperspike operator. Supports
|
|
59
|
+
* sharded clusters with optional replication, TLS, external access via
|
|
60
|
+
* Envoy proxy or LoadBalancer, and Prometheus monitoring.
|
|
61
|
+
*
|
|
62
|
+
* @param config - Valkey cluster configuration following hyperspike.io/v1 API
|
|
63
|
+
* @returns Enhanced Valkey resource with readiness evaluation
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```typescript
|
|
67
|
+
* const cache = valkey({
|
|
68
|
+
* name: 'app-cache',
|
|
69
|
+
* namespace: 'default',
|
|
70
|
+
* spec: {
|
|
71
|
+
* shards: 3,
|
|
72
|
+
* replicas: 1,
|
|
73
|
+
* storage: {
|
|
74
|
+
* spec: {
|
|
75
|
+
* storageClassName: 'gp3',
|
|
76
|
+
* resources: { requests: { storage: '10Gi' } },
|
|
77
|
+
* },
|
|
78
|
+
* },
|
|
79
|
+
* resources: {
|
|
80
|
+
* requests: { cpu: '250m', memory: '512Mi' },
|
|
81
|
+
* limits: { cpu: '1', memory: '2Gi' },
|
|
82
|
+
* },
|
|
83
|
+
* prometheus: true,
|
|
84
|
+
* },
|
|
85
|
+
* id: 'appCache',
|
|
86
|
+
* });
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
function createValkeyResource(config) {
|
|
90
|
+
// Map the user-facing `shards` field to the CRD's `nodes` JSON tag.
|
|
91
|
+
// The Hyperspike CRD Go type uses `Nodes int32 \`json:"nodes"\``
|
|
92
|
+
// but we expose it as `shards` for clarity.
|
|
93
|
+
const spec = config.spec;
|
|
94
|
+
const crdSpec = {};
|
|
95
|
+
for (const [key, value] of Object.entries(spec)) {
|
|
96
|
+
if (key === 'shards') {
|
|
97
|
+
crdSpec.nodes = value;
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
crdSpec[key] = value;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return createResource({
|
|
104
|
+
apiVersion: 'hyperspike.io/v1',
|
|
105
|
+
kind: 'Valkey',
|
|
106
|
+
metadata: {
|
|
107
|
+
name: config.name,
|
|
108
|
+
...(config.namespace && { namespace: config.namespace }),
|
|
109
|
+
// Labels must be non-empty: the Hyperspike operator's labels() function
|
|
110
|
+
// panics on nil map assignment when metadata.labels is absent.
|
|
111
|
+
// https://github.com/hyperspike/valkey-operator/blob/v0.0.61/internal/controller/valkey_controller.go#L250
|
|
112
|
+
labels: {
|
|
113
|
+
'app.kubernetes.io/name': 'valkey',
|
|
114
|
+
'app.kubernetes.io/instance': config.name,
|
|
115
|
+
'app.kubernetes.io/managed-by': 'typekro',
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
spec: crdSpec,
|
|
119
|
+
...(config.id && { id: config.id }),
|
|
120
|
+
}, { scope: 'namespaced' }).withReadinessEvaluator(valkeyReadinessEvaluator);
|
|
121
|
+
}
|
|
122
|
+
export const valkey = createValkeyResource;
|
|
123
|
+
//# sourceMappingURL=valkey.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"valkey.js","sourceRoot":"","sources":["../../../../src/factories/valkey/resources/valkey.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,sCAAsC,EAAE,MAAM,kCAAkC,CAAC;AAE1F,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGjD,iEAAiE;AACjE,MAAM,mBAAmB,GAAG,sCAAsC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;AAEvF;;;;;;GAMG;AACH,SAAS,wBAAwB,CAAC,YAAqB;IACrD,MAAM,QAAQ,GAAG,YAA4D,CAAC;IAC9E,MAAM,MAAM,GAAG,QAAQ,EAAE,MAAM,CAAC;IAEhC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,OAAO,EAAE,kCAAkC;YAC3C,MAAM,EAAE,eAAe;SACxB,CAAC;IACJ,CAAC;IAED,0DAA0D;IAC1D,IAAI,MAAM,CAAC,KAAK,KAAK,IAAI,EAAE,CAAC;QAC1B,OAAO;YACL,KAAK,EAAE,IAAI;YACX,OAAO,EAAE,yBAAyB;YAClC,MAAM,EAAE,OAAO;SAChB,CAAC;IACJ,CAAC;IAED,IAAI,MAAM,CAAC,KAAK,KAAK,KAAK,EAAE,CAAC;QAC3B,8CAA8C;QAC9C,MA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E,+DAA+D;YAC/D,2GAA2G;YAC3G,MAAM,EAAE;gBACN,wBAAwB,EAAE,QAAQ;gBAClC,4BAA4B,EAAE,MAAM,CAAC,IAAI;gBACzC,8BAA8B,EAAE,SAAS;aAC1C;SACF;QACD,IAAI,EAAE,OAAsB;QAC5B,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC;KACpC,EACD,EAAE,KAAK,EAAE,YAAY,EAAE,CACxB,CAAC,sBAAsB,CAAC,wBAAwB,CAGhD,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hyperspike Valkey Operator Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* ArkType schemas are the SINGLE source of truth for validated config types.
|
|
5
|
+
* TypeScript types are INFERRED from schemas using `typeof Schema.infer`.
|
|
6
|
+
* Status interfaces remain hand-written since they represent k8s API responses,
|
|
7
|
+
* not user-provided config that needs validation.
|
|
8
|
+
*
|
|
9
|
+
* @see https://github.com/hyperspike/valkey-operator
|
|
10
|
+
* @see https://doc.crds.dev/github.com/hyperspike/valkey-operator
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* ArkType schema for the Valkey operator bootstrap configuration.
|
|
14
|
+
*
|
|
15
|
+
* Used by the `valkeyBootstrap` composition to deploy the operator
|
|
16
|
+
* controller into the cluster via Helm.
|
|
17
|
+
*/
|
|
18
|
+
export declare const ValkeyBootstrapConfigSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
19
|
+
name: string;
|
|
20
|
+
namespace?: string;
|
|
21
|
+
version?: string;
|
|
22
|
+
customValues?: Record<string, unknown>;
|
|
23
|
+
}, {}>;
|
|
24
|
+
/** Configuration for installing the Hyperspike Valkey operator via Helm. */
|
|
25
|
+
export type ValkeyBootstrapConfig = typeof ValkeyBootstrapConfigSchema.infer;
|
|
26
|
+
/**
|
|
27
|
+
* ArkType schema for a Hyperspike Valkey cluster configuration.
|
|
28
|
+
*
|
|
29
|
+
* The `storage` field mirrors `*corev1.PersistentVolumeClaim` from the CRD Go types.
|
|
30
|
+
* The `servicePassword` field mirrors `*corev1.SecretKeySelector` (name + key).
|
|
31
|
+
* The `resources` field mirrors `*corev1.ResourceRequirements`.
|
|
32
|
+
* The `shards` field maps to the CRD json tag `"nodes"` — the factory handles this mapping.
|
|
33
|
+
*
|
|
34
|
+
* @see https://doc.crds.dev/github.com/hyperspike/valkey-operator
|
|
35
|
+
*/
|
|
36
|
+
export declare const ValkeyConfigSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
37
|
+
name: string;
|
|
38
|
+
spec: {
|
|
39
|
+
image?: string;
|
|
40
|
+
exporterImage?: string;
|
|
41
|
+
shards?: number;
|
|
42
|
+
replicas?: number;
|
|
43
|
+
clusterDomain?: string;
|
|
44
|
+
anonymousAuth?: boolean;
|
|
45
|
+
servicePassword?: {
|
|
46
|
+
name: string;
|
|
47
|
+
key: string;
|
|
48
|
+
};
|
|
49
|
+
tls?: boolean;
|
|
50
|
+
certIssuer?: string;
|
|
51
|
+
certIssuerType?: string;
|
|
52
|
+
storage?: {
|
|
53
|
+
spec?: {
|
|
54
|
+
accessModes?: string[];
|
|
55
|
+
storageClassName?: string;
|
|
56
|
+
resources?: {
|
|
57
|
+
requests?: {
|
|
58
|
+
storage?: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
volumePermissions?: boolean;
|
|
64
|
+
resources?: {
|
|
65
|
+
requests?: {
|
|
66
|
+
cpu?: string;
|
|
67
|
+
memory?: string;
|
|
68
|
+
};
|
|
69
|
+
limits?: {
|
|
70
|
+
cpu?: string;
|
|
71
|
+
memory?: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
platformManagedSecurityContext?: boolean;
|
|
75
|
+
clusterPreferredEndpointType?: "ip" | "hostname" | "unknown-endpoint";
|
|
76
|
+
externalAccess?: {
|
|
77
|
+
enabled?: boolean;
|
|
78
|
+
type?: "Proxy" | "LoadBalancer";
|
|
79
|
+
externalDNS?: boolean;
|
|
80
|
+
certIssuer?: string;
|
|
81
|
+
certIssuerType?: string;
|
|
82
|
+
proxy?: {
|
|
83
|
+
image?: string;
|
|
84
|
+
replicas?: number;
|
|
85
|
+
hostname?: string;
|
|
86
|
+
resources?: {
|
|
87
|
+
requests?: {
|
|
88
|
+
cpu?: string;
|
|
89
|
+
memory?: string;
|
|
90
|
+
};
|
|
91
|
+
limits?: {
|
|
92
|
+
cpu?: string;
|
|
93
|
+
memory?: string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
extraConfig?: string;
|
|
97
|
+
annotations?: Record<string, string>;
|
|
98
|
+
};
|
|
99
|
+
loadBalancer?: {
|
|
100
|
+
annotations?: Record<string, string>;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
prometheus?: boolean;
|
|
104
|
+
prometheusLabels?: Record<string, string>;
|
|
105
|
+
serviceMonitor?: boolean;
|
|
106
|
+
nodeSelector?: Record<string, string>;
|
|
107
|
+
tolerations?: {
|
|
108
|
+
key?: string;
|
|
109
|
+
operator?: "Exists" | "Equal";
|
|
110
|
+
value?: string;
|
|
111
|
+
effect?: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
112
|
+
tolerationSeconds?: number;
|
|
113
|
+
}[];
|
|
114
|
+
};
|
|
115
|
+
namespace?: string;
|
|
116
|
+
id?: string;
|
|
117
|
+
}, {}>;
|
|
118
|
+
/** Configuration for a Hyperspike Valkey cluster. */
|
|
119
|
+
export type ValkeyConfig = typeof ValkeyConfigSchema.infer;
|
|
120
|
+
/** Status condition for a Valkey cluster. */
|
|
121
|
+
export interface ValkeyCondition {
|
|
122
|
+
type: string;
|
|
123
|
+
status: 'True' | 'False' | 'Unknown';
|
|
124
|
+
reason: string;
|
|
125
|
+
message: string;
|
|
126
|
+
lastTransitionTime: string;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Observed status of a Valkey cluster.
|
|
130
|
+
*/
|
|
131
|
+
export interface ValkeyStatus {
|
|
132
|
+
/** Whether the cluster is operational. */
|
|
133
|
+
ready?: boolean;
|
|
134
|
+
/** Cluster service hostname (derived from resource name). */
|
|
135
|
+
hostname?: string;
|
|
136
|
+
/** Status conditions. */
|
|
137
|
+
conditions?: ValkeyCondition[];
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Observed status of a Valkey operator deployment.
|
|
141
|
+
*/
|
|
142
|
+
export interface ValkeyBootstrapStatus {
|
|
143
|
+
/**
|
|
144
|
+
* Overall deployment phase (derived from HelmRelease Ready condition).
|
|
145
|
+
* Note: cannot distinguish Failed from Installing due to CEL limitation (#48).
|
|
146
|
+
* Use the `failed` field for failure detection.
|
|
147
|
+
*/
|
|
148
|
+
phase: 'Ready' | 'Installing';
|
|
149
|
+
/** Whether the operator is ready to manage Valkey clusters. */
|
|
150
|
+
ready: boolean;
|
|
151
|
+
/** Whether the HelmRelease Ready condition is explicitly False. */
|
|
152
|
+
failed: boolean;
|
|
153
|
+
/** Deployed operator version (app version, not chart version). */
|
|
154
|
+
version?: string;
|
|
155
|
+
}
|
|
156
|
+
/** ArkType schema for ValkeyBootstrapStatus. */
|
|
157
|
+
export declare const ValkeyBootstrapStatusSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
158
|
+
phase: "Ready" | "Installing";
|
|
159
|
+
ready: boolean;
|
|
160
|
+
failed: boolean;
|
|
161
|
+
version?: string;
|
|
162
|
+
}, {}>;
|
|
163
|
+
/** ArkType schema for the Valkey operator Helm chart repository configuration. */
|
|
164
|
+
export declare const ValkeyHelmRepositoryConfigSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
165
|
+
name?: string;
|
|
166
|
+
namespace?: string;
|
|
167
|
+
url?: string;
|
|
168
|
+
type?: "default" | "oci";
|
|
169
|
+
interval?: string;
|
|
170
|
+
id?: string;
|
|
171
|
+
}, {}>;
|
|
172
|
+
/** Configuration for the Valkey operator Helm chart repository. */
|
|
173
|
+
export type ValkeyHelmRepositoryConfig = typeof ValkeyHelmRepositoryConfigSchema.infer;
|
|
174
|
+
/** ArkType schema for the Valkey operator Helm release configuration. */
|
|
175
|
+
export declare const ValkeyHelmReleaseConfigSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
176
|
+
name: string;
|
|
177
|
+
namespace?: string;
|
|
178
|
+
version?: string;
|
|
179
|
+
values?: Record<string, unknown>;
|
|
180
|
+
repositoryName?: string;
|
|
181
|
+
id?: string;
|
|
182
|
+
}, {}>;
|
|
183
|
+
/** Configuration for the Valkey operator Helm release. */
|
|
184
|
+
export type ValkeyHelmReleaseConfig = typeof ValkeyHelmReleaseConfigSchema.infer;
|
|
185
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/factories/valkey/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AA2BH;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B;;;;;MAStC,CAAC;AAEH,4EAA4E;AAC5E,MAAM,MAAM,qBAAqB,GAAG,OAAO,2BAA2B,CAAC,KAAK,CAAC;AAM7E;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6G7B,CAAC;AAEH,qDAAqD;AACrD,MAAM,MAAM,YAAY,GAAG,OAAO,kBAAkB,CAAC,KAAK,CAAC;AAM3D,6CAA6C;AAC7C,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,0CAA0C;IAC1C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yBAAyB;IACzB,UAAU,CAAC,EAAE,eAAe,EAAE,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,KAAK,EAAE,OAAO,GAAG,YAAY,CAAC;IAC9B,+DAA+D;IAC/D,KAAK,EAAE,OAAO,CAAC;IACf,mEAAmE;IACnE,MAAM,EAAE,OAAO,CAAC;IAChB,kEAAkE;IAClE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,gDAAgD;AAChD,eAAO,MAAM,2BAA2B;;;;;MAKtC,CAAC;AAMH,kFAAkF;AAClF,eAAO,MAAM,gCAAgC;;;;;;;MAa3C,CAAC;AAEH,mEAAmE;AACnE,MAAM,MAAM,0BAA0B,GAAG,OAAO,gCAAgC,CAAC,KAAK,CAAC;AAEvF,yEAAyE;AACzE,eAAO,MAAM,6BAA6B;;;;;;;MAaxC,CAAC;AAEH,0DAA0D;AAC1D,MAAM,MAAM,uBAAuB,GAAG,OAAO,6BAA6B,CAAC,KAAK,CAAC"}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hyperspike Valkey Operator Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* ArkType schemas are the SINGLE source of truth for validated config types.
|
|
5
|
+
* TypeScript types are INFERRED from schemas using `typeof Schema.infer`.
|
|
6
|
+
* Status interfaces remain hand-written since they represent k8s API responses,
|
|
7
|
+
* not user-provided config that needs validation.
|
|
8
|
+
*
|
|
9
|
+
* @see https://github.com/hyperspike/valkey-operator
|
|
10
|
+
* @see https://doc.crds.dev/github.com/hyperspike/valkey-operator
|
|
11
|
+
*/
|
|
12
|
+
import { type } from 'arktype';
|
|
13
|
+
// ============================================================================
|
|
14
|
+
// Shared Schema Shapes
|
|
15
|
+
// ============================================================================
|
|
16
|
+
/** Shared ArkType schema shape for Kubernetes tolerations. */
|
|
17
|
+
const tolerationSchemaShape = {
|
|
18
|
+
'key?': 'string',
|
|
19
|
+
'operator?': '"Exists" | "Equal"',
|
|
20
|
+
'value?': 'string',
|
|
21
|
+
'effect?': '"NoSchedule" | "PreferNoSchedule" | "NoExecute"',
|
|
22
|
+
'tolerationSeconds?': 'number',
|
|
23
|
+
};
|
|
24
|
+
/** Shared ArkType schema shape for pod resource requirements. */
|
|
25
|
+
const resourceRequirementsSchemaShape = {
|
|
26
|
+
'requests?': { 'cpu?': 'string', 'memory?': 'string' },
|
|
27
|
+
'limits?': { 'cpu?': 'string', 'memory?': 'string' },
|
|
28
|
+
};
|
|
29
|
+
// ============================================================================
|
|
30
|
+
// Bootstrap Config (Helm Operator Install)
|
|
31
|
+
// ============================================================================
|
|
32
|
+
/**
|
|
33
|
+
* ArkType schema for the Valkey operator bootstrap configuration.
|
|
34
|
+
*
|
|
35
|
+
* Used by the `valkeyBootstrap` composition to deploy the operator
|
|
36
|
+
* controller into the cluster via Helm.
|
|
37
|
+
*/
|
|
38
|
+
export const ValkeyBootstrapConfigSchema = type({
|
|
39
|
+
/** Release name for the Helm installation. */
|
|
40
|
+
name: 'string',
|
|
41
|
+
/** Namespace for the operator (default: 'valkey-operator-system'). */
|
|
42
|
+
'namespace?': 'string',
|
|
43
|
+
/** Chart version. */
|
|
44
|
+
'version?': 'string',
|
|
45
|
+
/** Additional Helm values for user overrides. */
|
|
46
|
+
'customValues?': 'Record<string, unknown>',
|
|
47
|
+
});
|
|
48
|
+
// ============================================================================
|
|
49
|
+
// Valkey CRD Resource
|
|
50
|
+
// ============================================================================
|
|
51
|
+
/**
|
|
52
|
+
* ArkType schema for a Hyperspike Valkey cluster configuration.
|
|
53
|
+
*
|
|
54
|
+
* The `storage` field mirrors `*corev1.PersistentVolumeClaim` from the CRD Go types.
|
|
55
|
+
* The `servicePassword` field mirrors `*corev1.SecretKeySelector` (name + key).
|
|
56
|
+
* The `resources` field mirrors `*corev1.ResourceRequirements`.
|
|
57
|
+
* The `shards` field maps to the CRD json tag `"nodes"` — the factory handles this mapping.
|
|
58
|
+
*
|
|
59
|
+
* @see https://doc.crds.dev/github.com/hyperspike/valkey-operator
|
|
60
|
+
*/
|
|
61
|
+
export const ValkeyConfigSchema = type({
|
|
62
|
+
/** Cluster name. */
|
|
63
|
+
name: 'string',
|
|
64
|
+
/** Target namespace. */
|
|
65
|
+
'namespace?': 'string',
|
|
66
|
+
/** Resource ID for composition references. */
|
|
67
|
+
'id?': 'string',
|
|
68
|
+
/** Valkey cluster specification. */
|
|
69
|
+
spec: {
|
|
70
|
+
// Core
|
|
71
|
+
/** Valkey container image. */
|
|
72
|
+
'image?': 'string',
|
|
73
|
+
/** Metrics exporter image. */
|
|
74
|
+
'exporterImage?': 'string',
|
|
75
|
+
/** Number of primary nodes/shards (default: 3). */
|
|
76
|
+
'shards?': 'number',
|
|
77
|
+
/** Additional replicas per shard (default: 0). */
|
|
78
|
+
'replicas?': 'number',
|
|
79
|
+
/** Cluster domain (default: 'cluster.local'). */
|
|
80
|
+
'clusterDomain?': 'string',
|
|
81
|
+
// Authentication
|
|
82
|
+
/** Allow connections without authentication (default: false). */
|
|
83
|
+
'anonymousAuth?': 'boolean',
|
|
84
|
+
/** Reference to an existing password secret (*corev1.SecretKeySelector). */
|
|
85
|
+
'servicePassword?': { name: 'string', key: 'string' },
|
|
86
|
+
// TLS
|
|
87
|
+
/** Enable TLS encryption (default: false). */
|
|
88
|
+
'tls?': 'boolean',
|
|
89
|
+
/** Certificate issuer name (requires cert-manager). */
|
|
90
|
+
'certIssuer?': 'string',
|
|
91
|
+
/** Certificate issuer type: 'ClusterIssuer' or 'Issuer' (default: 'ClusterIssuer'). */
|
|
92
|
+
'certIssuerType?': 'string',
|
|
93
|
+
// Storage & Resources
|
|
94
|
+
/** Persistent storage configuration (*corev1.PersistentVolumeClaim). */
|
|
95
|
+
'storage?': {
|
|
96
|
+
'spec?': {
|
|
97
|
+
/** PVC access modes (default: ['ReadWriteOnce']). */
|
|
98
|
+
'accessModes?': 'string[]',
|
|
99
|
+
/** Storage class name. */
|
|
100
|
+
'storageClassName?': 'string',
|
|
101
|
+
/** Storage resource requests. */
|
|
102
|
+
'resources?': {
|
|
103
|
+
'requests?': { 'storage?': 'string' },
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
/** Run init container to fix volume permissions (default: false). */
|
|
108
|
+
'volumePermissions?': 'boolean',
|
|
109
|
+
/** Pod resource requirements (*corev1.ResourceRequirements). */
|
|
110
|
+
'resources?': resourceRequirementsSchemaShape,
|
|
111
|
+
/** Platform-managed security context (default: false). */
|
|
112
|
+
'platformManagedSecurityContext?': 'boolean',
|
|
113
|
+
// Networking
|
|
114
|
+
/** Preferred endpoint type for cluster communication. */
|
|
115
|
+
'clusterPreferredEndpointType?': '"ip" | "hostname" | "unknown-endpoint"',
|
|
116
|
+
// External Access
|
|
117
|
+
/** External access configuration. */
|
|
118
|
+
'externalAccess?': {
|
|
119
|
+
/** Enable external access (default: false). */
|
|
120
|
+
'enabled?': 'boolean',
|
|
121
|
+
/** Access type: 'Proxy' (Envoy) or 'LoadBalancer' (default: 'Proxy'). */
|
|
122
|
+
'type?': '"LoadBalancer" | "Proxy"',
|
|
123
|
+
/** Enable external DNS support. */
|
|
124
|
+
'externalDNS?': 'boolean',
|
|
125
|
+
/** TLS certificate issuer name. */
|
|
126
|
+
'certIssuer?': 'string',
|
|
127
|
+
/** Certificate issuer type (default: 'ClusterIssuer'). */
|
|
128
|
+
'certIssuerType?': 'string',
|
|
129
|
+
/** Envoy proxy settings (when type is 'Proxy'). */
|
|
130
|
+
'proxy?': {
|
|
131
|
+
/** Envoy proxy image (default: 'envoyproxy/envoy:v1.32.1'). */
|
|
132
|
+
'image?': 'string',
|
|
133
|
+
/** Number of proxy replicas (default: 1). */
|
|
134
|
+
'replicas?': 'number',
|
|
135
|
+
/** External proxy hostname. */
|
|
136
|
+
'hostname?': 'string',
|
|
137
|
+
/** Proxy pod resources. */
|
|
138
|
+
'resources?': resourceRequirementsSchemaShape,
|
|
139
|
+
/** Additional Envoy configuration. */
|
|
140
|
+
'extraConfig?': 'string',
|
|
141
|
+
/** Service annotations. */
|
|
142
|
+
'annotations?': 'Record<string, string>',
|
|
143
|
+
},
|
|
144
|
+
/** LoadBalancer settings (when type is 'LoadBalancer'). */
|
|
145
|
+
'loadBalancer?': {
|
|
146
|
+
/** Service annotations. */
|
|
147
|
+
'annotations?': 'Record<string, string>',
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
// Monitoring
|
|
151
|
+
/** Enable Prometheus metrics endpoint (default: false). */
|
|
152
|
+
'prometheus?': 'boolean',
|
|
153
|
+
/** Labels for Prometheus metric matching. */
|
|
154
|
+
'prometheusLabels?': 'Record<string, string>',
|
|
155
|
+
/** Create Prometheus ServiceMonitor resource (default: false). */
|
|
156
|
+
'serviceMonitor?': 'boolean',
|
|
157
|
+
// Scheduling
|
|
158
|
+
/** Node label selectors for pod placement. */
|
|
159
|
+
'nodeSelector?': 'Record<string, string>',
|
|
160
|
+
/** Taint tolerations. */
|
|
161
|
+
'tolerations?': type(tolerationSchemaShape).array(),
|
|
162
|
+
},
|
|
163
|
+
});
|
|
164
|
+
/** ArkType schema for ValkeyBootstrapStatus. */
|
|
165
|
+
export const ValkeyBootstrapStatusSchema = type({
|
|
166
|
+
phase: '"Ready" | "Installing"',
|
|
167
|
+
ready: 'boolean',
|
|
168
|
+
failed: 'boolean',
|
|
169
|
+
'version?': 'string',
|
|
170
|
+
});
|
|
171
|
+
// ============================================================================
|
|
172
|
+
// Helm Integration
|
|
173
|
+
// ============================================================================
|
|
174
|
+
/** ArkType schema for the Valkey operator Helm chart repository configuration. */
|
|
175
|
+
export const ValkeyHelmRepositoryConfigSchema = type({
|
|
176
|
+
/** Repository name (default: 'valkey-operator-repo'). */
|
|
177
|
+
'name?': 'string',
|
|
178
|
+
/** Namespace for the HelmRepository (default: flux-system). */
|
|
179
|
+
'namespace?': 'string',
|
|
180
|
+
/** OCI registry URL (default: 'oci://ghcr.io/hyperspike'). */
|
|
181
|
+
'url?': 'string',
|
|
182
|
+
/** Repository type (default: 'oci' — Hyperspike uses OCI registry). */
|
|
183
|
+
'type?': '"default" | "oci"',
|
|
184
|
+
/** Sync interval (default: '5m'). */
|
|
185
|
+
'interval?': 'string',
|
|
186
|
+
/** Resource ID for composition references. */
|
|
187
|
+
'id?': 'string',
|
|
188
|
+
});
|
|
189
|
+
/** ArkType schema for the Valkey operator Helm release configuration. */
|
|
190
|
+
export const ValkeyHelmReleaseConfigSchema = type({
|
|
191
|
+
/** Release name. */
|
|
192
|
+
name: 'string',
|
|
193
|
+
/** Target namespace. */
|
|
194
|
+
'namespace?': 'string',
|
|
195
|
+
/** Chart version. */
|
|
196
|
+
'version?': 'string',
|
|
197
|
+
/** Helm values. */
|
|
198
|
+
'values?': 'Record<string, unknown>',
|
|
199
|
+
/** HelmRepository name to reference (default: 'valkey-operator-repo'). */
|
|
200
|
+
'repositoryName?': 'string',
|
|
201
|
+
/** Resource ID for composition references. */
|
|
202
|
+
'id?': 'string',
|
|
203
|
+
});
|
|
204
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/factories/valkey/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,+EAA+E;AAC/E,uBAAuB;AACvB,+EAA+E;AAE/E,8DAA8D;AAC9D,MAAM,qBAAqB,GAAG;IAC5B,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,oBAAoB;IACjC,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,iDAAiD;IAC5D,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the valkey-operator chart.
|
|
5
|
+
* The operator chart is simple — it deploys the controller only.
|
|
6
|
+
*
|
|
7
|
+
* @see https://github.com/hyperspike/valkey-operator
|
|
8
|
+
*/
|
|
9
|
+
import type { ValkeyBootstrapConfig } from '../types.js';
|
|
10
|
+
/** Helm values structure for the valkey-operator chart. */
|
|
11
|
+
export interface ValkeyHelmValues {
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Map ValkeyBootstrapConfig to Helm chart values.
|
|
16
|
+
*
|
|
17
|
+
* The Hyperspike operator chart has minimal configuration — most settings
|
|
18
|
+
* are on the Valkey CRD itself, not the operator. Custom values are passed
|
|
19
|
+
* through directly for any operator-level overrides.
|
|
20
|
+
*
|
|
21
|
+
* @param config - Resolved Valkey bootstrap configuration
|
|
22
|
+
* @returns Helm values object compatible with the valkey-operator chart
|
|
23
|
+
*/
|
|
24
|
+
export declare function mapValkeyConfigToHelmValues(config: ValkeyBootstrapConfig): ValkeyHelmValues;
|
|
25
|
+
/**
|
|
26
|
+
* Get advisory warnings for Valkey operator Helm values configuration.
|
|
27
|
+
*
|
|
28
|
+
* @param _config - Bootstrap configuration to check
|
|
29
|
+
* @returns Array of warning messages (empty if configuration looks good)
|
|
30
|
+
*/
|
|
31
|
+
export declare function getValkeyHelmValueWarnings(_config: ValkeyBootstrapConfig): string[];
|
|
32
|
+
//# sourceMappingURL=helm-values-mapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helm-values-mapper.d.ts","sourceRoot":"","sources":["../../../../src/factories/valkey/utils/helm-values-mapper.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzD,2DAA2D;AAC3D,MAAM,WAAW,gBAAgB;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,qBAAqB,GAAG,gBAAgB,CAQ3F;AAsBD;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM,EAAE,CAInF"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helm Values Mapper for Hyperspike Valkey Operator
|
|
3
|
+
*
|
|
4
|
+
* Maps ValkeyBootstrapConfig to Helm chart values for the valkey-operator chart.
|
|
5
|
+
* The operator chart is simple — it deploys the controller only.
|
|
6
|
+
*
|
|
7
|
+
* @see https://github.com/hyperspike/valkey-operator
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Map ValkeyBootstrapConfig to Helm chart values.
|
|
11
|
+
*
|
|
12
|
+
* The Hyperspike operator chart has minimal configuration — most settings
|
|
13
|
+
* are on the Valkey CRD itself, not the operator. Custom values are passed
|
|
14
|
+
* through directly for any operator-level overrides.
|
|
15
|
+
*
|
|
16
|
+
* @param config - Resolved Valkey bootstrap configuration
|
|
17
|
+
* @returns Helm values object compatible with the valkey-operator chart
|
|
18
|
+
*/
|
|
19
|
+
export function mapValkeyConfigToHelmValues(config) {
|
|
20
|
+
const values = {};
|
|
21
|
+
if (config.customValues) {
|
|
22
|
+
Object.assign(values, config.customValues);
|
|
23
|
+
}
|
|
24
|
+
return removeUndefinedValues(values);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Recursively remove undefined values from an object.
|
|
28
|
+
* Helm doesn't handle undefined well — only include explicitly set values.
|
|
29
|
+
*/
|
|
30
|
+
function removeUndefinedValues(obj) {
|
|
31
|
+
const result = {};
|
|
32
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
33
|
+
if (value === undefined)
|
|
34
|
+
continue;
|
|
35
|
+
if (value !== null && typeof value === 'object' && !Array.isArray(value)) {
|
|
36
|
+
const cleaned = removeUndefinedValues(value);
|
|
37
|
+
if (Object.keys(cleaned).length > 0) {
|
|
38
|
+
result[key] = cleaned;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
result[key] = value;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return result;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Get advisory warnings for Valkey operator Helm values configuration.
|
|
49
|
+
*
|
|
50
|
+
* @param _config - Bootstrap configuration to check
|
|
51
|
+
* @returns Array of warning messages (empty if configuration looks good)
|
|
52
|
+
*/
|
|
53
|
+
export function getValkeyHelmValueWarnings(_config) {
|
|
54
|
+
// The Hyperspike operator chart has minimal configuration.
|
|
55
|
+
// Most settings are on the Valkey CRD, not the operator.
|
|
56
|
+
return [];
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=helm-values-mapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helm-values-mapper.js","sourceRoot":"","sources":["../../../../src/factories/valkey/utils/helm-values-mapper.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AASH;;;;;;;;;GASG;AACH,MAAM,UAAU,2BAA2B,CAAC,MAA6B;IACvE,MAAM,MAAM,GAAqB,EAAE,CAAC;IAEpC,IAAI,MAAM,CAAC,YAAY,EAAE,CAAC;QACxB,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;IAC7C,CAAC;IAED,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAC;AACvC,CAAC;AAED;;;GAGG;AACH,SAAS,qBAAqB,CAAoC,GAAM;IACtE,MAAM,MAAM,GAAG,EAA6B,CAAC;IAC7C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/C,IAAI,KAAK,KAAK,SAAS;YAAE,SAAS;QAClC,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACzE,MAAM,OAAO,GAAG,qBAAqB,CAAC,KAAgC,CAAC,CAAC;YACxE,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACpC,MAAM,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC;YACxB,CAAC;QACH,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QACtB,CAAC;IACH,CAAC;IACD,OAAO,MAAW,CAAC;AACrB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CAAC,OAA8B;IACvE,2DAA2D;IAC3D,yDAAyD;IACzD,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/factories/valkey/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/factories/valkey/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/factories/webapp/compositions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/factories/webapp/compositions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC"}
|