controller

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HTTPAppPortName is the name of the port serving an app
	HTTPAppPortName = "http-app"

	// SpinOperatorFinalizer is the finalizer used by the spin operator
	SpinOperatorFinalizer = "core.spinoperator.dev/finalizer"

	// FieldManger is used to declare that the spin operator owns specific fields on child resources
	FieldManager = "spin-operator"
)

Variables

This section is empty.

Functions

func ConstructEnvForApp

func ConstructEnvForApp(ctx context.Context, app *spinv1alpha1.SpinApp) []corev1.EnvVar

ConstructEnvForApp constructs the env for a spin app that runs as a k8s pod. Variables are not guaranteed to stay backed by ENV.

func ConstructPodHealthChecks

func ConstructPodHealthChecks(app *spinv1alpha1.SpinApp) (readiness *corev1.Probe, liveness *corev1.Probe, err error)

func ConstructVolumeMountsForApp

func ConstructVolumeMountsForApp(ctx context.Context, app *spinv1alpha1.SpinApp, generatedRuntimeSecret string) ([]corev1.Volume, []corev1.VolumeMount, error)

ConstructVolumeMountsForApp introspects the application and generates any required volume mounts. A generated runtime secret is mutually exclusive with a user-provided secret - this is to require _either_ a manual runtime-config or a generated one from the crd.

func SpinHealthCheckToCoreProbe

func SpinHealthCheckToCoreProbe(probe *spinv1alpha1.HealthProbe) (*corev1.Probe, error)

Types

type SpinAppExecutorReconciler

type SpinAppExecutorReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

SpinAppExecutorReconciler reconciles a SpinAppExecutor object

func (*SpinAppExecutorReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.16.3/pkg/reconcile

func (*SpinAppExecutorReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type SpinAppReconciler

type SpinAppReconciler struct {
	Client   client.Client
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
}

SpinAppReconciler reconciles a SpinApp object

func (*SpinAppReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.16.3/pkg/reconcile

func (*SpinAppReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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