diff --git a/pkg/asset/imagebased/image/ignition.go b/pkg/asset/imagebased/image/ignition.go index 7987a443e70..fabfb58810c 100644 --- a/pkg/asset/imagebased/image/ignition.go +++ b/pkg/asset/imagebased/image/ignition.go @@ -47,6 +47,7 @@ type ibiConfigurationFile struct { ExtraPartitionNumber uint `json:"extraPartitionNumber,omitempty"` ExtraPartitionStart string `json:"extraPartitionStart,omitempty"` InstallationDisk string `json:"installationDisk"` + ReleaseRegistry string `json:"releaseRegistry,omitempty"` SeedImage string `json:"seedImage"` SeedVersion string `json:"seedVersion"` Shutdown bool `json:"shutdown,omitempty"` @@ -96,6 +97,7 @@ func (i *Ignition) Generate(_ context.Context, dependencies asset.Parents) error ExtraPartitionNumber: ibiConfig.ExtraPartitionNumber, ExtraPartitionStart: ibiConfig.ExtraPartitionStart, InstallationDisk: ibiConfig.InstallationDisk, + ReleaseRegistry: ibiConfig.ReleaseRegistry, SeedVersion: ibiConfig.SeedVersion, SeedImage: ibiConfig.SeedImage, Shutdown: ibiConfig.Shutdown, diff --git a/pkg/asset/imagebased/image/ignition_test.go b/pkg/asset/imagebased/image/ignition_test.go index ec5e09a29a7..44d31e0b244 100644 --- a/pkg/asset/imagebased/image/ignition_test.go +++ b/pkg/asset/imagebased/image/ignition_test.go @@ -117,7 +117,7 @@ podman rm lca-cli /usr/local/bin/lca-cli ibi -f "${ibi_config}" `, - "/var/tmp/ibi-configuration.json": "{\"extraPartitionLabel\":\"var-lib-containers\",\"extraPartitionNumber\":5,\"extraPartitionStart\":\"-40G\",\"installationDisk\":\"/dev/vda\",\"seedImage\":\"quay.io/openshift-kni/seed-image:4.16.0\",\"seedVersion\":\"4.16.0\"}\n", + "/var/tmp/ibi-configuration.json": "{\"extraPartitionLabel\":\"var-lib-containers\",\"extraPartitionNumber\":5,\"extraPartitionStart\":\"-40G\",\"installationDisk\":\"/dev/vda\",\"releaseRegistry\":\"mirror.quay.io\",\"seedImage\":\"quay.io/openshift-kni/seed-image:4.16.0\",\"seedVersion\":\"4.16.0\"}\n", "/etc/containers/registries.conf": "credential-helpers = []\nshort-name-mode = \"\"\nunqualified-search-registries = []\n\n[[registry]]\n location = \"quay.io\"\n mirror-by-digest-only = true\n prefix = \"\"\n\n [[registry.mirror]]\n location = \"mirror-quay.io\"\n", diff --git a/pkg/asset/imagebased/image/imagebased_config_test.go b/pkg/asset/imagebased/image/imagebased_config_test.go index 3d472b654a0..255a05948bd 100644 --- a/pkg/asset/imagebased/image/imagebased_config_test.go +++ b/pkg/asset/imagebased/image/imagebased_config_test.go @@ -395,6 +395,7 @@ func ibiConfig() *ImageBasedInstallationConfigBuilder { ExtraPartitionStart: "-40G", ExtraPartitionLabel: defaultExtraPartitionLabel, ExtraPartitionNumber: 5, + ReleaseRegistry: "mirror.quay.io", Shutdown: false, SSHKey: "", PullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"c3VwZXItc2VjcmV0Cg==\"}}}", diff --git a/pkg/types/imagebased/imagebased_config_types.go b/pkg/types/imagebased/imagebased_config_types.go index 132ecc71861..58211763ccc 100644 --- a/pkg/types/imagebased/imagebased_config_types.go +++ b/pkg/types/imagebased/imagebased_config_types.go @@ -108,6 +108,10 @@ type InstallationConfig struct { // PullSecret is the secret to use when pulling images. PullSecret string `json:"pullSecret"` + // ReleaseRegistry is the container image registry that hosts the OpenShift release-image content. + // +optional + ReleaseRegistry string `json:"releaseRegistry,omitempty"` + // SeedImage is the seed image to use for the installation. This image will be // used to prepare the installation disk. SeedImage string `json:"seedImage"`