clusterops

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RequeueAfter          = time.Millisecond * 500
	OpsBackupNum          = 5
	LoopForJobStatus      = time.Second * 3
	KubeanClusterLabelKey = "clusterName"
)
View Source
const BaseSlat = "kubean"

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	client.Client
	ClientSet           *kubernetes.Clientset
	KubeanClusterSet    *kubeanClusterClientSet.Clientset
	KubeanClusterOpsSet *kubeanClusterOpsClientSet.Clientset
}

func (*Controller) BackUpDataRef

BackUpDataRef perform the backup of configRef and secretRef and return (needRequeue,error).

func (*Controller) CalSalt

func (*Controller) CleanExcessClusterOps

func (c *Controller) CleanExcessClusterOps(cluster *kubeanclusterv1alpha1.KuBeanCluster) (bool, error)

CleanExcessClusterOps clean up excess KuBeanClusterOps.

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) GetKuBeanCluster

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 (*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) Start

func (c *Controller) Start(ctx context.Context) 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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL