Documentation
¶
Index ¶
- Constants
- func AddSSHIdentity(sshConfig *ssh.ClientConfig, p string) error
- func DeleteAutoScalingGroup(cloud fi.Cloud, r *ResourceTracker) error
- func DeleteAutoscalingLaunchConfiguration(cloud fi.Cloud, r *ResourceTracker) error
- func DeleteDhcpOptions(cloud fi.Cloud, r *ResourceTracker) error
- func DeleteELB(cloud fi.Cloud, r *ResourceTracker) error
- func DeleteElasticIP(cloud fi.Cloud, t *ResourceTracker) error
- func DeleteIAMInstanceProfile(cloud fi.Cloud, r *ResourceTracker) error
- func DeleteIAMRole(cloud fi.Cloud, r *ResourceTracker) error
- func DeleteInstance(cloud fi.Cloud, t *ResourceTracker) error
- func DeleteInternetGateway(cloud fi.Cloud, r *ResourceTracker) error
- func DeleteKeypair(cloud fi.Cloud, r *ResourceTracker) error
- func DeleteRouteTable(cloud fi.Cloud, r *ResourceTracker) error
- func DeleteSecurityGroup(cloud fi.Cloud, t *ResourceTracker) error
- func DeleteSubnet(cloud fi.Cloud, tracker *ResourceTracker) error
- func DeleteVPC(cloud fi.Cloud, r *ResourceTracker) error
- func DeleteVolume(cloud fi.Cloud, r *ResourceTracker) error
- func DescribeDhcpOptions(cloud fi.Cloud) ([]*ec2.DhcpOptions, error)
- func DescribeELBs(cloud fi.Cloud) ([]*elb.LoadBalancerDescription, map[string][]*elb.Tag, error)
- func DescribeInternetGateways(cloud fi.Cloud) ([]*ec2.InternetGateway, error)
- func DescribeInternetGatewaysIgnoreTags(cloud fi.Cloud) ([]*ec2.InternetGateway, error)
- func DescribeSecurityGroups(cloud fi.Cloud) ([]*ec2.SecurityGroup, error)
- func DescribeSubnets(cloud fi.Cloud) ([]*ec2.Subnet, error)
- func DescribeVolumes(cloud fi.Cloud) ([]*ec2.Volume, error)
- func FindASGName(tags []*autoscaling.TagDescription) string
- func FindCloudInstanceGroups(cloud fi.Cloud, cluster *api.Cluster, instancegroups []*api.InstanceGroup, ...) (map[string]*CloudInstanceGroup, error)
- func FindELBName(tags []*elb.Tag) string
- func FindName(tags []*ec2.Tag) string
- func GetInstanceUserData(cloud awsup.AWSCloud, instanceID string) ([]byte, error)
- func IsDependencyViolation(err error) bool
- func UserDataToString(userData []byte) (string, error)
- type CloudInstanceGroup
- type CloudInstanceGroupInstance
- type ConvertKubeupCluster
- type CreateKubecfg
- type DeleteCluster
- type DeleteInstanceGroup
- type ImportCluster
- type KubeconfigBuilder
- type Kubectl
- type KubectlCluster
- type KubectlClusterWithName
- type KubectlConfig
- type KubectlContext
- type KubectlContextWithName
- type KubectlUser
- type KubectlUserWithName
- type NodeSSH
- type ResourceTracker
- func ListAutoScalingGroups(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
- func ListAutoScalingLaunchConfigurations(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
- func ListDhcpOptions(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
- func ListELBs(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
- func ListIAMInstanceProfiles(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
- func ListIAMRoles(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
- func ListInstances(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
- func ListInternetGateways(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
- func ListKeypairs(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
- func ListRoute53Records(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
- func ListRouteTables(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
- func ListSecurityGroups(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
- func ListSubnets(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
- func ListVPCs(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
- func ListVolumes(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
- type RollingUpdateCluster
- type UserDataConfiguration
Constants ¶
const (
TypeAutoscalingLaunchConfig = "autoscaling-config"
)
Variables ¶
This section is empty.
Functions ¶
func AddSSHIdentity ¶
func AddSSHIdentity(sshConfig *ssh.ClientConfig, p string) error
func DeleteAutoScalingGroup ¶
func DeleteAutoScalingGroup(cloud fi.Cloud, r *ResourceTracker) error
func DeleteAutoscalingLaunchConfiguration ¶
func DeleteAutoscalingLaunchConfiguration(cloud fi.Cloud, r *ResourceTracker) error
func DeleteDhcpOptions ¶
func DeleteDhcpOptions(cloud fi.Cloud, r *ResourceTracker) error
func DeleteElasticIP ¶
func DeleteElasticIP(cloud fi.Cloud, t *ResourceTracker) error
func DeleteIAMInstanceProfile ¶
func DeleteIAMInstanceProfile(cloud fi.Cloud, r *ResourceTracker) error
func DeleteIAMRole ¶
func DeleteIAMRole(cloud fi.Cloud, r *ResourceTracker) error
func DeleteInstance ¶
func DeleteInstance(cloud fi.Cloud, t *ResourceTracker) error
func DeleteInternetGateway ¶
func DeleteInternetGateway(cloud fi.Cloud, r *ResourceTracker) error
func DeleteKeypair ¶
func DeleteKeypair(cloud fi.Cloud, r *ResourceTracker) error
func DeleteRouteTable ¶
func DeleteRouteTable(cloud fi.Cloud, r *ResourceTracker) error
func DeleteSecurityGroup ¶
func DeleteSecurityGroup(cloud fi.Cloud, t *ResourceTracker) error
func DeleteSubnet ¶
func DeleteSubnet(cloud fi.Cloud, tracker *ResourceTracker) error
func DeleteVolume ¶
func DeleteVolume(cloud fi.Cloud, r *ResourceTracker) error
func DescribeDhcpOptions ¶
func DescribeDhcpOptions(cloud fi.Cloud) ([]*ec2.DhcpOptions, error)
func DescribeELBs ¶
func DescribeELBs(cloud fi.Cloud) ([]*elb.LoadBalancerDescription, map[string][]*elb.Tag, error)
func DescribeInternetGateways ¶
func DescribeInternetGateways(cloud fi.Cloud) ([]*ec2.InternetGateway, error)
func DescribeInternetGatewaysIgnoreTags ¶
func DescribeInternetGatewaysIgnoreTags(cloud fi.Cloud) ([]*ec2.InternetGateway, error)
DescribeInternetGatewaysIgnoreTags returns all ec2.InternetGateways, ignoring tags (gateways were not always tagged in kube-up)
func DescribeSecurityGroups ¶
func DescribeSecurityGroups(cloud fi.Cloud) ([]*ec2.SecurityGroup, error)
func DescribeSubnets ¶
func DescribeSubnets(cloud fi.Cloud) ([]*ec2.Subnet, error)
func DescribeVolumes ¶
func DescribeVolumes(cloud fi.Cloud) ([]*ec2.Volume, error)
func FindASGName ¶
func FindASGName(tags []*autoscaling.TagDescription) string
func FindCloudInstanceGroups ¶
func FindCloudInstanceGroups(cloud fi.Cloud, cluster *api.Cluster, instancegroups []*api.InstanceGroup, warnUnmatched bool, nodes []v1.Node) (map[string]*CloudInstanceGroup, error)
func FindELBName ¶
func FindELBName(tags []*elb.Tag) string
func GetInstanceUserData ¶
func GetInstanceUserData(cloud awsup.AWSCloud, instanceID string) ([]byte, error)
Fetch instance UserData
func IsDependencyViolation ¶
func IsDependencyViolation(err error) bool
func UserDataToString ¶
func UserDataToString(userData []byte) (string, error)
Types ¶
type CloudInstanceGroup ¶
type CloudInstanceGroup struct {
InstanceGroup *api.InstanceGroup
ASGName string
Status string
Ready []*CloudInstanceGroupInstance
NeedUpdate []*CloudInstanceGroupInstance
// contains filtered or unexported fields
}
CloudInstanceGroup is the AWS ASG backing an InstanceGroup
func (*CloudInstanceGroup) RollingUpdate ¶
func (n *CloudInstanceGroup) RollingUpdate(cloud fi.Cloud, force bool, interval time.Duration, k8sClient *release_1_3.Clientset) error
type CloudInstanceGroupInstance ¶
type CloudInstanceGroupInstance struct {
ASGInstance *autoscaling.Instance
Node *v1.Node
}
CloudInstanceGroupInstance describes an instance in an autoscaling group
type ConvertKubeupCluster ¶
type ConvertKubeupCluster struct {
OldClusterName string
NewClusterName string
Cloud fi.Cloud
Clientset simple.Clientset
ClusterConfig *api.Cluster
InstanceGroups []*api.InstanceGroup
// Channel is the channel that we are upgrading to
Channel *api.Channel
}
ConvertKubeupCluster performs a conversion of a cluster that was imported from kube-up
type CreateKubecfg ¶
type CreateKubecfg struct {
ClusterName string
KeyStore fi.CAStore
SecretStore fi.SecretStore
MasterPublicName string
// contains filtered or unexported fields
}
func (*CreateKubecfg) WriteKubecfg ¶
func (c *CreateKubecfg) WriteKubecfg() error
type DeleteCluster ¶
type DeleteCluster struct {
ClusterName string
Cloud fi.Cloud
}
DeleteCluster implements deletion of cluster cloud resources The algorithm is pretty simple: it discovers all the resources it can (primary using tags), and then it repeatedly attempts to delete them all until they are all deleted. There are a few tweaks to that approach, like choosing a default ordering, but it is not much smarter. Cluster deletion is a fairly rare operation anyway, and also some dependencies are invisible (e.g. ELB dependencies).
func (*DeleteCluster) DeleteResources ¶
func (c *DeleteCluster) DeleteResources(resources map[string]*ResourceTracker) error
func (*DeleteCluster) ListResources ¶
func (c *DeleteCluster) ListResources() (map[string]*ResourceTracker, error)
type DeleteInstanceGroup ¶
type DeleteInstanceGroup struct {
Cluster *api.Cluster
Cloud fi.Cloud
Clientset simple.Clientset
}
DeleteInstanceGroup removes the cloud resources for an InstanceGroup
func (*DeleteInstanceGroup) DeleteInstanceGroup ¶
func (c *DeleteInstanceGroup) DeleteInstanceGroup(group *api.InstanceGroup) error
type ImportCluster ¶
type ImportCluster struct {
ClusterName string
Cloud fi.Cloud
Clientset simple.Clientset
}
ImportCluster tries to reverse engineer an existing k8s cluster, adding it to the cluster registry
func (*ImportCluster) ImportAWSCluster ¶
func (x *ImportCluster) ImportAWSCluster() error
type KubeconfigBuilder ¶
type KubeconfigBuilder struct {
KubectlPath string
KubeconfigPath string
KubeMasterIP string
Context string
KubeBearerToken string
KubeUser string
KubePassword string
CACert string
KubecfgCert string
KubecfgKey string
}
KubeconfigBuilder builds a kubecfg file This logic previously lives in the bash scripts (create-kubeconfig in cluster/common.sh)
func (*KubeconfigBuilder) WriteKubecfg ¶
func (c *KubeconfigBuilder) WriteKubecfg() error
type Kubectl ¶
type Kubectl struct {
KubectlPath string
}
func (*Kubectl) GetCurrentContext ¶
func (k *Kubectl) GetCurrentContext() (string, error)
type KubectlCluster ¶
type KubectlCluster struct {
Server string `json:"server"`
}
type KubectlClusterWithName ¶
type KubectlClusterWithName struct {
Name string `json:"name"`
Cluster KubectlCluster `json:"cluster"`
}
type KubectlConfig ¶
type KubectlConfig struct {
Kind string `json:"kind"`
ApiVersion string `json:"apiVersion"`
CurrentContext string `json:"current-context"`
Clusters []*KubectlClusterWithName `json:"clusters"`
Contexts []*KubectlContextWithName `json:"contexts"`
Users []*KubectlUserWithName `json:"users"`
}
type KubectlContext ¶
type KubectlContext struct {
Cluster string `json:"cluster"`
User string `json:"user"`
}
type KubectlContextWithName ¶
type KubectlContextWithName struct {
Name string `json:"name"`
Context KubectlContext `json:"context"`
}
type KubectlUser ¶
type KubectlUser struct {
ClientCertificateData string `json:"client-certificate-data"`
ClientKeyData string `json:"client-key-data"`
Password string `json:"password"`
Username string `json:"username"`
}
type KubectlUserWithName ¶
type KubectlUserWithName struct {
Name string `json:"name"`
User KubectlUser `json:"user"`
}
type NodeSSH ¶
type NodeSSH struct {
Hostname string
SSHConfig ssh.ClientConfig
// contains filtered or unexported fields
}
func (*NodeSSH) GetSSHClient ¶
func (m *NodeSSH) GetSSHClient() (*ssh.Client, error)
type ResourceTracker ¶
type ResourceTracker struct {
Name string
Type string
ID string
// contains filtered or unexported fields
}
func ListAutoScalingGroups ¶
func ListAutoScalingGroups(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
func ListAutoScalingLaunchConfigurations ¶
func ListAutoScalingLaunchConfigurations(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
func ListDhcpOptions ¶
func ListDhcpOptions(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
func ListIAMInstanceProfiles ¶
func ListIAMInstanceProfiles(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
func ListIAMRoles ¶
func ListIAMRoles(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
func ListInstances ¶
func ListInstances(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
func ListInternetGateways ¶
func ListInternetGateways(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
func ListKeypairs ¶
func ListKeypairs(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
func ListRoute53Records ¶
func ListRoute53Records(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
func ListRouteTables ¶
func ListRouteTables(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
func ListSecurityGroups ¶
func ListSecurityGroups(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
func ListSubnets ¶
func ListSubnets(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
func ListVolumes ¶
func ListVolumes(cloud fi.Cloud, clusterName string) ([]*ResourceTracker, error)
type RollingUpdateCluster ¶
type RollingUpdateCluster struct {
Cloud fi.Cloud
MasterInterval time.Duration
NodeInterval time.Duration
Force bool
}
RollingUpdateCluster restarts cluster nodes
func (*RollingUpdateCluster) RollingUpdate ¶
func (c *RollingUpdateCluster) RollingUpdate(groups map[string]*CloudInstanceGroup, k8sClient *release_1_3.Clientset) error
type UserDataConfiguration ¶
type UserDataConfiguration struct {
Version string
Settings map[string]string
}
func ParseUserDataConfiguration ¶
func ParseUserDataConfiguration(raw []byte) (*UserDataConfiguration, error)
func (*UserDataConfiguration) ParseBool ¶
func (u *UserDataConfiguration) ParseBool(key string) *bool
func (*UserDataConfiguration) ParseCert ¶
func (u *UserDataConfiguration) ParseCert(key string) (*fi.Certificate, error)