Skip to content

Commit 25c9144

Browse files
Arta AsadiArta Asadi
authored andcommitted
fix: cluster columns
1 parent 1bdb3a3 commit 25c9144

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

cloudql/kubernetes/common_column.go

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,36 @@ func objectMetadataColumns() []*plugin.Column {
3333
}
3434
}
3535

36+
func commonGeneralColumns(c []*plugin.Column) []*plugin.Column {
37+
c = append(c, []*plugin.Column{
38+
{
39+
Name: "platform_integration_id",
40+
Type: proto.ColumnType_STRING,
41+
Description: "The Platform Integration ID in which the resource is located.",
42+
Transform: transform.FromField("IntegrationID"),
43+
},
44+
{
45+
Name: "platform_resource_id",
46+
Type: proto.ColumnType_STRING,
47+
Description: "The unique ID of the resource in opengovernance.",
48+
Transform: transform.FromField("PlatformID"),
49+
},
50+
{
51+
Name: "platform_metadata",
52+
Type: proto.ColumnType_JSON,
53+
Description: "The metadata of the resource",
54+
Transform: transform.FromField("Metadata").Transform(marshalJSON),
55+
},
56+
{
57+
Name: "platform_resource_description",
58+
Type: proto.ColumnType_JSON,
59+
Description: "The full model description of the resource",
60+
Transform: transform.FromField("Description").Transform(marshalJSON),
61+
},
62+
}...)
63+
return c
64+
}
65+
3666
func commonColumns(c []*plugin.Column) []*plugin.Column {
3767
res := objectMetadataColumns()
3868
res = append(res, c...)

cloudql/kubernetes/table_kubernetes_cluster.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func tableKubernetesCluster(ctx context.Context) *plugin.Table {
1616
List: &plugin.ListConfig{
1717
Hydrate: opengovernance.ListKubernetesCluster,
1818
},
19-
Columns: commonColumns([]*plugin.Column{
19+
Columns: commonGeneralColumns([]*plugin.Column{
2020
{
2121
Name: "context_name",
2222
Type: proto.ColumnType_STRING,

0 commit comments

Comments
 (0)