Skip to content

Commit

Permalink
Merge pull request #5428 from bryan-cox/update-aso-dep
Browse files Browse the repository at this point in the history
Update ASO to v2.11.0
  • Loading branch information
k8s-ci-robot authored Feb 18, 2025
2 parents 202e091 + f5db230 commit eec0da9
Show file tree
Hide file tree
Showing 24 changed files with 105 additions and 96 deletions.
2 changes: 1 addition & 1 deletion azure/converters/managedagentpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package converters

import (
asocontainerservicev1hub "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20231001/storage"
asocontainerservicev1hub "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20240901/storage"
"k8s.io/utils/ptr"
)

Expand Down
4 changes: 2 additions & 2 deletions azure/converters/managedagentpool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"testing"

asocontainerservicev1 "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20231001"
asocontainerservicev1hub "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20231001/storage"
asocontainerservicev1hub "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20240901/storage"
"github.com/Azure/azure-service-operator/v2/pkg/genruntime"
. "github.com/onsi/gomega"
"k8s.io/utils/ptr"
Expand All @@ -35,7 +35,7 @@ func Test_AgentPoolToManagedClusterAgentPoolProfile(t *testing.T) {
{
name: "Should set all values correctly",
pool: &asocontainerservicev1hub.ManagedClustersAgentPool{
Spec: asocontainerservicev1hub.ManagedClusters_AgentPool_Spec{
Spec: asocontainerservicev1hub.ManagedClustersAgentPool_Spec{
AzureName: "agentpool1",
VmSize: ptr.To("Standard_D2s_v3"),
OsType: ptr.To(string(asocontainerservicev1.OSType_Linux)),
Expand Down
4 changes: 2 additions & 2 deletions azure/converters/subnets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestGetSubnetAddresses(t *testing.T) {
{
name: "subnet with single address prefix",
subnet: asonetworkv1.VirtualNetworksSubnet{
Status: asonetworkv1.VirtualNetworks_Subnet_STATUS{
Status: asonetworkv1.VirtualNetworksSubnet_STATUS{
AddressPrefix: ptr.To("test-address-prefix"),
},
},
Expand All @@ -47,7 +47,7 @@ func TestGetSubnetAddresses(t *testing.T) {
{
name: "subnet with multiple address prefixes",
subnet: asonetworkv1.VirtualNetworksSubnet{
Status: asonetworkv1.VirtualNetworks_Subnet_STATUS{
Status: asonetworkv1.VirtualNetworksSubnet_STATUS{
AddressPrefixes: []string{
"test-address-prefix-1",
"test-address-prefix-2",
Expand Down
2 changes: 1 addition & 1 deletion azure/services/agentpools/agentpools.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package agentpools
import (
"context"

asocontainerservicev1hub "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20231001/storage"
asocontainerservicev1hub "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20240901/storage"
"github.com/Azure/azure-service-operator/v2/pkg/genruntime"
"k8s.io/utils/ptr"
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
Expand Down
6 changes: 3 additions & 3 deletions azure/services/agentpools/agentpools_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func TestPostCreateOrUpdateResourceHook(t *testing.T) {
scope.EXPECT().RemoveCAPIMachinePoolAnnotation(clusterv1.ReplicasManagedByAnnotation)

managedCluster := &asocontainerservicev1.ManagedClustersAgentPool{
Status: asocontainerservicev1.ManagedClusters_AgentPool_STATUS{
Status: asocontainerservicev1.ManagedClustersAgentPool_STATUS{
EnableAutoScaling: ptr.To(false),
},
}
Expand All @@ -67,7 +67,7 @@ func TestPostCreateOrUpdateResourceHook(t *testing.T) {
scope.EXPECT().SetCAPIMachinePoolReplicas(ptr.To(1234))

managedCluster := &asocontainerservicev1.ManagedClustersAgentPool{
Status: asocontainerservicev1.ManagedClusters_AgentPool_STATUS{
Status: asocontainerservicev1.ManagedClustersAgentPool_STATUS{
EnableAutoScaling: ptr.To(true),
Count: ptr.To(1234),
},
Expand All @@ -86,7 +86,7 @@ func TestPostCreateOrUpdateResourceHook(t *testing.T) {
scope.EXPECT().SetCAPIMachinePoolReplicas(ptr.To(1234))

agentPool := &asocontainerservicev1preview.ManagedClustersAgentPool{
Status: asocontainerservicev1preview.ManagedClusters_AgentPool_STATUS{
Status: asocontainerservicev1preview.ManagedClustersAgentPool_STATUS{
EnableAutoScaling: ptr.To(true),
Count: ptr.To(1234),
},
Expand Down
2 changes: 1 addition & 1 deletion azure/services/agentpools/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"context"

asocontainerservicev1 "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20231001"
asocontainerservicev1hub "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20231001/storage"
asocontainerservicev1preview "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20231102preview"
asocontainerservicev1hub "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20240901/storage"
"github.com/Azure/azure-service-operator/v2/pkg/genruntime"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
12 changes: 6 additions & 6 deletions azure/services/agentpools/spec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func TestParameters(t *testing.T) {
EnableEncryptionAtHost: ptr.To(false),
}
expected := &asocontainerservicev1.ManagedClustersAgentPool{
Spec: asocontainerservicev1.ManagedClusters_AgentPool_Spec{
Spec: asocontainerservicev1.ManagedClustersAgentPool_Spec{
AzureName: "azure name",
Owner: &genruntime.KnownResourceReference{
Name: "cluster",
Expand Down Expand Up @@ -171,7 +171,7 @@ func TestParameters(t *testing.T) {
EnableEncryptionAtHost: ptr.To(false),
}
expected := &asocontainerservicev1preview.ManagedClustersAgentPool{
Spec: asocontainerservicev1preview.ManagedClusters_AgentPool_Spec{
Spec: asocontainerservicev1preview.ManagedClustersAgentPool_Spec{
AzureName: "azure name",
Owner: &genruntime.KnownResourceReference{
Name: "cluster",
Expand Down Expand Up @@ -233,14 +233,14 @@ func TestParameters(t *testing.T) {
Version: ptr.To("1.26.6"),
}
existing := &asocontainerservicev1.ManagedClustersAgentPool{
Spec: asocontainerservicev1.ManagedClusters_AgentPool_Spec{
Spec: asocontainerservicev1.ManagedClustersAgentPool_Spec{
AzureName: "set by the user",
PowerState: &asocontainerservicev1.PowerState{
Code: ptr.To(asocontainerservicev1.PowerState_Code("set by the user")),
},
OrchestratorVersion: ptr.To("1.27.2"),
},
Status: asocontainerservicev1.ManagedClusters_AgentPool_STATUS{
Status: asocontainerservicev1.ManagedClustersAgentPool_STATUS{
Count: ptr.To(1212),
},
}
Expand Down Expand Up @@ -268,14 +268,14 @@ func TestParameters(t *testing.T) {
Preview: true,
}
existing := &asocontainerservicev1preview.ManagedClustersAgentPool{
Spec: asocontainerservicev1preview.ManagedClusters_AgentPool_Spec{
Spec: asocontainerservicev1preview.ManagedClustersAgentPool_Spec{
AzureName: "set by the user",
PowerState: &asocontainerservicev1preview.PowerState{
Code: ptr.To(asocontainerservicev1preview.PowerState_Code("set by the user")),
},
OrchestratorVersion: ptr.To("1.27.2"),
},
Status: asocontainerservicev1preview.ManagedClusters_AgentPool_STATUS{
Status: asocontainerservicev1preview.ManagedClustersAgentPool_STATUS{
Count: ptr.To(1212),
},
}
Expand Down
4 changes: 2 additions & 2 deletions azure/services/bastionhosts/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ func (s *AzureBastionSpec) Parameters(_ context.Context, existingBastionHost *as
bastionHost.Spec.IpConfigurations = []asonetworkv1.BastionHostIPConfiguration{
{
Name: ptr.To(bastionHostIPConfigName),
Subnet: &asonetworkv1.BastionHostSubResource{
Subnet: &asonetworkv1.SubResource{
Reference: &genruntime.ResourceReference{
ARMID: s.SubnetID,
},
},
PublicIPAddress: &asonetworkv1.BastionHostSubResource{
PublicIPAddress: &asonetworkv1.SubResource{
Reference: &genruntime.ResourceReference{
ARMID: s.PublicIPID,
},
Expand Down
4 changes: 2 additions & 2 deletions azure/services/bastionhosts/spec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ var (
IpConfigurations: []asonetworkv1.BastionHostIPConfiguration{
{
Name: ptr.To(fmt.Sprintf("%s-%s", fakeAzureBastionSpec1.Name, "bastionIP")),
Subnet: &asonetworkv1.BastionHostSubResource{
Subnet: &asonetworkv1.SubResource{
Reference: &genruntime.ResourceReference{
ARMID: fakeAzureBastionSpec1.SubnetID,
},
},
PublicIPAddress: &asonetworkv1.BastionHostSubResource{
PublicIPAddress: &asonetworkv1.SubResource{
Reference: &genruntime.ResourceReference{
ARMID: fakeAzureBastionSpec1.PublicIPID,
},
Expand Down
4 changes: 2 additions & 2 deletions azure/services/fleetsmembers/spec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (

var (
fakeAzureFleetsMember = asocontainerservicev1.FleetsMember{
Spec: asocontainerservicev1.Fleets_Member_Spec{
Spec: asocontainerservicev1.FleetsMember_Spec{
AzureName: fakeAzureFleetsMemberSpec.Name,
Owner: &genruntime.KnownResourceReference{
ARMID: azure.FleetID(fakeAzureFleetsMemberSpec.SubscriptionID, fakeAzureFleetsMemberSpec.ManagerResourceGroup, fakeAzureFleetsMemberSpec.ManagerName),
Expand All @@ -51,7 +51,7 @@ var (
ManagerName: "fake-manager-name",
ManagerResourceGroup: "fake-manager-resource-group",
}
fakeFleetsMemberStatus = asocontainerservicev1.Fleets_Member_STATUS{
fakeFleetsMemberStatus = asocontainerservicev1.FleetsMember_STATUS{
Name: ptr.To(fakeAzureFleetsMemberSpec.Name),
ProvisioningState: ptr.To(asocontainerservicev1.FleetMemberProvisioningState_STATUS_Succeeded),
}
Expand Down
2 changes: 1 addition & 1 deletion azure/services/managedclusters/managedclusters.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"fmt"

"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
asocontainerservicev1hub "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20231001/storage"
asocontainerservicev1hub "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20240901/storage"
"github.com/Azure/azure-service-operator/v2/pkg/genruntime"
"github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
Expand Down
2 changes: 1 addition & 1 deletion azure/services/managedclusters/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"sort"

asocontainerservicev1 "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20231001"
asocontainerservicev1hub "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20231001/storage"
asocontainerservicev1preview "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20231102preview"
asocontainerservicev1hub "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20240901/storage"
"github.com/Azure/azure-service-operator/v2/pkg/genruntime"
"github.com/pkg/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion azure/services/natgateways/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (s *NatGatewaySpec) Parameters(_ context.Context, existingNatGateway *asone
natGateway.Spec.Sku = &asonetworkv1.NatGatewaySku{
Name: ptr.To(asonetworkv1.NatGatewaySku_Name_Standard),
}
natGateway.Spec.PublicIpAddresses = []asonetworkv1.ApplicationGatewaySubResource{
natGateway.Spec.PublicIpAddresses = []asonetworkv1.SubResource{
{
Reference: &genruntime.ResourceReference{
ARMID: azure.PublicIPID(s.SubscriptionID, s.ResourceGroup, s.NatGatewayIP.Name),
Expand Down
4 changes: 2 additions & 2 deletions azure/services/natgateways/spec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ var (
Owner: &genruntime.KnownResourceReference{
Name: "my-rg",
},
PublicIpAddresses: []asonetworkv1.ApplicationGatewaySubResource{
PublicIpAddresses: []asonetworkv1.SubResource{
{
Reference: &genruntime.ResourceReference{
ARMID: "/subscriptions/123/resourceGroups/my-rg/providers/Microsoft.Network/publicIPAddresses/my-natgateway-ip",
Expand All @@ -83,7 +83,7 @@ var (
Location: locationPtr,
Name: ptr.To("my-natgateway"),
ProvisioningState: ptr.To(asonetworkv1.ApplicationGatewayProvisioningState_STATUS_Succeeded),
PublicIpAddresses: []asonetworkv1.ApplicationGatewaySubResource_STATUS{
PublicIpAddresses: []asonetworkv1.SubResource_STATUS{
{
Id: ptr.To("/subscriptions/123/resourceGroups/my-rg/providers/Microsoft.Network/publicIPAddresses/my-natgateway-ip"),
},
Expand Down
2 changes: 1 addition & 1 deletion azure/services/subnets/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (s *SubnetSpec) Parameters(_ context.Context, existing *asonetworkv1.Virtua
subnet = &asonetworkv1.VirtualNetworksSubnet{}
}

subnet.Spec = asonetworkv1.VirtualNetworks_Subnet_Spec{
subnet.Spec = asonetworkv1.VirtualNetworksSubnet_Spec{
AzureName: s.Name,
Owner: &genruntime.KnownResourceReference{
Name: azure.GetNormalizedKubernetesName(s.VNetName),
Expand Down
8 changes: 4 additions & 4 deletions azure/services/subnets/spec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func TestParameters(t *testing.T) {
},
existing: nil,
expected: &asonetworkv1.VirtualNetworksSubnet{
Spec: asonetworkv1.VirtualNetworks_Subnet_Spec{
Spec: asonetworkv1.VirtualNetworksSubnet_Spec{
AzureName: "subnet",
Owner: &genruntime.KnownResourceReference{
Name: "vnet",
Expand Down Expand Up @@ -110,12 +110,12 @@ func TestParameters(t *testing.T) {
},
},
existing: &asonetworkv1.VirtualNetworksSubnet{
Status: asonetworkv1.VirtualNetworks_Subnet_STATUS{
Status: asonetworkv1.VirtualNetworksSubnet_STATUS{
Id: ptr.To("status is preserved"),
},
},
expected: &asonetworkv1.VirtualNetworksSubnet{
Spec: asonetworkv1.VirtualNetworks_Subnet_Spec{
Spec: asonetworkv1.VirtualNetworksSubnet_Spec{
AzureName: "subnet",
Owner: &genruntime.KnownResourceReference{
Name: "vnet",
Expand Down Expand Up @@ -144,7 +144,7 @@ func TestParameters(t *testing.T) {
},
},
},
Status: asonetworkv1.VirtualNetworks_Subnet_STATUS{
Status: asonetworkv1.VirtualNetworksSubnet_STATUS{
Id: ptr.To("status is preserved"),
},
},
Expand Down
4 changes: 2 additions & 2 deletions azure/services/subnets/subnets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ func TestPostCreateOrUpdateResourceHook(t *testing.T) {
scope.EXPECT().UpdateSubnetID("subnet", "id")
scope.EXPECT().UpdateSubnetCIDRs("subnet", []string{"cidr"})
subnet := &asonetworkv1.VirtualNetworksSubnet{
Spec: asonetworkv1.VirtualNetworks_Subnet_Spec{
Spec: asonetworkv1.VirtualNetworksSubnet_Spec{
AzureName: "subnet",
},
Status: asonetworkv1.VirtualNetworks_Subnet_STATUS{
Status: asonetworkv1.VirtualNetworksSubnet_STATUS{
Id: ptr.To("id"),
AddressPrefixes: []string{"cidr"},
},
Expand Down
6 changes: 3 additions & 3 deletions azure/services/virtualnetworks/virtualnetworks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,18 @@ func TestPostCreateOrUpdateResourceHook(t *testing.T) {
labels.OwnerNameLabel: existing.Name,
},
},
Spec: asonetworkv1.VirtualNetworks_Subnet_Spec{
Spec: asonetworkv1.VirtualNetworksSubnet_Spec{
AzureName: "azure-name",
},
Status: asonetworkv1.VirtualNetworks_Subnet_STATUS{
Status: asonetworkv1.VirtualNetworksSubnet_STATUS{
AddressPrefixes: []string{"address prefixes"},
},
},
&asonetworkv1.VirtualNetworksSubnet{
ObjectMeta: metav1.ObjectMeta{
Name: "other subnet",
},
Spec: asonetworkv1.VirtualNetworks_Subnet_Spec{
Spec: asonetworkv1.VirtualNetworksSubnet_Spec{
Owner: &genruntime.KnownResourceReference{
Name: "not this vnet",
},
Expand Down
8 changes: 4 additions & 4 deletions controllers/azureasomanagedmachinepool_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,13 +314,13 @@ func TestAzureASOManagedMachinePoolReconcile(t *testing.T) {
Name: "ap",
Namespace: cluster.Namespace,
},
Spec: asocontainerservicev1.ManagedClusters_AgentPool_Spec{
Spec: asocontainerservicev1.ManagedClustersAgentPool_Spec{
AzureName: "pool1",
Owner: &genruntime.KnownResourceReference{
Name: asoManagedCluster.Name,
},
},
Status: asocontainerservicev1.ManagedClusters_AgentPool_STATUS{
Status: asocontainerservicev1.ManagedClustersAgentPool_STATUS{
Count: ptr.To(3),
},
}
Expand Down Expand Up @@ -456,14 +456,14 @@ func TestAzureASOManagedMachinePoolReconcile(t *testing.T) {
Name: "ap",
Namespace: cluster.Namespace,
},
Spec: asocontainerservicev1.ManagedClusters_AgentPool_Spec{
Spec: asocontainerservicev1.ManagedClustersAgentPool_Spec{
AzureName: "pool1",
Owner: &genruntime.KnownResourceReference{
Name: asoManagedCluster.Name,
},
EnableAutoScaling: ptr.To(true),
},
Status: asocontainerservicev1.ManagedClusters_AgentPool_STATUS{
Status: asocontainerservicev1.ManagedClustersAgentPool_STATUS{
Count: ptr.To(3),
},
}
Expand Down
Loading

0 comments on commit eec0da9

Please sign in to comment.