Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/kubernetes-sigs/kubespray:
  Add support for k8s v1.14.6 (kubernetes-sigs#5182)
  Parameterize gcr, quay, and docker image repo defines (kubernetes-sigs#5146)
  use hyperkubeimage to run controlplane containers (kubernetes-sigs#5178)
  Update main.yml (kubernetes-sigs#5166)
  Fixes issue kubernetes-sigs#5160 (kubernetes-sigs#5171)
  Use more native way to update kubeconfigs using kubeadm (kubernetes-sigs#5165)
  Fix macro on local_volume_provisioner (kubernetes-sigs#5168)
  Move cri_socket var to kubespray-defaults (kubernetes-sigs#5149)
  Add support for k8s v1.16.0-beta.2 (kubernetes-sigs#5148)
  Fix ansible task titles (kubernetes-sigs#5154)
  Adjust endpoints for kube-proxy,controller,scheduler to proper ip (kubernetes-sigs#5150)
  Documenting Terraform variable `az_list` explicitly (kubernetes-sigs#5132)
  Make haproxy/nginx client timeout configurable (kubernetes-sigs#5140)
  print hostnames (kubernetes-sigs#5110)
  Cleanup: fix typo in doc (kubernetes-sigs#5105)
  Use python3-libselinux on RHEL8/Centos8 (kubernetes-sigs#5127)
  • Loading branch information
erulabs committed Sep 18, 2019
2 parents 73cd912 + a3f1ce2 commit b51fc4e
Show file tree
Hide file tree
Showing 53 changed files with 245 additions and 137 deletions.
8 changes: 7 additions & 1 deletion contrib/inventory_builder/inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
ROLES = ['all', 'kube-master', 'kube-node', 'etcd', 'k8s-cluster',
'calico-rr']
PROTECTED_NAMES = ROLES
AVAILABLE_COMMANDS = ['help', 'print_cfg', 'print_ips', 'load']
AVAILABLE_COMMANDS = ['help', 'print_cfg', 'print_ips', 'print_hostnames', 'load']
_boolean_states = {'1': True, 'yes': True, 'true': True, 'on': True,
'0': False, 'no': False, 'false': False, 'off': False}
yaml = YAML()
Expand Down Expand Up @@ -348,6 +348,8 @@ def parse_command(self, command, args=None):
self.print_config()
elif command == 'print_ips':
self.print_ips()
elif command == 'print_hostnames':
self.print_hostnames()
elif command == 'load':
self.load_file(args)
else:
Expand All @@ -361,6 +363,7 @@ def show_help(self):
help - Display this message
print_cfg - Write inventory file to stdout
print_ips - Write a space-delimited list of IPs from "all" group
print_hostnames - Write a space-delimited list of Hostnames from "all" group
Advanced usage:
Add another host after initial creation: inventory.py 10.10.1.5
Expand All @@ -381,6 +384,9 @@ def show_help(self):
def print_config(self):
yaml.dump(self.yaml_config, sys.stdout)

def print_hostnames(self):
print(' '.join(self.yaml_config['all']['hosts'].keys()))

def print_ips(self):
ips = []
for host, opts in self.yaml_config['all']['hosts'].items():
Expand Down
4 changes: 2 additions & 2 deletions contrib/metallb/roles/provision/templates/metallb.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ roleRef:
kind: Role
name: config-watcher
---
apiVersion: apps/v1beta2
apiVersion: apps/v1
kind: DaemonSet
metadata:
namespace: metallb-system
Expand Down Expand Up @@ -169,7 +169,7 @@ spec:
- net_raw

---
apiVersion: apps/v1beta2
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: metallb-system
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"kind": "DaemonSet",
"apiVersion": "extensions/v1beta1",
"apiVersion": "apps/v1",
"metadata": {
"name": "glusterfs",
"labels": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"apiVersion": "apps/v1",
"metadata": {
"name": "deploy-heketi",
"labels": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"apiVersion": "apps/v1",
"metadata": {
"name": "heketi",
"labels": {
Expand Down
1 change: 1 addition & 0 deletions contrib/terraform/openstack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ For your cluster, edit `inventory/$CLUSTER/cluster.tfvars`.
|Variable | Description |
|---------|-------------|
|`cluster_name` | All OpenStack resources will use the Terraform variable`cluster_name` (default`example`) in their name to make it easier to track. For example the first compute resource will be named`example-kubernetes-1`. |
|`az_list` | List of Availability Zones available in your OpenStack cluster. |
|`network_name` | The name to be given to the internal network that will be generated |
|`network_dns_domain` | (Optional) The dns_domain for the internal network that will be generated |
|`dns_nameservers`| An array of DNS name server names to be used by hosts in the internal subnet. |
Expand Down
3 changes: 3 additions & 0 deletions contrib/terraform/openstack/sample-inventory/cluster.tfvars
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# your Kubernetes cluster name here
cluster_name = "i-didnt-read-the-docs"

# list of availability zones available in your OpenStack cluster
#az_list = ["nova"]

# SSH key to use for access to nodes
public_key_path = "~/.ssh/id_rsa.pub"

Expand Down
4 changes: 2 additions & 2 deletions docs/vagrant.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Introduction

Assuming you have Vagrant 2.0+ installed with virtualbox, libvirt/qemu or vmware, but is untested) you should be able to launch a 3 node Kubernetes cluster by simply running `vagrant up`. This will spin up 3 VMs and install kubernetes on them. Once they are completed you can connect to any of them by running `vagrant ssh k8s-[1..3]`.

To give an estimate of the expected duration of a provisioning run: On a dual core i5-6300u laptop with an SSD, provisioning takes around 13 to 15 minutes, once the container images and other files are cached. Note that libvirt/qemu is recommended over virtualbox as it is quite a bit faster, especcially during boot-up time.
To give an estimate of the expected duration of a provisioning run: On a dual core i5-6300u laptop with an SSD, provisioning takes around 13 to 15 minutes, once the container images and other files are cached. Note that libvirt/qemu is recommended over virtualbox as it is quite a bit faster, especially during boot-up time.

For proper performance a mimimum of 12GB RAM is recommended. It is possible to run a 3 node cluster on a laptop with 8GB of RAM using the default Vagrantfile, provided you have 8GB zram swap configured and not much more than a browser and a mail client running. If you decide to run on such a machine, then also make sure that any tnpfs devices, that are mounted, are mostly empty and disable any swapfiles mounted on HDD/SSD or you will be in for some serious swap-madness. Things can get a bit sluggish during provisioning, but when that's done, the system will actually be able to perform quite well.
For proper performance a minimum of 12GB RAM is recommended. It is possible to run a 3 node cluster on a laptop with 8GB of RAM using the default Vagrantfile, provided you have 8GB zram swap configured and not much more than a browser and a mail client running. If you decide to run on such a machine, then also make sure that any tmpfs devices, that are mounted, are mostly empty and disable any swapfiles mounted on HDD/SSD or you will be in for some serious swap-madness. Things can get a bit sluggish during provisioning, but when that's done, the system will actually be able to perform quite well.

Customize Vagrant
=================
Expand Down
4 changes: 2 additions & 2 deletions remove-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
- { role: remove-node/pre-remove, tags: pre-remove }

- hosts: "{{ node | default('kube-node') }}"
gather_facts: no
gather_facts: yes
roles:
- { role: kubespray-defaults }
- { role: reset, tags: reset, when: reset_nodes|default(True) }

# Currently cannot remove first master or etcd
- hosts: "{{ node | default('kube-master[1:]:etcd[:1]') }}"
gather_facts: no
gather_facts: yes
roles:
- { role: kubespray-defaults }
- { role: remove-node/post-remove, tags: post-remove }
4 changes: 2 additions & 2 deletions roles/bootstrap-os/tasks/bootstrap-centos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@

# libselinux-python is required on SELinux enabled hosts
# See https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#managed-node-requirements
- name: Install libselinux-python
- name: Install libselinux python package
package:
name: libselinux-python
name: "{{ ( (ansible_facts.distribution_major_version | default(0) | int) < 8) | ternary('libselinux-python','python3-libselinux') }}"
state: present
become: true
when:
Expand Down
Loading

0 comments on commit b51fc4e

Please sign in to comment.