pod

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: UPL-1.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvictPod

func EvictPod(ctx context.Context, clientSet kubernetes.Interface, pod *corev1.Pod) error

Evict a pod for a given namespace

func GetPodInjectionLabelValue

func GetPodInjectionLabelValue(podLabels *labels.Set) string

func GetProxyVersion

func GetProxyVersion(pod *corev1.Pod) (value string)

Get proxy version for a given pod

func GetVDBForPod

returns a matching VDB for a pod from vdbList

func IsInjectionLabelEnabled

func IsInjectionLabelEnabled(namespaceLabel string, podLabel string) bool

Returns a boolean based on pod eligibility for proxy injection Input - labels - pod labels, namespaceProxyInjectionLabelValue - proxy injection label at namespace NamespaceLabel PodLabel PodEligibility enabled enabled/"" true disabled enabled true enabled disabled false disabled disabled/"" false "" Not applicable false

func IsPodBelongsToVDB

func IsPodBelongsToVDB(ctx context.Context, cl client.Reader, pod *corev1.Pod, virtualDeploymentBinding *servicemeshapi.VirtualDeploymentBinding) (valid bool)

checks if a pod belongs to a vdb

func IsPodContainingServiceMeshProxy

func IsPodContainingServiceMeshProxy(pod *corev1.Pod) (valid bool)

Returns true if pod contains service mesh proxy Returns false if pod does not contain service mesh proxy

func ListPods

func ListPods(ctx context.Context, cl client.Client, namespace string) (*corev1.PodList, error)

Returns list of pods for a given namespace

func ListPodsWithLabels

func ListPodsWithLabels(ctx context.Context, cl client.Client, namespace string, labels *labels.Set) (*corev1.PodList, error)

Returns list of pods for given selectors and namespace

func MatchLabels

func MatchLabels(podLabels labels.Set, labels labels.Set) (valid bool)

checks if all the labels are present in podLabels

func SetOutdatedProxyAnnotation

func SetOutdatedProxyAnnotation(ctx context.Context, cl client.Client, pod *corev1.Pod) bool

Set outdated proxy annotation for a given pod if pod proxy version is not upgraded to the latest proxy version

Types

This section is empty.

Jump to

Keyboard shortcuts

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