Skip to content

Commit

Permalink
Fix additionalTrustBundle with local ignition provider
Browse files Browse the repository at this point in the history
In openshift#972 I relied on the fact that MCSIgnitionProvider mounts the MCO
ConfigMap under /assets/manifests - this means that the
user-ca-bundle-config.yaml file path matches the default location
from the MCO bootstrap code, thus no explicit
--additional-trust-bundle-config-file argument was required.

In openshift#1214 we introduced a new LocalIgnitionProvider, which unpacks the
MCO config to a different path e.g /payloads/get-payload123/config
hence we need to explicitly pass --additional-trust-bundle-config-file
or the additionalTrustBundle data is ignored.
  • Loading branch information
Steven Hardy committed Jul 28, 2022
1 parent 917c954 commit 302aed5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ignition-server/controllers/local_ignitionprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@ func (p *LocalIgnitionProvider) GetPayload(ctx context.Context, releaseImage str
if image, exists := images["mdns-publisher"]; exists {
args = append(args, fmt.Sprintf("--mdns-publisher-image=%s", image))
}
if mcsConfig.Data["user-ca-bundle-config.yaml"] != "" {
args = append(args, fmt.Sprintf("--additional-trust-bundle-config-file=%s/user-ca-bundle-config.yaml", configDir))
}
if p.CloudProvider == hyperv1.AzurePlatform {
args = append(args, fmt.Sprintf("--cloud-config-file=%s/cloud.conf.configmap.yaml", mcoBaseDir))
}
Expand Down

0 comments on commit 302aed5

Please sign in to comment.