diff --git a/ansible/playbooks/roles/repository/files/download-requirements/requirements/aarch64/images.yml b/ansible/playbooks/roles/repository/files/download-requirements/requirements/aarch64/images.yml index edc30e71b0..c45ae2311a 100644 --- a/ansible/playbooks/roles/repository/files/download-requirements/requirements/aarch64/images.yml +++ b/ansible/playbooks/roles/repository/files/download-requirements/requirements/aarch64/images.yml @@ -17,6 +17,9 @@ images: sha1: 854d06bae1ee7e3a94570e1ce104618430988f57 kubernetes-master: + 'haproxy:2.2.2-alpine': + sha1: 2fd3bd554ee6e126a1b1e5055ed0349beac81ffc + 'kubernetesui/dashboard:v2.3.1': sha1: 5dc90f59af4643952d5a728213983e6f3d884895 diff --git a/ansible/playbooks/roles/repository/files/download-requirements/src/config/config.py b/ansible/playbooks/roles/repository/files/download-requirements/src/config/config.py index c4f29ba97c..3416806c48 100644 --- a/ansible/playbooks/roles/repository/files/download-requirements/src/config/config.py +++ b/ansible/playbooks/roles/repository/files/download-requirements/src/config/config.py @@ -283,19 +283,23 @@ def __filter_images(self, requirements: Dict[str, Any], manifest: Dict[str, Any] # prepare image groups: images = requirements['images'] images_to_download: Dict[str, Dict] = {} + all_images = set() for image_group in images: images_to_download[image_group] = {} if len(manifest['requested-images']): # if image-registry document used: for image_group in images: for image, data in images[image_group].items(): - if image in manifest['requested-images']: + if image in manifest['requested-images'] and image not in all_images: images_to_download[image_group][image] = data + all_images.add(image) else: # otherwise check features used: for image_group in images: if image_group in manifest['requested-features']: for image, data in images[image_group].items(): - images_to_download[image_group][image] = data + if image not in all_images: + images_to_download[image_group][image] = data + all_images.add(image) if images_to_download: requirements['images'] = images_to_download diff --git a/ansible/playbooks/roles/repository/files/download-requirements/tests/data/config.py b/ansible/playbooks/roles/repository/files/download-requirements/tests/data/config.py index d2d3492027..c12e354d34 100644 --- a/ansible/playbooks/roles/repository/files/download-requirements/tests/data/config.py +++ b/ansible/playbooks/roles/repository/files/download-requirements/tests/data/config.py @@ -138,6 +138,9 @@ sha1: c64408bf5bb522f47d5323652dd5e60560dcb5bc kubernetes-master: + 'haproxy:2.2.2-alpine': + sha1: dff8993b065b7f7846adb553548bcdcfcd1b6e8e + 'kubernetesui/dashboard:v2.3.1': sha1: 8c8a4ac7a643f9c5dd9e5d22876c434187312db8