plugin

package
v0.4.0-rc.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	MetricPluginName  = "metric"
	GrafanaPluginName = "grafana"
	KyvernoPluginName = "kyverno"

	ThanosComponentName        = "thanos"
	PrometheusComponentName    = "prometheus"
	GrafanaComponentName       = "grafana"
	KyvernoComponentName       = "kyverno"
	KyvernoPolicyComponentName = "kyverno-policies"

	OCIReposiotryPrefix = "oci://"
)

Variables

This section is empty.

Functions

func RendPrometheus

func RendPrometheus(fsys fs.FS, fleetName types.NamespacedName, fleetRef *metav1.OwnerReference, cluster FleetCluster, metricCfg *fleetv1a1.MetricConfig) ([]byte, error)

func RenderGrafana

func RenderGrafana(fsys fs.FS, fleetNN types.NamespacedName, fleetRef *metav1.OwnerReference,
	grafanaCfg *fleetv1a1.GrafanaConfig, datasources []*GrafanaDataSource) ([]byte, error)

func RenderKyverno

func RenderKyverno(fsys fs.FS, fleetNN types.NamespacedName, fleetRef *metav1.OwnerReference, cluster FleetCluster, kyvernoCfg *fleetv1a1.KyvernoConfig) ([]byte, error)

func RenderKyvernoPolicy

func RenderKyvernoPolicy(fsys fs.FS, fleetNN types.NamespacedName, fleetRef *metav1.OwnerReference, cluster FleetCluster, kyvernoCfg *fleetv1a1.KyvernoConfig) ([]byte, error)

func RenderThanos

func RenderThanos(fsys fs.FS, fleetNN types.NamespacedName, fleetRef *metav1.OwnerReference, metricCfg *fleetv1a1.MetricConfig) ([]byte, error)

Types

type ChartConfig

type ChartConfig struct {
	Type            string
	Repo            string
	Name            string
	Version         string
	TargetNamespace string
	Values          map[string]interface{}
}

type FleetCluster

type FleetCluster struct {
	Name       string
	SecretName string
	SecretKey  string
}

type FleetPluginConfig

type FleetPluginConfig struct {
	Name           string
	Component      string
	Fleet          types.NamespacedName
	OwnerReference *metav1.OwnerReference
	Cluster        *FleetCluster
	Chart          ChartConfig
	Values         map[string]interface{}
}

func (FleetPluginConfig) ResourceName

func (plugin FleetPluginConfig) ResourceName() string

func (FleetPluginConfig) StorageNamespace

func (plugin FleetPluginConfig) StorageNamespace() string

type GrafanaDataSource

type GrafanaDataSource struct {
	Name       string `json:"name"`
	SourceType string `json:"type"`
	URL        string `json:"url"`
	Access     string `json:"access"`
	IsDefault  bool   `json:"isDefault"`
}

Jump to

Keyboard shortcuts

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