vagrant

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NodeTypeStrings = map[NodeType]string{
	Etcd:    "etcd",
	Master:  "master",
	Worker:  "worker",
	Ingress: "ingress",
}
View Source
var NodeTypes = []NodeType{Etcd, Master, Worker, Ingress}

Functions

func AddSharedFlags

func AddSharedFlags(cmd *cobra.Command, opts *VagrantCmdOpts)

func Cmd

func Cmd() *cobra.Command

func VagrantCreateCmd

func VagrantCreateCmd() *cobra.Command

func VagrantCreateMinikubeCmd

func VagrantCreateMinikubeCmd() *cobra.Command

Types

type Infrastructure

type Infrastructure struct {
	Network           net.IPNet
	Broadcast         net.IP
	Nodes             []NodeDetails
	DNSReflector      string
	PrivateSSHKeyPath string
	PublicSSHKeyPath  string
}

func NewInfrastructure

func NewInfrastructure(opts *InfrastructureOpts) (*Infrastructure, error)

type InfrastructureOpts

type InfrastructureOpts struct {
	Count             map[NodeType]uint16
	OverlapRoles      bool
	NodeCIDR          string
	Redhat            bool
	PrivateSSHKeyPath string
	Vagrantfile       string
	Storage           bool
}

type NodeDetails

type NodeDetails struct {
	Name  string
	IP    net.IP
	Types NodeType
}

type NodeType

type NodeType uint32
const (
	Etcd NodeType = 1 << iota
	Master
	Worker
	Ingress
)

type Plan

type Plan struct {
	Opts           *PlanOpts
	Infrastructure *Infrastructure
}

func (*Plan) Etcd

func (p *Plan) Etcd() []NodeDetails

func (*Plan) Ingress

func (p *Plan) Ingress() []NodeDetails

func (*Plan) Master

func (p *Plan) Master() []NodeDetails

func (*Plan) Storage

func (p *Plan) Storage() []NodeDetails

func (*Plan) Worker

func (p *Plan) Worker() []NodeDetails

func (*Plan) Write

func (p *Plan) Write(file *os.File) error

type PlanOpts

type PlanOpts struct {
	InfrastructureOpts
	DisablePackageInstallation   bool
	AutoConfiguredDockerRegistry bool
	DockerRegistryHost           string
	DockerRegistryPort           uint16
	DockerRegistryCAPath         string
	PodCIDR                      string
	ServiceCIDR                  string
}

type Vagrant

type Vagrant struct {
	Opts           *InfrastructureOpts
	Infrastructure *Infrastructure
	UnescapedLTLT  template.HTML
	UnescapedGTGT  template.HTML
}

func (*Vagrant) Write

func (v *Vagrant) Write(file *os.File) error

type VagrantCmdOpts

type VagrantCmdOpts struct {
	PlanOpts
	NoPlan                  bool
	OnlyGenerateVagrantfile bool
}

Jump to

Keyboard shortcuts

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