kubernetes

package
v0.0.0-...-8536149 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLUSTER_TYPE = "kubernetes"
)

Variables

This section is empty.

Functions

func CreateCluster

func CreateCluster(cfg *ltops.ClusterConfig) (ltops.Cluster, error)

Types

type AppConfig

type AppConfig struct {
	ReplicaCount int               `yaml:"replicaCount"`
	Image        *ImageSetting     `yaml:"image"`
	Resources    *ResourcesSetting `yaml:"resources"`
}

type ChartConfig

type ChartConfig struct {
	Global     *GlobalConfig     `yaml:"global"`
	MySQLHA    *MySQLHAConfig    `yaml:"mysqlha"`
	App        *AppConfig        `yaml:"mattermostApp"`
	Proxy      *ProxyConfig      `yaml:"nginx-ingress"`
	Prometheus *PrometheusConfig `yaml:"prometheus"`
}

func (*ChartConfig) TotalCPURequests

func (c *ChartConfig) TotalCPURequests() *Quantity

func (*ChartConfig) TotalMemoryRequests

func (c *ChartConfig) TotalMemoryRequests() *Quantity

type Cluster

type Cluster struct {
	Config      *ltops.ClusterConfig
	ReleaseName string
	Kubernetes  *kubernetes.Clientset `json:"-"`
}

func (*Cluster) Configuration

func (c *Cluster) Configuration() *ltops.ClusterConfig

func (*Cluster) Connect

func (c *Cluster) Connect() error

func (*Cluster) DBConnectionString

func (c *Cluster) DBConnectionString() string

func (*Cluster) DBDriverName

func (c *Cluster) DBDriverName() string

func (*Cluster) DBInstanceCount

func (c *Cluster) DBInstanceCount() int

func (*Cluster) DBReaderConnectionStrings

func (c *Cluster) DBReaderConnectionStrings() []string

func (*Cluster) DBSettings

func (c *Cluster) DBSettings() (*ltops.DBSettings, error)

func (*Cluster) Deploy

func (c *Cluster) Deploy(options *ltops.DeployOptions) error

func (*Cluster) Destroy

func (c *Cluster) Destroy() error

func (*Cluster) GetAppInstancesAddrs

func (c *Cluster) GetAppInstancesAddrs() ([]string, error)

func (*Cluster) GetHelmConfigFromProfile

func (c *Cluster) GetHelmConfigFromProfile(profile string, users int, license string) (*ChartConfig, error)

func (*Cluster) GetLoadtestInstancesAddrs

func (c *Cluster) GetLoadtestInstancesAddrs() ([]string, error)

func (*Cluster) GetMetricsAddr

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

func (*Cluster) GetMetricsPodName

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

func (*Cluster) GetProxyInstancesAddrs

func (c *Cluster) GetProxyInstancesAddrs() ([]string, error)

func (*Cluster) Loadtest

func (c *Cluster) Loadtest(options *ltops.LoadTestOptions) error

func (*Cluster) Name

func (c *Cluster) Name() string

func (*Cluster) Release

func (c *Cluster) Release() string

func (*Cluster) SSHKey

func (c *Cluster) SSHKey() []byte

func (*Cluster) SiteURL

func (c *Cluster) SiteURL() string

func (*Cluster) Type

func (c *Cluster) Type() string

type CustomEmojiFeature

type CustomEmojiFeature struct {
	Enabled bool `yaml:"enabled"`
}

type DatabaseExternal

type DatabaseExternal struct {
	Driver             string `yaml:"driver"`
	DataSource         string `yaml:"dataSource"`
	DataSourceReplicas string `yaml:"dataSourceReplicas"`
}

type DatabaseFeature

type DatabaseFeature struct {
	UseInternal bool              `yaml:"useInternal"`
	Internal    *DatabaseInternal `yaml:"internal,omitempty"`
	External    *DatabaseExternal `yaml:"external,omitempty"`
}

type DatabaseInternal

type DatabaseInternal struct {
	DBUser     string `yaml:"dbUser"`
	DBPassword string `yaml:"dbPassword"`
	DBName     string `yaml:"dbName"`
}

