Documentation
¶
Index ¶
- func NewDriver() types.Driver
- type ClusterManagerClient
- func (mgr *ClusterManagerClient) CreateBastionSubnets(ctx context.Context, state *State, vcnID, subnetRouteID string, isPrivate bool, ...) ([]string, error)
- func (mgr *ClusterManagerClient) CreateCluster(ctx context.Context, state *State, vcnID string, ...) error
- func (mgr *ClusterManagerClient) CreateNodePool(ctx context.Context, state *State, vcnID string, ...) error
- func (mgr *ClusterManagerClient) CreateNodeSecurityList(ctx context.Context, state *State, vcnId *string, nodeCidrBlock string, ...) ([]string, error)
- func (mgr *ClusterManagerClient) CreateNodeSubnets(ctx context.Context, state *State, vcnID, subnetRouteID string, isPrivate bool, ...) ([]string, error)
- func (mgr *ClusterManagerClient) CreateServiceSecurityList(ctx context.Context, state *State, vcnId *string, name string) ([]string, error)
- func (mgr *ClusterManagerClient) CreateServiceSubnets(ctx context.Context, state *State, vcnID, subnetRouteID string, isPrivate bool, ...) ([]string, error)
- func (mgr *ClusterManagerClient) CreateSubnetWithDetails(displayName *string, cidrBlock *string, dnsLabel *string, ...) (core.Subnet, error)
- func (mgr *ClusterManagerClient) CreateVCNAndNetworkResources(state *State) (string, []string, []string, error)
- func (mgr *ClusterManagerClient) DeleteCluster(ctx context.Context, clusterID string) error
- func (mgr *ClusterManagerClient) DeleteNodePool(ctx context.Context, nodePoolID string) error
- func (mgr *ClusterManagerClient) DeleteVCN(ctx context.Context, vcnID string) error
- func (mgr *ClusterManagerClient) GetClusterByID(ctx context.Context, clusterID string) (containerengine.Cluster, error)
- func (mgr *ClusterManagerClient) GetClusterByName(ctx context.Context, compartmentID, name string) (string, error)
- func (mgr *ClusterManagerClient) GetKubeconfigByClusterID(ctx context.Context, clusterID, region string) (store.KubeConfig, string, error)
- func (mgr *ClusterManagerClient) GetNodePoolByID(ctx context.Context, nodePoolID string) (containerengine.NodePool, error)
- func (mgr *ClusterManagerClient) GetSubnetByName(ctx context.Context, compartmentID, vcnID, displayName string) (core.Subnet, error)
- func (mgr *ClusterManagerClient) GetSubnetIDByName(ctx context.Context, compartmentID, vcnID, displayName string) (string, error)
- func (mgr *ClusterManagerClient) GetVcnByName(ctx context.Context, compartmentID, displayName string) (core.Vcn, error)
- func (mgr *ClusterManagerClient) GetVcnIDByClusterID(ctx context.Context, clusterID string) (string, error)
- func (mgr *ClusterManagerClient) GetVcnIDByName(ctx context.Context, compartmentID, displayName string) (string, error)
- func (mgr *ClusterManagerClient) ListInternetGatewayIdsInVcn(ctx context.Context, compartmentID, vcnID string) ([]string, error)
- func (mgr *ClusterManagerClient) ListNatGatewayIdsInVcn(ctx context.Context, compartmentID, vcnID string) ([]string, error)
- func (mgr *ClusterManagerClient) ListNodepoolIdsInCluster(ctx context.Context, compartmentID, clusterID string) ([]string, error)
- func (mgr *ClusterManagerClient) ListRouteTableIdsInVcn(ctx context.Context, compartmentID, vcnID string) ([]string, error)
- func (mgr *ClusterManagerClient) ListSecurityListIdsInVcn(ctx context.Context, compartmentID, vcnID string) ([]string, error)
- func (mgr *ClusterManagerClient) ListSubnetIdsInVcn(ctx context.Context, compartmentID, vcnID string) ([]string, error)
- func (mgr *ClusterManagerClient) ScaleNodePool(ctx context.Context, nodePoolID string, quantityPerSubnet int) error
- func (mgr *ClusterManagerClient) UpdateMasterKubernetesVersion(ctx context.Context, clusterID, version string) error
- func (mgr *ClusterManagerClient) UpdateNodepoolKubernetesVersion(ctx context.Context, nodePoolID, version string) error
- type NetworkConfiguration
- type NodeConfiguration
- type OKEDriver
- func (d *OKEDriver) Create(ctx context.Context, opts *types.DriverOptions, _ *types.ClusterInfo) (*types.ClusterInfo, error)
- func (d *OKEDriver) ETCDRemoveSnapshot(ctx context.Context, clusterInfo *types.ClusterInfo, opts *types.DriverOptions, ...) error
- func (d *OKEDriver) ETCDRestore(ctx context.Context, clusterInfo *types.ClusterInfo, opts *types.DriverOptions, ...) (*types.ClusterInfo, error)
- func (d *OKEDriver) ETCDSave(ctx context.Context, clusterInfo *types.ClusterInfo, opts *types.DriverOptions, ...) error
- func (d *OKEDriver) GetCapabilities(ctx context.Context) (*types.Capabilities, error)
- func (d *OKEDriver) GetClusterSize(ctx context.Context, info *types.ClusterInfo) (*types.NodeCount, error)
- func (d *OKEDriver) GetDriverCreateOptions(ctx context.Context) (*types.DriverFlags, error)
- func (d *OKEDriver) GetDriverUpdateOptions(ctx context.Context) (*types.DriverFlags, error)
- func (d *OKEDriver) GetK8SCapabilities(ctx context.Context, options *types.DriverOptions) (*types.K8SCapabilities, error)
- func (d *OKEDriver) GetVersion(ctx context.Context, info *types.ClusterInfo) (*types.KubernetesVersion, error)
- func (d *OKEDriver) PostCheck(ctx context.Context, info *types.ClusterInfo) (*types.ClusterInfo, error)
- func (d *OKEDriver) Remove(ctx context.Context, info *types.ClusterInfo) error
- func (d *OKEDriver) RemoveLegacyServiceAccount(ctx context.Context, info *types.ClusterInfo) error
- func (d *OKEDriver) SetClusterSize(ctx context.Context, info *types.ClusterInfo, count *types.NodeCount) error
- func (d *OKEDriver) SetVersion(ctx context.Context, info *types.ClusterInfo, version *types.KubernetesVersion) error
- func (d *OKEDriver) Update(ctx context.Context, info *types.ClusterInfo, opts *types.DriverOptions) (*types.ClusterInfo, error)
- type SignRequest
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClusterManagerClient ¶
type ClusterManagerClient struct {
// contains filtered or unexported fields
}
Defines / contains the OCI/OKE/Identity clients and operations.
func NewClusterManagerClient ¶
func NewClusterManagerClient(configuration common.ConfigurationProvider) (*ClusterManagerClient, error)
NewClusterManagerClient creates a new OCI cluster manager, which has a set of clients (CE, VCN, Identity).
func (*ClusterManagerClient) CreateBastionSubnets ¶
func (mgr *ClusterManagerClient) CreateBastionSubnets(ctx context.Context, state *State, vcnID, subnetRouteID string, isPrivate bool, securityListIds []string) ([]string, error)
CreateBastionSubnets creates the (public) bastion subnet(s), or an error.
func (*ClusterManagerClient) CreateCluster ¶
func (mgr *ClusterManagerClient) CreateCluster(ctx context.Context, state *State, vcnID string, serviceSubnetIds, nodeSubnetIds []string) error
CreateCluster creates a new cluster with no initial node pool and attaches it to the existing network resources, or an error. TODO stop passing in state
func (*ClusterManagerClient) CreateNodePool ¶
func (mgr *ClusterManagerClient) CreateNodePool(ctx context.Context, state *State, vcnID string, serviceSubnetIds, nodeSubnetIds []string) error
CreateNodePool creates a new node pool (i.e. a set of compute nodes) for the cluster, or an error. TODO stop passing in state
func (*ClusterManagerClient) CreateNodeSecurityList ¶
func (mgr *ClusterManagerClient) CreateNodeSecurityList(ctx context.Context, state *State, vcnId *string, nodeCidrBlock string, serviceCidrBlock string, name string) ([]string, error)
Create the node security list
func (*ClusterManagerClient) CreateNodeSubnets ¶
func (mgr *ClusterManagerClient) CreateNodeSubnets(ctx context.Context, state *State, vcnID, subnetRouteID string, isPrivate bool, securityListIds []string) ([]string, error)
CreateNodeSubnets creates (public or private) regional node subnet, or an error. TODO stop passing in state
func (*ClusterManagerClient) CreateServiceSecurityList ¶
func (mgr *ClusterManagerClient) CreateServiceSecurityList(ctx context.Context, state *State, vcnId *string, name string) ([]string, error)
Create the service security list
func (*ClusterManagerClient) CreateServiceSubnets ¶
func (mgr *ClusterManagerClient) CreateServiceSubnets(ctx context.Context, state *State, vcnID, subnetRouteID string, isPrivate bool, securityListIds []string) ([]string, error)
CreateServiceSubnets creates the regional (public) service subnet (i.e. load balancer subnet), or an error.
func (*ClusterManagerClient) CreateSubnetWithDetails ¶
func (mgr *ClusterManagerClient) CreateSubnetWithDetails(displayName *string, cidrBlock *string, dnsLabel *string, availableDomain *string, vcnID *string, routeTableID *string, isPrivate bool, securityListIds []string, state *State) (core.Subnet, error)
CreateSubnetWithDetails creates a new subnet in the specified VCN, or an error. TODO stop passing in state
func (*ClusterManagerClient) CreateVCNAndNetworkResources ¶
func (mgr *ClusterManagerClient) CreateVCNAndNetworkResources(state *State) (string, []string, []string, error)
CreateVCNAndNetworkResources creates a new Virtual Cloud Network and required resources including security lists, Internet Gateway, default route rule, etc., or an error.
func (*ClusterManagerClient) DeleteCluster ¶
func (mgr *ClusterManagerClient) DeleteCluster(ctx context.Context, clusterID string) error
DeleteCluster deletes the cluster with the specified ID, or an error.
func (*ClusterManagerClient) DeleteNodePool ¶
func (mgr *ClusterManagerClient) DeleteNodePool(ctx context.Context, nodePoolID string) error
DeleteNodePool deletes the node pool with the specified ID, or an error
func (*ClusterManagerClient) DeleteVCN ¶
func (mgr *ClusterManagerClient) DeleteVCN(ctx context.Context, vcnID string) error
DeleteVCN deletes the VCN and its associated resources (subnets, attached gateways, etc.) with the specified ID, or an error.
func (*ClusterManagerClient) GetClusterByID ¶
func (mgr *ClusterManagerClient) GetClusterByID(ctx context.Context, clusterID string) (containerengine.Cluster, error)
GetClusterByID returns the cluster with the specified Id, or an error
func (*ClusterManagerClient) GetClusterByName ¶
func (mgr *ClusterManagerClient) GetClusterByName(ctx context.Context, compartmentID, name string) (string, error)
GetClusterByName returns the Cluster ID of the Cluster with the specified name in the specified compartment or an error if it is not found.
func (*ClusterManagerClient) GetKubeconfigByClusterID ¶
func (mgr *ClusterManagerClient) GetKubeconfigByClusterID(ctx context.Context, clusterID, region string) (store.KubeConfig, string, error)
GetKubeconfigByClusterID is a wrapper for the CreateKubeconfig operation that that handles errors and unmarshaling, or an error.
func (*ClusterManagerClient) GetNodePoolByID ¶
func (mgr *ClusterManagerClient) GetNodePoolByID(ctx context.Context, nodePoolID string) (containerengine.NodePool, error)
GetNodePoolByID returns the node pool with the specified Id, or an error.
func (*ClusterManagerClient) GetSubnetByName ¶
func (mgr *ClusterManagerClient) GetSubnetByName(ctx context.Context, compartmentID, vcnID, displayName string) (core.Subnet, error)
GetSubnetIDByName returns the subnet with the specified name in the specified VCN and compartment, or an error if it is not found.
func (*ClusterManagerClient) GetSubnetIDByName ¶
func (mgr *ClusterManagerClient) GetSubnetIDByName(ctx context.Context, compartmentID, vcnID, displayName string) (string, error)
GetSubnetIDByName returns the subnet ID of the subnet with the specified name in the specified VCN and compartment, or an error if it is not found.
func (*ClusterManagerClient) GetVcnByName ¶
func (mgr *ClusterManagerClient) GetVcnByName(ctx context.Context, compartmentID, displayName string) (core.Vcn, error)
GetVcnIDByName returns the VCN with the specified name in the specified compartment or an error if it is not found.
func (*ClusterManagerClient) GetVcnIDByClusterID ¶
func (mgr *ClusterManagerClient) GetVcnIDByClusterID(ctx context.Context, clusterID string) (string, error)
GetVcnIDByClusterID returns the VCN ID for the existing cluster with the specified Id, or an error.
func (*ClusterManagerClient) GetVcnIDByName ¶
func (mgr *ClusterManagerClient) GetVcnIDByName(ctx context.Context, compartmentID, displayName string) (string, error)
GetVcnIDByName returns the VCN ID of the VCN with the specified name in the specified compartment or an error if it is not found.
func (*ClusterManagerClient) ListInternetGatewayIdsInVcn ¶
func (mgr *ClusterManagerClient) ListInternetGatewayIdsInVcn(ctx context.Context, compartmentID, vcnID string) ([]string, error)
ListInternetGatewayIdsInVcn returns the route table IDs of any and all Internet gateways in the specified VCN.
func (*ClusterManagerClient) ListNatGatewayIdsInVcn ¶
func (mgr *ClusterManagerClient) ListNatGatewayIdsInVcn(ctx context.Context, compartmentID, vcnID string) ([]string, error)
ListNatGatewayIdsInVcn returns the NAT gateway IDs of any and all NAT gateways in the specified VCN.
func (*ClusterManagerClient) ListNodepoolIdsInCluster ¶
func (mgr *ClusterManagerClient) ListNodepoolIdsInCluster(ctx context.Context, compartmentID, clusterID string) ([]string, error)
ListNodepoolIdsInCluster returns the node pool IDs of any and all node pools in the specified cluster.
func (*ClusterManagerClient) ListRouteTableIdsInVcn ¶
func (mgr *ClusterManagerClient) ListRouteTableIdsInVcn(ctx context.Context, compartmentID, vcnID string) ([]string, error)
ListRouteTableIdsInVcn returns the route table IDs of any and all route tables in the specified VCN.
func (*ClusterManagerClient) ListSecurityListIdsInVcn ¶
func (mgr *ClusterManagerClient) ListSecurityListIdsInVcn(ctx context.Context, compartmentID, vcnID string) ([]string, error)
ListSecurityListIdsInVcn returns the security list IDs of any and all security lists in the specified VCN.
func (*ClusterManagerClient) ListSubnetIdsInVcn ¶
func (mgr *ClusterManagerClient) ListSubnetIdsInVcn(ctx context.Context, compartmentID, vcnID string) ([]string, error)
ListSubnetIdsInVcn returns the subnet IDs of any and all subnets in the specified VCN.
func (*ClusterManagerClient) ScaleNodePool ¶
func (mgr *ClusterManagerClient) ScaleNodePool(ctx context.Context, nodePoolID string, quantityPerSubnet int) error
ScaleNodePool updates the number of nodes in each subnet, or an error.
func (*ClusterManagerClient) UpdateMasterKubernetesVersion ¶
func (mgr *ClusterManagerClient) UpdateMasterKubernetesVersion(ctx context.Context, clusterID, version string) error
UpdateKubernetesMasterVersion updates the version of Kubernetes on the master(s), or an error.
func (*ClusterManagerClient) UpdateNodepoolKubernetesVersion ¶
func (mgr *ClusterManagerClient) UpdateNodepoolKubernetesVersion(ctx context.Context, nodePoolID, version string) error
UpdateNodepoolKubernetesVersion updates the version of Kubernetes on (new) worker that will be added to the node pool. Be sure to call UpdateKubernetesMasterVersion before updating the version of node pools, or an error.
type NetworkConfiguration ¶
type NetworkConfiguration struct { // The OCID of the compartment that contains the optional pre-existing VCN VcnCompartmentID string // Optional pre-existing VCN in which you want to create cluster VCNName string // Optional pre-existing load balancer subnets to host load balancers for services ServiceLBSubnet1Name string ServiceLBSubnet2Name string // The number of AD specific subnets (each are created in different availability domains) QuantityOfSubnets int64 // Optional name of node pool subnet NodePoolSubnetName string // Optional name of node pool subnet security list NodePoolSubnetSecurityListName string // Optional name of node pool dns domain name NodePoolSubnetDnsDomainName string // Optional name of the service subnet security list ServiceSubnetSecurityListName string // Optional name of the service subnet dns domain name ServiceSubnetDnsDomainName string }
Elements that make up the Network configuration (and state) for the OKE cluster
type NodeConfiguration ¶
type NodeConfiguration struct { // The OS image that will be used for the VM NodeImageName string // The shape of the VM for the worker node NodeShape string // The optional public SSH Key path to access the worker nodes // Note, in order to access private nodes you need to set up a bastion host on the bastion subnet NodePublicSSHKeyPath string // The optional public SSH Key contents to access the worker nodes NodePublicSSHKeyContents string // The number of nodes in each subnet / availability domain QuantityPerSubnet int64 }
Elements that make up the configuration of each node in the OKE cluster
type OKEDriver ¶
type OKEDriver struct {
// contains filtered or unexported fields
}
func (*OKEDriver) Create ¶
func (d *OKEDriver) Create(ctx context.Context, opts *types.DriverOptions, _ *types.ClusterInfo) (*types.ClusterInfo, error)
Create implements driver interface
func (*OKEDriver) ETCDRemoveSnapshot ¶
func (d *OKEDriver) ETCDRemoveSnapshot(ctx context.Context, clusterInfo *types.ClusterInfo, opts *types.DriverOptions, snapshotName string) error
func (*OKEDriver) ETCDRestore ¶
func (d *OKEDriver) ETCDRestore(ctx context.Context, clusterInfo *types.ClusterInfo, opts *types.DriverOptions, snapshotName string) (*types.ClusterInfo, error)
func (*OKEDriver) ETCDSave ¶
func (d *OKEDriver) ETCDSave(ctx context.Context, clusterInfo *types.ClusterInfo, opts *types.DriverOptions, snapshotName string) error
func (*OKEDriver) GetCapabilities ¶
func (*OKEDriver) GetClusterSize ¶
func (*OKEDriver) GetDriverCreateOptions ¶
GetDriverCreateOptions implements driver interface
func (*OKEDriver) GetDriverUpdateOptions ¶
GetDriverUpdateOptions implements driver interface
func (*OKEDriver) GetK8SCapabilities ¶
func (d *OKEDriver) GetK8SCapabilities(ctx context.Context, options *types.DriverOptions) (*types.K8SCapabilities, error)
func (*OKEDriver) GetVersion ¶
func (d *OKEDriver) GetVersion(ctx context.Context, info *types.ClusterInfo) (*types.KubernetesVersion, error)
func (*OKEDriver) PostCheck ¶
func (d *OKEDriver) PostCheck(ctx context.Context, info *types.ClusterInfo) (*types.ClusterInfo, error)
func (*OKEDriver) RemoveLegacyServiceAccount ¶
func (*OKEDriver) SetClusterSize ¶
func (*OKEDriver) SetVersion ¶
func (d *OKEDriver) SetVersion(ctx context.Context, info *types.ClusterInfo, version *types.KubernetesVersion) error
func (*OKEDriver) Update ¶
func (d *OKEDriver) Update(ctx context.Context, info *types.ClusterInfo, opts *types.DriverOptions) (*types.ClusterInfo, error)
Update implements driver interface
type State ¶
type State struct { // Should the Kubernetes dashboard be enabled EnableKubernetesDashboard bool // Should the Helm server (Tiller) be enabled EnableTiller bool PrivateNodes bool // The name of the cluster (and default node pool) Name string // The Oracle Cloud ID (OCID) of the tenancy TenancyID string // The OCID of the cluster compartment CompartmentID string // The user OCID UserOCID string // The path to the private API Key that is associated with the user and has access the tenancy/compartment PrivateKeyPath string // The contents the private API Key that is associated with the user and has access the tenancy/compartment PrivateKeyContents string // The API Key Fingerprint Fingerprint string // The region where the cluster will be hosted Region string // The passphrase for the private key PrivateKeyPassphrase string // The description of the cluster // TODO currently unused Description string // Should cluster creation operation wait until nodes are active // TODO currently unused WaitNodesActive int64 // Optional CIDR from which to allow ingress to worker nodes WorkerNodeIngressCidr string // The labels specified during the Kubernetes creation // TODO currently unused KubernetesLabels map[string]string // The version of Kubernetes to run on the master and worker nodes and node pool (e.g. v1.11.9, v1.12.7) KubernetesVersion string // OCID of the cluster ClusterID string Network NetworkConfiguration NodePool NodeConfiguration // cluster info ClusterInfo types.ClusterInfo // Should the Deletion of VCN be skipped SkipVCNDelete bool }
func GetStateFromOpts ¶
func GetStateFromOpts(driverOptions *types.DriverOptions) (State, error)
SetDriverOptions implements driver interface