Skip to content

Commit c00943a

Browse files
authored
Upgrading cluster-api dependency to support k8s v1.24 (#189)
1 parent fc149db commit c00943a

31 files changed

+779
-1107
lines changed

.github/workflows/go-coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v2
1515
- uses: actions/setup-go@v2
1616
with:
17-
go-version: 1.17.8
17+
go-version: 1.19.3
1818
- name: Run go test with coverage
1919
run: COVER_PROFILE=coverage.txt make test
2020
- name: Codecov upload

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ kind-cluster: cluster-api ## Create a kind cluster with a local Docker repositor
237237
./cluster-api/hack/kind-install-for-capd.sh
238238

239239
cluster-api: ## Clone cluster-api repository for tilt use.
240-
git clone --branch v1.0.0 --depth 1 https://github.com/kubernetes-sigs/cluster-api.git
240+
git clone --branch v1.2.7 --depth 1 https://github.com/kubernetes-sigs/cluster-api.git
241241

242242
cluster-api/tilt-settings.json: hack/tilt-settings.json cluster-api
243243
cp ./hack/tilt-settings.json cluster-api

api/v1beta1/cloudstackcluster_types.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func (z *Zone) MetaName() string {
8181
return strings.ToLower(s)
8282
}
8383

84-
//+k8s:conversion-gen=false
84+
// +k8s:conversion-gen=false
8585
// CloudStackClusterSpec defines the desired state of CloudStackCluster.
8686
type CloudStackClusterSpec struct {
8787
Zones []Zone `json:"zones"`
@@ -101,7 +101,7 @@ type CloudStackClusterSpec struct {
101101
IdentityRef *CloudStackIdentityReference `json:"identityRef,omitempty"`
102102
}
103103

104-
//+k8s:conversion-gen=false
104+
// +k8s:conversion-gen=false
105105
// The status of the abstract CS k8s (not an actual Cloudstack Cluster) cluster.
106106
type CloudStackClusterStatus struct {
107107

@@ -130,9 +130,9 @@ type CloudStackClusterStatus struct {
130130
LBRuleID string `json:"loadBalancerRuleID,omitempty"`
131131
}
132132

133-
//+kubebuilder:object:root=true
134-
//+kubebuilder:subresource:status
135-
//+k8s:conversion-gen=false
133+
// +kubebuilder:object:root=true
134+
// +kubebuilder:subresource:status
135+
// +k8s:conversion-gen=false
136136
// CloudStackCluster is the Schema for the cloudstackclusters API
137137
type CloudStackCluster struct {
138138
metav1.TypeMeta `json:",inline"`
@@ -144,8 +144,8 @@ type CloudStackCluster struct {
144144
Status CloudStackClusterStatus `json:"status,omitempty"`
145145
}
146146

147-
//+kubebuilder:object:root=true
148-
//+k8s:conversion-gen=false
147+
// +kubebuilder:object:root=true
148+
// +k8s:conversion-gen=false
149149
// CloudStackClusterList contains a list of CloudStackCluster
150150
type CloudStackClusterList struct {
151151
metav1.TypeMeta `json:",inline"`

api/v1beta1/cloudstackzone_types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ type CloudStackZoneStatus struct {
4444
Ready bool `json:"ready"`
4545
}
4646

47-
//+kubebuilder:object:root=true
48-
//+kubebuilder:subresource:status
49-
//+k8s:conversion-gen=false
47+
// +kubebuilder:object:root=true
48+
// +kubebuilder:subresource:status
49+
// +k8s:conversion-gen=false
5050
// CloudStackZone is the Schema for the cloudstackzones API
5151
type CloudStackZone struct {
5252
metav1.TypeMeta `json:",inline"`

api/v1beta1/groupversion_info.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ limitations under the License.
1515
*/
1616

1717
// Package v1beta1 contains API Schema definitions for the infrastructure v1beta1 API group
18-
//+kubebuilder:object:generate=true
19-
//+groupName=infrastructure.cluster.x-k8s.io
18+
// +kubebuilder:object:generate=true
19+
// +groupName=infrastructure.cluster.x-k8s.io
2020
package v1beta1
2121

2222
import (

api/v1beta2/cloudstackmachinetemplate_webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func (r *CloudStackMachineTemplate) SetupWebhookWithManager(mgr ctrl.Manager) er
3939
Complete()
4040
}
4141

42-
//+kubebuilder:webhook:path=/mutate-infrastructure-cluster-x-k8s-io-v1beta2-cloudstackmachinetemplate,mutating=true,failurePolicy=fail,sideEffects=None,groups=infrastructure.cluster.x-k8s.io,resources=cloudstackmachinetemplates,verbs=create;update,versions=v1beta2,name=mcloudstackmachinetemplate.kb.io,admissionReviewVersions=v1beta1
42+
// +kubebuilder:webhook:path=/mutate-infrastructure-cluster-x-k8s-io-v1beta2-cloudstackmachinetemplate,mutating=true,failurePolicy=fail,sideEffects=None,groups=infrastructure.cluster.x-k8s.io,resources=cloudstackmachinetemplates,verbs=create;update,versions=v1beta2,name=mcloudstackmachinetemplate.kb.io,admissionReviewVersions=v1beta1
4343
var _ webhook.Defaulter = &CloudStackMachineTemplate{}
4444

4545
// Default implements webhook.Defaulter so a webhook will be registered for the type

api/v1beta2/groupversion_info.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ limitations under the License.
1515
*/
1616

1717
// Package v1beta2 contains API Schema definitions for the infrastructure v1beta2 API group
18-
//+kubebuilder:object:generate=true
19-
//+groupName=infrastructure.cluster.x-k8s.io
18+
// +kubebuilder:object:generate=true
19+
// +groupName=infrastructure.cluster.x-k8s.io
2020
package v1beta2
2121

2222
import (
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
controller-gen.kubebuilder.io/version: v0.8.0
7+
creationTimestamp: null
8+
name: cloudstackmachineowners.fakes.infrastructure.cluster.x-k8s.io
9+
spec:
10+
group: fakes.infrastructure.cluster.x-k8s.io
11+
names:
12+
kind: CloudStackMachineOwner
13+
listKind: CloudStackMachineOwnerList
14+
plural: cloudstackmachineowners
15+
singular: cloudstackmachineowner
16+
scope: Namespaced
17+
versions:
18+
- name: fakes
19+
schema:
20+
openAPIV3Schema:
21+
description: CloudStackMachineOwner is the Schema for CloudStack Machine owner
22+
(machineset, etcdadmcluster, kubeadmcontrolplane)
23+
properties:
24+
apiVersion:
25+
description: 'APIVersion defines the versioned schema of this representation
26+
of an object. Servers should convert recognized schemas to the latest
27+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
28+
type: string
29+
kind:
30+
description: 'Kind is a string value representing the REST resource this
31+
object represents. Servers may infer this from the endpoint the client
32+
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
34+
metadata:
35+
type: object
36+
spec:
37+
description: CloudStackMachineOwnerSpec defines the desired state of CloudStackMachineOwner
38+
properties:
39+
replicas:
40+
format: int32
41+
type: integer
42+
type: object
43+
status:
44+
description: CloudStackMachineOwnerStatus defines the name of the template
45+
properties:
46+
ready:
47+
type: boolean
48+
readyReplicas:
49+
format: int32
50+
type: integer
51+
replicas:
52+
format: int32
53+
type: integer
54+
required:
55+
- replicas
56+
type: object
57+
type: object
58+
served: true
59+
storage: true
60+
subresources:
61+
status: {}
62+
status:
63+
acceptedNames:
64+
kind: ""
65+
plural: ""
66+
conditions: []
67+
storedVersions: []

config/crd/bases/infrastructure.cluster.x-k8s.io_cloudstackclusters.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,11 @@ spec:
226226
description: Apache CloudStack Endpoint secret reference.
227227
properties:
228228
name:
229-
description: Name is unique within a namespace to reference
229+
description: name is unique within a namespace to reference
230230
a secret resource.
231231
type: string
232232
namespace:
233-
description: Namespace defines the space within which the
233+
description: namespace defines the space within which the
234234
secret name must be unique.
235235
type: string
236236
type: object

config/crd/bases/infrastructure.cluster.x-k8s.io_cloudstackfailuredomains.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ spec:
4444
description: Apache CloudStack Endpoint secret reference.
4545
properties:
4646
name:
47-
description: Name is unique within a namespace to reference a
47+
description: name is unique within a namespace to reference a
4848
secret resource.
4949
type: string
5050
namespace:
51-
description: Namespace defines the space within which the secret
51+
description: namespace defines the space within which the secret
5252
name must be unique.
5353
type: string
5454
type: object

0 commit comments

Comments
 (0)