kutil

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2018 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSSHIdentity

func AddSSHIdentity(sshConfig *ssh.ClientConfig, p string) error

func GetInstanceUserData

func GetInstanceUserData(cloud awsup.AWSCloud, instanceID string) ([]byte, error)

Fetch instance UserData

func UserDataToString

func UserDataToString(userData []byte) (string, error)

Types

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

func (*ConvertKubeupCluster) Upgrade

func (x *ConvertKubeupCluster) Upgrade() 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 Kubectl

type Kubectl struct {
	KubectlPath string
}

func (*Kubectl) Apply added in v1.10.0

func (k *Kubectl) Apply(context string, data []byte) error

Apply calls kubectl apply to apply the manifest. We will likely in future change this to create things directly (or more likely embed this logic into kubectl itself)

func (*Kubectl) GetConfig

func (k *Kubectl) GetConfig(minify bool) (*kubeconfig.KubectlConfig, error)

func (*Kubectl) GetCurrentContext

func (k *Kubectl) GetCurrentContext() (string, error)

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)

func (*NodeSSH) Root

func (m *NodeSSH) Root() (*vfs.SSHPath, 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) (*pki.Certificate, error)

func (*UserDataConfiguration) ParseKey

func (u *UserDataConfiguration) ParseKey(key string) (*pki.PrivateKey, error)

Jump to

Keyboard shortcuts

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