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

kind: use podman and up to date versions #1636

Merged
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
8 changes: 5 additions & 3 deletions playbooks/ansible-cloud/k8s/pre.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
path: "{{ ansible_user_dir }}/zuul-output/logs/controller"
state: directory

- name: Run ensure-docker role
include_role:
name: ensure-docker
- name: Install podman
package:
name: podman
state: present
become: true

- name: Run ensure-virtualenv role
include_role:
Expand Down
4 changes: 2 additions & 2 deletions roles/setup-kind/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
executable_dir: "/usr/local/bin/"

kind_release: "v0.11.0"
kind_release: "v0.15.0"
kind_path: '{{ executable_dir + "kind" }}'

kubectl_release: "v1.18.0"
kubectl_release: "v1.25.2"
kubectl_path: '{{ executable_dir + "kubectl" }}'
27 changes: 26 additions & 1 deletion roles/setup-kind/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,30 @@
- "{{ kind_path }}"
- "{{ kubectl_path }}"

- copy:
content: |
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
apiServerAddress: {{ ansible_host }}
apiServerPort: 6443
dest: /tmp/kind.yaml

- command: cat /tmp/kind.yaml

- name: Ensure IPv6 is enabled
# See: https://github.com/containers/podman/issues/15395
sysctl:
name: net.ipv6.conf.all.disable_ipv6
value: '0'
state: present
sysctl_set: true
reload: true
become: true

- name: Create cluster
shell: "{{ kind_path }} create cluster"
shell: |
sudo {{ kind_path }} create cluster --config /tmp/kind.yaml
mkdir ~/.kube
sudo kind get kubeconfig |grep -v 'enabling experimental podman provider' > ~/.kube/config
ignore_errors: true