Skip to content

Commit d595fc2

Browse files
committed
upgrade go version to 1.22 in hack/tools and main, upgrade controller_gen and conversion_gen to 0.16.1, fix deprecated arg in Makefile accordingly
1 parent 4270448 commit d595fc2

File tree

9 files changed

+308
-610
lines changed

9 files changed

+308
-610
lines changed

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ RELEASE_REGISTRY := gcr.io/spectro-images-public/release/cluster-api-provider-ma
3232
RELEASE_CONTROLLER_IMG := $(RELEASE_REGISTRY)/$(IMAGE_NAME)
3333

3434
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
35-
CRD_OPTIONS ?= "crd:trivialVersions=true"
35+
CRD_OPTIONS ?= "crd"
3636

3737
MOCKGEN := $(TOOLS_BIN_DIR)/mockgen
3838
CONTROLLER_GEN := $(TOOLS_BIN_DIR)/controller-gen
@@ -137,11 +137,11 @@ generate-go:
137137
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
138138

139139
$(CONVERSION_GEN) \
140-
--input-dirs=./api/v1beta1 \
141140
--extra-peer-dirs=github.com/spectrocloud/cluster-api-provider-maas/api/v1beta1 \
142-
--build-tag=ignore_autogenerated_core_v1alpha3 \
143-
--output-file-base=zz_generated.conversion $(GEN_OUTPUT_BASE) \
144-
--go-header-file=./hack/boilerplate.go.txt
141+
--output-file=zz_generated.conversion \
142+
--go-header-file=./hack/boilerplate.go.txt \
143+
--v=5 \
144+
./api/v1beta1
145145

