Adding yamllinter to ci steps (#1556)

* Adding yaml linter to ci check

* Minor linting fixes from yamllint

* Changing CI to install python pkgs from requirements.txt

- adding in a secondary requirements.txt for tests
- moving yamllint to tests requirements
This commit is contained in:
Brad Beam 2017-08-24 04:09:52 -05:00 committed by Matthew Mosesohn
parent ecb6dc3679
commit 8b151d12b9
106 changed files with 301 additions and 274 deletions

View file

@ -18,10 +18,7 @@ variables:
# us-west1-a # us-west1-a
before_script: before_script:
- pip install ansible==2.3.0 - pip install -r tests/requirements.txt
- pip install netaddr
- pip install apache-libcloud==0.20.1
- pip install boto==2.9.0
- mkdir -p /.ssh - mkdir -p /.ssh
- cp tests/ansible.cfg . - cp tests/ansible.cfg .
@ -75,10 +72,7 @@ before_script:
- $HOME/.cache - $HOME/.cache
before_script: before_script:
- docker info - docker info
- pip install ansible==2.3.0 - pip install -r tests/requirements.txt
- pip install netaddr
- pip install apache-libcloud==0.20.1
- pip install boto==2.9.0
- mkdir -p /.ssh - mkdir -p /.ssh
- mkdir -p $HOME/.ssh - mkdir -p $HOME/.ssh
- echo $PRIVATE_KEY | base64 -d > $HOME/.ssh/id_rsa - echo $PRIVATE_KEY | base64 -d > $HOME/.ssh/id_rsa
@ -642,6 +636,13 @@ syntax-check:
- ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root extra_playbooks/upgrade-only-k8s.yml -vvv --syntax-check - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root extra_playbooks/upgrade-only-k8s.yml -vvv --syntax-check
except: ['triggers', 'master'] except: ['triggers', 'master']
yamllint:
<<: *job
stage: unit-tests
script:
- yamllint roles
except: ['triggers', 'master']
tox-inventory-builder: tox-inventory-builder:
stage: unit-tests stage: unit-tests
<<: *job <<: *job

16
.yamllint Normal file
View file

@ -0,0 +1,16 @@
---
extends: default
rules:
braces:
min-spaces-inside: 0
max-spaces-inside: 1
brackets:
min-spaces-inside: 0
max-spaces-inside: 1
indentation:
spaces: 2
indent-sequences: consistent
line-length: disable
new-line-at-end-of-file: disable
truthy: disable

View file

@ -49,4 +49,3 @@
pip: pip:
name: "{{ item }}" name: "{{ item }}"
with_items: "{{pip_python_modules}}" with_items: "{{pip_python_modules}}"

View file

@ -27,4 +27,3 @@
hostname: hostname:
name: "{{inventory_hostname}}" name: "{{inventory_hostname}}"
when: ansible_hostname == 'localhost' when: ansible_hostname == 'localhost'

View file

@ -6,4 +6,3 @@
regexp: '^\w+\s+requiretty' regexp: '^\w+\s+requiretty'
dest: /etc/sudoers dest: /etc/sudoers
state: absent state: absent

View file

@ -86,4 +86,3 @@
port: 53 port: 53
timeout: 180 timeout: 180
when: inventory_hostname == groups['kube-node'][0] and groups['kube-node'][0] in ansible_play_hosts when: inventory_hostname == groups['kube-node'][0] and groups['kube-node'][0] in ansible_play_hosts

View file

@ -1,3 +1,4 @@
---
# Copyright 2016 The Kubernetes Authors. # Copyright 2016 The Kubernetes Authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
@ -47,4 +48,3 @@ spec:
- --default-params={"linear":{"nodesPerReplica":{{ dnsmasq_nodes_per_replica }},"preventSinglePointFailure":true}} - --default-params={"linear":{"nodesPerReplica":{{ dnsmasq_nodes_per_replica }},"preventSinglePointFailure":true}}
- --logtostderr=true - --logtostderr=true
- --v={{ kube_log_level }} - --v={{ kube_log_level }}

View file

@ -35,7 +35,6 @@ spec:
capabilities: capabilities:
add: add:
- NET_ADMIN - NET_ADMIN
imagePullPolicy: IfNotPresent
resources: resources:
limits: limits:
cpu: {{ dns_cpu_limit }} cpu: {{ dns_cpu_limit }}
@ -64,4 +63,3 @@ spec:
hostPath: hostPath:
path: /etc/dnsmasq.d-available path: /etc/dnsmasq.d-available
dnsPolicy: Default # Don't use cluster DNS. dnsPolicy: Default # Don't use cluster DNS.

View file

@ -1,3 +1,4 @@
---
docker_version: '1.13' docker_version: '1.13'
docker_package_info: docker_package_info:

View file

@ -1,3 +1,4 @@
---
docker_kernel_min_version: '3.10' docker_kernel_min_version: '3.10'
# https://apt.dockerproject.org/repo/dists/debian-wheezy/main/filelist # https://apt.dockerproject.org/repo/dists/debian-wheezy/main/filelist

View file

@ -1,3 +1,4 @@
---
docker_kernel_min_version: '0' docker_kernel_min_version: '0'
# versioning: docker-io itself is pinned at docker 1.5 # versioning: docker-io itself is pinned at docker 1.5

View file

@ -1,3 +1,4 @@
---
docker_kernel_min_version: '0' docker_kernel_min_version: '0'
# https://docs.docker.com/engine/installation/linux/fedora/#install-from-a-package # https://docs.docker.com/engine/installation/linux/fedora/#install-from-a-package

View file

@ -1,3 +1,4 @@
---
docker_kernel_min_version: '0' docker_kernel_min_version: '0'
# https://yum.dockerproject.org/repo/main/centos/7/Packages/ # https://yum.dockerproject.org/repo/main/centos/7/Packages/

View file

@ -43,4 +43,3 @@
ETCDCTL_API: 3 ETCDCTL_API: 3
retries: 3 retries: 3
delay: "{{ retry_stagger | random + 3 }}" delay: "{{ retry_stagger | random + 3 }}"

View file

@ -30,4 +30,3 @@
- name: set etcd_secret_changed - name: set etcd_secret_changed
set_fact: set_fact:
etcd_secret_changed: true etcd_secret_changed: true

View file

@ -66,4 +66,3 @@
{%- set _ = certs.update({'sync': True}) -%} {%- set _ = certs.update({'sync': True}) -%}
{% endif %} {% endif %}
{{ certs.sync }} {{ certs.sync }}

View file

@ -76,8 +76,7 @@
'admin-{{ inventory_hostname }}.pem', 'admin-{{ inventory_hostname }}.pem',
'admin-{{ inventory_hostname }}-key.pem', 'admin-{{ inventory_hostname }}-key.pem',
'member-{{ inventory_hostname }}.pem', 'member-{{ inventory_hostname }}.pem',
'member-{{ inventory_hostname }}-key.pem' 'member-{{ inventory_hostname }}-key.pem']
]
all_node_certs: "['ca.pem', all_node_certs: "['ca.pem',
{% for node in (groups['k8s-cluster'] + groups['calico-rr']|default([]))|unique %} {% for node in (groups['k8s-cluster'] + groups['calico-rr']|default([]))|unique %}
'node-{{ node }}.pem', 'node-{{ node }}.pem',

View file

@ -7,7 +7,6 @@
when: inventory_hostname in etcd_node_cert_hosts when: inventory_hostname in etcd_node_cert_hosts
tags: etcd-secrets tags: etcd-secrets
- name: gen_certs_vault | Read in the local credentials - name: gen_certs_vault | Read in the local credentials
command: cat /etc/vault/roles/etcd/userpass command: cat /etc/vault/roles/etcd/userpass
register: etcd_vault_creds_cat register: etcd_vault_creds_cat
@ -96,5 +95,3 @@
with_items: "{{ etcd_node_certs_needed|d([]) }}" with_items: "{{ etcd_node_certs_needed|d([]) }}"
when: inventory_hostname in etcd_node_cert_hosts when: inventory_hostname in etcd_node_cert_hosts
notify: set etcd_secret_changed notify: set etcd_secret_changed

View file

@ -1,3 +1,4 @@
---
- name: "Pre-upgrade | check for etcd-proxy unit file" - name: "Pre-upgrade | check for etcd-proxy unit file"
stat: stat:
path: /etc/systemd/system/etcd-proxy.service path: /etc/systemd/system/etcd-proxy.service

View file

@ -1,7 +1,7 @@
--- ---
- name: Refresh config | Create etcd config file - name: Refresh config | Create etcd config file
template: template:
src: etcd.env.yml src: etcd.env.j2
dest: /etc/etcd.env dest: /etc/etcd.env
notify: restart etcd notify: restart etcd
when: is_etcd_master when: is_etcd_master

View file

@ -1,5 +1,4 @@
--- ---
elrepo_key_url: 'https://www.elrepo.org/RPM-GPG-KEY-elrepo.org' elrepo_key_url: 'https://www.elrepo.org/RPM-GPG-KEY-elrepo.org'
elrepo_rpm: elrepo-release-7.0-3.el7.elrepo.noarch.rpm elrepo_rpm: elrepo-release-7.0-3.el7.elrepo.noarch.rpm
elrepo_mirror: http://www.elrepo.org elrepo_mirror: http://www.elrepo.org

View file

@ -1,3 +1,4 @@
---
# Versions # Versions
kubedns_version: 1.14.2 kubedns_version: 1.14.2
kubednsautoscaler_version: 1.1.1 kubednsautoscaler_version: 1.1.1

View file

@ -14,12 +14,12 @@
dest: "{{kube_config_dir}}/{{item.file}}" dest: "{{kube_config_dir}}/{{item.file}}"
with_items: with_items:
- {name: kubedns, file: kubedns-sa.yml, type: sa} - {name: kubedns, file: kubedns-sa.yml, type: sa}
- {name: kubedns, file: kubedns-deploy.yml, type: deployment} - {name: kubedns, file: kubedns-deploy.yml.j2, type: deployment}
- {name: kubedns, file: kubedns-svc.yml, type: svc} - {name: kubedns, file: kubedns-svc.yml, type: svc}
- {name: kubedns-autoscaler, file: kubedns-autoscaler-sa.yml, type: sa} - {name: kubedns-autoscaler, file: kubedns-autoscaler-sa.yml, type: sa}
- {name: kubedns-autoscaler, file: kubedns-autoscaler-clusterrole.yml, type: clusterrole} - {name: kubedns-autoscaler, file: kubedns-autoscaler-clusterrole.yml, type: clusterrole}
- {name: kubedns-autoscaler, file: kubedns-autoscaler-clusterrolebinding.yml, type: clusterrolebinding} - {name: kubedns-autoscaler, file: kubedns-autoscaler-clusterrolebinding.yml, type: clusterrolebinding}
- {name: kubedns-autoscaler, file: kubedns-autoscaler.yml, type: deployment} - {name: kubedns-autoscaler, file: kubedns-autoscaler.yml.j2, type: deployment}
register: manifests register: manifests
when: when:
- dns_mode != 'none' and inventory_hostname == groups['kube-master'][0] - dns_mode != 'none' and inventory_hostname == groups['kube-master'][0]

View file

@ -1,3 +1,4 @@
---
- name: Kubernetes Apps | Lay Down Netchecker Template - name: Kubernetes Apps | Lay Down Netchecker Template
template: template:
src: "{{item.file}}" src: "{{item.file}}"

View file

@ -1,3 +1,4 @@
---
# Copyright 2016 The Kubernetes Authors. All rights reserved # Copyright 2016 The Kubernetes Authors. All rights reserved
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");

View file

@ -1,3 +1,4 @@
---
# Copyright 2016 The Kubernetes Authors. All rights reserved # Copyright 2016 The Kubernetes Authors. All rights reserved
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");

View file

@ -1,3 +1,4 @@
---
# Copyright 2016 The Kubernetes Authors. All rights reserved # Copyright 2016 The Kubernetes Authors. All rights reserved
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");

View file

@ -1,3 +1,4 @@
---
# Copyright 2016 The Kubernetes Authors. # Copyright 2016 The Kubernetes Authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");

View file

@ -1,3 +1,4 @@
---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:

View file

@ -1,3 +1,4 @@
---
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:

View file

@ -1,3 +1,4 @@
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -19,4 +20,3 @@ spec:
- name: dns-tcp - name: dns-tcp
port: 53 port: 53
protocol: TCP protocol: TCP

View file

@ -1,3 +1,4 @@
---
dependencies: dependencies:
- role: download - role: download
file: "{{ downloads.elasticsearch }}" file: "{{ downloads.elasticsearch }}"

View file

@ -38,4 +38,3 @@
command: "{{ bin_dir }}/kubectl apply -f {{ kube_config_dir }}/elasticsearch-service.yaml -n {{ system_namespace }}" command: "{{ bin_dir }}/kubectl apply -f {{ kube_config_dir }}/elasticsearch-service.yaml -n {{ system_namespace }}"
run_once: true run_once: true
when: es_service_manifest.changed when: es_service_manifest.changed

View file

@ -1,3 +1,4 @@
---
kind: ClusterRoleBinding kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1beta1
metadata: metadata:

View file

@ -1,3 +1,4 @@
---
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:

View file

@ -1,3 +1,4 @@
---
dependencies: dependencies:
- role: download - role: download
file: "{{ downloads.fluentd }}" file: "{{ downloads.fluentd }}"

View file

@ -20,4 +20,3 @@
command: "{{ bin_dir }}/kubectl apply -f {{ kube_config_dir }}/fluentd-ds.yaml -n {{ system_namespace }}" command: "{{ bin_dir }}/kubectl apply -f {{ kube_config_dir }}/fluentd-ds.yaml -n {{ system_namespace }}"
run_once: true run_once: true
when: fluentd_ds_manifest.changed when: fluentd_ds_manifest.changed

View file

@ -1,3 +1,4 @@
---
dependencies: dependencies:
- role: download - role: download
file: "{{ downloads.kibana }}" file: "{{ downloads.kibana }}"

View file

@ -1,3 +1,4 @@
---
dependencies: dependencies:
- role: kubernetes-apps/efk/elasticsearch - role: kubernetes-apps/efk/elasticsearch
- role: kubernetes-apps/efk/fluentd - role: kubernetes-apps/efk/fluentd

View file

@ -1,3 +1,4 @@
---
helm_enabled: false helm_enabled: false
# specify a dir and attach it to helm for HELM_HOME. # specify a dir and attach it to helm for HELM_HOME.

View file

@ -1,3 +1,4 @@
---
dependencies: dependencies:
- role: download - role: download
file: "{{ downloads.helm }}" file: "{{ downloads.helm }}"

View file

@ -1,3 +1,4 @@
---
kind: ClusterRoleBinding kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1beta1
metadata: metadata:

View file

@ -1,3 +1,4 @@
---
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:

View file

@ -1,3 +1,4 @@
---
dependencies: dependencies:
- role: download - role: download
file: "{{ downloads.netcheck_server }}" file: "{{ downloads.netcheck_server }}"

View file

@ -1,3 +1,4 @@
---
- name: Create canal ConfigMap - name: Create canal ConfigMap
run_once: true run_once: true
kube: kube:
@ -29,4 +30,3 @@
namespace: "{{system_namespace}}" namespace: "{{system_namespace}}"
state: "{{ item | ternary('latest','present') }}" state: "{{ item | ternary('latest','present') }}"
with_items: "{{ canal_node_manifest.changed }}" with_items: "{{ canal_node_manifest.changed }}"

View file

@ -1,3 +1,4 @@
---
# FIXME: remove if kubernetes/features#124 is implemented # FIXME: remove if kubernetes/features#124 is implemented
- name: Weave | Purge old weave daemonset - name: Weave | Purge old weave daemonset
kube: kube:
@ -9,7 +10,6 @@
state: absent state: absent
when: inventory_hostname == groups['kube-master'][0] and weave_manifest.changed when: inventory_hostname == groups['kube-master'][0] and weave_manifest.changed
- name: Weave | Start Resources - name: Weave | Start Resources
kube: kube:
name: "weave-net" name: "weave-net"
@ -21,7 +21,6 @@
with_items: "{{ weave_manifest.changed }}" with_items: "{{ weave_manifest.changed }}"
when: inventory_hostname == groups['kube-master'][0] when: inventory_hostname == groups['kube-master'][0]
- name: "Weave | wait for weave to become available" - name: "Weave | wait for weave to become available"
uri: uri:
url: http://127.0.0.1:6784/status url: http://127.0.0.1:6784/status

View file

@ -1,3 +1,4 @@
---
# Limits for calico apps # Limits for calico apps
calico_policy_controller_cpu_limit: 100m calico_policy_controller_cpu_limit: 100m
calico_policy_controller_memory_limit: 256M calico_policy_controller_memory_limit: 256M

View file

@ -1,3 +1,4 @@
---
- set_fact: - set_fact:
calico_cert_dir: "{{ canal_cert_dir }}" calico_cert_dir: "{{ canal_cert_dir }}"
when: kube_network_plugin == 'canal' when: kube_network_plugin == 'canal'

View file

@ -1,3 +1,4 @@
---
# An experimental dev/test only dynamic volumes provisioner, # An experimental dev/test only dynamic volumes provisioner,
# for PetSets. Works for kube>=v1.3 only. # for PetSets. Works for kube>=v1.3 only.
kube_hostpath_dynamic_provisioner: "false" kube_hostpath_dynamic_provisioner: "false"

View file

@ -88,4 +88,3 @@
- include: post-upgrade.yml - include: post-upgrade.yml
tags: k8s-post-upgrade tags: k8s-post-upgrade

View file

@ -1,3 +1,4 @@
---
# Valid options: docker (default), rkt, or host # Valid options: docker (default), rkt, or host
kubelet_deployment_type: host kubelet_deployment_type: host

View file

@ -21,4 +21,3 @@
dest: "/etc/systemd/system/kubelet.service" dest: "/etc/systemd/system/kubelet.service"
backup: "yes" backup: "yes"
notify: restart kubelet notify: restart kubelet

View file

@ -30,4 +30,3 @@
dest: /etc/systemd/system/kubelet.service.d/http-proxy.conf dest: /etc/systemd/system/kubelet.service.d/http-proxy.conf
when: http_proxy is defined or https_proxy is defined or no_proxy is defined when: http_proxy is defined or https_proxy is defined or no_proxy is defined
notify: restart kubelet notify: restart kubelet

View file

@ -1,3 +1,4 @@
---
- name: Preinstall | restart network - name: Preinstall | restart network
command: /bin/true command: /bin/true
notify: notify:

View file

@ -48,5 +48,3 @@
fail: fail:
msg: "azure_route_table_name is missing" msg: "azure_route_table_name is missing"
when: azure_route_table_name is not defined or azure_route_table_name == "" when: azure_route_table_name is not defined or azure_route_table_name == ""

View file

@ -1,3 +1,4 @@
---
- name: check vsphere environment variables - name: check vsphere environment variables
fail: fail:
msg: "{{ item.name }} is missing" msg: "{{ item.name }} is missing"

View file

@ -1,3 +1,4 @@
---
required_pkgs: required_pkgs:
- libselinux-python - libselinux-python
- device-mapper-libs - device-mapper-libs

View file

@ -1,3 +1,4 @@
---
required_pkgs: required_pkgs:
- python-apt - python-apt
- aufs-tools - aufs-tools

View file

@ -1,3 +1,4 @@
---
required_pkgs: required_pkgs:
- libselinux-python - libselinux-python
- device-mapper-libs - device-mapper-libs

View file

@ -1,3 +1,4 @@
---
required_pkgs: required_pkgs:
- libselinux-python - libselinux-python
- device-mapper-libs - device-mapper-libs

View file

@ -105,4 +105,3 @@
{%- set _ = certs.update({'sync': True}) -%} {%- set _ = certs.update({'sync': True}) -%}
{% endif %} {% endif %}
{{ certs.sync }} {{ certs.sync }}

View file

@ -74,8 +74,7 @@
'kube-scheduler.pem', 'kube-scheduler.pem',
'kube-scheduler-key.pem', 'kube-scheduler-key.pem',
'kube-controller-manager.pem', 'kube-controller-manager.pem',
'kube-controller-manager-key.pem', 'kube-controller-manager-key.pem']
]
all_node_certs: "['ca.pem', all_node_certs: "['ca.pem',
{% for node in groups['k8s-cluster'] %} {% for node in groups['k8s-cluster'] %}
'node-{{ node }}.pem', 'node-{{ node }}.pem',
@ -87,8 +86,7 @@
'node-{{ inventory_hostname }}.pem', 'node-{{ inventory_hostname }}.pem',
'node-{{ inventory_hostname }}-key.pem', 'node-{{ inventory_hostname }}-key.pem',
'kube-proxy-{{ inventory_hostname }}.pem', 'kube-proxy-{{ inventory_hostname }}.pem',
'kube-proxy-{{ inventory_hostname }}-key.pem', 'kube-proxy-{{ inventory_hostname }}-key.pem']
]
tags: facts tags: facts
- name: Gen_certs | Gather master certs - name: Gen_certs | Gather master certs
@ -195,4 +193,3 @@
- name: Gen_certs | update ca-certificates (RedHat) - name: Gen_certs | update ca-certificates (RedHat)
command: update-ca-trust extract command: update-ca-trust extract
when: kube_ca_cert.changed and ansible_os_family == "RedHat" when: kube_ca_cert.changed and ansible_os_family == "RedHat"

