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
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
import { createAlwaysReadyEvaluator } from '../../../core/readiness/index.js';
|
|
2
2
|
import { registerFactory } from '../../../core/resources/factory-registry.js';
|
|
3
3
|
import { createResource } from '../../shared.js';
|
|
4
|
-
// Self-register
|
|
4
|
+
// Self-register under both the PascalCase `Secret` name (used by
|
|
5
|
+
// `simple.Secret`) and the lowercase `secret` name (this module's
|
|
6
|
+
// exported function). Registering both ensures that composition-body
|
|
7
|
+
// AST analysis (`isKnownFactory`) recognises direct calls like
|
|
8
|
+
// `secret({...})` inside compositions and can extract control-flow
|
|
9
|
+
// directives (includeWhen, forEach, etc).
|
|
5
10
|
registerFactory({
|
|
6
11
|
factoryName: 'Secret',
|
|
7
12
|
kind: 'Secret',
|
|
8
13
|
apiVersion: 'v1',
|
|
9
14
|
semanticAliases: ['secret'],
|
|
10
15
|
});
|
|
16
|
+
registerFactory({
|
|
17
|
+
factoryName: 'secret',
|
|
18
|
+
kind: 'Secret',
|
|
19
|
+
apiVersion: 'v1',
|
|
20
|
+
});
|
|
11
21
|
/**
|
|
12
22
|
* Creates a Kubernetes Secret resource that is considered ready immediately upon creation.
|
|
13
23
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secret.js","sourceRoot":"","sources":["../../../../src/factories/kubernetes/config/secret.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAE9E,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,qEAAqE;AACrE,eAAe,CAAC;IACd,WAAW,EAAE,QAAQ;IACrB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,IAAI;IAChB,eAAe,EAAE,CAAC,QAAQ,CAAC;CAC5B,CAAC,CAAC;AAWH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,MAAM,CAAC,QAAoC;IACzD,wFAAwF;IACxF,oFAAoF;IACpF,gDAAgD;IAChD,OAAO,cAAc,CAA2B;QAC9C,GAAG,QAAQ;QACX,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,QAAQ,CAAC,QAAQ,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAE;QACzD,kFAAkF;KACnF,CAAC,CAAC,sBAAsB,CAAC,0BAA0B,CAAW,QAAQ,CAAC,CAAC,CAAC;AAC5E,CAAC"}
|
|
1
|
+
{"version":3,"file":"secret.js","sourceRoot":"","sources":["../../../../src/factories/kubernetes/config/secret.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAE9E,OAAO,EAAE,cAAc,EAAE,M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;;;GASG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,eAAe,GAAG,QAAQ,CAAC,eAAe,EAAE,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"namespace.d.ts","sourceRoot":"","sources":["../../../../src/factories/kubernetes/core/namespace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAG7D,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/D,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;AAEnE,MAAM,WAAW,eAAgB,SAAQ,WAAW;IAClD,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,eAAe,GAAG,QAAQ,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAkDjG"}
|
|
@@ -17,7 +17,7 @@ export function namespace(resource) {
|
|
|
17
17
|
apiVersion: 'v1',
|
|
18
18
|
kind: 'Namespace',
|
|
19
19
|
metadata: resource.metadata ?? { name: 'unnamed-namespace' },
|
|
20
|
-
}).withReadinessEvaluator((liveResource) => {
|
|
20
|
+
}, { scope: 'cluster' }).withReadinessEvaluator((liveResource) => {
|
|
21
21
|
try {
|
|
22
22
|
const status = liveResource.status;
|
|
23
23
|
// Handle missing status gracefully
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"namespace.js","sourceRoot":"","sources":["../../../../src/factories/kubernetes/core/namespace.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AASjD;;;;;;;;;GASG;AACH,MAAM,UAAU,SAAS,CAAC,QA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O,EAAE,EAAE,KAAK,EAAE;iBACnB,CAAC;YACJ,CAAC;QACH,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,OAAO;gBACL,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,iBAAiB;gBACzB,OAAO,EAAE,yCAAyC,WAAW,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE;gBAC9E,OAAO,EAAE,EAAE,KAAK,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE;aAC/C,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/factories/searxng/compositions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/factories/searxng/compositions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SearXNG Bootstrap Composition
|
|
3
|
+
*
|
|
4
|
+
* Deploys a complete SearXNG instance: Namespace + ConfigMap + Deployment + Service.
|
|
5
|
+
* Settings are built from typed spec fields — no proxy objects pass through to YAML.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import { searxngBootstrap } from 'typekro/searxng';
|
|
10
|
+
*
|
|
11
|
+
* const factory = searxngBootstrap.factory('direct', {
|
|
12
|
+
* namespace: 'search',
|
|
13
|
+
* waitForReady: true,
|
|
14
|
+
* });
|
|
15
|
+
*
|
|
16
|
+
* await factory.deploy({
|
|
17
|
+
* name: 'searxng',
|
|
18
|
+
* search: { formats: ['html', 'json'] },
|
|
19
|
+
* server: { limiter: false, secret_key: 'change-me-in-production' },
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare const searxngBootstrap: import("../../../index.js").CallableComposition<{
|
|
24
|
+
name: string;
|
|
25
|
+
namespace?: string;
|
|
26
|
+
image?: string;
|
|
27
|
+
replicas?: number;
|
|
28
|
+
instanceName?: string;
|
|
29
|
+
baseUrl?: string;
|
|
30
|
+
server?: {
|
|
31
|
+
secret_key?: string;
|
|
32
|
+
limiter?: boolean;
|
|
33
|
+
bind_address?: string;
|
|
34
|
+
method?: string;
|
|
35
|
+
};
|
|
36
|
+
secretKeyRef?: {
|
|
37
|
+
name: string;
|
|
38
|
+
key: string;
|
|
39
|
+
};
|
|
40
|
+
search?: {
|
|
41
|
+
formats?: string[];
|
|
42
|
+
default_lang?: string;
|
|
43
|
+
autocomplete?: string;
|
|
44
|
+
safe_search?: 0 | 1 | 2;
|
|
45
|
+
};
|
|
46
|
+
redisUrl?: string;
|
|
47
|
+
settingsYaml?: string;
|
|
48
|
+
env?: Record<string, string>;
|
|
49
|
+
resources?: {
|
|
50
|
+
requests?: {
|
|
51
|
+
cpu?: string;
|
|
52
|
+
memory?: string;
|
|
53
|
+
};
|
|
54
|
+
limits?: {
|
|
55
|
+
cpu?: string;
|
|
56
|
+
memory?: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
}, {
|
|
60
|
+
ready: boolean;
|
|
61
|
+
phase: "Ready" | "Installing";
|
|
62
|
+
failed: boolean;
|
|
63
|
+
url: string;
|
|
64
|
+
}>;
|
|
65
|
+
//# sourceMappingURL=searxng-bootstrap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searxng-bootstrap.d.ts","sourceRoot":"","sources":["../../../../src/factories/searxng/compositions/searxng-bootstrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AA8BH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2N5B,CAAC"}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SearXNG Bootstrap Composition
|
|
3
|
+
*
|
|
4
|
+
* Deploys a complete SearXNG instance: Namespace + ConfigMap + Deployment + Service.
|
|
5
|
+
* Settings are built from typed spec fields — no proxy objects pass through to YAML.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import { searxngBootstrap } from 'typekro/searxng';
|
|
10
|
+
*
|
|
11
|
+
* const factory = searxngBootstrap.factory('direct', {
|
|
12
|
+
* namespace: 'search',
|
|
13
|
+
* waitForReady: true,
|
|
14
|
+
* });
|
|
15
|
+
*
|
|
16
|
+
* await factory.deploy({
|
|
17
|
+
* name: 'searxng',
|
|
18
|
+
* search: { formats: ['html', 'json'] },
|
|
19
|
+
* server: { limiter: false, secret_key: 'change-me-in-production' },
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
import { kubernetesComposition } from '../../../core/composition/imperative.js';
|
|
24
|
+
import { Cel } from '../../../core/references/cel.js';
|
|
25
|
+
import { configMap } from '../../kubernetes/config/config-map.js';
|
|
26
|
+
import { namespace } from '../../kubernetes/core/namespace.js';
|
|
27
|
+
import { secret } from '../../kubernetes/config/secret.js';
|
|
28
|
+
import { simple } from '../../simple/index.js';
|
|
29
|
+
import { searxng } from '../resources/searxng.js';
|
|
30
|
+
import { DEFAULT_SEARXNG_IMAGE, DEFAULT_SEARXNG_PORT, SearxngBootstrapConfigSchema, SearxngBootstrapStatusSchema, } from '../types.js';
|
|
31
|
+
/**
|
|
32
|
+
* Return a copy of the server config with `secret_key` removed. The field
|
|
33
|
+
* is delivered via a dedicated K8s Secret, not via the Deployment spec —
|
|
34
|
+
* this helper makes sure the plaintext (or the KubernetesRef proxy that
|
|
35
|
+
* carries it in KRO mode) does not leak into the searxng() factory's
|
|
36
|
+
* `spec.server` which would otherwise fall back to injecting it as a
|
|
37
|
+
* plaintext env var.
|
|
38
|
+
*/
|
|
39
|
+
function stripSecretKey(server) {
|
|
40
|
+
const { secret_key: _discarded, ...rest } = server;
|
|
41
|
+
return rest;
|
|
42
|
+
}
|
|
43
|
+
export const searxngBootstrap = kubernetesComposition({
|
|
44
|
+
name: 'searxng-bootstrap',
|
|
45
|
+
kind: 'SearxngBootstrap',
|
|
46
|
+
spec: SearxngBootstrapConfigSchema,
|
|
47
|
+
status: SearxngBootstrapStatusSchema,
|
|
48
|
+
}, (spec) => {
|
|
49
|
+
const resolvedNamespace = spec.namespace ?? 'searxng';
|
|
50
|
+
const resolvedImage = spec.image ?? DEFAULT_SEARXNG_IMAGE;
|
|
51
|
+
const port = DEFAULT_SEARXNG_PORT;
|
|
52
|
+
// ── Namespace ──────────────────────────────────────────────────────
|
|
53
|
+
const _ns = namespace({
|
|
54
|
+
metadata: {
|
|
55
|
+
name: resolvedNamespace,
|
|
56
|
+
labels: {
|
|
57
|
+
'app.kubernetes.io/name': 'searxng',
|
|
58
|
+
'app.kubernetes.io/instance': spec.name,
|
|
59
|
+
'app.kubernetes.io/managed-by': 'typekro',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
id: 'searxngNamespace',
|
|
63
|
+
});
|
|
64
|
+
// ── Settings ConfigMap ─────────────────────────────────────────────
|
|
65
|
+
//
|
|
66
|
+
// WHY TEMPLATE LITERALS (not `yaml.dump(...)`):
|
|
67
|
+
//
|
|
68
|
+
// The composition function runs in two very different modes:
|
|
69
|
+
//
|
|
70
|
+
// (1) Direct mode — spec fields are real values (`'redis://...'`,
|
|
71
|
+
// `['html', 'json']`, `false`). `yaml.dump()` would work fine
|
|
72
|
+
// and is in fact used by the `buildSearxngSettings` helper for
|
|
73
|
+
// direct-mode callers who pass a pre-built `settingsYaml`.
|
|
74
|
+
//
|
|
75
|
+
// (2) KRO mode — spec fields are `KubernetesRef` proxy objects
|
|
76
|
+
// whose string coercion yields `__KUBERNETES_REF___schema___spec.xxx__`
|
|
77
|
+
// marker tokens. These markers are recognized by the framework
|
|
78
|
+
// later and rewritten into CEL expressions like
|
|
79
|
+
// `${string(schema.spec.redisUrl)}` inside the final RGD YAML.
|
|
80
|
+
// `yaml.dump()` cannot produce those markers — it would call
|
|
81
|
+
// `.toString()`/`.toJSON()` on the proxy and flatten everything
|
|
82
|
+
// into the wrong thing, losing the reference entirely.
|
|
83
|
+
//
|
|
84
|
+
// The template-literal approach is what makes mixed templates work:
|
|
85
|
+
// the literal text (`use_default_settings: true`, key names, indentation)
|
|
86
|
+
// is rendered as-is, while `${spec.redisUrl}` interpolation emits the
|
|
87
|
+
// marker token that the framework then converts to CEL. This is the
|
|
88
|
+
// only way to build a string that is BOTH (a) valid YAML when the
|
|
89
|
+
// spec is concrete, and (b) a carrier for CEL references when it
|
|
90
|
+
// isn't. Changing this to `yaml.dump()` will break KRO mode.
|
|
91
|
+
//
|
|
92
|
+
// The `typeof spec.settingsYaml === 'string'` branch lets advanced
|
|
93
|
+
// direct-mode callers override the entire file with a hand-crafted
|
|
94
|
+
// (or `buildSearxngSettings`-generated) string — in KRO mode the
|
|
95
|
+
// proxy isn't a string, so this branch is never taken.
|
|
96
|
+
//
|
|
97
|
+
// `secret_key` is intentionally NOT written into the ConfigMap — and
|
|
98
|
+
// it's also NOT injected as a plaintext env var on the Deployment
|
|
99
|
+
// (which would expose it via `kubectl get deploy -o yaml`). Instead,
|
|
100
|
+
// the secret is delivered via a dedicated K8s Secret resource that
|
|
101
|
+
// the Deployment mounts with `valueFrom.secretKeyRef`. See the
|
|
102
|
+
// Secret block below.
|
|
103
|
+
const redisSection = spec.redisUrl
|
|
104
|
+
? `\nredis:\n url: ${spec.redisUrl}`
|
|
105
|
+
: '';
|
|
106
|
+
// Build search formats: use spec.search.formats in direct mode (real array),
|
|
107
|
+
// fall back to defaults in KRO mode (the proxy isn't a real array, so
|
|
108
|
+
// `Array.isArray()` returns false and the literal default list is emitted).
|
|
109
|
+
// TODO(typekro#array-cel): once CEL template support for arrays lands,
|
|
110
|
+
// this can emit `${spec.search.formats}` in KRO mode too.
|
|
111
|
+
const searchFormats = Array.isArray(spec.search?.formats)
|
|
112
|
+
? spec.search.formats.map((f) => ` - ${f}`).join('\n')
|
|
113
|
+
: ' - html\n - json';
|
|
114
|
+
const settingsYaml = typeof spec.settingsYaml === 'string'
|
|
115
|
+
? spec.settingsYaml
|
|
116
|
+
: `use_default_settings: true
|
|
117
|
+
server:
|
|
118
|
+
limiter: ${spec.server?.limiter ?? false}
|
|
119
|
+
search:
|
|
120
|
+
formats:
|
|
121
|
+
${searchFormats}
|
|
122
|
+
${redisSection}`;
|
|
123
|
+
const configMapName = `${spec.name}-config`;
|
|
124
|
+
const _config = configMap({
|
|
125
|
+
metadata: {
|
|
126
|
+
name: configMapName,
|
|
127
|
+
namespace: resolvedNamespace,
|
|
128
|
+
labels: {
|
|
129
|
+
'app.kubernetes.io/name': 'searxng',
|
|
130
|
+
'app.kubernetes.io/component': 'config',
|
|
131
|
+
'app.kubernetes.io/managed-by': 'typekro',
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
data: { 'settings.yml': settingsYaml },
|
|
135
|
+
id: 'searxngConfig',
|
|
136
|
+
});
|
|
137
|
+
// ── Secret (SEARXNG_SECRET delivery) ───────────────────────────────
|
|
138
|
+
//
|
|
139
|
+
// Secret delivery rules:
|
|
140
|
+
// (1) If the user provided an external `secretKeyRef`, the Deployment
|
|
141
|
+
// mounts that existing Secret via valueFrom — the bootstrap does
|
|
142
|
+
// NOT create its own. This is the path for external-secrets
|
|
143
|
+
// workflows (Vault, AWS SM, external-secrets operator).
|
|
144
|
+
// (2) Otherwise, the bootstrap creates a dedicated `{name}-secret`
|
|
145
|
+
// Secret from `server.secret_key`. The plaintext stops at the
|
|
146
|
+
// Secret's stringData and never enters the Deployment env.
|
|
147
|
+
//
|
|
148
|
+
// The plain `if (!spec.secretKeyRef)` below is transformed into a KRO
|
|
149
|
+
// `includeWhen: ${!has(schema.spec.secretKeyRef)}` directive by the
|
|
150
|
+
// composition AST analyzer during serialization. In direct mode the
|
|
151
|
+
// `if` runs normally; in KRO mode the analyzer attaches the includeWhen
|
|
152
|
+
// so the Secret is only created when the user didn't provide an
|
|
153
|
+
// external ref. The Deployment's `secretKeyRef` field is computed by
|
|
154
|
+
// the JS ternary on the same condition and the analyzer emits the
|
|
155
|
+
// corresponding CEL ternary there as well.
|
|
156
|
+
//
|
|
157
|
+
// Why `simple.Secret` is NOT used here: it eagerly base64-encodes
|
|
158
|
+
// stringData values via `Buffer.from(...)` at composition time, which
|
|
159
|
+
// would encode the `__KUBERNETES_REF__` marker token in KRO mode
|
|
160
|
+
// instead of the actual user-supplied secret, baking a broken value
|
|
161
|
+
// into the RGD. The low-level `secret()` factory passes `stringData`
|
|
162
|
+
// through untouched so KRO can resolve it at reconcile time.
|
|
163
|
+
const secretName = `${spec.name}-secret`;
|
|
164
|
+
if (!spec.secretKeyRef) {
|
|
165
|
+
secret({
|
|
166
|
+
metadata: {
|
|
167
|
+
name: secretName,
|
|
168
|
+
namespace: resolvedNamespace,
|
|
169
|
+
labels: {
|
|
170
|
+
'app.kubernetes.io/name': 'searxng',
|
|
171
|
+
'app.kubernetes.io/instance': spec.name,
|
|
172
|
+
'app.kubernetes.io/component': 'secret',
|
|
173
|
+
'app.kubernetes.io/managed-by': 'typekro',
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
type: 'Opaque',
|
|
177
|
+
stringData: {
|
|
178
|
+
secret_key: spec.server?.secret_key,
|
|
179
|
+
},
|
|
180
|
+
id: 'searxngSecret',
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
// ── Deployment ─────────────────────────────────────────────────────
|
|
184
|
+
//
|
|
185
|
+
// The Deployment never sees the plaintext secret — it mounts a
|
|
186
|
+
// `secretKeyRef` instead, which the factory translates into
|
|
187
|
+
// `valueFrom.secretKeyRef` on the SEARXNG_SECRET env var.
|
|
188
|
+
//
|
|
189
|
+
// The two nested ternaries on `secretKeyRef.name` and `secretKeyRef.key`
|
|
190
|
+
// are detected by the composition AST analyzer and emitted as CEL
|
|
191
|
+
// conditionals in the final RGD — in KRO mode the user's CR value
|
|
192
|
+
// for `spec.secretKeyRef` selects between the external Secret and
|
|
193
|
+
// the auto-created one at reconcile time.
|
|
194
|
+
const _deployment = searxng({
|
|
195
|
+
name: spec.name,
|
|
196
|
+
namespace: resolvedNamespace,
|
|
197
|
+
spec: {
|
|
198
|
+
image: resolvedImage,
|
|
199
|
+
replicas: spec.replicas ?? 1,
|
|
200
|
+
instanceName: spec.instanceName ?? spec.name,
|
|
201
|
+
baseUrl: spec.baseUrl ?? `http://${spec.name}:${port}/`,
|
|
202
|
+
configMapName,
|
|
203
|
+
// Strip secret_key before passing server config through — the
|
|
204
|
+
// plaintext stops here and is delivered exclusively via the
|
|
205
|
+
// Secret resource above.
|
|
206
|
+
...(spec.server && {
|
|
207
|
+
server: stripSecretKey(spec.server),
|
|
208
|
+
}),
|
|
209
|
+
secretKeyRef: {
|
|
210
|
+
name: spec.secretKeyRef ? spec.secretKeyRef.name : secretName,
|
|
211
|
+
key: spec.secretKeyRef ? spec.secretKeyRef.key : 'secret_key',
|
|
212
|
+
},
|
|
213
|
+
env: spec.env,
|
|
214
|
+
resources: spec.resources,
|
|
215
|
+
},
|
|
216
|
+
id: 'searxngDeployment',
|
|
217
|
+
});
|
|
218
|
+
// ── Service ────────────────────────────────────────────────────────
|
|
219
|
+
simple.Service({
|
|
220
|
+
name: spec.name,
|
|
221
|
+
namespace: resolvedNamespace,
|
|
222
|
+
selector: {
|
|
223
|
+
'app.kubernetes.io/name': 'searxng',
|
|
224
|
+
'app.kubernetes.io/instance': spec.name,
|
|
225
|
+
},
|
|
226
|
+
ports: [{ port, targetPort: port, name: 'http' }],
|
|
227
|
+
id: 'searxngService',
|
|
228
|
+
});
|
|
229
|
+
// ── Status ─────────────────────────────────────────────────────────
|
|
230
|
+
return {
|
|
231
|
+
ready: Cel.expr(_deployment.status.conditions, '.exists(c, c.type == "Available" && c.status == "True")'),
|
|
232
|
+
phase: Cel.expr(_deployment.status.conditions, '.exists(c, c.type == "Available" && c.status == "True") ? "Ready" : "Installing"'),
|
|
233
|
+
failed: Cel.expr(_deployment.status.conditions, '.exists(c, c.type == "Available" && c.status == "False")'),
|
|
234
|
+
url: `http://${spec.name}.${resolvedNamespace}:${port}`,
|
|
235
|
+
};
|
|
236
|
+
});
|
|
237
|
+
//# sourceMappingURL=searxng-bootstrap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searxng-bootstrap.js","sourceRoot":"","sources":["../../../../src/factories/searxng/compositions/searxng-bootstrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EAEpB,4BAA4B,EAC5B,4BAA4B,GAC7B,MAAM,aAAa,CAAC;AAErB;;;;;;;GAOG;AACH,SAAS,cAAc,CAAqC,MAAS;IACnE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;IACnD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,qBAAqB,CACnD;IACE,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,4BAA4B;IAClC,MAAM,EAA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CAAC,CAAC,CAAC,UAAU;gBAC7D,GAAG,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,YAAY;aAC9D;YACD,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B;QACD,EAAE,EAAE,mBAAmB;KACxB,CAAC,CAAC;IAEH,sEAAsE;IAEtE,MAAM,CAAC,OAAO,CAAC;QACb,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,SAAS,EAAE,iBAAiB;QAC5B,QAAQ,EAAE;YACR,wBAAwB,EAAE,SAAS;YACnC,4BAA4B,EAAE,IAAI,CAAC,IAAI;SACxC;QACD,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QACjD,EAAE,EAAE,gBAAgB;KACrB,CAAC,CAAC;IAEH,sEAAsE;IAEtE,OAAO;QACL,KAAK,EAAE,GAAG,CAAC,IAAI,CACb,WAAW,CAAC,MAAM,CAAC,UAAU,EAC7B,yDAAyD,CAC1D;QACD,KAAK,EAAE,GAAG,CAAC,IAAI,CACb,WAAW,CAAC,MAAM,CAAC,UAAU,EAC7B,kFAAkF,CACnF;QACD,MAAM,EAAE,GAAG,CAAC,IAAI,CACd,WAAW,CAAC,MAAM,CAAC,UAAU,EAC7B,0DAA0D,CAC3D;QACD,GAAG,EAAE,UAAU,IAAI,CAAC,IAAI,IAAI,iBAAiB,IAAI,IAAI,EAAE;KACxD,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SearXNG Integration
|
|
3
|
+
*
|
|
4
|
+
* Privacy-respecting metasearch engine that aggregates results from
|
|
5
|
+
* multiple search providers (Google, Bing, DuckDuckGo, Brave, etc.).
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import { searxngBootstrap } from 'typekro/searxng';
|
|
10
|
+
*
|
|
11
|
+
* const factory = searxngBootstrap.factory('direct', {
|
|
12
|
+
* namespace: 'search',
|
|
13
|
+
* waitForReady: true,
|
|
14
|
+
* });
|
|
15
|
+
*
|
|
16
|
+
* await factory.deploy({
|
|
17
|
+
* name: 'searxng',
|
|
18
|
+
* search: { formats: ['html', 'json'] },
|
|
19
|
+
* server: { limiter: false, secret_key: 'change-me' },
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export { searxngBootstrap } from './compositions/index.js';
|
|
24
|
+
export { searxng } from './resources/index.js';
|
|
25
|
+
export type { SearxngBootstrapConfig, SearxngBootstrapStatus, SearxngConfig, SearxngStatus, } from './types.js';
|
|
26
|
+
export { DEFAULT_SEARXNG_IMAGE, DEFAULT_SEARXNG_PORT } from './types.js';
|
|
27
|
+
export { buildSearxngSettings } from './utils/settings-builder.js';
|
|
28
|
+
export type { SearxngSettingsInput } from './utils/settings-builder.js';
|
|
29
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/factories/searxng/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,YAAY,EACV,sBAAsB,EACtB,sBAAsB,EACtB,aAAa,EACb,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,YAAY,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SearXNG Integration
|
|
3
|
+
*
|
|
4
|
+
* Privacy-respecting metasearch engine that aggregates results from
|
|
5
|
+
* multiple search providers (Google, Bing, DuckDuckGo, Brave, etc.).
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import { searxngBootstrap } from 'typekro/searxng';
|
|
10
|
+
*
|
|
11
|
+
* const factory = searxngBootstrap.factory('direct', {
|
|
12
|
+
* namespace: 'search',
|
|
13
|
+
* waitForReady: true,
|
|
14
|
+
* });
|
|
15
|
+
*
|
|
16
|
+
* await factory.deploy({
|
|
17
|
+
* name: 'searxng',
|
|
18
|
+
* search: { formats: ['html', 'json'] },
|
|
19
|
+
* server: { limiter: false, secret_key: 'change-me' },
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export { searxngBootstrap } from './compositions/index.js';
|
|
24
|
+
export { searxng } from './resources/index.js';
|
|
25
|
+
export { DEFAULT_SEARXNG_IMAGE, DEFAULT_SEARXNG_PORT } from './types.js';
|
|
26
|
+
export { buildSearxngSettings } from './utils/settings-builder.js';
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/factories/searxng/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAO/C,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/factories/searxng/resources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/factories/searxng/resources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SearXNG Deployment Factory
|
|
3
|
+
*
|
|
4
|
+
* Creates a SearXNG Deployment with a mounted settings ConfigMap,
|
|
5
|
+
* health probes at /healthz, and optional environment variables.
|
|
6
|
+
* The secret_key is injected via SEARXNG_SECRET env var (not in ConfigMap).
|
|
7
|
+
*/
|
|
8
|
+
import type { CelExpression, Composable, Enhanced } from '../../../core/types/index.js';
|
|
9
|
+
import { type SearxngConfig, type SearxngStatus } from '../types.js';
|
|
10
|
+
/**
|
|
11
|
+
* Relaxed spec type for the factory. The ArkType schema constrains
|
|
12
|
+
* `secretKeyRef.name` and `secretKeyRef.key` to plain strings, but the
|
|
13
|
+
* bootstrap composition needs to pass `CelExpression<string>` values in
|
|
14
|
+
* KRO mode (where the field values are CEL ternaries that KRO evaluates
|
|
15
|
+
* at reconcile time). At runtime `createResource` handles both concrete
|
|
16
|
+
* strings and CelExpression objects uniformly, so widening the type here
|
|
17
|
+
* is purely a TypeScript ergonomics fix — no runtime behavior change.
|
|
18
|
+
*/
|
|
19
|
+
type SearxngFactoryConfig = Omit<SearxngConfig, 'spec'> & {
|
|
20
|
+
spec: Omit<SearxngConfig['spec'], 'secretKeyRef'> & {
|
|
21
|
+
secretKeyRef?: {
|
|
22
|
+
name: string | CelExpression<string>;
|
|
23
|
+
key: string | CelExpression<string>;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Create a SearXNG Deployment resource.
|
|
29
|
+
*
|
|
30
|
+
* @example Recommended — mount an existing Secret via `secretKeyRef`
|
|
31
|
+
* ```typescript
|
|
32
|
+
* const search = searxng({
|
|
33
|
+
* name: 'my-searxng',
|
|
34
|
+
* namespace: 'search',
|
|
35
|
+
* spec: {
|
|
36
|
+
* instanceName: 'My Search',
|
|
37
|
+
* search: { formats: ['html', 'json'] },
|
|
38
|
+
* server: { limiter: false },
|
|
39
|
+
* // Secret is managed externally (Vault, external-secrets operator,
|
|
40
|
+
* // or created alongside this factory). The Deployment mounts
|
|
41
|
+
* // SEARXNG_SECRET via valueFrom.secretKeyRef — the plaintext
|
|
42
|
+
* // never enters the Deployment spec.
|
|
43
|
+
* secretKeyRef: { name: 'my-searxng-secret', key: 'secret_key' },
|
|
44
|
+
* },
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @example Discouraged — plaintext `secret_key` in the config
|
|
49
|
+
* ```typescript
|
|
50
|
+
* // Works, but the secret appears in `kubectl get deploy -o yaml` as
|
|
51
|
+
* // Deployment.spec.template.spec.containers[0].env[].value. Prefer the
|
|
52
|
+
* // `secretKeyRef` path above or use the `searxngBootstrap` composition
|
|
53
|
+
* // which auto-creates a K8s Secret and wires it through for you.
|
|
54
|
+
* const search = searxng({
|
|
55
|
+
* name: 'my-searxng',
|
|
56
|
+
* spec: {
|
|
57
|
+
* server: { secret_key: 'change-me-in-production', limiter: false },
|
|
58
|
+
* },
|
|
59
|
+
* });
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
declare function createSearxngResource(config: Composable<SearxngFactoryConfig>): Enhanced<SearxngConfig['spec'], SearxngStatus>;
|
|
63
|
+
export declare const searxng: typeof createSearxngResource;
|
|
64
|
+
export {};
|
|
65
|
+
//# sourceMappingURL=searxng.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searxng.d.ts","sourceRoot":"","sources":["../../../../src/factories/searxng/resources/searxng.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EACV,aAAa,EACb,UAAU,EACV,QAAQ,EAET,MAAM,8BAA8B,CAAC;AAItC,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,aAAa,EACnB,MAAM,aAAa,CAAC;AAErB;;;;;;;;GAQG;AACH,KAAK,oBAAoB,GAAG,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,GAAG;IACxD,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC,GAAG;QAClD,YAAY,CAAC,EAAE;YACb,IAAI,EAAE,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;YACrC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;SACrC,CAAC;KACH,CAAC;CACH,CAAC;AA6BF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,iBAAS,qBAAqB,CAC5B,MAAM,EAAE,UAAU,CAAC,oBAAoB,CAAC,GACvC,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC,CA6HhD;AAED,eAAO,MAAM,OAAO,8BAAwB,CAAC"}
|