Skip to content

Commit 1c7b403

Browse files
update test-framework mock data acccoring to current version
1 parent 36b6de4 commit 1c7b403

File tree

5 files changed

+245
-9
lines changed

5 files changed

+245
-9
lines changed

test/test-framework/deploy/crds/cache.example.com_memcachedrs_crd.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,22 @@ spec:
1414
status: {}
1515
validation:
1616
openAPIV3Schema:
17+
description: MemcachedRS is the Schema for the memcachedrs API
1718
properties:
1819
apiVersion:
1920
description: 'APIVersion defines the versioned schema of this representation
2021
of an object. Servers should convert recognized schemas to the latest
21-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
22+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
2223
type: string
2324
kind:
2425
description: 'Kind is a string value representing the REST resource this
2526
object represents. Servers may infer this from the endpoint the client
26-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
27+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
2728
type: string
2829
metadata:
2930
type: object
3031
spec:
32+
description: MemcachedRSSpec defines the desired state of MemcachedRS
3133
properties:
3234
numNodes:
3335
format: int32
@@ -36,6 +38,7 @@ spec:
3638
- numNodes
3739
type: object
3840
status:
41+
description: MemcachedRSStatus defines the observed state of MemcachedRS
3942
properties:
4043
nodeList:
4144
items:
@@ -47,6 +50,7 @@ spec:
4750
- nodeList
4851
- test
4952
type: object
53+
type: object
5054
version: v1alpha1
5155
versions:
5256
- name: v1alpha1

