controller

package
v0.0.0-...-ab8c438 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager) error

Add creates a new Partition ManagementGroup and adds it to the Manager. The Manager will set fields on the ManagementGroup and Start it when the Manager is Started.

func GetClusterHeadlessServiceName

func GetClusterHeadlessServiceName(cluster *v1beta2.Cluster) string

GetClusterHeadlessServiceName returns the headless service name for the given cluster

func GetClusterIDFromClusterAnnotations

func GetClusterIDFromClusterAnnotations(cluster *v1beta2.Cluster) (int32, error)

GetClusterIDFromClusterAnnotations returns the cluster ID from the given cluster annotations

func GetDatabaseFromClusterAnnotations

func GetDatabaseFromClusterAnnotations(cluster *v1beta2.Cluster) (string, error)

GetDatabaseFromClusterAnnotations returns the database name from the given cluster annotations

func GetProxyDeploymentName

func GetProxyDeploymentName(cluster *v1beta2.Cluster) string

GetProxyDeploymentName returns the StatefulSet name for the given partition

func NewClusterConfigMap

func NewClusterConfigMap(cluster *v1beta2.Cluster, storage *storage.RedisStorageClass, config interface{}) (*corev1.ConfigMap, error)

NewClusterConfigMap returns a new ConfigMap for initializing Atomix clusters

func NewClusterHeadlessService

func NewClusterHeadlessService(cluster *v1beta2.Cluster) *corev1.Service

NewClusterHeadlessService returns a new headless service for a cluster group

func NewClusterService

func NewClusterService(cluster *v1beta2.Cluster) *corev1.Service

NewClusterService returns a new service for a cluster

func NewStatefulSet

func NewStatefulSet(cluster *v1beta2.Cluster, storage *storage.RedisStorageClass) (*appsv1.StatefulSet, error)

NewStatefulSet returns a new StatefulSet for a cluster group

Types

type Container

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

Container container type defines an abstraction for containers

func (*Container) Args

func (c *Container) Args() []string

Args returns a container args

func (*Container) Build

func (c *Container) Build() Container

Build builds a container

func (*Container) Command

func (c *Container) Command() []string

Command returns a container command

func (*Container) Env

func (c *Container) Env() []corev1.EnvVar

Env returns container env variables

func (*Container) Image

func (c *Container) Image() string

Image returns the name of a container image

func (*Container) LivenessProbe

func (c *Container) LivenessProbe() *corev1.Probe

LivenessProbe returns livenessprobe info

func (*Container) Name

func (c *Container) Name() string

Name returns the name of a container

func (*Container) Ports

func (c *Container) Ports() []corev1.ContainerPort

Ports return a set of container ports

func (*Container) PullPolicy

func (c *Container) PullPolicy() corev1.PullPolicy

PullPolicy returns the pull policy

func (*Container) ReadinessProbe

func (c *Container) ReadinessProbe() *corev1.Probe

ReadinessProbe returns readinessProbe info

func (*Container) Resources

func (c *Container) Resources() corev1.ResourceRequirements

Resources returns container resources

func (*Container) SetArgs

func (c *Container) SetArgs(args ...string) ContainerBuilder

SetArgs sets a container arguments

func (*Container) SetCommand

func (c *Container) SetCommand(command ...string) ContainerBuilder

SetCommand sets a container command

func (*Container) SetEnv

func (c *Container) SetEnv(env []corev1.EnvVar) ContainerBuilder

SetEnv sets environment variables

func (*Container) SetImage

func (c *Container) SetImage(image string) ContainerBuilder

SetImage sets a container image

func (*Container) SetLivenessProbe

func (c *Container) SetLivenessProbe(probe *corev1.Probe) ContainerBuilder

SetLivenessProbe sets container livenessProbe

func (*Container) SetName

func (c *Container) SetName(name string) ContainerBuilder

SetName sets a container name

func (*Container) SetPorts

func (c *Container) SetPorts(ports []corev1.ContainerPort) ContainerBuilder

SetPorts sets a container ports

func (*Container) SetPullPolicy

func (c *Container) SetPullPolicy(pullPolicy corev1.PullPolicy) ContainerBuilder

SetPullPolicy sets pull policy for a container

func (*Container) SetReadinessProbe

func (c *Container) SetReadinessProbe(probe *corev1.Probe) ContainerBuilder

SetReadinessProbe sets container readinessProbe

func (*Container) SetResources

func (c *Container) SetResources(resources corev1.ResourceRequirements) ContainerBuilder

SetResources sets container resources

func (*Container) SetVolumeMounts

func (c *Container) SetVolumeMounts(volumeMounts []corev1.VolumeMount) ContainerBuilder

SetVolumeMounts sets mounted volumes

func (*Container) VolumeMounts

func (c *Container) VolumeMounts() []corev1.VolumeMount

VolumeMounts returns container mounted volumes

type ContainerBuilder

type ContainerBuilder interface {
	SetName(string) ContainerBuilder
	SetImage(string) ContainerBuilder
	SetArgs(...string) ContainerBuilder
	SetEnv(env []corev1.EnvVar) ContainerBuilder
	SetCommand(...string) ContainerBuilder
	SetPullPolicy(policy corev1.PullPolicy) ContainerBuilder
	SetReadinessProbe(probe *corev1.Probe) ContainerBuilder
	SetLivenessProbe(probe *corev1.Probe) ContainerBuilder
	SetVolumeMounts([]corev1.VolumeMount) ContainerBuilder
	SetResources(corev1.ResourceRequirements) ContainerBuilder
	SetPorts([]corev1.ContainerPort) ContainerBuilder
	Build() Container
}

ContainerBuilder container builder interface

func NewContainer

func NewContainer() ContainerBuilder

NewContainer creates a new container builder

type Reconciler

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

Reconciler reconciles a Cluster object

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(request reconcile.Request) (reconcile.Result, error)

Reconcile reads that state of the cluster for a Cluster object and makes changes based on the state read and what is in the Cluster.Spec

Jump to

Keyboard shortcuts

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