type FeaturesConfig

type FeaturesConfig struct {
	Ingress      *IngressFeature     `yaml:"ingress"`
	Database     *DatabaseFeature    `yaml:"database"`
	LoadTest     *LoadTestFeature    `yaml:"loadTest"`
	Grafana      *GrafanaFeature     `yaml:"grafana"`
	LinkPreviews *LinkPreviewFeature `yaml:"linkPreviews"`
	CustomEmoji  *CustomEmojiFeature `yaml:"customEmoji"`
	Storage      *StorageFeature     `yaml:"storage"`
}

type GlobalConfig

type GlobalConfig struct {
	SiteURL           string          `yaml:"siteUrl"`
	MattermostLicense string          `yaml:"mattermostLicense"`
	Features          *FeaturesConfig `yaml:"features"`
}

type GrafanaFeature

type GrafanaFeature struct {
	Enabled bool `yaml:"enabled"`
}

type ImageSetting

type ImageSetting struct {
	Tag string `yaml:"tag"`
}

type IngressFeature

type IngressFeature struct {
	Enabled bool `yaml:"enabled"`
}

type LinkPreviewFeature

type LinkPreviewFeature struct {
	Enabled bool `yaml:"enabled"`
}

type LoadTestFeature

type LoadTestFeature struct {
	Enabled                           bool              `yaml:"enabled"`
	ReplicaCount                      int               `yaml:"replicaCount"`
	Image                             *ImageSetting     `yaml:"image"`
	Resources                         *ResourcesSetting `yaml:"resources"`
	NumTeams                          int               `yaml:"numTeams"`
	NumChannelsPerTeam                int               `yaml:"numChannelsPerTeam"`
	NumUsers                          int               `yaml:"numUsers"`
	NumPosts                          int               `yaml:"numPosts"`
	ReplyChance                       float32           `yaml:"replyChance"`
	LinkPreviewChance                 float32           `yaml:"linkPreviewChance"`
	SkipBulkLoad                      bool              `yaml:"skipBulkLoad"`
	TestLengthMinutes                 int               `yaml:"testLengthMinutes"`
	NumActiveEntities                 int               `yaml:"numActiveEntities"`
	ActionRateMilliseconds            int               `yaml:"actionRateMilliseconds"`
	ActionRateMaxVarianceMilliseconds int               `yaml:"actionRateMaxVarianceMilliseconds"`
}

type MySQLConfigFiles

type MySQLConfigFiles struct {
	Master string `yaml:"master.cnf"`
	Slave  string `yaml:"slave.cnf"`
}

type MySQLHAConfig

type MySQLHAConfig struct {
	Enabled   bool              `yaml:"enabled"`
	Options   *MySQLHAOptions   `yaml:"mysqlha"`
	Resources *ResourcesSetting `yaml:"resources"`
}

type MySQLHAOptions

type MySQLHAOptions struct {
	ReplicaCount int               `yaml:"replicaCount"`
	ConfigFiles  *MySQLConfigFiles `yaml:"configFiles"`
}

type PrometheusConfig

type PrometheusConfig struct {
	Enabled bool `yaml:"enabled"`
}

type ProxyConfig

type ProxyConfig struct {
	Enabled    bool             `yaml:"enabled"`
	Controller *ProxyController `yaml:"controller"`
}

type ProxyController

type ProxyController struct {
	ReplicaCount int               `yaml:"replicaCount"`
	Resources    *ResourcesSetting `yaml:"resources"`
}

type Quantity

type Quantity struct {
	*resource.Quantity
}

func (*Quantity) MarshalYAML

func (q *Quantity) MarshalYAML() (interface{}, error)

type ResourceSetting

type ResourceSetting struct {
	CPU    *Quantity `yaml:"cpu"`
	Memory *Quantity `yaml:"memory"`
}

type ResourcesSetting

type ResourcesSetting struct {
	Limits   *ResourceSetting `yaml:"limits,omitempty"`
	Requests *ResourceSetting `yaml:"requests"`
}

type StorageFeature

type StorageFeature struct {
	Enabled bool `yaml:"enabled"`
}

Jump to

Keyboard shortcuts

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