wip: argocd discovery
This commit is contained in:
		
							parent
							
								
									cb7a64b160
								
							
						
					
					
						commit
						8fb755cda1
					
				| @ -59,6 +59,7 @@ impl<T: Topology + K8sclient + HelmCommand + Ingress> Interpret<T> for ArgoInter | |||||||
|         let svc = format!("argo-{}", self.score.namespace.clone()); |         let svc = format!("argo-{}", self.score.namespace.clone()); | ||||||
|         let domain = topology.get_domain(&svc).await?; |         let domain = topology.get_domain(&svc).await?; | ||||||
|         // FIXME we now have a way to know if we're running on openshift family
 |         // FIXME we now have a way to know if we're running on openshift family
 | ||||||
|  |         
 | ||||||
|         let helm_score = |         let helm_score = | ||||||
|             argo_helm_chart_score(&self.score.namespace, self.score.openshift, &domain); 
 |             argo_helm_chart_score(&self.score.namespace, self.score.openshift, &domain); 
 | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										20
									
								
								harmony/src/modules/argocd/discover.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								harmony/src/modules/argocd/discover.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,20 @@ | |||||||
|  | /// Discover the current ArgoCD setup
 | ||||||
|  | ///
 | ||||||
|  | /// 1. No argo installed
 | ||||||
|  | /// 2. Argo installed in current namespace
 | ||||||
|  | /// 3. Argo installed in different namespace (assuming cluster wide access)
 | ||||||
|  | /// 
 | ||||||
|  | /// For now we will go ahead with this very basic logic, there are many intricacies that can be
 | ||||||
|  | /// dealt with later, such as multitenant management in a single argo instance, credentials setup t
 | ||||||
|  | 
 | ||||||
|  | #[async_trait] | ||||||
|  | pub trait ArgoCD { | ||||||
|  |     async fn ensure_installed() { | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | struct CurrentNamespaceArgo; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | impl ArgoCD for CurrentNamespaceArgo { | ||||||
|  | } | ||||||
							
								
								
									
										2
									
								
								harmony/src/modules/argocd/mod.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								harmony/src/modules/argocd/mod.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,2 @@ | |||||||
|  | mod discover; | ||||||
|  | pub use discover::*; | ||||||
| @ -17,3 +17,4 @@ pub mod prometheus; | |||||||
| pub mod storage; | pub mod storage; | ||||||
| pub mod tenant; | pub mod tenant; | ||||||
| pub mod tftp; | pub mod tftp; | ||||||
|  | pub mod argocd; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user