Skip to content

Commit c0335ab

Browse files
Fix test-framework api validation types (#2130)
1 parent cc18d48 commit c0335ab

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

internal/scaffold/crd_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ spec:
8484
metadata:
8585
type: object
8686
spec:
87+
description: MemcachedSpec defines the desired state of Memcached
8788
properties:
8889
size:
8990
description: Size is the size of the memcached deployment
@@ -93,6 +94,7 @@ spec:
9394
- size
9495
type: object
9596
status:
97+
description: MemcachedStatus defines the observed state of Memcached
9698
properties:
9799
nodes:
98100
description: Nodes are the names of the memcached pods

test/test-framework/pkg/apis/cache/v1alpha1/memcached_types.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,18 @@ import (
2121
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
2222
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
2323

24+
// MemcachedSpec defines the desired state of Memcached
25+
// +k8s:openapi-gen=true
2426
type MemcachedSpec struct {
2527
// Size is the size of the memcached deployment
2628
Size int32 `json:"size"`
2729
}
30+
31+
// MemcachedStatus defines the observed state of Memcached
32+
// +k8s:openapi-gen=true
2833
type MemcachedStatus struct {
2934
// Nodes are the names of the memcached pods
35+
// +listType=set
3036
Nodes []string `json:"nodes"`
3137
}
3238

test/test-framework/pkg/apis/cache/v1alpha1/memcachedrs_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ type MemcachedRSSpec struct {
3030
// MemcachedRSStatus defines the observed state of MemcachedRS
3131
// +k8s:openapi-gen=true
3232
type MemcachedRSStatus struct {
33+
// +listType=set
3334
NodeList []string `json:"nodeList"`
3435
Test bool `json:"test"`
3536
}

0 commit comments

Comments
 (0)