kubernetes

package
v0.0.68 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IgnoredPathsAnnotationName         = "osiris.dm.gg/ignoredPaths"
	MetricsCollectorAnnotationName     = "osiris.dm.gg/metricsCollector"
	MetricsCheckIntervalAnnotationName = "osiris.dm.gg/metricsCheckInterval"
)

Variables

This section is empty.

Functions

func Client

func Client() (*kubernetes.Clientset, error)

Client returns a new Kubernetes client

func DeploymentsIndexInformer

func DeploymentsIndexInformer(
	client kubernetes.Interface,
	namespace string,
	fieldSelector fields.Selector,
	labelSelector labels.Selector,
	resyncPeriod time.Duration,
) cache.SharedIndexInformer

func EndpointsIndexInformer

func EndpointsIndexInformer(
	client kubernetes.Interface,
	namespace string,
	fieldSelector fields.Selector,
	labelSelector labels.Selector,
	resyncPeriod time.Duration,
) cache.SharedIndexInformer

func GetMinReplicas

func GetMinReplicas(annotations map[string]string, defaultVal int32) int32

GetMinReplicas gets the minimum number of replicas required for scale up from the annotations. If it fails to do so, it returns the default value instead.

func NodesIndexInformer

func NodesIndexInformer(
	client kubernetes.Interface,
	namespace string,
	fieldSelector fields.Selector,
	labelSelector labels.Selector,
	resyncPeriod time.Duration,
) cache.SharedIndexInformer

func PodIsEligibleForProxyInjection

func PodIsEligibleForProxyInjection(annotations map[string]string) bool

PodIsEligibleForProxyInjection checks the annotations to see if the pod is eligible for proxy injection or not.

func PodsIndexInformer

func PodsIndexInformer(
	client kubernetes.Interface,
	namespace string,
	fieldSelector fields.Selector,
	labelSelector labels.Selector,
	resyncPeriod time.Duration,
) cache.SharedIndexInformer

func ServiceIsEligibleForEndpointsManagement

func ServiceIsEligibleForEndpointsManagement(annotations map[string]string) bool

ServiceIsEligibleForEndpointsManagement checks the annotations to see if the service is eligible for management of its endpoints by osiris or not.

func ServicesIndexInformer

func ServicesIndexInformer(
	client kubernetes.Interface,
	namespace string,
	fieldSelector fields.Selector,
	labelSelector labels.Selector,
	resyncPeriod time.Duration,
) cache.SharedIndexInformer

func StatefulSetsIndexInformer

func StatefulSetsIndexInformer(
	client kubernetes.Interface,
	namespace string,
	fieldSelector fields.Selector,
	labelSelector labels.Selector,
	resyncPeriod time.Duration,
) cache.SharedIndexInformer

func WorkloadIsEligibleForAutoScaling

func WorkloadIsEligibleForAutoScaling(annotations map[string]string) bool

WorkloadIsEligibleForAutoScaling checks the annotations to see if the workload (deployment or statefulset) is eligible for auto-scaling with osiris or not.

Types

type PatchOperation

type PatchOperation struct {
	Op    string      `json:"op"`
	Path  string      `json:"path"`
	Value interface{} `json:"value,omitempty"`
}

PatchOperation represents a discreet change to be applied to a Kubernetes resource

Jump to

Keyboard shortcuts

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