Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 129 additions & 0 deletions data/data/install.openshift.io_installconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,30 @@ spec:
- high_performance
type: string
type: object
powervs:
description: PowerVS is the configuration used when installing
on IBM Power VS.
properties:
memory:
description: Memory defines the memory in GB for the instance.
type: integer
procType:
description: ProcType defines the processor sharing model
for the instance.
type: string
processors:
description: Processors defines the processing units for
the instance.
sysType:
description: SysType defines the system type for instance.
type: string
volumeIDs:
description: VolumeIDs is the list of volumes attached to
the instance.
items:
type: string
type: array
type: object
vsphere:
description: VSphere is the configuration used when installing
on vSphere.
Expand Down Expand Up @@ -825,6 +849,30 @@ spec:
- high_performance
type: string
type: object
powervs:
description: PowerVS is the configuration used when installing
on IBM Power VS.
properties:
memory:
description: Memory defines the memory in GB for the instance.
type: integer
procType:
description: ProcType defines the processor sharing model
for the instance.
type: string
processors:
description: Processors defines the processing units for the
instance.
sysType:
description: SysType defines the system type for instance.
type: string
volumeIDs:
description: VolumeIDs is the list of volumes attached to
the instance.
items:
type: string
type: array
type: object
vsphere:
description: VSphere is the configuration used when installing
on vSphere.
Expand Down Expand Up @@ -1966,6 +2014,87 @@ spec:
- ovirt_cluster_id
- ovirt_storage_domain_id
type: object
powervs:
description: PowerVS is the configuration used when installing on
Power VS.
properties:
APIKey:
description: APIKey is the API key for the user's IBM Cloud account.
type: string
clusterOSImage:
description: ClusterOSImage is a pre-created Power VS boot image
that overrides the default image for cluster nodes.
type: string
defaultMachinePlatform:
description: DefaultMachinePlatform is the default configuration
used when installing on Power VS for machine pools which do
not define their own platform configuration.
properties:
memory:
description: Memory defines the memory in GB for the instance.
type: integer
procType:
description: ProcType defines the processor sharing model
for the instance.
type: string
processors:
description: Processors defines the processing units for the
instance.
sysType:
description: SysType defines the system type for instance.
type: string
volumeIDs:
description: VolumeIDs is the list of volumes attached to
the instance.
items:
type: string
type: array
type: object
powervsResourceGroup:
description: PowerVSResourceGroup is the resource group for creating
Power VS resources.
type: string
pvsNetworkName:
description: PVSNetworkName specifies an existing network within
the Power VS Service Instance.
type: string
region:
description: Region specifies the IBM Cloud region where the cluster
will be created.
type: string
serviceInstance:
description: ServiceInstanceID is the ID of the Power IAAS instance
created from the IBM Cloud Catalog
type: string
subnets:
description: Subnets specifies existing subnets (by ID) where
cluster resources will be created. Leave unset to have the
installer create subnets in a new VPC on your behalf.
items:
type: string
type: array
userID:
description: UserID is the login for the user's IBM Cloud account.
type: string
vpc:
description: VPC is a VPC inside IBM Cloud. Needed in order to
create VPC Load Balancers.
type: string
vpcRegion:
description: Zone in the region used to create VPC resources.
Leave unset to allow installer to randomly select a zone.
type: string
zone:
description: Zone specifies the IBM Cloud colo region where the
cluster will be created. Required for multi-zone regions.
type: string
required:
- powervsResourceGroup
- region
- serviceInstance
- userID
- zone
type: object
vsphere:
description: VSphere is the configuration used when installing on
vSphere.
Expand Down
5 changes: 5 additions & 0 deletions pkg/types/clustermetadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/openshift/installer/pkg/types/libvirt"
"github.com/openshift/installer/pkg/types/openstack"
"github.com/openshift/installer/pkg/types/ovirt"
"github.com/openshift/installer/pkg/types/powervs"
"github.com/openshift/installer/pkg/types/vsphere"
)

Expand All @@ -34,6 +35,7 @@ type ClusterPlatformMetadata struct {
IBMCloud *ibmcloud.Metadata `json:"ibmcloud,omitempty"`
BareMetal *baremetal.Metadata `json:"baremetal,omitempty"`
Ovirt *ovirt.Metadata `json:"ovirt,omitempty"`
PowerVS *powervs.Metadata `json:"powervs,omitempty"`
VSphere *vsphere.Metadata `json:"vsphere,omitempty"`
}

Expand Down Expand Up @@ -68,6 +70,9 @@ func (cpm *ClusterPlatformMetadata) Platform() string {
if cpm.Ovirt != nil {
return ovirt.Name
}
if cpm.PowerVS != nil {
return powervs.Name
}
if cpm.VSphere != nil {
return vsphere.Name
}
Expand Down
3 changes: 3 additions & 0 deletions pkg/types/defaults/installconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
nonedefaults "github.com/openshift/installer/pkg/types/none/defaults"
openstackdefaults "github.com/openshift/installer/pkg/types/openstack/defaults"
ovirtdefaults "github.com/openshift/installer/pkg/types/ovirt/defaults"
powervsdefaults "github.com/openshift/installer/pkg/types/powervs/defaults"
vspheredefaults "github.com/openshift/installer/pkg/types/vsphere/defaults"
)

