-
Notifications
You must be signed in to change notification settings - Fork 71
Make ProvisioningNetwork values an enum #19
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -21,6 +21,10 @@ import ( | |||||||
| operatorv1 "github.com/openshift/api/operator/v1" | ||||||||
| ) | ||||||||
|
|
||||||||
| // ProvisioningNetwork is the boot mode of the system | ||||||||
| // +kubebuilder:validation:Enum=Managed;Unmanaged;Disabled | ||||||||
| type ProvisioningNetwork string | ||||||||
|
|
||||||||
| // ProvisioningSpec defines the desired state of Provisioning | ||||||||
| type ProvisioningSpec struct { | ||||||||
| // ProvisioningInterface is the name of the network interface | ||||||||
|
|
@@ -84,14 +88,17 @@ type ProvisioningSpec struct { | |||||||
| // installation. If using metal3 for power management, BMCs must be | ||||||||
| // accessible from the machine networks. User should provide two IPs on | ||||||||
| // the external network that would be used for provisioning services. | ||||||||
| ProvisioningNetwork string `json:"provisioningNetwork,omitempty"` | ||||||||
| ProvisioningNetwork ProvisioningNetwork `json:"provisioningNetwork,omitempty"` | ||||||||
| } | ||||||||
|
|
||||||||
| // ProvisioningStatus defines the observed state of Provisioning | ||||||||
| type ProvisioningStatus struct { | ||||||||
| operatorv1.OperatorStatus `json:",inline"` | ||||||||
| } | ||||||||
|
|
||||||||
| // +kubebuilder:resource:path=provisionings,scope=Cluster | ||||||||
| // +kubebuilder:subresource:status | ||||||||
|
|
||||||||
| // Provisioning contains configuration used by the Provisioning | ||||||||
| // service (Ironic) to provision baremetal hosts. | ||||||||
| // Provisioning is created by the OpenShift installer using admin or | ||||||||
|
|
@@ -100,12 +107,7 @@ type ProvisioningStatus struct { | |||||||
| // This CR is a singleton, created by the installer and currently only | ||||||||
| // consumed by the cluster-baremetal-operator to bring up and update | ||||||||
| // containers in a metal3 cluster. | ||||||||
|
|
||||||||
| // +kubebuilder:object:root=true | ||||||||
| // +kubebuilder:resource:path=provisionings,scope=Cluster | ||||||||
| // +kubebuilder:subresource:status | ||||||||
|
|
||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. any reason for moving these back up?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moving this back did not affect
This change was needed for the yaml file to have https://github.com/openshift/machine-api-operator/blob/master/install/0000_30_machine-api-operator_04_metal3provisioning.crd.yaml#L17-L24. |
||||||||
| // Provisioning is the Schema for the provisionings API | ||||||||
| type Provisioning struct { | ||||||||
| metav1.TypeMeta `json:",inline"` | ||||||||
| metav1.ObjectMeta `json:"metadata,omitempty"` | ||||||||
|
|
||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,7 @@ spec: | |
| status: {} | ||
| validation: | ||
| openAPIV3Schema: | ||
| description: Provisioning is the Schema for the provisionings API | ||
| description: Provisioning contains configuration used by the Provisioning service (Ironic) to provision baremetal hosts. Provisioning is created by the OpenShift installer using admin or user provided information about the provisioning network and the NIC on the server that can be used to PXE boot it. This CR is a singleton, created by the installer and currently only consumed by the cluster-baremetal-operator to bring up and update containers in a metal3 cluster. | ||
| properties: | ||
| apiVersion: | ||
| description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
|
|
@@ -45,6 +45,10 @@ spec: | |
| type: string | ||
| provisioningNetwork: | ||
| description: ProvisioningNetwork provides a way to indicate the state of the underlying network configuration for the provisioning network. This field can have one of the following values - `Managed`- when the provisioning network is completely managed by the Baremetal IPI solution. `Unmanaged`- when the provsioning network is present and used but the user is responsible for managing DHCP. Virtual media provisioning is recommended but PXE is still available if required. `Disabled`- when the provisioning network is fully disabled. User can bring up the baremetal cluster using virtual media or assisted installation. If using metal3 for power management, BMCs must be accessible from the machine networks. User should provide two IPs on the external network that would be used for provisioning services. | ||
| enum: | ||
| - Managed | ||
| - Unmanaged | ||
| - Disabled | ||
| type: string | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Making the change in #19 (comment) made these changes in 46 - 49 disappear. |
||
| provisioningNetworkCIDR: | ||
| description: ProvisioningNetworkCIDR is the network on which the baremetal nodes are provisioned. The provisioningIP and the IPs in the dhcpRange all come from within this network. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the type of ProvisioningNetwork has changed but in the resulting yaml file it is still a string.