hope

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JobStatusUnknown  JobStatus = 0
	JobStatusRunning            = 1
	JobStatusComplete           = 2
	JobStatusFailed             = 3
)

Variables

View Source
var DockerDaemonJson = `` /* 259-byte string literal not displayed */
View Source
var IpForward = `1
`
View Source
var K8SConf = `net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
`

Functions

func CopySSHKeyToAuthorizedKeys

func CopySSHKeyToAuthorizedKeys(log *logrus.Entry, keyPath string, host string) error

func CreateClusterMaster

func CreateClusterMaster(log *logrus.Entry, masterIp string, podNetworkCidr string) error

func CreateClusterNode

func CreateClusterNode(log *logrus.Entry, nodeIp string, masterIp string) error

func DisableSelinuxOnRemote

func DisableSelinuxOnRemote(remote string) error

func DisableSwapOnRemote

func DisableSwapOnRemote(remote string) error

func EnsureSSHWithoutPassword

func EnsureSSHWithoutPassword(log *logrus.Entry, host string) error

func FetchKubeconfig

func FetchKubeconfig(log *logrus.Entry, host string, merge bool) error

func FollowLogsAndPollUntilJobComplete

func FollowLogsAndPollUntilJobComplete(log *logrus.Entry, kubectl *kubeutil.Kubectl, job string, maxAttempts int, failedPollDelayMaxSeconds int) error

func FollowLogsIfContainersRunning

func FollowLogsIfContainersRunning(kubectl *kubeutil.Kubectl, job string) error

func GetPodsForJob

func GetPodsForJob(kubectl *kubeutil.Kubectl, job string) (*[]string, error)

func KubeadmResetRemote

func KubeadmResetRemote(log *logrus.Entry, kubectl *kubeutil.Kubectl, host string, force bool) error

func KubectlApplyF

func KubectlApplyF(kubectl *kubeutil.Kubectl, path string) error

func KubectlApplyStdIn

func KubectlApplyStdIn(kubectl *kubeutil.Kubectl, stdin string) error

func KubectlCreateStdIn

func KubectlCreateStdIn(kubectl *kubeutil.Kubectl, stdin string) error

func KubectlDeleteF added in v0.10.0

func KubectlDeleteF(kubectl *kubeutil.Kubectl, path string) error

func KubectlDeleteStdIn added in v0.10.0

func KubectlDeleteStdIn(kubectl *kubeutil.Kubectl, stdin string) error

func KubectlGetCreateStdIn

func KubectlGetCreateStdIn(kubectl *kubeutil.Kubectl, stdin string) (string, error)

func SetHostname

func SetHostname(log *logrus.Entry, host string, hostname string, force bool) error

func TaintNodeByHost

func TaintNodeByHost(kubectl *kubeutil.Kubectl, host string, taint string) error

func TestCanSSHWithoutPassword

func TestCanSSHWithoutPassword(host string) error

Attempt to SSH into a machine without allowing password authentication. Also disables strict host checking to prevent the unattended nature of the

execution from causing the script to fail.

func TryConfigureSSH

func TryConfigureSSH(log *logrus.Entry, host string) error

See what SSH key this host is trying to use, and try copying it over to the

appropriate place using password auth.

Types

type JobStatus

type JobStatus int

func GetJobStatus

func GetJobStatus(log *logrus.Entry, kubectl *kubeutil.Kubectl, job string) (JobStatus, error)

Check to see if the provided job has completed, or is still running.

type TextSubstitutor

type TextSubstitutor struct {
	Bytes *[]byte
}

func NewTextSubstitutorFromBytes

func NewTextSubstitutorFromBytes(bytes []byte) *TextSubstitutor

func NewTextSubstitutorFromString

func NewTextSubstitutorFromString(str string) *TextSubstitutor

func TextSubstitutorFromFilepath

func TextSubstitutorFromFilepath(filepath string) (*TextSubstitutor, error)

func (*TextSubstitutor) SubstituteTextFromEnv

func (t *TextSubstitutor) SubstituteTextFromEnv(envVarsNames []string) error

func (*TextSubstitutor) SubstituteTextFromMap

func (t *TextSubstitutor) SubstituteTextFromMap(variables map[string]string) error

Jump to

Keyboard shortcuts

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