Skip to content

Commit f3a2d78

Browse files
committed
util/deprecated/v1beta1/test add ObservedGeneration to Phase1Obj and generate CRD
1 parent 0a32aa5 commit f3a2d78

7 files changed

+601
-2
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,10 @@ generate-manifests-core: $(CONTROLLER_GEN) $(KUSTOMIZE) ## Generate manifests e.
324324
paths=./controllers/crdmigrator/test/t4/... \
325325
crd:crdVersions=v1 \
326326
output:crd:dir=./controllers/crdmigrator/test/t4/crd
327+
$(CONTROLLER_GEN) \
328+
paths=./util/deprecated/v1beta1/test/builder/... \
329+
crd:crdVersions=v1 \
330+
output:crd:dir=./util/deprecated/v1beta1/test/builder/crd
327331

328332
.PHONY: generate-manifests-kubeadm-bootstrap
329333
generate-manifests-kubeadm-bootstrap: $(CONTROLLER_GEN) ## Generate manifests e.g. CRD, RBAC etc. for kubeadm bootstrap
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
controller-gen.kubebuilder.io/version: v0.17.3
7+
name: phase0obj.deprecatedtest.cluster.x-k8s.io
8+
spec:
9+
group: deprecatedtest.cluster.x-k8s.io
10+
names:
11+
categories:
12+
- cluster-api
13+
kind: Phase0Obj
14+
listKind: Phase0ObjList
15+
plural: phase0obj
16+
singular: phase0obj
17+
scope: Namespaced
18+
versions:
19+
- name: v1alpha1
20+
schema:
21+
openAPIV3Schema:
22+
description: Phase0Obj defines an object with clusterv1.Conditions.
23+
properties:
24+
apiVersion:
25+
description: |-
26+
APIVersion defines the versioned schema of this representation of an object.
27+
Servers should convert recognized schemas to the latest internal value, and
28+
may reject unrecognized values.
29+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
30+
type: string
31+
kind:
32+
description: |-
33+
Kind is a string value representing the REST resource this object represents.
34+
Servers may infer this from the endpoint the client submits requests to.
35+
Cannot be updated.
36+
In CamelCase.
37+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
38+
type: string
39+
metadata:
40+
type: object
41+
spec:
42+
description: Phase0ObjSpec defines the spec of a Phase0Obj.
43+
properties:
44+
foo:
45+
type: string
46+
type: object
47+
status:
48+
description: Phase0ObjStatus defines the status of a Phase0Obj.
49+
properties:
50+
bar:
51+
type: string
52+
conditions:
53+
description: Conditions provide observations of the operational state
54+
of a Cluster API resource.
55+
items:
56+
description: Condition defines an observation of a Cluster API resource
57+
operational state.
58+
properties:
59+
lastTransitionTime:
60+
description: |-
61+
lastTransitionTime is the last time the condition transitioned from one status to another.
62+
This should be when the underlying condition changed. If that is not known, then using the time when
63+
the API field changed is acceptable.
64+
format: date-time
65+
type: string
66+
message:
67+
description: |-
68+
message is a human readable message indicating details about the transition.
69+
This field may be empty.
70+
maxLength: 10240
71+
minLength: 1
72+
type: string
73+
reason:
74+
description: |-
75+
reason is the reason for the condition's last transition in CamelCase.
76+
The specific API may choose whether or not this field is considered a guaranteed API.
77+
This field may be empty.
78+
maxLength: 256
79+
minLength: 1
80+
type: string
81+
severity:
82+
description: |-
83+
severity provides an explicit classification of Reason code, so the users or machines can immediately
84+
understand the current situation and act accordingly.
85+
The Severity field MUST be set only when Status=False.
86+
maxLength: 32
87+
type: string
88+
status:
89+
description: status of the condition, one of True, False, Unknown.
90+
type: string
91+
type:
92+
description: |-
93+
type of condition in CamelCase or in foo.example.com/CamelCase.
94+
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
95+
can be useful (see .node.status.conditions), the ability to deconflict is important.
96+
maxLength: 256
97+
minLength: 1
98+
type: string
99+
required:
100+
- lastTransitionTime
101+
- status
102+
- type
103+
type: object
104+
type: array
105+
type: object
106+
type: object
107+
served: true
108+
storage: true
109+
subresources:
110+
status: {}
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
controller-gen.kubebuilder.io/version: v0.17.3
7+
name: phase1obj.deprecatedtest.cluster.x-k8s.io
8+
spec:
9+
group: deprecatedtest.cluster.x-k8s.io
10+
names:
11+
categories:
12+
- cluster-api
13+
kind: Phase1Obj
14+
listKind: Phase1ObjList
15+
plural: phase1obj
16+
singular: phase1obj
17+
scope: Namespaced
18+
versions:
19+
- name: v1alpha1
20+
schema:
21+
openAPIV3Schema:
22+
description: Phase1Obj defines an object with conditions and experimental
23+
conditions.
24+
properties:
25+
apiVersion:
26+
description: |-
27+
APIVersion defines the versioned schema of this representation of an object.
28+
Servers should convert recognized schemas to the latest internal value, and
29+
may reject unrecognized values.
30+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
31+
type: string
32+
kind:
33+
description: |-
34+
Kind is a string value representing the REST resource this object represents.
35+
Servers may infer this from the endpoint the client submits requests to.
36+
Cannot be updated.
37+
In CamelCase.
38+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
39+
type: string
40+
metadata:
41+
type: object
42+
spec:
43+
description: Phase1ObjSpec defines the spec of a Phase1Obj.
44+
properties:
45+
foo:
46+
type: string
47+
type: object
48+
status:
49+
description: Phase1ObjStatus defines the status of a Phase1Obj.
50+
properties:
51+
bar:
52+
type: string
53+
conditions:
54+
description: Conditions provide observations of the operational state
55+
of a Cluster API resource.
56+
items:
57+
description: Condition defines an observation of a Cluster API resource
58+
operational state.
59+
properties:
60+
lastTransitionTime:
61+
description: |-
62+
lastTransitionTime is the last time the condition transitioned from one status to another.
63+
This should be when the underlying condition changed. If that is not known, then using the time when
64+
the API field changed is acceptable.
65+
format: date-time
66+
type: string
67+
message:
68+
description: |-
69+
message is a human readable message indicating details about the transition.
70+
This field may be empty.
71+
maxLength: 10240
72+
minLength: 1
73+
type: string
74+
reason:
75+
description: |-
76+
reason is the reason for the condition's last transition in CamelCase.
77+
The specific API may choose whether or not this field is considered a guaranteed API.
78+
This field may be empty.
79+
maxLength: 256
80+
minLength: 1
81+
type: string
82+
severity:
83+
description: |-
84+
severity provides an explicit classification of Reason code, so the users or machines can immediately
85+
understand the current situation and act accordingly.
86+
The Severity field MUST be set only when Status=False.
87+
maxLength: 32
88+
type: string
89+
status:
90+
description: status of the condition, one of True, False, Unknown.
91+
type: string
92+
type:
93+
description: |-
94+
type of condition in CamelCase or in foo.example.com/CamelCase.
95+
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
96+
can be useful (see .node.status.conditions), the ability to deconflict is important.
97+
maxLength: 256
98+
minLength: 1
99+
type: string
100+
required:
101+
- lastTransitionTime
102+
- status
103+
- type
104+
type: object
105+
type: array
106+
observedGeneration:
107+
description: observedGeneration reflects the generation of the most
108+
recently observed MachineSet.
109+
format: int64
110+
type: integer
111+
v1beta2:
112+
description: Phase1ObjV1Beta2Status defines the status.V1Beta2 of
113+
a Phase1Obj.
114+
properties:
115+
conditions:
116+
items:
117+
description: Condition contains details for one aspect of the
118+
current state of this API Resource.
119+
properties:
120+
lastTransitionTime:
121+
description: |-
122+
lastTransitionTime is the last time the condition transitioned from one status to another.
123+
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
124+
format: date-time
125+
type: string
126+
message:
127+
description: |-
128+
message is a human readable message indicating details about the transition.
129+
This may be an empty string.
130+
maxLength: 32768
131+
type: string
132+
observedGeneration:
133+
description: |-
134+
observedGeneration represents the .metadata.generation that the condition was set based upon.
135+
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
136+
with respect to the current state of the instance.
137+
format: int64
138+
minimum: 0
139+
type: integer
140+
reason:
141+
description: |-
142+
reason contains a programmatic identifier indicating the reason for the condition's last transition.
143+
Producers of specific condition types may define expected values and meanings for this field,
144+
and whether the values are considered a guaranteed API.
145+
The value should be a CamelCase string.
146+
This field may not be empty.
147+
maxLength: 1024
148+
minLength: 1
149+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
150+
type: string
151+
status:
152+
description: status of the condition, one of True, False,
153+
Unknown.
154+
enum:
155+
- "True"
156+
- "False"
157+
- Unknown
158+
type: string
159+
type:
160+
description: type of condition in CamelCase or in foo.example.com/CamelCase.
161+
maxLength: 316
162+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
163+
type: string
164+
required:
165+
- lastTransitionTime
166+
- message
167+
- reason
168+
- status
169+
- type
170+
type: object
171+
maxItems: 32
172+
type: array
173+
x-kubernetes-list-map-keys:
174+
- type
175+
x-kubernetes-list-type: map
176+
type: object
177+
type: object
178+
type: object
179+
served: true
180+
storage: true
181+
subresources:
182+
status: {}

0 commit comments

Comments
 (0)