Skip to content

Commit c4c7b55

Browse files
authored
feat: add new clusterapi resources and update existing (#723)
1 parent 5a7fdc7 commit c4c7b55

File tree

9 files changed

+1021
-9
lines changed

9 files changed

+1021
-9
lines changed
Lines changed: 255 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,255 @@
1+
{
2+
"description": "ClusterResourceSet is the Schema for the clusterresourcesets API.\nFor advanced use cases an add-on provider should be used instead.",
3+
"properties": {
4+
"apiVersion": {
5+
"description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
6+
"type": "string"
7+
},
8+
"kind": {
9+
"description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
10+
"type": "string"
11+
},
12+
"metadata": {
13+
"type": "object"
14+
},
15+
"spec": {
16+
"description": "spec is the desired state of ClusterResourceSet.",
17+
"properties": {
18+
"clusterSelector": {
19+
"description": "clusterSelector is the label selector for Clusters. The Clusters that are\nselected by this will be the ones affected by this ClusterResourceSet.\nIt must match the Cluster labels. This field is immutable.\nLabel selector cannot be empty.",
20+
"properties": {
21+
"matchExpressions": {
22+
"description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
23+
"items": {
24+
"description": "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values.",
25+
"properties": {
26+
"key": {
27+
"description": "key is the label key that the selector applies to.",
28+
"type": "string"
29+
},
30+
"operator": {
31+
"description": "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist.",
32+
"type": "string"
33+
},
34+
"values": {
35+
"description": "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch.",
36+
"items": {
37+
"type": "string"
38+
},
39+
"type": "array",
40+
"x-kubernetes-list-type": "atomic"
41+
}
42+
},
43+
"required": [
44+
"key",
45+
"operator"
46+
],
47+
"type": "object",
48+
"additionalProperties": false
49+
},
50+
"type": "array",
51+
"x-kubernetes-list-type": "atomic"
52+
},
53+
"matchLabels": {
54+
"additionalProperties": {
55+
"type": "string"
56+
},
57+
"description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed.",
58+
"type": "object"
59+
}
60+
},
61+
"type": "object",
62+
"x-kubernetes-map-type": "atomic",
63+
"additionalProperties": false
64+
},
65+
"resources": {
66+
"description": "resources is a list of Secrets/ConfigMaps where each contains 1 or more resources to be applied to remote clusters.",
67+
"items": {
68+
"description": "ResourceRef specifies a resource.",
69+
"properties": {
70+
"kind": {
71+
"description": "kind of the resource. Supported kinds are: Secrets and ConfigMaps.",
72+
"enum": [
73+
"Secret",
74+
"ConfigMap"
75+
],
76+
"type": "string"
77+
},
78+
"name": {
79+
"description": "name of the resource that is in the same namespace with ClusterResourceSet object.",
80+
"maxLength": 253,
81+
"minLength": 1,
82+
"type": "string"
83+
}
84+
},
85+
"required": [
86+
"kind",
87+
"name"
88+
],
89+
"type": "object",
90+
"additionalProperties": false
91+
},
92+
"maxItems": 100,
93+
"minItems": 1,
94+
"type": "array",
95+
"x-kubernetes-list-type": "atomic"
96+
},
97+
"strategy": {
98+
"description": "strategy is the strategy to be used during applying resources. Defaults to ApplyOnce. This field is immutable.",
99+
"enum": [
100+
"ApplyOnce",
101+
"Reconcile"
102+
],
103+
"type": "string"
104+
}
105+
},
106+
"required": [
107+
"clusterSelector",
108+
"resources"
109+
],
110+
"type": "object",
111+
"additionalProperties": false
112+
},
113+
"status": {
114+
"description": "status is the observed state of ClusterResourceSet.",
115+
"minProperties": 1,
116+
"properties": {
117+
"conditions": {
118+
"description": "conditions represents the observations of a ClusterResourceSet's current state.\nKnown condition types are ResourcesApplied.",
119+
"items": {
120+
"description": "Condition contains details for one aspect of the current state of this API Resource.",
121+
"properties": {
122+
"lastTransitionTime": {
123+
"description": "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis 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+
},
127+
"message": {
128+
"description": "message is a human readable message indicating details about the transition.\nThis may be an empty string.",
129+
"maxLength": 32768,
130+
"type": "string"
131+
},
132+
"observedGeneration": {
133+
"description": "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance.",
134+
"format": "int64",
135+
"minimum": 0,
136+
"type": "integer"
137+
},
138+
"reason": {
139+
"description": "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty.",
140+
"maxLength": 1024,
141+
"minLength": 1,
142+
"pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
143+
"type": "string"
144+
},
145+
"status": {
146+
"description": "status of the condition, one of True, False, Unknown.",
147+
"enum": [
148+
"True",
149+
"False",
150+
"Unknown"
151+
],
152+
"type": "string"
153+
},
154+
"type": {
155+
"description": "type of condition in CamelCase or in foo.example.com/CamelCase.",
156+
"maxLength": 316,
157+
"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])$",
158+
"type": "string"
159+
}
160+
},
161+
"required": [
162+
"lastTransitionTime",
163+
"message",
164+
"reason",
165+
"status",
166+
"type"
167+
],
168+
"type": "object",
169+
"additionalProperties": false
170+
},
171+
"maxItems": 32,
172+
"type": "array",
173+
"x-kubernetes-list-map-keys": [
174+
"type"
175+
],
176+
"x-kubernetes-list-type": "map"
177+
},
178+
"deprecated": {
179+
"description": "deprecated groups all the status fields that are deprecated and will be removed when all the nested field are removed.",
180+
"properties": {
181+
"v1beta1": {
182+
"description": "v1beta1 groups all the status fields that are deprecated and will be removed when support for v1beta1 will be dropped.",
183+
"properties": {
184+
"conditions": {
185+
"description": "conditions defines current state of the ClusterResourceSet.\n\nDeprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.",
186+
"items": {
187+
"description": "Condition defines an observation of a Cluster API resource operational state.",
188+
"properties": {
189+
"lastTransitionTime": {
190+
"description": "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed. If that is not known, then using the time when\nthe API field changed is acceptable.",
191+
"format": "date-time",
192+
"type": "string"
193+
},
194+
"message": {
195+
"description": "message is a human readable message indicating details about the transition.\nThis field may be empty.",
196+
"maxLength": 10240,
197+
"minLength": 1,
198+
"type": "string"
199+
},
200+
"reason": {
201+
"description": "reason is the reason for the condition's last transition in CamelCase.\nThe specific API may choose whether or not this field is considered a guaranteed API.\nThis field may be empty.",
202+
"maxLength": 256,
203+
"minLength": 1,
204+
"type": "string"
205+
},
206+
"severity": {
207+
"description": "severity provides an explicit classification of Reason code, so the users or machines can immediately\nunderstand the current situation and act accordingly.\nThe Severity field MUST be set only when Status=False.",
208+
"maxLength": 32,
209+
"type": "string"
210+
},
211+
"status": {
212+
"description": "status of the condition, one of True, False, Unknown.",
213+
"type": "string"
214+
},
215+
"type": {
216+
"description": "type of condition in CamelCase or in foo.example.com/CamelCase.\nMany .condition.type values are consistent across resources like Available, but because arbitrary conditions\ncan be useful (see .node.status.conditions), the ability to deconflict is important.",
217+
"maxLength": 256,
218+
"minLength": 1,
219+
"type": "string"
220+
}
221+
},
222+
"required": [
223+
"lastTransitionTime",
224+
"status",
225+
"type"
226+
],
227+
"type": "object",
228+
"additionalProperties": false
229+
},
230+
"type": "array"
231+
}
232+
},
233+
"type": "object",
234+
"additionalProperties": false
235+
}
236+
},
237+
"type": "object",
238+
"additionalProperties": false
239+
},
240+
"observedGeneration": {
241+
"description": "observedGeneration reflects the generation of the most recently observed ClusterResourceSet.",
242+
"format": "int64",
243+
"minimum": 1,
244+
"type": "integer"
245+
}
246+
},
247+
"type": "object",
248+
"additionalProperties": false
249+
}
250+
},
251+
"required": [
252+
"spec"
253+
],
254+
"type": "object"
255+
}
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
{
2+
"description": "ClusterResourceSetBinding lists all matching ClusterResourceSets with the cluster it belongs to.",
3+
"properties": {
4+
"apiVersion": {
5+
"description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
6+
"type": "string"
7+
},
8+
"kind": {
9+
"description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
10+
"type": "string"
11+
},
12+
"metadata": {
13+
"type": "object"
14+
},
15+
"spec": {
16+
"description": "spec is the desired state of ClusterResourceSetBinding.",
17+
"properties": {
18+
"bindings": {
19+
"description": "bindings is a list of ClusterResourceSets and their resources.",
20+
"items": {
21+
"description": "ResourceSetBinding keeps info on all of the resources in a ClusterResourceSet.",
22+
"properties": {
23+
"clusterResourceSetName": {
24+
"description": "clusterResourceSetName is the name of the ClusterResourceSet that is applied to the owner cluster of the binding.",
25+
"maxLength": 253,
26+
"minLength": 1,
27+
"type": "string"
28+
},
29+
"resources": {
30+
"description": "resources is a list of resources that the ClusterResourceSet has.",
31+
"items": {
32+
"description": "ResourceBinding shows the status of a resource that belongs to a ClusterResourceSet matched by the owner cluster of the ClusterResourceSetBinding object.",
33+
"properties": {
34+
"applied": {
35+
"description": "applied is to track if a resource is applied to the cluster or not.",
36+
"type": "boolean"
37+
},
38+
"hash": {
39+
"description": "hash is the hash of a resource's data. This can be used to decide if a resource is changed.\nFor \"ApplyOnce\" ClusterResourceSet.spec.strategy, this is no-op as that strategy does not act on change.",
40+
"maxLength": 256,
41+
"minLength": 1,
42+
"type": "string"
43+
},
44+
"kind": {
45+
"description": "kind of the resource. Supported kinds are: Secrets and ConfigMaps.",
46+
"enum": [
47+
"Secret",
48+
"ConfigMap"
49+
],
50+
"type": "string"
51+
},
52+
"lastAppliedTime": {
53+
"description": "lastAppliedTime identifies when this resource was last applied to the cluster.",
54+
"format": "date-time",
55+
"type": "string"
56+
},
57+
"name": {
58+
"description": "name of the resource that is in the same namespace with ClusterResourceSet object.",
59+
"maxLength": 253,
60+
"minLength": 1,
61+
"type": "string"
62+
}
63+
},
64+
"required": [
65+
"applied",
66+
"kind",
67+
"name"
68+
],
69+
"type": "object",
70+
"additionalProperties": false
71+
},
72+
"maxItems": 100,
73+
"type": "array",
74+
"x-kubernetes-list-type": "atomic"
75+
}
76+
},
77+
"required": [
78+
"clusterResourceSetName"
79+
],
80+
"type": "object",
81+
"additionalProperties": false
82+
},
83+
"maxItems": 100,
84+
"type": "array",
85+
"x-kubernetes-list-type": "atomic"
86+
},
87+
"clusterName": {
88+
"description": "clusterName is the name of the Cluster this binding applies to.",
89+
"maxLength": 63,
90+
"minLength": 1,
91+
"type": "string"
92+
}
93+
},
94+
"required": [
95+
"clusterName"
96+
],
97+
"type": "object",
98+
"additionalProperties": false
99+
}
100+
},
101+
"required": [
102+
"spec"
103+
],
104+
"type": "object"
105+
}

bootstrap.cluster.x-k8s.io/kubeadmconfig_v1beta1.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,7 +1128,7 @@
11281128
"properties": {
11291129
"additionalConfig": {
11301130
"description": "additionalConfig contains additional configuration to be merged with the Ignition\nconfiguration generated by the bootstrapper controller. More info: https://coreos.github.io/ignition/operator-notes/#config-merging\n\nThe data format is documented here: https://kinvolk.io/docs/flatcar-container-linux/latest/provisioning/cl-config/",
1131-
"maxLength": 10240,
1131+
"maxLength": 32768,
11321132
"minLength": 1,
11331133
"type": "string"
11341134
},
@@ -1933,13 +1933,13 @@
19331933
"type": "string"
19341934
},
19351935
"failureMessage": {
1936-
"description": "failureMessage will be set on non-retryable errors\n\nDeprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.",
1936+
"description": "failureMessage will be set on non-retryable errors\n\nDeprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.",
19371937
"maxLength": 10240,
19381938
"minLength": 1,
19391939
"type": "string"
19401940
},
19411941
"failureReason": {
1942-
"description": "failureReason will be set on non-retryable errors\n\nDeprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.",
1942+
"description": "failureReason will be set on non-retryable errors\n\nDeprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.",
19431943
"maxLength": 256,
19441944
"minLength": 1,
19451945
"type": "string"

bootstrap.cluster.x-k8s.io/kubeadmconfigtemplate_v1beta1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,7 @@
11551155
"properties": {
11561156
"additionalConfig": {
11571157
"description": "additionalConfig contains additional configuration to be merged with the Ignition\nconfiguration generated by the bootstrapper controller. More info: https://coreos.github.io/ignition/operator-notes/#config-merging\n\nThe data format is documented here: https://kinvolk.io/docs/flatcar-container-linux/latest/provisioning/cl-config/",
1158-
"maxLength": 10240,
1158+
"maxLength": 32768,
11591159
"minLength": 1,
11601160
"type": "string"
11611161
},

0 commit comments

Comments
 (0)