community icon indicating copy to clipboard operation
community copied to clipboard

Implement `update` functionality for `Subnet` resource

Open brycahta opened this issue 2 years ago • 10 comments

Is your feature request related to a problem? ec2-controller supports Create/Delete functionality for Subnet resource, but not Update.

Describe the solution you'd like I should be able to modify/update an ACK-managed Subnet resource using its controller

Describe alternatives you've considered Updating resource myself using aws-sdk, cli, or console

brycahta avatar Mar 02 '22 20:03 brycahta

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close. Provide feedback via https://github.com/aws-controllers-k8s/community. /lifecycle stale

ack-bot avatar May 31 '22 23:05 ack-bot

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with /close. Provide feedback via https://github.com/aws-controllers-k8s/community. /lifecycle rotten

ack-bot avatar Jun 30 '22 23:06 ack-bot

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Provide feedback via https://github.com/aws-controllers-k8s/community. /close

ack-bot avatar Jul 30 '22 23:07 ack-bot

@ack-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Provide feedback via https://github.com/aws-controllers-k8s/community. /close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

ack-bot avatar Jul 30 '22 23:07 ack-bot

/reopen

brycahta avatar Sep 06 '22 15:09 brycahta

@brycahta: Reopened this issue.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

ack-bot avatar Sep 06 '22 15:09 ack-bot

image

Will prioritize update functionality related to Edit subnet settings in the Console. Note, for fields backed by modify-subnet-attribute You can only modify one attribute at a time.

brycahta avatar Sep 06 '22 17:09 brycahta

Update: We are blocked on aligning Update functionality with Console due to older version of aws-sdk-go

The AWS Console 'Edit subnet settings' contains functionality (resource-based naming, DNS settings) that is not yet supported by the version of aws-sdk-go being used in code-generator, v1.42.0.

ModifySubnetAttribute input shape in aws-sdk-go v1.42.0:

    "ModifySubnetAttributeRequest":{
      "type":"structure",
      "required":["SubnetId"],
      "members":{
        "AssignIpv6AddressOnCreation":{"shape":"AttributeBooleanValue"},
        "MapPublicIpOnLaunch":{"shape":"AttributeBooleanValue"},
        "SubnetId":{
          "shape":"SubnetId",
          "locationName":"subnetId"
        },
        "MapCustomerOwnedIpOnLaunch":{"shape":"AttributeBooleanValue"},
        "CustomerOwnedIpv4Pool":{"shape":"CoipPoolId"}
      }
    }

latest ModifySubnetAttribute input shape:

    "ModifySubnetAttributeRequest":{
      "type":"structure",
      "required":["SubnetId"],
      "members":{
        "AssignIpv6AddressOnCreation":{"shape":"AttributeBooleanValue"},
        "MapPublicIpOnLaunch":{"shape":"AttributeBooleanValue"},
        "SubnetId":{
          "shape":"SubnetId",
          "locationName":"subnetId"
        },
        "MapCustomerOwnedIpOnLaunch":{"shape":"AttributeBooleanValue"},
        "CustomerOwnedIpv4Pool":{"shape":"CoipPoolId"},
        "EnableDns64":{"shape":"AttributeBooleanValue"},
        "PrivateDnsHostnameTypeOnLaunch":{"shape":"HostnameType"},
        "EnableResourceNameDnsARecordOnLaunch":{"shape":"AttributeBooleanValue"},
        "EnableResourceNameDnsAAAARecordOnLaunch":{"shape":"AttributeBooleanValue"},
        "EnableLniAtDeviceIndex":{"shape":"Integer"},
        "DisableLniAtDeviceIndex":{"shape":"AttributeBooleanValue"}
      }
    },

I can see some of these fields were added in v1.42.11:

service/ec2: Updates service API and documentation This release adds a new parameter ipv6Native to the allow creation of IPv6-only subnets using the CreateSubnet operation, and the operation ModifySubnetAttribute includes new parameters to modify subnet attributes to use resource-based naming and enable DNS resolutions for Private DNS name.

as well as in v1.42.16:

service/ec2: Updates service API and documentation This release adds support for Is4gen and Im4gn instances. This release also adds a new subnet attribute, enableLniAtDeviceIndex, to support local network interfaces, which are logical networking components that connect an EC2 instance to your on-premises network.

For now, I'll proceed with implementing Update for the current fields in ModifySubnetAttributeRequest v1.42.0. Feel free to chime in with feedback and/or plans to update aws-sdk-go in the future

brycahta avatar Sep 07 '22 21:09 brycahta

per SIG meeting: will update to aws-sdk-go v1.44.93 (latest release) prior to this work.

brycahta avatar Sep 08 '22 16:09 brycahta

  • https://github.com/aws-controllers-k8s/code-generator/pull/362
  • https://github.com/aws-controllers-k8s/runtime/pull/102

brycahta avatar Sep 12 '22 15:09 brycahta

Closing as completed.

jaypipes avatar Oct 12 '22 17:10 jaypipes