test/test-framework/deploy/crds/cache.example.com_memcacheds_crd.yaml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,38 +10,48 @@ spec:
1010
plural: memcacheds
1111
singular: memcached
1212
scope: Namespaced
13+
subresources:
14+
status: {}
1315
validation:
1416
openAPIV3Schema:
17+
description: Memcached is the Schema for the memcacheds API
1518
properties:
1619
apiVersion:
20+
description: 'APIVersion defines the versioned schema of this representation
21+
of an object. Servers should convert recognized schemas to the latest
22+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
1723
type: string
1824
kind:
25+
description: 'Kind is a string value representing the REST resource this
26+
object represents. Servers may infer this from the endpoint the client
27+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
1928
type: string
2029
metadata:
2130
type: object
2231
spec:
32+
description: MemcachedSpec defines the desired state of Memcached
2333
properties:
2434
size:
35+
description: Size is the size of the memcached deployment
2536
format: int32
2637
type: integer
27-
test:
28-
type: string
2938
required:
3039
- size
3140
type: object
3241
status:
42+
description: MemcachedStatus defines the observed state of Memcached
3343
properties:
3444
nodes:
45+
description: Nodes are the names of the memcached pods
3546
items:
3647
type: string
3748
type: array
3849
required:
3950
- nodes
4051
type: object
52+
type: object
4153
version: v1alpha1
4254
versions:
4355
- name: v1alpha1
4456
served: true
4557
storage: true
46-
subresources:
47-
status: {}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ type MemcachedRSStatus struct {
4040
// MemcachedRS is the Schema for the memcachedrs API
4141
// +k8s:openapi-gen=true
4242
// +kubebuilder:subresource:status
43+
// +kubebuilder:resource:path=memcachedrs,scope=Namespaced
4344
type MemcachedRS struct {
4445
metav1.TypeMeta `json:",inline"`
4546
metav1.ObjectMeta `json:"metadata,omitempty"`

test/test-framework/pkg/apis/cache/v1alpha1/zz_generated.deepcopy.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
// +build !ignore_autogenerated
2+
3+
// This file was autogenerated by openapi-gen. Do not edit it manually!
4+
5+
package v1alpha1
6+
7+
import (
8+
spec "github.com/go-openapi/spec"
9+
common "k8s.io/kube-openapi/pkg/common"
10+
)
11+
12+
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition {
13+
return map[string]common.OpenAPIDefinition{
14+
"github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.Memcached": schema_pkg_apis_cache_v1alpha1_Memcached(ref),
15+
"github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.MemcachedRS": schema_pkg_apis_cache_v1alpha1_MemcachedRS(ref),
16+
"github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.MemcachedRSSpec": schema_pkg_apis_cache_v1alpha1_MemcachedRSSpec(ref),
17+
"github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.MemcachedRSStatus": schema_pkg_apis_cache_v1alpha1_MemcachedRSStatus(ref),
18+
"github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.MemcachedSpec": schema_pkg_apis_cache_v1alpha1_MemcachedSpec(ref),
19+
"github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.MemcachedStatus": schema_pkg_apis_cache_v1alpha1_MemcachedStatus(ref),
20+
}
21+
}
22+
23+
func schema_pkg_apis_cache_v1alpha1_Memcached(ref common.ReferenceCallback) common.OpenAPIDefinition {
24+
return common.OpenAPIDefinition{
25+
Schema: spec.Schema{
26+
SchemaProps: spec.SchemaProps{
27+
Description: "Memcached is the Schema for the memcacheds API",
28+
Type: []string{"object"},
29+
Properties: map[string]spec.Schema{
30+
"kind": {
31+
SchemaProps: spec.SchemaProps{
32+
Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
33+
Type: []string{"string"},
34+
Format: "",
35+
},
36+
},
37+
"apiVersion": {
38+
SchemaProps: spec.SchemaProps{
39+
Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
40+
Type: []string{"string"},
41+
Format: "",
42+
},
43+
},
44+
"metadata": {
45+
SchemaProps: spec.SchemaProps{
46+
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"),
47+
},
48+
},
49+
"spec": {
50+
SchemaProps: spec.SchemaProps{
51+
Ref: ref("github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.MemcachedSpec"),
52+
},
53+
},
54+
"status": {
55+
SchemaProps: spec.SchemaProps{
56+
Ref: ref("github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.MemcachedStatus"),
57+
},
58+
},
59+
},
60+
},
61+
},
62+
Dependencies: []string{
63+
"github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.MemcachedSpec", "github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.MemcachedStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
64+
}
65+
}
66+
67+
func schema_pkg_apis_cache_v1alpha1_MemcachedRS(ref common.ReferenceCallback) common.OpenAPIDefinition {
68+
return common.OpenAPIDefinition{
69+
Schema: spec.Schema{
70+
SchemaProps: spec.SchemaProps{
71+
Description: "MemcachedRS is the Schema for the memcachedrs API",
72+
Type: []string{"object"},
73+
Properties: map[string]spec.Schema{
74+
"kind": {
75+
SchemaProps: spec.SchemaProps{
76+
Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
77+
Type: []string{"string"},
78+
Format: "",
79+
},
80+
},
81+
"apiVersion": {
82+
SchemaProps: spec.SchemaProps{
83+
Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
84+
Type: []string{"string"},
85+
Format: "",
86+
},
87+
},
88+
"metadata": {
89+
SchemaProps: spec.SchemaProps{
90+
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"),
91+
},
92+
},
93+
"spec": {
94+
SchemaProps: spec.SchemaProps{
95+
Ref: ref("github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.MemcachedRSSpec"),
96+
},
97+
},
98+
"status": {
99+
SchemaProps: spec.SchemaProps{
100+
Ref: ref("github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.MemcachedRSStatus"),
101+
},
102+
},
103+
},
104+
},
105+
},
106+
Dependencies: []string{
107+
"github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.MemcachedRSSpec", "github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.MemcachedRSStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
108+
}
109+
}
110+
111+
func schema_pkg_apis_cache_v1alpha1_MemcachedRSSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
112+
return common.OpenAPIDefinition{
113+
Schema: spec.Schema{
114+
SchemaProps: spec.SchemaProps{
115+
Description: "MemcachedRSSpec defines the desired state of MemcachedRS",
116+
Type: []string{"object"},
117+
Properties: map[string]spec.Schema{
118+
"numNodes": {
119+
SchemaProps: spec.SchemaProps{
120+
Type: []string{"integer"},
121+
Format: "int32",
122+
},
123+
},
124+
},
125+
Required: []string{"numNodes"},
126+
},
127+
},
128+
}
129+
}
130+
131+
func schema_pkg_apis_cache_v1alpha1_MemcachedRSStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
132+
return common.OpenAPIDefinition{
133+
Schema: spec.Schema{
134+
SchemaProps: spec.SchemaProps{
135+
Description: "MemcachedRSStatus defines the observed state of MemcachedRS",
136+
Type: []string{"object"},
137+
Properties: map[string]spec.Schema{
138+
"nodeList": {
139+
VendorExtensible: spec.VendorExtensible{
140+
Extensions: spec.Extensions{
141+
"x-kubernetes-list-type": "set",
142+
},
143+
},
144+
SchemaProps: spec.SchemaProps{
145+
Type: []string{"array"},
146+
Items: &spec.SchemaOrArray{
147+
Schema: &spec.Schema{
148+
SchemaProps: spec.SchemaProps{
149+
Type: []string{"string"},
150+
Format: "",
151+
},
152+
},
153+
},
154+
},
155+
},
156+
"test": {
157+
SchemaProps: spec.SchemaProps{
158+
Type: []string{"boolean"},
159+
Format: "",
160+
},
161+
},
162+
},
163+
Required: []string{"nodeList", "test"},
164+
},
165+
},
166+
}
167+
}
168+
169+
func schema_pkg_apis_cache_v1alpha1_MemcachedSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
170+
return common.OpenAPIDefinition{
171+
Schema: spec.Schema{
172+
SchemaProps: spec.SchemaProps{
173+
Description: "MemcachedSpec defines the desired state of Memcached",
174+
Type: []string{"object"},
175+
Properties: map[string]spec.Schema{
176+
"size": {
177+
SchemaProps: spec.SchemaProps{
178+
Description: "Size is the size of the memcached deployment",
179+
Type: []string{"integer"},
180+
Format: "int32",
181+
},
182+
},
183+
},
184+
Required: []string{"size"},
185+
},
186+
},
187+
}
188+
}
189+
190+
func schema_pkg_apis_cache_v1alpha1_MemcachedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
191+
return common.OpenAPIDefinition{
192+
Schema: spec.Schema{
193+
SchemaProps: spec.SchemaProps{
194+
Description: "MemcachedStatus defines the observed state of Memcached",
195+
Type: []string{"object"},
196+
Properties: map[string]spec.Schema{
197+
"nodes": {
198+
VendorExtensible: spec.VendorExtensible{
199+
Extensions: spec.Extensions{
200+
"x-kubernetes-list-type": "set",
201+
},
202+
},
203+
SchemaProps: spec.SchemaProps{
204+
Description: "Nodes are the names of the memcached pods",
205+
Type: []string{"array"},
206+
Items: &spec.SchemaOrArray{
207+
Schema: &spec.Schema{
208+
SchemaProps: spec.SchemaProps{
209+
Type: []string{"string"},
210+
Format: "",
211+
},
212+
},
213+
},
214+
},
215+
},
216+
},
217+
Required: []string{"nodes"},
218+
},
219+
},
220+
}
221+
}

0 commit comments

Comments
 (0)