Browse Source
To enable the rolling upgrade ability of Kubernetes Cluster, this patch is proposing a new API /upgrade to support upgrade the base operating system of nodes and the version of Kubernetes, even add-ons running on the k8s cluster: POST <ClusterID>/actions/upgrade And the post body will be: { "cluster_template": 'dd9cc5ed-3a2b-11e9-9233-fa163e46bcc2', "max_batch_size": 1, "nodegroup": "production_group" } Co-Authored-By: Feilong Wang <flwang@catalyst.net.nz> Task: 30168 Story: 2002210 Change-Id: Ia168877778aa0d473383eb06b1c8a16dc06b0576changes/59/514959/22
20 changed files with 295 additions and 7 deletions
@ -0,0 +1,30 @@
|
||||
Rolling upgrade is one of most important features user want to see for a |
||||
managed Kubernetes service. And in Magnum, we're thinking more deeper to |
||||
provide better user experience. |
||||
|
||||
|
||||
.. code-block:: bash |
||||
|
||||
#!/bin/bash -x |
||||
|
||||
IP="192.168.122.1" |
||||
CLUSTER="797b39e1-fac2-48d3-8377-d6e6cc443d39" |
||||
CT="e32c8cf7-394b-45e6-a17e-4fe6a30ad64b" |
||||
|
||||
# Upgrade curl |
||||
req_body=$(cat << EOF |
||||
{ |
||||
"max_batch_size": 1, |
||||
"nodegroup": "master", |
||||
"cluster_template": "${CT}" |
||||
} |
||||
EOF |
||||
) |
||||
USER_TOKEN=$(openstack token issue -c id -f value) |
||||
curl -g -i -X PATCH https://${IP}:9511/v1/clusters/${CLUSTER}/actions/upgrade \ |
||||
-H "OpenStack-API-Version: container-infra latest" \ |
||||
-H "X-Auth-Token: $USER_TOKEN" \ |
||||
-H "Content-Type: application/json" \ |
||||
-H "Accept: application/json" \ |
||||
-H "User-Agent: None" \ |
||||
-d "$req_body" |
Loading…
Reference in new issue