Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ci/playbooks/multinode-customizations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,10 @@

- name: Set insecure registry on crc node
ansible.builtin.include_tasks: tasks/set_crc_insecure_registry.yml
when: content_provider_registry_ip is defined or cifmw_crc_registry_mirror_content is defined
when: >-
content_provider_registry_ip is defined or
cifmw_crc_registry_mirror_content is defined or
cifmw_crc_additional_insecure_registries is defined

- hosts: controller
name: "Tweak Controller"
Expand Down
31 changes: 30 additions & 1 deletion ci/playbooks/tasks/set_crc_insecure_registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@
image.config.openshift.io/cluster
loop: "{{ cifmw_crc_additional_allowed_registries }}"

- name: Add additional insecure registries
when: cifmw_crc_additional_insecure_registries is defined
ansible.builtin.shell: |
oc patch --type=json \
--patch='[{"op": "add", "path": "/spec/registrySources/insecureRegistries/-", "value": "{{ item }}"}]' \
image.config.openshift.io/cluster
loop: "{{ cifmw_crc_additional_insecure_registries }}"

- name: Ensure registries.conf.d exists
become: true
when: cifmw_crc_registry_mirror_content is defined or content_provider_registry_ip is defined
Expand All @@ -61,6 +69,24 @@
mirror-by-digest-only = false
prefix = ""

- name: Set insecure registry in crio for additional registries
become: true
when: cifmw_crc_additional_insecure_registries is defined
ansible.builtin.blockinfile:
state: present
insertafter: EOF
dest: /etc/containers/registries.conf.d/99-insecure-registry.conf
create: true
marker: "# {mark} ANSIBLE MANAGED BLOCK {{ item }}"
content: |-
[[registry]]
location = "{{ item }}"
insecure = true
blocked = false
mirror-by-digest-only = false
prefix = ""
loop: "{{ cifmw_crc_additional_insecure_registries }}"

- name: Set registry mirror override
when: cifmw_crc_registry_mirror_content is defined
become: true
Expand All @@ -72,7 +98,10 @@
content: "{{ cifmw_crc_registry_mirror_content }}"

- name: Restart crio
when: cifmw_crc_registry_mirror_content is defined or content_provider_registry_ip is defined
when: >-
cifmw_crc_registry_mirror_content is defined or
content_provider_registry_ip is defined or
cifmw_crc_additional_insecure_registries is defined
become: true
ansible.builtin.service:
name: crio
Expand Down
5 changes: 4 additions & 1 deletion roles/edpm_prepare/tasks/kustomize_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@
(cifmw_update_containers_openstack is defined and
cifmw_update_containers_openstack | bool) or
(cifmw_update_containers_watcher is defined and
cifmw_update_containers_watcher | bool))
cifmw_update_containers_watcher | bool) or
(cifmw_update_containers_ceilometersgcoreImage is defined) or
(cifmw_update_containers_ceilometermysqldexporterImage is defined) or
(cifmw_update_containers_edpmpodmanexporterImage is defined))
vars:
cifmw_update_containers_metadata: "{{ _ctlplane_name }}"
ansible.builtin.include_role:
Expand Down
6 changes: 6 additions & 0 deletions roles/update_containers/templates/update_containers.j2
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ spec:
{% if cifmw_update_containers_edpmnodeexporterimage is defined %}
edpmNodeExporterImage: {{ cifmw_update_containers_edpmnodeexporterimage }}
{% endif %}
{% if cifmw_update_containers_ceilometermysqldexporterImage is defined %}
ceilometerMysqldExporterImage: {{ cifmw_update_containers_ceilometermysqldexporterImage }}
{% endif %}
{% if cifmw_update_containers_edpmpodmanexporterImage is defined %}
edpmPodmanExporterImage: {{ cifmw_update_containers_edpmpodmanexporterImage }}
{% endif %}
{% if cifmw_update_containers_agentimage is defined %}
agentImage: {{ cifmw_update_containers_registry }}/{{ cifmw_update_containers_org }}/{{ cifmw_update_containers_name_prefix }}-baremetal-operator-agent:{{ cifmw_update_containers_tag }}
{% endif %}
Expand Down
Loading