Update image references for nginx and caddy, and enhance environment injection for deployments
This commit is contained in:
		
							parent
							
								
									a890a979e9
								
							
						
					
					
						commit
						6edd214baf
					
				@ -24,7 +24,7 @@ appRender = lambda a: App {
 | 
			
		||||
            template.spec.containers = [
 | 
			
		||||
                {
 | 
			
		||||
                    name = a.name
 | 
			
		||||
                    image = a.image
 | 
			
		||||
                    image = "cr.suyiiyii.top/docker.io" + a.image
 | 
			
		||||
                    ports = [{containerPort = a.port}]
 | 
			
		||||
                }
 | 
			
		||||
            ]
 | 
			
		||||
 | 
			
		||||
@ -17,12 +17,13 @@ envSecretRender = lambda e: Envs {
 | 
			
		||||
    [secret]
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
envInjector = lambda envs: Envs, deploy {
 | 
			
		||||
envInjector = lambda envs: Envs, input: appsv1.Deployment | any {
 | 
			
		||||
    """Inject envs to Deployment"""
 | 
			
		||||
    _result = {}
 | 
			
		||||
    if deploy.kind != "Deployment":
 | 
			
		||||
        _result = deploy
 | 
			
		||||
    _result: any = {}
 | 
			
		||||
    if input.kind != "Deployment":
 | 
			
		||||
        input
 | 
			
		||||
    else:
 | 
			
		||||
        deploy: appsv1.Deployment = input as appsv1.Deployment
 | 
			
		||||
        secretEnv: [corev1.EnvVar] = [{
 | 
			
		||||
            name = k
 | 
			
		||||
            valueFrom = {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user