View file

@ -1,3 +1,4 @@
---
## Required for bootstrap-os/preinstall/download roles and setting facts ## Required for bootstrap-os/preinstall/download roles and setting facts
# Valid bootstrap options (required): ubuntu, coreos, centos, none # Valid bootstrap options (required): ubuntu, coreos, centos, none
bootstrap_os: none bootstrap_os: none
@ -88,8 +89,10 @@ kube_network_node_prefix: 24
# The port the API Server will be listening on. # The port the API Server will be listening on.
kube_apiserver_ip: "{{ kube_service_addresses|ipaddr('net')|ipaddr(1)|ipaddr('address') }}" kube_apiserver_ip: "{{ kube_service_addresses|ipaddr('net')|ipaddr(1)|ipaddr('address') }}"
kube_apiserver_port: 6443 # (https) # https
kube_apiserver_insecure_port: 8080 # (http) kube_apiserver_port: 6443
# http
kube_apiserver_insecure_port: 8080
# Path used to store Docker data # Path used to store Docker data
docker_daemon_graph: "/var/lib/docker" docker_daemon_graph: "/var/lib/docker"

View file

@ -1,3 +1,4 @@
---
- name: Configure defaults - name: Configure defaults
debug: debug:
msg: "Check roles/kubespray-defaults/defaults/main.yml" msg: "Check roles/kubespray-defaults/defaults/main.yml"

