legacy

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUAndMem

type CPUAndMem struct {
	CPU    string `json:"cpu"`
	Memory string `json:"memory"`
}

CPUAndMem defines how many cpu and ram the container will request/limit

type Condition

type Condition struct {
	Type           ConditionType `json:"type"`
	Reason         string        `json:"reason"`
	TransitionTime string        `json:"transitionTime"`
}

Condition saves the state information of the redisfailover

type ConditionType

type ConditionType string

ConditionType defines the condition that the RF can have

type Phase

type Phase string

Phase of the RF status

type RedisFailover

type RedisFailover struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              RedisFailoverSpec   `json:"spec"`
	Status            RedisFailoverStatus `json:"status,omitempty"`
}

type RedisFailoverResources

type RedisFailoverResources struct {
	Requests CPUAndMem `json:"requests,omitempty"`
	Limits   CPUAndMem `json:"limits,omitempty"`
}

RedisFailoverResources sets the limits and requests for a container

type RedisFailoverSpec

type RedisFailoverSpec struct {
	// Redis defines its failover settings
	Redis RedisSettings `json:"redis,omitempty"`

	// Sentinel defines its failover settings
	Sentinel SentinelSettings `json:"sentinel,omitempty"`

	// HardAntiAffinity defines if the PodAntiAffinity on the deployments and
	// statefulsets has to be hard (it's soft by default)
	HardAntiAffinity bool `json:"hardAntiAffinity,omitempty"`

	// NodeAffinity defines the rules for scheduling the Redis and Sentinel
	// nodes
	NodeAffinity *corev1.NodeAffinity `json:"nodeAffinity,omitempty"`
	// SecurityContext defines which user and group the Sentinel and Redis containers run as
	SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"`

	//Tolerations provides a way to schedule Pods on Tainted Nodes
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
}

RedisFailoverSpec represents a Redis failover spec

type RedisFailoverStatus

type RedisFailoverStatus struct {
	Phase      Phase       `json:"phase"`
	Conditions []Condition `json:"conditions"`
	Master     string      `json:"master"`
}

RedisFailoverStatus has the status of the cluster

type RedisOperator

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

func (*RedisOperator) Convert

func (ro *RedisOperator) Convert(sg *apistructs.ServiceGroup) interface{}

func (*RedisOperator) Create

func (ro *RedisOperator) Create(k8syml interface{}) error

func (*RedisOperator) Inspect

func (*RedisOperator) IsSupported

func (ro *RedisOperator) IsSupported() bool

func (*RedisOperator) Remove

func (ro *RedisOperator) Remove(sg *apistructs.ServiceGroup) error

func (*RedisOperator) Update

func (ro *RedisOperator) Update(k8syml interface{}) error

func (*RedisOperator) Validate

func (ro *RedisOperator) Validate(sg *apistructs.ServiceGroup) error

Validate

type RedisSettings

type RedisSettings struct {
	Envs                  map[string]string      `json:"envs,omitempty"`
	Replicas              int32                  `json:"replicas,omitempty"`
	Resources             RedisFailoverResources `json:"resources,omitempty"`
	Exporter              bool                   `json:"exporter,omitempty"`
	ExporterImage         string                 `json:"exporterImage,omitempty"`
	ExporterVersion       string                 `json:"exporterVersion,omitempty"`
	DisableExporterProbes bool                   `json:"disableExporterProbes,omitempty"`
	Image                 string                 `json:"image,omitempty"`
	Version               string                 `json:"version,omitempty"`
	CustomConfig          []string               `json:"customConfig,omitempty"`
	Command               []string               `json:"command,omitempty"`
	ShutdownConfigMap     string                 `json:"shutdownConfigMap,omitempty"`
	Storage               RedisStorage           `json:"storage,omitempty"`
}

RedisSettings defines the specification of the redis cluster

type RedisStorage

type RedisStorage struct {
	KeepAfterDeletion     bool                          `json:"keepAfterDeletion,omitempty"`
	EmptyDir              *corev1.EmptyDirVolumeSource  `json:"emptyDir,omitempty"`
	PersistentVolumeClaim *corev1.PersistentVolumeClaim `json:"persistentVolumeClaim,omitempty"`
}

RedisStorage defines the structure used to store the Redis Data

type SentinelSettings

type SentinelSettings struct {
	Envs         map[string]string      `json:"envs,omitempty"`
	Replicas     int32                  `json:"replicas,omitempty"`
	Resources    RedisFailoverResources `json:"resources,omitempty"`
	CustomConfig []string               `json:"customConfig,omitempty"`
	Command      []string               `json:"command,omitempty"`
}

SentinelSettings defines the specification of the sentinel cluster

Jump to

Keyboard shortcuts

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