components

package
v0.0.0-...-94e4715 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const CephCSIRBDTemplate = `` /* 19818-byte string literal not displayed */

Variables

This section is empty.

Functions

func GenerateHelmValues

func GenerateHelmValues(config interface{}) map[string]interface{}

Types

type AdmissionWebhooks

type AdmissionWebhooks struct {
	Enabled bool                   `json:"enabled"`
	Patch   AdmissionWebhooksPatch `json:"patch"`
}

type AdmissionWebhooksPatch

type AdmissionWebhooksPatch struct {
	Enabled bool `json:"enabled"`
	// image: jettech/kube-webhook-certgen:v1.0.0
	Image Image `json:"image"`
}

type Alertmanager

type Alertmanager struct {
	Enabled bool             `json:"enabled"`
	Spec    AlertmanagerSpec `json:"alertmanagerSpec"`
}

type AlertmanagerSpec

type AlertmanagerSpec struct {
	CommonConfig
	// image: quay.io/prometheus/alertmanager:v0.20.0
	Image Image `json:"image"`
}

type CephCSIRBDConfig

type CephCSIRBDConfig struct {
	Namespace     string
	ConfigMapName string
	ConfigJSON    string
	// image: registry.cn-beijing.aliyuncs.com/yunionio/csi-provisioner:v1.4.0
	AttacherImage string
	// image: registry.cn-beijing.aliyuncs.com/yunionio/csi-snapshotter:v1.2.2
	ProvisionerImage string
	// image: registry.cn-beijing.aliyuncs.com/yunionio/csi-snapshotter:v1.2.2
	SnapshotterImage string
	// image: registry.cn-beijing.aliyuncs.com/yunionio/cephcsi:v2.0-canary
	CephCSIImage string
	// image: registry.cn-beijing.aliyuncs.com/yunionio/csi-node-driver-registrar:v1.2.0
	RegistrarImage string
	// image: registry.cn-beijing.aliyuncs.com/yunionio/csi-resizer:v0.4.0
	ResizerImage string
}

func (CephCSIRBDConfig) GenerateYAML

func (c CephCSIRBDConfig) GenerateYAML() (string, error)

type CommonConfig

type CommonConfig struct {
	Enabled     bool                    `json:"enabled"`
	Tolerations []v1.Toleration         `json:"tolerations"`
	Affinity    *v1.Affinity            `json:"affinity"`
	Resources   *api.HelmValueResources `json:"resources"`
}

type FluentBit

type FluentBit struct {
	Image   FluentBitImage   `json:"image"`
	Backend FluentBitBackend `json:"backend"`
}

type FluentBitBackend

type FluentBitBackend struct {
	ES    *FluentBitBackendES    `json:"es"`
	Kafka *FluentBitBackendKafka `json:"kafka"`
}

type FluentBitBackendCommon

type FluentBitBackendCommon struct {
	Enabled bool `json:"enabled"`
}

type FluentBitBackendES

type FluentBitBackendES struct {
	FluentBitBackendCommon
	Host string `json:"host"`
	Port int    `json:"port"`
	// Elastic index name, default: fluentbit
	Index string `json:"index"`
	// Type name, default: flb_type
	Type           string `json:"type"`
	LogstashPrefix string `json:"logstash_prefix"`
	ReplaceDots    string `json:"replace_dots"`
	LogstashFormat string `json:"logstash_format"`
	// Optional username credential for Elastic X-Pack access
	HTTPUser string `json:"httpUser"`
	// Password for user defined in HTTPUser
	HTTPPassword string `json:"httpPassword"`
	FluentBitBackendTLS
}

type FluentBitBackendKafka

type FluentBitBackendKafka struct {
	FluentBitBackendCommon
	// specify data format, options available: json, msgpack, default: json
	Format string `json:"format"`
	// Optional key to store the message
	MessageKey string `json:"message_key"`
	// Set the key to store the record timestamp
	TimestampKey string `json:"timestamp_key"`
	// Single of multiple list of kafka brokers
	Brokers string `json:"brokers"`
	// Single entry or list of topics separated by comma(,)
	Topics string `json:"topics"`
}

type FluentBitBackendTLS

type FluentBitBackendTLS struct {
	TLS       string `json:"tls"`
	TLSVerify string `json:"tls_verify"`
	TLSCA     string `json:"tls_ca"`
}