View file

@ -1,3 +1,4 @@
---
dependencies: dependencies:
- role: etcd - role: etcd
- role: docker - role: docker

View file

@ -1,3 +1,4 @@
---
# The interface used by canal for host <-> host communication. # The interface used by canal for host <-> host communication.
# If left blank, then the interface is chosing using the node's # If left blank, then the interface is chosing using the node's
# default route. # default route.
@ -30,4 +31,3 @@ calicoctl_memory_limit: 170M
calicoctl_cpu_limit: 100m calicoctl_cpu_limit: 100m
calicoctl_memory_requests: 32M calicoctl_memory_requests: 32M
calicoctl_cpu_requests: 25m calicoctl_cpu_requests: 25m

View file

@ -14,4 +14,3 @@
owner: kube owner: kube
recurse: true recurse: true
mode: "u=rwX,g-rwx,o-rwx" mode: "u=rwX,g-rwx,o-rwx"

View file

@ -1,3 +1,4 @@
---
- name: Weave pre-upgrade | Stop legacy weave - name: Weave pre-upgrade | Stop legacy weave
command: weave stop command: weave stop
failed_when: false failed_when: false

View file

@ -1,7 +1,5 @@
--- ---
- name: Uncordon node - name: Uncordon node
command: "{{ bin_dir }}/kubectl uncordon {{ inventory_hostname }}" command: "{{ bin_dir }}/kubectl uncordon {{ inventory_hostname }}"
delegate_to: "{{ groups['kube-master'][0] }}" delegate_to: "{{ groups['kube-master'][0] }}"
when: (needs_cordoning|default(false)) and ( {%- if inventory_hostname in groups['kube-node'] -%} true {%- else -%} false {%- endif -%} ) when: (needs_cordoning|default(false)) and ( {%- if inventory_hostname in groups['kube-node'] -%} true {%- else -%} false {%- endif -%} )

