-
Notifications
You must be signed in to change notification settings - Fork 34
Add imageRef to volume controller #633
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| --- | ||
| # Example of creating a bootable volume from an image. | ||
| # The volume can then be used as a boot device for a server. | ||
| apiVersion: openstack.k-orc.cloud/v1alpha1 | ||
| kind: Image | ||
| metadata: | ||
| name: ubuntu-2404 | ||
| spec: | ||
| cloudCredentialsRef: | ||
| cloudName: openstack | ||
| secretName: openstack-clouds | ||
| import: | ||
| filter: | ||
| name: ubuntu-24.04-server | ||
| --- | ||
| apiVersion: openstack.k-orc.cloud/v1alpha1 | ||
| kind: Volume | ||
| metadata: | ||
| name: bootable-volume-sample | ||
| spec: | ||
| cloudCredentialsRef: | ||
| cloudName: openstack | ||
| secretName: openstack-clouds | ||
| managementPolicy: managed | ||
| resource: | ||
| description: Bootable volume created from Ubuntu image | ||
| size: 50 | ||
| imageRef: ubuntu-2404 | ||
| volumeTypeRef: fast-ssd |
|
Collaborator
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. I believe this test is not necessary because we're already checking the creation of a bootable volume in the
Contributor
Author
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. I think we should leave this one and remove the dependency as there is no deletion guard for image so I feel it would make more sense keeping this and removing the dependency, WDYT? |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| --- | ||
| apiVersion: openstack.k-orc.cloud/v1alpha1 | ||
| kind: Image | ||
| metadata: | ||
| name: volume-create-bootable-image | ||
| status: | ||
| resource: | ||
| status: active | ||
| --- | ||
| apiVersion: openstack.k-orc.cloud/v1alpha1 | ||
| kind: Volume | ||
| metadata: | ||
| name: volume-create-bootable | ||
| status: | ||
| resource: | ||
| name: volume-create-bootable | ||
| size: 1 | ||
| status: available | ||
| bootable: true | ||
| encrypted: false | ||
| multiattach: false | ||
| conditions: | ||
| - type: Available | ||
| status: "True" | ||
| reason: Success | ||
| - type: Progressing | ||
| status: "False" | ||
| reason: Success | ||
| --- | ||
| apiVersion: kuttl.dev/v1beta1 | ||
| kind: TestAssert | ||
| resourceRefs: | ||
| - apiVersion: openstack.k-orc.cloud/v1alpha1 | ||
| kind: Volume | ||
| name: volume-create-bootable | ||
| ref: volume | ||
| - apiVersion: openstack.k-orc.cloud/v1alpha1 | ||
| kind: Image | ||
| name: volume-create-bootable-image | ||
| ref: image | ||
| assertAll: | ||
| - celExpr: "volume.status.id != ''" | ||
| - celExpr: "volume.status.resource.tenantID != ''" | ||
| - celExpr: "volume.status.resource.userID != ''" | ||
| - celExpr: "volume.status.resource.volumeType != ''" | ||
| - celExpr: "volume.status.resource.createdAt != ''" | ||
| - celExpr: "volume.status.resource.updatedAt != ''" | ||
| - celExpr: "volume.status.resource.imageID == image.status.id" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| --- | ||
| apiVersion: openstack.k-orc.cloud/v1alpha1 | ||
| kind: Image | ||
| metadata: | ||
| name: volume-create-bootable-image | ||
| spec: | ||
| cloudCredentialsRef: | ||
| cloudName: openstack | ||
| secretName: openstack-clouds | ||
| managementPolicy: managed | ||
| resource: | ||
| content: | ||
| diskFormat: raw | ||
| download: | ||
| url: https://github.com/k-orc/openstack-resource-controller/raw/690b760f49dfb61b173755e91cb51ed42472c7f3/internal/controllers/image/testdata/raw.img | ||
| --- | ||
| apiVersion: openstack.k-orc.cloud/v1alpha1 | ||
| kind: Volume | ||
| metadata: | ||
| name: volume-create-bootable | ||
| spec: | ||
| cloudCredentialsRef: | ||
| cloudName: openstack | ||
| secretName: openstack-clouds | ||
| managementPolicy: managed | ||
| resource: | ||
| size: 1 | ||
| imageRef: volume-create-bootable-image |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| apiVersion: kuttl.dev/v1beta1 | ||
| kind: TestStep | ||
| commands: | ||
| - command: kubectl create secret generic openstack-clouds --from-file=clouds.yaml=${E2E_KUTTL_OSCLOUDS} ${E2E_KUTTL_CACERT_OPT} | ||
| namespaced: true |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.