Documentation ¶
Index ¶
- type AuthSettings
- type RedisExporter
- type RedisFailover
- type RedisFailoverList
- type RedisFailoverSpec
- type RedisOperator
- func (ro *RedisOperator) Convert(sg *apistructs.ServiceGroup) interface{}
- func (ro *RedisOperator) Create(k8syml interface{}) error
- func (ro *RedisOperator) Inspect(sg *apistructs.ServiceGroup) (*apistructs.ServiceGroup, error)
- func (ro *RedisOperator) IsSupported() bool
- func (ro *RedisOperator) Remove(sg *apistructs.ServiceGroup) error
- func (ro *RedisOperator) Update(k8syml interface{}) error
- func (ro *RedisOperator) Validate(sg *apistructs.ServiceGroup) error
- type RedisSettings
- type RedisStorage
- type SentinelExporter
- type SentinelSettings
- type UnifiedRedisOperator
- func (ro *UnifiedRedisOperator) Convert(sg *apistructs.ServiceGroup) interface{}
- func (ro *UnifiedRedisOperator) Create(k8syml interface{}) error
- func (ro *UnifiedRedisOperator) Inspect(sg *apistructs.ServiceGroup) (*apistructs.ServiceGroup, error)
- func (ro *UnifiedRedisOperator) IsSupported() bool
- func (ro *UnifiedRedisOperator) Remove(sg *apistructs.ServiceGroup) error
- func (ro *UnifiedRedisOperator) Update(k8syml interface{}) error
- func (ro *UnifiedRedisOperator) Validate(sg *apistructs.ServiceGroup) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthSettings ¶
type AuthSettings struct {
SecretPath string `json:"secretPath,omitempty"`
}
AuthSettings contains settings about auth
type RedisExporter ¶
type RedisExporter struct { Enabled bool `json:"enabled,omitempty"` Image string `json:"image,omitempty"` ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"` }
RedisExporter defines the specification for the redis exporter
type RedisFailover ¶
type RedisFailover struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec RedisFailoverSpec `json:"spec"` }
RedisFailover represents a Redis failover
type RedisFailoverList ¶
type RedisFailoverList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []RedisFailover `json:"items"` }
RedisFailoverList represents a Redis failover list
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"` }
RedisFailoverSpec represents a Redis failover spec
type RedisOperator ¶
type RedisOperator struct {
// contains filtered or unexported fields
}
func NewRedisOperator ¶
func NewRedisOperator(k8sutil addon.K8SUtil, deploy addon.DeploymentUtil, sts addon.StatefulsetUtil, service addon.ServiceUtil, ns addon.NamespaceUtil, overcommit addon.OvercommitUtil, secret addon.SecretUtil, client *httpclient.HTTPClient) *RedisOperator
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 (ro *RedisOperator) Inspect(sg *apistructs.ServiceGroup) (*apistructs.ServiceGroup, error)
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 { 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"` ShutdownConfigMap string `json:"shutdownConfigMap,omitempty"` Storage RedisStorage `json:"storage,omitempty"` Exporter RedisExporter `json:"exporter,omitempty"` Affinity *corev1.Affinity `json:"affinity,omitempty"` SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"` ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"` Tolerations []corev1.Toleration `json:"tolerations,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"` Envs map[string]string `json:"envs,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 SentinelExporter ¶
type SentinelExporter struct { Enabled bool `json:"enabled,omitempty"` Image string `json:"image,omitempty"` ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"` }
SentinelExporter defines the specification for the sentinel exporter
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"` Affinity *corev1.Affinity `json:"affinity,omitempty"` SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"` ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"` Tolerations []corev1.Toleration `json:"tolerations,omitempty"` NodeSelector map[string]string `json:"nodeSelector,omitempty"` PodAnnotations map[string]string `json:"podAnnotations,omitempty"` ServiceAnnotations map[string]string `json:"serviceAnnotations,omitempty"` Exporter SentinelExporter `json:"exporter,omitempty"` HostNetwork bool `json:"hostNetwork,omitempty"` DNSPolicy corev1.DNSPolicy `json:"dnsPolicy,omitempty"` Envs map[string]string `json:"envs,omitempty"` }
SentinelSettings defines the specification of the sentinel cluster
type UnifiedRedisOperator ¶
type UnifiedRedisOperator struct {
// contains filtered or unexported fields
}
func New ¶
func New(k8sutil addon.K8SUtil, deploy addon.DeploymentUtil, sts addon.StatefulsetUtil, service addon.ServiceUtil, ns addon.NamespaceUtil, overcommit addon.OvercommitUtil, secret addon.SecretUtil, client *httpclient.HTTPClient) *UnifiedRedisOperator
func (*UnifiedRedisOperator) Convert ¶
func (ro *UnifiedRedisOperator) Convert(sg *apistructs.ServiceGroup) interface{}
func (*UnifiedRedisOperator) Create ¶
func (ro *UnifiedRedisOperator) Create(k8syml interface{}) error
func (*UnifiedRedisOperator) Inspect ¶
func (ro *UnifiedRedisOperator) Inspect(sg *apistructs.ServiceGroup) (*apistructs.ServiceGroup, error)
func (*UnifiedRedisOperator) IsSupported ¶
func (ro *UnifiedRedisOperator) IsSupported() bool
func (*UnifiedRedisOperator) Remove ¶
func (ro *UnifiedRedisOperator) Remove(sg *apistructs.ServiceGroup) error
func (*UnifiedRedisOperator) Update ¶
func (ro *UnifiedRedisOperator) Update(k8syml interface{}) error
func (*UnifiedRedisOperator) Validate ¶
func (ro *UnifiedRedisOperator) Validate(sg *apistructs.ServiceGroup) error
Click to show internal directories.
Click to hide internal directories.