pod

package
v0.0.0-...-f651441 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildOwnerReference

func BuildOwnerReference(cluster *rapi.RedisCluster) metav1.OwnerReference

BuildOwnerReference used to build the OwnerReference from a RedisCluster

func CreateRedisClusterLabelSelector

func CreateRedisClusterLabelSelector(rediscluster *rapi.RedisCluster) (labels.Selector, error)

CreateRedisClusterLabelSelector creates label selector to select the jobs related to a rediscluster, stepName

func GenerateMD5Spec

func GenerateMD5Spec(spec *kapiv1.PodSpec) (string, error)

GenerateMD5Spec used to generate the PodSpec MD5 hash

func GetAnnotationsSet

func GetAnnotationsSet(rediscluster *rapi.RedisCluster) (labels.Set, error)

GetAnnotationsSet return a labels.Set of annotation from the RedisCluster

func GetLabelsSet

func GetLabelsSet(rediscluster *rapi.RedisCluster) (labels.Set, error)

GetLabelsSet return labels associated to the redis-node pods

Types

type RedisClusterControl

type RedisClusterControl struct {
	PodLister  corev1listers.PodLister
	KubeClient clientset.Interface
	Recorder   record.EventRecorder
}

RedisClusterControl contains requieres accessor to managing the RedisCluster pods

func NewRedisClusterControl

func NewRedisClusterControl(lister corev1listers.PodLister, client clientset.Interface, rec record.EventRecorder) *RedisClusterControl

NewRedisClusterControl builds and returns new NewRedisClusterControl instance

func (*RedisClusterControl) CreatePod

func (p *RedisClusterControl) CreatePod(redisCluster *rapi.RedisCluster) (*kapiv1.Pod, error)

CreatePod used to create a Pod from the RedisCluster pod template

func (*RedisClusterControl) DeletePod

func (p *RedisClusterControl) DeletePod(redisCluster *rapi.RedisCluster, podName string) error

DeletePod used to delete a pod from its name

func (*RedisClusterControl) DeletePodNow

func (p *RedisClusterControl) DeletePodNow(redisCluster *rapi.RedisCluster, podName string) error

DeletePodNow used to delete now (force) a pod from its name

func (*RedisClusterControl) GetRedisClusterPods

func (p *RedisClusterControl) GetRedisClusterPods(redisCluster *rapi.RedisCluster) ([]*kapiv1.Pod, error)

GetRedisClusterPods return list of Pod attached to a RedisCluster

type RedisClusterControlInteface

type RedisClusterControlInteface interface {
	// GetRedisClusterPods return list of Pod attached to a RedisCluster
	GetRedisClusterPods(redisCluster *rapi.RedisCluster) ([]*kapiv1.Pod, error)
	// CreatePod used to create a Pod from the RedisCluster pod template
	CreatePod(redisCluster *rapi.RedisCluster) (*kapiv1.Pod, error)
	// DeletePod used to delete a pod from its name
	DeletePod(redisCluster *rapi.RedisCluster, podName string) error
	// DeletePodNow used to delete now (force) a pod from its name
	DeletePodNow(redisCluster *rapi.RedisCluster, podName string) error
}

RedisClusterControlInteface interface for the RedisClusterPodControl

Jump to

Keyboard shortcuts

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