Add initial KCL deployment configuration for nginx and project setup
This commit is contained in:
		
						commit
						6d793e89b3
					
				
							
								
								
									
										22
									
								
								base/deploy.k
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								base/deploy.k
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,22 @@
 | 
			
		||||
import k8s.api.apps.v1 as appsv1
 | 
			
		||||
 | 
			
		||||
a = appsv1.Deployment {
 | 
			
		||||
    apiVersion = "apps/v1"
 | 
			
		||||
    kind = "Deployment"
 | 
			
		||||
    metadata = {
 | 
			
		||||
        name = "nginx"
 | 
			
		||||
        labels.app = "nginx"
 | 
			
		||||
    }
 | 
			
		||||
    spec = {
 | 
			
		||||
        replicas = 3
 | 
			
		||||
        selector.matchLabels = metadata.labels
 | 
			
		||||
        template.metadata.labels = metadata.labels
 | 
			
		||||
        template.spec.containers = [
 | 
			
		||||
            {
 | 
			
		||||
                name = metadata.name
 | 
			
		||||
                image = "nginx:1.14.2"
 | 
			
		||||
                ports = [{ containerPort = 80 }]
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										7
									
								
								kcl.mod
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								kcl.mod
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,7 @@
 | 
			
		||||
[package]
 | 
			
		||||
name = "doutok"
 | 
			
		||||
edition = "v0.11.1"
 | 
			
		||||
version = "0.0.1"
 | 
			
		||||
 | 
			
		||||
[dependencies]
 | 
			
		||||
k8s = "1.31.2"
 | 
			
		||||
							
								
								
									
										9
									
								
								kcl.mod.lock
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								kcl.mod.lock
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,9 @@
 | 
			
		||||
[dependencies]
 | 
			
		||||
  [dependencies.k8s]
 | 
			
		||||
    name = "k8s"
 | 
			
		||||
    full_name = "k8s_1.31.2"
 | 
			
		||||
    version = "1.31.2"
 | 
			
		||||
    sum = "xBZgPsnpVVyWBpahuPQHReeRx28eUHGFoaPeqbct+vs="
 | 
			
		||||
    reg = "ghcr.io"
 | 
			
		||||
    repo = "kcl-lang/k8s"
 | 
			
		||||
    oci_tag = "1.31.2"
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user