ibmcloud

package
v0.90.100 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 1 Imported by: 14

Documentation

Overview

Package ibmcloud contains IBM Cloud-specific structures for installer configuration and management.

Index

Constants

View Source
const (

	// IBMCloudServiceCISVar is the variable name used by the IBM Cloud Terraform Provider to override the CIS endpoint.
	IBMCloudServiceCISVar string = "IBMCLOUD_CIS_API_ENDPOINT"

	// IBMCloudServiceCOSVar is the variable name used by the IBM Cloud Terraform Provider to override the COS endpoint.
	IBMCloudServiceCOSVar string = "IBMCLOUD_COS_CONFIG_ENDPOINT"

	// IBMCloudServiceDNSServicesVar is the variable name used by the IBM Cloud Terraform Provider to override the DNS Services endpoint.
	IBMCloudServiceDNSServicesVar string = "IBMCLOUD_PRIVATE_DNS_API_ENDPOINT"

	// IBMCloudServiceGlobalSearchVar is the variable name used by the IBM Cloud Terraform Provider to override the Global Search endpoint.
	IBMCloudServiceGlobalSearchVar string = "IBMCLOUD_GS_API_ENDPOINT" //nolint:gosec // not hardcoded creds

	// IBMCloudServiceGlobalTaggingVar is the variable name used by the IBM Cloud Terraform Provider to override the Global Tagging endpoint.
	IBMCloudServiceGlobalTaggingVar string = "IBMCLOUD_GT_API_ENDPOINT" //nolint:gosec // not hardcoded creds

	// IBMCloudServiceHyperProtectVar is the variable name used by the IBM Cloud Terraform Provider to override the Hyper Protect endpoint.
	IBMCloudServiceHyperProtectVar string = "IBMCLOUD_HPCS_API_ENDPOINT"

	// IBMCloudServiceIAMVar is the variable name used by the IBM Cloud Terraform Provider to override the IAM endpoint.
	IBMCloudServiceIAMVar string = "IBMCLOUD_IAM_API_ENDPOINT"

	// IBMCloudServiceKeyProtectVar is the variable name used by the IBM Cloud Terraform Provider to override the Key Protect endpoint.
	IBMCloudServiceKeyProtectVar string = "IBMCLOUD_KP_API_ENDPOINT" //nolint:gosec // not hardcoded creds

	// IBMCloudServiceResourceControllerVar is the variable name used by the IBM Cloud Terraform Provider to override the Resource Controller endpoint.
	IBMCloudServiceResourceControllerVar string = "IBMCLOUD_RESOURCE_CONTROLLER_API_ENDPOINT"

	// IBMCloudServiceResourceManagerVar is the variable name used by the IBM Cloud Terraform Provider to override the Resource Manager endpoint.
	IBMCloudServiceResourceManagerVar string = "IBMCLOUD_RESOURCE_MANAGEMENT_API_ENDPOINT"

	// IBMCloudServiceVPCVar is the variable name used by the IBM Cloud Terraform Provider to override the VPC endpoint.
	IBMCloudServiceVPCVar string = "IBMCLOUD_IS_NG_API_ENDPOINT"
)
View Source
const Name string = "ibmcloud"

Name is name for the ibmcloud platform.

Variables

Functions

func CheckServiceEndpointOverride added in v0.9.153

func CheckServiceEndpointOverride(service configv1.IBMCloudServiceName, serviceEndpoints []configv1.IBMCloudServiceEndpoint) string

CheckServiceEndpointOverride checks whether a service has an override endpoint.

Types

type BootVolume

type BootVolume struct {
	// EncryptionKey is the CRN referencing a Key Protect or Hyper Protect
	// Crypto Services key to use for volume encryption. If not specified, a
	// provider managed encryption key will be used.
	// +optional
	EncryptionKey string `json:"encryptionKey,omitempty"`
}

BootVolume stores the configuration for an individual machine's boot volume.

