mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
fix RC to RS
This commit is contained in:
parent
76ffe9e832
commit
b5b1b58675
@ -307,8 +307,8 @@ type DeploymentSpec struct {
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
// DefaultDeploymentUniqueLabelKey is the default key of the selector that is added
|
// DefaultDeploymentUniqueLabelKey is the default key of the selector that is added
|
||||||
// to existing RCs (and label key that is added to its pods) to prevent the existing RCs
|
// to existing ReplicaSets (and label key that is added to its pods) to prevent the existing ReplicaSets
|
||||||
// to select new pods (and old pods being select by new RC).
|
// to select new pods (and old pods being select by new ReplicaSet).
|
||||||
DefaultDeploymentUniqueLabelKey string = "pod-template-hash"
|
DefaultDeploymentUniqueLabelKey string = "pod-template-hash"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -333,7 +333,7 @@ const (
|
|||||||
// Kill all existing pods before creating new ones.
|
// Kill all existing pods before creating new ones.
|
||||||
RecreateDeploymentStrategyType DeploymentStrategyType = "Recreate"
|
RecreateDeploymentStrategyType DeploymentStrategyType = "Recreate"
|
||||||
|
|
||||||
// Replace the old RCs by new one using rolling update i.e gradually scale down the old RCs and scale up the new one.
|
// Replace the old ReplicaSets by new one using rolling update i.e gradually scale down the old ReplicaSets and scale up the new one.
|
||||||
RollingUpdateDeploymentStrategyType DeploymentStrategyType = "RollingUpdate"
|
RollingUpdateDeploymentStrategyType DeploymentStrategyType = "RollingUpdate"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -344,9 +344,9 @@ type RollingUpdateDeployment struct {
|
|||||||
// Absolute number is calculated from percentage by rounding down.
|
// Absolute number is calculated from percentage by rounding down.
|
||||||
// This can not be 0 if MaxSurge is 0.
|
// This can not be 0 if MaxSurge is 0.
|
||||||
// Defaults to 25%.
|
// Defaults to 25%.
|
||||||
// Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods
|
// Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods
|
||||||
// immediately when the rolling update starts. Once new pods are ready, old RC
|
// immediately when the rolling update starts. Once new pods are ready, old ReplicaSet
|
||||||
// can be scaled down further, followed by scaling up the new RC, ensuring
|
// can be scaled down further, followed by scaling up the new ReplicaSet, ensuring
|
||||||
// that the total number of pods available at all times during the update is at
|
// that the total number of pods available at all times during the update is at
|
||||||
// least 70% of desired pods.
|
// least 70% of desired pods.
|
||||||
// +optional
|
// +optional
|
||||||
@ -358,10 +358,10 @@ type RollingUpdateDeployment struct {
|
|||||||
// This can not be 0 if MaxUnavailable is 0.
|
// This can not be 0 if MaxUnavailable is 0.
|
||||||
// Absolute number is calculated from percentage by rounding up.
|
// Absolute number is calculated from percentage by rounding up.
|
||||||
// Defaults to 25%.
|
// Defaults to 25%.
|
||||||
// Example: when this is set to 30%, the new RC can be scaled up immediately when
|
// Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when
|
||||||
// the rolling update starts, such that the total number of old and new pods do not exceed
|
// the rolling update starts, such that the total number of old and new pods do not exceed
|
||||||
// 130% of desired pods. Once old pods have been killed,
|
// 130% of desired pods. Once old pods have been killed,
|
||||||
// new RC can be scaled up further, ensuring that total number of pods running
|
// new ReplicaSet can be scaled up further, ensuring that total number of pods running
|
||||||
// at any time during the update is at most 130% of desired pods.
|
// at any time during the update is at most 130% of desired pods.
|
||||||
// +optional
|
// +optional
|
||||||
MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,2,opt,name=maxSurge"`
|
MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,2,opt,name=maxSurge"`
|
||||||
|
@ -379,8 +379,8 @@ type RollbackConfig struct {
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
// DefaultDeploymentUniqueLabelKey is the default key of the selector that is added
|
// DefaultDeploymentUniqueLabelKey is the default key of the selector that is added
|
||||||
// to existing RCs (and label key that is added to its pods) to prevent the existing RCs
|
// to existing ReplicaSets (and label key that is added to its pods) to prevent the existing ReplicaSets
|
||||||
// to select new pods (and old pods being select by new RC).
|
// to select new pods (and old pods being select by new ReplicaSet).
|
||||||
DefaultDeploymentUniqueLabelKey string = "pod-template-hash"
|
DefaultDeploymentUniqueLabelKey string = "pod-template-hash"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -405,7 +405,7 @@ const (
|
|||||||
// Kill all existing pods before creating new ones.
|
// Kill all existing pods before creating new ones.
|
||||||
RecreateDeploymentStrategyType DeploymentStrategyType = "Recreate"
|
RecreateDeploymentStrategyType DeploymentStrategyType = "Recreate"
|
||||||
|
|
||||||
// Replace the old RCs by new one using rolling update i.e gradually scale down the old RCs and scale up the new one.
|
// Replace the old ReplicaSets by new one using rolling update i.e gradually scale down the old ReplicaSets and scale up the new one.
|
||||||
RollingUpdateDeploymentStrategyType DeploymentStrategyType = "RollingUpdate"
|
RollingUpdateDeploymentStrategyType DeploymentStrategyType = "RollingUpdate"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -416,9 +416,9 @@ type RollingUpdateDeployment struct {
|
|||||||
// Absolute number is calculated from percentage by rounding down.
|
// Absolute number is calculated from percentage by rounding down.
|
||||||
// This can not be 0 if MaxSurge is 0.
|
// This can not be 0 if MaxSurge is 0.
|
||||||
// Defaults to 25%.
|
// Defaults to 25%.
|
||||||
// Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods
|
// Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods
|
||||||
// immediately when the rolling update starts. Once new pods are ready, old RC
|
// immediately when the rolling update starts. Once new pods are ready, old ReplicaSet
|
||||||
// can be scaled down further, followed by scaling up the new RC, ensuring
|
// can be scaled down further, followed by scaling up the new ReplicaSet, ensuring
|
||||||
// that the total number of pods available at all times during the update is at
|
// that the total number of pods available at all times during the update is at
|
||||||
// least 70% of desired pods.
|
// least 70% of desired pods.
|
||||||
// +optional
|
// +optional
|
||||||
@ -430,10 +430,10 @@ type RollingUpdateDeployment struct {
|
|||||||
// This can not be 0 if MaxUnavailable is 0.
|
// This can not be 0 if MaxUnavailable is 0.
|
||||||
// Absolute number is calculated from percentage by rounding up.
|
// Absolute number is calculated from percentage by rounding up.
|
||||||
// Defaults to 25%.
|
// Defaults to 25%.
|
||||||
// Example: when this is set to 30%, the new RC can be scaled up immediately when
|
// Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when
|
||||||
// the rolling update starts, such that the total number of old and new pods do not exceed
|
// the rolling update starts, such that the total number of old and new pods do not exceed
|
||||||
// 130% of desired pods. Once old pods have been killed,
|
// 130% of desired pods. Once old pods have been killed,
|
||||||
// new RC can be scaled up further, ensuring that total number of pods running
|
// new ReplicaSet can be scaled up further, ensuring that total number of pods running
|
||||||
// at any time during the update is atmost 130% of desired pods.
|
// at any time during the update is atmost 130% of desired pods.
|
||||||
// +optional
|
// +optional
|
||||||
MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,2,opt,name=maxSurge"`
|
MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,2,opt,name=maxSurge"`
|
||||||
|
@ -359,8 +359,8 @@ type DeploymentSpec struct {
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
// DefaultDeploymentUniqueLabelKey is the default key of the selector that is added
|
// DefaultDeploymentUniqueLabelKey is the default key of the selector that is added
|
||||||
// to existing RCs (and label key that is added to its pods) to prevent the existing RCs
|
// to existing ReplicaSets (and label key that is added to its pods) to prevent the existing ReplicaSets
|
||||||
// to select new pods (and old pods being select by new RC).
|
// to select new pods (and old pods being select by new ReplicaSet).
|
||||||
DefaultDeploymentUniqueLabelKey string = "pod-template-hash"
|
DefaultDeploymentUniqueLabelKey string = "pod-template-hash"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -385,7 +385,7 @@ const (
|
|||||||
// Kill all existing pods before creating new ones.
|
// Kill all existing pods before creating new ones.
|
||||||
RecreateDeploymentStrategyType DeploymentStrategyType = "Recreate"
|
RecreateDeploymentStrategyType DeploymentStrategyType = "Recreate"
|
||||||
|
|
||||||
// Replace the old RCs by new one using rolling update i.e gradually scale down the old RCs and scale up the new one.
|
// Replace the old ReplicaSets by new one using rolling update i.e gradually scale down the old ReplicaSets and scale up the new one.
|
||||||
RollingUpdateDeploymentStrategyType DeploymentStrategyType = "RollingUpdate"
|
RollingUpdateDeploymentStrategyType DeploymentStrategyType = "RollingUpdate"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -396,9 +396,9 @@ type RollingUpdateDeployment struct {
|
|||||||
// Absolute number is calculated from percentage by rounding down.
|
// Absolute number is calculated from percentage by rounding down.
|
||||||
// This can not be 0 if MaxSurge is 0.
|
// This can not be 0 if MaxSurge is 0.
|
||||||
// Defaults to 25%.
|
// Defaults to 25%.
|
||||||
// Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods
|
// Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods
|
||||||
// immediately when the rolling update starts. Once new pods are ready, old RC
|
// immediately when the rolling update starts. Once new pods are ready, old ReplicaSet
|
||||||
// can be scaled down further, followed by scaling up the new RC, ensuring
|
// can be scaled down further, followed by scaling up the new ReplicaSet, ensuring
|
||||||
// that the total number of pods available at all times during the update is at
|
// that the total number of pods available at all times during the update is at
|
||||||
// least 70% of desired pods.
|
// least 70% of desired pods.
|
||||||
// +optional
|
// +optional
|
||||||
@ -410,10 +410,10 @@ type RollingUpdateDeployment struct {
|
|||||||
// This can not be 0 if MaxUnavailable is 0.
|
// This can not be 0 if MaxUnavailable is 0.
|
||||||
// Absolute number is calculated from percentage by rounding up.
|
// Absolute number is calculated from percentage by rounding up.
|
||||||
// Defaults to 25%.
|
// Defaults to 25%.
|
||||||
// Example: when this is set to 30%, the new RC can be scaled up immediately when
|
// Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when
|
||||||
// the rolling update starts, such that the total number of old and new pods do not exceed
|
// the rolling update starts, such that the total number of old and new pods do not exceed
|
||||||
// 130% of desired pods. Once old pods have been killed,
|
// 130% of desired pods. Once old pods have been killed,
|
||||||
// new RC can be scaled up further, ensuring that total number of pods running
|
// new ReplicaSet can be scaled up further, ensuring that total number of pods running
|
||||||
// at any time during the update is atmost 130% of desired pods.
|
// at any time during the update is atmost 130% of desired pods.
|
||||||
// +optional
|
// +optional
|
||||||
MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,2,opt,name=maxSurge"`
|
MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,2,opt,name=maxSurge"`
|
||||||
|
Loading…
Reference in New Issue
Block a user