Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: [v1alpha4] redesign user-facing API #618

Closed
CecileRobertMichon opened this issue May 14, 2020 · 16 comments
Closed

RFE: [v1alpha4] redesign user-facing API #618

CecileRobertMichon opened this issue May 14, 2020 · 16 comments
Assignees
Labels
kind/proposal Issues or PRs related to proposals.
Milestone

Comments

@CecileRobertMichon
Copy link
Contributor

CecileRobertMichon commented May 14, 2020

⚠️ Cluster API Azure maintainers can ask to turn an issue-proposal into a CAEP when necessary. This is to be expected for large changes that impact multiple components, breaking changes, or new large features.

Currently, the AzureCluster and AzureMachine specs are mostly flat. While this works as there are few configuration knobs, it is probably not the best long term as we add more features and configuration options. This is marked as [v1alpha4] because it would be a breaking change but I want to start thinking about this ahead of time so that we have a proposal ready when the time to switch to v1alpha4 comes. Ideally, we should come up with a logical way to break down the spec in AzureCluster, AzureMachine, and AzureMachinePool. For example, Storage, Compute, etc.

Open for discussion. Will bring this up at the next CAPZ office hours.

Please add any API breaking changes you'd like to see happen in v1alpha4 as comments on this issue

/kind proposal

@k8s-ci-robot k8s-ci-robot added the kind/proposal Issues or PRs related to proposals. label May 14, 2020
@CecileRobertMichon
Copy link
Contributor Author

type Subnets should be type Subnets [SubnetRole]*SubnetSpec instead of type Subnets []*SubnetSpec and we should remove the Role field in SubnetSpec.

https://github.com/kubernetes-sigs/cluster-api-provider-azure/blob/master/api/v1alpha3/types.go#L78

This assumes there should be one and only one subnet per "role" (ie. ControlPlane, Node), which is the case today but we should determine if there would be a case for this not being true in the future.

@CecileRobertMichon
Copy link
Contributor Author

CecileRobertMichon commented May 28, 2020

This assumes there should be one and only one subnet per "role" (ie. ControlPlane, Node), which is the case today but we should determine if there would be a case for this not being true in the future.

I don't think that's always going to be true so it might actually be better to have a map where the key is Name :

type Subnets [string]*SubnetSpec

because Subnet name is and should be unique within a vnet, https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-manage-subnet#add-a-subnet, and that's an Azure infrastructure constraint, unlike role which is subject to change.

EDIT (01/28/21): We'll need to change this array of pointers to an array of objects to update to controller runtime 0.8.1 https://github.com/kubernetes-sigs/cluster-api/pull/4109/files#diff-50eabdf2e788bbcbe8320b5f3dc2e2595b62a1bf09c762c626b46f8dc3cdfcccR58

@CecileRobertMichon
Copy link
Contributor Author

OSDisk. DiskSizeGB should be optional, see #658 (comment)

@CecileRobertMichon
Copy link
Contributor Author

Remove AzureMachine FailureDomains and AvailabilityZones (in favor of Machine.FailureDomains) #679

@CecileRobertMichon
Copy link
Contributor Author

CecileRobertMichon commented Jul 13, 2020

Subnet CIDRBlock + ipv6 CIDR should become a list of CIDRBlocks to match Azure APIs (a subnet can have multiple CIDRs)
cc @jsturtevant

EDIT: done in #646

@CecileRobertMichon
Copy link
Contributor Author

#812

@alexeldeib
Copy link
Contributor

is CAPA undertaking a similar effort in v1a4? Curious if there are any common patterns emerging around BYO-resource type stuff

@CecileRobertMichon
Copy link
Contributor Author

is CAPA undertaking a similar effort in v1a4? Curious if there are any common patterns emerging around BYO-resource type stuff

Not that I'm aware of, from what I've seen CAPA tags resources as owned by the cluster and uses that to differentiate between managed (lifecycle owned by CAPA) and unmanaged (BYO) resources. @detiber / @ncdc might have some additional context.

@CecileRobertMichon
Copy link
Contributor Author

rename IngressRules to SecurityRules (maybe?) to be consistent with Azure naming

@CecileRobertMichon
Copy link
Contributor Author

ResourceGroup -> ResourceGroupName ?

@CecileRobertMichon
Copy link
Contributor Author

Consider making OS disk ManagedDisk.StorageAccountType optional as it is not actually a required field for Azure APIs.

VM sizes without "s" support both Standard HDD and Standard SSD, default is Standard HDD. VM sizes with an "s" support Premium SSD, Standard HDD and Standard SSD, defaults to Premium SSD. Some select VM sizes support Ultra SSD for data disks.

@CecileRobertMichon CecileRobertMichon modified the milestones: next, v0.5.x Nov 12, 2020
@CecileRobertMichon CecileRobertMichon modified the milestones: v0.5.x, v0.5.0 Mar 18, 2021
@CecileRobertMichon
Copy link
Contributor Author

/assign

@CecileRobertMichon
Copy link
Contributor Author

CecileRobertMichon commented May 27, 2021

Status:

  • type Subnets should be type Subnets [SubnetRole]*SubnetSpec instead of type Subnets []*SubnetSpec and we should remove the Role field in SubnetSpec. won't do
  • OSDisk. DiskSizeGB should be optional
  • Remove AzureMachine FailureDomains and AvailabilityZones (in favor of Machine.FailureDomains) - done in Cleanup deprecated variables from v1alpha4 #1233
  • Subnet CIDRBlock + ipv6 CIDR should become a list of CIDRBlocks to match Azure APIs (a subnet can have multiple CIDRs) - done in ✨ Add single stack IPv6 support #646
  • Rename IngressRules to SecurityRules (maybe?) to be consistent with Azure naming - done in Add support for custom egress rules #1299
  • ResourceGroup -> ResourceGroupName ? won't do
  • making OS disk ManagedDisk.StorageAccountType optional as it is not actually a required field for Azure APIs - done in Make OSDisk Storage Type optional #1321

@nader-ziada
Copy link
Contributor

OSDisk. DiskSizeGB should be optional done in #1398

@CecileRobertMichon
Copy link
Contributor Author

I think we're good to close this. I don't think the AzureResourceGroup rename is truly needed.

/close

@k8s-ci-robot
Copy link
Contributor

@CecileRobertMichon: Closing this issue.

In response to this:

I think we're good to close this. I don't think the AzureResourceGroup rename is truly needed.

/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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/proposal Issues or PRs related to proposals.
Projects
None yet
Development

No branches or pull requests

4 participants