Skip to content

Make OSDisk Storage Type optional#1321

Merged
k8s-ci-robot merged 2 commits into
kubernetes-sigs:masterfrom
CecileRobertMichon:storage-type-optional
Apr 27, 2021
Merged

Make OSDisk Storage Type optional#1321
k8s-ci-robot merged 2 commits into
kubernetes-sigs:masterfrom
CecileRobertMichon:storage-type-optional

Conversation

@CecileRobertMichon
Copy link
Copy Markdown
Contributor

@CecileRobertMichon CecileRobertMichon commented Apr 16, 2021

What type of PR is this?

What this PR does / why we need it: 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.

Also fixed the ephemeral OS disk flavor to use ReadOnly caching and added validation for caching types.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes partially #618

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

Make OSDisk Storage Type optional

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Apr 16, 2021
@k8s-ci-robot k8s-ci-robot added area/provider/azure Issues or PRs related to azure provider sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. labels Apr 16, 2021
@CecileRobertMichon CecileRobertMichon force-pushed the storage-type-optional branch 3 times, most recently from 3f64ba3 to 0542dbd Compare April 16, 2021 20:14
@CecileRobertMichon
Copy link
Copy Markdown
Contributor Author

/home/prow/go/src/sigs.k8s.io/cluster-api-provider-azure/test/e2e/azure_test.go:449
Timed out after 480.114s.
Deployment default/web-windows failed

:sigh:

@CecileRobertMichon CecileRobertMichon changed the title [WIP] Make OSDisk Storage Type optional Make OSDisk Storage Type optional Apr 16, 2021
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 16, 2021
@CecileRobertMichon
Copy link
Copy Markdown
Contributor Author

/retest

@CecileRobertMichon
Copy link
Copy Markdown
Contributor Author

/assign @nader-ziada @shysank

Copy link
Copy Markdown
Contributor

@nader-ziada nader-ziada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great PR, just wondering about the naming

Comment thread api/v1alpha4/types.go Outdated
Comment thread docs/book/src/SUMMARY.md
Comment thread api/v1alpha3/azuremachine_conversion.go Outdated
Comment thread api/v1alpha3/azuremachinetemplate_conversion.go Outdated
Comment thread api/v1alpha4/azuremachine_validation.go Outdated
Comment thread api/v1alpha4/azuremachine_validation.go Outdated
Comment thread api/v1alpha4/azuremachine_validation.go Outdated
Comment thread exp/api/v1alpha3/azuremachinepool_conversion.go Outdated
@CecileRobertMichon
Copy link
Copy Markdown
Contributor Author

Thanks for the reviews! I have been heads down on #1323 and #1330 but will address the comments tomorrow.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

k8s-ci-robot commented Apr 24, 2021

@CecileRobertMichon: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-cluster-api-provider-azure-apidiff a58e6a2 link /test pull-cluster-api-provider-azure-apidiff

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

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. I understand the commands that are listed here.

Copy link
Copy Markdown
Contributor

@devigned devigned left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With all of the individual validate${TYPE} funcs, it feels like we should have a validate method added to the types via the code generator and then just have it wired up in the webhooks. Then the webhooks can call an empty validate on the top level type and have it cascade to all of the field types.

Copy link
Copy Markdown
Contributor

@devigned devigned left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks great. Just curious about the name change.

Comment thread api/v1alpha4/types.go
StorageAccountType string `json:"storageAccountType"`
DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
// ManagedDiskParameters defines the parameters of a managed disk.
type ManagedDiskParameters struct {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious about the name change. Why ManagedDiskParameters rather than ManagedDisk?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aligns with the Azure types & makes it clear this isn't about optionally enabling managed disks but rather about how the managed disk is configured.

https://github.com/Azure/azure-sdk-for-go/blob/master/services/compute/mgmt/2021-03-01/compute/models.go#L8937

@nader-ziada
Copy link
Copy Markdown
Contributor

thanks for addressing all the comments Cecile

lgtm

@shysank
Copy link
Copy Markdown
Contributor

shysank commented Apr 26, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 26, 2021
@nader-ziada
Copy link
Copy Markdown
Contributor

/test pull-cluster-api-provider-azure-e2e-windows

@CecileRobertMichon
Copy link
Copy Markdown
Contributor Author

/approve

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 27, 2021
@k8s-ci-robot k8s-ci-robot merged commit 57d8e61 into kubernetes-sigs:master Apr 27, 2021
@k8s-ci-robot k8s-ci-robot added this to the v0.5.0 milestone Apr 27, 2021
@CecileRobertMichon CecileRobertMichon deleted the storage-type-optional branch February 17, 2023 22:59
willie-yao pushed a commit to willie-yao/cluster-api-provider-azure that referenced this pull request Jul 11, 2025
Signed-off-by: Jeremy Rickard <jrickard@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/provider/azure Issues or PRs related to azure provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants