Skip to content

Commit

Permalink
feat: Add proper categories for telemetry CRDs (#1487)
Browse files Browse the repository at this point in the history
  • Loading branch information
a-thaler authored Oct 4, 2024
1 parent 7621377 commit 08dacbb
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 12 deletions.
2 changes: 2 additions & 0 deletions apis/operator/v1alpha1/telemetry_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,12 @@ type OTLPEndpoints struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:resource:scope=Namespaced,categories={kyma-modules,kyma-telemetry}
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="generation",type="integer",JSONPath=".metadata.generation"
// +kubebuilder:printcolumn:name="age",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:printcolumn:name="state",type="string",JSONPath=".status.state"

// Telemetry is the Schema for the telemetries API
type Telemetry struct {
metav1.TypeMeta `json:",inline"`
Expand Down
3 changes: 2 additions & 1 deletion apis/telemetry/v1alpha1/logpipeline_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,14 @@ type LogPipelineStatus struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:resource:scope=Cluster,categories={telemetry-pipelines}
// +kubebuilder:resource:scope=Cluster,categories={kyma-telemetry,kyma-telemetry-pipelines}
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Configuration Generated",type=string,JSONPath=`.status.conditions[?(@.type=="ConfigurationGenerated")].status`
// +kubebuilder:printcolumn:name="Agent Healthy",type=string,JSONPath=`.status.conditions[?(@.type=="AgentHealthy")].status`
// +kubebuilder:printcolumn:name="Flow Healthy",type=string,JSONPath=`.status.conditions[?(@.type=="TelemetryFlowHealthy")].status`
// +kubebuilder:printcolumn:name="Unsupported Mode",type=boolean,JSONPath=`.status.unsupportedMode`
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`

// LogPipeline is the Schema for the logpipelines API
type LogPipeline struct {
metav1.TypeMeta `json:",inline"`
Expand Down
2 changes: 1 addition & 1 deletion apis/telemetry/v1alpha1/metricpipeline_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type MetricPipelineList struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:resource:scope=Cluster,categories={telemetry-pipelines}
// +kubebuilder:resource:scope=Cluster,categories={kyma-telemetry,kyma-telemetry-pipelines}
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Configuration Generated",type=string,JSONPath=`.status.conditions[?(@.type=="ConfigurationGenerated")].status`
// +kubebuilder:printcolumn:name="Gateway Healthy",type=string,JSONPath=`.status.conditions[?(@.type=="GatewayHealthy")].status`
Expand Down
3 changes: 2 additions & 1 deletion apis/telemetry/v1alpha1/tracepipeline_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@ type TracePipelineStatus struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:resource:scope=Cluster,categories={telemetry-pipelines}
// +kubebuilder:resource:scope=Cluster,categories={kyma-telemetry,kyma-telemetry-pipelines}
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Configuration Generated",type=string,JSONPath=`.status.conditions[?(@.type=="ConfigurationGenerated")].status`
// +kubebuilder:printcolumn:name="Gateway Healthy",type=string,JSONPath=`.status.conditions[?(@.type=="GatewayHealthy")].status`
// +kubebuilder:printcolumn:name="Flow Healthy",type=string,JSONPath=`.status.conditions[?(@.type=="TelemetryFlowHealthy")].status`
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`

// TracePipeline is the Schema for the tracepipelines API
type TracePipeline struct {
metav1.TypeMeta `json:",inline"`
Expand Down
2 changes: 1 addition & 1 deletion apis/telemetry/v1beta1/logpipeline_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
)

// +kubebuilder:object:root=true
// +kubebuilder:resource:scope=Cluster,categories={telemetry-pipelines}
// +kubebuilder:resource:scope=Cluster,categories={kyma-telemetry,kyma-telemetry-pipelines}
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Configuration Generated",type=string,JSONPath=`.status.conditions[?(@.type=="ConfigurationGenerated")].status`
// +kubebuilder:printcolumn:name="Agent Healthy",type=string,JSONPath=`.status.conditions[?(@.type=="AgentHealthy")].status`
Expand Down
2 changes: 1 addition & 1 deletion apis/telemetry/v1beta1/metricpipeline_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
)

// +kubebuilder:object:root=true
// +kubebuilder:resource:scope=Cluster,categories={telemetry-pipelines}
// +kubebuilder:resource:scope=Cluster,categories={kyma-telemetry,kyma-telemetry-pipelines}
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Configuration Generated",type=string,JSONPath=`.status.conditions[?(@.type=="ConfigurationGenerated")].status`
// +kubebuilder:printcolumn:name="Gateway Healthy",type=string,JSONPath=`.status.conditions[?(@.type=="GatewayHealthy")].status`
Expand Down
2 changes: 1 addition & 1 deletion apis/telemetry/v1beta1/tracepipeline_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
)

// +kubebuilder:object:root=true
// +kubebuilder:resource:scope=Cluster,categories={telemetry-pipelines}
// +kubebuilder:resource:scope=Cluster,categories={kyma-telemetry,kyma-telemetry-pipelines}
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Configuration Generated",type=string,JSONPath=`.status.conditions[?(@.type=="ConfigurationGenerated")].status`
// +kubebuilder:printcolumn:name="Gateway Healthy",type=string,JSONPath=`.status.conditions[?(@.type=="GatewayHealthy")].status`
Expand Down
3 changes: 3 additions & 0 deletions config/crd/bases/operator.kyma-project.io_telemetries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ metadata:
spec:
group: operator.kyma-project.io
names:
categories:
- kyma-modules
- kyma-telemetry
kind: Telemetry
listKind: TelemetryList
plural: telemetries
Expand Down
3 changes: 2 additions & 1 deletion config/crd/bases/telemetry.kyma-project.io_logpipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ spec:
group: telemetry.kyma-project.io
names:
categories:
- telemetry-pipelines
- kyma-telemetry
- kyma-telemetry-pipelines
kind: LogPipeline
listKind: LogPipelineList
plural: logpipelines
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ spec:
group: telemetry.kyma-project.io
names:
categories:
- telemetry-pipelines
- kyma-telemetry
- kyma-telemetry-pipelines
kind: MetricPipeline
listKind: MetricPipelineList
plural: metricpipelines
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ spec:
group: telemetry.kyma-project.io
names:
categories:
- telemetry-pipelines
- kyma-telemetry
- kyma-telemetry-pipelines
kind: TracePipeline
listKind: TracePipelineList
plural: tracepipelines
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ metadata:
spec:
group: operator.kyma-project.io
names:
categories:
- kyma-modules
- kyma-telemetry
kind: Telemetry
listKind: TelemetryList
plural: telemetries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ spec:
group: telemetry.kyma-project.io
names:
categories:
- telemetry-pipelines
- kyma-telemetry
- kyma-telemetry-pipelines
kind: LogPipeline
listKind: LogPipelineList
plural: logpipelines
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ spec:
group: telemetry.kyma-project.io
names:
categories:
- telemetry-pipelines
- kyma-telemetry
- kyma-telemetry-pipelines
kind: MetricPipeline
listKind: MetricPipelineList
plural: metricpipelines
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ spec:
group: telemetry.kyma-project.io
names:
categories:
- telemetry-pipelines
- kyma-telemetry
- kyma-telemetry-pipelines
kind: TracePipeline
listKind: TracePipelineList
plural: tracepipelines
Expand Down

0 comments on commit 08dacbb

Please sign in to comment.