57 lines
2.1 KiB
Plaintext
57 lines
2.1 KiB
Plaintext
# Main entry point for provisioning KCL module
|
|
# This file imports all schemas to make them discoverable as package submodules
|
|
# Author: JesusPerezLorenzo
|
|
# Release: 0.1.0
|
|
# Date: 29-09-2025
|
|
|
|
# ============================================================================
|
|
# IMPORTANT: KCL Import Pattern
|
|
# ============================================================================
|
|
# This module uses DIRECT SUBMODULE IMPORTS pattern (no re-exports).
|
|
#
|
|
# WHY NO RE-EXPORTS?
|
|
# Re-exports like "Settings = settings.Settings" create immutable variable
|
|
# assignments in KCL, causing ImmutableError (E1001) when extensions try to
|
|
# import them. KCL v0.11.3 doesn't support Python-style namespace re-exports.
|
|
#
|
|
# CORRECT USAGE IN EXTENSIONS:
|
|
# import provisioning.settings # For Settings, SecretProvider, SopsConfig
|
|
# import provisioning.defaults # For ServerDefaults schemas
|
|
# import provisioning.lib # For Storage, TaskServDef, ClusterDef
|
|
# import provisioning.server # For Server schema
|
|
# import provisioning.cluster # For Cluster schema
|
|
# import provisioning.dependencies # For TaskservDependencies, HealthCheck
|
|
# import provisioning.workflows # For BatchWorkflow, BatchOperation
|
|
# import provisioning.batch # For BatchScheduler, BatchExecutor
|
|
# import provisioning.version # For Version, TaskservVersion
|
|
# import provisioning.k8s_deploy # For K8s* schemas
|
|
# import provisioning.services # For ServiceRegistry, ServiceDefinition
|
|
#
|
|
# EXAMPLE:
|
|
# import provisioning.lib as lib
|
|
# import provisioning.settings as settings
|
|
#
|
|
# _storage = lib.Storage {
|
|
# device = "/dev/sda"
|
|
# size = 100
|
|
# }
|
|
#
|
|
# ANTI-PATTERN (DO NOT USE):
|
|
# Settings = settings.Settings # ❌ Causes ImmutableError!
|
|
# Server = server.Server # ❌ Causes ImmutableError!
|
|
#
|
|
# ============================================================================
|
|
|
|
# Import core module schemas to make them part of the provisioning package
|
|
import .settings
|
|
import .defaults
|
|
import .lib
|
|
import .server
|
|
import .cluster
|
|
import .dependencies
|
|
import .workflows
|
|
import .batch
|
|
import .version
|
|
import .k8s_deploy
|
|
import .services
|