Skip to content

Commit 3afcef7

Browse files
authored
Fix crd additional columns (#219)
Signed-off-by: Tamal Saha <[email protected]>
1 parent 0372ff8 commit 3afcef7

File tree

151 files changed

+42
-1450
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+42
-1450
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ require (
4343
kmodules.xyz/custom-resources v0.25.1
4444
kmodules.xyz/go-containerregistry v0.0.11
4545
kmodules.xyz/monitoring-agent-api v0.25.1
46-
kmodules.xyz/resource-metadata v0.17.9-0.20230727064228-3d5e2c06b6f8
46+
kmodules.xyz/resource-metadata v0.17.9-0.20230802101346-f6b6b5af8c65
4747
kmodules.xyz/resource-metrics v0.25.2
4848
kmodules.xyz/sets v0.25.0
4949
kubeops.dev/scanner v0.0.13-0.20230610152531-83d060ed8780

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -2119,8 +2119,8 @@ kmodules.xyz/monitoring-agent-api v0.25.1 h1:E1H8U/vMfYQ8wevmJv6Lcj0Z4DF7cH3hZ2x
21192119
kmodules.xyz/monitoring-agent-api v0.25.1/go.mod h1:IphGzRWbuV00B3TLalcBs6+IlchSZVTwKDty+J3LLz4=
21202120
kmodules.xyz/offshoot-api v0.25.0 h1:Svq9da/+sg5afOjpgo9vx2J/Lu90Mo0aFxkdQmgKnGI=
21212121
kmodules.xyz/offshoot-api v0.25.0/go.mod h1:ysEBn7LJuT3+s8ynAQA/OG0BSsJugXa6KGtDLMRjlKo=
2122-
kmodules.xyz/resource-metadata v0.17.9-0.20230727064228-3d5e2c06b6f8 h1:kI0QLIpBWo0EA77je/kMXu/YFq9oUOXIJ1t9+POK3y0=
2123-
kmodules.xyz/resource-metadata v0.17.9-0.20230727064228-3d5e2c06b6f8/go.mod h1:gUy7cQ7QvB/SQ3upgsmS4BVxm5NLbJEXBI7M2CLSymA=
2122+
kmodules.xyz/resource-metadata v0.17.9-0.20230802101346-f6b6b5af8c65 h1:8wjzLLEUAekMH5B7tjg/WPFUXwDVNvMLDD8G/A/N+ZA=
2123+
kmodules.xyz/resource-metadata v0.17.9-0.20230802101346-f6b6b5af8c65/go.mod h1:re7Gc4eIBc1emoFMQiS02Q5jyzVy6rjfjsohmJegrZo=
21242124
kmodules.xyz/resource-metrics v0.25.2 h1:BwCb6qyunvQBa0u8UUkw+wYG5/T4qtNtAKcHjSsk0JU=
21252125
kmodules.xyz/resource-metrics v0.25.2/go.mod h1:ZK/52NLuwMk+Jt0bmUtGQHtSxPLYYpsFILG7SJhYPg0=
21262126
kmodules.xyz/sets v0.25.0 h1:belY/3trp/M/CKc1TEteA40jb2uCIdwKHhjpvrIxG+8=

vendor/kmodules.xyz/resource-metadata/apis/meta/v1alpha1/openapi_generated.go

+2-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/kmodules.xyz/resource-metadata/apis/meta/v1alpha1/resourcedescriptor_types.go

-4
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,6 @@ type ResourceColumnDefinition struct {
192192
// numbers are considered higher priority. Columns that may be omitted in limited space scenarios
193193
// should be given a higher priority.
194194
Priority int32 `json:"priority"`
195-
// Width is an integer defining the relative width of the column among all the columns
196-
Width int32 `json:"width"`
197195
// PathTemplate is a Go text template that will be evaluated to determine cell value.
198196
// Users can use JSONPath expression to extract nested fields and apply template functions from Masterminds/sprig library.
199197
// The template function for JSON path is called `jp`.
@@ -288,8 +286,6 @@ type ResourceColumn struct {
288286
// numbers are considered higher priority. Columns that may be omitted in limited space scenarios
289287
// should be given a higher priority.
290288
Priority int32 `json:"priority"`
291-
// Width is an integer defining the relative width of the column among all the columns
292-
Width int32 `json:"width"`
293289

294290
Sort *SortHeader `json:"sort,omitempty"`
295291
Link bool `json:"link,omitempty"`

vendor/kmodules.xyz/resource-metadata/apis/meta/v1alpha1/table_helpers.go

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ func Convert_ResourceColumnDefinition_To_ResourceColumn(def ResourceColumnDefini
4242
Type: def.Type,
4343
Format: def.Format,
4444
Priority: def.Priority,
45-
Width: def.Width,
4645
}
4746
if def.Sort != nil && def.Sort.Enable {
4847
col.Sort = &SortHeader{
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
Copyright AppsCode Inc. and Contributors
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package ui
18+
19+
const (
20+
LabelFeatureSet = "byte.builders/feature-set"
21+
)

vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/feature_helpers.go

+9
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,18 @@ package v1alpha1
1818

1919
import (
2020
"kmodules.xyz/client-go/apiextensions"
21+
"kmodules.xyz/resource-metadata/apis/ui"
2122
"kmodules.xyz/resource-metadata/crds"
23+
24+
"k8s.io/apimachinery/pkg/labels"
2225
)
2326

2427
func (v Feature) CustomResourceDefinition() *apiextensions.CustomResourceDefinition {
2528
return crds.MustCustomResourceDefinition(SchemeGroupVersion.WithResource(ResourceFeatures))
2629
}
30+
31+
func (_ Feature) FormatLabels(featureSet string) labels.Selector {
32+
return labels.SelectorFromSet(map[string]string{
33+
ui.LabelFeatureSet: featureSet,
34+
})
35+
}

vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceblockdefinitions.yaml

-6
Original file line numberDiff line numberDiff line change
@@ -242,16 +242,10 @@ spec:
242242
this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types
243243
for more.
244244
type: string
245-
width:
246-
description: Width is an integer defining the relative
247-
width of the column among all the columns
248-
format: int32
249-
type: integer
250245
required:
251246
- name
252247
- priority
253248
- type
254-
- width
255249
type: object
256250
type: array
257251
name:

vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcelayouts.yaml

-33
Original file line numberDiff line numberDiff line change
@@ -241,16 +241,10 @@ spec:
241241
this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types
242242
for more.
243243
type: string
244-
width:
245-
description: Width is an integer defining the relative
246-
width of the column among all the columns
247-
format: int32
248-
type: integer
249244
required:
250245
- name
251246
- priority
252247
- type
253-
- width
254248
type: object
255249
type: array
256250
type: object
@@ -489,17 +483,10 @@ spec:
489483
for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types
490484
for more.
491485
type: string
492-
width:
493-
description: Width is an integer defining
494-
the relative width of the column among
495-
all the columns
496-
format: int32
497-
type: integer
498486
required:
499487
- name
500488
- priority
501489
- type
502-
- width
503490
type: object
504491
type: array
505492
type: object
@@ -750,17 +737,10 @@ spec:
750737
for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types
751738
for more.
752739
type: string
753-
width:
754-
description: Width is an integer defining
755-
the relative width of the column among
756-
all the columns
757-
format: int32
758-
type: integer
759740
required:
760741
- name
761742
- priority
762743
- type
763-
- width
764744
type: object
765745
type: array
766746
type: object
@@ -987,17 +967,10 @@ spec:
987967
for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types
988968
for more.
989969
type: string
990-
width:
991-
description: Width is an integer defining
992-
the relative width of the column among
993-
all the columns
994-
format: int32
995-
type: integer
996970
required:
997971
- name
998972
- priority
999973
- type
1000-
- width
1001974
type: object
1002975
type: array
1003976
type: object
@@ -1246,16 +1219,10 @@ spec:
12461219
this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types
12471220
for more.
12481221
type: string
1249-
width:
1250-
description: Width is an integer defining the relative
1251-
width of the column among all the columns
1252-
format: int32
1253-
type: integer
12541222
required:
12551223
- name
12561224
- priority
12571225
- type
1258-
- width
12591226
type: object
12601227
type: array
12611228
type: object

vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceoutlines.yaml

-33
Original file line numberDiff line numberDiff line change
@@ -325,16 +325,10 @@ spec:
325325
this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types
326326
for more.
327327
type: string
328-
width:
329-
description: Width is an integer defining the relative
330-
width of the column among all the columns
331-
format: int32
332-
type: integer
333328
required:
334329
- name
335330
- priority
336331
- type
337-
- width
338332
type: object
339333
type: array
340334
name:
@@ -575,17 +569,10 @@ spec:
575569
for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types
576570
for more.
577571
type: string
578-
width:
579-
description: Width is an integer defining
580-
the relative width of the column among
581-
all the columns
582-
format: int32
583-
type: integer
584572
required:
585573
- name
586574
- priority
587575
- type
588-
- width
589576
type: object
590577
type: array
591578
name:
@@ -838,17 +825,10 @@ spec:
838825
for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types
839826
for more.
840827
type: string
841-
width:
842-
description: Width is an integer defining
843-
the relative width of the column among
844-
all the columns
845-
format: int32
846-
type: integer
847828
required:
848829
- name
849830
- priority
850831
- type
851-
- width
852832
type: object
853833
type: array
854834
name:
@@ -1077,17 +1057,10 @@ spec:
10771057
for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types
10781058
for more.
10791059
type: string
1080-
width:
1081-
description: Width is an integer defining
1082-
the relative width of the column among
1083-
all the columns
1084-
format: int32
1085-
type: integer
10861060
required:
10871061
- name
10881062
- priority
10891063
- type
1090-
- width
10911064
type: object
10921065
type: array
10931066
name:
@@ -1338,16 +1311,10 @@ spec:
13381311
this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types
13391312
for more.
13401313
type: string
1341-
width:
1342-
description: Width is an integer defining the relative
1343-
width of the column among all the columns
1344-
format: int32
1345-
type: integer
13461314
required:
13471315
- name
13481316
- priority
13491317
- type
1350-
- width
13511318
type: object
13521319
type: array
13531320
name:

vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcetabledefinitions.yaml

-6
Original file line numberDiff line numberDiff line change
@@ -142,16 +142,10 @@ spec:
142142
See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types
143143
for more.
144144
type: string
145-
width:
146-
description: Width is an integer defining the relative width
147-
of the column among all the columns
148-
format: int32
149-
type: integer
150145
required:
151146
- name
152147
- priority
153148
- type
154-
- width
155149
type: object
156150
type: array
157151
defaultView:

vendor/kmodules.xyz/resource-metadata/hub/menuoutlines/byte.builders/cluster.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ spec:
7777
type: image/png
7878
name: Releases
7979
path: /helm/v3/releases
80-
name: Helm 3
80+
- name: HelmRelease
81+
type:
82+
group: helm.toolkit.fluxcd.io
83+
kind: HelmRelease
84+
name: Helm
8185
- autoDiscoverAPIGroup: kubedb.com
8286
icons:
8387
- src: https://cdn.appscode.com/k8s/icons/menu/datastore.svg

vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/meta.k8s.appscode.com/v1alpha1/resourceblockdefinitions.yaml

-5
Original file line numberDiff line numberDiff line change
@@ -220,15 +220,10 @@ spec:
220220
type:
221221
description: type is an OpenAPI type definition for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.
222222
type: string
223-
width:
224-
description: Width is an integer defining the relative width of the column among all the columns
225-
format: int32
226-
type: integer
227223
required:
228224
- name
229225
- priority
230226
- type
231-
- width
232227
type: object
233228
type: array
234229
name:

0 commit comments

Comments
 (0)