kutil

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2018 License: Apache-2.0 Imports: 32 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 NewClientConfig added in v1.10.0

func NewClientConfig(clientConfig *restclient.Config, namespace string) clientcmd.ClientConfig

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 SimpleClientConfig added in v1.10.0

type SimpleClientConfig struct {
	// contains filtered or unexported fields
}

SimpleClientConfig is used to make it easy to get an api server client

func (*SimpleClientConfig) ClientConfig added in v1.10.0

func (c *SimpleClientConfig) ClientConfig() (*restclient.Config, error)

ClientConfig returns a complete client config

func (*SimpleClientConfig) ConfigAccess added in v1.10.0

func (c *SimpleClientConfig) ConfigAccess() clientcmd.ConfigAccess

ConfigAccess returns the rules for loading/persisting the config.

func (*SimpleClientConfig) Namespace added in v1.10.0

func (c *SimpleClientConfig) Namespace() (string, bool, error)

Namespace returns the namespace resulting from the merged result of all overrides and a boolean indicating if it was overridden

func (*SimpleClientConfig) RawConfig added in v1.10.0

func (c *SimpleClientConfig) RawConfig() (clientcmdapi.Config, error)

RawConfig returns the merged result of all overrides

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