Documentation ¶
Index ¶
- Constants
- func IsValidImageName(image string) bool
- type Controller
- func (c *Controller) BackUpDataRef(clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps, ...) (bool, error)
- func (c *Controller) CalSalt(clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps) string
- func (c *Controller) CopyConfigMap(clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps, ...) (*corev1.ConfigMap, error)
- func (c *Controller) CopySecret(clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps, ...) (*corev1.Secret, error)
- func (c *Controller) CreateEntryPointShellConfigMap(clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps) (bool, error)
- func (c *Controller) CreateKubeSprayJob(clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps) (bool, error)
- func (c *Controller) CurrentJobNeedBlock(clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps, ...) (bool, error)
- func (c *Controller) FetchJobStatus(clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps) (kubeanclusteropsv1alpha1.OpsStatus, error)
- func (c *Controller) GetKuBeanCluster(clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps) (*kubeanclusterv1alpha1.KuBeanCluster, error)
- func (c *Controller) ListClusterOps(clusterName string) ([]kubeanclusteropsv1alpha1.KuBeanClusterOps, error)
- func (c *Controller) NewKubesprayJob(clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps) *batchv1.Job
- func (c *Controller) Reconcile(ctx context.Context, req controllerruntime.Request) (controllerruntime.Result, error)
- func (c *Controller) SetOwnerReferences(objectMetaData *metav1.ObjectMeta, ...)
- func (c *Controller) SetupWithManager(mgr controllerruntime.Manager) error
- func (c *Controller) Start(ctx context.Context) error
- func (c *Controller) UpdateClusterOpsStatusDigest(clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps) (bool, error)
- func (c *Controller) UpdateStatusHasModified(clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps) (bool, error)
- func (c *Controller) UpdateStatusLoop(clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps, ...) (bool, error)
Constants ¶
View Source
const ( RequeueAfter = time.Millisecond * 500 LoopForJobStatus = time.Second * 3 KubeanClusterLabelKey = "clusterName" )
View Source
const BaseSlat = "kubean"
Variables ¶
This section is empty.
Functions ¶
func IsValidImageName ¶ added in v0.1.1
Types ¶
type Controller ¶
type Controller struct { client.Client ClientSet kubernetes.Interface KubeanClusterSet kubeanClusterClientSet.Interface KubeanClusterOpsSet kubeanClusterOpsClientSet.Interface }
func (*Controller) BackUpDataRef ¶
func (c *Controller) BackUpDataRef(clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps, cluster *kubeanclusterv1alpha1.KuBeanCluster) (bool, error)
BackUpDataRef perform the backup of configRef and secretRef and return (needRequeue,error).
func (*Controller) CalSalt ¶
func (c *Controller) CalSalt(clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps) string
func (*Controller) CopyConfigMap ¶
func (c *Controller) CopyConfigMap(clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps, oldConfigMapRef *apis.ConfigMapRef, newName string) (*corev1.ConfigMap, error)
func (*Controller) CopySecret ¶
func (c *Controller) CopySecret(clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps, oldSecretRef *apis.SecretRef, newName string) (*corev1.Secret, error)
func (*Controller) CreateEntryPointShellConfigMap ¶
func (c *Controller) CreateEntryPointShellConfigMap(clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps) (bool, error)
CreateEntryPointShellConfigMap create configMap to store entrypoint.sh.
func (*Controller) CreateKubeSprayJob ¶
func (c *Controller) CreateKubeSprayJob(clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps) (bool, error)
func (*Controller) CurrentJobNeedBlock ¶
func (c *Controller) CurrentJobNeedBlock(clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps, listClusterOps func(clusterName string) ([]kubeanclusteropsv1alpha1.KuBeanClusterOps, error)) (bool, error)
func (*Controller) FetchJobStatus ¶
func (c *Controller) FetchJobStatus(clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps) (kubeanclusteropsv1alpha1.OpsStatus, error)
func (*Controller) GetKuBeanCluster ¶
func (c *Controller) GetKuBeanCluster(clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps) (*kubeanclusterv1alpha1.KuBeanCluster, error)
GetKuBeanCluster fetch the cluster which clusterOps belongs to.
func (*Controller) ListClusterOps ¶
func (c *Controller) ListClusterOps(clusterName string) ([]kubeanclusteropsv1alpha1.KuBeanClusterOps, error)
func (*Controller) NewKubesprayJob ¶
func (c *Controller) NewKubesprayJob(clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps) *batchv1.Job
func (*Controller) Reconcile ¶
func (c *Controller) Reconcile(ctx context.Context, req controllerruntime.Request) (controllerruntime.Result, error)
func (*Controller) SetOwnerReferences ¶
func (c *Controller) SetOwnerReferences(objectMetaData *metav1.ObjectMeta, clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps)
func (*Controller) SetupWithManager ¶
func (c *Controller) SetupWithManager(mgr controllerruntime.Manager) error
func (*Controller) UpdateClusterOpsStatusDigest ¶
func (c *Controller) UpdateClusterOpsStatusDigest(clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps) (bool, error)
func (*Controller) UpdateStatusHasModified ¶
func (c *Controller) UpdateStatusHasModified(clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps) (bool, error)
func (*Controller) UpdateStatusLoop ¶
func (c *Controller) UpdateStatusLoop(clusterOps *kubeanclusteropsv1alpha1.KuBeanClusterOps, fetchJobStatus func(*kubeanclusteropsv1alpha1.KuBeanClusterOps) (kubeanclusteropsv1alpha1.OpsStatus, error)) (bool, error)
Click to show internal directories.
Click to hide internal directories.