Documentation ¶
Index ¶
- Constants
- Variables
- func DeploymentReady(deployment appsv1.Deployment) bool
- func GetConditionStatus(b bool) corev1.ConditionStatus
- func GetConfCheckSum(spec v1alpha1.MilvusClusterSpec) string
- func GetContainerIndex(containers []corev1.Container, name string) int
- func GetEndpointsHealth(endpoints []string) map[string]EtcdEndPointHealth
- func GetEtcdCondition(ctx context.Context, endpoints []string) (v1alpha1.MilvusCondition, error)
- func GetLivenessProbe() *corev1.Probe
- func GetMilvusConfCheckSum(spec v1alpha1.MilvusSpec) string
- func GetMilvusEndpoint(ctx context.Context, logger logr.Logger, client client.Client, ...) string
- func GetMilvusInstanceCondition(ctx context.Context, cli client.Client, info MilvusConditionInfo) (v1alpha1.MilvusCondition, error)
- func GetMinioCondition(ctx context.Context, logger logr.Logger, cli client.Client, ...) (v1alpha1.MilvusCondition, error)
- func GetMinioSecure(conf map[string]interface{}) bool
- func GetPulsarCondition(ctx context.Context, logger logr.Logger, p v1alpha1.MilvusPulsar) (v1alpha1.MilvusCondition, error)
- func GetReadinessProbe() *corev1.Probe
- func GetStorageSecretRefEnv(secretRef string) []corev1.EnvVar
- func GetVolumeIndex(volumes []corev1.Volume, name string) int
- func GetVolumeMountIndex(volumeMounts []corev1.VolumeMount, mountPath string) int
- func IsClusterDependencyReady(status v1alpha1.MilvusClusterStatus) bool
- func IsClusterSetDefaultDone(mc *v1alpha1.MilvusCluster) bool
- func IsDependencyReady(conditions []v1alpha1.MilvusCondition, isCluster bool) bool
- func IsEqual(obj1, obj2 interface{}) bool
- func IsSetDefaultDone(mc *v1alpha1.Milvus) bool
- func LoopWithInterval(ctx context.Context, loopFunc func() error, interval time.Duration, ...)
- func MergeContainerPort(src, dst []corev1.ContainerPort) []corev1.ContainerPort
- func MergeEnvVar(src, dst []corev1.EnvVar) []corev1.EnvVar
- func MergeLabels(allLabels ...map[string]string) map[string]string
- func MergeServicePort(src, dst []corev1.ServicePort) []corev1.ServicePort
- func MergeVolumeMount(src, dst []corev1.VolumeMount) []corev1.VolumeMount
- func NamespacedName(namespace, name string) types.NamespacedName
- func NewAppLabels(instance string) map[string]string
- func NewComponentAppLabels(instance, component string) map[string]string
- func PodRunningAndReady(pod corev1.Pod) (bool, error)
- func SetupControllers(ctx context.Context, mgr manager.Manager, enableHook bool) error
- func UpdateClusterCondition(status *v1alpha1.MilvusClusterStatus, c v1alpha1.MilvusCondition)
- func UpdateCondition(status *v1alpha1.MilvusStatus, c v1alpha1.MilvusCondition)
- func WarppedReconcileComponentFunc(f func(context.Context, v1alpha1.MilvusCluster, MilvusComponent) error, ...) func() error
- func WrappedFunc(f interface{}, args ...interface{}) func() error
- func WrappedUpdateStatus(f func(ctx context.Context, mil *v1alpha1.Milvus) error, ctx context.Context, ...) func() error
- type Args
- type Chart
- type CommonInfo
- type EtcdClient
- type EtcdConditionInfo
- type EtcdEndPointHealth
- type Func
- type Group
- type GroupRunner
- type HelmReconciler
- type ImageInfo
- type K8sClient
- type LocalHelmReconciler
- type Logger
- type MilvusClusterPredicate
- type MilvusClusterReconcileFunc
- type MilvusClusterReconciler
- func (r *MilvusClusterReconciler) Finalize(ctx context.Context, mc v1alpha1.MilvusCluster) error
- func (r *MilvusClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *MilvusClusterReconciler) ReconcileAll(ctx context.Context, mc v1alpha1.MilvusCluster) error
- func (r *MilvusClusterReconciler) ReconcileComponentDeployment(ctx context.Context, mc v1alpha1.MilvusCluster, component MilvusComponent) error
- func (r *MilvusClusterReconciler) ReconcileComponentService(ctx context.Context, mc v1alpha1.MilvusCluster, component MilvusComponent) error
- func (r *MilvusClusterReconciler) ReconcileConfigMaps(ctx context.Context, mc v1alpha1.MilvusCluster) error
- func (r *MilvusClusterReconciler) ReconcileDeployments(ctx context.Context, mc v1alpha1.MilvusCluster) error
- func (r *MilvusClusterReconciler) ReconcileEtcd(ctx context.Context, mc v1alpha1.MilvusCluster) error
- func (r *MilvusClusterReconciler) ReconcileMilvus(ctx context.Context, mc v1alpha1.MilvusCluster) error
- func (r *MilvusClusterReconciler) ReconcileMinio(ctx context.Context, mc v1alpha1.MilvusCluster) error
- func (r *MilvusClusterReconciler) ReconcilePodMonitor(ctx context.Context, mc v1alpha1.MilvusCluster) error
- func (r *MilvusClusterReconciler) ReconcilePulsar(ctx context.Context, mc v1alpha1.MilvusCluster) error
- func (r *MilvusClusterReconciler) ReconcileServices(ctx context.Context, mc v1alpha1.MilvusCluster) error
- func (r *MilvusClusterReconciler) SetDefault(ctx context.Context, mc *v1alpha1.MilvusCluster) error
- func (r *MilvusClusterReconciler) SetDefaultStatus(ctx context.Context, mc *v1alpha1.MilvusCluster) (bool, error)
- func (r *MilvusClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
- type MilvusClusterStatusSyncer
- func (r *MilvusClusterStatusSyncer) GetEtcdCondition(ctx context.Context, mc v1alpha1.MilvusCluster) (v1alpha1.MilvusCondition, error)
- func (r *MilvusClusterStatusSyncer) GetMilvusClusterCondition(ctx context.Context, mc v1alpha1.MilvusCluster) (v1alpha1.MilvusCondition, error)
- func (r *MilvusClusterStatusSyncer) GetMilvusEndpoint(ctx context.Context, mc v1alpha1.MilvusCluster) string
- func (r *MilvusClusterStatusSyncer) GetMinioCondition(ctx context.Context, mc v1alpha1.MilvusCluster) (v1alpha1.MilvusCondition, error)
- func (r *MilvusClusterStatusSyncer) GetPulsarCondition(ctx context.Context, mc v1alpha1.MilvusCluster) (v1alpha1.MilvusCondition, error)
- func (r *MilvusClusterStatusSyncer) RunIfNot()
- func (r *MilvusClusterStatusSyncer) UpdateStatus(ctx context.Context, mc *v1alpha1.MilvusCluster) error
- type MilvusComponent
- func (c MilvusComponent) GetComponentPort(spec v1alpha1.MilvusClusterSpec) int32
- func (c MilvusComponent) GetComponentSpec(spec v1alpha1.MilvusClusterSpec) v1alpha1.ComponentSpec
- func (c MilvusComponent) GetContainerName() string
- func (c MilvusComponent) GetContainerPorts(spec v1alpha1.MilvusClusterSpec) []corev1.ContainerPort
- func (c MilvusComponent) GetDeploymentInstanceName(instance string) string
- func (c MilvusComponent) GetDeploymentStrategy() appsv1.DeploymentStrategy
- func (c MilvusComponent) GetEnv(spec v1alpha1.MilvusClusterSpec) []corev1.EnvVar
- func (c MilvusComponent) GetImage(spec v1alpha1.MilvusClusterSpec) string
- func (c MilvusComponent) GetImagePullPolicy(spec v1alpha1.MilvusClusterSpec) corev1.PullPolicy
- func (c MilvusComponent) GetImagePullSecrets(spec v1alpha1.MilvusClusterSpec) []corev1.LocalObjectReference
- func (c MilvusComponent) GetInstanceName(instance string) string
- func (c MilvusComponent) GetNodeSelector(spec v1alpha1.MilvusClusterSpec) map[string]string
- func (c MilvusComponent) GetReplicas(spec v1alpha1.MilvusClusterSpec) *int32
- func (c MilvusComponent) GetResources(spec v1alpha1.MilvusClusterSpec) corev1.ResourceRequirements
- func (c MilvusComponent) GetServiceInstanceName(instance string) string
- func (c MilvusComponent) GetServicePorts(spec v1alpha1.MilvusClusterSpec) []corev1.ServicePort
- func (c MilvusComponent) GetServiceType(spec v1alpha1.MilvusClusterSpec) corev1.ServiceType
- func (c MilvusComponent) GetTolerations(spec v1alpha1.MilvusClusterSpec) []corev1.Toleration
- func (c MilvusComponent) IsCoord() bool
- func (c MilvusComponent) IsNode() bool
- func (c MilvusComponent) String() string
- type MilvusConditionInfo
- type MilvusEndpointInfo
- type MilvusReconcileFunc
- type MilvusReconciler
- func (r *MilvusReconciler) Finalize(ctx context.Context, mil v1alpha1.Milvus) error
- func (r *MilvusReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *MilvusReconciler) ReconcileAll(ctx context.Context, mil v1alpha1.Milvus) error
- func (r *MilvusReconciler) ReconcileConfigMaps(ctx context.Context, mil v1alpha1.Milvus) error
- func (r *MilvusReconciler) ReconcileDeployments(ctx context.Context, mil v1alpha1.Milvus) error
- func (r *MilvusReconciler) ReconcileEtcd(ctx context.Context, mil v1alpha1.Milvus) error
- func (r *MilvusReconciler) ReconcileMilvus(ctx context.Context, mil v1alpha1.Milvus) error
- func (r *MilvusReconciler) ReconcileMinio(ctx context.Context, mil v1alpha1.Milvus) error
- func (r *MilvusReconciler) ReconcilePodMonitor(ctx context.Context, mc v1alpha1.Milvus) error
- func (r *MilvusReconciler) ReconcileServices(ctx context.Context, mil v1alpha1.Milvus) error
- func (r *MilvusReconciler) SetDefault(ctx context.Context, mc *v1alpha1.Milvus) error
- func (r *MilvusReconciler) SetDefaultStatus(ctx context.Context, mc *v1alpha1.Milvus) (bool, error)
- func (r *MilvusReconciler) SetupWithManager(mgr ctrl.Manager) error
- type MilvusStatusSyncer
- func (r *MilvusStatusSyncer) GetEtcdCondition(ctx context.Context, mil v1alpha1.Milvus) (v1alpha1.MilvusCondition, error)
- func (r *MilvusStatusSyncer) GetMilvusCondition(ctx context.Context, mil v1alpha1.Milvus) (v1alpha1.MilvusCondition, error)
- func (r *MilvusStatusSyncer) GetMilvusEndpoint(ctx context.Context, mil v1alpha1.Milvus) string
- func (r *MilvusStatusSyncer) GetMinioCondition(ctx context.Context, mil v1alpha1.Milvus) (v1alpha1.MilvusCondition, error)
- func (r *MilvusStatusSyncer) RunIfNot()
- func (r *MilvusStatusSyncer) UpdateStatus(ctx context.Context, mil *v1alpha1.Milvus) error
- type MinioClient
- type NewEtcdClientFunc
- type NewMinioClientFunc
- type ParallelGroupRunner
- type PulsarClient
- type PulsarReader
- type Result
- type StorageConditionInfo
- type Values
Constants ¶
const ( MetricPortName = "metrics" MetricPath = "/metrics" RootCoordName = "rootcoord" DataCoordName = "datacoord" QueryCoordName = "querycoord" IndexCoordName = "indexcoord" DataNodeName = "datanode" QueryNodeName = "querynode" IndexNodeName = "indexnode" ProxyName = "proxy" MilvusName = "milvus" RootCoordFieldName = "RootCoord" DataCoordFieldName = "DataCoord" QueryCoordFieldName = "QueryCoord" IndexCoordFieldName = "IndexCoord" DataNodeFieldName = "DataNode" QueryNodeFieldName = "QueryNode" IndexNodeFieldName = "IndexNode" ProxyFieldName = "Proxy" MetricPort = 9091 RootCoordPort = 53100 DataCoordPort = 13333 QueryCoordPort = 19531 IndexCoordPort = 31000 IndexNodePort = 21121 QueryNodePort = 21123 DataNodePort = 21124 ProxyPort = 19530 MilvusPort = ProxyPort )
const name or ports
const ( EtcdChart = "config/assets/charts/etcd" MinioChart = "config/assets/charts/minio" PulsarChart = "config/assets/charts/pulsar" Etcd = "etcd" Minio = "minio" Pulsar = "pulsar" )
const ( MilvusConfigVolumeName = "milvus-config" MilvusOriginalConfigPath = "/milvus/configs/milvus.yaml" MilvusUserConfigMountPath = "/milvus/configs/user.yaml" MilvusUserConfigMountSubPath = "user.yaml" AccessKey = "accesskey" SecretKey = "secretkey" AnnotationCheckSum = "checksum/config" ToolsVolumeName = "tools" ToolsMountPath = "/milvus/tools" RunScriptPath = ToolsMountPath + "/run.sh" MergeToolPath = ToolsMountPath + "/merge" )
const ( MessageEtcdReady = "Etcd endpoints is healthy" MessageEtcdNotReady = "All etcd endpoints are unhealthy" MessageStorageReady = "Storage endpoints is healthy" MessageStorageNotReady = "All Storage endpoints are unhealthy" MessagePulsarReady = "Pulsar is ready" MessagePulsarNotReady = "Pulsar is not ready" MessageSecretNotExist = "Secret not exist" MessageKeyNotExist = "accesskey or secretkey not exist in secret" MessageDecodeErr = "accesskey or secretkey decode error" MessageMilvusHealthy = "All Milvus components are healthy" )
const ( AppLabel = "app.kubernetes.io/" AppLabelInstance = AppLabel + "instance" AppLabelVersion = AppLabel + "version" AppLabelComponent = AppLabel + "component" AppLabelName = AppLabel + "name" )
const (
MCFinalizerName = "milvuscluster.milvus.io/finalizer"
)
const (
MilvusFinalizerName = "milvus.milvus.io/finalizer"
)
Variables ¶
var ( RootCoord = MilvusComponent{RootCoordName, RootCoordFieldName, RootCoordPort} DataCoord = MilvusComponent{DataCoordName, DataCoordFieldName, DataCoordPort} QueryCoord = MilvusComponent{QueryCoordName, QueryCoordFieldName, QueryCoordPort} IndexCoord = MilvusComponent{IndexCoordName, IndexCoordFieldName, IndexCoordPort} DataNode = MilvusComponent{DataNodeName, DataNodeFieldName, DataNodePort} QueryNode = MilvusComponent{QueryNodeName, QueryNodeFieldName, QueryNodePort} IndexNode = MilvusComponent{IndexNodeName, IndexNodeFieldName, IndexNodePort} Proxy = MilvusComponent{ProxyName, ProxyFieldName, ProxyPort} // Milvus standalone MilvusStandalone = MilvusComponent{MilvusName, "", MilvusPort} MilvusComponents = []MilvusComponent{ RootCoord, DataCoord, QueryCoord, IndexCoord, DataNode, QueryNode, IndexNode, Proxy, } MilvusCoords = []MilvusComponent{ RootCoord, DataCoord, QueryCoord, IndexCoord, } )
define MilvusComponents
var ( DefaultOperatorImageInfo = ImageInfo{ Image: "milvusdb/milvus-operator:latest", ImagePullPolicy: corev1.PullAlways, } )
var ( // DefaultValuesPath is the path to the default values file // variable in test, const in runtime DefaultValuesPath = "config/assets/charts/values.yaml" )
var (
MilvusConfigMapMode int32 = 420
)
Functions ¶
func DeploymentReady ¶
func DeploymentReady(deployment appsv1.Deployment) bool
DeploymentReady returns if deployment is available &
func GetConditionStatus ¶
func GetConditionStatus(b bool) corev1.ConditionStatus
func GetConfCheckSum ¶ added in v0.2.0
func GetConfCheckSum(spec v1alpha1.MilvusClusterSpec) string
GetConfCheckSum returns the checksum of the component configuration
func GetContainerIndex ¶
GetContainerIndex returns index of container @name in @containers, -1 if not found
func GetEndpointsHealth ¶
func GetEndpointsHealth(endpoints []string) map[string]EtcdEndPointHealth
func GetEtcdCondition ¶ added in v0.2.3
func GetLivenessProbe ¶ added in v0.2.0
func GetMilvusConfCheckSum ¶ added in v0.2.0
func GetMilvusConfCheckSum(spec v1alpha1.MilvusSpec) string
GetMilvusConfCheckSum returns the checksum of the component configuration
func GetMilvusEndpoint ¶ added in v0.2.3
func GetMilvusInstanceCondition ¶ added in v0.2.3
func GetMilvusInstanceCondition(ctx context.Context, cli client.Client, info MilvusConditionInfo) (v1alpha1.MilvusCondition, error)
func GetMinioCondition ¶ added in v0.2.3
func GetMinioCondition( ctx context.Context, logger logr.Logger, cli client.Client, info StorageConditionInfo) (v1alpha1.MilvusCondition, error)
func GetMinioSecure ¶
func GetPulsarCondition ¶ added in v0.2.3
func GetPulsarCondition(ctx context.Context, logger logr.Logger, p v1alpha1.MilvusPulsar) (v1alpha1.MilvusCondition, error)
func GetReadinessProbe ¶ added in v0.2.0
func GetStorageSecretRefEnv ¶
func GetVolumeIndex ¶
GetVolumeIndex returns index of volume @name in @volumes, -1 if not found
func GetVolumeMountIndex ¶
func GetVolumeMountIndex(volumeMounts []corev1.VolumeMount, mountPath string) int
GetVolumeMountIndex returns index of volumeMount with @mountPath in @volumeMounts, -1 if not found
func IsClusterDependencyReady ¶ added in v0.2.0
func IsClusterDependencyReady(status v1alpha1.MilvusClusterStatus) bool
func IsClusterSetDefaultDone ¶ added in v0.2.0
func IsClusterSetDefaultDone(mc *v1alpha1.MilvusCluster) bool
func IsDependencyReady ¶
func IsDependencyReady(conditions []v1alpha1.MilvusCondition, isCluster bool) bool
func IsSetDefaultDone ¶ added in v0.2.0
func LoopWithInterval ¶ added in v0.2.3
func MergeContainerPort ¶
func MergeContainerPort(src, dst []corev1.ContainerPort) []corev1.ContainerPort
func MergeEnvVar ¶
Merge dst env into src
func MergeLabels ¶
MergeLabels merges all labels together and returns a new label.
func MergeServicePort ¶
func MergeServicePort(src, dst []corev1.ServicePort) []corev1.ServicePort
func MergeVolumeMount ¶
func MergeVolumeMount(src, dst []corev1.VolumeMount) []corev1.VolumeMount
func NamespacedName ¶
func NamespacedName(namespace, name string) types.NamespacedName
func NewAppLabels ¶
func NewComponentAppLabels ¶
func PodRunningAndReady ¶
PodRunningAndReady returns whether a pod is running and each container has passed it's ready state.
func SetupControllers ¶
func UpdateClusterCondition ¶ added in v0.2.0
func UpdateClusterCondition(status *v1alpha1.MilvusClusterStatus, c v1alpha1.MilvusCondition)
func UpdateCondition ¶
func UpdateCondition(status *v1alpha1.MilvusStatus, c v1alpha1.MilvusCondition)
func WarppedReconcileComponentFunc ¶
func WarppedReconcileComponentFunc( f func(context.Context, v1alpha1.MilvusCluster, MilvusComponent) error, ctx context.Context, mc v1alpha1.MilvusCluster, c MilvusComponent) func() error
func WrappedFunc ¶ added in v0.2.3
func WrappedFunc(f interface{}, args ...interface{}) func() error
Types ¶
type CommonInfo ¶ added in v0.3.0
type CommonInfo struct { OperatorImageInfo ImageInfo // contains filtered or unexported fields }
CommonInfo should be init when before time reconcile
func (*CommonInfo) InitIfNot ¶ added in v0.3.0
func (c *CommonInfo) InitIfNot(cli client.Client)
type EtcdClient ¶ added in v0.2.3
type EtcdClient interface { Get(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error) AlarmList(ctx context.Context) (*clientv3.AlarmResponse, error) Close() error }
EtcdClient for mock
type EtcdConditionInfo ¶ added in v0.2.3
type EtcdConditionInfo struct {
Endpoints []string
}
type EtcdEndPointHealth ¶
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
type GroupRunner ¶ added in v0.2.3
type GroupRunner interface { // Run runs a group of funcs by same args, if any func fail, it should return err Run(funcs []Func, ctx context.Context, args ...interface{}) error // RunWithResult runs a group of funcs by same args, returns results with data & err for each func called RunWithResult(funcs []Func, ctx context.Context, args ...interface{}) []Result // RunDiffArgs runs a func by groups of args from @argsArray multiple times, if any failed, it should return err RunDiffArgs(f Func, ctx context.Context, argsArray []Args) error }
GroupRunner does a group of funcs in parallel
type HelmReconciler ¶ added in v0.2.3
type HelmReconciler interface { NewHelmCfg(namespace string) *action.Configuration Reconcile(ctx context.Context, request helm.ChartRequest) error }
HelmReconciler reconciles Helm releases
type ImageInfo ¶ added in v0.3.0
type ImageInfo struct { Image string ImagePullPolicy corev1.PullPolicy }
ImageInfo for image pulling
type LocalHelmReconciler ¶ added in v0.2.3
type LocalHelmReconciler struct {
// contains filtered or unexported fields
}
LocalHelmReconciler implements HelmReconciler at local
func MustNewLocalHelmReconciler ¶ added in v0.3.0
func MustNewLocalHelmReconciler(helmSettings *cli.EnvSettings, logger logr.Logger) *LocalHelmReconciler
func (LocalHelmReconciler) MergeWithDefaultValues ¶ added in v0.3.0
func (l LocalHelmReconciler) MergeWithDefaultValues(chartPath string, values Values) Values
func (LocalHelmReconciler) NewHelmCfg ¶ added in v0.2.3
func (l LocalHelmReconciler) NewHelmCfg(namespace string) *action.Configuration
func (LocalHelmReconciler) Reconcile ¶ added in v0.2.3
func (l LocalHelmReconciler) Reconcile(ctx context.Context, request helm.ChartRequest) error
ReconcileHelm reconciles Helm releases
type MilvusClusterPredicate ¶
func (*MilvusClusterPredicate) Create ¶
func (*MilvusClusterPredicate) Create(e event.CreateEvent) bool
func (*MilvusClusterPredicate) Update ¶
func (*MilvusClusterPredicate) Update(e event.UpdateEvent) bool
type MilvusClusterReconcileFunc ¶ added in v0.2.3
type MilvusClusterReconcileFunc func(context.Context, v1alpha1.MilvusCluster) error
type MilvusClusterReconciler ¶
type MilvusClusterReconciler struct { client.Client Scheme *runtime.Scheme // contains filtered or unexported fields }
MilvusClusterReconciler reconciles a MilvusCluster object
func (*MilvusClusterReconciler) Finalize ¶
func (r *MilvusClusterReconciler) Finalize(ctx context.Context, mc v1alpha1.MilvusCluster) error
func (*MilvusClusterReconciler) Reconcile ¶
func (r *MilvusClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile
func (*MilvusClusterReconciler) ReconcileAll ¶
func (r *MilvusClusterReconciler) ReconcileAll(ctx context.Context, mc v1alpha1.MilvusCluster) error
func (*MilvusClusterReconciler) ReconcileComponentDeployment ¶
func (r *MilvusClusterReconciler) ReconcileComponentDeployment( ctx context.Context, mc v1alpha1.MilvusCluster, component MilvusComponent, ) error
func (*MilvusClusterReconciler) ReconcileComponentService ¶
func (r *MilvusClusterReconciler) ReconcileComponentService( ctx context.Context, mc v1alpha1.MilvusCluster, component MilvusComponent, ) error
func (*MilvusClusterReconciler) ReconcileConfigMaps ¶
func (r *MilvusClusterReconciler) ReconcileConfigMaps(ctx context.Context, mc v1alpha1.MilvusCluster) error
func (*MilvusClusterReconciler) ReconcileDeployments ¶
func (r *MilvusClusterReconciler) ReconcileDeployments(ctx context.Context, mc v1alpha1.MilvusCluster) error
func (*MilvusClusterReconciler) ReconcileEtcd ¶
func (r *MilvusClusterReconciler) ReconcileEtcd(ctx context.Context, mc v1alpha1.MilvusCluster) error
func (*MilvusClusterReconciler) ReconcileMilvus ¶
func (r *MilvusClusterReconciler) ReconcileMilvus(ctx context.Context, mc v1alpha1.MilvusCluster) error
func (*MilvusClusterReconciler) ReconcileMinio ¶
func (r *MilvusClusterReconciler) ReconcileMinio(ctx context.Context, mc v1alpha1.MilvusCluster) error
func (*MilvusClusterReconciler) ReconcilePodMonitor ¶
func (r *MilvusClusterReconciler) ReconcilePodMonitor(ctx context.Context, mc v1alpha1.MilvusCluster) error
func (*MilvusClusterReconciler) ReconcilePulsar ¶
func (r *MilvusClusterReconciler) ReconcilePulsar(ctx context.Context, mc v1alpha1.MilvusCluster) error
func (*MilvusClusterReconciler) ReconcileServices ¶
func (r *MilvusClusterReconciler) ReconcileServices(ctx context.Context, mc v1alpha1.MilvusCluster) error
func (*MilvusClusterReconciler) SetDefault ¶
func (r *MilvusClusterReconciler) SetDefault(ctx context.Context, mc *v1alpha1.MilvusCluster) error
func (*MilvusClusterReconciler) SetDefaultStatus ¶ added in v0.2.0
func (r *MilvusClusterReconciler) SetDefaultStatus(ctx context.Context, mc *v1alpha1.MilvusCluster) (bool, error)
SetDefaultStatus update status if default not set; return true if updated, return false if not, return err if update failed
func (*MilvusClusterReconciler) SetupWithManager ¶
func (r *MilvusClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type MilvusClusterStatusSyncer ¶ added in v0.2.0
type MilvusClusterStatusSyncer struct { client.Client sync.Once // contains filtered or unexported fields }
func NewMilvusClusterStatusSyncer ¶ added in v0.2.0
func (*MilvusClusterStatusSyncer) GetEtcdCondition ¶ added in v0.2.0
func (r *MilvusClusterStatusSyncer) GetEtcdCondition(ctx context.Context, mc v1alpha1.MilvusCluster) (v1alpha1.MilvusCondition, error)
func (*MilvusClusterStatusSyncer) GetMilvusClusterCondition ¶ added in v0.2.0
func (r *MilvusClusterStatusSyncer) GetMilvusClusterCondition(ctx context.Context, mc v1alpha1.MilvusCluster) (v1alpha1.MilvusCondition, error)
func (*MilvusClusterStatusSyncer) GetMilvusEndpoint ¶ added in v0.2.0
func (r *MilvusClusterStatusSyncer) GetMilvusEndpoint(ctx context.Context, mc v1alpha1.MilvusCluster) string
func (*MilvusClusterStatusSyncer) GetMinioCondition ¶ added in v0.2.0
func (r *MilvusClusterStatusSyncer) GetMinioCondition( ctx context.Context, mc v1alpha1.MilvusCluster) (v1alpha1.MilvusCondition, error)
func (*MilvusClusterStatusSyncer) GetPulsarCondition ¶ added in v0.2.0
func (r *MilvusClusterStatusSyncer) GetPulsarCondition( ctx context.Context, mc v1alpha1.MilvusCluster) (v1alpha1.MilvusCondition, error)
func (*MilvusClusterStatusSyncer) RunIfNot ¶ added in v0.2.0
func (r *MilvusClusterStatusSyncer) RunIfNot()
func (*MilvusClusterStatusSyncer) UpdateStatus ¶ added in v0.2.0
func (r *MilvusClusterStatusSyncer) UpdateStatus(ctx context.Context, mc *v1alpha1.MilvusCluster) error
type MilvusComponent ¶
MilvusComponent contains basic info of a milvus cluster component
func (MilvusComponent) GetComponentPort ¶
func (c MilvusComponent) GetComponentPort(spec v1alpha1.MilvusClusterSpec) int32
GetComponentPort returns the port of the component
func (MilvusComponent) GetComponentSpec ¶
func (c MilvusComponent) GetComponentSpec(spec v1alpha1.MilvusClusterSpec) v1alpha1.ComponentSpec
GetComponentSpec returns the component spec
func (MilvusComponent) GetContainerName ¶
func (c MilvusComponent) GetContainerName() string
GetContainerName returns the name of the component container
func (MilvusComponent) GetContainerPorts ¶
func (c MilvusComponent) GetContainerPorts(spec v1alpha1.MilvusClusterSpec) []corev1.ContainerPort
GetContainerPorts returns the ports of the component container
func (MilvusComponent) GetDeploymentInstanceName ¶
func (c MilvusComponent) GetDeploymentInstanceName(instance string) string
GetDeploymentInstanceName returns the name of the component deployment
func (MilvusComponent) GetDeploymentStrategy ¶
func (c MilvusComponent) GetDeploymentStrategy() appsv1.DeploymentStrategy
func (MilvusComponent) GetEnv ¶
func (c MilvusComponent) GetEnv(spec v1alpha1.MilvusClusterSpec) []corev1.EnvVar
GetEnv returns the environment variables for the component
func (MilvusComponent) GetImage ¶
func (c MilvusComponent) GetImage(spec v1alpha1.MilvusClusterSpec) string
GetImage returns the image for the component
func (MilvusComponent) GetImagePullPolicy ¶
func (c MilvusComponent) GetImagePullPolicy(spec v1alpha1.MilvusClusterSpec) corev1.PullPolicy
GetImagePullPolicy returns the image pull policy for the component
func (MilvusComponent) GetImagePullSecrets ¶
func (c MilvusComponent) GetImagePullSecrets(spec v1alpha1.MilvusClusterSpec) []corev1.LocalObjectReference
GetImagePullSecrets returns the image pull secrets for the component
func (MilvusComponent) GetInstanceName ¶
func (c MilvusComponent) GetInstanceName(instance string) string
GetInstanceName returns the name of the component instance
func (MilvusComponent) GetNodeSelector ¶
func (c MilvusComponent) GetNodeSelector(spec v1alpha1.MilvusClusterSpec) map[string]string
GetNodeSelector returns the node selector for the component
func (MilvusComponent) GetReplicas ¶
func (c MilvusComponent) GetReplicas(spec v1alpha1.MilvusClusterSpec) *int32
GetReplicas returns the replicas for the component
func (MilvusComponent) GetResources ¶
func (c MilvusComponent) GetResources(spec v1alpha1.MilvusClusterSpec) corev1.ResourceRequirements
GetResources returns the corev1.ResourceRequirements for the component
func (MilvusComponent) GetServiceInstanceName ¶
func (c MilvusComponent) GetServiceInstanceName(instance string) string
GetServiceInstanceName returns the name of the component service
func (MilvusComponent) GetServicePorts ¶
func (c MilvusComponent) GetServicePorts(spec v1alpha1.MilvusClusterSpec) []corev1.ServicePort
GetServicePorts returns the ports of the component service
func (MilvusComponent) GetServiceType ¶
func (c MilvusComponent) GetServiceType(spec v1alpha1.MilvusClusterSpec) corev1.ServiceType
GetServiceType returns the type of the component service
func (MilvusComponent) GetTolerations ¶
func (c MilvusComponent) GetTolerations(spec v1alpha1.MilvusClusterSpec) []corev1.Toleration
GetTolerations returns the tolerations for the component
func (MilvusComponent) IsCoord ¶
func (c MilvusComponent) IsCoord() bool
IsCoord return if it's a coord by its name
func (MilvusComponent) IsNode ¶
func (c MilvusComponent) IsNode() bool
IsCoord return if it's a node by its name
func (MilvusComponent) String ¶
func (c MilvusComponent) String() string
String returns the name of the component
type MilvusConditionInfo ¶ added in v0.2.3
type MilvusConditionInfo struct { Object metav1.Object Conditions []v1alpha1.MilvusCondition IsCluster bool }
MilvusConditionInfo info for calculate the milvus condition
type MilvusEndpointInfo ¶ added in v0.2.3
type MilvusEndpointInfo struct { Namespace string Name string ServiceType corev1.ServiceType Port int32 }
MilvusEndpointInfo info for calculate the endpoint
type MilvusReconcileFunc ¶ added in v0.2.3
type MilvusReconciler ¶ added in v0.2.0
type MilvusReconciler struct { client.Client Scheme *runtime.Scheme // contains filtered or unexported fields }
MilvusReconciler reconciles a Milvus object
func (*MilvusReconciler) Reconcile ¶ added in v0.2.0
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the Milvus object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.10.0/pkg/reconcile
func (*MilvusReconciler) ReconcileAll ¶ added in v0.2.0
func (*MilvusReconciler) ReconcileConfigMaps ¶ added in v0.2.0
func (*MilvusReconciler) ReconcileDeployments ¶ added in v0.2.0
func (*MilvusReconciler) ReconcileEtcd ¶ added in v0.2.0
func (*MilvusReconciler) ReconcileMilvus ¶ added in v0.2.0
func (*MilvusReconciler) ReconcileMinio ¶ added in v0.2.0
func (*MilvusReconciler) ReconcilePodMonitor ¶ added in v0.2.0
func (*MilvusReconciler) ReconcileServices ¶ added in v0.2.0
func (*MilvusReconciler) SetDefault ¶ added in v0.2.0
func (*MilvusReconciler) SetDefaultStatus ¶ added in v0.2.0
SetDefaultStatus update status if default not set; return true if updated, return false if not, return err if update failed
func (*MilvusReconciler) SetupWithManager ¶ added in v0.2.0
func (r *MilvusReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type MilvusStatusSyncer ¶ added in v0.2.0
type MilvusStatusSyncer struct { client.Client sync.Once // contains filtered or unexported fields }
func NewMilvusStatusSyncer ¶ added in v0.2.0
func (*MilvusStatusSyncer) GetEtcdCondition ¶ added in v0.2.0
func (r *MilvusStatusSyncer) GetEtcdCondition(ctx context.Context, mil v1alpha1.Milvus) (v1alpha1.MilvusCondition, error)
func (*MilvusStatusSyncer) GetMilvusCondition ¶ added in v0.2.0
func (r *MilvusStatusSyncer) GetMilvusCondition(ctx context.Context, mil v1alpha1.Milvus) (v1alpha1.MilvusCondition, error)
func (*MilvusStatusSyncer) GetMilvusEndpoint ¶ added in v0.2.0
func (*MilvusStatusSyncer) GetMinioCondition ¶ added in v0.2.0
func (r *MilvusStatusSyncer) GetMinioCondition( ctx context.Context, mil v1alpha1.Milvus) (v1alpha1.MilvusCondition, error)
func (*MilvusStatusSyncer) RunIfNot ¶ added in v0.2.0
func (r *MilvusStatusSyncer) RunIfNot()
func (*MilvusStatusSyncer) UpdateStatus ¶ added in v0.2.0
type MinioClient ¶ added in v0.2.3
MinioClient for mock
type NewEtcdClientFunc ¶ added in v0.2.3
type NewEtcdClientFunc func(cfg clientv3.Config) (EtcdClient, error)
type NewMinioClientFunc ¶ added in v0.2.3
type NewMinioClientFunc func(endpoint string, accessKeyID, secretAccessKey string, secure bool) (MinioClient, error)
type ParallelGroupRunner ¶ added in v0.2.3
type ParallelGroupRunner struct { }
ParallelGroupRunner is a group runner that run funcs in parallel
func (ParallelGroupRunner) Run ¶ added in v0.2.3
func (ParallelGroupRunner) Run(funcs []Func, ctx context.Context, args ...interface{}) error
Run a group of funcs by same args in parallel, if any func fail, it should return err
func (ParallelGroupRunner) RunDiffArgs ¶ added in v0.2.3
RunDiffArgs runs a func by groups of args from @argsArray multiple times, if any failed, it should return err
func (ParallelGroupRunner) RunWithResult ¶ added in v0.2.3
func (ParallelGroupRunner) RunWithResult(funcs []Func, ctx context.Context, args ...interface{}) []Result
RunWithResult runs a group of funcs by same args, returns results with data & err for each func called
type PulsarClient ¶ added in v0.2.3
PulsarClient for mock
type PulsarReader ¶ added in v0.2.3
PulsarReader for mock
type Result ¶ added in v0.2.3
type Result struct { Data interface{} Err error }
Result contains data & err for a func's return
type StorageConditionInfo ¶ added in v0.2.3
type StorageConditionInfo struct { Namespace string Storage v1alpha1.MilvusStorage EndPoint string UseSSL bool }
StorageConditionInfo is info for acquiring storage condition