Skip to content

Commit c88ea62

Browse files
Address feedback, align to latest version of the proposal, resolve TODOs
1 parent 63f992c commit c88ea62

31 files changed

+1906
-1306
lines changed

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,10 @@ generate-manifests-core: $(CONTROLLER_GEN) $(KUSTOMIZE) ## Generate manifests e.
305305
crd:crdVersions=v1 \
306306
output:crd:dir=./cmd/clusterctl/config/crd/bases
307307
$(KUSTOMIZE) build $(CLUSTERCTL_MANIFEST_DIR)/crd > $(CLUSTERCTL_MANIFEST_DIR)/manifest/clusterctl-api.yaml
308+
$(CONTROLLER_GEN) \
309+
paths=./internal/test/builder/... \
310+
crd:crdVersions=v1 \
311+
output:crd:dir=./internal/test/builder/crd
308312

309313
.PHONY: generate-manifests-kubeadm-bootstrap
310314
generate-manifests-kubeadm-bootstrap: $(CONTROLLER_GEN) ## Generate manifests e.g. CRD, RBAC etc. for kubeadm bootstrap
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
controller-gen.kubebuilder.io/version: v0.16.1
7+
name: phase0obj.test.cluster.x-k8s.io
8+
spec:
9+
group: test.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+
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+
A human readable message indicating details about the transition.
69+
This field may be empty.
70+
type: string
71+
reason:
72+
description: |-
73+
The reason for the condition's last transition in CamelCase.
74+
The specific API may choose whether or not this field is considered a guaranteed API.
75+
This field may be empty.
76+
type: string
77+
severity:
78+
description: |-
79+
Severity provides an explicit classification of Reason code, so the users or machines can immediately
80+
understand the current situation and act accordingly.
81+
The Severity field MUST be set only when Status=False.
82+
type: string
83+
status:
84+
description: Status of the condition, one of True, False, Unknown.
85+
type: string
86+
type:
87+
description: |-
88+
Type of condition in CamelCase or in foo.example.com/CamelCase.
89+
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
90+
can be useful (see .node.status.conditions), the ability to deconflict is important.
91+
type: string
92+
required:
93+
- lastTransitionTime
94+
- status
95+
- type
96+
type: object
97+
type: array
98+
type: object
99+
type: object
100+
served: true
101+
storage: true
102+
subresources:
103+
status: {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
controller-gen.kubebuilder.io/version: v0.16.1
7+
name: phase1obj.test.cluster.x-k8s.io
8+
spec:
9+
group: test.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+
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+
A human readable message indicating details about the transition.
70+
This field may be empty.
71+
type: string
72+
reason:
73+
description: |-
74+
The reason for the condition's last transition in CamelCase.
75+
The specific API may choose whether or not this field is considered a guaranteed API.
76+
This field may be empty.
77+
type: string
78+
severity:
79+
description: |-
80+
Severity provides an explicit classification of Reason code, so the users or machines can immediately
81+
understand the current situation and act accordingly.
82+
The Severity field MUST be set only when Status=False.
83+
type: string
84+
status:
85+
description: Status of the condition, one of True, False, Unknown.
86+
type: string
87+
type:
88+
description: |-
89+
Type of condition in CamelCase or in foo.example.com/CamelCase.
90+
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
91+
can be useful (see .node.status.conditions), the ability to deconflict is important.
92+
type: string
93+
required:
94+
- lastTransitionTime
95+
- status
96+
- type
97+
type: object
98+
type: array
99+
v1beta2:
100+
description: Phase1ObjStatusV1beta2 defines the status.V1Beta1 of
101+
a Phase1Obj.
102+
properties:
103+
conditions:
104+
items:
105+
description: Condition contains details for one aspect of the
106+
current state of this API Resource.
107+
properties:
108+
lastTransitionTime:
109+
description: |-
110+
lastTransitionTime is the last time the condition transitioned from one status to another.
111+
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
112+
format: date-time
113+
type: string
114+
message:
115+
description: |-
116+
message is a human readable message indicating details about the transition.
117+
This may be an empty string.
118+
maxLength: 32768
119+
type: string
120+
observedGeneration:
121+
description: |-
122+
observedGeneration represents the .metadata.generation that the condition was set based upon.
123+
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
124+
with respect to the current state of the instance.
125+
format: int64
126+
minimum: 0
127+
type: integer
128+
reason:
129+
description: |-
130+
reason contains a programmatic identifier indicating the reason for the condition's last transition.
131+
Producers of specific condition types may define expected values and meanings for this field,
132+
and whether the values are considered a guaranteed API.
133+
The value should be a CamelCase string.
134+
This field may not be empty.
135+
maxLength: 1024
136+
minLength: 1
137+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
138+
type: string
139+
status:
140+
description: status of the condition, one of True, False,
141+
Unknown.
142+
enum:
143+
- "True"
144+
- "False"
145+
- Unknown
146+
type: string
147+
type:
148+
description: type of condition in CamelCase or in foo.example.com/CamelCase.
149+
maxLength: 316
150+
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])$
151+
type: string
152+
required:
153+
- lastTransitionTime
154+
- message
155+
- reason
156+
- status
157+
- type
158+
type: object
159+
type: array
160+
x-kubernetes-list-map-keys:
161+
- type
162+
x-kubernetes-list-type: map
163+
type: object
164+
type: object
165+
type: object
166+
served: true
167+
storage: true
168+
subresources:
169+
status: {}

0 commit comments

Comments
 (0)