cluster

package
v0.0.0-...-3976d73 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FromConfig = func(file string) (*Cluster, error) {
	c := &Cluster{
		SecretDir: "./clusters",
		Config:    &Config{},
	}
	if err := DecodeConfigFromFile(c.Config, file); err != nil {
		return nil, fmt.Errorf("couldn't unmarshal config file: %v", err)
	}
	c.TLSFiles = &TLSFiles{
		CACertFile:        c.getSecretPath("ca.pem"),
		APIServerCertFile: c.getSecretPath("apiserver.pem"),
		APIServerKeyFile:  c.getSecretPath("apiserver-key.pem"),
		WorkerCertFile:    c.getSecretPath("worker.pem"),
		WorkerKeyFile:     c.getSecretPath("worker-key.pem"),
		AdminCertFile:     c.getSecretPath("admin.pem"),
		AdminKeyFile:      c.getSecretPath("admin-key.pem"),
	}
	return c, nil
}

Functions

func DecodeConfigFromFile

func DecodeConfigFromFile(out *Config, loc string) error

func GenerateKubeconfig

func GenerateKubeconfig(clusters []*Cluster) (string, error)
func PrintLogo()

Types

type Cluster

type Cluster struct {
	Config    *Config
	TLSFiles  *TLSFiles
	SecretDir string
}

func (*Cluster) Create

func (c *Cluster) Create() error

func (*Cluster) GetStackTemplate

func (c *Cluster) GetStackTemplate() (string, error)

type Config

type Config struct {
	AWSCoreOS      corecluster.Config `yaml:"awsCoreOS"`
	ArtifactBucket string             `yaml:"artifactBucket"`
}

func (*Config) Valid

func (cfg *Config) Valid() error

type TLSFiles

type TLSFiles struct {
	CACertFile        string
	APIServerCertFile string
	APIServerKeyFile  string
	WorkerCertFile    string
	WorkerKeyFile     string
	AdminCertFile     string
	AdminKeyFile      string
}

Jump to

Keyboard shortcuts

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