install-kubernetes: add sanity check for crio

Change-Id: I1b9e6c7baac4fdf8cd053e1661b09e47e4dda1c4
This commit is contained in:
Tristan Cacqueray 2019-10-16 18:39:40 +00:00 committed by Andreas Jaeger
parent 03e42f874b
commit 25949ea416
2 changed files with 27 additions and 2 deletions

View File

@ -7,3 +7,28 @@
- '1.1.1.1'
- '8.8.8.8'
kubernetes_runtime: cri-o
post_tasks:
- name: Check crio version
command: crictl version
become: yes
failed_when: false
- name: Create a test pod definition
copy:
dest: test-pod.yaml
content: |
apiVersion: v1
kind: Pod
metadata:
name: test
spec:
restartPolicy: Never
containers:
- name: test
image: k8s.gcr.io/pause:3.1
- name: Start pod
command: kubectl apply -f test-pod.yaml
- name: Check status
shell: sleep 5; kubectl get pods

View File

@ -36,7 +36,7 @@
files:
- roles/install-docker/.*
- roles/install-kubernetes/.*
- test-playbooks/install-kubernetes.yaml
- test-playbooks/install-kubernetes/.*
run: test-playbooks/install-kubernetes/docker.yaml
post-run: test-playbooks/install-kubernetes/post.yaml
@ -51,7 +51,7 @@
files:
- roles/install-docker/.*
- roles/install-kubernetes/.*
- test-playbooks/install-kubernetes.yaml
- test-playbooks/install-kubernetes/.*
run: test-playbooks/install-kubernetes/crio.yaml
post-run: test-playbooks/install-kubernetes/post.yaml