Documentation
¶
Index ¶
- Constants
- Variables
- func CopySSHKeyToAuthorizedKeys(log *logrus.Entry, keyPath string, node *Node) error
- func CreateClusterMaster(log *logrus.Entry, node *Node, podNetworkCidr string) error
- func CreateClusterNode(log *logrus.Entry, node *Node, masterIp string) error
- func DisableSelinuxOnRemote(node *Node) error
- func DisableSwapOnRemote(node *Node) error
- func EnsureSSHWithoutPassword(log *logrus.Entry, node *Node) error
- func FetchKubeconfig(log *logrus.Entry, node *Node, merge bool) error
- func FollowLogsAndPollUntilJobComplete(log *logrus.Entry, kubectl *kubeutil.Kubectl, job string, maxAttempts int, ...) error
- func FollowLogsIfContainersRunning(kubectl *kubeutil.Kubectl, job string) error
- func GetPodsForJob(kubectl *kubeutil.Kubectl, job string) (*[]string, error)
- func KubeadmResetRemote(log *logrus.Entry, kubectl *kubeutil.Kubectl, node *Node, force bool) error
- func KubectlApplyF(kubectl *kubeutil.Kubectl, path string) error
- func KubectlApplyStdIn(kubectl *kubeutil.Kubectl, stdin string) error
- func KubectlCreateStdIn(kubectl *kubeutil.Kubectl, stdin string) error
- func KubectlDeleteF(kubectl *kubeutil.Kubectl, path string) error
- func KubectlDeleteStdIn(kubectl *kubeutil.Kubectl, stdin string) error
- func KubectlGetCreateStdIn(kubectl *kubeutil.Kubectl, stdin string) (string, error)
- func SetHostname(log *logrus.Entry, node *Node, hostname string, force bool) error
- func TaintNodeByHost(kubectl *kubeutil.Kubectl, node *Node, taint string) error
- func TestCanSSHWithoutPassword(node *Node) error
- func TryConfigureSSH(log *logrus.Entry, node *Node) error
- type BuildSpec
- type ExecSpec
- type Job
- type JobStatus
- type Node
- type Resource
- type ResourceType
- type TextSubstitutor
Constants ¶
const ( JobStatusUnknown JobStatus = 0 JobStatusRunning = 1 JobStatusComplete = 2 JobStatusFailed = 3 )
Variables ¶
var DockerDaemonJson = `` /* 259-byte string literal not displayed */
var IpForward = `1
`
var K8SConf = `net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
`
Functions ¶
func CreateClusterMaster ¶
func CreateClusterNode ¶
func DisableSelinuxOnRemote ¶
func DisableSwapOnRemote ¶
func KubeadmResetRemote ¶
func KubectlDeleteF ¶ added in v0.10.0
func KubectlDeleteStdIn ¶ added in v0.10.0
func KubectlGetCreateStdIn ¶
func SetHostname ¶
func TaintNodeByHost ¶
func TestCanSSHWithoutPassword ¶
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.
Types ¶
type Job ¶ added in v0.14.0
Job - Properties that can appear in any ephemeral job definition. TODO: Allow jobs to define max retry parameters, or accept them on the
command line.
type Node ¶ added in v0.14.0
Node - Defines a networked resource on which operations will typically be
executed.
func (*Node) ConnectionString ¶ added in v0.14.0
ConnectionString - Get the node's connection string
func (*Node) IsMaster ¶ added in v0.14.0
IsMaster - Whether or not this node is a control plane node.
func (*Node) IsMasterAndNode ¶ added in v0.14.0
IsMasterAndNode - Whether or not this node plays the roles of both control
plane and worker node.
func (*Node) IsRoleValid ¶ added in v0.14.0
IsRoleValid - Whether or not the node has a role that has been implemented.
type Resource ¶ added in v0.14.0
type Resource struct { Name string File string Inline string Parameters []string Build BuildSpec Job string Exec ExecSpec Tags []string }
Resource - Properties that can appear in any resources. There may be a better way of doing this, but with a pretty generic list of
items appearing in a yaml file, maybe not.
func (*Resource) GetType ¶ added in v0.14.0
func (resource *Resource) GetType() (ResourceType, error)
GetType - Scan through defined properties, and return the resource type
that the resource appears to implement.
type ResourceType ¶ added in v0.14.0
type ResourceType int
ResourceType enum to differentiate the types of resource definitions that
can appear in the hope yaml file.
const ( // ResourceTypeUnknown - No resource type could be determined for the // resource being evaluated. ResourceTypeUnknown ResourceType = iota // ResourceTypeFile - Provide a path to a local file/URL to a remote file // to apply. ResourceTypeFile // ResourceTypeInline - Provide an inline yaml definition of resources to // apply. ResourceTypeInline // ResourceTypeDockerBuild - Build a docker image with the given context // path, and push it to the specified repository. ResourceTypeDockerBuild // ResourceTypeJob - Wait for a job with the given name to finish // executing. ResourceTypeJob // ResourceTypeExec - Execute a script in a running pod/container. ResourceTypeExec )
func (ResourceType) String ¶ added in v0.14.0
func (rt ResourceType) String() string
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