Skip to content

Commit f7d3805

Browse files
committed
chore: bump CAPI to v1.4.4
Signed-off-by: Richard Case <[email protected]>
1 parent cfaac04 commit f7d3805

27 files changed

+202
-1027
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ GOLANGCI_LINT_VER := v1.52.1
7575
GOLANGCI_LINT_BIN := golangci-lint
7676
GOLANGCI_LINT := $(TOOLS_BIN_DIR)/$(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VER)
7777

78-
KIND_VER := v0.17.0
78+
KIND_VER := v0.20.0
7979
KIND_BIN := kind
8080
KIND := $(TOOLS_BIN_DIR)/$(KIND_BIN)-$(KIND_VER)
8181

@@ -102,7 +102,7 @@ SETUP_ENVTEST_VER := v0.0.0-20211110210527-619e6b92dab9
102102
SETUP_ENVTEST_BIN := setup-envtest
103103
SETUP_ENVTEST := $(TOOLS_BIN_DIR)/$(SETUP_ENVTEST_BIN)
104104

105-
GO_APIDIFF_VER := v0.4.0
105+
GO_APIDIFF_VER := v0.6.0
106106
GO_APIDIFF_BIN := go-apidiff
107107
GO_APIDIFF := $(TOOLS_BIN_DIR)/$(GO_APIDIFF_BIN)
108108

@@ -473,7 +473,7 @@ create-management-cluster: $(KUSTOMIZE) $(ENVSUBST) $(KIND) $(KUBECTL)
473473
./hack/install-cert-manager.sh
474474

475475
# Deploy CAPI
476-
curl --retry $(CURL_RETRIES) -sSL https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.3.8/cluster-api-components.yaml | $(ENVSUBST) | $(KUBECTL) apply -f -
476+
curl --retry $(CURL_RETRIES) -sSL https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.4/cluster-api-components.yaml | $(ENVSUBST) | $(KUBECTL) apply -f -
477477

478478
# Deploy CAPG
479479
$(KIND) load docker-image $(CONTROLLER_IMG)-$(ARCH):$(TAG) --name=clusterapi

Tiltfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ settings = {
1818
"deploy_cert_manager": True,
1919
"preload_images_for_kind": True,
2020
"kind_cluster_name": "capg",
21-
"capi_version": "v1.3.8",
21+
"capi_version": "v1.4.4",
2222
"cert_manager_version": "v1.11.0",
23-
"kubernetes_version": "v1.25.10",
23+
"kubernetes_version": "v1.26.1",
2424
}
2525

2626
keys = ["GCP_B64ENCODED_CREDENTIALS"]

api/v1alpha3/doc.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17+
// Package v1alpha3 contains the v1alpha3 API implementation.
18+
//
19+
// Deprecated: This package will be removed in one of the next releases
1720
package v1alpha3
1821

1922
// +k8s:conversion-gen=sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1

api/v1alpha3/gcpcluster_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package v1alpha3
1818

1919
import (
2020
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
21-
clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha3"
21+
clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha3" //nolint: staticcheck
2222
)
2323