type FluentBitImage

type FluentBitImage struct {
	FluentBit Image `json:"fluent_bit"`
}

type Grafana

type Grafana struct {
	CommonConfig
	AdminUser     string         `json:"adminUser"`
	AdminPassword string         `json:"adminPassword"`
	Sidecar       GrafanaSidecar `json:"sidecar"`
	// image: grafana/grafana:6.7.1
	Image                 Image                        `json:"image"`
	Storage               *Storage                     `json:"persistence"`
	Service               *Service                     `json:"service"`
	Ingress               *GrafanaIngress              `json:"ingress"`
	GrafanaIni            *GrafanaIni                  `json:"grafana.ini"`
	AdditionalDataSources GrafanaAdditionalDataSources `json:"additionalDataSources"`
}

type GrafanaAdditionalDataSource

type GrafanaAdditionalDataSource struct {
	Name      string                     `json:"name"`
	Type      string                     `json:"type"`
	Url       string                     `json:"url"`
	Access    string                     `json:"access"`
	IsDefault bool                       `json:"isDefault"`
	Database  string                     `json:"database,omitempty"`
	JsonData  *GrafanaDataSourceJsonData `json:"jsonData,omitempty"`
}

type GrafanaAdditionalDataSources

type GrafanaAdditionalDataSources []GrafanaAdditionalDataSource

type GrafanaDataSourceJsonData

type GrafanaDataSourceJsonData struct {
	// TlsAuth       bool `json:"tlsAuth"`
	TlsSkipVerify bool `json:"tlsSkipVerify"`
}

type GrafanaIngress

type GrafanaIngress struct {
	Enabled bool            `json:"enabled"`
	Path    string          `json:"path"`
	Host    string          `json:"host,allowempty"`
	Secret  *api.TLSKeyPair `json:"secret"`

	TLS []*api.IngressTLS `json:"tls"`
}

type GrafanaIni

type GrafanaIni struct {
	Server       *GrafanaIniServer       `json:"server"`
	OAuth        *GrafanaIniOAuth        `json:"auth.generic_oauth"`
	AnonyousAuth *GrafanaIniAnonyousAuth `json:"auth.anonymous"`
	Database     *GrafanaIniDatabase     `json:"database"`
}

type GrafanaIniAnonyousAuth

type GrafanaIniAnonyousAuth struct {
	Enabled bool   `json:"enabled"`
	OrgName string `json:"org_name"`
	OrgRole string `json:"org_role"`
}

type GrafanaIniDatabase

type GrafanaIniDatabase struct {
	Type     string `json:"type"`
	Host     string `json:"host"`
	Name     string `json:"name"`
	User     string `json:"user"`
	Password string `json:"password"`
}

type GrafanaIniOAuth

type GrafanaIniOAuth struct {
	Enabled           bool   `json:"enabled"`
	ClientId          string `json:"client_id"`
	ClientSecret      string `json:"client_secret"`
	Scopes            string `json:"scopes"`
	AuthURL           string `json:"auth_url"`
	TokenURL          string `json:"token_url"`
	APIURL            string `json:"api_url"`
	AllowedDomains    string `json:"allowed_domains"`
	AllowSignUp       bool   `json:"allow_sign_up"`
	RoleAttributePath string `json:"role_attribute_path"`
}

type GrafanaIniServer

type GrafanaIniServer struct {
	RootUrl          string `json:"root_url"`
	ServeFromSubPath bool   `json:"serve_from_sub_path"`
	Domain           string `json:"domain,omitempty"`
	EnforceDomain    bool   `json:"enforce_domain,omitempty"`
}

type GrafanaSidecar

type GrafanaSidecar struct {
	// image: kiwigrid/k8s-sidecar:0.1.99
	Image       Image                     `json:"image"`
	Dashboards  GrafanaSidecarDashboards  `json:"dashboards"`
	Datasources GrafanaSidecarDataSources `json:"datasources"`
}

type GrafanaSidecarDashboards

type GrafanaSidecarDashboards struct {
	Enabled bool `json:"enabled"`
}

type GrafanaSidecarDataSources

type GrafanaSidecarDataSources struct {
	DefaultDatasourceEnabled bool `json:"defaultDatasourceEnabled"`
}

type Image

