diff --git a/fleetshard/main.go b/fleetshard/main.go index 1c9a66399..343937929 100644 --- a/fleetshard/main.go +++ b/fleetshard/main.go @@ -76,6 +76,10 @@ func main() { Key: reconciler.TenantIDLabelKey, Operator: metav1.LabelSelectorOpExists, }, + { + Key: reconciler.ProbeLabelKey, + Operator: metav1.LabelSelectorOpDoesNotExist, + }, }, }, } diff --git a/fleetshard/pkg/central/reconciler/reconciler.go b/fleetshard/pkg/central/reconciler/reconciler.go index d9fc7df2c..b5a4274b8 100644 --- a/fleetshard/pkg/central/reconciler/reconciler.go +++ b/fleetshard/pkg/central/reconciler/reconciler.go @@ -74,7 +74,10 @@ const ( managedByLabelKey = "app.kubernetes.io/managed-by" orgIDLabelKey = "rhacs.redhat.com/org-id" TenantIDLabelKey = "rhacs.redhat.com/tenant" - centralExpiredAtKey = "rhacs.redhat.com/expired-at" + + ProbeLabelKey = "rhacs.redhat.com/probe" + + centralExpiredAtKey = "rhacs.redhat.com/expired-at" auditLogNotifierKey = "com.redhat.rhacs.auditLogNotifier" auditLogNotifierName = "Platform Audit Logs" @@ -1857,13 +1860,17 @@ func (r *CentralReconciler) ensureRouteDeleted(ctx context.Context, routeSupplie } func getTenantLabels(c private.ManagedCentral) map[string]string { - return map[string]string{ + labels := map[string]string{ managedByLabelKey: labelManagedByFleetshardValue, instanceLabelKey: c.Metadata.Name, orgIDLabelKey: c.Spec.Auth.OwnerOrgId, TenantIDLabelKey: c.Id, instanceTypeLabelKey: c.Spec.InstanceType, } + if c.Metadata.Internal { + labels[ProbeLabelKey] = "" + } + return labels } func getTenantAnnotations(c private.ManagedCentral) map[string]string {