2424
const (

api/v1alpha4/doc.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17+
// Package v1alpha4 contains the v1alpha4 API implementation.
18+
//
19+
// Deprecated: This package will be removed in one of the next releases.
1720
package v1alpha4
1821

1922
// +k8s:conversion-gen=sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1

api/v1alpha4/gcpcluster_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package v1alpha4
1818

1919
import (
2020
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
21-
clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4"
21+
clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" //nolint: staticcheck
2222
)
2323

2424
const (

cloud/scope/machine.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,12 @@ func (m *MachineScope) Role() string {
147147

148148
// GetInstanceID returns the GCPMachine instance id by parsing Spec.ProviderID.
149149
func (m *MachineScope) GetInstanceID() *string {
150-
parsed, err := noderefutil.NewProviderID(m.GetProviderID())
150+
parsed, err := noderefutil.NewProviderID(m.GetProviderID()) //nolint: staticcheck
151151
if err != nil {
152152
return nil
153153
}
154154

155-
return pointer.StringPtr(parsed.ID())
155+
return pointer.String(parsed.ID()) //nolint: staticcheck
156156
}
157157

158158
// GetProviderID returns the GCPMachine providerID from the spec.
@@ -171,7 +171,7 @@ func (m *MachineScope) GetProviderID() string {
171171
// SetProviderID sets the GCPMachine providerID in spec.
172172
func (m *MachineScope) SetProviderID() {
173173
providerID, _ := providerid.New(m.ClusterGetter.Project(), m.Zone(), m.Name())
174-
m.GCPMachine.Spec.ProviderID = pointer.StringPtr(providerID.String())
174+
m.GCPMachine.Spec.ProviderID = pointer.String(providerID.String())
175175
}
176176

177177
// GetInstanceStatus returns the GCPMachine instance status.
@@ -191,7 +191,7 @@ func (m *MachineScope) SetReady() {
191191

192192
// SetFailureMessage sets the GCPMachine status failure message.
193193
func (m *MachineScope) SetFailureMessage(v error) {
194-
m.GCPMachine.Status.FailureMessage = pointer.StringPtr(v.Error())
194+
m.GCPMachine.Status.FailureMessage = pointer.String(v.Error())
195195
}
196196

197197
// SetFailureReason sets the GCPMachine status failure reason.
@@ -253,7 +253,7 @@ func (m *MachineScope) InstanceAdditionalDiskSpec() []*compute.AttachedDisk {
253253
additionalDisk := &compute.AttachedDisk{
254254
AutoDelete: true,
255255
InitializeParams: &compute.AttachedDiskInitializeParams{
256-
DiskSizeGb: pointer.Int64PtrDerefOr(disk.Size, 30),
256+
DiskSizeGb: pointer.Int64Deref(disk.Size, 30),
257257
DiskType: path.Join("zones", m.Zone(), "diskTypes", string(*disk.DeviceType)),
258258
},
259259
}
@@ -341,7 +341,7 @@ func (m *MachineScope) InstanceSpec(log logr.Logger) *compute.Instance {
341341
Labels: infrav1.Build(infrav1.BuildParams{
342342
ClusterName: m.ClusterGetter.Name(),
343343
Lifecycle: infrav1.ResourceLifecycleOwned,
344-
Role: pointer.StringPtr(m.Role()),
344+
Role: pointer.String(m.Role()),
345345
// TODO(vincepri): Check what needs to be added for the cloud provider label.
346346
Additional: m.ClusterGetter.AdditionalLabels().AddLabels(m.GCPMachine.Spec.AdditionalLabels),
347347
}),

cloud/scope/managedcontrolplane.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ func (s *ManagedControlPlaneScope) GetAllNodePools(ctx context.Context) ([]infra
166166
if s.AllManagedMachinePools == nil || len(s.AllManagedMachinePools) == 0 {
167167
listOptions := []client.ListOption{
168168
client.InNamespace(s.GCPManagedControlPlane.Namespace),
169-
client.MatchingLabels(map[string]string{clusterv1.ClusterLabelName: s.Cluster.Name}),
169+
client.MatchingLabels(map[string]string{clusterv1.ClusterNameLabel: s.Cluster.Name}),
170170
}
171171

172172
machinePoolList := &clusterv1exp.MachinePoolList{}

cloud/services/compute/instances/reconcile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ func (s *Service) createOrGetInstance(ctx context.Context) (*compute.Instance, e
136136
instanceKey := meta.ZonalKey(instanceName, s.scope.Zone())
137137
instanceSpec.Metadata.Items = append(instanceSpec.Metadata.Items, &compute.MetadataItems{
138138
Key: "user-data",
139-
Value: pointer.StringPtr(bootstrapData),
139+
Value: pointer.String(bootstrapData),
140140
})
141141

142142
log.V(2).Info("Looking for instance", "name", instanceName, "zone", s.scope.Zone())

clusterctl-settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"name": "infrastructure-gcp",
33
"config": {
44
"componentsFile": "infrastructure-components.yaml",
5-
"nextVersion": "v1.3.0"
5+
"nextVersion": "v1.4.0"
66
}
7-
}
7+
}

0 commit comments

Comments
 (0)