type Image struct {
	Repository string `json:"repository"`
	Tag        string `json:"tag"`
}

type Image2

type Image2 struct {
	// e.g. `docker.io`
	Registry string `json:"registry"`
	// e.g. `bitnami/thanos`
	Repository string `json:"repository"`
	// e.g. `v0.16.0`
	Tag string `json:"tag"`
}

type KubeStateMetrics

type KubeStateMetrics struct {
	CommonConfig
	// image: quay.io/coreos/kube-state-metrics:v1.9.4
	Image Image `json:"image"`
}

type Loki

type Loki struct {
	CommonConfig
	Image   Image       `json:"image"`
	Storage *Storage    `json:"persistence"`
	Config  *LokiConfig `json:"config"`
}

type LokiCompactorConfig

type LokiCompactorConfig struct {
	// e.g. `/data/loki/boltdb-shipper-compactor`
	// WorkingDir string `json:"working_directory"`
	// e.g. `s3`
	SharedStore string `json:"shared_store"`
}

type LokiConfig

type LokiConfig struct {
	// Ingester      LokiIngesterConfig     `json:"ingester"`
	SchemaConfig  LokiConfigSchemaConfig  `json:"schema_config"`
	StorageConfig LokiStorageConfig       `json:"storage_config"`
	Compactor     LokiCompactorConfig     `json:"compactor"`
	TableManager  *LokiTableManagerConfig `json:"table_manager"`
}

type LokiConfigSchemaConfig

type LokiConfigSchemaConfig struct {
	Configs []LokiSchemaConfig `json:"configs"`
}

type LokiIngesterConfig

type LokiIngesterConfig struct {
	// default `3m`
	ChunkIdlePeriod string `json:"check_idle_period"`
	// default 262144
	CheckBlockSize int `json:"chunk_block_size"`
	// default: `1m`
	ChunkRetainPeriod string `json:"check_retain_period"`
}

type LokiSchemaConfig

type LokiSchemaConfig struct {
	From        string                `json:"from"`
	Store       string                `json:"store"`
	ObjectStore string                `json:"object_store"`
	Schema      string                `json:"schema"`
	Index       LokiSchemaConfigIndex `json:"index"`
}

type LokiSchemaConfigIndex

type LokiSchemaConfigIndex struct {
	Prefix string `json:"prefix"`
	Period string `json:"period"`
}

type LokiStorageConfig

type LokiStorageConfig struct {
	Aws           LokiStorageConfigAws           `json:"aws"`
	BoltdbShipper LokiStorageConfigBoltdbShipper `json:"boltdb_shipper"`
}

type LokiStorageConfigAws

type LokiStorageConfigAws struct {
	// e.g. `s3://plUbSwTzWXi3QsP0B8Ab:Rp40yaVS7NVf4zkrpIU6WANlbxWQTUErSIs1EduG@minio-test.default:9000/loki-bucket`
	S3               string `json:"s3"`
	S3ForcepathStyle bool   `json:"s3forcepathstyle"`
}

type LokiStorageConfigBoltdbShipper

type LokiStorageConfigBoltdbShipper struct {
	// e.g.: `/data/loki/boltdb-shipper-active`
	// ActiveIndexDirectory string `json:"active_index_directory"`
	// e.g.: `/data/loki/boltdb-shipper-cache`
	// CacheLocation string `json:"cache_location"`
	// e.g. `24h`
	CacheTTL string `json:"cache_ttl"`
	// e.g. `s3`
	SharedStore string `json:"shared_store"`
}

type LokiTableManagerConfig

type LokiTableManagerConfig struct {
	RetentionDeletesEnabled bool   `json:"retention_deletes_enabled"`
	RetentionPeriod         string `json:"retention_period"`
}

type Minio

type Minio struct {
	CommonConfig

	Image Image `json:"image"`
	// ClusterDomain string `json:"clusterDomain"`
	// Minio client image
	McImage            Image  `json:"mcImage"`
	HelmKubectlJqImage Image  `json:"helmKubectlJqImage"`
	Mode               string `json:"mode"`
	// Number of MinIO containers running (applicable only for distributed mode)
	Replicas int `json:"replicas"`
	// Number of drives per node (applicable only for distributed mode)
	DrivesPerNode int `json:"drivesPerNode"`
	// Number of zones (applicable only for distributed mode)
	Zones int `json:"zones"`
	// Default MinIO admin accessKey
	AccessKey string `json:"accessKey"`
	// Default Minio admin secretKey
	SecretKey string `json:"secretKey"`
	// Default directory mount path, e.g. `/export`
	MountPath   string           `json:"mountPath"`
	Persistence MinioPersistence `json:"persistence"`
}

