From cb127cd1b0cf41c4dea7bb5cd44dd80d7f0f3c2d Mon Sep 17 00:00:00 2001 From: Sanne Raymaekers Date: Thu, 8 Dec 2022 16:55:55 +0100 Subject: [PATCH] distro/rhel9: add consumer certificates when ostree rhsm is true --- internal/distro/rhel9/images.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/internal/distro/rhel9/images.go b/internal/distro/rhel9/images.go index f5e87c149..37a8d7df2 100644 --- a/internal/distro/rhel9/images.go +++ b/internal/distro/rhel9/images.go @@ -218,6 +218,9 @@ func edgeCommitImage(workload workload.Workload, URL: options.OSTree.URL, ContentURL: options.OSTree.ContentURL, } + if options.OSTree.RHSM { + img.OSTreeParent.Secrets = "org.osbuild.rhsm.consumer" + } } img.OSVersion = t.arch.distro.osVersion @@ -249,6 +252,9 @@ func edgeContainerImage(workload workload.Workload, URL: options.OSTree.URL, ContentURL: options.OSTree.ContentURL, } + if options.OSTree.RHSM { + img.OSTreeParent.Secrets = "org.osbuild.rhsm.consumer" + } } img.OSVersion = t.arch.distro.osVersion @@ -276,6 +282,9 @@ func edgeInstallerImage(workload workload.Workload, ContentURL: options.OSTree.ContentURL, Checksum: options.OSTree.FetchChecksum, } + if options.OSTree.RHSM { + commit.Secrets = "org.osbuild.rhsm.consumer" + } img := image.NewOSTreeInstaller(commit) img.Platform = t.platform