44 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			Makefile
		
	
	
	
	
	
		
		
			
		
	
	
			44 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			Makefile
		
	
	
	
	
	
| 
								 | 
							
								set export := true
							 | 
						||
| 
								 | 
							
								verbose := "false"
							 | 
						||
| 
								 | 
							
								diff := "kubectl diff -k"
							 | 
						||
| 
								 | 
							
								apply := "kubectl apply -k"
							 | 
						||
| 
								 | 
							
								redirect := if verbose == "true" { "" } else { "> /dev/null" }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								default:
							 | 
						||
| 
								 | 
							
								    @just --list
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								infisical_bootstrap_secret recreate="":
							 | 
						||
| 
								 | 
							
								    @echo "-- Adding Infisical Bootstrap secret --"
							 | 
						||
| 
								 | 
							
								    @./deploy/00-infisical.sh {{ recreate }}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								_diff_infisical:
							 | 
						||
| 
								 | 
							
								    @echo "-- Diffing Infisical resources --"
							 | 
						||
| 
								 | 
							
								    @{{ diff }} deploy/00-infisical || [ $? -eq 1 ]
							 | 
						||
| 
								 | 
							
								_diff_infra:
							 | 
						||
| 
								 | 
							
								    @echo "-- Diffing Infra resources --"
							 | 
						||
| 
								 | 
							
								    @{{ diff }} deploy/01-infra || [ $? -eq 1 ]
							 | 
						||
| 
								 | 
							
								_diff_apps:
							 | 
						||
| 
								 | 
							
								    @echo "-- Diffing Apps --"
							 | 
						||
| 
								 | 
							
								    @{{ diff }} deploy/10-apps || [ $? -eq 1 ]
							 | 
						||
| 
								 | 
							
								    # @./deploy/10-apps.sh
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								_apply_infisical:
							 | 
						||
| 
								 | 
							
								    @echo "-- Applying Infisical resources --"
							 | 
						||
| 
								 | 
							
								    @{{ apply }} deploy/00-infisical {{ redirect }}
							 | 
						||
| 
								 | 
							
								_apply_infra:
							 | 
						||
| 
								 | 
							
								    @echo "-- Applying Infra resources --"
							 | 
						||
| 
								 | 
							
								    @{{ apply }} deploy/01-infra {{ redirect }}
							 | 
						||
| 
								 | 
							
								    @./deploy/01-infra.sh
							 | 
						||
| 
								 | 
							
								_apply_apps:
							 | 
						||
| 
								 | 
							
								    @echo "-- Applying Apps --"
							 | 
						||
| 
								 | 
							
								    @{{ apply }} deploy/10-apps {{ redirect }}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								_apply_post: _apply_infra _apply_apps
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								diff: _diff_infisical _diff_infra _diff_apps
							 | 
						||
| 
								 | 
							
								apply: _apply_infisical _apply_post
							 | 
						||
| 
								 | 
							
								_deploy recreate="": _apply_infisical (infisical_bootstrap_secret recreate) _apply_post
							 | 
						||
| 
								 | 
							
								deploy: _deploy
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								redeploy: (_deploy "--recreate")
							 |