From cda40ce2ab56c4c34f133e8a29f1e560a5f209b2 Mon Sep 17 00:00:00 2001 From: Kristof Gyuracz Date: Fri, 23 Feb 2024 11:58:10 +0100 Subject: [PATCH] feat: add tenant-all category to all resources, so we can use kubectl get telemetry-all Signed-off-by: Kristof Gyuracz --- api/telemetry/v1alpha1/collector_types.go | 4 ++-- api/telemetry/v1alpha1/subscription_types.go | 1 + api/telemetry/v1alpha1/tenant_types.go | 2 +- config/crd/bases/telemetry.kube-logging.dev_collectors.yaml | 2 ++ .../crd/bases/telemetry.kube-logging.dev_subscriptions.yaml | 2 ++ config/crd/bases/telemetry.kube-logging.dev_tenants.yaml | 2 ++ 6 files changed, 10 insertions(+), 3 deletions(-) diff --git a/api/telemetry/v1alpha1/collector_types.go b/api/telemetry/v1alpha1/collector_types.go index c64bce34..1ec77358 100644 --- a/api/telemetry/v1alpha1/collector_types.go +++ b/api/telemetry/v1alpha1/collector_types.go @@ -30,9 +30,9 @@ type CollectorStatus struct { } //+kubebuilder:object:root=true -//+kubebuilder:resource:scope=Cluster +//+kubebuilder:resource:scope=Cluster,categories=telemetry-all //+kubebuilder:subresource:status -// +kubebuilder:printcolumn:name="Tenants",type=string,JSONPath=`.status.tenants` +//+kubebuilder:printcolumn:name="Tenants",type=string,JSONPath=`.status.tenants` // Collector is the Schema for the collectors API type Collector struct { diff --git a/api/telemetry/v1alpha1/subscription_types.go b/api/telemetry/v1alpha1/subscription_types.go index d7202ad0..54f3c628 100644 --- a/api/telemetry/v1alpha1/subscription_types.go +++ b/api/telemetry/v1alpha1/subscription_types.go @@ -32,6 +32,7 @@ type SubscriptionStatus struct { // +kubebuilder:object:root=true // +kubebuilder:subresource:status //+kubebuilder:printcolumn:name="Tenant",type=string,JSONPath=`.status.tenant` +//+kubebuilder:resource:categories=telemetry-all // Subscription is the Schema for the subscriptions API type Subscription struct { diff --git a/api/telemetry/v1alpha1/tenant_types.go b/api/telemetry/v1alpha1/tenant_types.go index b7015405..b905fa31 100644 --- a/api/telemetry/v1alpha1/tenant_types.go +++ b/api/telemetry/v1alpha1/tenant_types.go @@ -32,7 +32,7 @@ type TenantStatus struct { } //+kubebuilder:object:root=true -//+kubebuilder:resource:scope=Cluster +//+kubebuilder:resource:scope=Cluster,categories=telemetry-all //+kubebuilder:subresource:status //+kubebuilder:printcolumn:name="Subscriptions",type=string,JSONPath=`.status.subscriptions` //+kubebuilder:printcolumn:name="Logsource namespaces",type=string,JSONPath=`.status.logSourceNamespaces` diff --git a/config/crd/bases/telemetry.kube-logging.dev_collectors.yaml b/config/crd/bases/telemetry.kube-logging.dev_collectors.yaml index c537a40a..c7d5eb0d 100644 --- a/config/crd/bases/telemetry.kube-logging.dev_collectors.yaml +++ b/config/crd/bases/telemetry.kube-logging.dev_collectors.yaml @@ -8,6 +8,8 @@ metadata: spec: group: telemetry.kube-logging.dev names: + categories: + - telemetry-all kind: Collector listKind: CollectorList plural: collectors diff --git a/config/crd/bases/telemetry.kube-logging.dev_subscriptions.yaml b/config/crd/bases/telemetry.kube-logging.dev_subscriptions.yaml index 671fd156..83910b87 100644 --- a/config/crd/bases/telemetry.kube-logging.dev_subscriptions.yaml +++ b/config/crd/bases/telemetry.kube-logging.dev_subscriptions.yaml @@ -8,6 +8,8 @@ metadata: spec: group: telemetry.kube-logging.dev names: + categories: + - telemetry-all kind: Subscription listKind: SubscriptionList plural: subscriptions diff --git a/config/crd/bases/telemetry.kube-logging.dev_tenants.yaml b/config/crd/bases/telemetry.kube-logging.dev_tenants.yaml index 84999a79..1524595c 100644 --- a/config/crd/bases/telemetry.kube-logging.dev_tenants.yaml +++ b/config/crd/bases/telemetry.kube-logging.dev_tenants.yaml @@ -8,6 +8,8 @@ metadata: spec: group: telemetry.kube-logging.dev names: + categories: + - telemetry-all kind: Tenant listKind: TenantList plural: tenants