Documentation ¶
Overview ¶
Package cmd (internal) provides functions that are needed to implement the commands
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateIPRanges ¶
func CalculateIPRanges(podRange, serviceRange string) (pod, service, cluster *net.IPNet, bind, firstSVC net.IP, errRet error)
CalculateIPRanges takes the pod and service range as strings and calculates the required networks for Microkube from it
func EnsureDir ¶
EnsureDir ensures that root/subdirectory exists, is a directory and has permissions 'permissions'
func FindBindAddress ¶
FindBindAddress tries to find a private IPv4 address from some local interface that can be used to bind services to it
Types ¶
type ArgHandler ¶
type ArgHandler struct { /* Extracted data */ // Directory to create all state directories in BaseDir string // Directory to additionally include in the binary search path ExtraBinDir string // Network range to use for pods PodRangeNet *net.IPNet // Network range to use for services ServiceRangeNet *net.IPNet // Network range that contains both pod and service range ClusterIPRange *net.IPNet // Whether to deploy the kubernetes dashboard cluster addon EnableKubeDash bool // Whether to deploy the CoreDNS cluster addon EnableDns bool // Whether to include verbose log output Verbose bool // contains filtered or unexported fields }
ArgHandler provides applications with a unified set of command line parameters
func NewArgHandler ¶
func NewArgHandler(isMainBinary bool) *ArgHandler
NewArgHandler returns a new instance of ArgHandler, registering arguments if necessary
func (*ArgHandler) HandleArgs ¶
func (a *ArgHandler) HandleArgs() *handlers.ExecutionEnvironment
HandleArgs registers, parses and evaluates command line arguments