Skip to content

Commit bc0980a

Browse files
committed
CNV-23190: custom namespace for golden images
1 parent ccdd4ad commit bc0980a

File tree

3 files changed

+78
-1
lines changed

3 files changed

+78
-1
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/creating_vms_advanced/creating_vms_advanced_web/virt-creating-vms-from-rh-images-overview.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="virt-golden-images-namespace-cli_{context}"]
7+
= Configuring a custom namespace for golden images by using the CLI
8+
9+
You can configure a custom namespace for golden images in your cluster by setting the `spec.commonBootImageNamespace` field in the `HyperConverged` custom resource (CR).
10+
11+
.Prerequisites
12+
13+
* You installed the {oc-first}.
14+
15+
* You created a namespace to use for golden images.
16+
17+
.Procedure
18+
19+
. Open the `HyperConverged` CR in your default editor by running the following command:
20+
+
21+
[source,terminal,subs="attributes+"]
22+
----
23+
$ oc edit hyperconverged kubevirt-hyperconverged -n {CNVNamespace}
24+
----
25+
26+
. Configure the custom namespace by updating the value of the `spec.commonBootImageNamespace` field:
27+
+
28+
.Example configuration file
29+
[source,yaml,subs="attributes+"]
30+
----
31+
apiVersion: hco.kubevirt.io/v1
32+
kind: HyperConverged
33+
metadata:
34+
name: kubevirt-hyperconverged
35+
namespace: {CNVNamespace}
36+
spec:
37+
commonBootImageNamespace: <custom_namespace> <1>
38+
# ...
39+
----
40+
<1> The namespace to use for golden images.
41+
42+
. Save your changes and exit the editor.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/creating_vms_advanced/creating_vms_advanced_web/virt-creating-vms-from-rh-images-overview.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="virt-golden-images-namespace-web_{context}"]
7+
= Configuring a custom namespace for golden images by using the web console
8+
9+
You can configure a custom namespace for golden images in your cluster by using the {product-title} web console.
10+
11+
.Procedure
12+
13+
. In the web console, select *Virtualization* -> *Overview*.
14+
15+
. Select the *Settings* tab.
16+
17+
. On the *Cluster* tab, select *General settings* -> *Bootable volumes project*.
18+
19+
. Select a namespace to use for golden images.
20+
.. If you already created a namespace, select it from the *Project* list.
21+
22+
.. If you did not create a namespace, scroll to the bottom of the list and click *Create project*.
23+
24+
... Enter a name for your new namespace in the *Name* field of the *Create project* dialog.
25+
26+
... Click *Create*.

virt/creating_vms_advanced/creating_vms_advanced_web/virt-creating-vms-from-rh-images-overview.adoc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ include::_attributes/common-attributes.adoc[]
66

77
toc::[]
88

9-
Red Hat images are xref:../../../virt/creating_vms_advanced/creating_vms_advanced_web/virt-creating-vms-from-rh-images-overview.adoc#virt-about-golden-images_virt-creating-vms-from-rh-images-overview[golden images]. They are published as container disks in a secure registry. The Containerized Data Importer (CDI) polls and imports the container disks into your cluster and stores them in the `openshift-virtualization-os-images` project as snapshots or persistent volume claims (PVCs).
9+
Red Hat images are xref:../../../virt/creating_vms_advanced/creating_vms_advanced_web/virt-creating-vms-from-rh-images-overview.adoc#virt-about-golden-images_virt-creating-vms-from-rh-images-overview[golden images]. They are published as container disks in a secure registry. The Containerized Data Importer (CDI) polls and imports the container disks into your cluster and stores them in the `openshift-virtualization-os-images` project as snapshots or persistent volume claims (PVCs). You can optionally xref:../../../virt/creating_vms_advanced/creating_vms_advanced_web/virt-creating-vms-from-rh-images-overview.adoc#configuring-custom-namespace-golden-images[use a custom namespace] for golden images.
1010

1111
Red Hat images are automatically updated. You can disable and re-enable automatic updates for these images. See xref:../../../virt/storage/virt-automatic-bootsource-updates.adoc#managing-rh-boot-source-updates_virt-automatic-bootsource-updates[Managing Red Hat boot source updates].
1212

@@ -28,3 +28,12 @@ Do not create VMs in the default `openshift-*` namespaces. Instead, create a new
2828
include::modules/virt-golden-images.adoc[leveloffset=+1]
2929

3030
include::modules/virt-about-vms-and-boot-sources.adoc[leveloffset=+1]
31+
32+
[id="configuring-custom-namespace-golden-images"]
33+
== Configuring a custom namespace for golden images
34+
35+
The default namespace for golden images is `openshift-virtualization-os-images`, but you can configure a custom namespace to restrict user access to the default boot sources.
36+
37+
include::modules/virt-golden-images-namespace-web.adoc[leveloffset=+2]
38+
39+
include::modules/virt-golden-images-namespace-cli.adoc[leveloffset=+2]

0 commit comments

Comments
 (0)