
* It looks like zuul-jobs-test-registry-buildset-registry-k8s-crio is busted with Ubuntu Jammy + cri-o installed from kubic, with errors like https://github.com/cri-o/ocicni/issues/77 (also, kubic has been wound down and cri-o has been spun off) * cri-o in Noble uninstalls docker-ce, in a follow-up we should clean that up and switch to a pure podman profile * This minikube configuration is not supported, but it seems that upstream cri-o might have made some fixes that makes it work * Update the job to use Ubuntu Noble instead of Jammy * Update ensure-podman for Ubuntu Noble (podman is now part of the Ubuntu distro) * Update the cri-o install in ensure-minikube for Ubuntu Noble and later (cri-o is now part of k8s) Other miscellaneous fixes and workarounds: * k8s.gcr.io is being sunsetted, updated the test image: https://kubernetes.io/blog/2023/03/10/image-registry-redirect/ * Relaxed the security to run minikube from /tmp (in future, we should set the default to /usr/local/bin) * Updated the microk8s check-distro task for Noble Change-Id: I3b0cbac5c72c31577797ba294de8b8c025f8c2c3
59 lines
1.3 KiB
YAML
59 lines
1.3 KiB
YAML
- name: Check distro
|
|
assert:
|
|
that: ansible_distribution_release in ['jammy', 'bookworm', 'noble']
|
|
msg: 'This role is only supported on Jammy or Bookworm or Noble'
|
|
|
|
- name: Install snapd
|
|
become: yes
|
|
package:
|
|
name: snapd
|
|
state: present
|
|
|
|
- name: Install microk8s snap
|
|
become: yes
|
|
command: 'snap install microk8s --classic --channel={{ ensure_kubernetes_microk8s_channel }}'
|
|
|
|
- name: Install add-ons
|
|
become: yes
|
|
command: '/snap/bin/microk8s enable {{ ensure_kubernetes_microk8s_addons | join(" ") }}'
|
|
|
|
- name: Install kubectl wrapper
|
|
become: yes
|
|
copy:
|
|
content: |
|
|
#!/bin/bash
|
|
/snap/bin/microk8s.kubectl "$@"
|
|
dest: /usr/local/bin/kubectl
|
|
owner: root
|
|
group: root
|
|
mode: 0755
|
|
|
|
- name: Allow zuul user kubectl access
|
|
become: yes
|
|
user:
|
|
name: 'zuul'
|
|
groups: 'microk8s'
|
|
append: yes
|
|
|
|
- name: Create .kube directory
|
|
file:
|
|
path: "{{ ansible_user_dir }}/.kube"
|
|
state: directory
|
|
mode: 0755
|
|
|
|
- name: Populate kube config
|
|
become: yes
|
|
shell: /snap/bin/microk8s config > {{ ansible_user_dir }}/.kube/config
|
|
|
|
- name: Ensure we can read config
|
|
become: yes
|
|
file:
|
|
path: "{{ ansible_user_dir }}/.kube/config"
|
|
owner: zuul
|
|
group: zuul
|
|
state: touch
|
|
mode: 0644
|
|
|
|
- name: Reset connection to pickup group
|
|
meta: reset_connection
|