v1

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: Apache-2.0 Imports: 9 Imported by: 49

Documentation

Overview

Package v1 is the v1 version of the API. +groupName=databases.spotahome.com

Index

Constants

View Source
const (
	RFKind       = "RedisFailover"
	RFName       = "redisfailover"
	RFNamePlural = "redisfailovers"
	RFScope      = apiextensionsv1.NamespaceScoped
)

Team constants

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: redisfailover.GroupName, Version: version}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

func VersionKind

func VersionKind(kind string) schema.GroupVersionKind

VersionKind takes an unqualified kind and returns back a Group qualified GroupVersionKind

Types

type AuthSettings

type AuthSettings struct {
	SecretPath string `json:"secretPath,omitempty"`
}

AuthSettings contains settings about auth

func (*AuthSettings) DeepCopy

func (in *AuthSettings) DeepCopy() *AuthSettings

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthSettings.

func (*AuthSettings) DeepCopyInto

func (in *AuthSettings) DeepCopyInto(out *AuthSettings)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BootstrapSettings added in v1.1.0

type BootstrapSettings struct {
	Host           string `json:"host,omitempty"`
	Port           string `json:"port,omitempty"`
	AllowSentinels bool   `json:"allowSentinels,omitempty"`
}

BootstrapSettings contains settings about a potential bootstrap node

func (*BootstrapSettings) DeepCopy added in v1.1.0

func (in *BootstrapSettings) DeepCopy() *BootstrapSettings

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BootstrapSettings.

func (*BootstrapSettings) DeepCopyInto added in v1.1.0

func (in *BootstrapSettings) DeepCopyInto(out *BootstrapSettings)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EmbeddedObjectMetadata added in v1.1.0

type EmbeddedObjectMetadata struct {
	// Name must be unique within a namespace. Is required when creating resources, although
	// some resources may allow a client to request the generation of an appropriate name
	// automatically. Name is primarily intended for creation idempotence and configuration
	// definition.
	// Cannot be updated.
	// More info: http://kubernetes.io/docs/user-guide/identifiers#names
	// +optional
	Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`

	// Map of string keys and values that can be used to organize and categorize
	// (scope and select) objects. May match selectors of replication controllers
	// and services.
	// More info: http://kubernetes.io/docs/user-guide/labels
	// +optional
	Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"`

	// Annotations is an unstructured key value map stored with a resource that may be
	// set by external tools to store and retrieve arbitrary metadata. They are not
	// queryable and should be preserved when modifying objects.
	// More info: http://kubernetes.io/docs/user-guide/annotations
	// +optional
	Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,12,rep,name=annotations"`
}

EmbeddedObjectMetadata contains a subset of the fields included in k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta Only fields which are relevant to embedded resources are included.

func (*EmbeddedObjectMetadata) DeepCopy added in v1.1.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmbeddedObjectMetadata.

func (*EmbeddedObjectMetadata) DeepCopyInto added in v1.1.0

func (in *EmbeddedObjectMetadata) DeepCopyInto(out *EmbeddedObjectMetadata)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EmbeddedPersistentVolumeClaim added in v1.1.0

type EmbeddedPersistentVolumeClaim struct {
	metav1.TypeMeta `json:",inline"`

	// EmbeddedMetadata contains metadata relevant to an EmbeddedResource.
	EmbeddedObjectMetadata `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// Spec defines the desired characteristics of a volume requested by a pod author.
	// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
	// +optional
	Spec corev1.PersistentVolumeClaimSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`

	// Status represents the current information/status of a persistent volume claim.
	// Read-only.
	// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
	// +optional
	Status corev1.PersistentVolumeClaimStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}

EmbeddedPersistentVolumeClaim is an embedded version of k8s.io/api/core/v1.PersistentVolumeClaim. It contains TypeMeta and a reduced ObjectMeta.

func (*EmbeddedPersistentVolumeClaim) DeepCopy added in v1.1.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmbeddedPersistentVolumeClaim.

func (*EmbeddedPersistentVolumeClaim) DeepCopyInto added in v1.1.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Exporter added in v1.2.0

type Exporter struct {
	Enabled                  bool                         `json:"enabled,omitempty"`
	Image                    string                       `json:"image,omitempty"`
	ImagePullPolicy          corev1.PullPolicy            `json:"imagePullPolicy,omitempty"`
	ContainerSecurityContext *corev1.SecurityContext      `json:"containerSecurityContext,omitempty"`
	Args                     []string                     `json:"args,omitempty"`
	Env                      []corev1.EnvVar              `json:"env,omitempty"`
	Resources                *corev1.ResourceRequirements `json:"resources,omitempty"`
}

Exporter defines the specification for the redis/sentinel exporter

func (*Exporter) DeepCopy added in v1.2.0

func (in *Exporter) DeepCopy() *Exporter

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Exporter.

