Skip to content

Commit

Permalink
Merge pull request #38 from kube-logging/query-all
Browse files Browse the repository at this point in the history
feat: add tenant-all category to all resources, so we can use kubectl get telemetry-all
  • Loading branch information
OverOrion authored Feb 23, 2024
2 parents df4ece4 + cda40ce commit 4ccb9b7
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions api/telemetry/v1alpha1/collector_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions api/telemetry/v1alpha1/subscription_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion api/telemetry/v1alpha1/tenant_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 2 additions & 0 deletions config/crd/bases/telemetry.kube-logging.dev_collectors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
spec:
group: telemetry.kube-logging.dev
names:
categories:
- telemetry-all
kind: Collector
listKind: CollectorList
plural: collectors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
spec:
group: telemetry.kube-logging.dev
names:
categories:
- telemetry-all
kind: Subscription
listKind: SubscriptionList
plural: subscriptions
Expand Down
2 changes: 2 additions & 0 deletions config/crd/bases/telemetry.kube-logging.dev_tenants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
spec:
group: telemetry.kube-logging.dev
names:
categories:
- telemetry-all
kind: Tenant
listKind: TenantList
plural: tenants
Expand Down

0 comments on commit 4ccb9b7

Please sign in to comment.