type MinioPersistence

type MinioPersistence struct {
	Enabled      bool   `json:"enabled"`
	StorageClass string `json:"storageClass"`
	Size         string `json:"size"`
}

type MonitorStack

type MonitorStack struct {
	Prometheus             Prometheus             `json:"prometheus"`
	Alertmanager           Alertmanager           `json:"alertmanager"`
	NodeExporter           NodeExporter           `json:"nodeExporter"`
	PrometheusNodeExporter PrometheusNodeExporter `json:"prometheus-node-exporter"`
	KubeStateMetrics       KubeStateMetrics       `json:"kube-state-metrics"`
	Grafana                Grafana                `json:"grafana"`
	Loki                   Loki                   `json:"loki"`
	Promtail               Promtail               `json:"promtail"`
	PrometheusOperator     PrometheusOperator     `json:"prometheusOperator"`
}

type NodeExporter

type NodeExporter struct {
	Enabled bool `json:"enabled"`
}

type ObjectStorageConfig

type ObjectStorageConfig struct {
	Key  string `json:"key"`
	Name string `json:"name"`
}

type Persistence

type Persistence struct {
	Enabled      bool     `json:"enabled"`
	StorageClass *string  `json:"storageClass"`
	AccessModes  []string `json:"accessModes"`
	Size         string   `json:"size"`
}

type PersistentVolumeClaim

type PersistentVolumeClaim struct {
	Spec PersistentVolumeClaimSpec `json:"spec"`
}

type PersistentVolumeClaimSpec

type PersistentVolumeClaimSpec struct {
	StorageClassName *string   `json:"storageClassName"`
	AccessModes      []string  `json:"accessModes"`
	Resources        Resources `json:"resources"`
}

type PromAdmissionWebhooks

type PromAdmissionWebhooks struct {
	Enabled bool                       `json:"enabled"`
	Patch   PromAdmissionWebhooksPatch `json:"patch"`
}

type PromAdmissionWebhooksPatch

type PromAdmissionWebhooksPatch struct {
	Enabled bool `json:"enabled"`
}

type PromTLSProxy

type PromTLSProxy struct {
	Enabled bool  `json:"enabled"`
	Image   Image `json:"image"`
}

type Prometheus

type Prometheus struct {
	Enabled bool           `json:"enabled"`
	Spec    PrometheusSpec `json:"prometheusSpec"`
}

type PrometheusNodeExporter

type PrometheusNodeExporter struct {
	Enabled bool `json:"enabled"`
	// image: quay.io/prometheus/node-exporter:v0.18.1
	Image Image `json:"image"`
}

type PrometheusOperator

type PrometheusOperator struct {
	CommonConfig
	NodeSelector map[string]string `json:"nodeSelector"`
	// image: squareup/ghostunnel:v1.5.2
	TLSProxy          PromTLSProxy      `json:"tlsProxy"`
	AdmissionWebhooks AdmissionWebhooks `json:"admissionWebhooks"`
	// image: quay.io/coreos/prometheus-operator:v0.37.0
	Image Image `json:"image"`
	// image: quay.io/coreos/configmap-reload:v0.0.1
	ConfigmapReloadImage Image `json:"configmapReloadImage"`
	// image: quay.io/coreos/prometheus-config-reloader:v0.37.0
	PrometheusConfigReloaderImage Image `json:"prometheusConfigReloaderImage"`
	// image: k8s.gcr.io/hyperkube:v1.12.1
	HyperkubeImage Image `json:"hyperkubeImage"`
}

type PrometheusSpec

type PrometheusSpec struct {
	CommonConfig
	// image: quay.io/prometheus/prometheus:v2.15.2
	Image       Image                  `json:"image"`
	StorageSpec *PrometheusStorageSpec `json:"storageSpec"`
	// How long to retain metrics
	Retention string `json:"retention"`
	// Maximum size of metrics
	RetentionSize string `json:"retentionSize"`
	// Resource limits & requests
	Resources Resources `json:"resources"`
	// ThanosSpec defines parameters for a Prometheus server within a Thanos sidecar.
	Thanos ThanosSidecarSpec `json:"thanos"`
}

