types

package
v0.4.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterStatusRunning = "Running"
	ClusterStatusStopped = "Stopped"
	ClusterStatusUnknown = "Unknown"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoK3s

type AutoK3s struct {
	Clusters []Cluster `json:"clusters" yaml:"clusters"`
}

type Cluster

type Cluster struct {
	Metadata `json:",inline" mapstructure:",squash"`
	Options  interface{} `json:"options,omitempty"`
	SSH      `json:",inline"`

	Status `json:"status" yaml:"status"`
	Logger *logrus.Logger `json:"-" yaml:"-"`
}

type ClusterInfo added in v0.3.0

type ClusterInfo struct {
	Name     string        `json:"name,omitempty"`
	Region   string        `json:"region,omitempty"`
	Zone     string        `json:"zone,omitempty"`
	Provider string        `json:"provider,omitempty"`
	Status   string        `json:"status,omitempty"`
	Master   string        `json:"master,omitempty"`
	Worker   string        `json:"worker,omitempty"`
	Version  string        `json:"version,omitempty"`
	Nodes    []ClusterNode `json:"nodes,omitempty"`
}

type ClusterNode added in v0.3.0

type ClusterNode struct {
	InstanceID              string   `json:"instance-id,omitempty"`
	InstanceStatus          string   `json:"instance-status,omitempty"`
	ExternalIP              []string `json:"external-ip,omitempty"`
	InternalIP              []string `json:"internal-ip,omitempty"`
	Roles                   string   `json:"roles,omitempty"`
	Status                  string   `json:"status,omitempty"`
	HostName                string   `json:"hostname,omitempty"`
	ContainerRuntimeVersion string   `json:"containerRuntimeVersion,omitempty"`
	Version                 string   `json:"version,omitempty"`
	Master                  bool     `json:"-"`
}

type Flag

type Flag struct {
	Name      string
	P         interface{}
	V         interface{}
	ShortHand string
	Usage     string
	Required  bool
	EnvVar    string
}

type Metadata

type Metadata struct {
	Name                   string `json:"name" yaml:"name"`
	Provider               string `json:"provider" yaml:"provider"`
	Master                 string `json:"master" yaml:"master"`
	Worker                 string `json:"worker" yaml:"worker"`
	Token                  string `json:"token,omitempty" yaml:"token,omitempty"`
	IP                     string `json:"ip,omitempty" yaml:"ip,omitempty"`
	ClusterCIDR            string `json:"cluster-cidr,omitempty" yaml:"cluster-cidr,omitempty"`
	MasterExtraArgs        string `json:"master-extra-args,omitempty" yaml:"master-extra-args,omitempty"`
	WorkerExtraArgs        string `json:"worker-extra-args,omitempty" yaml:"worker-extra-args,omitempty"`
	Registry               string `json:"registry,omitempty" yaml:"registry,omitempty"`
	DataStore              string `json:"datastore,omitempty" yaml:"datastore,omitempty"`
	K3sVersion             string `json:"k3s-version,omitempty" yaml:"k3s-version,omitempty"`
	K3sChannel             string `json:"k3s-channel,omitempty" yaml:"k3s-channel,omitempty"`
	InstallScript          string `json:"installScript,omitempty" yaml:"installScript,omitempty"`
	Mirror                 string `json:"mirror,omitempty" yaml:"mirror,omitempty"`
	DockerMirror           string `json:"dockerMirror,omitempty" yaml:"dockerMirror,omitempty"`
	DockerScript           string `json:"dockerScript,omitempty" yaml:"dockerScript,omitempty"`
	Network                string `json:"network,omitempty" yaml:"network,omitempty"`
	UI                     bool   `json:"ui,omitempty" yaml:"ui,omitempty"`
	CloudControllerManager bool   `json:"cloud-controller-manager,omitempty" yaml:"cloud-controller-manager,omitempty"`
	Cluster                bool   `json:"cluster,omitempty" yaml:"cluster,omitempty"`
}

type Node

type Node struct {
	SSH `json:",inline"`

	InstanceID        string   `json:"instance-id,omitempty" yaml:"instance-id,omitempty"`
	InstanceStatus    string   `json:"instance-status,omitempty" yaml:"instance-status,omitempty"`
	PublicIPAddress   []string `json:"public-ip-address,omitempty" yaml:"public-ip-address,omitempty"`
	InternalIPAddress []string `json:"internal-ip-address,omitempty" yaml:"internal-ip-address,omitempty"`
	EipAllocationIds  []string `json:"eip-allocation-ids,omitempty" yaml:"eip-allocation-ids,omitempty"`
	Master            bool     `json:"master,omitempty" yaml:"master,omitempty"`
	RollBack          bool     `json:"-" yaml:"-"`
	Current           bool     `json:"-" yaml:"-"`
}

type SSH

type SSH struct {
	Port             string `json:"ssh-port,omitempty" yaml:"ssh-port,omitempty"`
	User             string `json:"user,omitempty" yaml:"user,omitempty"`
	Password         string `json:"password,omitempty" yaml:"password,omitempty"`
	SSHKey           string `json:"ssh-key,omitempty" yaml:"ssh-key,omitempty"`
	SSHKeyPath       string `json:"ssh-key-path,omitempty" yaml:"ssh-key-path,omitempty"`
	SSHCert          string `json:"ssh-cert,omitempty" yaml:"ssh-cert,omitempty"`
	SSHCertPath      string `json:"ssh-cert-path,omitempty" yaml:"ssh-cert-path,omitempty"`
	SSHKeyPassphrase string `json:"ssh-key-passphrase,omitempty" yaml:"ssh-key-passphrase,omitempty"`
	SSHAgentAuth     bool   `json:"ssh-agent-auth,omitempty" yaml:"ssh-agent-auth,omitempty" `
}

type Status

type Status struct {
	Status      string `json:"status,omitempty"`
	MasterNodes []Node `json:"master-nodes,omitempty"`
	WorkerNodes []Node `json:"worker-nodes,omitempty"`
}

type VersionInfo

type VersionInfo struct {
	GitVersion   string `json:"gitVersion"`
	GitCommit    string `json:"gitCommit"`
	GitTreeState string `json:"gitTreeState"`
	BuildDate    string `json:"buildDate"`
	GoVersion    string `json:"goVersion"`
	Compiler     string `json:"compiler"`
	Platform     string `json:"platform"`
}

Borrowed from https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/version/types.go. VersionInfo contains version information.

func (VersionInfo) Short

func (versionInfo VersionInfo) Short() string

Short returns info as a human-friendly version string.

func (VersionInfo) String

func (versionInfo VersionInfo) String() string

String returns info as a full version string.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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