diff --git a/go.mod b/go.mod index feb3370b..8618496a 100644 --- a/go.mod +++ b/go.mod @@ -224,6 +224,7 @@ require ( github.com/redis/go-redis/extra/rediscmd/v9 v9.0.5 // indirect github.com/redis/go-redis/extra/redisotel/v9 v9.0.5 // indirect github.com/redis/go-redis/v9 v9.1.0 // indirect + github.com/rogpeppe/go-internal v1.14.1 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c // indirect github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd // indirect diff --git a/go.sum b/go.sum index 2f331aa3..ac738e2b 100644 --- a/go.sum +++ b/go.sum @@ -1064,8 +1064,8 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= diff --git a/pkg/asset/ignition/recovery_ignition.go b/pkg/asset/ignition/recovery_ignition.go index 85e707f6..9a6b836f 100644 --- a/pkg/asset/ignition/recovery_ignition.go +++ b/pkg/asset/ignition/recovery_ignition.go @@ -2,6 +2,7 @@ package ignition import ( "context" + "fmt" "os" "path/filepath" @@ -83,6 +84,23 @@ func (i *RecoveryIgnition) Generate(_ context.Context, dependencies asset.Parent // (even though disabled by default, the udev rule may require it). noConfigImageFile := ignition.FileFromString("/etc/assisted/no-config-image", "root", 0644, "") unconfiguredIgnition.Storage.Files = append(unconfiguredIgnition.Storage.Files, noConfigImageFile) + + _, releaseVersion, err := installerConfig.ApplianceConfig.GetRelease() + if err != nil { + return err + } + iriContent := fmt.Sprintf(`apiVersion: machineconfiguration.openshift.io/v1alpha1 +kind: InternalReleaseImage +metadata: + name: cluster +spec: + releases: + - name: ocp-release-bundle-%s +`, releaseVersion) + + // Keep the filepath in sync with openshift/installer#10176 until the installer min storage will be more robust. + iriFile := ignition.FileFromString("/etc/assisted/extra-manifests/internalreleaseimage.yaml", "root", 0644, iriContent) + unconfiguredIgnition.Storage.Files = append(unconfiguredIgnition.Storage.Files, iriFile) } // Remove registries.conf file from unconfiguredIgnition (already added in bootstrapIgnition)