From 13f1fc42bc04811bd69b2fb6378cc41836679adc Mon Sep 17 00:00:00 2001 From: "vincent.baer" Date: Mon, 2 Oct 2023 15:38:43 +0000 Subject: [PATCH] Add tinav6 and migrate to tinav6 --- .github/workflows/conformance.yaml | 3 ++ .github/workflows/kind.yaml | 3 ++ .github/workflows/unit-func-e2e-test.yaml | 6 +++ api/v1beta1/oscmachine_validation.go | 2 +- .../oscmachinetemplate_webhook_test.go | 12 ++--- api/v1beta1/types.go | 8 +-- ...osccluster_bastion_controller_unit_test.go | 38 +++++++------- .../oscmachine_vm_controller_unit_test.go | 52 +++++++++---------- ...etemplate_capacity_controller_unit_test.go | 2 +- docs/src/topics/config.md | 4 +- example/cluster-machine-template-bastion.yaml | 4 +- example/cluster-machine-template-default.yaml | 4 +- example/cluster-machine-template-simple.yaml | 4 +- example/hello-osc.yaml | 4 +- example/microk8s.yaml | 4 +- example/talos/talos.yaml | 4 +- test/e2e/config/outscale.yaml | 2 +- testenv/osccluster_controller_test.go | 2 +- 18 files changed, 85 insertions(+), 73 deletions(-) diff --git a/.github/workflows/conformance.yaml b/.github/workflows/conformance.yaml index 2252eb9cc..2508e5270 100644 --- a/.github/workflows/conformance.yaml +++ b/.github/workflows/conformance.yaml @@ -42,6 +42,9 @@ jobs: osc_secret_key: ${{ secrets.OSC_SECRET_KEY }} osc_region: ${{ secrets.OSC_REGION }} image_id: ${{ secrets.OMI_ID }} + control_plane_vm_type: ${{ secrets.CP_VMTYPE }} + bastion_vm_type: ${{ secrets.BASTION_VMTYPE }} + worker_vm_type: ${{ secrets.WORKER_VMTYPE }} - name: Wait Kubernetes control plane is up and running uses: nick-invision/retry@v2 with: diff --git a/.github/workflows/kind.yaml b/.github/workflows/kind.yaml index 8a1a4fa4b..45e45398b 100644 --- a/.github/workflows/kind.yaml +++ b/.github/workflows/kind.yaml @@ -52,6 +52,9 @@ jobs: osc_secret_key: ${{ secrets.OSC_SECRET_KEY }} osc_region: ${{ secrets.OSC_REGION }} image_id: ${{ secrets.OMI_ID }} + control_plane_vm_type: ${{ secrets.CP_VMTYPE }} + bastion_vm_type: ${{ secrets.BASTION_VMTYPE }} + worker_vm_type: ${{ secrets.WORKER_VMTYPE }} - name: Wait Kubernetes control plane is up and running uses: nick-invision/retry@v2 with: diff --git a/.github/workflows/unit-func-e2e-test.yaml b/.github/workflows/unit-func-e2e-test.yaml index e5a08da9a..b4e996663 100644 --- a/.github/workflows/unit-func-e2e-test.yaml +++ b/.github/workflows/unit-func-e2e-test.yaml @@ -80,6 +80,9 @@ jobs: osc_secret_key: ${{ secrets.OSC_SECRET_KEY }} osc_region: ${{ secrets.OSC_REGION }} image_id: ${{ secrets.OMI_ID }} + control_plane_vm_type: ${{ secrets.CP_VMTYPE }} + bastion_vm_type: ${{ secrets.BASTION_VMTYPE }} + worker_vm_type: ${{ secrets.WORKER_VMTYPE }} - name: Wait Kubernetes control plane is up and running uses: nick-invision/retry@v2 with: @@ -236,6 +239,9 @@ jobs: osc_secret_key: ${{ secrets.OSC_SECRET_KEY }} osc_region: ${{ secrets.OSC_REGION }} image_id: ${{ secrets.OMI_ID }} + control_plane_vm_type: ${{ secrets.CP_VMTYPE }} + bastion_vm_type: ${{ secrets.BASTION_VMTYPE }} + worker_vm_type: ${{ secrets.WORKER_VMTYPE }} - name: Wait Kubernetes control plane is up and running uses: nick-invision/retry@v2 with: diff --git a/api/v1beta1/oscmachine_validation.go b/api/v1beta1/oscmachine_validation.go index 919c29bda..66c565433 100644 --- a/api/v1beta1/oscmachine_validation.go +++ b/api/v1beta1/oscmachine_validation.go @@ -202,7 +202,7 @@ func ValidateDeviceName(deviceName string) (string, error) { // ValidateVmType check that vmType is a valid vmType func ValidateVmType(vmType string) (string, error) { - isValidateVmType := regexp.MustCompile(`^tinav[1-5].c[0-9]+r[0-9]+p[1-3]$`).MatchString + isValidateVmType := regexp.MustCompile(`^tinav[3-6].c[0-9]+r[0-9]+p[1-3]$`).MatchString switch { case isValidateVmType(vmType): return vmType, nil diff --git a/api/v1beta1/oscmachinetemplate_webhook_test.go b/api/v1beta1/oscmachinetemplate_webhook_test.go index 2d3556ca2..382c2bda3 100644 --- a/api/v1beta1/oscmachinetemplate_webhook_test.go +++ b/api/v1beta1/oscmachinetemplate_webhook_test.go @@ -39,7 +39,7 @@ func TestOscMachineTemplate_ValidateCreate(t *testing.T) { ImageId: "ami-01234567", KeypairName: "test-webhook", DeviceName: "/dev/xvdb", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", }, }, }, @@ -264,7 +264,7 @@ func TestOscMachineTemplate_ValidateUpdate(t *testing.T) { KeypairName: "test-webhook", ImageId: "ami-00000000", DeviceName: "/dev/xvda", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", }, Volumes: []*OscVolume{ { @@ -283,7 +283,7 @@ func TestOscMachineTemplate_ValidateUpdate(t *testing.T) { KeypairName: "test-webhook", ImageId: "ami-00000000", DeviceName: "/dev/xvda", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", }, Volumes: []*OscVolume{ { @@ -306,7 +306,7 @@ func TestOscMachineTemplate_ValidateUpdate(t *testing.T) { KeypairName: "test-webhook-1", ImageId: "ami-00000000", DeviceName: "/dev/xvda", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", }, }, }, @@ -316,11 +316,11 @@ func TestOscMachineTemplate_ValidateUpdate(t *testing.T) { KeypairName: "test-webhook-2", ImageId: "ami-00000000", DeviceName: "/dev/xvda", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", }, }, }, - expValidateUpdateErr: fmt.Errorf("OscMachineTemplate.infrastructure.cluster.x-k8s.io \"webhook-test\" is invalid: OscMachineTemplate.spec.template.spec: Invalid value: v1beta1.OscMachineTemplate{TypeMeta:v1.TypeMeta{Kind:\"\", APIVersion:\"\"}, ObjectMeta:v1.ObjectMeta{Name:\"webhook-test\", GenerateName:\"\", Namespace:\"default\", SelfLink:\"\", UID:\"\", ResourceVersion:\"\", Generation:0, CreationTimestamp:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), DeletionTimestamp:, DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ManagedFields:[]v1.ManagedFieldsEntry(nil)}, Spec:v1beta1.OscMachineTemplateSpec{Template:v1beta1.OscMachineTemplateResource{ObjectMeta:v1beta1.ObjectMeta{Labels:map[string]string(nil), Annotations:map[string]string(nil)}, Spec:v1beta1.OscMachineSpec{ProviderID:(*string)(nil), Node:v1beta1.OscNode{Vm:v1beta1.OscVm{Name:\"\", ImageId:\"ami-00000000\", KeypairName:\"test-webhook-2\", VmType:\"tinav4.c2r4p2\", VolumeName:\"\", VolumeDeviceName:\"\", DeviceName:\"/dev/xvda\", SubnetName:\"\", RootDisk:v1beta1.OscRootDisk{RootDiskIops:0, RootDiskSize:0, RootDiskType:\"\"}, LoadBalancerName:\"\", PublicIpName:\"\", SubregionName:\"\", PrivateIps:[]v1beta1.OscPrivateIpElement(nil), SecurityGroupNames:[]v1beta1.OscSecurityGroupElement(nil), ResourceId:\"\", Role:\"\", ClusterName:\"\", Replica:0}, Image:v1beta1.OscImage{Name:\"\", ResourceId:\"\"}, Volumes:[]*v1beta1.OscVolume(nil), KeyPair:v1beta1.OscKeypair{Name:\"\", PublicKey:\"\", ResourceId:\"\", ClusterName:\"\", DeleteKeypair:false}, ClusterName:\"\"}}}}, Status:v1beta1.OscMachineTemplateStatus{Capacity:v1.ResourceList(nil), Conditions:v1beta1.Conditions(nil)}}: OscMachineTemplate spec.template.spec field is immutable."), + expValidateUpdateErr: fmt.Errorf("OscMachineTemplate.infrastructure.cluster.x-k8s.io \"webhook-test\" is invalid: OscMachineTemplate.spec.template.spec: Invalid value: v1beta1.OscMachineTemplate{TypeMeta:v1.TypeMeta{Kind:\"\", APIVersion:\"\"}, ObjectMeta:v1.ObjectMeta{Name:\"webhook-test\", GenerateName:\"\", Namespace:\"default\", SelfLink:\"\", UID:\"\", ResourceVersion:\"\", Generation:0, CreationTimestamp:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), DeletionTimestamp:, DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ManagedFields:[]v1.ManagedFieldsEntry(nil)}, Spec:v1beta1.OscMachineTemplateSpec{Template:v1beta1.OscMachineTemplateResource{ObjectMeta:v1beta1.ObjectMeta{Labels:map[string]string(nil), Annotations:map[string]string(nil)}, Spec:v1beta1.OscMachineSpec{ProviderID:(*string)(nil), Node:v1beta1.OscNode{Vm:v1beta1.OscVm{Name:\"\", ImageId:\"ami-00000000\", KeypairName:\"test-webhook-2\", VmType:\"tinav3.c2r4p2\", VolumeName:\"\", VolumeDeviceName:\"\", DeviceName:\"/dev/xvda\", SubnetName:\"\", RootDisk:v1beta1.OscRootDisk{RootDiskIops:0, RootDiskSize:0, RootDiskType:\"\"}, LoadBalancerName:\"\", PublicIpName:\"\", SubregionName:\"\", PrivateIps:[]v1beta1.OscPrivateIpElement(nil), SecurityGroupNames:[]v1beta1.OscSecurityGroupElement(nil), ResourceId:\"\", Role:\"\", ClusterName:\"\", Replica:0}, Image:v1beta1.OscImage{Name:\"\", ResourceId:\"\"}, Volumes:[]*v1beta1.OscVolume(nil), KeyPair:v1beta1.OscKeypair{Name:\"\", PublicKey:\"\", ResourceId:\"\", ClusterName:\"\", DeleteKeypair:false}, ClusterName:\"\"}}}}, Status:v1beta1.OscMachineTemplateStatus{Capacity:v1.ResourceList(nil), Conditions:v1beta1.Conditions(nil)}}: OscMachineTemplate spec.template.spec field is immutable."), }, } for _, mtc := range machineTestCases { diff --git a/api/v1beta1/types.go b/api/v1beta1/types.go index a6ba24ce1..e32a4a30c 100644 --- a/api/v1beta1/types.go +++ b/api/v1beta1/types.go @@ -406,7 +406,7 @@ var ( DefaultVmImageId string = "ami-e1a786f1" DefaultVmKeypairName string = "cluster-api" - DefaultVmType string = "tinav5.c4r8p1" + DefaultVmType string = "tinav3.c4r8p1" DefaultVmDeviceName string = "/dev/sda1" DefaultVmBastionImageId string = "ami-bb490c7e" @@ -414,11 +414,11 @@ var ( DefaultVmBastionSubregionName string = "eu-west-2a" DefaultVmKwName string = "cluster-api-vm-kw" - DefaultVmKwType string = "tinav5.c4r8p1" + DefaultVmKwType string = "tinav3.c4r8p1" DefaultVmKcpName string = "cluster-api-vm-kcp" - DefaultVmKcpType string = "tinav5.c4r8p1" + DefaultVmKcpType string = "tinav3.c4r8p1" DefaultVmBastionName string = "cluster-api-vm-bastion" - DefaultVmBastionType string = "tinav5.c2r2p1" + DefaultVmBastionType string = "tinav3.c2r2p1" DefaultVolumeKcpName string = "cluster-api-volume-kcp" DefaultVolumeKcpIops int32 = 1000 DefaultVolumeKcpSize int32 = 30 diff --git a/controllers/osccluster_bastion_controller_unit_test.go b/controllers/osccluster_bastion_controller_unit_test.go index f06acf729..151498344 100644 --- a/controllers/osccluster_bastion_controller_unit_test.go +++ b/controllers/osccluster_bastion_controller_unit_test.go @@ -88,7 +88,7 @@ var ( }, SubregionName: "eu-west-2a", SubnetName: "test-subnet", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -161,7 +161,7 @@ var ( }, SubregionName: "eu-west-2a", SubnetName: "test-subnet", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -237,7 +237,7 @@ var ( }, SubregionName: "eu-west-2a", SubnetName: "test-subnet", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", ResourceId: "i-test-bastion-uid", PublicIpName: "test-publicip", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ @@ -391,7 +391,7 @@ func TestCheckBastionSecurityGroupOscAssociateResourceName(t *testing.T) { }, SubregionName: "eu-west-2a", SubnetName: "test-subnet", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -503,7 +503,7 @@ func TestCheckBastionSubnetAssociateResourceName(t *testing.T) { }, SubregionName: "eu-west-2a", SubnetName: "test-subnet@test", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -616,7 +616,7 @@ func TestCheckBastionPublicIpOscAssociateResourceName(t *testing.T) { }, SubregionName: "eu-west-2a", SubnetName: "test-subnet", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip@test", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -717,7 +717,7 @@ func TestCheckBastionFormatParameters(t *testing.T) { }, SubregionName: "eu-west-2a", SubnetName: "test-subnet", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip@test", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -793,7 +793,7 @@ func TestCheckBastionFormatParameters(t *testing.T) { }, SubregionName: "eu-west-2a", SubnetName: "test-subnet", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip@test", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -868,7 +868,7 @@ func TestCheckBastionFormatParameters(t *testing.T) { }, SubregionName: "eu-west-2a", SubnetName: "test-subnet", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip@test", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -955,7 +955,7 @@ func TestCheckBastionFormatParameters(t *testing.T) { }, SubregionName: "eu-west-2a", SubnetName: "test-subnet", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip@test", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -1032,7 +1032,7 @@ func TestCheckBastionFormatParameters(t *testing.T) { }, SubregionName: "eu-west-2a", SubnetName: "test-subnet", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip@test", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -1107,7 +1107,7 @@ func TestCheckBastionFormatParameters(t *testing.T) { }, SubregionName: "eu-west-2a", SubnetName: "test-subnet", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip@test", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -1181,7 +1181,7 @@ func TestCheckBastionFormatParameters(t *testing.T) { }, SubregionName: "eu-west-2a", SubnetName: "test-subnet", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip@test", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -1331,7 +1331,7 @@ func TestCheckBastionFormatParameters(t *testing.T) { }, SubregionName: "eu-west-2a", SubnetName: "test-subnet", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip@test", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -1406,7 +1406,7 @@ func TestCheckBastionFormatParameters(t *testing.T) { }, SubregionName: "eu-west-2c", SubnetName: "test-subnet", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip@test", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -1481,7 +1481,7 @@ func TestCheckBastionFormatParameters(t *testing.T) { }, SubregionName: "eu-west-2a", SubnetName: "test-subnet", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip@test", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -1556,7 +1556,7 @@ func TestCheckBastionFormatParameters(t *testing.T) { }, SubregionName: "eu-west-2a", SubnetName: "test-subnet", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip@test", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -1631,7 +1631,7 @@ func TestCheckBastionFormatParameters(t *testing.T) { }, SubregionName: "eu-west-2a", SubnetName: "test-subnet", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip@test", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -2707,7 +2707,7 @@ func TestReconcileDeleteBastionWithoutSpec(t *testing.T) { }, SubregionName: "eu-west-2a", SubnetName: "test-subnet", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", ResourceId: "i-test-bastion-uid", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ diff --git a/controllers/oscmachine_vm_controller_unit_test.go b/controllers/oscmachine_vm_controller_unit_test.go index c948c2f59..84bb9c036 100644 --- a/controllers/oscmachine_vm_controller_unit_test.go +++ b/controllers/oscmachine_vm_controller_unit_test.go @@ -154,7 +154,7 @@ var ( SubnetName: "test-subnet", LoadBalancerName: "test-loadbalancer", PublicIpName: "test-publicip", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", Replica: 1, SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -197,7 +197,7 @@ var ( SubnetName: "test-subnet", LoadBalancerName: "test-loadbalancer", PublicIpName: "test-publicip", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", Replica: 1, SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -239,7 +239,7 @@ var ( SubregionName: "eu-west-2a", SubnetName: "test-subnet", LoadBalancerName: "test-loadbalancer", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", Replica: 1, SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ @@ -288,7 +288,7 @@ var ( SubregionName: "eu-west-2a", SubnetName: "test-subnet", LoadBalancerName: "test-loadbalancer", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", ResourceId: "i-test-vm-uid", PublicIpName: "test-publicip", Replica: 1, @@ -423,7 +423,7 @@ func TestCheckVmVolumeOscAssociateResourceName(t *testing.T) { SubregionName: "eu-west-2a", SubnetName: "test-subnet", LoadBalancerName: "test-loadbalancer", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -515,7 +515,7 @@ func TestCheckVmLoadBalancerOscAssociateResourceName(t *testing.T) { RootDiskIops: 1500, RootDiskType: "io1", }, - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -603,7 +603,7 @@ func TestCheckVmSecurityGroupOscAssociateResourceName(t *testing.T) { }, SubnetName: "test-subnet", LoadBalancerName: "test-loadbalancer", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -695,7 +695,7 @@ func TestCheckVmPublicIpOscAssociateResourceName(t *testing.T) { SubregionName: "eu-west-2a", SubnetName: "test-subnet", LoadBalancerName: "test-loadbalancer", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip@test", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -775,7 +775,7 @@ func TestCheckVmFormatParameters(t *testing.T) { SubregionName: "eu-west-2a", SubnetName: "test-subnet", LoadBalancerName: "test-loadbalancer", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -823,7 +823,7 @@ func TestCheckVmFormatParameters(t *testing.T) { SubregionName: "eu-west-2a", SubnetName: "test-subnet", LoadBalancerName: "test-loadbalancer", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -871,7 +871,7 @@ func TestCheckVmFormatParameters(t *testing.T) { SubregionName: "eu-west-2a", SubnetName: "test-subnet", LoadBalancerName: "test-loadbalancer", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -921,7 +921,7 @@ func TestCheckVmFormatParameters(t *testing.T) { SubregionName: "eu-west-2a", SubnetName: "test-subnet", LoadBalancerName: "test-loadbalancer", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -969,7 +969,7 @@ func TestCheckVmFormatParameters(t *testing.T) { SubregionName: "eu-west-2a", SubnetName: "test-subnet", LoadBalancerName: "test-loadbalancer", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -1019,7 +1019,7 @@ func TestCheckVmFormatParameters(t *testing.T) { SubregionName: "eu-west-2a", SubnetName: "test-subnet", LoadBalancerName: "test-loadbalancer", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -1067,7 +1067,7 @@ func TestCheckVmFormatParameters(t *testing.T) { SubregionName: "eu-west-2a", SubnetName: "test-subnet", LoadBalancerName: "test-loadbalancer", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -1114,7 +1114,7 @@ func TestCheckVmFormatParameters(t *testing.T) { SubregionName: "eu-west-2a", SubnetName: "test-subnet", LoadBalancerName: "test-loadbalancer", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -1210,7 +1210,7 @@ func TestCheckVmFormatParameters(t *testing.T) { SubregionName: "eu-west-2a", SubnetName: "test-subnet", LoadBalancerName: "test-loadbalancer", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -1258,7 +1258,7 @@ func TestCheckVmFormatParameters(t *testing.T) { SubregionName: "eu-west-2c", SubnetName: "test-subnet", LoadBalancerName: "test-loadbalancer", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -1306,7 +1306,7 @@ func TestCheckVmFormatParameters(t *testing.T) { SubregionName: "eu-west-2a", SubnetName: "test-subnet", LoadBalancerName: "test-loadbalancer", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -1354,7 +1354,7 @@ func TestCheckVmFormatParameters(t *testing.T) { SubregionName: "eu-west-2a", SubnetName: "test-subnet", LoadBalancerName: "test-loadbalancer", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -1402,7 +1402,7 @@ func TestCheckVmFormatParameters(t *testing.T) { SubregionName: "eu-west-2a", SubnetName: "test-subnet", LoadBalancerName: "test-loadbalancer", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -1450,7 +1450,7 @@ func TestCheckVmFormatParameters(t *testing.T) { SubregionName: "eu-west-2a", SubnetName: "test-subnet", LoadBalancerName: "test-loadbalancer", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -1541,7 +1541,7 @@ func TestCheckVmSubnetAssociateResourceName(t *testing.T) { SubregionName: "eu-west-2a", SubnetName: "test-subnet@test", LoadBalancerName: "test-loadbalancer", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -1621,7 +1621,7 @@ func TestCheckVmPrivateIpsOscDuplicateName(t *testing.T) { SubregionName: "eu-west-2a", SubnetName: "test-subnet", LoadBalancerName: "test-loadbalancer", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -1695,7 +1695,7 @@ func TestCheckVmVolumeSubregionName(t *testing.T) { SubregionName: "eu-west-2a", SubnetName: "test-subnet", LoadBalancerName: "test-loadbalancer", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { @@ -1743,7 +1743,7 @@ func TestCheckVmVolumeSubregionName(t *testing.T) { SubregionName: "eu-west-2b", SubnetName: "test-subnet", LoadBalancerName: "test-loadbalancer", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", PublicIpName: "test-publicip", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { diff --git a/controllers/oscmachinetemplate_capacity_controller_unit_test.go b/controllers/oscmachinetemplate_capacity_controller_unit_test.go index 2dbf6bf16..636d1974e 100644 --- a/controllers/oscmachinetemplate_capacity_controller_unit_test.go +++ b/controllers/oscmachinetemplate_capacity_controller_unit_test.go @@ -106,7 +106,7 @@ var ( SubnetName: "test-subnet", LoadBalancerName: "test-loadbalancer", PublicIpName: "test-publicip", - VmType: "tinav4.c2r4p2", + VmType: "tinav3.c2r4p2", Replica: 1, SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { diff --git a/docs/src/topics/config.md b/docs/src/topics/config.md index 17d153719..958ba9373 100644 --- a/docs/src/topics/config.md +++ b/docs/src/topics/config.md @@ -198,7 +198,7 @@ spec: subregionName: eu-west-2a securityGroupNames: - name: cluster-api-securitygroups-kw - vmType: "tinav4.c2r4p2" + vmType: "tinav6.c2r4p2" ``` ### OscImage @@ -230,7 +230,7 @@ spec: | `subnetName` | `cluster-api-subnet-kw` | false | The Subnet associated to your vm | `subregionName` | `eu-west-2a` | false | The subregionName used for vm and volume | `securityGroupNames` | `cluster-api-securitygroups-kw` | false | The securityGroupName which is associated with vm -| `vmType` | `tinav4.c2r4p2` | false | The vmType use for the vm +| `vmType` | `tinav6.c2r4p2` | false | The vmType use for the vm | `imageId` | `` | false | The vmType use for the vm diff --git a/example/cluster-machine-template-bastion.yaml b/example/cluster-machine-template-bastion.yaml index a2118cd4b..d20711130 100644 --- a/example/cluster-machine-template-bastion.yaml +++ b/example/cluster-machine-template-bastion.yaml @@ -74,7 +74,7 @@ spec: subregionName: eu-west-2a securityGroupNames: - name: cluster-api-securitygroup-lb - vmType: "tinav4.c2r4p2" + vmType: "tinav6.c4r8p2" routeTables: - name: cluster-api-routetable-kw subnets: @@ -283,7 +283,7 @@ spec: securityGroupNames: - name: cluster-api-securitygroups-kw - name: cluster-api-securitygroups-node - vmType: "tinav4.c2r4p2" + vmType: "tinav6.c4r8p2" --- apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: OscMachineTemplate diff --git a/example/cluster-machine-template-default.yaml b/example/cluster-machine-template-default.yaml index 00db21ebe..1d4ba3755 100644 --- a/example/cluster-machine-template-default.yaml +++ b/example/cluster-machine-template-default.yaml @@ -92,7 +92,7 @@ spec: rootDiskType: "gp2" keypairName: cluster-api-test subregionName: eu-west-2a - vmType: "tinav4.c2r4p2" + vmType: "tinav6.c2r4p2" --- apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: OscMachineTemplate @@ -119,7 +119,7 @@ spec: rootDiskType: "gp2" role: controlplane loadBalancerName: capo-k8s - vmType: "tinav5.c4r8p1" + vmType: "tinav6.c4r8p1" --- apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfigTemplate diff --git a/example/cluster-machine-template-simple.yaml b/example/cluster-machine-template-simple.yaml index 744230171..0bdc8ca5e 100644 --- a/example/cluster-machine-template-simple.yaml +++ b/example/cluster-machine-template-simple.yaml @@ -286,7 +286,7 @@ spec: securityGroupNames: - name: cluster-api-securitygroups-kw - name: cluster-api-securitygroups-node - vmType: "tinav4.c2r4p2" + vmType: "tinav6.c4r8p2" --- apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: OscMachineTemplate @@ -319,7 +319,7 @@ spec: securityGroupNames: - name: cluster-api-securitygroups-kcp - name: cluster-api-securitygroups-node - vmType: "tinav5.c4r8p1" + vmType: "tinav6.c4r8p1" --- apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfigTemplate diff --git a/example/hello-osc.yaml b/example/hello-osc.yaml index a3b722dd1..844aa0c34 100644 --- a/example/hello-osc.yaml +++ b/example/hello-osc.yaml @@ -85,7 +85,7 @@ spec: rootDiskSize: 20 rootDiskType: io1 subregionName: eu-west-2a - vmType: tinav5.c4r8p1 + vmType: tinav6.c4r8p1 --- apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: OscMachineTemplate @@ -111,7 +111,7 @@ spec: rootDiskSize: 20 rootDiskType: io1 subregionName: eu-west-2a - vmType: tinav5.c4r8p1 + vmType: tinav6.c4r8p1 --- apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfigTemplate diff --git a/example/microk8s.yaml b/example/microk8s.yaml index da1ea2a56..232633670 100644 --- a/example/microk8s.yaml +++ b/example/microk8s.yaml @@ -77,7 +77,7 @@ spec: rootDiskType: "io1" keypairName: microK8s-test subregionName: eu-west-2a - vmType: "tinav4.c2r4p2" + vmType: "tinav6.c2r4p2" --- apiVersion: cluster.x-k8s.io/v1beta1 kind: MachineDeployment @@ -128,7 +128,7 @@ spec: rootDiskType: "io1" role: controlplane loadBalancerName: microk8s - vmType: "tinav5.c4r8p1" + vmType: "tinav6.c4r8p1" --- apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: MicroK8sConfigTemplate diff --git a/example/talos/talos.yaml b/example/talos/talos.yaml index 6f1bf3133..02f08bb57 100644 --- a/example/talos/talos.yaml +++ b/example/talos/talos.yaml @@ -153,7 +153,7 @@ spec: rootDiskSize: 100 rootDiskType: gp2 subregionName: eu-west-2a - vmType: tinav5.c4r16p1 + vmType: tinav6.c4r16p1 securityGroupNames: - name: kapi-talos-nodes - name: kapi-talos-workers @@ -182,7 +182,7 @@ spec: rootDiskSize: 100 rootDiskType: gp2 subregionName: eu-west-2a - vmType: tinav5.c4r16p1 + vmType: tinav6.c4r16p1 securityGroupNames: - name: kapi-talos-nodes - name: kapi-talos-control-plane diff --git a/test/e2e/config/outscale.yaml b/test/e2e/config/outscale.yaml index fb14021c7..69d86c48a 100644 --- a/test/e2e/config/outscale.yaml +++ b/test/e2e/config/outscale.yaml @@ -72,7 +72,7 @@ variables: OSC_VOLUME_TYPE: "gp2" OSC_KEYPAIR_NAME: "cluster-api-keypair" OSC_SUBREGION_NAME: "${OSC_SUBREGION_NAME:us-east-2a}" - OSC_VM_TYPE: "tinav4.c4r8p1" + OSC_VM_TYPE: "tinav6.c4r8p1" OSC_LOADBALANCER_NAME: "capo-e2e-k8s" WORKER_MACHINE_COUNT: 1 CONTROL_PLANE_MACHINE_COUNT: 1 diff --git a/testenv/osccluster_controller_test.go b/testenv/osccluster_controller_test.go index 2ff2d4c11..25a9222c0 100644 --- a/testenv/osccluster_controller_test.go +++ b/testenv/osccluster_controller_test.go @@ -1124,7 +1124,7 @@ var _ = Describe("Outscale Cluster Reconciler", func() { }, SubnetName: "cluster-api-subnet-kcp", LoadBalancerName: "osc-k8s-machine", - VmType: "tinav4.c2r2p2", + VmType: "tinav3.c2r2p2", SecurityGroupNames: []infrastructurev1beta1.OscSecurityGroupElement{ { Name: "cluster-api-securitygroups-kcp",