util

package
v0.0.0-...-8cac83f Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PerfmanNamespace  = "default"
	NumaflowNamespace = "numaflow-system"
)

Namespace config

View Source
const (
	GrafanaPassword         = "admin"
	GrafanaURL              = "http://localhost:3000"
	PrometheusURL           = "http://localhost:9090"
	GrafanaReleaseName      = "perfman-grafana"
	PrometheusReleaseName   = "perfman-kube-prometheus"
	PrometheusPFServiceName = "perfman-kube-prometheus-prometheus" // Prometheus service name to use for port forwarding
	GrafanaPFServiceName    = "perfman-grafana"                    // Grafana service name to use for port forwarding

	// RateInterval is used to determine over what period the rate function is computed.
	// It should typically be at least 4-5 times the scrape interval,
	// which is the amount of time between each "scrape" of data from the monitored targets.
	// The scrape interval can be adjusted in the yaml file for the service monitor using the `interval` key.
	// If the 'interval' key is modified make sure to adjust RateInterval accordingly
	RateInterval = 1 * time.Minute

	// Step is used when querying data, and should be tuned based on the granularity of data you want when querying.
	// It determines the time duration between two returned data points in the response, and
	// should always be equal to or larger than the scrape interval set in the service
	// monitor yaml, to prevent asking for data at a higher resolution than you have
	Step = 15 * time.Second
)

Grafana and Prometheus config

Variables

View Source
var CommitSHA string

CommitSHA variable set at build time

Functions

func CreateLogger

func CreateLogger() *zap.Logger

func CreateResource

func CreateResource(filename string, dynamicClient *dynamic.DynamicClient, gvr schema.GroupVersionResource, namespace string, log *zap.Logger) error

func DeleteResourcesWithLabel

func DeleteResourcesWithLabel(dynamicClient *dynamic.DynamicClient, gvr schema.GroupVersionResource, namespace string, labels map[string]string, log *zap.Logger) error

func K8sRestConfig

func K8sRestConfig() (*rest.Config, error)

K8sRestConfig returns a rest config for the kubernetes cluster

func UninstallRelease

func UninstallRelease(releaseName string, namespace string, log *zap.Logger) error

Types

type ChartRelease

type ChartRelease struct {
	ChartName   string
	ReleaseName string
	RepoUrl     string
	Namespace   string
	Values      map[string]interface{}
}

func (*ChartRelease) InstallOrUpgradeRelease

func (cr *ChartRelease) InstallOrUpgradeRelease(kubeClient *kubernetes.Clientset, log *zap.Logger) error

Jump to

Keyboard shortcuts

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