type DedicatedHost

type DedicatedHost struct {
	// Name is the name of the dedicated host to provision the machine on. If
	// specified, machines will be created on pre-existing dedicated host.
	// +optional
	Name string `json:"name,omitempty"`

	// Profile is the profile ID for the dedicated host. If specified, new
	// dedicated host will be created for machines.
	// +optional
	Profile string `json:"profile,omitempty"`
}

DedicatedHost stores the configuration for the machine's dedicated host platform.

type EndpointsJSON added in v0.9.153

type EndpointsJSON struct {
	// IBMCloudEndpointCIS contains endpoint mapping for IBM Cloud CIS.
	IBMCloudEndpointCIS *EndpointsVisibility `json:"IBMCLOUD_CIS_API_ENDPOINT,omitempty"`

	// IBMCloudEndpointCOS contains endpoint mapping for IBM Cloud COS.
	IBMCloudEndpointCOS *EndpointsVisibility `json:"IBMCLOUD_COS_CONFIG_ENDPOINT,omitempty"`

	// IBMCloudEndpointDNSServices contains endpoint mapping for IBM Cloud DNS Services.
	IBMCloudEndpointDNSServices *EndpointsVisibility `json:"IBMCLOUD_PRIVATE_DNS_API_ENDPOINT,omitempty"`

	// IBMCloudEndpointGlobalSearch contains endpoint mapping for IBM Cloud Global Search.
	IBMCloudEndpointGlobalSearch *EndpointsVisibility `json:"IBMCLOUD_GS_API_ENDPOINT,omitempty"`

	// IBMCloudEndpointGlobalTagging contains endpoint mapping for IBM Cloud Global Tagging.
	IBMCloudEndpointGlobalTagging *EndpointsVisibility `json:"IBMCLOUD_GT_API_ENDPOINT,omitempty"`

	// IBMCloudEndpointHyperProtect contains endpoint mapping for IBM Cloud Hyper Protect.
	IBMCloudEndpointHyperProtect *EndpointsVisibility `json:"IBMCLOUD_HPCS_API_ENDPOINT,omitempty"`

	// IBMCloudEndpointIAM contains endpoint mapping for IBM Cloud IAM.
	IBMCloudEndpointIAM *EndpointsVisibility `json:"IBMCLOUD_IAM_API_ENDPOINT,omitempty"`

	// IBMCloudEndpointKeyProtect contains endpoint mapping for IBM Cloud Key Protect.
	IBMCloudEndpointKeyProtect *EndpointsVisibility `json:"IBMCLOUD_KP_API_ENDPOINT,omitempty"`

	// IBMCloudEndpointResourceController contains endpoint mapping for IBM Cloud Resource Controller.
	IBMCloudEndpointResourceController *EndpointsVisibility `json:"IBMCLOUD_RESOURCE_CONTROLLER_API_ENDPOINT,omitempty"`

	// IBMCloudEndpointResourceManager contains endpoint mapping for IBM Cloud Resource Manager.
	IBMCloudEndpointResourceManager *EndpointsVisibility `json:"IBMCLOUD_RESOURCE_MANAGEMENT_API_ENDPOINT,omitempty"`

	// IBMCloudEndpointVPC contains endpoint mapping for IBM Cloud VPC.
	IBMCloudEndpointVPC *EndpointsVisibility `json:"IBMCLOUD_IS_NG_API_ENDPOINT,omitempty"`
}

EndpointsJSON represents the JSON format to override IBM Cloud Terraform provider utilized service endpoints. https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/guides/custom-service-endpoints#file-structure-for-endpoints-file

type EndpointsVisibility added in v0.9.153

type EndpointsVisibility struct {
	// Private is a string-string map of a region name to endpoint URL
	// To prevent maintaining a list of supported regions here, we simply use a map instead of a struct
	Private map[string]string `json:"private"`

	// Public is a string-string map of a region name to endpoint URL
	// To prevent maintaining a list of supported regions here, we simply use a map instead of a struct
	Public map[string]string `json:"public"`
}

