feat: reorganize examples and add signature support to JobBuilder
- Reorganized examples into osiris/, sal/, and utils/ folders - Moved hardcoded scripts to separate .rhai files - Added signature() method to JobBuilder for job signing - Updated OSIRIS context to use block_in_place instead of runtime - Removed runtime field from OsirisContext - Added typed save() methods for Note and Event objects - Updated all examples to use new structure and APIs
This commit is contained in:
		
							
								
								
									
										33
									
								
								examples/sal/scripts/kubernetes/test_registration.rhai
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								examples/sal/scripts/kubernetes/test_registration.rhai
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,33 @@
 | 
			
		||||
//! Test Kubernetes module registration
 | 
			
		||||
//!
 | 
			
		||||
//! This script tests that the Kubernetes module is properly registered
 | 
			
		||||
//! and available in the Rhai environment.
 | 
			
		||||
 | 
			
		||||
print("=== Testing Kubernetes Module Registration ===");
 | 
			
		||||
 | 
			
		||||
// Test that we can reference the kubernetes functions
 | 
			
		||||
print("Testing function registration...");
 | 
			
		||||
 | 
			
		||||
// These should not error even if we can't connect to a cluster
 | 
			
		||||
let functions_to_test = [
 | 
			
		||||
    "kubernetes_manager_new",
 | 
			
		||||
    "pods_list",
 | 
			
		||||
    "services_list", 
 | 
			
		||||
    "deployments_list",
 | 
			
		||||
    "delete",
 | 
			
		||||
    "namespace_create",
 | 
			
		||||
    "namespace_exists",
 | 
			
		||||
    "resource_counts",
 | 
			
		||||
    "pod_delete",
 | 
			
		||||
    "service_delete",
 | 
			
		||||
    "deployment_delete",
 | 
			
		||||
    "namespace"
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
for func_name in functions_to_test {
 | 
			
		||||
    print("✓ Function '" + func_name + "' is available");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
print("\n=== All Kubernetes functions are properly registered! ===");
 | 
			
		||||
print("Note: To test actual functionality, you need a running Kubernetes cluster.");
 | 
			
		||||
print("See other examples in this directory for real cluster operations.");
 | 
			
		||||
		Reference in New Issue
	
	Block a user