func (*Exporter) DeepCopyInto added in v1.2.0

func (in *Exporter) DeepCopyInto(out *Exporter)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RedisCommandRename

type RedisCommandRename struct {
	From string `json:"from,omitempty"`
	To   string `json:"to,omitempty"`
}

RedisCommandRename defines the specification of a "rename-command" configuration option

func (*RedisCommandRename) DeepCopy added in v1.1.0

func (in *RedisCommandRename) DeepCopy() *RedisCommandRename

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisCommandRename.

func (*RedisCommandRename) DeepCopyInto added in v1.1.0

func (in *RedisCommandRename) DeepCopyInto(out *RedisCommandRename)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RedisFailover

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

RedisFailover represents a Redis failover +kubebuilder:printcolumn:name="NAME",type="string",JSONPath=".metadata.name" +kubebuilder:printcolumn:name="REDIS",type="integer",JSONPath=".spec.redis.replicas" +kubebuilder:printcolumn:name="SENTINELS",type="integer",JSONPath=".spec.sentinel.replicas" +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:singular=redisfailover,path=redisfailovers,shortName=rf,scope=Namespaced

func (*RedisFailover) Bootstrapping added in v1.1.0

func (r *RedisFailover) Bootstrapping() bool

Bootstrapping returns true when a BootstrapNode is provided to the RedisFailover spec. Otherwise, it returns false.

func (*RedisFailover) DeepCopy

func (in *RedisFailover) DeepCopy() *RedisFailover

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisFailover.

func (*RedisFailover) DeepCopyInto

func (in *RedisFailover) DeepCopyInto(out *RedisFailover)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RedisFailover) DeepCopyObject

func (in *RedisFailover) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*RedisFailover) SentinelsAllowed added in v1.1.0

func (r *RedisFailover) SentinelsAllowed() bool

SentinelsAllowed returns true if not Bootstrapping orif BootstrapNode settings allow sentinels to exist

func (*RedisFailover) Validate

func (r *RedisFailover) Validate() error

Validate set the values by default if not defined and checks if the values given are valid

type RedisFailoverList

type RedisFailoverList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []RedisFailover `json:"items"`
}

RedisFailoverList represents a Redis failover list

func (*RedisFailoverList) DeepCopy

func (in *RedisFailoverList) DeepCopy() *RedisFailoverList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisFailoverList.

func (*RedisFailoverList) DeepCopyInto

func (in *RedisFailoverList) DeepCopyInto(out *RedisFailoverList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RedisFailoverList) DeepCopyObject

