ranchhand

package
v0.1.2-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RKEKubeConfig = "kube_config_rancher-cluster.yml"

	RKEConfigFile = "rancher-cluster.yml"

	RKETemplate = `` /* 4540-byte string literal not displayed */

)
View Source
const OutputDirectory = "ranchhand-output"

Variables

View Source
var (
	PlatformToolVersions = map[string]string{
		"kubectl": "v1.15.2",
		"helm":    "v2.14.3",
		"rke":     "v0.2.7",
	}

	PlatformToolURLs = map[string]RequiredToolURLs{
		"darwin": {
			Kubectl: fmt.Sprintf("https://storage.googleapis.com/kubernetes-release/release/%s/bin/darwin/amd64/kubectl", PlatformToolVersions["kubectl"]),
			Helm:    fmt.Sprintf("https://storage.googleapis.com/kubernetes-helm/helm-%s-darwin-amd64.tar.gz", PlatformToolVersions["helm"]),
			RKE:     fmt.Sprintf("https://github.com/rancher/rke/releases/download/%s/rke_darwin-amd64", PlatformToolVersions["rke"]),
		},
		"linux": {
			Kubectl: fmt.Sprintf("https://storage.googleapis.com/kubernetes-release/release/%s/bin/linux/amd64/kubectl", PlatformToolVersions["kubectl"]),
			Helm:    fmt.Sprintf("https://storage.googleapis.com/kubernetes-helm/helm-%s-linux-amd64.tar.gz", PlatformToolVersions["helm"]),
			RKE:     fmt.Sprintf("https://github.com/rancher/rke/releases/download/%s/rke_linux-amd64", PlatformToolVersions["rke"]),
		},
	}
)

Functions

func Run

func Run(cfg *Config) error

Types

type Config

type Config struct {
	SSH           *SSHConfig
	Nodes         []Node
	Timeout       time.Duration
	CertIPs       []string
	CertDNSNames  []string
	AdminPassword string

	UpgradeRancher    bool
	UpgradeKubernetes bool
}

type Node

type Node struct {
	PublicIP  string
	PrivateIP string
}

func BuildNodes

func BuildNodes(nodeIPs []string) (nodes []Node)

type RequiredToolURLs

type RequiredToolURLs struct {
	Kubectl string
	Helm    string
	RKE     string
}

type SSHConfig

type SSHConfig struct {
	User              string
	Port              uint
	KeyPath           string
	ConnectionTimeout uint
}

Jump to

Keyboard shortcuts

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