Skip to content

Commit dd8207a

Browse files
authored
update policy to upgrade statefulset (#6115)
1 parent b3a1db9 commit dd8207a

File tree

5 files changed

+28
-24
lines changed

5 files changed

+28
-24
lines changed

docs/en/docs/kpanda/user-guide/workloads/create-daemonset.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ Advanced setting includes four parts: load network settings, upgrade policy, sch
154154
- Max Unavailable Pods: Specify the maximum value or ratio of unavailable pods during the workload update process, the default is 25%. If it is equal to the number of instances, there is a risk of service interruption.
155155
- Revision History Limit: Set the number of old versions retained when the version is rolled back. The default is 10.
156156
- Upgrade Max Duration: If the deployment is not successful after the set time, the workload will be marked as failed. Default is 600 seconds.
157-
- Graceful Period: The execution period (0-9,999 seconds) of the command before the workload stops, the default is 30 seconds.
157+
- Graceful Time Window: The execution period (0-9,999 seconds) of the command before the workload stops, the default is 30 seconds.
158158

159159
=== "Scheduling Policies"
160160

docs/en/docs/kpanda/user-guide/workloads/create-deployment.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ Advanced setting includes four parts: Network Settings, Upgrade Policy, Scheduli
169169
- Revision History Limit: Set the number of old versions retained when the version is rolled back. The default is 10.
170170
- Minimum Ready: The minimum time for a Pod to be ready. Only after this time is the Pod considered available. The default is 0 seconds.
171171
- Upgrade Max Duration: If the deployment is not successful after the set time, the workload will be marked as failed. Default is 600 seconds.
172-
- Graceful Period: The execution period (0-9,999 seconds) of the command before the workload stops, the default is 30 seconds.
172+
- Graceful Time Window: The execution period (0-9,999 seconds) of the command before the workload stops, the default is 30 seconds.
173173

174174
![Upgrade Policy](../images/deploy14.png)
175175

docs/en/docs/kpanda/user-guide/workloads/create-statefulset.md

+15-13
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ Container setting is divided into six parts: basic information, life cycle, heal
6060
6161
=== "Basic information (required)"
6262

63+
![Basic Info](../images/state11.png)
64+
6365
When configuring container-related parameters, you must correctly fill in the container name and image parameters, otherwise you will not be able to proceed to the next step. After filling in the settings with reference to the following requirements, click __OK__ .
6466

6567
- Container Name: Up to 63 characters, lowercase letters, numbers and separators ("-") are supported. Must start and end with a lowercase letter or number, eg nginx-01.
@@ -71,8 +73,6 @@ Container setting is divided into six parts: basic information, life cycle, heal
7173

7274
> Before setting exclusive GPU, the administrator needs to install the GPU card and driver plug-in on the cluster nodes in advance, and enable the GPU feature in [Cluster Settings](../clusterops/cluster-settings.md).
7375

74-
![Basic Info](../images/state11.png)
75-
7676
=== "Lifecycle (optional)"
7777

7878
Set the commands that need to be executed when the container starts, after starting, and before stopping. For details, refer to [Container Lifecycle Configuration](pod-config/lifecycle.md).
@@ -115,14 +115,16 @@ Configure [Service (Service)](../network/create-services.md) for the statefulset
115115

116116
![Config Parameters](../images/deploy13.png)
117117

118-
3. Click __OK__ and click __Next__ .
118+
3. Click __OK__ and click __Next__
119119

120120
### Advanced settings
121121

122122
Advanced setting includes four parts: load network settings, upgrade policy, scheduling policy, label and annotation. You can click the tabs below to view the requirements of each part.
123123

124124
=== "Network Configuration"
125125

126+
![DNS](../images/state17.png)
127+
126128
1. For container NIC settings, refer to [Workload Usage IP Pool](../../../network/config/use-ippool/usage.md)
127129
2. DNS settings
128130

@@ -140,28 +142,30 @@ Advanced setting includes four parts: load network settings, upgrade policy, sch
140142
- Options: Configuration options for DNS, where each object can have a name attribute (required) and a value attribute (optional). The content in this field will be merged into the options field of the domain name resolution file generated based on dnsPolicy. If some options of dnsConfig options conflict with the options of the domain name resolution file generated based on dnsPolicy, they will be overwritten by dnsConfig.
141143
- Host Alias: the alias set for the host.
142144

143-
![DNS](../images/state17.png)
144-
145145
=== "Upgrade Policy"
146146

147-
- Upgrade Mode: __Rolling upgrade__ refers to gradually replacing instances of the old version with instances of the new version. During the upgrade process, business traffic will be load-balanced to the old and new instances at the same time, so the business will not be interrupted. __Rebuild and upgrade__ refers to deleting the workload instance of the old version first, and then installing the specified new version. During the upgrade process, the business will be interrupted.
148-
- Revision History Limit: Set the number of old versions retained when the version is rolled back. The default is 10.
149-
- Graceful Period: The execution period (0-9,999 seconds) of the command before the workload stops, the default is 30 seconds.
150-
151147
![Upgrade Policy](../images/state14.png)
152148

149+
- Upgrade Mode:
150+
- __RollingUpdate__ refers to gradually replacing instances of the old version with instances of the new version. During the upgrade process, business traffic will be load-balanced to the old and new instances at the same time, so the business will not be interrupted.
151+
- __OnDelete__ refers to deleting the workload instance of the old version first, and then installing the specified new version. During the upgrade process, the business will be interrupted.
152+
- Revision History Limit: Set the number of old versions retained when the version is rolled back. The default is 10.
153+
- Graceful Time Window: The execution period (0-9,999 seconds) of the command before the workload stops, the default is 30 seconds.
154+
153155
=== "Container Management Policies"
154156

157+
![Container Management Policies](../images/state05.png)
158+
155159
Kubernetes v1.7 and later versions can set Pod management policies through __.spec.podManagementPolicy__ , which supports the following two methods:
156160

157161
- __OrderedReady__ : The default Pod management policy, which means that Pods are deployed in order. Only after the deployment of the previous Pod is successfully completed, the statefulset will start to deploy the next Pod. Pods are deleted in reverse order, with the last created being deleted first.
158162

159163
- __Parallel__ : Create or delete containers in parallel, just like Pods of the Deployment type. The StatefulSet controller starts or terminates all containers in parallel. There is no need to wait for a Pod to enter the Running and ready state or to stop completely before starting or terminating other Pods. This option only affects the behavior of scaling operations, not the order of updates.
160164

161-
![Container Management Policies](../images/state05.png)
162-
163165
=== "Scheduling Policies"
164166

167+
![Scheduling Policies](../images/state15.png)
168+
165169
- Tolerance time: When the node where the workload instance is located is unavailable, the time for rescheduling the workload instance to other available nodes, the default is 300 seconds.
166170
- Node affinity: According to the label on the node, constrain which nodes the Pod can be scheduled on.
167171
- Workload Affinity: Constrains which nodes a Pod can be scheduled to based on the labels of the Pods already running on the node.
@@ -170,8 +174,6 @@ Advanced setting includes four parts: load network settings, upgrade policy, sch
170174

171175
> For details, refer to [Scheduling Policy](pod-config/scheduling-policy.md).
172176

173-
![Scheduling Policies](../images/state15.png)
174-
175177
=== "Labels and Annotations"
176178

177179
You can click the __Add__ button to add tags and annotations to workloads and pods.
63.4 KB
Loading

docs/zh/docs/kpanda/user-guide/workloads/create-statefulset.md

+11-9
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@
137137

138138
=== "网络配置"
139139

140+
![DNS 配置](https://docs.daocloud.io/daocloud-docs-images/docs/kpanda/images/deploy17.png)
141+
140142
- 如在集群中部署了 [SpiderPool](../../../network/modules/spiderpool/index.md) 和 [Multus](../../../network/modules/multus-underlay/index.md) 组件,则可以在网络配置中配置容器网卡。详情参考[工作负载使用 IP 池](../../../network/config/use-ippool/usage.md)。
141143

142144
- DNS 配置:应用在某些场景下会出现冗余的 DNS 查询。Kubernetes 为应用提供了与 DNS 相关的配置选项,能够在某些场景下有效地减少冗余的 DNS 查询,提升业务并发量。
@@ -153,28 +155,30 @@
153155
- Options:DNS 的配置选项,其中每个对象可以具有 name 属性(必需)和 value 属性(可选)。该字段中的内容将合并到基于 dnsPolicy 生成的域名解析文件的 options 字段中,dnsConfig 的 options 的某些选项如果与基于 dnsPolicy 生成的域名解析文件的选项冲突,则会被 dnsConfig 所覆盖。
154156
- 主机别名:为主机设置的别名。
155157

156-
![DNS 配置](https://docs.daocloud.io/daocloud-docs-images/docs/kpanda/images/deploy17.png)
157-
158158
=== "升级策略"
159159

160-
- 升级方式: __滚动升级__ 指逐步用新版本的实例替换旧版本的实例,升级的过程中,业务流量会同时负载均衡分布到新老的实例上,因此业务不会中断。 __重建升级__ 指先删除老版本的负载实例,再安装指定的新版本,升级过程中业务会中断。
160+
![升级策略](../../images/state-deploy14.png)
161+
162+
- 升级方式:
163+
- __滚动升级(RollingUpdate)__ 指逐步用新版本的实例替换旧版本的实例,升级的过程中,业务流量会同时负载均衡分布到新老的实例上,因此业务不会中断。
164+
- __重建升级(OnDelete)__ 指先删除老版本的负载实例,再安装指定的新版本,升级过程中业务会中断。
161165
- 最大保留版本数:设置版本回滚时保留的旧版本数量。默认 10。
162166
- 缩容时间窗:负载停止前命令的执行时间窗(0-9,999秒),默认 30 秒。
163167

164-
![升级策略](https://docs.daocloud.io/daocloud-docs-images/docs/kpanda/images/deploy14.png)
165-
166168
=== "容器管理策略"
167169

170+
![容器管理策略](https://docs.daocloud.io/daocloud-docs-images/docs/kpanda/images/state05.png)
171+
168172
Kubernetes v1.7 及其之后的版本可以通过 __.spec.podManagementPolicy__ 设置 Pod 的管理策略,支持以下两种方式:
169173

170174
- __按序策略(OrderedReady)__ :默认的 Pod 管理策略,表示按顺序部署 Pod,只有前一个 Pod 部署 成功完成后,有状态负载才会开始部署下一个 Pod。删除 Pod 时则采用逆序,最后创建的最先被删除。
171175

172176
- __并行策略(Parallel)__ :并行创建或删除容器,和 Deployment 类型的 Pod 一样。StatefulSet 控制器并行地启动或终止所有的容器。启动或者终止其他 Pod 前,无需等待 Pod 进入 Running 和 ready 或者完全停止状态。 这个选项只会影响扩缩操作的行为,不影响更新时的顺序。
173177

174-
![容器管理策略](https://docs.daocloud.io/daocloud-docs-images/docs/kpanda/images/state05.png)
175-
176178
=== "调度策略"
177179

180+
![调度策略](https://docs.daocloud.io/daocloud-docs-images/docs/kpanda/images/deploy15.png)
181+
178182
- 容忍时间:负载实例所在的节点不可用时,将负载实例重新调度到其它可用节点的时间,默认为 300 秒。
179183
- 节点亲和性:根据节点上的标签来约束 Pod 可以调度到哪些节点上。
180184
- 工作负载亲和性:基于已经在节点上运行的 Pod 的标签来约束 Pod 可以调度到哪些节点。
@@ -183,8 +187,6 @@
183187

184188
> 具体详情请参考[调度策略](pod-config/scheduling-policy.md)。
185189

186-
![调度策略](https://docs.daocloud.io/daocloud-docs-images/docs/kpanda/images/deploy15.png)
187-
188190
=== "标签与注解"
189191

190192
可以点击 __添加__ 按钮为工作负载和容器组添加标签和注解。

0 commit comments

Comments
 (0)