Add tenant node status collection and node watchers

Agent-Logs-Url: https://github.com/projectcapsule/capsule/sessions/35d75f80-a2f5-4f3f-a0f8-db8fcf20edce

Co-authored-by: oliverbaehler <26610571+oliverbaehler@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-20 09:24:49 +00:00
committed by GitHub
co-authored by oliverbaehler
parent 96d06c715b
commit 95e8a8c312
7 changed files with 329 additions and 0 deletions
+2
View File
@@ -13,6 +13,8 @@ const (
// Returns the observed state of the Tenant.
type TenantStatus struct {
// List of nodes assigned to the Tenant.
Nodes []string `json:"nodes,omitempty"`
// +kubebuilder:default=Active
// The operational state of the Tenant. Possible values are "Active", "Cordoned".
State tenantState `json:"state"`
+2
View File
@@ -158,6 +158,7 @@ func (in *Tenant) ConvertFrom(raw conversion.Hub) error {
in.SetAnnotations(annotations)
in.Status.Namespaces = src.Status.Namespaces
in.Status.Nodes = src.Status.Nodes
in.Status.Size = src.Status.Size
switch src.Status.State {
@@ -280,6 +281,7 @@ func (in *Tenant) ConvertTo(raw conversion.Hub) error {
dst.Status.Size = in.Status.Size
dst.Status.Namespaces = in.Status.Namespaces
dst.Status.Nodes = in.Status.Nodes
switch in.Status.State {
case TenantStateActive:
+3
View File
@@ -65,6 +65,9 @@ type TenantStatusNamespaceMetadata struct {
}
type TenantAvailableStatus struct {
// Available Nodes within Tenant
// +optional
Nodes []string `json:"nodes,omitempty"`
// Available Class Types within Tenant
// +optional
Classes TenantAvailableClassesStatus `json:"classes,omitzero"`