controller

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Set resyncPeriod to 0 to disable resyncing.
	ResyncPeriod time.Duration = 0
	// How long to wait before retrying the processing of an Service change.
	MinRetryDelay = 5 * time.Second
	MaxRetryDelay = 300 * time.Second
	// Default number of workers processing an Service change.
	DefaultWorkers = 4
	// Time format for parsing input time
	InputTimeFormat  = "2006-01-02 15:04:05"
	K8sQuantitiesReg = "^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$"
	// Spark related parameters for Policy Recommendation and Throughput Anomaly Detection
	// spark jobs
	SparkImage           = "projects.registry.vmware.com/antrea/theia-spark-jobs:latest"
	SparkImagePullPolicy = "IfNotPresent"
	SparkServiceAccount  = "theia-spark"
	SparkVersion         = "3.1.1"
	SparkPort            = 4040
)

Variables

View Source
var (
	ListSparkApplication = ListSparkApplicationWithLabel
)

Functions

func CheckPodByLabel

func CheckPodByLabel(client kubernetes.Interface, namespace string, label string) error

func ConstStrToPointer

func ConstStrToPointer(constStr string) *string

func CreateSparkApplication

func CreateSparkApplication(client kubernetes.Interface, namespace string, sparkApplication *sparkv1.SparkApplication) error

func DeleteSparkApplication

func DeleteSparkApplication(client kubernetes.Interface, name string, namespace string)

func GetResponseFromSparkMonitoringSvc

func GetResponseFromSparkMonitoringSvc(url string) ([]byte, error)

func GetSparkAppProgress

func GetSparkAppProgress(baseUrl string) (completedStages int, totalStages int, err error)

func GetSparkApplication

func GetSparkApplication(client kubernetes.Interface, name string, namespace string) (sparkApp sparkv1.SparkApplication, err error)

func GetSparkJobIds added in v0.6.0

func GetSparkJobIds(connect *sql.DB, tableName string) ([]string, error)

func GetSparkMonitoringSvcDNS

func GetSparkMonitoringSvcDNS(id string, namespace string, sparkPort int) string

func HandleStaleDbEntries added in v0.6.0

func HandleStaleDbEntries(clickhouseConnect *sql.DB, client kubernetes.Interface, job, tableName string, ifResourceExists func(string, string) error, idPrefix string) error

func HandleStaleSparkApp added in v0.6.0

func HandleStaleSparkApp(client kubernetes.Interface, sparkAppLabel string, ifResourceExists func(string, string) error) error

func ListSparkApplicationWithLabel

func ListSparkApplicationWithLabel(client kubernetes.Interface, label string) (*sparkv1.SparkApplicationList, error)

func RunClickHouseQuery added in v0.6.0

func RunClickHouseQuery(connect *sql.DB, query string, id string) (err error)

func ValidateCluster

func ValidateCluster(client kubernetes.Interface, namespace string) error

Types

type GcKey added in v0.6.0

type GcKey struct {
	RemoveStaleDbEntries bool
	RemoveStaleSparkApp  bool
	AddResync            bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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