You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
2.1 KiB

  1. ### NOTE: This playbook cannot be used to deploy any new nodes to the cluster.
  2. ### Additional information:
  3. ### * Will not upgrade etcd
  4. ### * Will not upgrade network plugins
  5. ### * Will not upgrade Docker
  6. ### * Currently does not support Vault deployment.
  7. ###
  8. ### In most cases, you probably want to use upgrade-cluster.yml playbook and
  9. ### not this one.
  10. - hosts: localhost
  11. gather_facts: False
  12. roles:
  13. - { role: kargo-defaults}
  14. - { role: bastion-ssh-config, tags: ["localhost", "bastion"]}
  15. - hosts: k8s-cluster:etcd:calico-rr
  16. any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
  17. gather_facts: false
  18. vars:
  19. # Need to disable pipelining for bootstrap-os as some systems have requiretty in sudoers set, which makes pipelining
  20. # fail. bootstrap-os fixes this on these systems, so in later plays it can be enabled.
  21. ansible_ssh_pipelining: false
  22. roles:
  23. - { role: kargo-defaults}
  24. - { role: bootstrap-os, tags: bootstrap-os}
  25. - hosts: k8s-cluster:etcd:calico-rr
  26. any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
  27. vars:
  28. ansible_ssh_pipelining: true
  29. gather_facts: true
  30. - hosts: k8s-cluster:etcd:calico-rr
  31. any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
  32. roles:
  33. - { role: kargo-defaults}
  34. - { role: kubernetes/preinstall, tags: preinstall }
  35. #Handle upgrades to master components first to maintain backwards compat.
  36. - hosts: kube-master
  37. any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
  38. serial: 1
  39. roles:
  40. - { role: kargo-defaults}
  41. - { role: upgrade/pre-upgrade, tags: pre-upgrade }
  42. - { role: kubernetes/node, tags: node }
  43. - { role: kubernetes/master, tags: master }
  44. - { role: upgrade/post-upgrade, tags: post-upgrade }
  45. #Finally handle worker upgrades, based on given batch size
  46. - hosts: kube-node:!kube-master
  47. any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
  48. serial: "{{ serial | default('20%') }}"
  49. roles:
  50. - { role: kargo-defaults}
  51. - { role: upgrade/pre-upgrade, tags: pre-upgrade }
  52. - { role: kubernetes/node, tags: node }
  53. - { role: upgrade/post-upgrade, tags: post-upgrade }
  54. - { role: kargo-defaults}