Documentation
¶
Index ¶
- Constants
- func GetCatalogOfferingVersionCRN(offeringName, offeringSelect string) (string, error)
- func GetImage(mCtx *mc.Context, args *PiImageArgs) (*string, error)
- func GetImageIDByCatalogOfferingCRN(catalogOfferingCRN string) (string, error)
- func GetLatestCatalogOfferingVersionCRN(arch, offeringSelect string) (string, string, error)
- func GetVPCImage(args *VPCImageArgs) (*string, error)
- func ProfileSupportsSpot(name string) (bool, error)
- type BareMetalSelector
- type ComputeSelector
- type PiImageArgs
- type SubnetInfo
- type VPCImageArgs
Constants ¶
const ( // Values for the offering select scope, as accepted by the // GetConsumptionOfferings 'select' query parameter. OfferingSelectAll = "all" OfferingSelectPublic = "public" OfferingSelectPrivate = "private" )
const ( VPC_ARCH_X86_64 vpcArch = "amd64" VPC_ARCH_IBMZ vpcArch = "s390x" )
Variables ¶
This section is empty.
Functions ¶
func GetCatalogOfferingVersionCRN ¶ added in v0.14.6
GetCatalogOfferingVersionCRN returns the version CRN for the offering with the exact given name. offeringSelect controls which offerings are scanned: OfferingSelectPrivate restricts the scan to the account's private catalogs (much smaller than the default all, which includes the full public catalog), while OfferingSelectPublic or OfferingSelectAll may be used for offerings published to the public catalog.
func GetImageIDByCatalogOfferingCRN ¶ added in v0.14.8
GetImageIDByCatalogOfferingCRN returns the ID of the VPC image that belongs to the catalog offering version.
A bare metal server needs an image ID: BareMetalServerPrototype has no catalog offering field, unlike the virtual server instance prototype. The image is the one published for the offering, so the bare metal server runs the same SNC bundle as the instance.
func GetLatestCatalogOfferingVersionCRN ¶ added in v0.14.6
GetLatestCatalogOfferingVersionCRN returns the latest version (by semver) and its CRN among the openshift-local offerings for the given arch. offeringSelect has the same meaning as in GetCatalogOfferingVersionCRN.
func GetVPCImage ¶
func GetVPCImage(args *VPCImageArgs) (*string, error)
func ProfileSupportsSpot ¶ added in v0.14.5
ProfileSupportsSpot returns true when the named profile permits spot (preemptible) instances. Profiles with a fixed availability class of "standard" only cannot be used with spot.
Types ¶
type BareMetalSelector ¶ added in v0.14.8
type BareMetalSelector struct{}
BareMetalSelector selects IBM Cloud VPC bare metal server profiles.
IBM Cloud provides nested virtualization (KVM) to the guest on bare metal servers only. A virtual server instance cannot expose /dev/kvm, so OpenShift Virtualization does not work on it. The selector reads the same ComputeRequestArgs fields as the instance selector and returns a metal profile.
func NewBareMetalSelector ¶ added in v0.14.8
func NewBareMetalSelector() *BareMetalSelector
func (*BareMetalSelector) CheckCapacity ¶ added in v0.14.8
func (c *BareMetalSelector) CheckCapacity(profile, zone string) error
CheckCapacity returns an error when IBM Cloud has no free bare metal server of the profile in the zone.
IBM Cloud allocates bare metal servers from a limited pool in each zone, so the check turns a late create failure into a clear error before the stack starts.
func (*BareMetalSelector) Select ¶ added in v0.14.8
func (c *BareMetalSelector) Select(args *computerequest.ComputeRequestArgs) ([]string, error)
Select returns the smallest IBM Cloud VPC bare metal profile that satisfies the requested core count, memory size, architecture and optional family allowlist. The profile names come from ListBareMetalServerProfiles.
type ComputeSelector ¶ added in v0.14.5
type ComputeSelector struct{}
func NewComputeSelector ¶ added in v0.14.5
func NewComputeSelector() *ComputeSelector
func (*ComputeSelector) Select ¶ added in v0.14.5
func (c *ComputeSelector) Select(args *computerequest.ComputeRequestArgs) ([]string, error)
Select returns the smallest IBM Cloud VPC instance profile name satisfying the requested CPUs, memory, and optional family restrictions. The profile must support the amd64 architecture.
type PiImageArgs ¶
type SubnetInfo ¶ added in v0.14.8
SubnetInfo is the subset of an IBM Cloud VPC subnet the actions need before Pulumi starts.
func GetSubnet ¶ added in v0.14.8
func GetSubnet(subnetID string) (*SubnetInfo, error)
GetSubnet fetches an existing VPC subnet by ID through the IBM Cloud VPC API. It is used before Pulumi starts — e.g. to resolve the zone of a user-provided subnet for a capacity check. The existence of the subnet is validated again, inside the stack, by the network module.
type VPCImageArgs ¶
type VPCImageArgs struct {
Name string
Arch vpcArch
}