Skip to content

Commit c5ab55b

Browse files
Add node pool recycling options
1 parent ed6d14c commit c5ab55b

7 files changed

+55
-152
lines changed

config/crd/bases/infrastructure.cluster.x-k8s.io_ocimanagedmachinepools.yaml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -77,28 +77,6 @@ spec:
7777
description: NodeMetadata defines a list of key/value pairs to add
7878
to each underlying OCI instance in the node pool on launch.
7979
type: object
80-
nodePoolCyclingDetails:
81-
description: NodePoolCyclingDetails defines the node pool recycling
82-
options.
83-
properties:
84-
isNodeCyclingEnabled:
85-
description: IsNodeCyclingEnabled refers if nodes in the nodepool
86-
will be cycled to have new changes.
87-
type: boolean
88-
maximumSurge:
89-
description: MaximumSurge refers to the maximum additional new
90-
compute instances that would be temporarily created and added
91-
to nodepool during the cycling nodepool process. OKE supports
92-
both integer and percentage input. Defaults to 1, Ranges from
93-
0 to Nodepool size or 0% to 100%
94-
type: string
95-
maximumUnavailable:
96-
description: Maximum active nodes that would be terminated from
97-
nodepool during the cycling nodepool process. OKE supports both
98-
integer and percentage input. Defaults to 0, Ranges from 0 to
99-
Nodepool size or 0% to 100%
100-
type: string
101-
type: object
10280
nodePoolNodeConfig:
10381
description: NodePoolNodeConfig defines the configuration of nodes
10482
in the node pool.

config/crd/bases/infrastructure.cluster.x-k8s.io_ocimanagedmachinepooltemplates.yaml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -90,28 +90,6 @@ spec:
9090
to add to each underlying OCI instance in the node pool
9191
on launch.
9292
type: object
93-
nodePoolCyclingDetails:
94-
description: NodePoolCyclingDetails defines the node pool
95-
recycling options.
96-
properties:
97-
isNodeCyclingEnabled:
98-
description: IsNodeCyclingEnabled refers if nodes in the
99-
nodepool will be cycled to have new changes.
100-
type: boolean
101-
maximumSurge:
102-
description: MaximumSurge refers to the maximum additional
103-
new compute instances that would be temporarily created
104-
and added to nodepool during the cycling nodepool process.
105-
OKE supports both integer and percentage input. Defaults
106-
to 1, Ranges from 0 to Nodepool size or 0% to 100%
107-
type: string
108-
maximumUnavailable:
109-
description: Maximum active nodes that would be terminated
110-
from nodepool during the cycling nodepool process. OKE
111-
supports both integer and percentage input. Defaults
112-
to 0, Ranges from 0 to Nodepool size or 0% to 100%
113-
type: string
114-
type: object
11593
nodePoolNodeConfig:
11694
description: NodePoolNodeConfig defines the configuration
11795
of nodes in the node pool.

exp/api/v1beta1/conversion.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,7 @@ func Convert_v1beta2_NetworkDetails_To_v1beta1_NetworkDetails(in *infrastructure
5151
func Convert_v1beta2_OCIManagedControlPlaneSpec_To_v1beta1_OCIManagedControlPlaneSpec(in *v1beta2.OCIManagedControlPlaneSpec, out *OCIManagedControlPlaneSpec, s conversion.Scope) error {
5252
return autoConvert_v1beta2_OCIManagedControlPlaneSpec_To_v1beta1_OCIManagedControlPlaneSpec(in, out, s)
5353
}
54+
55+
func Convert_v1beta2_OCIManagedMachinePoolSpec_To_v1beta1_OCIManagedMachinePoolSpec(in *v1beta2.OCIManagedMachinePoolSpec, out *OCIManagedMachinePoolSpec, s conversion.Scope) error {
56+
return autoConvert_v1beta2_OCIManagedMachinePoolSpec_To_v1beta1_OCIManagedMachinePoolSpec(in, out, s)
57+
}

exp/api/v1beta1/ocimanagedmachinepool_conversion.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ func (src *OCIManagedMachinePool) ConvertTo(dstRaw conversion.Hub) error {
3434
if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok {
3535
return err
3636
}
37+
dst.Spec.NodePoolCyclingDetails = restored.Spec.NodePoolCyclingDetails
3738

3839
return nil
3940
}

exp/api/v1beta1/ocimanagedmachinepool_types.go

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ type OCIManagedMachinePoolSpec struct {
5959
// +optional
6060
InitialNodeLabels []KeyValue `json:"initialNodeLabels,omitempty"`
6161

62-
// NodePoolCyclingDetails defines the node pool recycling options.
63-
// +optional
64-
NodePoolCyclingDetails *NodePoolCyclingDetails `json:"nodePoolCyclingDetails,omitempty"`
65-
6662
// ProviderIDList are the identification IDs of machine instances provided by the provider.
6763
// This field must match the provider IDs as seen on the node objects corresponding to a machine pool's machine instances.
6864
// +optional
@@ -195,25 +191,6 @@ type KeyValue struct {
195191
Value *string `json:"value,omitempty"`
196192
}
197193

198-
// NodePoolCyclingDetails defines the node pool recycling options
199-
type NodePoolCyclingDetails struct {
200-
201-
// IsNodeCyclingEnabled refers if nodes in the nodepool will be cycled to have new changes.
202-
// +optional
203-
IsNodeCyclingEnabled *bool `json:"isNodeCyclingEnabled,omitempty"`
204-
205-
// MaximumSurge refers to the maximum additional new compute instances that would be temporarily created and
206-
// added to nodepool during the cycling nodepool process. OKE supports both integer and percentage input.
207-
// Defaults to 1, Ranges from 0 to Nodepool size or 0% to 100%
208-
// +optional
209-
MaximumSurge *string `json:"maximumSurge,omitempty"`
210-
211-
// Maximum active nodes that would be terminated from nodepool during the cycling nodepool process.
212-
// OKE supports both integer and percentage input. Defaults to 0, Ranges from 0 to Nodepool size or 0% to 100%
213-
// +optional
214-
MaximumUnavailable *string `json:"maximumUnavailable,omitempty"`
215-
}
216-
217194
// OCIManagedMachinePoolStatus defines the observed state of OCIManagedMachinePool
218195
type OCIManagedMachinePoolStatus struct {
219196
// +optional

exp/api/v1beta1/zz_generated.conversion.go

Lines changed: 50 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

exp/api/v1beta1/zz_generated.deepcopy.go

Lines changed: 0 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)