controllers

package
v0.6.13 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2022 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const SparkFinalizerName = "distributed-compute.dominodatalab.com/dco-finalizer"
View Source
const SparkLastAppliedConfig = "distributed-compute-operator.dominodatalab.com/last-applied"

LastAppliedConfig is the annotation key used to store object state on owned components.

Variables

View Source
var (
	// SparkPatchAnnotator applies state annotations to owned components.
	SparkPatchAnnotator = patch.NewAnnotator(SparkLastAppliedConfig)
	// SparkPatchMaker calculates changes to state annotations on owned components.
	SparkPatchMaker = patch.NewPatchMaker(SparkPatchAnnotator)
)
View Source
var (
	// DistributedComputeFinalizer is the custom identifier used to mark
	// controller-managed resources that require pre-delete hook logic.
	DistributedComputeFinalizer = path.Join(dcv1alpha1.GroupVersion.Group, "finalizer")

	// PatchAnnotator applies state annotations to owned components.
	PatchAnnotator = patch.NewAnnotator(path.Join(dcv1alpha1.GroupVersion.Group, "last-applied"))
	// PatchMaker calculates changes to state annotations on owned components.
	PatchMaker = patch.NewPatchMaker(PatchAnnotator)
	// PatchCalculateOpts define the exclusion rules used when calculating the
	// difference between two k8s resources.
	PatchCalculateOpts = []patch.CalculateOption{
		patch.IgnoreStatusFields(),
		patch.IgnoreVolumeClaimTemplateTypeMetaAndStatus(),
	}
)
View Source
var BuilderFuncs = []Builder{
	DaskCluster,
	MPICluster,
}

Functions

func DaskCluster added in v0.3.0

func DaskCluster(mgr ctrl.Manager, webhooksEnabled bool, cfg *Config) error

func MPICluster added in v0.6.0

func MPICluster(mgr ctrl.Manager, webhooksEnabled bool, cfg *Config) error

MPICluster builds a controller that reconciles MPICluster objects and registers it with the manager.

Types

type Builder added in v0.6.0

type Builder func(manager ctrl.Manager, webhooksEnabled bool, cfg *Config) error

type Config added in v0.6.0

type Config struct {
	Namespaces           []string
	MetricsAddr          string
	HealthProbeAddr      string
	WebhookServerPort    int
	EnableLeaderElection bool
	IstioEnabled         bool
	ZapOptions           zap.Options
	MPIInitImage         string
	MPISyncImage         string
}

Config options for the controller manager.

type RayClusterReconciler

type RayClusterReconciler struct {
	client.Client
	Log          logging.ContextLogger
	Scheme       *runtime.Scheme
	IstioEnabled bool
}

RayClusterReconciler reconciles RayCluster objects.

func (*RayClusterReconciler) Reconcile

func (r *RayClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile implements state reconciliation logic for RayCluster objects.

func (*RayClusterReconciler) SetupWithManager

func (r *RayClusterReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager creates and registers this controller with the manager.

type SparkClusterReconciler

type SparkClusterReconciler struct {
	client.Client
	Log          logging.ContextLogger
	Scheme       *runtime.Scheme
	IstioEnabled bool
}

SparkClusterReconciler reconciles SparkCluster objects.

func (*SparkClusterReconciler) Reconcile

func (r *SparkClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile implements state reconciliation logic for SparkCluster objects.

func (*SparkClusterReconciler) SetupWithManager

func (r *SparkClusterReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager creates and registers this controller with the manager.

Jump to

Keyboard shortcuts

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