Commit graph

381 commits

Author SHA1 Message Date
Cristian Klein
fd3ebc13f7
Fix terraform0.13 errors (#7077)
* [terraform/aws] Fix Terraform >=0.13 warnings

Terraform >=0.13 gives the following warning:

```
Warning: Interpolation-only expressions are deprecated
```

The fix was tested as follows:
```
rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate
rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate
rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate
```
which gave no errors nor warnings.

* [terraform/openstack] Fixes for Terraform >=0.13

Terraform >=0.13 gives the following error:
```
Error: Failed to install providers
Could not find required providers, but found possible alternatives:
  hashicorp/openstack -> terraform-provider-openstack/openstack
```

This patch fixes these errors.

This fix was tested as follows:
```
rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate
rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate
rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate
```
which gave no errors nor warnings for Terraform 0.13.5 and Terraform
0.14.3. Unfortunately, 0.12.x gives a harmless warning, but
with 0.14.3 out the door, I guess we need to move on.

* [terraform/packet] Fixes for Terraform >=0.13

This fix was tested as follows:
```
export PACKET_AUTH_TOKEN=blah-blah
rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate
rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate
rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate
```

Errors are gone, but warnings still remain. It is impossible to please
all three versions of Terraform.

* Add tests for Terraform >=0.13
2020-12-23 05:08:26 -08:00
Kenichi Omichi
5b5726bdd4
Improve markdownlint for contrib/network-storage (#7079)
This fixes markdownlint failures under contrib/network-storage and
contrib/vault.
2020-12-23 00:00:26 -08:00
Kenichi Omichi
1347bb2e4b
Improve markdownlint coverage (#7075)
Now markdownlint covers ./README.md and md files under ./docs only.
However we have a lot of md files under different directories also.
This enables markdownlint for other md files also.
2020-12-22 04:44:26 -08:00
Noam
143f9c78be
fix MASSIVE_SCALE_THRESHOLD env paramter (#7054) 2020-12-18 08:50:25 -08:00
Pratik Raj
0982c66051
fix: added boto3 as dependency required by kubespray-aws-inventory.py (#6890)
Added "boto3" as dependency in "requirements.txt" which is required by "kubespray-aws-inventory.py".

Signed-off-by: Pratik raj <rajpratik71@gmail.com>
2020-11-26 15:06:19 -08:00
Hans Feldt
ee23b947aa
fix flake8 errors in Kubespray CI - tox-inventory-builder (#6910)
* fix flake8 errors in Kubespray CI - tox-inventory-builder

* Invalidate CRI-O kubic repo's cache

Signed-off-by: Victor Morales <v.morales@samsung.com>

* add support to configure pkg install retries

and use in CI job tf-ovh_ubuntu18-calico (due to it failing often)

* Switch Calico, Cilium and MetalLB image repos to Quay.io

Co-authored-by: Victor Morales <v.morales@samsung.com>
Co-authored-by: Barry Melbourne <9964974+bmelbourne@users.noreply.github.com>
2020-11-22 23:47:35 -08:00
Sascha Marcel Schmidt
602b5aaf01
add warning about current state of heketi (#6888) 2020-11-13 00:06:23 -08:00
Hugo Blom
1b0326f773
do not apply floating IP's before router port is created (#6887) 2020-11-06 00:16:50 -08:00
Hugo Blom
df7ed24389
[Openstack] Add security groups not managed by terraform (#6865)
* add custom sec groups

* make sure groups are applied only when created

* fix spacing
2020-11-05 05:30:54 -08:00
David Medinets
102fb94524
Notes About Server In admin.conf (#6854)
* Add note about changing private IP in admin.conf.

When I run kubespray, a load balancer is created which should be used instead of the ip of the controller node.

* Procedure to find load balancer and update admin.conf

When I run kubespray, a load balancer is used instead of the private ip of the controller.
2020-10-28 18:30:59 -07:00
rptaylor
07858e8f71
allow pre-existing floating IPs to be specified with k8s_master_fips (#6755)
k8s_master_no_etcd_fips should not be input var
2020-10-11 23:54:47 -07:00
David Medinets
1805e95b69
Change health check from TCP to HTTPS (#6487)
I kept seeing `TLS handshake error from 10.250.250.158:63770: EOF` from two IP addresses that correlate to my ELB. Changing the health check from TCP to HTTPS stopped the errors from being generated.
2020-09-22 00:56:47 -07:00
Florent Monbillard
47194c1fe4
fix incorrect documentation of use_access_ip (#6674)
It was documented as if it were an Ansible variable, but it is a Terraform variable.
This also means the colon syntax was incorrect. TF variables are assigned with an equals sign.

Co-authored-by: rptaylor <rptaylor@uvic.ca>
2020-09-17 02:48:45 -07:00
Barry Melbourne
058438a25d
Remove support for CoreOS Container Linux (#6576) 2020-08-28 02:28:53 -07:00
Hugo Blom
2f8fc92182
make it possible to open additional ports on master nodes (#6547) 2020-08-27 02:07:13 -07:00
Barry Melbourne
8e2bae0f2a
Fix Ansible Lint warnings (No such file or directory) (#6581) 2020-08-26 23:19:10 -07:00
Florian Ruynat
73b2683697
Allow hosts with hyphen in name (#6529) 2020-08-18 00:53:30 -07:00
rptaylor
f2d2d080f6
add master_volume_type variable (#6524) 2020-08-18 00:49:29 -07:00
Maxime Guyot
fb666c44b3
Quoted type constraints are deprecated (#6497) 2020-08-05 01:32:28 -07:00
Maxime Guyot
e70f27dd79
Add noqa and disable .ansible-lint global exclusions (#6410) 2020-07-27 06:24:17 -07:00
Kenichi Omichi
4990eec4a2
Replace Openstack with OpenStack (#6413)
The official word is OpenStack, not Openstack as [1].
This replaces it with OpenStack in the docs.

[1]: https://www.openstack.org/
2020-07-21 23:54:05 -07:00
Kenichi Omichi
25bab0e976
Change MetalLB to one of addons (#6238)
This changes MetalLB contrib to one of addons for deploying MetalLB with
Kubernetes cluster deployment. By the default, Kubespray doesn't deploy
MetalLB addon.
2020-06-29 15:11:59 -07:00
Joel Seguillon
4c1e0b188d
Add .editorconfig file (#6307) 2020-06-29 12:39:59 -07:00
Kenichi Omichi
56f389a9f3
Add USE_REAL_HOSTNAME to inventory.py (#6293)
inventory_builder creates hosts.yaml file with hostnames like "node1",
"node2", etc. Even if specifying override_system_hostname=false, the
output of "kubectl get nodes" shows those hostnames ("node1", etc.)
without using actual hostnames.
To solve this issue, this adds an option USE_REAL_HOSTNAME to get
actual hostnames when creating hosts.yaml file instead of "node1", etc.
2020-06-26 00:03:47 -07:00
Maxime Guyot
c6588856c7
Add Ubuntu 20.04 support and use Python 3 (#6157) 2020-06-16 13:04:05 -07:00
Florian Ruynat
764a851189
Terraform quoted references are now deprecated (#6203) 2020-06-05 00:05:43 -07:00
Kenichi Omichi
249b0a2a80
Allow metallb:speaker to create events (#6147)
Since MetalLB v0.8[1], metallb:speaker has started publishing an event
nodeAssigned on k8s resource.
To support MetalLB v0.8+, this allows metallb:speaker to create events.

[1]: 5cc6e23776 (diff-60053ad6fecb5a3cfabb6f3d9e720899R246)
2020-05-29 04:17:16 -07:00
Kenichi Omichi
fd7829d468
Update MetalLB version (#6139)
If running MetalLB v0.7.3 on k8s v1.18.2, metallb pods output the
following parsing error of v1.ServiceList:

  $ kubectl logs controller-dbb46cf84-fw8h8 -n metallb-system
  {
    "caller":"reflector.go:205",
    "level":"error",
    "msg":"go.universe.tf/metallb/internal/k8s/k8s.go:231:
      Failed to list *v1.Service: v1.ServiceList:
        Items: []v1.Service: v1.Service: ObjectMeta:
        v1.ObjectMeta: readObjectFieldAsBytes:
        expect : after object field, parsing 1605

Then an external IP address is never allocated to the Service of
LoadBalancer type.
By updating MetalLB version to the latest v0.9[1] today, this issue
can be solved.

[1]: https://hub.docker.com/r/metallb/controller/tags
2020-05-27 14:10:03 -07:00
Wang Zhen
d62836f2ab
Replace seccomp profile docker/default with runtime/default (#6170)
Signed-off-by: Wang Zhen <lazybetrayer@gmail.com>
2020-05-27 14:02:02 -07:00
Kenichi Omichi
d8a61b94a9
Update MetalLB README (#6140)
This updates MetalLB README as following
- Remove unnecessary markdown to read it easily on github
- Make words consistency (kubernetes, loadbalancer)
- Add change-required option
2020-05-18 01:17:36 -07:00
Hector S
d3d0360526
Changed state to present instead of installed in glusterfs role for Debian (#6096) 2020-05-12 13:50:30 -07:00
Kenichi Omichi
826b0f384d
Add installation of requirements for Azure (#6076)
Due to lack of requirements installation on Azure README, the error
can happen:

 "The ipaddr filter requires python's netaddr be installed on the
  ansible controller"

It is nice to add the installation for Azure users.
2020-05-12 13:50:23 -07:00
Kenichi Omichi
d414588a47
Azure: Rename apply-rg_2.sh to apply-rg.sh (#6049)
apply-rg.sh was for Azure command version 1("azure" command) and the
command is old and version 2("az" command) is officially used today.
apply-rg_2.sh was for the version 2. In addition, the README[1] says
we need to run apply-rg.sh for applying templates.

This renames apply-rg_2.sh to apply-rg.sh for common usages of the
version 2.

[1]: https://github.com/kubernetes-sigs/kubespray/tree/master/contrib/azurerm#generating-and-applying
2020-05-03 12:42:26 -07:00
Kenichi Omichi
0512c22607
Update contrib/azurerm/README.md (#6057)
The ansible-playbook needs to ssh-login to Azure virtual machines with
ssh keypair, and users need to specify ssh_public_keys for their own
ssh public key. The change of ssh_public_keys is mandatory.
So this updates contrib/azurerm/README.md to explain that.
In addition, the path of all.yml was wrong. That also is updated with
this.
2020-04-30 23:46:12 -07:00
Kenichi Omichi
f0d5a96464
Update deprecated command in azure script (#6056)
apply-rg_2.sh uses 'az group deployment' command but the command is
deprecated like the following warning message:

"This command is implicitly deprecated because command group
 'group deployment' is deprecated and will be removed in a future release.
 Use 'deployment group' instead."

This updates these deprecated commands.

FYI: The command has been deprecated since [1] on azure-cli side.
[1]: 991cb7cc7c (diff-2057bbb8441166e4910b34b09d22b58cR222)
2020-04-30 23:46:06 -07:00
Samuel Liu
d8345c5eae
MetalLB IP address range extension (#6023)
* MetalLB IP address range extension

* MetalLB IP address range extension
2020-04-26 23:55:28 -07:00
Florian Ruynat
ca45d5ffbe
Fix retries keyword missing until instruction (#5989) 2020-04-21 07:20:56 -07:00
qvicksilver
065292f8a4
Terraform/OpenStack: Allow free form worker node definition (#5952)
* Terraform/OpenStack: Allow free form worker node definition

* fixup! Terraform/OpenStack: Allow free form worker node definition
2020-04-16 07:52:45 -07:00
Florian Ruynat
b5125e59ab
update rbac.authorization.k8s.io to non deprecated api-groups (#5517) 2020-04-14 13:14:04 -07:00
Pasquale Toscano
7d6ef61491
Fix metallb speaker when podsecuritypolicy_enabled=true (#5932) (#5933) 2020-04-10 23:48:03 -07:00
qvicksilver
2e67289473
Terraform/OpenStack: Fix idempotency bug in module.network.openstack_networking_router_interface_v2.k8s[0] (#5914) 2020-04-09 02:27:44 -07:00
qvicksilver
0d2990510e
Terraform/OpenStack: Enable usage of an existing router (#5890) 2020-04-06 02:41:46 -07:00
Martin Zobel-Helas
b0a5f265e3
Honor bastion host config from inventary (#5522)
Before this commit, the bastion entry in the inventary was not honored,
so machines behind firewalls or with unrouted addresses were not
reachable for ansible.
2020-03-30 01:11:53 -07:00
Pierre Gaxatte
a8822e24b0
Fix terraform formatting (#5823) 2020-03-27 05:46:24 -07:00
keyboardfann
64190dfc73
Fix deploy heketi show selector missing error. (#5738) 2020-03-16 03:32:36 -07:00
Hugo Blom
a901b1f0d7
convert volumes to dynamic blocks, openstack (#5673) 2020-02-24 01:20:49 -08:00
rptaylor
277b347604
add az_list_node variable to specify different AZs for kubelets (#5413)
* rebase and add az_list_node variable to specify different AZs for kubelets

* fix missing variable name change
2020-02-18 04:29:27 -08:00
Sylvain Chateau
0ca7aa126b
added "Flatcar", "Flatcar Container Linux by Kinvolk" for all coreOS role (#5607) 2020-02-18 00:15:29 -08:00
Quan Hoang
f6b66839bd
Use 'private_dns' as hostname in inventory file (#5463) 2020-02-17 00:59:28 -08:00
gatolynx
5323e232b2 recreate in another branch due to rebase problem (#5557) 2020-01-18 02:23:35 -08:00
Kessler
3c3ebc05cc Fix invalid count index (#5469) 2020-01-02 01:57:39 -08:00
Kessler
94956ebde9 Fix invalid variable in host inventory script (#5481) 2019-12-20 05:01:33 -08:00
bfraz
f0f8379e1b Update aws tf (#5435)
* update aws tf to function as expected

* update tf version

* update syntax for tf v0.12

* update tf version in readme

* update per tf for v0.12
2019-12-12 03:42:33 -08:00
Maxime Guyot
eda1dcb7f6 Fix TF inventory script (#5424) 2019-12-10 03:41:29 -08:00
Hugo Blom
40e35b3fa6 Support Openstack servergroups (#5412)
* add support for nova servergroups

* Add documentation for openstack nova servergroups

* uppdate to TF 0.12.12 format and fix etcd

* revert for_each change

* fix variables and formatting in main.tf

* try to avoid errors

* update variable

* Update main.tf

* Update main.tf

* update all other instance resources
2019-12-09 01:15:10 -08:00
Maxime Guyot
b15d41a96a Add support to Ansible 2.9 (#5361) 2019-12-05 07:24:32 -08:00
Maxime Guyot
401d441c10 Fix Python code style for inventory_builder (#5362) 2019-12-05 01:48:32 -08:00
Maxime Guyot
b1fbead531 Update to TF v0.12.12 (#5267) 2019-12-04 07:20:58 -08:00
Matthew Mosesohn
e44b0727d5 Allow inventory_builder to add nodes with hostname (#5398)
Change-Id: Ifd7dd7ce8778f4f1be2016cae8d74452173b5312
2019-12-02 08:13:04 -08:00
zhanwang
f779cb93d6 update URL for Gluster Getting Started Guide (#5390)
update URL for Gluster Getting Started Guide
2019-11-28 00:45:03 -08:00
holmesb
bc3a8a0039 Fixes issue #5299 (#5300) 2019-11-11 03:13:41 -08:00
Eric Lake
108a6297e9 Terraform dynamic inventory 0.12.12 (#5298)
* Update parsing of terraform state file for 0.12.12

* Resource does not seem to have a module element but instead has
provider
* Return the boolean right way if it is already a bool since a bool does
not have an lower method

* Remove the setting of ansible_ssh_user to root for all Packet

Not all servers in packet are accessed as root by default. CoreOS
systems use the `core` user. Removing this allows the user to specify
the remote user with an extra_var or in an ansible.cfg file.

* Default to root user for packet devices except on CoreOS

* Update TF_VERSION for packet in tf-validate-packet

Update TV_VERSION to 0.12.12 for gitlab-ci tf-validate-packet tests

* convert packet terraform files to TV_VERSION 4

* initalize terraform before copying the variable file to the top level dir
2019-10-29 00:02:42 -07:00
Julien Pervillé
d1b1add176 contrib/heketi: use inventory node ip in topology instead of guessing it (#5233) 2019-10-16 04:25:42 -07:00
Hugo Blom
a8c5a0afdc Make it possible to disable access_ip (openstack provider) (#5239)
* Add a variable do disable access_ip

* Document the use of use_access_ip
2019-10-07 04:09:09 -07:00
陈谭军
8bc0710073 clean up document (#5214) 2019-10-02 04:41:07 -07:00
Maxime Guyot
8712bddcbe Add docs for TF vars introduced PR 4239 (#5201) 2019-09-26 04:31:07 -07:00
陈谭军
99dbc6d780 clean-up doc,spelling mistakes (#5206) 2019-09-26 04:25:08 -07:00
Etienne Champetier
81cb302399 MetalLB: fail if kube_proxy_strict_arp is false (#5180)
When using IPVS, kube_proxy_strict_arp = true is required
https://github.com/danderson/metallb/issues/153#issuecomment-518651132

Add kube_proxy_strict_arp to inventory/sample
2019-09-26 04:21:06 -07:00
Robert Neumann
a5d165dc85 Customize host root volume size by Terrafrom provisioning (#4239)
* print hostnames (#5110)

Terrafrom - customize hosts root volume size

disable block_device by default value

Terraform formatting fix

Fixed typos

* fix resources after rebase

* Fix glusterfs image issue
2019-09-25 05:17:59 -07:00
陈谭军
2fc02ed456 fix-typo (#5199) 2019-09-25 04:04:00 -07:00
Matthew Mosesohn
27ec548b88 Add support for k8s v1.16.0-beta.2 (#5148)
Cleaned up deprecated APIs:
apps/v1beta1
apps/v1beta2
extensions/v1beta1 for ds,deploy,rs

Add workaround for deploying helm using incompatible
deployment manifest.
Change-Id: I78b36741348f47a999df3841ee63cf4e6f377830
2019-09-10 12:06:54 -07:00
leonmbecker
5f02068f90 Documenting Terraform variable az_list explicitly (#5132)
* added az_list to README section

* added az_list to cluster.tfvars
2019-09-09 07:41:19 -07:00
Csergő Bálint
56523812d3 print hostnames (#5110) 2019-08-29 05:07:57 -07:00
mcayland
3732c3a9b1 terraform/openstack: add network_dns_domain variable (#5093)
This allows the user to optionally specify the dns_domain attribute on the
generated internal kubernetes network.
2019-08-21 05:09:15 -07:00
Hugo Blom
4dba34bd02 add cinder max attached volumes (#5089) 2019-08-19 23:45:32 -07:00
Hugo Blom
da015e0249 Updated Openstack to terraform 0.12 (#5062)
* update openstack to terraform 0.12(.5)

* replace cluter.tf with cluster.tfvars

* update README.md to terraform 0.12

* update Openstack CI tests to use terraform 0.12

* specify terraform version in openstack README

* gitlab CI to copy cluster.tfvars in case of openstack provider

* The terraform/openstack dynamic inventory can read
tfstate v4 (generated by terraform 0.12) and convert them internally
ro v3 (as generated by terraform 0.11.x).

Additionally the script has been updated to Python 3.
2019-08-18 01:30:05 -07:00
shlo
554857da97 add cluster name into filer if specifed in environment variable (#5085) 2019-08-16 19:28:08 -07:00
Matthew Mosesohn
5707f79b33 Allow to configure number of kube-masters (#5073)
Change-Id: Ia3f30a1216b3ea063cd72c839ef6dff753cf10c6
2019-08-13 18:52:24 -07:00
Mario
973afef96e Fix variable for rbd_provisioner_user_secret (#5042)
* Update main.yml

* fix dead link 404
2019-08-08 20:03:25 -07:00
Vitaliy Dmitriev
dc6ad64ec7 [contrib/heketi]: tear down additions and fixes. Heketi updated to version 9 (#5027)
* lvm packages removal during tear down skipped by default
  * lvm utils execution PATH fixed for CentOS/RH
  * Heketi updated to the latest version 9

Signed-off-by: Vitaliy Dmitriev <vi7alya@gmail.com>
2019-08-01 04:00:16 -07:00
Gustavo Muniz do Carmo
e0410661fa azure loadbalancer vars generation (#4892) 2019-07-15 01:27:06 -07:00
Scott Charron
e6fb686156 added the ability to define and deploy multiple address pools to metallb (#4757) 2019-06-11 00:20:21 -07:00
Johnny Halfmoon
5e80603bbb updated vagrant doc (#3719) 2019-06-10 23:58:14 -07:00
Trond Hasle Amundsen
56ae3bfec2 Add support for IPv6 for Openstack in terraform.py via metadata (#4716)
* Add support for IPv6 for Openstack in terraform.py via metadata

* document terraform.py metadata variables for openstack
2019-06-09 23:01:05 -07:00
Vladimir Kiselev
045acc724b fix relative paths for bastion host template (#4126)
This is a fix for #4124
2019-06-05 01:51:55 -07:00
MarkusTeufelberger
73c2ff17dd Fix Ansible-lint error [E502] (#4743) 2019-05-16 00:27:43 -07:00
Robert Neumann
787a9c74fa Terraform wait for floating IP instance has been associated (#4321)
* Add wait for floating ip associate with instance

* Terraform formatting fix

* Sort Open Telekom Cloud in compatible list
2019-05-09 02:16:50 -07:00
MarkusTeufelberger
f3fbf995ca
Update default CentOS version on Azure 2019-05-07 13:37:42 +02:00
MarkusTeufelberger
e67f848abc ansible-lint: add spaces around variables [E206] (#4699) 2019-05-02 14:24:21 -07:00
MarkusTeufelberger
9335cdcebc ansible-lint: Add exception for invocation of "rm" (#4609) 2019-04-29 01:34:20 -07:00
Andreas Krüger
38af93b60c Remove rkt support (#4671) 2019-04-29 01:14:20 -07:00
MarkusTeufelberger
88d919337e ansible-lint: don't compare to empty string [E602] (#4665) 2019-04-28 23:00:20 -07:00
Jiang Yi Tao
f518b90c6b associate fips for masters with no etcd (#4657) 2019-04-28 22:58:20 -07:00
Maxime Guyot
696d481e3b Fix dynamic inventory parsing in contrib/tf/packet (#4645) 2019-04-25 00:40:46 -07:00
Maxime Guyot
6af1f65d3c Fix python syntax in Terraform dynamic inventory (#4643) 2019-04-24 10:34:04 -07:00
Maxime Guyot
37d98e79ec Pin Terraform provider versions (#4620) 2019-04-23 22:22:01 -07:00
Andreas Krüger
d588532c9b Update probe timeouts, delays etc. (#4612)
* Fix merge conflict

* Add check delay

* Add more liveness and readiness options to metrics-server
2019-04-23 14:46:02 -07:00
Matthew Mosesohn
d89ecb8308 disable metrics server and fix terraform (#4617)
* disable metrics server in centos7-flannel-addons job

Change-Id: I1d87923547584896f64dda9ea8feb5581ad48cbe

* Fix tf facility->facilities syntax

Change-Id: I434bfe53f47e8e4a546890e0b62d24bde6e6d6a7

* Update Terraform CI for facilities

* Fix undefined variable error
2019-04-23 12:06:03 -07:00
Maxime Guyot
50751bb610 Revert "Optimize kube resources creation (#4572)" (#4621)
This reverts commit f8fdc0cd93.
2019-04-23 20:37:23 +03:00
andreyshestakov
f8fdc0cd93 Optimize kube resources creation (#4572) 2019-04-22 23:34:10 -07:00