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 VerifySnapshotName(name string) error
- type PrometheusController
- 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 VerifySnapshotName ¶
VerifySnapshotName verifies if snapshot name statisfies snapshot name regex.
Types ¶
type PrometheusController ¶
type PrometheusController struct {
// contains filtered or unexported fields
}
PrometheusController is a util for managing (setting up / tearing down) the prometheus stack in the cluster.
func NewPrometheusController ¶
func NewPrometheusController(clusterLoaderConfig *config.ClusterLoaderConfig) (pc *PrometheusController, err error)
NewPrometheusController creates a new instance of PrometheusController for the given config.
func (*PrometheusController) GetFramework ¶
func (pc *PrometheusController) GetFramework() *framework.Framework
GetFramework returns prometheus framework.
func (*PrometheusController) SetUpPrometheusStack ¶
func (pc *PrometheusController) 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 (*PrometheusController) TearDownPrometheusStack ¶
func (pc *PrometheusController) TearDownPrometheusStack() error
TearDownPrometheusStack tears down prometheus stack, releasing all prometheus resources.