manager

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

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

Go to latest
Published: Sep 29, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package manager provides access to kubernetes resources for providers.

DEPRECATION WARNING: Though this package is still in use, it should be considered deprecated as it is just wrapping a k8s client and not much else. Implementers should look at replacing their use of this with something else.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResourceManager

type ResourceManager struct {
	// contains filtered or unexported fields
}

ResourceManager acts as a passthrough to a cache (lister) for pods assigned to the current node. It is also a passthrough to a cache (lister) for Kubernetes secrets and config maps.

func NewResourceManager

func NewResourceManager(podLister corev1listers.PodLister, secretLister corev1listers.SecretLister, configMapLister corev1listers.ConfigMapLister, serviceLister corev1listers.ServiceLister) (*ResourceManager, error)

NewResourceManager returns a ResourceManager with the internal maps initialized.

func NewResourceManagerWithMultiLister

func NewResourceManagerWithMultiLister(client *kubernetes.Clientset, podLister corev1listers.PodLister, secretLister corev1listers.SecretLister, configMapLister corev1listers.ConfigMapLister, serviceLister corev1listers.ServiceLister, namespaceLister corev1listers.NamespaceLister) (*ResourceManager, error)

NewResourceManager returns a ResourceManager with the internal maps initialized.

func (*ResourceManager) DeletePod

func (rm *ResourceManager) DeletePod(ctx context.Context, namespace, name string) error

func (*ResourceManager) GetConfigMap

func (rm *ResourceManager) GetConfigMap(name, namespace string) (*v1.ConfigMap, error)

GetConfigMap retrieves the specified config map from the cache.

func (*ResourceManager) GetNamespace

func (rm *ResourceManager) GetNamespace(namespace string) (*v1.Namespace, error)

func (*ResourceManager) GetPod

func (rm *ResourceManager) GetPod(namespace, name string) (*v1.Pod, error)

func (*ResourceManager) GetPods

func (rm *ResourceManager) GetPods() []*v1.Pod

GetPods returns a list of all known pods assigned to this virtual node.

func (*ResourceManager) GetRecord

func (rm *ResourceManager) GetRecord(ctx context.Context, namespace string, component string) record.EventRecorder

func (*ResourceManager) GetSecret

func (rm *ResourceManager) GetSecret(name, namespace string) (*v1.Secret, error)

GetSecret retrieves the specified secret from Kubernetes.

func (*ResourceManager) ListServices

func (rm *ResourceManager) ListServices() ([]*v1.Service, error)

ListServices retrieves the list of services from Kubernetes.

Jump to

Keyboard shortcuts

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