parcascrapeconfig

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteScrapeConfig

func DeleteScrapeConfig(scrapeConfig parcav1alpha1.ParcaScrapeConfig) error

DeleteScrapeConfig deletes the scrape configuration for the provided ParcaScrapeConfig.

func GetConfig

func GetConfig() ([]byte, error)

GetConfig returns the current configuration as a YAML byte array.

func GetReconciliationInterval

func GetReconciliationInterval() time.Duration

GetReconciliationInterval returns the configured reconciliation interval.

func Init

func Init() error

Init is responsible to initialise the scrapeconfigs package. For that it reads all environment variables starting with "PARCA_SCRAPECONFIG_" and uses them to configure the package.

func SetScrapeConfig

func SetScrapeConfig(scrapeConfig parcav1alpha1.ParcaScrapeConfig, pods []corev1.Pod) ([]string, error)

SetScrapeConfig adds or updates a scrape configuration for the provided ParcaScrapeConfig. It returns a list of PodIPs which can then be set in the status of the CR.

Types

type ParcaConfig

type ParcaConfig struct {
	ObjectStorage *ParcaObjectStorage          `json:"object_storage,omitempty"`
	ScrapeConfigs []parcav1alpha1.ScrapeConfig `json:"scrape_configs,omitempty"`
}

ParcaConfig holds all the configuration information for Parca.

type ParcaObjectStorage

type ParcaObjectStorage struct {
	Bucket struct {
		Type   string      `json:"type"`
		Config interface{} `json:"config"`
		Prefix string      `json:"prefix" default:""`
	} `json:"bucket,omitempty"`
}

Jump to

Keyboard shortcuts

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