Skip to content

Commit

Permalink
🐛 Remove unused MachinePool deployment strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
Cecile Robert-Michon committed Dec 3, 2020
1 parent ca2cf1a commit ad87315
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 47 deletions.
23 changes: 0 additions & 23 deletions config/crd/bases/exp.cluster.x-k8s.io_machinepools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -394,29 +394,6 @@ spec:
description: Number of desired machines. Defaults to 1. This is a pointer to distinguish between explicit zero and not specified.
format: int32
type: integer
strategy:
description: The deployment strategy to use to replace existing machine instances with new ones.
properties:
rollingUpdate:
description: Rolling update config params. Present only if MachineDeploymentStrategyType = RollingUpdate.
properties:
maxSurge:
anyOf:
- type: integer
- type: string
description: 'The maximum number of machines that can be scheduled above the desired number of machines. Value can be an absolute number (ex: 5) or a percentage of desired machines (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 1. Example: when this is set to 30%, the new MachineSet can be scaled up immediately when the rolling update starts, such that the total number of old and new machines do not exceed 130% of desired machines. Once old machines have been killed, new MachineSet can be scaled up further, ensuring that total number of machines running at any time during the update is at most 130% of desired machines.'
x-kubernetes-int-or-string: true
maxUnavailable:
anyOf:
- type: integer
- type: string
description: 'The maximum number of machines that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired machines (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 0. Example: when this is set to 30%, the old MachineSet can be scaled down to 70% of desired machines immediately when the rolling update starts. Once new machines are ready, old MachineSet can be scaled down further, followed by scaling up the new MachineSet, ensuring that the total number of machines available at all times during the update is at least 70% of desired machines.'
x-kubernetes-int-or-string: true
type: object
type:
description: Type of deployment. Currently the only supported strategy is "RollingUpdate". Default is RollingUpdate.
type: string
type: object
template:
description: Template describes the machines that will be created.
properties:
Expand Down
27 changes: 27 additions & 0 deletions exp/api/v1alpha3/conversion.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha3

import (
"k8s.io/apimachinery/pkg/conversion"
"sigs.k8s.io/cluster-api/exp/api/v1alpha4"
)

// Convert_v1alpha3_MachinePoolSpec_To_v1alpha4_MachinePoolSpec is an autogenerated conversion function.
func Convert_v1alpha3_MachinePoolSpec_To_v1alpha4_MachinePoolSpec(in *MachinePoolSpec, out *v1alpha4.MachinePoolSpec, s conversion.Scope) error {
return autoConvert_v1alpha3_MachinePoolSpec_To_v1alpha4_MachinePoolSpec(in, out, s)
}
42 changes: 28 additions & 14 deletions exp/api/v1alpha3/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions exp/api/v1alpha4/machinepool_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ type MachinePoolSpec struct {
// Template describes the machines that will be created.
Template clusterv1.MachineTemplateSpec `json:"template"`

// The deployment strategy to use to replace existing machine instances with
// new ones.
// +optional
Strategy *clusterv1.MachineDeploymentStrategy `json:"strategy,omitempty"`

// Minimum number of seconds for which a newly created machine instances should
// be ready.
// Defaults to 0 (machine instance will be considered available as soon as it
Expand Down
5 changes: 0 additions & 5 deletions exp/api/v1alpha4/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ad87315

Please sign in to comment.