diff --git a/analysis/v1alpha1/types.go b/analysis/v1alpha1/types.go index c3d9d75..5562bfa 100644 --- a/analysis/v1alpha1/types.go +++ b/analysis/v1alpha1/types.go @@ -31,6 +31,13 @@ const ( // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true // +kubebuilder:resource:shortName=recommend +// +kubebuilder:printcolumn:name="Type",type=string,JSONPath=`.spec.type` +// +kubebuilder:printcolumn:name="TargetKind",type=string,JSONPath=`.spec.targetRef.kind` +// +kubebuilder:printcolumn:name="TargetNamespace",type=string,JSONPath=`.spec.targetRef.namespace` +// +kubebuilder:printcolumn:name="TargetName",type=string,JSONPath=`.spec.targetRef.name` +// +kubebuilder:printcolumn:name="Strategy",type=string,JSONPath=`.spec.completionStrategy.completionStrategyType` +// +kubebuilder:printcolumn:name="PeriodSeconds",type=string,JSONPath=`.spec.completionStrategy.periodSeconds` +// +kubebuilder:printcolumn:name="AdoptionType",type=string,JSONPath=`.spec.adoptionType` // Recommendation represents the configuration of a single recommendation. type Recommendation struct { @@ -96,6 +103,9 @@ type RecommendationList struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true // +kubebuilder:resource:shortName=analytics +// +kubebuilder:printcolumn:name="Type",type=string,JSONPath=`.spec.type` +// +kubebuilder:printcolumn:name="Strategy",type=string,JSONPath=`.spec.completionStrategy.completionStrategyType` +// +kubebuilder:printcolumn:name="PeriodSeconds",type=string,JSONPath=`.spec.completionStrategy.periodSeconds` // Analytics represents the configuration of an analytics object. type Analytics struct { diff --git a/artifacts/deploy/analysis.crane.io_analytics.yaml b/artifacts/deploy/analysis.crane.io_analytics.yaml index 79a1224..63b0929 100644 --- a/artifacts/deploy/analysis.crane.io_analytics.yaml +++ b/artifacts/deploy/analysis.crane.io_analytics.yaml @@ -18,7 +18,17 @@ spec: singular: analytics scope: Namespaced versions: - - name: v1alpha1 + - additionalPrinterColumns: + - jsonPath: .spec.type + name: Type + type: string + - jsonPath: .spec.completionStrategy.completionStrategyType + name: Strategy + type: string + - jsonPath: .spec.completionStrategy.periodSeconds + name: PeriodSeconds + type: string + name: v1alpha1 schema: openAPIV3Schema: description: Analytics represents the configuration of an analytics object. @@ -328,6 +338,7 @@ spec: type: object served: true storage: true + subresources: {} status: acceptedNames: kind: "" diff --git a/artifacts/deploy/analysis.crane.io_recommendations.yaml b/artifacts/deploy/analysis.crane.io_recommendations.yaml index d09ef26..9c78970 100644 --- a/artifacts/deploy/analysis.crane.io_recommendations.yaml +++ b/artifacts/deploy/analysis.crane.io_recommendations.yaml @@ -18,7 +18,29 @@ spec: singular: recommendation scope: Namespaced versions: - - name: v1alpha1 + - additionalPrinterColumns: + - jsonPath: .spec.type + name: Type + type: string + - jsonPath: .spec.targetRef.kind + name: TargetKind + type: string + - jsonPath: .spec.targetRef.namespace + name: TargetNamespace + type: string + - jsonPath: .spec.targetRef.name + name: TargetName + type: string + - jsonPath: .spec.completionStrategy.completionStrategyType + name: Strategy + type: string + - jsonPath: .spec.completionStrategy.periodSeconds + name: PeriodSeconds + type: string + - jsonPath: .spec.adoptionType + name: AdoptionType + type: string + name: v1alpha1 schema: openAPIV3Schema: description: Recommendation represents the configuration of a single recommendation. @@ -216,6 +238,7 @@ spec: type: object served: true storage: true + subresources: {} status: acceptedNames: kind: ""