Documentation ¶
Index ¶
- func NewIamAuthenticator(apiKey string) (*core.IamAuthenticator, error)
- func Platform() (*ibmcloud.Platform, error)
- func Validate(client API, ic *types.InstallConfig) error
- func ValidatePreExistingPublicDNS(client API, ic *types.InstallConfig, metadata *Metadata) error
- type API
- type Client
- 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) 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) GetResourceGroup(ctx context.Context, nameOrID string) (*resourcemanagerv2.ResourceGroup, error)
- func (c *Client) GetResourceGroups(ctx context.Context) ([]resourcemanagerv2.ResourceGroup, 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) GetVSIProfiles(ctx context.Context) ([]vpcv1.InstanceProfile, 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) 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) DNSInstance(ctx context.Context) (*DNSInstance, error)
- func (m *Metadata) IsVPCPermittedNetwork(ctx context.Context, vpcName string) (bool, error)
- type Subnet
- type VPCResourceNotFoundError
- type Zone
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewIamAuthenticator ¶
func NewIamAuthenticator(apiKey string) (*core.IamAuthenticator, error)
NewIamAuthenticator returns a new IamAuthenticator for using IBM Cloud services.
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.
Types ¶
type API ¶
type API interface { GetAPIKey() string GetAuthenticatorAPIKeyDetails(ctx context.Context) (*iamidentityv1.APIKey, error) GetCISInstance(ctx context.Context, crnstr 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) GetResourceGroups(ctx context.Context) ([]resourcemanagerv2.ResourceGroup, error) GetResourceGroup(ctx context.Context, nameOrID string) (*resourcemanagerv2.ResourceGroup, error) GetSubnet(ctx context.Context, subnetID string) (*vpcv1.Subnet, error) GetSubnetByName(ctx context.Context, subnetName string, region string) (*vpcv1.Subnet, 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) SetVPCServiceURLForRegion(ctx context.Context, region string) error }
API represents the calls made to the API.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client makes calls to the IBM Cloud API.
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) 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) 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) 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) GetVSIProfiles ¶
GetVSIProfiles gets a list of all VSI profiles.
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(baseDomain string, region string, controlPlaneSubnets []string, computeSubnets []string) *Metadata
NewMetadata initializes a new Metadata object.
func (*Metadata) AccountID ¶
AccountID returns the IBM Cloud account ID associated with the authentication credentials.
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) 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.
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.