API: maxUnavailable for StatefulSet

This commit is contained in:
Mayank Kumar
2019-08-30 00:05:18 -07:00
parent e0ca5cfd73
commit 357203d992
46 changed files with 1369 additions and 484 deletions

View File

@@ -3774,14 +3774,22 @@ func schema_k8sio_api_apps_v1_RollingUpdateStatefulSetStrategy(ref common.Refere
Properties: map[string]spec.Schema{
"partition": {
SchemaProps: spec.SchemaProps{
Description: "Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0.",
Description: "Partition indicates the ordinal at which the StatefulSet should be partitioned for updates. During a rolling update, all pods from ordinal Replicas-1 to Partition are updated. All pods from ordinal Partition-1 to 0 remain untouched. This is helpful in being able to do a canary based deployment. The default value is 0.",
Type: []string{"integer"},
Format: "int32",
},
},
"maxUnavailable": {
SchemaProps: spec.SchemaProps{
Description: "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding up. This can not be 0. Defaults to 1. This field is alpha-level and is only honored by servers that enable the MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it will be counted towards MaxUnavailable.",
Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"),
},
},
},
},
},
Dependencies: []string{
"k8s.io/apimachinery/pkg/util/intstr.IntOrString"},
}
}
@@ -4762,14 +4770,22 @@ func schema_k8sio_api_apps_v1beta1_RollingUpdateStatefulSetStrategy(ref common.R
Properties: map[string]spec.Schema{
"partition": {
SchemaProps: spec.SchemaProps{
Description: "Partition indicates the ordinal at which the StatefulSet should be partitioned.",
Description: "Partition indicates the ordinal at which the StatefulSet should be partitioned for updates. During a rolling update, all pods from ordinal Replicas-1 to Partition are updated. All pods from ordinal Partition-1 to 0 remain untouched. This is helpful in being able to do a canary based deployment. The default value is 0.",
Type: []string{"integer"},
Format: "int32",
},
},
"maxUnavailable": {
SchemaProps: spec.SchemaProps{
Description: "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding up. This can not be 0. Defaults to 1. This field is alpha-level and is only honored by servers that enable the MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it will be counted towards MaxUnavailable.",
Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"),
},
},
},
},
},
Dependencies: []string{
"k8s.io/apimachinery/pkg/util/intstr.IntOrString"},
}
}
@@ -6406,14 +6422,22 @@ func schema_k8sio_api_apps_v1beta2_RollingUpdateStatefulSetStrategy(ref common.R
Properties: map[string]spec.Schema{
"partition": {
SchemaProps: spec.SchemaProps{
Description: "Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0.",
Description: "Partition indicates the ordinal at which the StatefulSet should be partitioned for updates. During a rolling update, all pods from ordinal Replicas-1 to Partition are updated. All pods from ordinal Partition-1 to 0 remain untouched. This is helpful in being able to do a canary based deployment. The default value is 0.",
Type: []string{"integer"},
Format: "int32",
},
},
"maxUnavailable": {
SchemaProps: spec.SchemaProps{
Description: "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding up. This can not be 0. Defaults to 1. This field is alpha-level and is only honored by servers that enable the MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it will be counted towards MaxUnavailable.",
Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"),
},
},
},
},
},
Dependencies: []string{
"k8s.io/apimachinery/pkg/util/intstr.IntOrString"},
}
}