Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

Commit 42bf1e7

Browse files
committed
chore(deps): bump metal-go to v0.25.0
Signed-off-by: Chris Privitere <[email protected]>
1 parent dc74571 commit 42bf1e7

File tree

8 files changed

+29
-18
lines changed

8 files changed

+29
-18
lines changed

api/v1alpha3/packetmachine_types.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ limitations under the License.
1717
package v1alpha3
1818

1919
import (
20+
metal "github.com/equinix-labs/metal-go/metal/v1"
2021
corev1 "k8s.io/api/core/v1"
2122
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2223
capierrors "sigs.k8s.io/cluster-api/errors"
@@ -30,10 +31,10 @@ const (
3031

3132
// PacketMachineSpec defines the desired state of PacketMachine.
3233
type PacketMachineSpec struct {
33-
OS string `json:"OS"` //nolint: tagliatelle
34-
BillingCycle string `json:"billingCycle"`
35-
MachineType string `json:"machineType"`
36-
SshKeys []string `json:"sshKeys,omitempty"`
34+
OS string `json:"OS"` //nolint: tagliatelle
35+
BillingCycle metal.DeviceCreateInputBillingCycle `json:"billingCycle"`
36+
MachineType string `json:"machineType"`
37+
SshKeys []string `json:"sshKeys,omitempty"`
3738

3839
// Facility represents the Packet facility for this cluster.
3940
// Override from the PacketCluster spec.

api/v1alpha3/zz_generated.conversion.go

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1beta1/packetmachine_types.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ limitations under the License.
1717
package v1beta1
1818

1919
import (
20+
metal "github.com/equinix-labs/metal-go/metal/v1"
2021
corev1 "k8s.io/api/core/v1"
2122
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2223
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
@@ -53,10 +54,10 @@ const (
5354

5455
// PacketMachineSpec defines the desired state of PacketMachine.
5556
type PacketMachineSpec struct {
56-
OS string `json:"os"`
57-
BillingCycle string `json:"billingCycle"`
58-
MachineType string `json:"machineType"`
59-
SSHKeys []string `json:"sshKeys,omitempty"`
57+
OS string `json:"os"`
58+
BillingCycle metal.DeviceCreateInputBillingCycle `json:"billingCycle"`
59+
MachineType string `json:"machineType"`
60+
SSHKeys []string `json:"sshKeys,omitempty"`
6061

6162
// Facility represents the Packet facility for this machine.
6263
// Override from the PacketCluster spec.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ spec:
6262
OS:
6363
type: string
6464
billingCycle:
65+
description: DeviceCreateInputBillingCycle The billing cycle of the
66+
device.
6567
type: string
6668
facility:
6769
description: Facility represents the Packet facility for this cluster.
@@ -197,6 +199,8 @@ spec:
197199
description: PacketMachineSpec defines the desired state of PacketMachine.
198200
properties:
199201
billingCycle:
202+
description: DeviceCreateInputBillingCycle The billing cycle of the
203+
device.
200204
type: string
201205
facility:
202206
description: Facility represents the Packet facility for this machine.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ spec:
5050
OS:
5151
type: string
5252
billingCycle:
53+
description: DeviceCreateInputBillingCycle The billing cycle
54+
of the device.
5355
type: string
5456
facility:
5557
description: Facility represents the Packet facility for this
@@ -130,6 +132,8 @@ spec:
130132
of the machine.
131133
properties:
132134
billingCycle:
135+
description: DeviceCreateInputBillingCycle The billing cycle
136+
of the device.
133137
type: string
134138
facility:
135139
description: Facility represents the Packet facility for this

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module sigs.k8s.io/cluster-api-provider-packet
33
go 1.19
44

55
require (
6-
github.com/equinix-labs/metal-go v0.21.0
6+
github.com/equinix-labs/metal-go v0.25.0
77
github.com/onsi/gomega v1.27.5
88
github.com/pkg/errors v0.9.1
99
github.com/spf13/cobra v1.6.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m
101101
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
102102
github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
103103
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
104-
github.com/equinix-labs/metal-go v0.21.0 h1:AWmciCaO+tjNKCKB0r4pMHpoGenzAqua3TbXA5VjZE8=
105-
github.com/equinix-labs/metal-go v0.21.0/go.mod h1:SmxCklxW+KjmBLVMdEXgtFO5gD5/b4N0VxcNgUYbOH4=
104+
github.com/equinix-labs/metal-go v0.25.0 h1:AgMwoRYhfqPSkGu1FFLlyVCFBRy/xiBgnfiydMtw7jY=
105+
github.com/equinix-labs/metal-go v0.25.0/go.mod h1:SmxCklxW+KjmBLVMdEXgtFO5gD5/b4N0VxcNgUYbOH4=
106106
github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ=
107107
github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U=
108108
github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=

pkg/cloud/packet/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ func (p *Client) EnableProjectBGP(ctx context.Context, projectID string) error {
302302
// - bgpConfig struct does not have Status=="disabled"
303303
if err != nil {
304304
return err
305-
} else if bgpConfig != nil && bgpConfig.GetId() != "" && strings.ToLower(bgpConfig.GetStatus()) != "disabled" {
305+
} else if bgpConfig != nil && bgpConfig.GetId() != "" && bgpConfig.GetStatus() != metal.BGPCONFIGSTATUS_DISABLED {
306306
return nil
307307
}
308308

@@ -341,7 +341,7 @@ func (p *Client) EnableProjectBGP(ctx context.Context, projectID string) error {
341341
// EnsureNodeBGPEnabled check if the node has bgp enabled, and set it if it does not.
342342
func (p *Client) EnsureNodeBGPEnabled(ctx context.Context, id string) error {
343343
// fortunately, this is idempotent, so just create
344-
addressFamily := "ipv4"
344+
addressFamily := metal.BGPSESSIONINPUTADDRESSFAMILY_IPV4
345345
req := metal.BGPSessionInput{
346346
AddressFamily: &addressFamily,
347347
}

0 commit comments

Comments
 (0)