Skip to content

Commit

Permalink
Fix inconsistent columns for Kubernetes CRDs (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
dongho-jung authored Jun 3, 2024
1 parent df51f28 commit 494d1ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kubernetes/table_kubernetes_custom_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ func getCustomResourcesDynamicColumns(ctx context.Context, versionSchemaSpec int
allColumns := []string{"name", "uid", "kind", "api_version", "namespace", "creation_timestamp", "labels", "start_line", "end_line", "path", "source_type", "annotations", "context_name"}

// add the spec columns
flag := 0
schemaSpec := versionSchemaSpec.(v1.JSONSchemaProps)
for k, v := range schemaSpec.Properties {
flag := 0
for _, specColumn := range allColumns {
if specColumn == strcase.ToSnake(k) {
flag = 1
Expand All @@ -78,9 +78,9 @@ func getCustomResourcesDynamicColumns(ctx context.Context, versionSchemaSpec int
}

// add the status columns
flag = 0
schemaStatus := versionSchemaStatus.(v1.JSONSchemaProps)
for k, v := range schemaStatus.Properties {
flag := 0
for _, statusColumn := range allColumns {
if statusColumn == strcase.ToSnake(k) {
flag = 1
Expand Down

0 comments on commit 494d1ff

Please sign in to comment.