Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCPCLOUD-2563: Add Machine/MachineSet API for MAPI to CAPI migration #1818

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions features.md
Expand Up @@ -4,6 +4,7 @@
| ClusterAPIInstallAzure| | | | | | |
| ClusterAPIInstallIBMCloud| | | | | | |
| EventedPLEG| | | | | | |
| MachineAPIMigration| | | | | | |
| MachineAPIOperatorDisableMachineHealthCheckController| | | | | | |
| GatewayAPI| | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | | |
| AutomatedEtcdBackup| | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
Expand Down
6 changes: 6 additions & 0 deletions features/features.go
Expand Up @@ -535,4 +535,10 @@ var (
productScope(ocpSpecific).
enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade).
mustRegister()

FeatureGateMachineAPIMigration = newFeatureGate("MachineAPIMigration").
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

intentionally never enabled?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. As this is greenfield, there's a lot to build before we have something that works. My hope was that we can get this all set up to a point where there's actually something tangible before adding to a feature set some time in 4.17

reportProblemsToJiraComponent("OCPCLOUD").
contactPerson("jspeed").
productScope(ocpSpecific).
mustRegister()
)

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions machine/v1/types_aws.go
Expand Up @@ -20,6 +20,7 @@ type AWSResourceReference struct {
ARN *string `json:"arn,omitempty"`
// Filters is a set of filters used to identify a resource.
// +optional
// +listType=atomic
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with this type of list, what does it do?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Atomic lists are updated as a unit. This is actually the default behaviour when specified, hence, in most cases, the correct thing to do for backward compat is to set the default explicitly.

The alternatives are map and set, maps I believe you've seen before, and sets are problematic, so we avoid them

Filters *[]AWSResourceFilter `json:"filters,omitempty"`
}

Expand All @@ -45,5 +46,6 @@ type AWSResourceFilter struct {
Name string `json:"name"`
// Values includes one or more filter values. Filter values are case-sensitive.
// +optional
// +listType=atomic
Values []string `json:"values,omitempty"`
}
4 changes: 4 additions & 0 deletions machine/v1/types_controlplanemachineset.go
Expand Up @@ -247,14 +247,17 @@ type FailureDomains struct {
Platform configv1.PlatformType `json:"platform"`

// AWS configures failure domain information for the AWS platform.
// +listType=atomic
// +optional
AWS *[]AWSFailureDomain `json:"aws,omitempty"`

// Azure configures failure domain information for the Azure platform.
// +listType=atomic
// +optional
Azure *[]AzureFailureDomain `json:"azure,omitempty"`

// GCP configures failure domain information for the GCP platform.
// +listType=atomic
// +optional
GCP *[]GCPFailureDomain `json:"gcp,omitempty"`

Expand All @@ -272,6 +275,7 @@ type FailureDomains struct {
// + Some OpenStack deployments may not have availability zones or root volumes.
// + Therefore we'll check the length of the list to determine if it's empty instead
// + of nil if it would be a pointer.
// +listType=atomic
// +optional
OpenStack []OpenStackFailureDomain `json:"openstack,omitempty"`

Expand Down

Large diffs are not rendered by default.

Expand Up @@ -7,6 +7,7 @@ metadata:
capability.openshift.io/name: MachineAPI
exclude.release.openshift.io/internal-openshift-hosted: "true"
include.release.openshift.io/self-managed-high-availability: "true"
release.openshift.io/feature-set: Default
name: controlplanemachinesets.machine.openshift.io
spec:
group: machine.openshift.io
Expand Down Expand Up @@ -238,10 +239,12 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- name
type: object
type: array
x-kubernetes-list-type: atomic
id:
description: ID of resource.
type: string
Expand Down Expand Up @@ -271,6 +274,7 @@ spec:
? has(self.filters) : !has(self.filters)'
type: object
type: array
x-kubernetes-list-type: atomic
azure:
description: Azure configures failure domain information
for the Azure platform.
Expand All @@ -295,6 +299,7 @@ spec:
- zone
type: object
type: array
x-kubernetes-list-type: atomic
gcp:
description: GCP configures failure domain information
for the GCP platform.
Expand All @@ -310,6 +315,7 @@ spec:
- zone
type: object
type: array
x-kubernetes-list-type: atomic
nutanix:
description: nutanix configures failure domain information
for the Nutanix platform.
Expand Down Expand Up @@ -411,6 +417,7 @@ spec:
rule: '!has(self.availabilityZone) || !has(self.rootVolume)
|| has(self.rootVolume.availabilityZone)'
type: array
x-kubernetes-list-type: atomic
platform:
description: Platform identifies the platform for which
the FailureDomain represents. Currently supported values
Expand Down Expand Up @@ -733,6 +740,9 @@ spec:
- uid
type: object
type: array
x-kubernetes-list-map-keys:
- uid
x-kubernetes-list-type: map
type: object
providerID:
description: ProviderID is the identification ID of the
Expand Down Expand Up @@ -804,6 +814,7 @@ spec:
- key
type: object
type: array
x-kubernetes-list-type: atomic
type: object
required:
- metadata
Expand Down