Documentation
¶
Overview ¶
Package deploy provides utilities for provisioning and configuring the Prometheus engine components and a synthetic application within a Kubernetes cluster. These deployed resources serve as the test environment for end-to-end tests, enabling validation of the Prometheus engine's functionality by interacting with its operator, collector, and rule-evaluator, and by scraping metrics from the synthetic application.
Index ¶
- Constants
- func CreateResources(ctx context.Context, kubeClient client.Client, deployOpts ...DeployOption) error
- func OperatorLogs(ctx context.Context, restConfig *rest.Config, kubeClient client.Client, ...) (string, error)
- func SyntheticAppResources(scheme *runtime.Scheme) (*appsv1.Deployment, *corev1.Service, error)
- func WaitForOperatorReady(ctx context.Context, kubeClient client.Client) error
- type DeployOption
- func WithDisableGCM(disableGCM bool) DeployOption
- func WithExplicitCollectorFilter(filter string) DeployOption
- func WithExplicitCredentials(filepath string) DeployOption
- func WithMeta(projectID, cluster, location string) DeployOption
- func WithOperatorNamespace(namespace string) DeployOption
- func WithPublicNamespace(namespace string) DeployOption
Constants ¶
const ( SyntheticAppPortName = "web" SyntheticAppContainerName = "go-synthetic" )
Variables ¶
This section is empty.
Functions ¶
func CreateResources ¶
func OperatorLogs ¶
func OperatorLogs(ctx context.Context, restConfig *rest.Config, kubeClient client.Client, operatorNamespace string) (string, error)
OperatorLogs returns the operator pods logs.
func SyntheticAppResources ¶
Types ¶
type DeployOption ¶
type DeployOption func(*deployOptions)
func WithDisableGCM ¶
func WithDisableGCM(disableGCM bool) DeployOption
func WithExplicitCollectorFilter ¶
func WithExplicitCollectorFilter(filter string) DeployOption
WithExplicitCollectorFilter injects --export.match to collector. This is useful to reproduce cases when collector has left over match flags (e.g. via EXTRA_ARGS).
func WithExplicitCredentials ¶
func WithExplicitCredentials(filepath string) DeployOption
WithExplicitCredentials sets explicit credential file path in local container to use. TODO(bwplotka): Remove once runtime config can change auth options. See https://github.com/GoogleCloudPlatform/prometheus/issues/261.
func WithMeta ¶
func WithMeta(projectID, cluster, location string) DeployOption
func WithOperatorNamespace ¶
func WithOperatorNamespace(namespace string) DeployOption
func WithPublicNamespace ¶
func WithPublicNamespace(namespace string) DeployOption