EndpointsVisibility contains region mapped endpoint for a service.

type MachinePool

type MachinePool struct {
	// InstanceType is the VSI machine profile.
	InstanceType string `json:"type,omitempty"`

	// Zones is the list of availability zones used for machines in the pool.
	// +optional
	Zones []string `json:"zones,omitempty"`

	// BootVolume is the configuration for the machine's boot volume.
	// +optional
	BootVolume *BootVolume `json:"bootVolume,omitempty"`

	// DedicatedHosts is the configuration for the machine's dedicated host and profile.
	// +optional
	DedicatedHosts []DedicatedHost `json:"dedicatedHosts,omitempty"`
}

MachinePool stores the configuration for a machine pool installed on IBM Cloud.

func (*MachinePool) Set

func (a *MachinePool) Set(required *MachinePool)

Set sets the values from `required` to `a`.

type Metadata

type Metadata struct {
	AccountID         string                             `json:"accountID"`
	BaseDomain        string                             `json:"baseDomain"`
	CISInstanceCRN    string                             `json:"cisInstanceCRN,omitempty"`
	DNSInstanceID     string                             `json:"dnsInstanceID,omitempty"`
	Region            string                             `json:"region,omitempty"`
	ResourceGroupName string                             `json:"resourceGroupName,omitempty"`
	ServiceEndpoints  []configv1.IBMCloudServiceEndpoint `json:"serviceEndpoints,omitempty"`
	Subnets           []string                           `json:"subnets,omitempty"`
	VPC               string                             `json:"vpc,omitempty"`
}

Metadata contains IBM Cloud metadata (e.g. for uninstalling the cluster).

type Platform

type Platform struct {
	// Region specifies the IBM Cloud region where the cluster will be
	// created.
	Region string `json:"region"`

	// ResourceGroupName is the name of an already existing resource group where the
	// cluster should be installed. If empty, a new resource group will be created
	// for the cluster.
	// +optional
	ResourceGroupName string `json:"resourceGroupName,omitempty"`

	// NetworkResourceGroupName is the name of an already existing resource group
	// where an existing VPC and set of Subnets exist, to be used during cluster
	// creation.
	// +optional
	NetworkResourceGroupName string `json:"networkResourceGroupName,omitempty"`

	// VPCName is the name of an already existing VPC to be used during cluster
	// creation.
	// +optional
	VPCName string `json:"vpcName,omitempty"`

	// ControlPlaneSubnets are the names of already existing subnets where the
	// cluster control plane nodes should be created.
	// +optional
	ControlPlaneSubnets []string `json:"controlPlaneSubnets,omitempty"`

	// ComputeSubnets are the names of already existing subnets where the cluster
	// compute nodes should be created.
	// +optional
	ComputeSubnets []string `json:"computeSubnets,omitempty"`

	// DefaultMachinePlatform is the default configuration used when installing
	// on IBM Cloud for machine pools which do not define their own platform
	// configuration.
	// +optional
	DefaultMachinePlatform *MachinePool `json:"defaultMachinePlatform,omitempty"`

	// ServiceEndpoints is a list which contains custom endpoints to override default
	// service endpoints of IBM Cloud Services.
	// There must only be one ServiceEndpoint for a service (no duplicates).
	// +optional
	ServiceEndpoints []configv1.IBMCloudServiceEndpoint `json:"serviceEndpoints,omitempty"`
}

Platform stores all the global configuration that all machinesets use.

func (*Platform) ClusterResourceGroupName

func (p *Platform) ClusterResourceGroupName(infraID string) string

ClusterResourceGroupName returns the name of the resource group for the cluster.

func (*Platform) GetVPCName

func (p *Platform) GetVPCName() string

GetVPCName returns the user provided name of the VPC for the cluster.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL