controllers

package
v0.0.0-...-c6cf6ad Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2021 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SparkRoleLabel = "spark-role"
	SparkAppLabel  = "spark-app-selector"
	DriverRole     = "driver"
	ExecutorRole   = "executor"

	AppLabel                       = "app"
	AppEnterpriseGatewayLabelValue = "enterprise-gateway"
	SparkOperatorLaunchedByLabel   = "sparkoperator.k8s.io/launched-by-spark-operator"
)
View Source
const (
	WavePrefix             = ""
	OperatorFinalizerName  = "operator.wave.spot.io"
	AnnotationWaveVersion  = "operator.wave.spot.io/version"
	AnnotationSparkVersion = "spark.wave.spot.io/version"
)
View Source
const (
	// ConditionReasons
	//
	// Progressing
	UninstalledReason        = "Uninstalled"
	InstallingReason         = "Installing"
	UpgradingReason          = "Upgrading"
	DeletingReason           = "Deleting"
	InProgressReason         = "InProgress"
	InstallationFailedReason = "HelmFailure"
	// Available
	AvailableReason = "Available"
	// Degraded
	// Failed
	UnsupportedTypeReason = "UnsupportedComponentType"
)

Variables

This section is empty.

Functions

func GetCurrentComponentCondition

func GetCurrentComponentCondition(status v1alpha1.WaveComponentStatus) *v1alpha1.WaveComponentCondition

GetCurrentComponentCondition returns the condition with the most recent update

func GetWaveComponentCondition

GetWaveComponentCondition returns the condition with the provided type.

func RemoveWaveComponentCondition

func RemoveWaveComponentCondition(status *v1alpha1.WaveComponentStatus, condType v1alpha1.WaveComponentConditionType)

RemoveWaveComponentCondition removes the WaveComponent condition with the provided type.

func SetWaveComponentCondition

func SetWaveComponentCondition(status *v1alpha1.WaveComponentStatus, condition v1alpha1.WaveComponentCondition) bool

SetWaveComponentCondition updates the WaveComponent to include the provided condition. If the condition that we are about to add already exists and has the same status and reason then we are not going to update.

Types

type InstallerGetter

type InstallerGetter func(name string, getter genericclioptions.RESTClientGetter, log logr.Logger) install.Installer

InstallerGetter is a factory function that returns an implementation of Installer

type SparkApiManagerGetter

type SparkApiManagerGetter func(clientSet kubernetes.Interface, driverPod *corev1.Pod, logger logr.Logger) (sparkapi.Manager, error)

SparkApiManagerGetter is a factory function that returns an implementation of sparkapi.Manager

type SparkPodReconciler

type SparkPodReconciler struct {
	client.Client
	ClientSet kubernetes.Interface

	Log    logr.Logger
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

SparkPodReconciler reconciles Pod objects to discover Spark applications

func NewSparkPodReconciler

func NewSparkPodReconciler(
	client client.Client,
	clientSet kubernetes.Interface,
	sparkApiManagerGetter SparkApiManagerGetter,
	log logr.Logger,
	scheme *runtime.Scheme) *SparkPodReconciler

func (*SparkPodReconciler) Reconcile

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

func (*SparkPodReconciler) SetupWithManager

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

type WaveComponentReconciler

type WaveComponentReconciler struct {
	Client client.Client
	Log    logr.Logger
	// contains filtered or unexported fields
}

WaveComponentReconciler reconciles a WaveComponent object

func NewWaveComponentReconciler

func NewWaveComponentReconciler(
	client client.Client,
	config *rest.Config,
	installerGetter InstallerGetter,
	storageProvider cloudstorage.CloudStorageProvider,
	log logr.Logger,
	scheme *runtime.Scheme) *WaveComponentReconciler

func (*WaveComponentReconciler) EnsureNamespace

func (r *WaveComponentReconciler) EnsureNamespace(namespace string) error

func (*WaveComponentReconciler) GetCurrentConditions

func (r *WaveComponentReconciler) GetCurrentConditions(comp *v1alpha1.WaveComponent, installer install.Installer) ([]*v1alpha1.WaveComponentCondition, error)

GetCurrentCondition examines the current environment and returns a condition for the component

func (*WaveComponentReconciler) GetCurrentProperties

func (r *WaveComponentReconciler) GetCurrentProperties(comp *v1alpha1.WaveComponent, installer install.Installer) (map[string]string, error)

func (*WaveComponentReconciler) Reconcile

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

func (*WaveComponentReconciler) SetupWithManager

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

Directories

Path Synopsis
internal
mock_cloudstorage
Package mock_cloudstorage is a generated GoMock package.
Package mock_cloudstorage is a generated GoMock package.
mock_install
Package mock_install is a generated GoMock package.
Package mock_install is a generated GoMock package.

Jump to

Keyboard shortcuts

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