Skip to content

Commit 44203ba

Browse files
committed
capi 1.6.x: bump deps, fix deprecations/changes
1 parent 568a7a9 commit 44203ba

18 files changed

+315
-933
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,8 @@ generate: ## Generate code
320320
.PHONY: generate-go
321321
generate-go: $(CONTROLLER_GEN) $(CONVERSION_GEN) ## Runs Go related generate targets
322322
$(CONTROLLER_GEN) \
323-
paths=./api/... \
323+
paths=./ \
324+
paths=./... \
324325
paths=./$(EXP_DIR)/api/... \
325326
object:headerFile=./hack/boilerplate/boilerplate.generatego.txt
326327
$(CONVERSION_GEN) \
@@ -334,6 +335,7 @@ generate-go: $(CONTROLLER_GEN) $(CONVERSION_GEN) ## Runs Go related generate tar
334335
.PHONY: generate-manifests
335336
generate-manifests: $(CONTROLLER_GEN) ## Generate manifests e.g. CRD, RBAC etc.
336337
$(CONTROLLER_GEN) \
338+
paths=./ \
337339
paths=./api/... \
338340
paths=./$(EXP_DIR)/api/... \
339341
crd:crdVersions=v1 \
@@ -342,6 +344,7 @@ generate-manifests: $(CONTROLLER_GEN) ## Generate manifests e.g. CRD, RBAC etc.
342344
output:webhook:dir=$(WEBHOOK_ROOT) \
343345
webhook
344346
$(CONTROLLER_GEN) \
347+
paths=./ \
345348
paths=./controllers/... \
346349
paths=./$(EXP_DIR)/controllers/... \
347350
output:rbac:dir=$(RBAC_ROOT) \