type PrometheusStorageSpec

type PrometheusStorageSpec struct {
	Template PersistentVolumeClaim `json:"volumeClaimTemplate"`
}

func NewPrometheusStorageSpec

func NewPrometheusStorageSpec(storage api.ComponentStorage) (*PrometheusStorageSpec, error)

type Promtail

type Promtail struct {
	Enabled      bool                    `json:"enabled"`
	Resources    *api.HelmValueResources `json:"resources"`
	BusyboxImage string                  `json:"busyboxImage"`
	Image        Image                   `json:"image"`
	Volumes      []*PromtailVolume       `json:"volumes"`
	VolumeMounts []*PromtailVolumeMount  `json:"volumeMounts"`
}

type PromtailVolume

type PromtailVolume struct {
	Name     string                 `json:"name"`
	HostPath PromtailVolumeHostPath `json:"hostPath"`
}

type PromtailVolumeHostPath

type PromtailVolumeHostPath struct {
	Path string `json:"path"`
}

type PromtailVolumeMount

type PromtailVolumeMount struct {
	Name      string `json:"name"`
	MountPath string `json:"mountPath"`
	ReadOnly  bool   `json:"readOnly"`
}

type Resources

type Resources struct {
	Requests map[string]string `json:"requests"`
}

type Service

type Service struct {
	Type string `json:"type"`
}

type Storage

type Storage struct {
	Type             string   `json:"type"`
	Enabled          bool     `json:"enabled"`
	StorageClassName string   `json:"storageClassName"`
	StorageClass     string   `json:"storageClass"`
	AccessModes      []string `json:"accessModes"`
	Size             string   `json:"size"`
}

func NewPVCStorage

func NewPVCStorage(storage *api.ComponentStorage) (*Storage, error)

type Thanos

type Thanos struct {
	Image          Image2                  `json:"image"`
	ClusterDomain  string                  `json:"clusterDomain"`
	ObjStoreConfig ThanosObjectStoreConfig `json:"objstoreConfig"`
	Query          ThanosQuery             `json:"query"`
	Storegateway   ThanosStoregateway      `json:"storegateway"`
	Compactor      ThanosCompactor         `json:"compactor"`
}

type ThanosCompactor

type ThanosCompactor struct {
	CommonConfig

	Enabled     bool      `json:"enabled"`
	Resources   Resources `json:"resources"`
	Persistence Storage   `json:"persistence"`
}

type ThanosObjectStoreConfig

type ThanosObjectStoreConfig struct {
	Type   string                        `json:"type"`
	Config ThanosObjectStoreConfigConfig `json:"config"`
}

type ThanosObjectStoreConfigConfig

type ThanosObjectStoreConfigConfig struct {
	api.ObjectStoreConfig
	SignatureVersion2 bool `json:"signature_version2"`
}

type ThanosQuery

type ThanosQuery struct {
	CommonConfig

	Enabled      bool                    `json:"enabled"`
	DnsDiscovery ThanosQueryDnsDiscovery `json:"dnsDiscovery"`
	// Statically configure store APIs to connect with Thanos Query
	Stores []string `json:"stores"`
	// Number of Thanos Query replicas to deploy
	ReplicaCount int       `json:"replicaCount"`
	Resources    Resources `json:"resources"`
}

type ThanosQueryDnsDiscovery

type ThanosQueryDnsDiscovery struct {
	Enabled           bool   `json:"enabled"`
	SidecarsService   string `json:"sidecarsService"`
	SidecarsNamespace string `json:"sidecarsNamespace"`
}

type ThanosSidecarSpec

type ThanosSidecarSpec struct {
	BaseImage           string              `json:"baseImage"`
	Version             string              `json:"version"`
	ObjectStorageConfig ObjectStorageConfig `json:"objectStorageConfig"`
}

type ThanosStoregateway

type ThanosStoregateway struct {
	CommonConfig

	Enabled     bool      `json:"enabled"`
	Resources   Resources `json:"resources"`
	Persistence Storage   `json:"persistence"`
}

Jump to

Keyboard shortcuts

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