Documentation
¶
Index ¶
- Constants
- func BootstrapSecurityGroupName(infraID string) string
- func COSInstanceName(infraID string) string
- func CreateSubnetName(clusterID string, role string, zone string) (string, error)
- func NewIamAuthenticator(apiKey string, iamServiceEndpointOverride string) (*core.IamAuthenticator, error)
- func Platform() (*ibmcloud.Platform, error)
- func VPCName(infraID string) string
- func VSIImageCOSBucketName(infraID string) string
- func VSIImageName(infraID string) string
- func Validate(client API, ic *types.InstallConfig) error
- func ValidatePreExistingPublicDNS(client API, ic *types.InstallConfig, metadata *Metadata) error
- func ValidateServiceEndpoints(ic *types.InstallConfig) error
- type API
- type COSResourceNotFoundError
- type Client
- func (c *Client) AttachFloatingIP(ctx context.Context, instanceName string, instanceID string, region string, ...) (*vpcv1.FloatingIP, error)
- func (c *Client) CreateCISDNSRecord(ctx context.Context, cisInstanceCRN string, zoneID string, recordName string, ...) error
- func (c *Client) CreateCOSBucket(ctx context.Context, cosInstanceID string, bucketName string, region string) error
- func (c *Client) CreateCOSInstance(ctx context.Context, cosName string, resourceGroupID string) (*resourcecontrollerv2.ResourceInstance, error)
- func (c *Client) CreateCOSObject(ctx context.Context, sourceData []byte, fileName string, cosInstanceID string, ...) error
- func (c *Client) CreateDNSServicesDNSRecord(ctx context.Context, dnsInstanceID string, zoneID string, recordName string, ...) error
- func (c *Client) CreateDNSServicesPermittedNetwork(ctx context.Context, dnsInstanceID string, dnsZoneID string, vpcCRN string) error
- func (c *Client) CreateIAMAuthorizationPolicy(ctx context.Context, sourceServiceName string, ...) error
- func (c *Client) CreateResourceGroup(ctx context.Context, rgName string) error
- func (c *Client) DeleteCOSBucket(ctx context.Context, cosInstanceID string, bucketName string, region string) error
- func (c *Client) DeleteCOSInstance(ctx context.Context, cosInstanceID string) error
- func (c *Client) DeleteCOSObject(ctx context.Context, cosInstanceID string, bucketName string, objectKey string, ...) error
- func (c *Client) DeleteFloatingIP(ctx context.Context, floatingIPID string, region string) error
- func (c *Client) DeleteSecurityGroup(ctx context.Context, securityGroupID string, region string) error
- func (c *Client) DeleteSecurityGroupTargetBinding(ctx context.Context, securityGroupID string, targetID string, region string) error
- func (c *Client) GetAPIKey() string
- func (c *Client) GetAuthenticatorAPIKeyDetails(ctx context.Context) (*iamidentityv1.APIKey, error)
- func (c *Client) GetCISInstance(ctx context.Context, crnstr string) (*resourcecontrollerv2.ResourceInstance, error)
- func (c *Client) GetCOSBucketByName(ctx context.Context, cosInstanceID string, bucketName string, region string) (*ibms3.Bucket, error)
- func (c *Client) GetCOSInstanceByName(ctx context.Context, cosName string) (*resourcecontrollerv2.ResourceInstance, error)
- func (c *Client) GetChildrenFromParents(ctx context.Context, parentList []globalcatalogv1.CatalogEntry, kind string) ([]globalcatalogv1.CatalogEntry, error)
- func (c *Client) GetDNSInstance(ctx context.Context, crnstr string) (*resourcecontrollerv2.ResourceInstance, error)
- func (c *Client) GetDNSInstancePermittedNetworks(ctx context.Context, dnsID string, dnsZone string) ([]string, error)
- func (c *Client) GetDNSRecordsByName(ctx context.Context, crnstr string, zoneID string, recordName string) ([]dnsrecordsv1.DnsrecordDetails, error)
- func (c *Client) GetDNSZoneIDByName(ctx context.Context, name string, publish types.PublishingStrategy) (string, error)
- func (c *Client) GetDNSZones(ctx context.Context, publish types.PublishingStrategy) ([]responses.DNSZoneResponse, error)
- func (c *Client) GetDedicatedHostByName(ctx context.Context, name string, region string) (*vpcv1.DedicatedHost, error)
- func (c *Client) GetDedicatedHostProfiles(ctx context.Context, region string) ([]vpcv1.DedicatedHostProfile, error)
- func (c *Client) GetEncryptionKey(ctx context.Context, keyCRN string) (*responses.EncryptionKeyResponse, error)
- func (c *Client) GetFloatingIPByName(ctx context.Context, floatingIPName string, region string) (*vpcv1.FloatingIP, error)
- func (c *Client) GetIBMCloudRegions(ctx context.Context) (map[string]string, error)
- func (c *Client) GetLoadBalancer(ctx context.Context, loadBalancerID string) (*vpcv1.LoadBalancer, error)
- func (c *Client) GetResourceGroup(ctx context.Context, nameOrID string) (*resourcemanagerv2.ResourceGroup, error)
- func (c *Client) GetResourceGroups(ctx context.Context) ([]resourcemanagerv2.ResourceGroup, error)
- func (c *Client) GetSSHKeyByPublicKey(ctx context.Context, publicKey string) (*vpcv1.Key, error)
- func (c *Client) GetSecurityGroupByName(ctx context.Context, sgName string, vpcID string, region string) (*vpcv1.SecurityGroup, error)
- func (c *Client) GetSubnet(ctx context.Context, subnetID string) (*vpcv1.Subnet, error)
- func (c *Client) GetSubnetByName(ctx context.Context, subnetName string, region string) (*vpcv1.Subnet, error)
- func (c *Client) GetVPC(ctx context.Context, vpcID string) (*vpcv1.VPC, error)
- func (c *Client) GetVPCByName(ctx context.Context, vpcName string) (*vpcv1.VPC, error)
- func (c *Client) GetVPCZonesForRegion(ctx context.Context, region string) ([]string, error)
- func (c *Client) GetVPCs(ctx context.Context, region string) ([]vpcv1.VPC, error)
- func (c *Client) GetVSI(ctx context.Context, instanceID string, region string) (*vpcv1.Instance, error)
- func (c *Client) GetVSIProfiles(ctx context.Context) ([]vpcv1.InstanceProfile, error)
- func (c *Client) ListCOSBuckets(ctx context.Context, cosInstanceID string, region string) (*ibms3.ListBucketsOutput, error)
- func (c *Client) ListCOSObjects(ctx context.Context, cosInstanceID string, bucketName string, region string) (*ibms3.ListObjectsOutput, error)
- func (c *Client) SetVPCServiceURLForRegion(ctx context.Context, region string) error
- type DNSInstance
- type InstanceType
- type Metadata
- func (m *Metadata) AccountID(ctx context.Context) (string, error)
- func (m *Metadata) AddVPCToPermittedNetworks(ctx context.Context, vpcID string) error
- func (m *Metadata) CISInstanceCRN(ctx context.Context) (string, error)
- func (m *Metadata) Client() (API, error)
- func (m *Metadata) ComputeSubnets(ctx context.Context) (map[string]Subnet, error)
- func (m *Metadata) ControlPlaneSubnets(ctx context.Context) (map[string]Subnet, error)
- func (m *Metadata) CreateDNSRecord(ctx context.Context, recordName string, loadBalancer *vpcv1.LoadBalancer) error
- func (m *Metadata) DNSInstance(ctx context.Context) (*DNSInstance, error)
- func (m *Metadata) GetIAMToken(apiKey string) (*string, error)
- func (m *Metadata) IsVPCPermittedNetwork(ctx context.Context, vpcName string) (bool, error)
- type Subnet
- type VPCResourceNotFoundError
- type Zone
Constants ¶
const ( // BootstrapSGNameSuffix is the suffix value to append for the bootstrap VPC Security Group name. BootstrapSGNameSuffix = "security-group-bootstrap" // KubernetesAPIPort is the Kubernetes API port. KubernetesAPIPort = 6443 // KubernetesAPIPrivateSuffix is the name suffix for Kubernetes API Private LB resources. KubernetesAPIPrivateSuffix = "kubernetes-api-private" // KubernetesAPIPublicSuffix is the name suffix for Kubernetes API Public LB resources. KubernetesAPIPublicSuffix = "kubernetes-api-public" // MachineConfigServerPort is the Machine Config Server port. MachineConfigServerPort = 22623 // MachineConfigSuffix is the name suffix for Machine Config Server LB resources. MachineConfigSuffix = "machine-config" )
const ( // PrivateHostPrefix is the prefix for private API traffic used for DNS Records. PrivateHostPrefix = "api-int." // PublicHostPrefix is the prefix for public API traffic used for DNS Records. PublicHostPrefix = "api." )
Variables ¶
This section is empty.
Functions ¶
func BootstrapSecurityGroupName ¶
BootstrapSecurityGroupName creates a VPC Security Group name using the provided InfraID and bootstrap SG name suffix.
func COSInstanceName ¶
COSInstanceName creates a COS Instance name based on provided InfraID.
func CreateSubnetName ¶
CreateSubnetName will build a subnet name based on the clusterID, subnet role, and subnet zone.
func NewIamAuthenticator ¶
func NewIamAuthenticator(apiKey string, iamServiceEndpointOverride string) (*core.IamAuthenticator, error)
NewIamAuthenticator returns a new IamAuthenticator for using IBM Cloud services.
func VSIImageCOSBucketName ¶
VSIImageCOSBucketName creates a COS Bucket name for the VSI Image, based on provided InfraID.
func VSIImageName ¶
VSIImageName creates a VPC VSI Image name, based on provided InfraID.
func Validate ¶
func Validate(client API, ic *types.InstallConfig) error
Validate executes platform-specific validation.
func ValidatePreExistingPublicDNS ¶
func ValidatePreExistingPublicDNS(client API, ic *types.InstallConfig, metadata *Metadata) error
ValidatePreExistingPublicDNS ensure no pre-existing DNS record exists in the CIS DNS zone for cluster's Kubernetes API.
func ValidateServiceEndpoints ¶
func ValidateServiceEndpoints(ic *types.InstallConfig) error
ValidateServiceEndpoints will validate a series of service endpoint overrides.
Types ¶
type API ¶
type API interface {
AttachFloatingIP(ctx context.Context, instanceName string, instanceID string, region string, resourceGroupName string) (*vpcv1.FloatingIP, error)
CreateCOSBucket(ctx context.Context, cosInstanceID string, bucketName string, region string) error
CreateCOSInstance(ctx context.Context, cosName string, resourceGroupID string) (*resourcecontrollerv2.ResourceInstance, error)
CreateCOSObject(ctx context.Context, sourceData []byte, fileName string, cosInstanceID string, bucketName string, region string) error
CreateCISDNSRecord(ctx context.Context, cisInstanceCRN string, zoneID string, recordName string, cname string) error
CreateDNSServicesDNSRecord(ctx context.Context, dnsInstanceID string, zoneID string, recordName string, cname string) error
CreateDNSServicesPermittedNetwork(ctx context.Context, dnsInstanceID string, dnsZoneID string, vpcCRN string) error
CreateIAMAuthorizationPolicy(tx context.Context, sourceServiceName string, sourceServiceResourceType string, targetServiceName string, targetServiceInstanceID string, roles []string) error
CreateResourceGroup(ctx context.Context, rgName string) error
DeleteCOSBucket(ctx context.Context, cosInstanceID string, bucketName string, region string) error
DeleteCOSInstance(ctx context.Context, cosInstanceID string) error
DeleteCOSObject(ctx context.Context, cosInstanceID string, bucketName string, objectKey string, region string) error
DeleteFloatingIP(ctx context.Context, floatingIPID string, region string) error
DeleteSecurityGroup(ctx context.Context, securityGroupID string, region string) error
DeleteSecurityGroupTargetBinding(ctx context.Context, securityGroupID string, targetID string, region string) error
GetAPIKey() string
GetAuthenticatorAPIKeyDetails(ctx context.Context) (*iamidentityv1.APIKey, error)
GetCISInstance(ctx context.Context, crnstr string) (*resourcecontrollerv2.ResourceInstance, error)
GetCOSBucketByName(ctx context.Context, cosInstanceID string, bucketName string, region string) (*ibms3.Bucket, error)
GetCOSInstanceByName(ctx context.Context, cosName string) (*resourcecontrollerv2.ResourceInstance, error)
GetDNSInstance(ctx context.Context, crnstr string) (*resourcecontrollerv2.ResourceInstance, error)
GetDNSInstancePermittedNetworks(ctx context.Context, dnsID string, dnsZone string) ([]string, error)
GetDedicatedHostByName(ctx context.Context, name string, region string) (*vpcv1.DedicatedHost, error)
GetDedicatedHostProfiles(ctx context.Context, region string) ([]vpcv1.DedicatedHostProfile, error)
GetDNSRecordsByName(ctx context.Context, crnstr string, zoneID string, recordName string) ([]dnsrecordsv1.DnsrecordDetails, error)
GetDNSZoneIDByName(ctx context.Context, name string, publish types.PublishingStrategy) (string, error)
GetDNSZones(ctx context.Context, publish types.PublishingStrategy) ([]responses.DNSZoneResponse, error)
GetEncryptionKey(ctx context.Context, keyCRN string) (*responses.EncryptionKeyResponse, error)
GetIBMCloudRegions(ctx context.Context) (map[string]string, error)
GetFloatingIPByName(ctx context.Context, floatingIPName string, region string) (*vpcv1.FloatingIP, error)
GetLoadBalancer(ctx context.Context, loadBalancerID string) (*vpcv1.LoadBalancer, error)
GetResourceGroups(ctx context.Context) ([]resourcemanagerv2.ResourceGroup, error)
GetResourceGroup(ctx context.Context, nameOrID string) (*resourcemanagerv2.ResourceGroup, error)
GetSecurityGroupByName(ctx context.Context, sgName string, vpcID string, region string) (*vpcv1.SecurityGroup, error)
GetSSHKeyByPublicKey(ctx context.Context, publicKey string) (*vpcv1.Key, error)
GetSubnet(ctx context.Context, subnetID string) (*vpcv1.Subnet, error)
GetSubnetByName(ctx context.Context, subnetName string, region string) (*vpcv1.Subnet, error)
GetVSI(ctx context.Context, instanceID string, region string) (*vpcv1.Instance, error)
GetVSIProfiles(ctx context.Context) ([]vpcv1.InstanceProfile, error)
GetVPC(ctx context.Context, vpcID string) (*vpcv1.VPC, error)
GetVPCs(ctx context.Context, region string) ([]vpcv1.VPC, error)
GetVPCByName(ctx context.Context, vpcName string) (*vpcv1.VPC, error)
GetVPCZonesForRegion(ctx context.Context, region string) ([]string, error)
ListCOSBuckets(ctx context.Context, cosInstanceID string, region string) (*ibms3.ListBucketsOutput, error)
ListCOSObjects(ctx context.Context, cosInstanceID string, bucketName string, region string) (*ibms3.ListObjectsOutput, error)
SetVPCServiceURLForRegion(ctx context.Context, region string) error
}
API represents the calls made to the API.
type COSResourceNotFoundError ¶
type COSResourceNotFoundError struct{}
COSResourceNotFoundError represents an error for a COS resource that is not found.
func (*COSResourceNotFoundError) Error ¶
func (e *COSResourceNotFoundError) Error() string
Error returns the error message for the COSResourceNotFoundError error type.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client makes calls to the IBM Cloud API.
func NewClient ¶
func NewClient(endpoints []configv1.IBMCloudServiceEndpoint) (*Client, error)
NewClient initializes a client with any provided endpoint overrides.
func (*Client) AttachFloatingIP ¶
func (c *Client) AttachFloatingIP(ctx context.Context, instanceName string, instanceID string, region string, resourceGroupName string) (*vpcv1.FloatingIP, error)
AttachFloatingIP will create a new VPC Floating IP resource, attaching it to the provided instance's primary network interface.
func (*Client) CreateCISDNSRecord ¶
func (c *Client) CreateCISDNSRecord(ctx context.Context, cisInstanceCRN string, zoneID string, recordName string, cname string) error
CreateCISDNSRecord creates a DNS Record in the IBM Cloud Internet Services (CIS) zone based on the provided Load Balancer.
func (*Client) CreateCOSBucket ¶
func (c *Client) CreateCOSBucket(ctx context.Context, cosInstanceID string, bucketName string, region string) error
CreateCOSBucket will create a new COS Bucket in the COS Instance, based on the Instance ID.
func (*Client) CreateCOSInstance ¶
func (c *Client) CreateCOSInstance(ctx context.Context, cosName string, resourceGroupID string) (*resourcecontrollerv2.ResourceInstance, error)
CreateCOSInstance will create a new COS Instance and return the ResourceInstance details.
func (*Client) CreateCOSObject ¶
func (c *Client) CreateCOSObject(ctx context.Context, sourceData []byte, fileName string, cosInstanceID string, bucketName string, region string) error
CreateCOSObject will (upload) create a new COS object in the designated COS instance and bucket.
func (*Client) CreateDNSServicesDNSRecord ¶
func (c *Client) CreateDNSServicesDNSRecord(ctx context.Context, dnsInstanceID string, zoneID string, recordName string, cname string) error
CreateDNSServicesDNSRecord create a DNS Record in the DNS Serivces zone, based on provided the Load Balancer.
func (*Client) CreateDNSServicesPermittedNetwork ¶
func (c *Client) CreateDNSServicesPermittedNetwork(ctx context.Context, dnsInstanceID string, dnsZoneID string, vpcCRN string) error
CreateDNSServicesPermittedNetwork will create a new VPC Permitted Network in the specified DNS Services Instance and Zone.
func (*Client) CreateIAMAuthorizationPolicy ¶
func (c *Client) CreateIAMAuthorizationPolicy(ctx context.Context, sourceServiceName string, sourceServiceResourceType string, targetServiceName string, targetServiceInstanceID string, roles []string) error
CreateIAMAuthorizationPolicy creates a new IAM Authorization policy for read access to VPC to a COS Instance.
func (*Client) CreateResourceGroup ¶
CreateResourceGroup creates a new IBM Cloud Resource Group.
func (*Client) DeleteCOSBucket ¶
func (c *Client) DeleteCOSBucket(ctx context.Context, cosInstanceID string, bucketName string, region string) error
DeleteCOSBucket deletes the specified COS Bucket within a COS Instance.
func (*Client) DeleteCOSInstance ¶
DeleteCOSInstance deletes the specified COS Instance by ID.
func (*Client) DeleteCOSObject ¶
func (c *Client) DeleteCOSObject(ctx context.Context, cosInstanceID string, bucketName string, objectKey string, region string) error
DeleteCOSObject deletes the specified COS Object in the specified bucket and instance.
func (*Client) DeleteFloatingIP ¶
DeleteFloatingIP deletes the specified VPC Floating IP by ID and Region. Region is required to make sure the VPC API is using the correct Region, assuming that is required.
func (*Client) DeleteSecurityGroup ¶
func (c *Client) DeleteSecurityGroup(ctx context.Context, securityGroupID string, region string) error
DeleteSecurityGroup deletes the specified security group by ID and Region. Region is required to make sure the VPC API is using the correct Region, assuming that is required.
func (*Client) DeleteSecurityGroupTargetBinding ¶
func (c *Client) DeleteSecurityGroupTargetBinding(ctx context.Context, securityGroupID string, targetID string, region string) error
DeleteSecurityGroupTargetBinding removes the specificied target resource attached to the specified security group.
func (*Client) GetAuthenticatorAPIKeyDetails ¶
GetAuthenticatorAPIKeyDetails gets detailed information on the API key used for authentication to the IBM Cloud APIs
func (*Client) GetCISInstance ¶
func (c *Client) GetCISInstance(ctx context.Context, crnstr string) (*resourcecontrollerv2.ResourceInstance, error)
GetCISInstance gets a specific Cloud Internet Services by its CRN.
func (*Client) GetCOSBucketByName ¶
func (c *Client) GetCOSBucketByName(ctx context.Context, cosInstanceID string, bucketName string, region string) (*ibms3.Bucket, error)
GetCOSBucketByName will get the COS Bucket that matches the name provided.
func (*Client) GetCOSInstanceByName ¶
func (c *Client) GetCOSInstanceByName(ctx context.Context, cosName string) (*resourcecontrollerv2.ResourceInstance, error)
GetCOSInstanceByName will get the COS Instance (ResourceInstance) that matches the name provided.
func (*Client) GetChildrenFromParents ¶
func (c *Client) GetChildrenFromParents(ctx context.Context, parentList []globalcatalogv1.CatalogEntry, kind string) ([]globalcatalogv1.CatalogEntry, error)
GetChildrenFromParents fetches the children from the IBM Catalog using the given list of parents and the specified kind.
func (*Client) GetDNSInstance ¶
func (c *Client) GetDNSInstance(ctx context.Context, crnstr string) (*resourcecontrollerv2.ResourceInstance, error)
GetDNSInstance gets a specific DNS Services instance by its CRN.
func (*Client) GetDNSInstancePermittedNetworks ¶
func (c *Client) GetDNSInstancePermittedNetworks(ctx context.Context, dnsID string, dnsZone string) ([]string, error)
GetDNSInstancePermittedNetworks gets the permitted VPC networks for a DNS Services instance
func (*Client) GetDNSRecordsByName ¶
func (c *Client) GetDNSRecordsByName(ctx context.Context, crnstr string, zoneID string, recordName string) ([]dnsrecordsv1.DnsrecordDetails, error)
GetDNSRecordsByName gets DNS records in specific Cloud Internet Services instance by its CRN, zone ID, and DNS record name.
func (*Client) GetDNSZoneIDByName ¶
func (c *Client) GetDNSZoneIDByName(ctx context.Context, name string, publish types.PublishingStrategy) (string, error)
GetDNSZoneIDByName gets the DNS (Internal) or CIS zone ID from its domain name.
func (*Client) GetDNSZones ¶
func (c *Client) GetDNSZones(ctx context.Context, publish types.PublishingStrategy) ([]responses.DNSZoneResponse, error)
GetDNSZones returns all of the active DNS zones managed by DNS or CIS.
func (*Client) GetDedicatedHostByName ¶
func (c *Client) GetDedicatedHostByName(ctx context.Context, name string, region string) (*vpcv1.DedicatedHost, error)
GetDedicatedHostByName gets dedicated host by name.
func (*Client) GetDedicatedHostProfiles ¶
func (c *Client) GetDedicatedHostProfiles(ctx context.Context, region string) ([]vpcv1.DedicatedHostProfile, error)
GetDedicatedHostProfiles gets a list of profiles supported in a region.
func (*Client) GetEncryptionKey ¶
func (c *Client) GetEncryptionKey(ctx context.Context, keyCRN string) (*responses.EncryptionKeyResponse, error)
GetEncryptionKey gets data for an encryption key
func (*Client) GetFloatingIPByName ¶
func (c *Client) GetFloatingIPByName(ctx context.Context, floatingIPName string, region string) (*vpcv1.FloatingIP, error)
GetFloatingIPByName gets a VPC Floating IP by name.
func (*Client) GetIBMCloudRegions ¶
GetIBMCloudRegions gets the Regions for IBM Cloud, mapped by shortname to descriptive name.
func (*Client) GetLoadBalancer ¶
func (c *Client) GetLoadBalancer(ctx context.Context, loadBalancerID string) (*vpcv1.LoadBalancer, error)
GetLoadBalancer gets a VPC Load Balancer by ID.
func (*Client) GetResourceGroup ¶
func (c *Client) GetResourceGroup(ctx context.Context, nameOrID string) (*resourcemanagerv2.ResourceGroup, error)
GetResourceGroup gets a resource group by its name or ID.
func (*Client) GetResourceGroups ¶
func (c *Client) GetResourceGroups(ctx context.Context) ([]resourcemanagerv2.ResourceGroup, error)
GetResourceGroups gets the list of resource groups.
func (*Client) GetSSHKeyByPublicKey ¶
GetSSHKeyByPublicKey gets an SSH Key by its public key.
func (*Client) GetSecurityGroupByName ¶
func (c *Client) GetSecurityGroupByName(ctx context.Context, sgName string, vpcID string, region string) (*vpcv1.SecurityGroup, error)
GetSecurityGroupByName gets a Security Group by its Name, within the specified VPC (ID) and Region.
func (*Client) GetSubnetByName ¶
func (c *Client) GetSubnetByName(ctx context.Context, subnetName string, region string) (*vpcv1.Subnet, error)
GetSubnetByName gets a subnet by its Name.
func (*Client) GetVPCByName ¶
GetVPCByName gets a VPC by its name.
func (*Client) GetVPCZonesForRegion ¶
GetVPCZonesForRegion gets the supported zones for a VPC region.
func (*Client) GetVSI ¶
func (c *Client) GetVSI(ctx context.Context, instanceID string, region string) (*vpcv1.Instance, error)
GetVSI gets a VPC Virtual Service Instance with provided ID.
func (*Client) GetVSIProfiles ¶
GetVSIProfiles gets a list of all VSI profiles.
func (*Client) ListCOSBuckets ¶
func (c *Client) ListCOSBuckets(ctx context.Context, cosInstanceID string, region string) (*ibms3.ListBucketsOutput, error)
ListCOSBuckets lists Buckets in the specified COS Instance.
type DNSInstance ¶
DNSInstance holds information for a DNS Services instance
type InstanceType ¶
type InstanceType string
InstanceType is the IBM Cloud network services type being used
const ( // CISInstanceType is a Cloud Internet Services InstanceType CISInstanceType InstanceType = "CIS" // DNSInstanceType is a DNS Services InstanceType DNSInstanceType InstanceType = "DNS" )
type Metadata ¶
type Metadata struct {
BaseDomain string
ComputeSubnetNames []string
ControlPlaneSubnetNames []string
Region string
// contains filtered or unexported fields
}
Metadata holds additional metadata for InstallConfig resources that does not need to be user-supplied (e.g. because it can be retrieved from external APIs).
func NewMetadata ¶
func NewMetadata(config *types.InstallConfig) *Metadata
NewMetadata initializes a new Metadata object.
func (*Metadata) AccountID ¶
AccountID returns the IBM Cloud account ID associated with the authentication credentials.
func (*Metadata) AddVPCToPermittedNetworks ¶
AddVPCToPermittedNetworks adds a VPC to the DNS Services Zone of Permitted Networks.
func (*Metadata) CISInstanceCRN ¶
CISInstanceCRN returns the Cloud Internet Services instance CRN that is managing the DNS zone for the base domain.
func (*Metadata) ComputeSubnets ¶
ComputeSubnets gets the Subnet details for compute subnets
func (*Metadata) ControlPlaneSubnets ¶
ControlPlaneSubnets gets the Subnet details for control plane subnets
func (*Metadata) CreateDNSRecord ¶
func (m *Metadata) CreateDNSRecord(ctx context.Context, recordName string, loadBalancer *vpcv1.LoadBalancer) error
CreateDNSRecord creates a CNAME DNS Record in the IBM Cloud Internet Services zone or DNS Services zone for a Load Balancer hostname, based on the PublishStrategy.
func (*Metadata) DNSInstance ¶
func (m *Metadata) DNSInstance(ctx context.Context) (*DNSInstance, error)
DNSInstance returns a DNSInstance holding information about the DNS Services instance managing the DNS zone for the base domain.
func (*Metadata) GetIAMToken ¶
GetIAMToken will retrieve an IAM access token using an IAM Authenticator and API Key.
type VPCResourceNotFoundError ¶
type VPCResourceNotFoundError struct{}
VPCResourceNotFoundError represents an error for a VPC resoruce that is not found.
func (*VPCResourceNotFoundError) Error ¶
func (e *VPCResourceNotFoundError) Error() string
Error returns the error message for the VPCResourceNotFoundError error type.