controllers

package
v0.0.0-...-491c235 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GameReconciler

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

GameReconciler reconciles a Game object

func (*GameReconciler) CreateOrUpdateConfigMap

func (r *GameReconciler) CreateOrUpdateConfigMap(
	ctx context.Context,
	req ctrl.Request,
	game *operatorv1alpha1.Game,
	deployment *appsv1.Deployment,
) (*corev1.ConfigMap, error)

func (*GameReconciler) CreateOrUpdateDeployment

func (r *GameReconciler) CreateOrUpdateDeployment(
	ctx context.Context,
	req ctrl.Request,
	game *operatorv1alpha1.Game,
) (*appsv1.Deployment, error)

func (*GameReconciler) CreateOrUpdatePersistentVolumeClaim

func (r *GameReconciler) CreateOrUpdatePersistentVolumeClaim(
	ctx context.Context,
	req ctrl.Request,
	game *operatorv1alpha1.Game,
	deployment *appsv1.Deployment,
) (*corev1.PersistentVolumeClaim, error)

func (*GameReconciler) CreateOrUpdateService

func (r *GameReconciler) CreateOrUpdateService(
	ctx context.Context,
	req ctrl.Request,
	game *operatorv1alpha1.Game,
	deployment *appsv1.Deployment,
) (*corev1.Service, error)

func (*GameReconciler) DeleteDeployment

func (r *GameReconciler) DeleteDeployment(
	ctx context.Context,
	req ctrl.Request,
	game *operatorv1alpha1.Game,
) error

func (*GameReconciler) GetStatus

func (r *GameReconciler) GetStatus(
	ctx context.Context,
	req ctrl.Request,
	appLabel string,
) (bool, error)

func (*GameReconciler) Reconcile

func (r *GameReconciler) 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. TODO(user): Modify the Reconcile function to compare the state specified by the Game object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

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

func (*GameReconciler) RefreshStatus

func (r *GameReconciler) RefreshStatus(
	ctx context.Context,
	req ctrl.Request,
	game *operatorv1alpha1.Game,
	appLabel string,
) (ctrl.Result, error)

func (*GameReconciler) SetStatus

func (r *GameReconciler) SetStatus(
	ctx context.Context,
	req ctrl.Request,
	game *operatorv1alpha1.Game,
	ready bool,
) error

func (*GameReconciler) SetupWithManager

func (r *GameReconciler) 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