refactor/ns #74
Labels
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: NationTech/harmony#74
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "refactor/ns"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -287,1 +296,4 @@
}
fn get_tenant_config(&self) -> Option<TenantConfig> {
self.tenant_manager_config.get().cloned()
K8sTenantManager is responsible for concrete implementation. K8sAnywhere should delegate
@ -346,4 +380,7 @@ impl TenantManager for K8sTenantManager {
);
Ok(())
}
fn get_tenant_config(&self) -> Option<TenantConfig> {
Smells like interface segregation issue
@ -43,3 +40,1 @@
kube_controller_manager: false,
kube_etcd: false,
kube_proxy: false,
kubernetes_api_server: true,
FIXME only required components.
@ -0,0 +1,142 @@
// // in your build_score function...
Delete this file
@ -53,0 +63,4 @@
}
pub fn configure_with_topology<T: TenantManager>(&self, topology: &T) {
let ns = topology
Higher level components such as Monitoring, Alerting, etc. Should not be aware of the Tenant concept.
The topology itself should manage internally the logic related to the tenant.
error!("This must be refactored, see comments in pr #74");
@ -20,3 +21,3 @@
}
impl<T: Topology + HelmCommand> Score<T> for HelmPrometheusAlertingScore {
impl<T: Topology + HelmCommand + TenantManager> Score<T> for HelmPrometheusAlertingScore {
as noted in a comment below, should remove TenantManager later
@ -46,0 +58,4 @@
}
#[derive(Debug, Clone, Serialize)]
pub struct Resources {
I wonder if we can replace this with structs from k8s-openapi or kube-rs