Documentation ¶
Index ¶
- func CheckAllTargetsReady(k8sClient kubernetes.Interface, selector func(Target) bool, ...) (bool, error)
- func CheckTargetsReady(k8sClient kubernetes.Interface, selector func(Target) bool, ...) (bool, error)
- func InitFlags(p *config.PrometheusConfig)
- func ValidatePrometheusFlags(p *config.PrometheusConfig) *clerrors.ErrorList
- func VerifySnapshotName(name string) error
- type Controller
- type Target
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAllTargetsReady ¶
func CheckAllTargetsReady(k8sClient kubernetes.Interface, selector func(Target) bool, minActiveTargets int) (bool, error)
CheckAllTargetsReady returns true iff there is at least minActiveTargets matching the selector and all of them are ready.
func CheckTargetsReady ¶
func CheckTargetsReady(k8sClient kubernetes.Interface, selector func(Target) bool, minActiveTargets, minReadyTargets int) (bool, error)
CheckTargetsReady returns true iff there is at least minActiveTargets matching the selector and at least minReadyTargets of them are ready.
func ValidatePrometheusFlags ¶
func ValidatePrometheusFlags(p *config.PrometheusConfig) *clerrors.ErrorList
ValidatePrometheusFlags validates prometheus flags.
func VerifySnapshotName ¶
VerifySnapshotName verifies if snapshot name statisfies snapshot name regex.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller is a util for managing (setting up / tearing down) the prometheus stack in the cluster.
func NewController ¶
func NewController(clusterLoaderConfig *config.ClusterLoaderConfig) (pc *Controller, err error)
NewController creates a new instance of Controller for the given config.
func (*Controller) EnableTearDownPrometheusStackOnInterrupt ¶
func (pc *Controller) EnableTearDownPrometheusStackOnInterrupt()
func (*Controller) GetFramework ¶
func (pc *Controller) GetFramework() *framework.Framework
GetFramework returns prometheus framework.
func (*Controller) MakePrometheusSnapshotIfEnabled ¶
func (pc *Controller) MakePrometheusSnapshotIfEnabled() error
func (*Controller) SetUpPrometheusStack ¶
func (pc *Controller) SetUpPrometheusStack() error
SetUpPrometheusStack sets up prometheus stack in the cluster. This method is idempotent, if the prometheus stack is already set up applying the manifests again will be no-op.
func (*Controller) TearDownPrometheusStack ¶
func (pc *Controller) TearDownPrometheusStack() error
TearDownPrometheusStack tears down prometheus stack, releasing all prometheus resources.