server

package
v0.7.7 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2019 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// APIVersion for cluster APIs
	APIVersion = "v1"
)

Variables

View Source
var Provisioners = map[string]provisioner.Provisioner{
	"aws":       aws.NewAWS(),
	"azure":     azure.NewAzure(),
	"baremetal": baremetal.NewBaremetal(),
	"eks":       eks.NewEKS(),
	"nutanix":   nutanix.NewNutanix(),
	"openstack": openstack.NewOpenstack(),
	"rke":       rke.NewRKE(),
}

Functions

func NewStore

func NewStore(storetype, name, path, region string) api.ConfigStore

func StartTK8API

func StartTK8API(tk8ApiBase string, tk8Port uint16) error

Types

type AddonRequest

type AddonRequest struct {
	// Name of the addon
	Name string
	// Namespace of the addon
	Scope string
}

type AddonResponse

type AddonResponse struct {
	// Status
	Status string
	// Error
	Error string
}

type Aws

type Aws struct {
	Clustername                  string `yaml:"clustername" json:"clustername"`
	Os                           string `yaml:"os" json:"os"`
	AwsAccessKeyID               string `yaml:"aws_access_key_id" json:"aws_access_key_id"`
	AwsSecretAccessKey           string `yaml:"aws_secret_access_key" json:"aws_secret_access_key"`
	AwsSSHKeypair                string `yaml:"aws_ssh_keypair" json:"aws_ssh_keypair"`
	AwsDefaultRegion             string `yaml:"aws_default_region" json:"aws_default_region"`
	AwsVpcCidrBlock              string `yaml:"aws_vpc_cidr_block" json:"aws_vpc_cidr_block"`
	AwsCidrSubnetsPrivate        string `yaml:"aws_cidr_subnets_private" json:"aws_cidr_subnets_private"`
	AwsCidrSubnetsPublic         string `yaml:"aws_cidr_subnets_public" json:"aws_cidr_subnets_public"`
	AwsBastionSize               string `yaml:"aws_bastion_size" json:"aws_bastion_size"`
	AwsKubeMasterNum             int    `yaml:"aws_kube_master_num" json:"aws_kube_master_num"`
	AwsKubeMasterSize            string `yaml:"aws_kube_master_size" json:"aws_kube_master_size"`
	AwsEtcdNum                   int    `yaml:"aws_etcd_num" json:"aws_etcd_num"`
	AwsEtcdSize                  string `yaml:"aws_etcd_size"  json:"aws_etcd_size"`
	AwsKubeWorkerNum             int    `yaml:"aws_kube_worker_num"  json:"aws_kube_worker_num"`
	AwsKubeWorkerSize            string `yaml:"aws_kube_worker_size"  json:"aws_kube_worker_size"`
	AwsElbAPIPort                int    `yaml:"aws_elb_api_port"  json:"aws_elb_api_port"`
	K8SSecureAPIPort             int    `yaml:"k8s_secure_api_port"  json:"k8s_secure_api_port"`
	KubeInsecureApiserverAddress string `yaml:"kube_insecure_apiserver_address"  json:"kube_insecure_apiserver_address"`
	KubeadmEnabled               bool   `yaml:"kubeadm_enabled"  json:"kubeadm_enabled"`
	KubeNetworkPlugin            string `yaml:"kube_network_plugin"  json:"kube_network_plugin"`
}

func (*Aws) CreateCluster

func (a *Aws) CreateCluster() error

CreateCluster creates AWS cluster

func (*Aws) DestroyCluster

func (a *Aws) DestroyCluster() error

DestroyCluster destroys AWS cluster

func (*Aws) GetCluster

func (a *Aws) GetCluster(name string) (api.Cluster, error)

GetCluster gets the details of thge requested AWS cluster

type AwsYaml

type AwsYaml struct {
	Aws *Aws `yaml:"aws"`
}

type Eks

