clusterops

package
v0.4.2-rc4 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RequeueAfter     = time.Millisecond * 500
	LoopForJobStatus = time.Second * 3
	RetryInterval    = time.Millisecond * 300
	RetryCount       = 5
)
View Source
const BaseSlat = "kubean"

Variables

This section is empty.

Functions

func IsValidImageName added in v0.1.1

func IsValidImageName(image string) bool

Types

type Controller

type Controller struct {
	client.Client
	ClientSet             kubernetes.Interface
	KubeanClusterSet      clusterClientSet.Interface
	KubeanClusterOpsSet   clusterOperationClientSet.Interface
	InfoManifestClientSet manifestClientSet.Interface
}

func (*Controller) BackUpDataRef

func (c *Controller) BackUpDataRef(clusterOps *clusteroperationv1alpha1.ClusterOperation, cluster *clusterv1alpha1.Cluster) (bool, error)

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

func (*Controller) CalSalt

func (*Controller) CheckClusterDataRef added in v0.3.0

func (c *Controller) CheckClusterDataRef(cluster *clusterv1alpha1.Cluster, clusterOPS *clusteroperationv1alpha1.ClusterOperation) error

func (*Controller) CheckConfigMapExist added in v0.3.0

func (c *Controller) CheckConfigMapExist(namespace, name string) bool

func (*Controller) CheckSecretExist added in v0.3.0

func (c *Controller) CheckSecretExist(namespace, name string) bool

func (*Controller) CopyConfigMap

func (c *Controller) CopyConfigMap(clusterOps *clusteroperationv1alpha1.ClusterOperation, oldConfigMapRef *apis.ConfigMapRef, newName string) (*corev1.ConfigMap, error)

func (*Controller) CopySecret

func (c *Controller) CopySecret(clusterOps *clusteroperationv1alpha1.ClusterOperation, oldSecretRef *apis.SecretRef, newName string) (*corev1.Secret, error)

func (*Controller) CreateEntryPointShellConfigMap

func (c *Controller) CreateEntryPointShellConfigMap(clusterOps *clusteroperationv1alpha1.ClusterOperation) (bool, error)

CreateEntryPointShellConfigMap create configMap to store entrypoint.sh.

func (*Controller) CreateKubeSprayJob

func (c *Controller) CreateKubeSprayJob(clusterOps *clusteroperationv1alpha1.ClusterOperation) (bool, error)

func (*Controller) CurrentJobNeedBlock

func (c *Controller) CurrentJobNeedBlock(clusterOps *clusteroperationv1alpha1.ClusterOperation, listClusterOps func(clusterName string) ([]clusteroperationv1alpha1.ClusterOperation, error)) (bool, error)

func (*Controller) FetchGlobalInfoManifest added in v0.4.1

func (c *Controller) FetchGlobalInfoManifest() (*manifestv1alpha1.Manifest, error)

func (*Controller) FetchGlobalManifestImageTag added in v0.4.1

func (c *Controller) FetchGlobalManifestImageTag() string

func (*Controller) GenerateJobName added in v0.2.1

func (c *Controller) GenerateJobName(clusterOps *clusteroperationv1alpha1.ClusterOperation) string

func (*Controller) GetKuBeanCluster

GetKuBeanCluster fetch the cluster which clusterOps belongs to.

func (*Controller) ListClusterOps

func (c *Controller) ListClusterOps(clusterName string) ([]clusteroperationv1alpha1.ClusterOperation, error)

func (*Controller) NewKubesprayJob

func (c *Controller) NewKubesprayJob(clusterOps *clusteroperationv1alpha1.ClusterOperation) *batchv1.Job

func (*Controller) ProcessKubeanOperationImage added in v0.4.1

func (c *Controller) ProcessKubeanOperationImage(oldImage, globalManifestImageTag string) string

func (*Controller) Reconcile

func (*Controller) Retry added in v0.3.4

func (c *Controller) Retry(f func() bool) bool

func (*Controller) SetOwnerReferences

func (c *Controller) SetOwnerReferences(objectMetaData *metav1.ObjectMeta, clusterOps *clusteroperationv1alpha1.ClusterOperation)

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 *clusteroperationv1alpha1.ClusterOperation) (bool, error)

func (*Controller) UpdateStatusHasModified

func (c *Controller) UpdateStatusHasModified(clusterOps *clusteroperationv1alpha1.ClusterOperation) (bool, error)

Jump to

Keyboard shortcuts

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