146146
generate-manifests: ## Generate manifests
147147
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
Lines changed: 47 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
21
---
32
apiVersion: apiextensions.k8s.io/v1
43
kind: CustomResourceDefinition
54
metadata:
65
annotations:
7-
controller-gen.kubebuilder.io/version: v0.6.1
8-
creationTimestamp: null
6+
controller-gen.kubebuilder.io/version: v0.16.1
97
name: maasclusters.infrastructure.cluster.x-k8s.io
108
spec:
119
group: infrastructure.cluster.x-k8s.io
@@ -24,14 +22,19 @@ spec:
2422
description: MaasCluster is the Schema for the maasclusters API
2523
properties:
2624
apiVersion:
27-
description: 'APIVersion defines the versioned schema of this representation
28-
of an object. Servers should convert recognized schemas to the latest
29-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
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
3030
type: string
3131
kind:
32-
description: 'Kind is a string value representing the REST resource this
33-
object represents. Servers may infer this from the endpoint the client
34-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
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
3538
type: string
3639
metadata:
3740
type: object
@@ -58,8 +61,9 @@ spec:
5861
minLength: 1
5962
type: string
6063
failureDomains:
61-
description: FailureDomains are not usually defined on the spec. but
62-
useful for MaaS since we can limit the domains to these
64+
description: |-
65+
FailureDomains are not usually defined on the spec.
66+
but useful for MaaS since we can limit the domains to these
6367
items:
6468
type: string
6569
type: array
@@ -76,37 +80,37 @@ spec:
7680
operational state.
7781
properties:
7882
lastTransitionTime:
79-
description: Last time the condition transitioned from one status
80-
to another. This should be when the underlying condition changed.
81-
If that is not known, then using the time when the API field
82-
changed is acceptable.
83+
description: |-
84+
Last time the condition transitioned from one status to another.
85+
This should be when the underlying condition changed. If that is not known, then using the time when
86+
the API field changed is acceptable.
8387
format: date-time
8488
type: string
8589
message:
86-
description: A human readable message indicating details about
87-
the transition. This field may be empty.
90+
description: |-
91+
A human readable message indicating details about the transition.
92+
This field may be empty.
8893
type: string
8994
reason:
90-
description: The reason for the condition's last transition
91-
in CamelCase. The specific API may choose whether or not this
92-
field is considered a guaranteed API. This field may not be
93-
empty.
95+
description: |-
96+
The reason for the condition's last transition in CamelCase.
97+
The specific API may choose whether or not this field is considered a guaranteed API.
98+
This field may be empty.
9499
type: string
95100
severity:
96-
description: Severity provides an explicit classification of
97-
Reason code, so the users or machines can immediately understand
98-
the current situation and act accordingly. The Severity field
99-
MUST be set only when Status=False.
101+
description: |-
102+
severity provides an explicit classification of Reason code, so the users or machines can immediately
103+
understand the current situation and act accordingly.
104+
The Severity field MUST be set only when Status=False.
100105
type: string
101106
status:
102-
description: Status of the condition, one of True, False, Unknown.
107+
description: status of the condition, one of True, False, Unknown.
103108
type: string
104109
type:
105-
description: Type of condition in CamelCase or in foo.example.com/CamelCase.
106-
Many .condition.type values are consistent across resources
107-
like Available, but because arbitrary conditions can be useful
108-
(see .node.status.conditions), the ability to deconflict is
109-
important.
110+
description: |-
111+
type of condition in CamelCase or in foo.example.com/CamelCase.
112+
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
113+
can be useful (see .node.status.conditions), the ability to deconflict is important.
110114
type: string
111115
required:
112116
- lastTransitionTime
@@ -116,24 +120,24 @@ spec:
116120
type: array
117121
failureDomains:
118122
additionalProperties:
119-
description: FailureDomainSpec is the Schema for Cluster API failure
120-
domains. It allows controllers to understand how many failure
121-
domains a cluster can optionally span across.
123+
description: |-
124+
FailureDomainSpec is the Schema for Cluster API failure domains.
125+
It allows controllers to understand how many failure domains a cluster can optionally span across.
122126
properties:
123127
attributes:
124128
additionalProperties:
125129
type: string
126-
description: Attributes is a free form map of attributes an
130+
description: attributes is a free form map of attributes an
127131
infrastructure provider might use or require.
128132
type: object
129133
controlPlane:
130-
description: ControlPlane determines if this failure domain
134+
description: controlPlane determines if this failure domain
131135
is suitable for use by control plane machines.
132136
type: boolean
133137
type: object
134-
description: FailureDomains don't mean much in CAPMAAS since it's
135-
all local, but we can see how the rest of cluster API will use this
136-
if we populate it.
138+
description: |-
139+
FailureDomains don't mean much in CAPMAAS since it's all local, but we can see how the rest of cluster API
140+
will use this if we populate it.
137141
type: object
138142
network:
139143
description: Network represents the network
@@ -144,10 +148,10 @@ spec:
144148
type: object
145149
ready:
146150
default: false
147-
description: 'INSERT ADDITIONAL STATUS FIELD - define observed state
148-
of cluster Important: Run "make" to regenerate code after modifying
149-
this file Ready denotes that the maas cluster (infrastructure) is
150-
ready.'
151+
description: |-
152+
INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
153+
Important: Run "make" to regenerate code after modifying this file
154+
Ready denotes that the maas cluster (infrastructure) is ready.
151155
type: boolean
152156
required:
153157
- ready
@@ -157,9 +161,3 @@ spec:
157161
storage: true
158162
subresources:
159163
status: {}
160-
status:
161-
acceptedNames:
162-
kind: ""
163-
plural: ""
164-
conditions: []
165-
storedVersions: []

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

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
21
---
32
apiVersion: apiextensions.k8s.io/v1
43
kind: CustomResourceDefinition
54
metadata:
65
annotations:
7-
controller-gen.kubebuilder.io/version: v0.6.1
8-
creationTimestamp: null
6+
controller-gen.kubebuilder.io/version: v0.16.1
97
name: maasmachines.infrastructure.cluster.x-k8s.io
108
spec:
119
group: infrastructure.cluster.x-k8s.io
@@ -24,24 +22,29 @@ spec:
2422
description: MaasMachine is the Schema for the maasmachines API
2523
properties:
2624
apiVersion:
27-
description: 'APIVersion defines the versioned schema of this representation
28-
of an object. Servers should convert recognized schemas to the latest
29-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
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
3030
type: string
3131
kind:
32-
description: 'Kind is a string value representing the REST resource this
33-
object represents. Servers may infer this from the endpoint the client
34-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
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
3538
type: string
3639
metadata:
3740
type: object
3841
spec:
3942
description: MaasMachineSpec defines the desired state of MaasMachine
4043
properties:
4144
failureDomain:
42-
description: FailureDomain is the failure domain the machine will
43-
be created in. Must match a key in the FailureDomains map stored
44-
on the cluster object.
45+
description: |-
46+
FailureDomain is the failure domain the machine will be created in.
47+
Must match a key in the FailureDomains map stored on the cluster object.
4548
type: string
4649
image:
4750
description: Image will be the MaaS image id
@@ -103,37 +106,37 @@ spec:
103106
operational state.
104107
properties:
105108
lastTransitionTime:
106-
description: Last time the condition transitioned from one status
107-
to another. This should be when the underlying condition changed.
108-
If that is not known, then using the time when the API field
109-
changed is acceptable.
109+
description: |-
110+
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
112+
the API field changed is acceptable.
110113
format: date-time
111114
type: string
112115
message:
113-
description: A human readable message indicating details about
114-
the transition. This field may be empty.
116+
description: |-
117+
A human readable message indicating details about the transition.
118+
This field may be empty.
115119
type: string
116120
reason:
117-
description: The reason for the condition's last transition
118-
in CamelCase. The specific API may choose whether or not this
119-
field is considered a guaranteed API. This field may not be
120-
empty.
121+
description: |-
122+
The reason for the condition's last transition in CamelCase.
123+
The specific API may choose whether or not this field is considered a guaranteed API.
124+
This field may be empty.
121125
type: string
122126
severity:
123-
description: Severity provides an explicit classification of
124-
Reason code, so the users or machines can immediately understand
125-
the current situation and act accordingly. The Severity field
126-
MUST be set only when Status=False.
127+
description: |-
128+
severity provides an explicit classification of Reason code, so the users or machines can immediately
129+
understand the current situation and act accordingly.
130+
The Severity field MUST be set only when Status=False.
127131
type: string
128132
status:
129-
description: Status of the condition, one of True, False, Unknown.
133+
description: status of the condition, one of True, False, Unknown.
130134
type: string
131135
type:
132-
description: Type of condition in CamelCase or in foo.example.com/CamelCase.
133-
Many .condition.type values are consistent across resources
134-
like Available, but because arbitrary conditions can be useful
135-
(see .node.status.conditions), the ability to deconflict is
136-
important.
136+
description: |-
137+
type of condition in CamelCase or in foo.example.com/CamelCase.
138+
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
139+
can be useful (see .node.status.conditions), the ability to deconflict is important.
137140
type: string
138141
required:
139142
- lastTransitionTime
@@ -146,14 +149,16 @@ spec:
146149
the IP of this machine
147150
type: boolean
148151
failureMessage:
149-
description: FailureMessage will be set in the event that there is
150-
a terminal problem reconciling the Machine and will contain a more
151-
verbose string suitable for logging and human consumption.
152+
description: |-
153+
FailureMessage will be set in the event that there is a terminal problem
154+
reconciling the Machine and will contain a more verbose string suitable
155+
for logging and human consumption.
152156
type: string
153157
failureReason:
154-
description: FailureReason will be set in the event that there is
155-
a terminal problem reconciling the Machine and will contain a succinct
156-
value suitable for machine interpretation.
158+
description: |-
159+
FailureReason will be set in the event that there is a terminal problem
160+
reconciling the Machine and will contain a succinct value suitable
161+
for machine interpretation.
157162
type: string
158163
hostname:
159164
description: Hostname is the actual MaaS hostname
@@ -176,9 +181,3 @@ spec:
176181
storage: true
177182
subresources:
178183
status: {}
179-
status:
180-
acceptedNames:
181-
kind: ""
182-
plural: ""
183-
conditions: []
184-
storedVersions: []

0 commit comments

Comments
 (0)