-
Notifications
You must be signed in to change notification settings - Fork 75
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
Proposal: Data Disk restore from Image #824
Open
elankath
wants to merge
5
commits into
gardener:master
Choose a base branch
from
elankath:disk-snapshot-support
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+79
−0
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
4e747f2
data disk restore from snapshot
elankath 7afa6b9
snapshot->image
elankath 3ea87ef
allow specify resourceGroup
elankath 4d082bd
changed field name to match provider user doc instead of using commo…
elankath 9c861c3
typo fix
elankath File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
--- | ||
title: Data Disk Restore From Image | ||
creation-date: 2025-04-05 | ||
status: implementable | ||
authors: | ||
- "@elankath" | ||
reviewers: | ||
- "@rishabh-11" | ||
- "@unmarshall" | ||
- "@kon-angelo " | ||
--- | ||
|
||
# Data Disk Restore From Image | ||
|
||
## Table of Contents | ||
|
||
- [Summary](#summary) | ||
- [Motivation](#motivation) | ||
- [Goals](#goals) | ||
- [Non-Goals](#non-goals) | ||
- [Proposal](#proposal) | ||
- [Alternatives](#alternatives) | ||
|
||
## Summary | ||
|
||
Currently, we have no support either in the shoot spec or in the [MCM Azure](https://github.com/gardener/machine-controller-manager-provider-azure) for restoring Azure Data Disks from a user created image. | ||
|
||
## Motivation | ||
The primary motivation is to support [Integration of vSMP MemeoryOne in Azure #](https://github.com/gardener/gardener-extension-provider-azure/issues/788). | ||
We implemented support for this in AWS via [Support for data volume snapshot ID ](https://github.com/gardener/gardener-extension-provider-aws/pull/112). | ||
In Azure we have the option to restore data disk from a custom image which is more convenient and flexible. | ||
|
||
### Goals | ||
|
||
1. Extend the provider specific [WorkerConfig](https://github.com/gardener/gardener-extension-provider-azure/blob/master/docs/usage/usage.md#workerconfig) section in the shoot YAML | ||
and support provider configuration for data-disks to support data-disk creation based on an existing image. | ||
|
||
|
||
## Proposal | ||
|
||
### Shoot Specification | ||
|
||
At this current time, there is no support for provider specific configuration of data disks in an azure shoot spec. | ||
The below shows an example configuration at the time of this proposal: | ||
```yaml | ||
providerConfig: | ||
apiVersion: azure.provider.extensions.gardener.cloud/v1alpha1 | ||
kind: WorkerConfig | ||
nodeTemplate: # (to be specified only if the node capacity would be different from cloudprofile info during runtime) | ||
capacity: | ||
cpu: 2 | ||
gpu: 1 | ||
memory: 50Gi | ||
``` | ||
We propose that the worker config section be enahnced to support data disk configuration | ||
```yaml | ||
providerConfig: | ||
apiVersion: azure.provider.extensions.gardener.cloud/v1alpha1 | ||
kind: WorkerConfig | ||
dataVolumes: # <-- NEW SUB_SECTION | ||
- name: vsmp1 | ||
imageReference: imgRef # ID or URN (publisher:offer:sku:version) of the image from which to create a disk | ||
resourceGroup: # (optional) Name of resource group. Will take default if omitted | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the resource group supposed to do ? I think you don't need to reference a resource group to consume an image right ? |
||
nodeTemplate: # (to be specified only if the node capacity would be different from cloudprofile info during runtime) | ||
capacity: | ||
cpu: 2 | ||
gpu: 1 | ||
memory: 50Gi | ||
``` | ||
|
||
In the above `imgRef` specified via `providerConfig.dataVolumes.imageReference` represents the image ID or URN of the image from which to create a disk. This image should already exist. | ||
See [az image create](https://learn.microsoft.com/en-us/cli/azure/image?view=azure-cli-latest#az-image-create). | ||
An optional `resourceGroup` can be specified if the image is associated with a non-default Azure resource group. | ||
|
||
The [MCM Azure Provider](https://github.com/gardener/machine-controller-manager-provider-azure) will ensure that the data | ||
disk is created with the _image reference_ set to the provided `imgRef`. See [az disk create](https://learn.microsoft.com/en-us/cli/azure/disk?view=azure-cli-latest#az-disk-create). | ||
The mechanics of this is left to MCM Azure provider. | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So is the plan for MCM to parse the ID provided and resolve it to an image? MCM-azure already has a struct to ref these in https://github.com/gardener/machine-controller-manager-provider-azure/blob/e86af1fe835f427b1d16b4316b3f02752bd7cd73/pkg/azure/api/providerspec.go#L145 . Why not use that instead ?