Skip to content

Commit 7fdfd1e

Browse files
authored
Merge pull request #615 from gianlucam76/print
ClusterSummary display
2 parents 3112fbc + 87ccf54 commit 7fdfd1e

File tree

3 files changed

+38
-2
lines changed

3 files changed

+38
-2
lines changed

api/v1beta1/clustersummary_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,14 @@ type ClusterSummaryStatus struct {
207207
HelmReleaseSummaries []HelmChartSummary `json:"helmReleaseSummaries,omitempty"`
208208
}
209209

210+
//nolint: lll // marker
210211
// +kubebuilder:object:root=true
211212
// +kubebuilder:resource:path=clustersummaries,scope=Namespaced
212213
// +kubebuilder:subresource:status
213214
// +kubebuilder:storageversion
215+
// +kubebuilder:printcolumn:name="HelmCharts",type="string",JSONPath=".status.featureSummaries[?(@.featureID==\"Helm\")].status",description="Indicates whether HelmCharts are all provisioned",priority=2
216+
// +kubebuilder:printcolumn:name="KustomizeRefs",type="string",JSONPath=".status.featureSummaries[?(@.featureID==\"Kustomize\")].status",description="Indicates whether KustomizeRefs are all provisioned",priority=2
217+
// +kubebuilder:printcolumn:name="PolicyRefs",type="string",JSONPath=".status.featureSummaries[?(@.featureID==\"Resources\")].status",description="Indicates whether PolicyRefs are all provisioned",priority=2
214218

215219
// ClusterSummary is the Schema for the clustersummaries API
216220
type ClusterSummary struct {

config/crd/bases/config.projectsveltos.io_clustersummaries.yaml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,23 @@ spec:
941941
storage: false
942942
subresources:
943943
status: {}
944-
- name: v1beta1
944+
- additionalPrinterColumns:
945+
- description: Indicates whether HelmCharts are all provisioned
946+
jsonPath: .status.featureSummaries[?(@.featureID=="Helm")].status
947+
name: HelmCharts
948+
priority: 2
949+
type: string
950+
- description: Indicates whether KustomizeRefs are all provisioned
951+
jsonPath: .status.featureSummaries[?(@.featureID=="Kustomize")].status
952+
name: KustomizeRefs
953+
priority: 2
954+
type: string
955+
- description: Indicates whether PolicyRefs are all provisioned
956+
jsonPath: .status.featureSummaries[?(@.featureID=="Resources")].status
957+
name: PolicyRefs
958+
priority: 2
959+
type: string
960+
name: v1beta1
945961
schema:
946962
openAPIV3Schema:
947963
description: ClusterSummary is the Schema for the clustersummaries API

manifest/manifest.yaml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4480,7 +4480,23 @@ spec:
44804480
storage: false
44814481
subresources:
44824482
status: {}
4483-
- name: v1beta1
4483+
- additionalPrinterColumns:
4484+
- description: Indicates whether HelmCharts are all provisioned
4485+
jsonPath: .status.featureSummaries[?(@.featureID=="Helm")].status
4486+
name: HelmCharts
4487+
priority: 2
4488+
type: string
4489+
- description: Indicates whether KustomizeRefs are all provisioned
4490+
jsonPath: .status.featureSummaries[?(@.featureID=="Kustomize")].status
4491+
name: KustomizeRefs
4492+
priority: 2
4493+
type: string
4494+
- description: Indicates whether PolicyRefs are all provisioned
4495+
jsonPath: .status.featureSummaries[?(@.featureID=="Resources")].status
4496+
name: PolicyRefs
4497+
priority: 2
4498+
type: string
4499+
name: v1beta1
44844500
schema:
44854501
openAPIV3Schema:
44864502
description: ClusterSummary is the Schema for the clustersummaries API

0 commit comments

Comments
 (0)