Expand Down Expand Up @@ -105,6 +106,8 @@ func SetInstallConfigDefaults(c *types.InstallConfig) {
for i := range c.Compute {
ovirtdefaults.SetComputeDefaults(c.Platform.Ovirt, &c.Compute[i])
}
case c.Platform.PowerVS != nil:
powervsdefaults.SetPlatformDefaults(c.Platform.PowerVS)
case c.Platform.None != nil:
nonedefaults.SetPlatformDefaults(c.Platform.None)
}
Expand Down
8 changes: 8 additions & 0 deletions pkg/types/installconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/openshift/installer/pkg/types/none"
"github.com/openshift/installer/pkg/types/openstack"
"github.com/openshift/installer/pkg/types/ovirt"
"github.com/openshift/installer/pkg/types/powervs"
"github.com/openshift/installer/pkg/types/vsphere"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
Expand Down Expand Up @@ -45,6 +46,7 @@ var (
baremetal.Name,
ibmcloud.Name,
none.Name,
powervs.Name,
}

// OKD is a setting to enable community-only modifications
Expand Down Expand Up @@ -198,6 +200,10 @@ type Platform struct {
// +optional
OpenStack *openstack.Platform `json:"openstack,omitempty"`

// PowerVS is the configuration used when installing on Power VS.
// +optional
PowerVS *powervs.Platform `json:"powervs,omitempty"`

// VSphere is the configuration used when installing on vSphere.
// +optional
VSphere *vsphere.Platform `json:"vsphere,omitempty"`
Expand Down Expand Up @@ -234,6 +240,8 @@ func (p *Platform) Name() string {
return vsphere.Name
case p.Ovirt != nil:
return ovirt.Name
case p.PowerVS != nil:
return powervs.Name
default:
return ""
}
Expand Down
6 changes: 6 additions & 0 deletions pkg/types/machinepools.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/openshift/installer/pkg/types/libvirt"
"github.com/openshift/installer/pkg/types/openstack"
"github.com/openshift/installer/pkg/types/ovirt"
"github.com/openshift/installer/pkg/types/powervs"
"github.com/openshift/installer/pkg/types/vsphere"
)

Expand Down Expand Up @@ -96,6 +97,9 @@ type MachinePoolPlatform struct {

// Ovirt is the configuration used when installing on oVirt.
Ovirt *ovirt.MachinePool `json:"ovirt,omitempty"`

// PowerVS is the configuration used when installing on IBM Power VS.
PowerVS *powervs.MachinePool `json:"powervs,omitempty"`
}

// Name returns a string representation of the platform (e.g. "aws" if
Expand Down Expand Up @@ -123,6 +127,8 @@ func (p *MachinePoolPlatform) Name() string {
return vsphere.Name
case p.Ovirt != nil:
return ovirt.Name
case p.PowerVS != nil:
return powervs.Name
default:
return ""
}
Expand Down
8 changes: 8 additions & 0 deletions pkg/types/powervs/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md
# This file just uses aliases defined in OWNERS_ALIASES in the root of the
# installer repo.

approvers:
- powervs-approvers
reviewers:
- powervs-reviewers
9 changes: 9 additions & 0 deletions pkg/types/powervs/defaults/platform.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package defaults

import (
"github.com/openshift/installer/pkg/types/powervs"
)

// SetPlatformDefaults sets the defaults for the platform.
func SetPlatformDefaults(p *powervs.Platform) {
}
6 changes: 6 additions & 0 deletions pkg/types/powervs/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Package powervs contains Power VS-specific structures for installer
// configuration and management.
package powervs

// Name is name for the Power VS platform.
const Name string = "powervs"
51 changes: 51 additions & 0 deletions pkg/types/powervs/machinepools.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package powervs

// MachinePool stores the configuration for a machine pool installed on IBM Power VS.
type MachinePool struct {
// VolumeIDs is the list of volumes attached to the instance.
//
// +optional
VolumeIDs []string `json:"volumeIDs"`

// Memory defines the memory in GB for the instance.
//
// +optional
Memory int `json:"memory"`

// Processors defines the processing units for the instance.
//
// +optional
Processors float64 `json:"processors"`

// ProcType defines the processor sharing model for the instance.
//
// +optional
ProcType string `json:"procType"`

// SysType defines the system type for instance.
//
// +optional
SysType string `json:"sysType"`
}

// Set stores values from required into a
func (a *MachinePool) Set(required *MachinePool) {
if required == nil || a == nil {
return
}
if len(required.VolumeIDs) != 0 {
a.VolumeIDs = required.VolumeIDs
}
if required.Memory != 0 {
a.Memory = required.Memory
}
if required.Processors != 0 {
a.Processors = required.Processors
}
if required.ProcType != "" {
a.ProcType = required.ProcType
}
if required.SysType != "" {
a.SysType = required.SysType
}
}
8 changes: 8 additions & 0 deletions pkg/types/powervs/metadata.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package powervs

// Metadata contains Power VS metadata (e.g. for uninstalling the cluster).
type Metadata struct {
CISInstanceCRN string `json:"cisInstanceCRN"`
Region string `json:"region"`
Zone string `json:"zone"`
}
Loading