Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the mysql v1 API group +k8s:deepcopy-gen=package,register +kubebuilder:object:generate=true +groupName=kdb.com
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type HostInfo
- type InstanceDesc
- type KDBCluster
- type KDBClusterList
- type KDBClusterSpec
- type KDBClusterStatus
- type KDBInstance
- type KDBInstanceList
- type KDBInstanceSpec
- type KDBInstanceStatus
Constants ¶
const ( PersistentVolumeResizing = "PersistentVolumeResizing" KDBInstanceProgressing = "Progressing" ProxyAvailable = "ProxyAvailable" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "kdb.com", Version: "v1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
var ( DefaultNamespace = "kdb" KDBInstanceKindName = "KDBInstance" KDBClusterKindName = "KDBCluster" )
var SchemeGroupVersion = GroupVersion
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 HostInfo ¶
type HostInfo struct { Hostname string `json:"hostname"` Host string `json:"host"` Port int `json:"port"` }
func (*HostInfo) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostInfo.
func (*HostInfo) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InstanceDesc ¶
type InstanceDesc struct { Name string `json:"name,omitempty"` // Number of desired KDB db pods. // +optional // +kubebuilder:default=1 // +kubebuilder:validation:Minimum=1 Replicas *int32 `json:"replicas,omitempty"` // RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used // to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. // If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an // empty definition that uses the default runtime handler. // More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class // +optional RuntimeClassName *string `json:"runtimeClassName,omitempty"` // Priority class name for the KDB pod. Changing this value causes // KDB pod to restart. // More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ // +optional PriorityClassName *string `json:"priorityClassName,omitempty"` // Scheduling constraints of a KDB pod. Changing this value causes // instance to restart. // More info: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node // +optional Affinity *corev1.Affinity `json:"affinity,omitempty"` // Tolerations of a KDB pod. Changing this value causes KDB pod to restart. // More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration // +optional Tolerations []corev1.Toleration `json:"tolerations,omitempty"` // +optional Resources corev1.ResourceRequirements `json:"resources,omitempty"` // +optional StorageClass string `json:"storageClass"` Size resource.Quantity `json:"size"` LogSize resource.Quantity `json:"logSize"` // The port on which kdb should listen. // +optional // +kubebuilder:default=5432 // +kubebuilder:validation:Minimum=1024 Port *int32 `json:"port,omitempty"` // Engine supports MySQL, PG, and so on // +optional Engine string `json:"engine"` // EngineVersion the major version of KDB engine installed in the image // +kubebuilder:validation:Required EngineVersion string `json:"engineVersion"` // EngineFullVersion the full version of KDB engine installed in the image // +optional EngineFullVersion string `json:"engineFullVersion"` }
func (*InstanceDesc) DeepCopy ¶
func (in *InstanceDesc) DeepCopy() *InstanceDesc
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceDesc.
func (*InstanceDesc) DeepCopyInto ¶
func (in *InstanceDesc) DeepCopyInto(out *InstanceDesc)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KDBCluster ¶
type KDBCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec KDBClusterSpec `json:"spec,omitempty"` Status KDBClusterStatus `json:"status,omitempty"` }
+genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="age",type="date",JSONPath=".metadata.creationTimestamp" KDBCluster is the Schema for the KDBClusters API
func (*KDBCluster) DeepCopy ¶
func (in *KDBCluster) DeepCopy() *KDBCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KDBCluster.
func (*KDBCluster) DeepCopyInto ¶
func (in *KDBCluster) DeepCopyInto(out *KDBCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KDBCluster) DeepCopyObject ¶
func (in *KDBCluster) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type KDBClusterList ¶
type KDBClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []KDBInstance `json:"items"` }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true KDBInstanceList contains a list of KDBCluster
func (*KDBClusterList) DeepCopy ¶
func (in *KDBClusterList) DeepCopy() *KDBClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KDBClusterList.
func (*KDBClusterList) DeepCopyInto ¶
func (in *KDBClusterList) DeepCopyInto(out *KDBClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KDBClusterList) DeepCopyObject ¶
func (in *KDBClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type KDBClusterSpec ¶
type KDBClusterSpec struct { // Instances is the pod of KDB instances // +optional Instances []InstanceDesc `json:"instances,omitempty"` // +optional Leader HostInfo `json:"leader"` // DeployArch Deployment Architecture // +optional DeployArch string `json:"deployArch"` }
KDBClusterSpec defines the desired state of KDBCluster
func (*KDBClusterSpec) DeepCopy ¶
func (in *KDBClusterSpec) DeepCopy() *KDBClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KDBClusterSpec.
func (*KDBClusterSpec) DeepCopyInto ¶
func (in *KDBClusterSpec) DeepCopyInto(out *KDBClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KDBClusterStatus ¶
type KDBClusterStatus struct { // Total number of instance. // +optional TotalNum int32 `json:"totalNum,omitempty"` // Total number of ready instance. // +optional ReadyNum int32 `json:"readyNum,omitempty"` // +optional Message string `json:"message,omitempty"` // conditions represent the observations of KDB pvc current state. // Known .status.conditions.type are: "PersistentVolumeResizing", // "Progressing", "ProxyAvailable" // +optional // +listType=map // +listMapKey=type // +operator-sdk:csv:customresourcedefinitions:type=status,xDescriptors={"urn:alm:descriptor:io.kubernetes.conditions"} Conditions []metav1.Condition `json:"conditions,omitempty"` }
KDBClusterStatus defines the observed state of KDBCluster
func (*KDBClusterStatus) DeepCopy ¶
func (in *KDBClusterStatus) DeepCopy() *KDBClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KDBClusterStatus.
func (*KDBClusterStatus) DeepCopyInto ¶
func (in *KDBClusterStatus) DeepCopyInto(out *KDBClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KDBInstance ¶
type KDBInstance struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec KDBInstanceSpec `json:"spec,omitempty"` Status KDBInstanceStatus `json:"status,omitempty"` }
+genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="age",type="date",JSONPath=".metadata.creationTimestamp" KDBInstance is the Schema for the KDBinstances API
func (*KDBInstance) DeepCopy ¶
func (in *KDBInstance) DeepCopy() *KDBInstance
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KDBInstance.
func (*KDBInstance) DeepCopyInto ¶
func (in *KDBInstance) DeepCopyInto(out *KDBInstance)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KDBInstance) DeepCopyObject ¶
func (in *KDBInstance) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type KDBInstanceList ¶
type KDBInstanceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []KDBInstance `json:"items"` }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true KDBInstanceList contains a list of KDBInstance
func (*KDBInstanceList) DeepCopy ¶
func (in *KDBInstanceList) DeepCopy() *KDBInstanceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KDBInstanceList.
func (*KDBInstanceList) DeepCopyInto ¶
func (in *KDBInstanceList) DeepCopyInto(out *KDBInstanceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KDBInstanceList) DeepCopyObject ¶
func (in *KDBInstanceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type KDBInstanceSpec ¶
type KDBInstanceSpec struct { // InstanceSet is the pod of KDB instance // +optional InstanceSet shared.InstanceSetSpec `json:"instance"` // +optional Leader HostInfo `json:"leader"` // The port on which kdb should listen. // +optional // +kubebuilder:default=5432 // +kubebuilder:validation:Minimum=1024 Port *int32 `json:"port,omitempty"` // DeployArch Deployment Architecture // +optional DeployArch string `json:"deployArch"` // Engine supports MySQL, PG, and so on // +optional Engine string `json:"engine"` // EngineVersion the major version of KDB engine installed in the image // +kubebuilder:validation:Required EngineVersion string `json:"engineVersion"` // EngineFullVersion the full version of KDB engine installed in the image // +optional EngineFullVersion string `json:"engineFullVersion"` // Whether or not the PostgreSQL cluster should be stopped. // When this is true, workloads are scaled to zero and CronJobs // are suspended. // Other resources, such as Services and Volumes, remain in place. // +optional Shutdown *bool `json:"shutdown,omitempty"` // A list of group IDs applied to the process of a container. These can be // useful when accessing shared file systems with constrained permissions. // More info: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context // +optional SupplementalGroups []int64 `json:"supplementalGroups,omitempty"` Config map[string]string `json:"config,omitempty"` }
KDBInstanceSpec defines the desired state of KDBInstance
func (*KDBInstanceSpec) DeepCopy ¶
func (in *KDBInstanceSpec) DeepCopy() *KDBInstanceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KDBInstanceSpec.
func (*KDBInstanceSpec) DeepCopyInto ¶
func (in *KDBInstanceSpec) DeepCopyInto(out *KDBInstanceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KDBInstanceStatus ¶
type KDBInstanceStatus struct { // +optional InstanceSet shared.InstanceSetStatus `json:"instance,omitempty"` // +optional Message string `json:"message,omitempty"` // PVCStatus // +optional PVCPhase corev1.PersistentVolumeClaimPhase `json:"pvcPhase,omitempty"` // conditions represent the observations of KDB pvc current state. // Known .status.conditions.type are: "PersistentVolumeResizing", // "Progressing", "ProxyAvailable" // +optional // +listType=map // +listMapKey=type // +operator-sdk:csv:customresourcedefinitions:type=status,xDescriptors={"urn:alm:descriptor:io.kubernetes.conditions"} Conditions []metav1.Condition `json:"conditions,omitempty"` }
KDBInstanceStatus defines the observed state of KDBInstance
func (*KDBInstanceStatus) DeepCopy ¶
func (in *KDBInstanceStatus) DeepCopy() *KDBInstanceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KDBInstanceStatus.
func (*KDBInstanceStatus) DeepCopyInto ¶
func (in *KDBInstanceStatus) DeepCopyInto(out *KDBInstanceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.