Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix containerd config toml for insecure registries #9651

Closed
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
4 changes: 4 additions & 0 deletions pipeline.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,7 @@ RUN wget https://releases.hashicorp.com/vagrant/${VAGRANT_VERSION}/vagrant_${VAG
dpkg -i vagrant_${VAGRANT_VERSION}_x86_64.deb && \
rm vagrant_${VAGRANT_VERSION}_x86_64.deb && \
vagrant plugin install vagrant-libvirt

# Install Kubernetes collections
RUN pip3 install kubernetes \
&& ansible-galaxy collection install kubernetes.core
4 changes: 2 additions & 2 deletions roles/container-engine/containerd/templates/config.toml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ oom_score = {{ containerd_oom_score }}
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."{{ registry }}"]
endpoint = ["{{ ([ addr ] | flatten ) | join('","') }}"]
{% endfor %}
{% for addr in containerd_insecure_registries.values() | flatten | unique %}
[plugins."io.containerd.grpc.v1.cri".registry.configs."{{ addr }}".tls]
{% for registry in containerd_insecure_registries.keys() %}
[plugins."io.containerd.grpc.v1.cri".registry.configs."{{ registry }}".tls]
insecure_skip_verify = true
{% endfor %}
{% endif %}
Expand Down
15 changes: 7 additions & 8 deletions tests/cloud_playbooks/roles/packet-ci/tasks/create-vms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,19 @@
mode: 0755

- name: Template vm files for CI job
template:
src: "vm.yml.j2"
dest: "/tmp/{{ test_name }}/instance-{{ vm_id }}.yml"
mode: 0644
set_fact:
vms_files: "{{ vms_files }} + [{{ lookup('ansible.builtin.template', 'vm.yml.j2') | from_yaml }}]"
vars:
vms_files: []
loop: "{{ range(1, vm_count|int + 1, 1) | list }}"
loop_control:
index_var: vm_id

- name: Start vms for CI job
command: "kubectl apply -f /tmp/{{ test_name }}/instance-{{ vm_id }}.yml"
kubernetes.core.k8s:
definition: "{{ item }}"
changed_when: false
loop: "{{ range(1, vm_count|int + 1, 1) | list }}"
loop_control:
index_var: vm_id
loop: "{{ vms_files }}"

- name: Wait for vms to have ipaddress assigned
shell: "set -o pipefail && kubectl get vmis -n {{ test_name }} instance-{{ vm_id }} -o json | jq '.status.interfaces[].ipAddress' | tr -d '\"'"
Expand Down