client

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChartStatusCheck

func ChartStatusCheck(clusterName string, namespace string, chartName string) (status string, err error)

func GetKubeClient

func GetKubeClient(namespace, context string) (*kube.KubeConfig, error)

Types

type Bucketweb

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

Bucketweb

type Client

type Client interface {
	PreflightChecks(c *Config, clusterName string) ([]string, error)
	InstallClient(clusterName string, targets []string, debug bool) (string, error)
	UninstallClient(clusterName string) error
}

client to Preflight checks and installing tools on cluster

func NewPromClient

func NewPromClient(promCluster *Cluster) (Client, error)

func NewThanosClient

func NewThanosClient(thanosCluster *Cluster) (Client, error)

type Cluster

type Cluster struct {
	Name string `yaml:"name"`
	Type string `yaml:"type"`
	Data Data   `yaml:"data"`
}

Cluster

type ClusterSpec

type ClusterSpec interface {
	GetTypeName()
}

type Compactor

type Compactor struct {
	Name                   string `yaml:"name"`
	Downsampling           bool   `yaml:"downsampling"`
	Deduplication          bool   `yaml:"deduplication"`
	RetentionResolutionRaw string `yaml:"retentionResolutionRaw"`
	RetentionResolution5m  string `yaml:"retentionResolution5m"`
	RetentionResolution1h  string `yaml:"retentionResolution1h"`
}

Compactor

type Config

type Config struct {
	Clusters            []Cluster        `yaml:"clusters"`
	ObjStoreConfigslist []ObjStoreConfig `yaml:"objStoreConfigslist"`
	Order               int              `yaml:",omitempty"` //if 1 then mode is sidecar else mode is receiver
}

KriusConfig

type Data

type Data map[string]interface{}

type Grafana

type Grafana struct {
	Name  string `yaml:"name"`
	Setup Setup  `yaml:"setup"`
}

Grafana

func (Grafana) GetTypeName

func (g Grafana) GetTypeName()

type ObjStoreConfig

type ObjStoreConfig struct {
	Bucketweb Bucketweb              `yaml:"bucketweb"`
	Name      string                 `yaml:"name"`
	Type      string                 `yaml:"type"`
	Config    map[string]interface{} `yaml:"config"`
}

Objstoresonfiglist

type Objspec

type Objspec struct {
	ConfigType string                 `yaml:"type"`
	Config     map[string]interface{} `yaml:"config"`
}

type Prometheus

type Prometheus struct {
	Install          bool     `yaml:"install"`
	Name             string   `yaml:"name"`
	Namespace        string   `yaml:"namespace"`
	Mode             string   `yaml:"mode"`
	ReceiveReference string   `yaml:"receiveReference"`
	RemoteWriteURL   []string `yaml:"remoteWriteURL"`
	ObjStoreConfig   string   `yaml:"objStoreConfig"`
}

Prometheus

func (Prometheus) GetTypeName

func (p Prometheus) GetTypeName()

any value which implements GetTypeName is also of type Clustter Spec interface

func (*Prometheus) InstallClient

func (prom *Prometheus) InstallClient(clusterName string, receiveEndpoint []string, debug bool) (string, error)

func (*Prometheus) PreflightChecks

func (prom *Prometheus) PreflightChecks(clusterConfig *Config, clusterName string) ([]string, error)

func (*Prometheus) UninstallClient

func (prom *Prometheus) UninstallClient(clusterName string) error

type Querier

type Querier struct {
	Targets         []string `yaml:"targets,omitempty"`
	DedupEnbaled    bool     `yaml:"dedupEnbaled"`
	AutoDownsample  bool     `yaml:"autoDownSample"`
	PartialResponse bool     `yaml:"partialResponse"`
	Name            string   `yaml:"name"`
}

Querier

type Querierfe

type Querierfe struct {
	Name        string                 `yaml:"name"`
	Cacheoption string                 `yaml:"cacheOption"`
	Config      map[string]interface{} `yaml:"config"`
}

Querierfe

type Receiver

type Receiver struct {
	Name string `yaml:"name"`
}

Receiver

type Ruler

type Ruler struct {
	Name          string   `yaml:"name"`
	Alertmanagers []string `yaml:"alertManagers"`
	Config        string   `yaml:"config"`
}

Ruler

type Setup

type Setup struct {
	Enabled   bool   `yaml:"enabled"`
	Name      string `yaml:"name"`
	Namespace string `yaml:"namespace"`
}

Setup

type Thanos

type Thanos struct {
	Name           string    `yaml:"name"`
	Namespace      string    `yaml:"namespace"`
	Install        bool      `yaml:"install"`
	ObjStoreConfig string    `yaml:"objStoreConfig"`
	Querier        Querier   `yaml:"querier"`
	Querierfe      Querierfe `yaml:"querierFE"`
	Receiver       Receiver  `yaml:"receiver"`
	Compactor      Compactor `yaml:"compactor"`
	Ruler          Ruler     `yaml:"ruler"`
}

Thanos

func (Thanos) GetTypeName

func (t Thanos) GetTypeName()

func (*Thanos) InstallClient

func (t *Thanos) InstallClient(clusterName string, targets []string, debug bool) (string, error)

func (*Thanos) PreflightChecks

func (t *Thanos) PreflightChecks(clusterConfig *Config, clusterName string) ([]string, error)

func (*Thanos) UninstallClient

func (t *Thanos) UninstallClient(clusterName string) error

type Trace

type Trace struct {
	Enable bool `yaml:"enable"`
}

Jump to

Keyboard shortcuts

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