Documentation
¶
Overview ¶
Package v1 is the v1 version of the API. +groupName=example.com
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type Cluster
- type ClusterList
- type ClusterMode
- type ClusterSpec
- type ConfigMap
- type Placement
- type PlacementSpec
- type PodPolicy
- type Redis
- type RedisList
- type RedisTemplate
- type ResourceSpec
- type SentinelSpec
- type SentinelStatus
- type SentinelTemplate
- type ServerCondition
- type ServerConditionType
- type ServerPhase
- type ServerSpec
- type ServerStatus
- type SlaveSpec
- type SlaveStatus
Constants ¶
const ( CustomResourceGroup = "example.com" Version = "v1alpha1" CRDResourceKind = "Redis" RedisGroupName = "example.com" )
Variables ¶
var ( SchemeBuilder runtime.SchemeBuilder AddToScheme = localSchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: samplecontroller.GroupName, Version: "v1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type Cluster ¶
type Cluster struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec ClusterSpec `json:"spec"`
}
func (*Cluster) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.
func (*Cluster) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Cluster) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterList ¶
type ClusterList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []Cluster `json:"items"`
}
func (*ClusterList) DeepCopy ¶
func (in *ClusterList) DeepCopy() *ClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList.
func (*ClusterList) DeepCopyInto ¶
func (in *ClusterList) DeepCopyInto(out *ClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterList) DeepCopyObject ¶
func (in *ClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterMode ¶
type ClusterMode string
const ( MasterSlaveModel ClusterMode = "ms" RedisSentinelHA ClusterMode = "rs" )
type ClusterSpec ¶
type ClusterSpec struct {
RedisTemplate *RedisTemplate `json:"redisTemplate"`
SentinelTemplate *SentinelTemplate `json:"sentinelTemplate"`
Mode ClusterMode `json:"clusterMode,omitempty"`
Image string `json:"image,omitempty"`
// The path on the host where config and data can be persisted.
DataDirHostPath string `json:"dataDirHostPath,omitempty"`
// The placement-related configuration to pass to kubernetes (affinity, node selector, tolerations).
Placement PlacementSpec `json:"placement,omitempty"`
// HostNetwork to enable host network
HostNetwork bool `json:"hostNetwork,omitempty"`
// Resources set resource requests and limits
Resources ResourceSpec `json:"resources,omitempty"`
}
func (*ClusterSpec) DeepCopy ¶
func (in *ClusterSpec) DeepCopy() *ClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec.
func (*ClusterSpec) DeepCopyInto ¶
func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Placement ¶
type Placement struct {
metav1.TypeMeta `json:",inline"`
NodeAffinity *v1.NodeAffinity `json:"nodeAffinity,omitempty"`
PodAffinity *v1.PodAffinity `json:"podAffinity,omitempty"`
PodAntiAffinity *v1.PodAntiAffinity `json:"podAntiAffinity,omitempty"`
Tolerations []v1.Toleration `json:"tolerations,omitemtpy"`
}
Placement encapsulates the various kubernetes options that control where pods are scheduled and executed.
func (*Placement) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Placement.
func (*Placement) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Placement) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PlacementSpec ¶
type PlacementSpec struct {
metav1.TypeMeta `json:",inline"`
All Placement `json:"all,omitempty"`
API Placement `json:"api,omitempty"`
Redis Placement `json:"redis,omitempty"`
Sentinel Placement `json:"sentinel,omitempty"`
}
func (*PlacementSpec) DeepCopy ¶
func (in *PlacementSpec) DeepCopy() *PlacementSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementSpec.
func (*PlacementSpec) DeepCopyInto ¶
func (in *PlacementSpec) DeepCopyInto(out *PlacementSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PlacementSpec) DeepCopyObject ¶
func (in *PlacementSpec) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PodPolicy ¶
type PodPolicy struct {
Resources v1.ResourceRequirements `json:"resources,omitempty"`
}
func (*PodPolicy) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodPolicy.
func (*PodPolicy) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Redis ¶
type Redis struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ServerSpec `json:"spec"`
Status ServerStatus `json:"status"`
}
func (*Redis) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Redis.
func (*Redis) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Redis) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RedisList ¶
type RedisList struct {
metav1.TypeMeta `json:",inline"`
// Standard list metadata
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
metav1.ListMeta `json:"metadata,omitempty"`
Items []Redis `json:"items"`
}
func (*RedisList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisList.
func (*RedisList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RedisList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RedisTemplate ¶
type RedisTemplate struct {
ReplicationSlaves *int32 `json:"replicationSlaves,omitempty"`
HashSlots *int32 `json:"hashSlots,omitempty"`
StatefulSetName string `json:"statefulSetName,omitempty"`
ServiceName string `json:"serviceName,omitempty"`
}
func (*RedisTemplate) DeepCopy ¶
func (in *RedisTemplate) DeepCopy() *RedisTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisTemplate.
func (*RedisTemplate) DeepCopyInto ¶
func (in *RedisTemplate) DeepCopyInto(out *RedisTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceSpec ¶
type ResourceSpec struct {
API v1.ResourceRequirements `json:"api,omitempty"`
Redis v1.ResourceRequirements `json:"redis,omitempty"`
Sentinel v1.ResourceRequirements `json:"sentinel,omitempty"`
}
func (*ResourceSpec) DeepCopy ¶
func (in *ResourceSpec) DeepCopy() *ResourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSpec.
func (*ResourceSpec) DeepCopyInto ¶
func (in *ResourceSpec) DeepCopyInto(out *ResourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SentinelSpec ¶
type SentinelSpec struct {
Replicas int32 `json:"replicas"`
Quorum int32 `json:"quorum"`
ConfigMap ConfigMap `json:"configMap"`
}
func (*SentinelSpec) DeepCopy ¶
func (in *SentinelSpec) DeepCopy() *SentinelSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SentinelSpec.
func (*SentinelSpec) DeepCopyInto ¶
func (in *SentinelSpec) DeepCopyInto(out *SentinelSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SentinelStatus ¶
type SentinelStatus struct {
Ready []string `json:"ready,omitempty"`
Unready []string `json:"unready,omitempty"`
}
func (*SentinelStatus) DeepCopy ¶
func (in *SentinelStatus) DeepCopy() *SentinelStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SentinelStatus.
func (*SentinelStatus) DeepCopyInto ¶
func (in *SentinelStatus) DeepCopyInto(out *SentinelStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SentinelTemplate ¶
type SentinelTemplate struct {
Quorum *int32 `json:"quorum,omitempty`
MasterGroupName string `json:"masterGroupName,omitempty"`
DeploymentName string `json:"deploymentName,omitempty"`
ServiceName string `json:"serviceName,omitempty"`
}
func (*SentinelTemplate) DeepCopy ¶
func (in *SentinelTemplate) DeepCopy() *SentinelTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SentinelTemplate.
func (*SentinelTemplate) DeepCopyInto ¶
func (in *SentinelTemplate) DeepCopyInto(out *SentinelTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServerCondition ¶
type ServerCondition struct {
Type ServerConditionType `json:"type"`
Reason string `json:"reason,omitempty"`
}
func (*ServerCondition) DeepCopy ¶
func (in *ServerCondition) DeepCopy() *ServerCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerCondition.
func (*ServerCondition) DeepCopyInto ¶
func (in *ServerCondition) DeepCopyInto(out *ServerCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServerConditionType ¶
type ServerConditionType string
const ( ServerConditionAddSeedMaster ServerConditionType = "AddingSeedMaster" ServerConditionRemoveSeedMaster ServerConditionType = "removingSeedMaster" ServerConditionAddSentinel ServerConditionType = "AddingSentinel" ServerConditionRemoveSentinel ServerConditionType = "removingSentinel" ServerConditionAddSlave ServerConditionType = "AddingSlave" ServerConditionRemoveSlave ServerConditionType = "removingSlave" ServerConditionReady ServerConditionType = "Ready" )
type ServerPhase ¶
type ServerPhase string
const ( ServerCreatingPhase ServerPhase = "Creating" ServerStoppingPhase ServerPhase = "Stopping" ServerRunningPhase ServerPhase = "Running" ServerFailedPhase ServerPhase = "Failed" )
type ServerSpec ¶
type ServerSpec struct {
Sentinels SentinelSpec `json:"sentinels"`
Slaves SlaveSpec `json:"slaves"`
BaseImage string `json:"baseImage,omitempty"`
Version string `json:"version,omitempty"`
Paused bool `json:"paused,omitempty"`
Pod *PodPolicy `json:"pod,omitempty"`
}
func (*ServerSpec) DeepCopy ¶
func (in *ServerSpec) DeepCopy() *ServerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerSpec.
func (*ServerSpec) DeepCopyInto ¶
func (in *ServerSpec) DeepCopyInto(out *ServerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServerStatus ¶
type ServerStatus struct {
Phase ServerPhase `json:"phase"`
Conditions []ServerCondition `json:"conditions"`
SlaveStatus SlaveStatus `json:"slaves"`
SentinelStatus SentinelStatus `json:"sentinels"`
}
func (*ServerStatus) DeepCopy ¶
func (in *ServerStatus) DeepCopy() *ServerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerStatus.
func (*ServerStatus) DeepCopyInto ¶
func (in *ServerStatus) DeepCopyInto(out *ServerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SlaveSpec ¶
func (*SlaveSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SlaveSpec.
func (*SlaveSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SlaveStatus ¶
type SlaveStatus struct {
Ready []string `json:"ready,omitempty"`
Unready []string `json:"unready,omitempty"`
}
func (*SlaveStatus) DeepCopy ¶
func (in *SlaveStatus) DeepCopy() *SlaveStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SlaveStatus.
func (*SlaveStatus) DeepCopyInto ¶
func (in *SlaveStatus) DeepCopyInto(out *SlaveStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.