|
66 | 66 | spec:
|
67 | 67 | description: MachineSetSpec defines the desired state of MachineSet
|
68 | 68 | properties:
|
| 69 | + authoritativeAPI: |
| 70 | + default: MachineAPI |
| 71 | + description: |- |
| 72 | + authoritativeAPI is the API that is authoritative for this resource. |
| 73 | + Valid values are MachineAPI and ClusterAPI. |
| 74 | + When set to MachineAPI, writes to the spec of the machine.openshift.io copy of this resource will be reflected into the cluster.x-k8s.io copy. |
| 75 | + When set to ClusterAPI, writes to the spec of the cluster.x-k8s.io copy of this resource will be reflected into the machine.openshift.io copy. |
| 76 | + Updates to the status will be reflected in both copies of the resource, based on the controller implementing the functionality of the API. |
| 77 | + Currently the authoritative API determines which controller will manage the resource, this will change in a future release. |
| 78 | + To ensure the change has been accepted, please verify that the `status.authoritativeAPI` field has been updated to the desired value and that the `Synchronized` condition is present and set to `True`. |
| 79 | + enum: |
| 80 | + - MachineAPI |
| 81 | + - ClusterAPI |
| 82 | + type: string |
69 | 83 | deletePolicy:
|
70 | 84 | description: |-
|
71 | 85 | deletePolicy defines the policy used to identify nodes to delete when downscaling.
|
@@ -267,6 +281,20 @@ spec:
|
267 | 281 | Specification of the desired behavior of the machine.
|
268 | 282 | More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
269 | 283 | properties:
|
| 284 | + authoritativeAPI: |
| 285 | + default: MachineAPI |
| 286 | + description: |- |
| 287 | + authoritativeAPI is the API that is authoritative for this resource. |
| 288 | + Valid values are MachineAPI and ClusterAPI. |
| 289 | + When set to MachineAPI, writes to the spec of the machine.openshift.io copy of this resource will be reflected into the cluster.x-k8s.io copy. |
| 290 | + When set to ClusterAPI, writes to the spec of the cluster.x-k8s.io copy of this resource will be reflected into the machine.openshift.io copy. |
| 291 | + Updates to the status will be reflected in both copies of the resource, based on the controller implementing the functionality of the API. |
| 292 | + Currently the authoritative API determines which controller will manage the resource, this will change in a future release. |
| 293 | + To ensure the change has been accepted, please verify that the `status.authoritativeAPI` field has been updated to the desired value and that the `Synchronized` condition is present and set to `True`. |
| 294 | + enum: |
| 295 | + - MachineAPI |
| 296 | + - ClusterAPI |
| 297 | + type: string |
270 | 298 | lifecycleHooks:
|
271 | 299 | description: |-
|
272 | 300 | lifecycleHooks allow users to pause operations on the machine at
|
@@ -535,6 +563,23 @@ spec:
|
535 | 563 | status:
|
536 | 564 | description: MachineSetStatus defines the observed state of MachineSet
|
537 | 565 | properties:
|
| 566 | + authoritativeAPI: |
| 567 | + description: |- |
| 568 | + authoritativeAPI is the API that is authoritative for this resource. |
| 569 | + Valid values are MachineAPI, ClusterAPI and Migrating. |
| 570 | + This value is updated by the migration controller to reflect the authoritative API. |
| 571 | + Machine API and Cluster API controllers use this value to determine whether or not to reconcile the resource. |
| 572 | + When set to Migrating, the migration controller is currently performing the handover of authority from one API to the other. |
| 573 | + enum: |
| 574 | + - MachineAPI |
| 575 | + - ClusterAPI |
| 576 | + - Migrating |
| 577 | + type: string |
| 578 | + x-kubernetes-validations: |
| 579 | + - message: The authoritativeAPI field must not transition directly |
| 580 | + from MachineAPI to ClusterAPI or vice versa. It must transition |
| 581 | + through Migrating. |
| 582 | + rule: self == 'Migrating' || self == oldSelf || oldSelf == 'Migrating' |
538 | 583 | availableReplicas:
|
539 | 584 | description: The number of available replicas (ready for at least
|
540 | 585 | minReadySeconds) for this MachineSet.
|
@@ -630,7 +675,23 @@ spec:
|
630 | 675 | description: replicas is the most recently observed number of replicas.
|
631 | 676 | format: int32
|
632 | 677 | type: integer
|
| 678 | + synchronizedGeneration: |
| 679 | + description: |- |
| 680 | + synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with. |
| 681 | + This field is set when the authoritative resource is updated and the sync controller has updated the non-authoritative resource to match. |
| 682 | + format: int64 |
| 683 | + minimum: 0 |
| 684 | + type: integer |
633 | 685 | type: object
|
| 686 | + x-kubernetes-validations: |
| 687 | + - fieldPath: .synchronizedGeneration |
| 688 | + message: synchronizedGeneration must not decrease unless authoritativeAPI |
| 689 | + is transitioning from Migrating to another value |
| 690 | + reason: FieldValueInvalid |
| 691 | + rule: '!has(oldSelf.synchronizedGeneration) || (has(self.synchronizedGeneration) |
| 692 | + && self.synchronizedGeneration >= oldSelf.synchronizedGeneration) |
| 693 | + || (oldSelf.authoritativeAPI == ''Migrating'' && self.authoritativeAPI |
| 694 | + != ''Migrating'')' |
634 | 695 | type: object
|
635 | 696 | served: true
|
636 | 697 | storage: true
|
|
0 commit comments