func (in *RedisFailoverList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RedisFailoverSpec

type RedisFailoverSpec struct {
	Redis          RedisSettings      `json:"redis,omitempty"`
	Sentinel       SentinelSettings   `json:"sentinel,omitempty"`
	Auth           AuthSettings       `json:"auth,omitempty"`
	LabelWhitelist []string           `json:"labelWhitelist,omitempty"`
	BootstrapNode  *BootstrapSettings `json:"bootstrapNode,omitempty"`
}

RedisFailoverSpec represents a Redis failover spec

func (*RedisFailoverSpec) DeepCopy

func (in *RedisFailoverSpec) DeepCopy() *RedisFailoverSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisFailoverSpec.

func (*RedisFailoverSpec) DeepCopyInto

func (in *RedisFailoverSpec) DeepCopyInto(out *RedisFailoverSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RedisSettings

type RedisSettings struct {
	Image                         string                            `json:"image,omitempty"`
	ImagePullPolicy               corev1.PullPolicy                 `json:"imagePullPolicy,omitempty"`
	Replicas                      int32                             `json:"replicas,omitempty"`
	Port                          int32                             `json:"port,omitempty"`
	Resources                     corev1.ResourceRequirements       `json:"resources,omitempty"`
	CustomConfig                  []string                          `json:"customConfig,omitempty"`
	CustomCommandRenames          []RedisCommandRename              `json:"customCommandRenames,omitempty"`
	Command                       []string                          `json:"command,omitempty"`
	ShutdownConfigMap             string                            `json:"shutdownConfigMap,omitempty"`
	StartupConfigMap              string                            `json:"startupConfigMap,omitempty"`
	Storage                       RedisStorage                      `json:"storage,omitempty"`
	InitContainers                []corev1.Container                `json:"initContainers,omitempty"`
	Exporter                      Exporter                          `json:"exporter,omitempty"`
	ExtraContainers               []corev1.Container                `json:"extraContainers,omitempty"`
	Affinity                      *corev1.Affinity                  `json:"affinity,omitempty"`
	SecurityContext               *corev1.PodSecurityContext        `json:"securityContext,omitempty"`
	ContainerSecurityContext      *corev1.SecurityContext           `json:"containerSecurityContext,omitempty"`
	ImagePullSecrets              []corev1.LocalObjectReference     `json:"imagePullSecrets,omitempty"`
	Tolerations                   []corev1.Toleration               `json:"tolerations,omitempty"`
	TopologySpreadConstraints     []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
	NodeSelector                  map[string]string                 `json:"nodeSelector,omitempty"`
	PodAnnotations                map[string]string                 `json:"podAnnotations,omitempty"`
	ServiceAnnotations            map[string]string                 `json:"serviceAnnotations,omitempty"`
	HostNetwork                   bool                              `json:"hostNetwork,omitempty"`
	DNSPolicy                     corev1.DNSPolicy                  `json:"dnsPolicy,omitempty"`
	PriorityClassName             string                            `json:"priorityClassName,omitempty"`
	ServiceAccountName            string                            `json:"serviceAccountName,omitempty"`
	TerminationGracePeriodSeconds int64                             `json:"terminationGracePeriod,omitempty"`
	ExtraVolumes                  []corev1.Volume                   `json:"extraVolumes,omitempty"`
	ExtraVolumeMounts             []corev1.VolumeMount              `json:"extraVolumeMounts,omitempty"`
}

RedisSettings defines the specification of the redis cluster

func (*RedisSettings) DeepCopy

func (in *RedisSettings) DeepCopy() *RedisSettings

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisSettings.

func (*RedisSettings) DeepCopyInto

func (in *RedisSettings) DeepCopyInto(out *RedisSettings)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RedisStorage

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

RedisStorage defines the structure used to store the Redis Data

func (*RedisStorage) DeepCopy

func (in *RedisStorage) DeepCopy() *RedisStorage

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisStorage.

func (*RedisStorage) DeepCopyInto

func (in *RedisStorage) DeepCopyInto(out *RedisStorage)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SentinelConfigCopy added in v1.2.0

type SentinelConfigCopy struct {
	ContainerSecurityContext *corev1.SecurityContext `json:"containerSecurityContext,omitempty"`
}

SentinelConfigCopy defines the specification for the sentinel exporter

func (*SentinelConfigCopy) DeepCopy added in v1.2.0

func (in *SentinelConfigCopy) DeepCopy() *SentinelConfigCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SentinelConfigCopy.

func (*SentinelConfigCopy) DeepCopyInto added in v1.2.0

func (in *SentinelConfigCopy) DeepCopyInto(out *SentinelConfigCopy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SentinelSettings

type SentinelSettings struct {
	Image                     string                            `json:"image,omitempty"`
	ImagePullPolicy           corev1.PullPolicy                 `json:"imagePullPolicy,omitempty"`
	Replicas                  int32                             `json:"replicas,omitempty"`
	Resources                 corev1.ResourceRequirements       `json:"resources,omitempty"`
	CustomConfig              []string                          `json:"customConfig,omitempty"`
	Command                   []string                          `json:"command,omitempty"`
	StartupConfigMap          string                            `json:"startupConfigMap,omitempty"`
	Affinity                  *corev1.Affinity                  `json:"affinity,omitempty"`
	SecurityContext           *corev1.PodSecurityContext        `json:"securityContext,omitempty"`
	ContainerSecurityContext  *corev1.SecurityContext           `json:"containerSecurityContext,omitempty"`
	ImagePullSecrets          []corev1.LocalObjectReference     `json:"imagePullSecrets,omitempty"`
	Tolerations               []corev1.Toleration               `json:"tolerations,omitempty"`
	TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
	NodeSelector              map[string]string                 `json:"nodeSelector,omitempty"`
	PodAnnotations            map[string]string                 `json:"podAnnotations,omitempty"`
	ServiceAnnotations        map[string]string                 `json:"serviceAnnotations,omitempty"`
	InitContainers            []corev1.Container                `json:"initContainers,omitempty"`
	Exporter                  Exporter                          `json:"exporter,omitempty"`
	ExtraContainers           []corev1.Container                `json:"extraContainers,omitempty"`
	ConfigCopy                SentinelConfigCopy                `json:"configCopy,omitempty"`
	HostNetwork               bool                              `json:"hostNetwork,omitempty"`
	DNSPolicy                 corev1.DNSPolicy                  `json:"dnsPolicy,omitempty"`
	PriorityClassName         string                            `json:"priorityClassName,omitempty"`
	ServiceAccountName        string                            `json:"serviceAccountName,omitempty"`
	ExtraVolumes              []corev1.Volume                   `json:"extraVolumes,omitempty"`
	ExtraVolumeMounts         []corev1.VolumeMount              `json:"extraVolumeMounts,omitempty"`
}

SentinelSettings defines the specification of the sentinel cluster

func (*SentinelSettings) DeepCopy

func (in *SentinelSettings) DeepCopy() *SentinelSettings

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SentinelSettings.

func (*SentinelSettings) DeepCopyInto

func (in *SentinelSettings) DeepCopyInto(out *SentinelSettings)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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