Skip to content

Commit

Permalink
switch to ImageDigestSources
Browse files Browse the repository at this point in the history
  • Loading branch information
karmab committed Jan 19, 2024
1 parent c855560 commit aa8f673
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions ailib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def set_default_values(self, overrides, existing=False, quiet=False):
"source": "quay.io/openshift-release-dev/ocp-release"},
{'mirrors': [f"{url}/openshift/release", f"{url}/openshift/release-images"],
"source": "quay.io/openshift-release-dev/ocp-v4.0-art-dev"}]
installconfig = {'imageContentSources': disconnected_registries}
installconfig = {'ImageDigestSources': disconnected_registries}
info(f"Trying to gather registry ca cert from {url}")
cacmd = f"openssl s_client -showcerts -connect {url} </dev/null 2>/dev/null|"
cacmd += "openssl x509 -outform PEM"
Expand Down Expand Up @@ -409,10 +409,10 @@ def set_disconnected_ignition_config_override(self, infra_env_id=None, overrides
_preload_content=False)
ignition_version = json.loads(ori.read().decode("utf-8"))['ignition']['version']
if 'installconfig' in overrides and isinstance(overrides['installconfig'], dict)\
and 'imageContentSources' in overrides['installconfig']:
info("Using imageContentSources from installconfig")
and 'ImageDigestSources' in overrides['installconfig']:
info("Using ImageDigestSources from installconfig")
registries = 'unqualified-search-registries = ["registry.access.redhat.com", "docker.io"]\n'
for registry in overrides['installconfig']['imageContentSources']:
for registry in overrides['installconfig']['ImageDigestSources']:
source = registry.get('source')
for target in registry.get('mirrors', []):
new_registry = """[[registry]]
Expand Down
2 changes: 1 addition & 1 deletion samples/disconnected.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ installconfig:
Ig5BBu37RdjCR7JGSF/2QisMmyKoTnyD9P+lFKTgGfsbbxrp7XdeLYY7xaFRzkuZ
gAedh+jkW6mjkMIu5RUU
-----END CERTIFICATE-----
imageContentSources:
imageDigestSources:
- mirrors:
- testk-disconnecter.ipv6only:5000/ocp4
source: quay.io/openshift-release-dev/ocp-v4.0-art-dev
Expand Down

0 comments on commit aa8f673

Please sign in to comment.