Skip to content

Commit fb38639

Browse files
committed
Update Image registry configuration for image based install
Update the image registry configuration with the newly added Image source policy field that specifies the fallback policy when image pull fails.
1 parent 58df567 commit fb38639

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/asset/imagebased/image/registriesconf.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"github.com/containers/image/v5/pkg/sysregistriesv2"
77
"github.com/pelletier/go-toml"
88

9+
configv1 "github.com/openshift/api/config/v1"
910
"github.com/openshift/installer/pkg/asset"
1011
"github.com/openshift/installer/pkg/asset/ignition/bootstrap"
1112
"github.com/openshift/installer/pkg/types"
@@ -73,6 +74,7 @@ func (i *RegistriesConf) generateRegistriesConf(imageDigestSources []types.Image
7374
registry := sysregistriesv2.Registry{}
7475
registry.Endpoint.Location = group.Source
7576
registry.MirrorByDigestOnly = true
77+
registry.Blocked = group.SourcePolicy == configv1.NeverContactSource
7678
for _, mirror := range group.Mirrors {
7779
registry.Mirrors = append(registry.Mirrors, sysregistriesv2.Endpoint{Location: mirror})
7880
}

0 commit comments

Comments
 (0)