View file

@ -1,3 +1,3 @@
---
drain_grace_period: 90 drain_grace_period: 90
drain_timeout: 120s drain_timeout: 120s

View file

@ -1,5 +1,4 @@
--- ---
- include: ../shared/create_role.yml - include: ../shared/create_role.yml
vars: vars:
create_role_name: "{{ item.name }}" create_role_name: "{{ item.name }}"

View file

@ -1,5 +1,4 @@
--- ---
- name: bootstrap/start_vault_temp | Ensure vault-temp isn't already running - name: bootstrap/start_vault_temp | Ensure vault-temp isn't already running
shell: if docker rm -f {{ vault_temp_container_name }} 2>&1 1>/dev/null;then echo true;else echo false;fi shell: if docker rm -f {{ vault_temp_container_name }} 2>&1 1>/dev/null;then echo true;else echo false;fi
register: vault_temp_stop_check register: vault_temp_stop_check

View file

@ -1,5 +1,4 @@
--- ---
- include: ../shared/sync_file.yml - include: ../shared/sync_file.yml
vars: vars:
sync_file: "ca.pem" sync_file: "ca.pem"
@ -29,4 +28,3 @@
- name: bootstrap/sync_vault_certs | Unset sync_file_results after api.pem sync - name: bootstrap/sync_vault_certs | Unset sync_file_results after api.pem sync
set_fact: set_fact:
sync_file_results: [] sync_file_results: []

View file

@ -1,5 +1,4 @@
--- ---
- include: ../shared/check_vault.yml - include: ../shared/check_vault.yml
when: inventory_hostname in groups.vault when: inventory_hostname in groups.vault

View file

@ -1,5 +1,4 @@
--- ---
- name: shared/auth_backend | Test if the auth backend exists - name: shared/auth_backend | Test if the auth backend exists
uri: uri:
url: "{{ vault_leader_url }}/v1/sys/auth/{{ auth_backend_path }}/tune" url: "{{ vault_leader_url }}/v1/sys/auth/{{ auth_backend_path }}/tune"

View file

@ -1,5 +1,4 @@
--- ---
# Stop temporary Vault if it's running (can linger if playbook fails out) # Stop temporary Vault if it's running (can linger if playbook fails out)
- name: stop vault-temp container - name: stop vault-temp container
shell: docker stop {{ vault_temp_container_name }} || rkt stop {{ vault_temp_container_name }} shell: docker stop {{ vault_temp_container_name }} || rkt stop {{ vault_temp_container_name }}

5
tests/requirements.txt Normal file
View file

@ -0,0 +1,5 @@
-r ../requirements.txt
yamllint
apache-libcloud==0.20.1
boto==2.9.0
tox