refactor/ns #74

Merged
wjro merged 8 commits from refactor/ns into master 2025-07-02 19:54:33 +00:00
Owner
No description provided.
wjro added 3 commits 2025-07-02 15:16:46 +00:00
wjro added 1 commit 2025-07-02 15:27:40 +00:00
fix merge conflict
All checks were successful
Run Check Script / check (pull_request) Successful in 1m50s
e857efa92f
johnride requested changes 2025-07-02 15:58:13 +00:00
@ -287,1 +296,4 @@
}
fn get_tenant_config(&self) -> Option<TenantConfig> {
self.tenant_manager_config.get().cloned()
Owner

K8sTenantManager is responsible for concrete implementation. K8sAnywhere should delegate

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> {
Owner

Smells like interface segregation issue

Smells like interface segregation issue
@ -43,3 +40,1 @@
kube_controller_manager: false,
kube_etcd: false,
kube_proxy: false,
kubernetes_api_server: true,
Owner

FIXME only required components.

FIXME only required components.
@ -0,0 +1,142 @@
// // in your build_score function...
Owner

Delete this file

Delete this file
@ -53,0 +63,4 @@
}
pub fn configure_with_topology<T: TenantManager>(&self, topology: &T) {
let ns = topology
Owner

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");

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");
wjro added 1 commit 2025-07-02 17:35:48 +00:00
fix: comments from pr
All checks were successful
Run Check Script / check (pull_request) Successful in 5s
f2a350fae6
wjro added 1 commit 2025-07-02 17:46:47 +00:00
fix: merge conflict
Some checks failed
Run Check Script / check (pull_request) Failing after 41s
82119076cf
taha approved these changes 2025-07-02 18:32:58 +00:00
@ -20,3 +21,3 @@
}
impl<T: Topology + HelmCommand> Score<T> for HelmPrometheusAlertingScore {
impl<T: Topology + HelmCommand + TenantManager> Score<T> for HelmPrometheusAlertingScore {
Collaborator

as noted in a comment below, should remove TenantManager later

as noted in a comment below, should remove TenantManager later
@ -46,0 +58,4 @@
}
#[derive(Debug, Clone, Serialize)]
pub struct Resources {
Collaborator

I wonder if we can replace this with structs from k8s-openapi or kube-rs

I wonder if we can replace this with structs from k8s-openapi or kube-rs
wjro added 2 commits 2025-07-02 19:52:32 +00:00
wjro merged commit 6bf10b093c into master 2025-07-02 19:54:33 +00:00
wjro deleted branch refactor/ns 2025-07-02 19:54:34 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: NationTech/harmony#74
No description provided.