Skip to content

Commit

Permalink
Fixes from feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
huxcrux committed Mar 8, 2024
1 parent 4e42810 commit db0cb99
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion api/v1alpha5/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/v1alpha6/openstackmachine_conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func restorev1beta1MachineSpec(previous *infrav1.OpenStackMachineSpec, dst *infr
dst.AdditionalBlockDevices = previous.AdditionalBlockDevices
dst.ServerGroup = previous.ServerGroup
dst.Image = previous.Image
dst.FloatingAddressFromPoolRef = previous.FloatingAddressFromPoolRef
dst.FloatingIPPoolRef = previous.FloatingIPPoolRef
}

func convertNetworksToPorts(networks []NetworkParam, s apiconversion.Scope) ([]infrav1.PortOpts, error) {
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha6/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/v1alpha7/openstackmachine_conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func restorev1beta1MachineSpec(previous *infrav1.OpenStackMachineSpec, dst *infr
restorev1beta1Port(&previous.Ports[i], &dst.Ports[i])
}
}
dst.FloatingAddressFromPoolRef = previous.FloatingAddressFromPoolRef
dst.FloatingIPPoolRef = previous.FloatingIPPoolRef
}

func Convert_v1alpha7_OpenStackMachineSpec_To_v1beta1_OpenStackMachineSpec(in *OpenStackMachineSpec, out *infrav1.OpenStackMachineSpec, s apiconversion.Scope) error {
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha7/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions api/v1beta1/conditions_consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const (
// FloatingAddressFromPoolReadyCondition reports on the current status of the Floating IPs from ipam pool.
FloatingAddressFromPoolReadyCondition clusterv1.ConditionType = "FloatingAddressFromPoolReady"
// WaitingForIpamProviderReason used when machine is waiting for ipam provider to be ready before proceeding.
FloatingAddressFromPoolWaitingForIpamProviderReason = "WaitingForIpamProvider"
// FloatingAddressFromPoolErrorReason is used when FloatingAddressFromPool is used when there is and error attaching an IP from the pool.
FloatingAddressFromPoolWaitingForIpamProviderReason = "WaitingForIPAMProvider"
// FloatingAddressFromPoolErrorReason is used when there is an error attaching an IP from the pool to an machine.
FloatingAddressFromPoolErrorReason = "FloatingIPError"
)
2 changes: 1 addition & 1 deletion api/v1beta1/openstackmachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ type OpenStackMachineSpec struct {
// to an IPAddressClaim. Once the IPAddressClaim is fulfilled, the FloatingIP
// will be assigned to the OpenStackMachine.
// +optional
FloatingAddressFromPoolRef *corev1.TypedLocalObjectReference `json:"floatingAddressFromPool,omitempty"`
FloatingIPPoolRef *corev1.TypedLocalObjectReference `json:"floatingAddressFromPool,omitempty"`
}

type ServerMetadata struct {
Expand Down
4 changes: 2 additions & 2 deletions api/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions controllers/openstackmachine_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ func GetPortIDs(ports []infrav1.PortStatus) []string {
// reconcileFloatingAddressFromPool reconciles the floating IP address from the pool.
// It returns the IPAddressClaim and a boolean indicating if the IPAddressClaim is ready.
func (r *OpenStackMachineReconciler) reconcileFloatingAddressFromPool(ctx context.Context, scope *scope.WithLogger, openStackMachine *infrav1.OpenStackMachine, openStackCluster *infrav1.OpenStackCluster) (*ipamv1.IPAddressClaim, bool, error) {
if openStackMachine.Spec.FloatingAddressFromPoolRef == nil {
if openStackMachine.Spec.FloatingIPPoolRef == nil {
return nil, false, nil
}
var claim *ipamv1.IPAddressClaim
Expand All @@ -371,7 +371,7 @@ func (r *OpenStackMachineReconciler) reconcileFloatingAddressFromPool(ctx contex
func (r *OpenStackMachineReconciler) getOrCreateIPAddressClaimForFloatingAddress(ctx context.Context, scope *scope.WithLogger, openStackMachine *infrav1.OpenStackMachine, openStackCluster *infrav1.OpenStackCluster) (*ipamv1.IPAddressClaim, error) {
var err error

poolRef := openStackMachine.Spec.FloatingAddressFromPoolRef
poolRef := openStackMachine.Spec.FloatingIPPoolRef
claimName := names.GetFloatingAddressClaimName(openStackMachine.Name)
claim := &ipamv1.IPAddressClaim{}

Expand Down Expand Up @@ -466,7 +466,7 @@ func (r *OpenStackMachineReconciler) associateIPAddressFromIPAddressClaim(ctx co
func (r *OpenStackMachineReconciler) reconcileDeleteFloatingAddressFromPool(scope *scope.WithLogger, openStackMachine *infrav1.OpenStackMachine) error {
log := scope.Logger().WithValues("openStackMachine", openStackMachine.Name)
log.Info("Reconciling Machine delete floating address from pool")
if openStackMachine.Spec.FloatingAddressFromPoolRef == nil {
if openStackMachine.Spec.FloatingIPPoolRef == nil {
return nil
}
claimName := names.GetFloatingAddressClaimName(openStackMachine.Name)
Expand Down

0 comments on commit db0cb99

Please sign in to comment.