kubernetes

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// IgnoredPathsAnnotationName specifies what annotation is used for the ignoredPaths.
	IgnoredPathsAnnotationName = "osiris.deislabs.io/ignoredPaths"
	// MetricsCheckIntervalAnnotationName specifies what annotation is used for the Metrics check interval.
	MetricsCheckIntervalAnnotationName = "osiris.deislabs.io/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,
) cache.SharedIndexInformer

DeploymentsIndexInformer informs what deployments are their within the Kubernetes cluster.

func EndpointsIndexInformer

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

EndpointsIndexInformer informs what endpoints are their within the Kubernetes cluster.

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,
) cache.SharedIndexInformer

NodesIndexInformer informs what nodes are their within the Kubernetes cluster.

func PodsIndexInformer

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

PodsIndexInformer informs what pods are their within the Kubernetes cluster.

func ResourceIsOsirisEnabled

func ResourceIsOsirisEnabled(annotations map[string]string) bool

ResourceIsOsirisEnabled checks the annotations to see if the kube resource is enabled for osiris or not.

func ServicesIndexInformer

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

ServicesIndexInformer informs what services are their within the Kubernetes cluster.

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