Commit Graph

36 Commits (bfac7d8b3ed142b54e054f53a317ec4ecd7f3922)

Author SHA1 Message Date
Denis Kasanic 169eb34a59
Fix playbook names for galaxy (#10021)
Signed-off-by: Kasanic, Denis <denisx.kasanic@intel.com>
2023-04-24 07:09:02 -07:00
Luke Simmons acbf44a1b4
Adds support for Ansible collections (#9582) 2023-03-27 02:25:55 -07:00
Kenichi Omichi c09fcd4f92
Skip gathering facts when reset_nodes is false (#8843)
The doc[1] explains we need to specify

  "-e reset_nodes=false -e allow_ungraceful_removal=true"

to delete offline node. However the task "Gather facts"
tried to gather facts of offline node also and the task
was failed.
This adds a condition to skip gathering facts when reset_nodes
is false on remove-node.yml.

[1]: https://github.com/kubernetes-sigs/kubespray/blob/master/docs/nodes.md#3-remove-an-old-node-with-remove-nodeyml
2022-05-19 01:04:07 -07:00
Sander Klein 54dfe73d24
Add bastion support to remove-node.yml (#8504)
Somehow bastion support for remove-node.yml was missing.

This commit adds it.
2022-02-04 23:50:50 -08:00
Max Gautier 92f25bf267
Simplify usage of pre-remove role (#8334)
- Use builtin task scheduling of ansible (same task on each host)
  instead of manual looping on master

Benefits:
- One less play in remove-node.yml playbook
- Parralel node drain
- Drain parameters (timeout, grace period, retries,
  allow_ungraceful_removal) can be adjusted separately for each node
  with ansible variables
2022-01-04 07:10:53 -08:00
IKRozhkov 09c17ba581
add Gather facts to remove-node.yml (#8231) 2021-11-29 01:01:22 -08:00
Shubham Deshmukh 86b45fce6a
Remove environment variable in remove-node play (#7729) 2021-08-02 04:29:21 -07:00
forselli-stratio 1069b05e68
Improve scale flow and documentation (#7610)
* Improve scale flow

* Add confirmation prompt again
2021-06-07 05:02:40 -07:00
Cristian Calin 360aff4a57
Rename ansible groups to use _ instead of - (#7552)
* rename ansible groups to use _ instead of -

k8s-cluster -> k8s_cluster
k8s-node -> k8s_node
calico-rr -> calico_rr
no-floating -> no_floating

Note: kube-node,k8s-cluster groups in upgrade CI
      need clean-up after v2.16 is tagged

* ensure old groups are mapped to the new ones
2021-04-29 05:20:50 -07:00
Kenichi Omichi 486b223e01
Replace kube-master with kube_control_plane (#7256)
This replaces kube-master with kube_control_plane because of [1]:

  The Kubernetes project is moving away from wording that is
  considered offensive. A new working group WG Naming was created
  to track this work, and the word "master" was declared as offensive.
  A proposal was formalized for replacing the word "master" with
  "control plane". This means it should be removed from source code,
  documentation, and user-facing configuration from Kubernetes and
  its sub-projects.

NOTE: The reason why this changes it to kube_control_plane not
      kube-control-plane is for valid group names on ansible.

[1]: https://github.com/kubernetes/enhancements/blob/master/keps/sig-cluster-lifecycle/kubeadm/2067-rename-master-label-taint/README.md#motivation
2021-03-23 17:26:05 -07:00
Etienne Champetier 067db686f6
Fix proxy usage when *_PROXY are present in environment (#7309)
Since a790935d02 all proxy users
should be properly configured

Now when you have *_PROXY vars in your environment it can leads to failure
if NO_PROXY is not correct, or to persistent configuration changes
as seen with kubeadm in 1c5391dda7

Instead of playing constant whack-a-bug, inject empty *_PROXY vars everywhere
at the play level, and override at the task level when needed

Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
2021-02-23 09:44:02 -08:00
Etienne Champetier a790935d02
Only setup *_PROXY env variables where needed (#7095)
no_proxy is a pain to get right, and having proxy variables present causes issues
(k8s components get proxy configuration after upgrade, see #7100)

It's better to only configure what require proxy:
- the runtime (containerd/docker/crio)
- the package manager + apt_key
- the download tasks

Tested with the following clusters
- 4 CentOS 8 nodes
- 1 Ubuntu 20.04 node

Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
2021-01-11 07:21:08 -08:00
Samuel Liu a9e11623cd
fix remove node (#6666) 2020-09-17 02:45:05 -07:00
Kevin Klopfenstein c3b78c3255
bootstrap-os for remove-node (#6154) 2020-08-05 01:52:28 -07:00
nniehoff eb69f126de
* add proxy_env definition to remove_node.yml resolving #6430 (#6431) 2020-07-22 00:28:05 -07:00
Alexander Petermann 7712bd0c76
remove ectd node in pre step, instead of post step (#6099) 2020-06-09 05:37:17 -07:00
Florent Monbillard dca3bf0e80
Fix first etcd member exclusion in host group pattern (#6109) 2020-05-08 15:31:51 -07:00
Sergey aead0e3a69
bump minimal ansible version to 2.8.0 (#5984)
* bump minimal ansible version to 2.8.0

* check ansible version in separate playbook
2020-04-22 13:33:44 -07:00
Lovro Seder 27a268df33
Gather just the necessary facts (#5955)
* Gather just the necessary facts

* Move fact gathering to separate playbook.
2020-04-17 16:23:36 -07:00
holmesb 46f6c09d21 Fixes issue #5160 (#5171) 2019-09-16 23:42:22 -07:00
Matthew Mosesohn a44235d11b Refactor remove node to allow removing dead nodes and etcd members (#5009)
Change-Id: I1c59249f08f16d0f6fd60df6ab61f17a0a7df189
2019-08-07 04:46:50 -07:00
Timoses 53032a6695 Use kubespray-defaults in remove-node role (#4946) 2019-07-05 03:28:34 -07:00
Maxime Guyot f69b5f7f33 Upgrade to Ansible 2.7.8 (#4535) 2019-04-17 10:18:05 -07:00
Maxime Guyot a4e65c7ceb Upgrade to Ansible >2.7.0 (#4471) 2019-04-09 04:21:07 -07:00
Andrey Zhelnin c66e9a6d62 Disable become for localhost (#4287) 2019-02-25 19:36:44 -08:00
Chad Swenson 80379f6cab Fix kube-proxy configuration for kubeadm (#3958)
- Creates and defaults an ansible variable for every configuration option in the `kubeproxy.config.k8s.io/v1alpha1` type spec
  - Fixes vars that were orphaned by removing non-kubeadm
  - Fixes previously harcoded kubeadm values
- Introduces a `main` directory for role default files per component (requires ansible 2.6.0+)
  - Split out just `kube-proxy.yml` in this first effort
- Removes the kube-proxy server field patch task

We should continue to pull out other components from `main.yml` into their own defaults files as I did here for `defaults/main/kube-proxy.yml`. I hope for and will need others to join me in this refactoring across the project until each component config template has a matching role defaults file, with shared defaults in `kubespray-defaults` or `downloads`
2019-01-03 00:04:26 -08:00
Egor 13af4c1f40 remove-node: fix assert for ansible_version (#3703) 2018-11-13 16:18:31 +01:00
Antoine Legrand 3dcb914607 Remove Vault (#3684)
* Remove Vault

* Remove reference to 'kargo' in the doc

* change check order
2018-11-10 08:51:24 -08:00
Wong Hoi Sing Edison ce5a34d86c ansible: Upgrade to 2.7.1 (#3618)
Only exclude buggy Ansible v2.7.0 (https://github.com/ansible/ansible/issues/46600#issuecomment-433863628)

Fixup #3589
2018-10-31 03:01:19 -07:00
Antoine Legrand 90d8f7aa6a Assert if ansible 2.7 is used (#3589) 2018-10-26 00:29:21 -07:00
Mark Eisenblaetter b548f6f320 move node selection from --limit to --extra-vars=node<nodename>" 2018-07-02 20:04:36 +02:00
Rong Zhang 32f312f4a6
Merge pull request #2757 from qbl/master
Fix issue #2702: 'docker_bin_dir' is undefined when running ansible-playbook remove-node.yml
2018-05-14 09:54:57 +08:00
Iqbal Farabi 52ffd5dae4 Fix issue #2702: 'docker_bin_dir' is undefined when running ansible-playbook remove-node.yml 2018-05-14 07:20:45 +05:30
Giri Kuncoro 1eaa6925b9 Fix privilege escalation timeout for remove-node playbook 2018-05-10 11:53:48 +05:30
Iqbal Farabi 86212d59ae Fix issue #2702: 'docker_bin_dir' is undefined when running ansible-playbook remove-node.yml 2018-05-10 10:10:59 +05:30
rong.zhang 12c78e622b Remove nodes
Drain node except daemonsets resource
Use reset cluser for delete deploy data
Then delete node
2018-03-08 15:03:42 +08:00