type Eks struct {
	ClusterName         string `yaml:"cluster-name" json:"cluster-name"`
	AwsRegion           string `yaml:"aws_region" json:"aws_region"`
	NodeInstanceType    string `yaml:"node-instance-type" json:"node-instance-type"`
	DesiredCapacity     int    `yaml:"desired-capacity" json:"desired-capacity"`
	AutoscallingMaxSize int    `yaml:"autoscalling-max-size" json:"autoscalling-max-size"`
	AutoscallingMinSize int    `yaml:"autoscalling-min-size" json:"autoscalling-min-size"`
	KeyFilePath         string `yaml:"key-file-path" json:"key-file-path"`
}

func (*Eks) CreateCluster

func (e *Eks) CreateCluster() error

CreateCluster creates EKS cluster

func (*Eks) DestroyCluster

func (e *Eks) DestroyCluster() error

DestroyCluster destroys EKS cluster

func (*Eks) GetCluster

func (e *Eks) GetCluster(name string) (api.Cluster, error)

GetCluster gets the details of thge requested EKS cluster

type EksYaml

type EksYaml struct {
	Eks *Eks `yaml:"eks"`
}

type LocalStore

type LocalStore struct {
	*Storage
	FileName string
	FilePath string
}

func NewLocalStore

func NewLocalStore(name, path string) *LocalStore

func (*LocalStore) CheckConfigExists

func (l *LocalStore) CheckConfigExists() (bool, error)

func (*LocalStore) CreateConfig

func (l *LocalStore) CreateConfig(t api.Cluster) error

func (*LocalStore) DeleteConfig

func (l *LocalStore) DeleteConfig() error

func (*LocalStore) GetConfig

func (l *LocalStore) GetConfig() ([]byte, error)

func (*LocalStore) GetConfigs

func (l *LocalStore) GetConfigs() (api.AllClusters, error)

func (*LocalStore) UpdateConfig

func (l *LocalStore) UpdateConfig() error

func (*LocalStore) ValidateConfig

func (l *LocalStore) ValidateConfig() error

type Rke

type Rke struct {
	ClusterName         string `yaml:"cluster_name" json:"cluster_name"`
	NodeOs              string `yaml:"node_os" json:"node_os"`
	RkeAwsRegion        string `yaml:"rke_aws_region" json:"rke_aws_region"`
	Authorization       string `yaml:"authorization" json:"authorization"`
	RkeNodeInstanceType string `yaml:"rke_node_instance_type" json:"rke_node_instance_type"`
	NodeCount           int    `yaml:"node_count" json:"node_count"`
	CloudProvider       string `yaml:"cloud_provider" json:"cloud_provider"`
}

func (*Rke) CreateCluster

func (r *Rke) CreateCluster() error

CreateCluster creates RKE cluster

func (*Rke) DestroyCluster

func (r *Rke) DestroyCluster() error

DestroyCluster destroys given RKE cluster

func (*Rke) GetCluster

func (r *Rke) GetCluster(name string) (api.Cluster, error)

GetCluster for RKE

type RkeYaml

type RkeYaml struct {
	Rke *Rke `yaml:"rke"`
}

type Route

type Route struct {
	// contains filtered or unexported fields
}

Route is a specification and handler for a REST endpoint.

type S3Store

type S3Store struct {
	*Storage
	FileName   string
	BucketName string
	Region     string
}

func NewS3Store

func NewS3Store(name, bucketName, region string) *S3Store

func (*S3Store) CheckConfigExists

func (s *S3Store) CheckConfigExists() (bool, error)

func (*S3Store) CreateConfig

func (s *S3Store) CreateConfig(t api.Cluster) error

func (*S3Store) DeleteConfig

func (s *S3Store) DeleteConfig() error

func (*S3Store) GetConfig

func (s *S3Store) GetConfig() ([]byte, error)

func (*S3Store) GetConfigs

func (s *S3Store) GetConfigs() (api.AllClusters, error)

func (*S3Store) UpdateConfig

func (s *S3Store) UpdateConfig() error

func (*S3Store) ValidateConfig

func (s *S3Store) ValidateConfig() error

type Storage

type Storage struct {
	StoreType string
}

Jump to

Keyboard shortcuts

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