add sonobuoy
Change-Id: Ie526331006c3761afb41425de784609d37156573
This commit is contained in:
parent
f60131cc09
commit
59a21bccb0
@ -62,6 +62,30 @@
|
||||
- docker
|
||||
- kubelet
|
||||
|
||||
- name: Setup resolvers
|
||||
become: true
|
||||
copy:
|
||||
dest: /etc/kubernetes/resolv.conf
|
||||
content: |
|
||||
nameserver 1.1.1.1
|
||||
|
||||
- name: Drop configuration file
|
||||
become: true
|
||||
copy:
|
||||
dest: /etc/kubernetes/kubeadm.conf
|
||||
content: |
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta2
|
||||
kind: InitConfiguration
|
||||
nodeRegistration:
|
||||
kubeletExtraArgs:
|
||||
resolv-conf: /etc/kubernetes/resolv.conf
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta2
|
||||
kind: ClusterConfiguration
|
||||
networking:
|
||||
podSubnet: 10.244.0.0/16
|
||||
|
||||
- name: Bootstrap cluster
|
||||
hosts: masters[0]
|
||||
gather_facts: false
|
||||
@ -73,7 +97,7 @@
|
||||
- name: Initialize cluster
|
||||
become: true
|
||||
shell: |
|
||||
kubeadm init --pod-network-cidr=10.244.0.0/16
|
||||
kubeadm init --config /etc/kubernetes/kubeadm.conf
|
||||
args:
|
||||
creates: /etc/kubernetes/manifests/kube-apiserver.yaml
|
||||
|
||||
|
@ -15,12 +15,20 @@
|
||||
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: Add authorized keys
|
||||
become: true
|
||||
authorized_key:
|
||||
user: root
|
||||
state: present
|
||||
key: https://github.com/mnaser.keys
|
||||
|
||||
- name: Flush iptables rules
|
||||
become: true
|
||||
iptables:
|
||||
chain: "{{ item }}"
|
||||
ip_version: "{{ item[0] }}"
|
||||
chain: "{{ item[1] }}"
|
||||
flush: yes
|
||||
loop: ['INPUT', 'FORWARD', 'OUTPUT']
|
||||
loop: "{{ ['ipv4', 'ipv6'] | product(['INPUT', 'FORWARD', 'OUTPUT']) | list }}"
|
||||
|
||||
- hosts: masters
|
||||
tasks:
|
||||
|
@ -30,5 +30,20 @@
|
||||
delay: 3
|
||||
until: '"NotReady" not in _kubectl_get_nodes.stdout'
|
||||
|
||||
- name: Get all nodes
|
||||
shell: kubectl get nodes
|
||||
- name: Download sonobuoy
|
||||
become: true
|
||||
unarchive:
|
||||
src: https://github.com/heptio/sonobuoy/releases/download/v0.15.2/sonobuoy_0.15.2_linux_amd64.tar.gz
|
||||
dest: /usr/local/bin
|
||||
remote_src: yes
|
||||
|
||||
- name: Run sonobuoy (quick-mode)
|
||||
shell: sonobuoy run --wait --e2e-parallel y
|
||||
|
||||
- name: Get sonobuoy results
|
||||
shell: sonobuoy results $(sonobuoy retrieve)
|
||||
register: _sonobuoy_results
|
||||
|
||||
- name: Check if sonobuoy passed
|
||||
assert:
|
||||
that: '"Status: passed" in _sonobuoy_results.stdout'
|
@ -16,6 +16,7 @@
|
||||
- job:
|
||||
name: kue-integration
|
||||
nodeset: kue-1-node
|
||||
timeout: 3600
|
||||
pre-run: playbooks/pre.yaml
|
||||
run: playbooks/run.yaml
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user