api/v1alpha4/zz_generated.deepcopy.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1beta1/zz_generated.deepcopy.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cloud/scope/machine.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ import (
3737
"sigs.k8s.io/cluster-api-provider-gcp/cloud/providerid"
3838
"sigs.k8s.io/cluster-api-provider-gcp/cloud/services/shared"
3939
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
40-
"sigs.k8s.io/cluster-api/controllers/noderefutil"
4140
capierrors "sigs.k8s.io/cluster-api/errors"
4241
"sigs.k8s.io/cluster-api/util"
4342
"sigs.k8s.io/cluster-api/util/patch"
@@ -148,7 +147,7 @@ func (m *MachineScope) Role() string {
148147

149148
// GetInstanceID returns the GCPMachine instance id by parsing Spec.ProviderID.
150149
func (m *MachineScope) GetInstanceID() *string {
151-
parsed, err := noderefutil.NewProviderID(m.GetProviderID()) //nolint: staticcheck
150+
parsed, err := NewProviderID(m.GetProviderID()) //nolint: staticcheck
152151
if err != nil {
153152
return nil
154153
}

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

Lines changed: 1 addition & 223 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.11.4
6+
controller-gen.kubebuilder.io/version: v0.13.0
77
name: gcpclusters.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io
@@ -16,228 +16,6 @@ spec:
1616
singular: gcpcluster
1717
scope: Namespaced
1818
versions:
19-
- additionalPrinterColumns:
20-
- description: Cluster to which this GCPCluster belongs
21-
jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name
22-
name: Cluster
23-
type: string
24-
- description: Cluster infrastructure is ready for GCE instances
25-
jsonPath: .status.ready
26-
name: Ready
27-
type: string
28-
- description: GCP network the cluster is using
29-
jsonPath: .spec.network.name
30-
name: Network
31-
type: string
32-
- description: API Endpoint
33-
jsonPath: .status.apiEndpoints[0]
34-
name: Endpoint
35-
priority: 1
36-
type: string
37-
name: v1alpha3
38-
schema:
39-
openAPIV3Schema:
40-
description: GCPCluster is the Schema for the gcpclusters API.
41-
properties:
42-
apiVersion:
43-
description: 'APIVersion defines the versioned schema of this representation
44-
of an object. Servers should convert recognized schemas to the latest
45-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
46-
type: string
47-
kind:
48-
description: 'Kind is a string value representing the REST resource this
49-
object represents. Servers may infer this from the endpoint the client
50-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
51-
type: string
52-
metadata:
53-
type: object
54-
spec:
55-
description: GCPClusterSpec defines the desired state of GCPCluster.
56-
properties:
57-
additionalLabels:
58-
additionalProperties:
59-
type: string
60-
description: AdditionalLabels is an optional set of tags to add to
61-
GCP resources managed by the GCP provider, in addition to the ones
62-
added by default.
63-
type: object
64-
controlPlaneEndpoint:
65-
description: ControlPlaneEndpoint represents the endpoint used to
66-
communicate with the control plane.
67-
properties:
68-
host:
69-
description: The hostname on which the API server is serving.
70-
type: string
71-
port:
72-
description: The port on which the API server is serving.
73-
format: int32
74-
type: integer
75-
required:
76-
- host
77-
- port
78-
type: object
79-
failureDomains:
80-
description: FailureDomains is an optional field which is used to
81-
assign selected availability zones to a cluster FailureDomains if
82-
empty, defaults to all the zones in the selected region and if specified
83-
would override the default zones.
84-
items:
85-
type: string
86-
type: array
87-
network:
88-
description: NetworkSpec encapsulates all things related to GCP network.
89-
properties:
90-
autoCreateSubnetworks:
91-
description: "AutoCreateSubnetworks: When set to true, the VPC
92-
network is created in \"auto\" mode. When set to false, the
93-
VPC network is created in \"custom\" mode. \n An auto mode VPC
94-
network starts with one subnet per region. Each subnet has a
95-
predetermined range as described in Auto mode VPC network IP
96-
ranges. \n Defaults to true."
97-
type: boolean
98-
loadBalancerBackendPort:
99-
description: Allow for configuration of load balancer backend
100-
(useful for changing apiserver port)
101-
format: int32
102-
type: integer
103-
name:
104-
description: Name is the name of the network to be used.
105-
type: string
106-
subnets:
107-
description: Subnets configuration.
108-
items:
109-
description: SubnetSpec configures an GCP Subnet.
110-
properties:
111-
cidrBlock:
112-
description: CidrBlock is the range of internal addresses
113-
that are owned by this subnetwork. Provide this property
114-
when you create the subnetwork. For example, 10.0.0.0/8
115-
or 192.168.0.0/16. Ranges must be unique and non-overlapping
116-
within a network. Only IPv4 is supported. This field can
117-
be set only at resource creation time.
118-
type: string
119-
description:
120-
description: Description is an optional description associated
121-
with the resource.
122-
type: string
123-
name:
124-
description: Name defines a unique identifier to reference
125-
this resource.
126-
type: string
127-
privateGoogleAccess:
128-
description: PrivateGoogleAccess defines whether VMs in
129-
this subnet can access Google services without assigning
130-
external IP addresses
131-
type: boolean
132-
region:
133-
description: Region is the name of the region where the
134-
Subnetwork resides.
135-
type: string
136-
routeTableId:
137-
description: 'EnableFlowLogs: Whether to enable flow logging
138-
for this subnetwork. If this field is not explicitly set,
139-
it will not appear in get listings. If not set the default
140-
behavior is to disable flow logging.'
141-
type: boolean
142-
secondaryCidrBlocks:
143-
additionalProperties:
144-
type: string
145-
description: SecondaryCidrBlocks defines secondary CIDR
146-
ranges, from which secondary IP ranges of a VM may be
147-
allocated
148-
type: object
149-
type: object
150-
type: array
151-
type: object
152-
project:
153-
description: Project is the name of the project to deploy the cluster
154-
to.
155-
type: string
156-
region:
157-
description: The GCP Region the cluster lives in.
158-
type: string
159-
required:
160-
- project
161-
- region
162-
type: object
163-
status:
164-
description: GCPClusterStatus defines the observed state of GCPCluster.
165-
properties:
166-
failureDomains:
167-
additionalProperties:
168-
description: FailureDomainSpec is the Schema for Cluster API failure
169-
domains. It allows controllers to understand how many failure
170-
domains a cluster can optionally span across.
171-
properties:
172-
attributes:
173-
additionalProperties:
174-
type: string
175-
description: Attributes is a free form map of attributes an
176-
infrastructure provider might use or require.
177-
type: object
178-
controlPlane:
179-
description: ControlPlane determines if this failure domain
180-
is suitable for use by control plane machines.
181-
type: boolean
182-
type: object
183-
description: FailureDomains is a slice of FailureDomains.
184-
type: object
185-
network:
186-
description: Network encapsulates GCP networking resources.
187-
properties:
188-
apiServerBackendService:
189-
description: APIServerBackendService is the full reference to
190-
the backend service created for the API Server.
191-
type: string
192-
apiServerForwardingRule:
193-
description: APIServerForwardingRule is the full reference to
194-
the forwarding rule created for the API Server.
195-
type: string
196-
apiServerHealthCheck:
197-
description: APIServerHealthCheck is the full reference to the
198-
health check created for the API Server.
199-
type: string
200-
apiServerInstanceGroups:
201-
additionalProperties:
202-
type: string
203-
description: APIServerInstanceGroups is a map from zone to the
204-
full reference to the instance groups created for the control
205-
plane nodes created in the same zone.
206-
type: object
207-
apiServerIpAddress:
208-
description: APIServerAddress is the IPV4 global address assigned
209-
to the load balancer created for the API Server.
210-
type: string
211-
apiServerTargetProxy:
212-
description: APIServerTargetProxy is the full reference to the
213-
target proxy created for the API Server.
214-
type: string
215-
firewallRules:
216-
additionalProperties:
217-
type: string
218-
description: FirewallRules is a map from the name of the rule
219-
to its full reference.
220-
type: object
221-
router:
222-
description: Router is the full reference to the router created
223-
within the network it'll contain the cloud nat gateway
224-
type: string
225-
selfLink:
226-
description: SelfLink is the link to the Network used for this
227-
cluster.
228-
type: string
229-
type: object
230-
ready:
231-
description: Bastion Instance `json:"bastion,omitempty"`
232-
type: boolean
233-
required:
234-
- ready
235-
type: object
236-
type: object
237-
served: true
238-
storage: false
239-
subresources:
240-
status: {}
24119
- additionalPrinterColumns:
24220
- description: Cluster to which this GCPCluster belongs
24321
jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.11.4
6+
controller-gen.kubebuilder.io/version: v0.13.0
77
name: gcpclustertemplates.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io

0 commit comments

Comments
 (0)