controller

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PhaseRunning = "Running"
	PhasePending = "Pending"
	PhaseError   = "Error"

	MsgDeploymentNotReady = "Deployment not ready"
	MsgPVCNotBound        = "PVC not bound"
	MsgServiceNotFound    = "Service not found"
	MsgNfsServerRunning   = "NfsServer is running"
	MsgStorageValidation  = "Exactly one of storageClassName or persistentVolume must be set."
	MsgPVCError           = "PVC error: %v"
	MsgDeploymentError    = "Deployment error: %v"
	MsgServiceError       = "Service error: %v"
)

Status phases and messages as constants

Variables

This section is empty.

Functions

This section is empty.

Types

type NfsServerReconciler

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

NfsServerReconciler reconciles a NfsServer object

func (*NfsServerReconciler) CheckNfsServerReady

func (r *NfsServerReconciler) CheckNfsServerReady(ctx context.Context, nfsServer *nfsv1alpha1.NfsServer) (bool, string, string)

Helper: Check readiness of ReplicaSet, PVC, Service

func (*NfsServerReconciler) CreateOrUpdateReplicaSet

func (r *NfsServerReconciler) CreateOrUpdateReplicaSet(ctx context.Context, rs *appsv1.ReplicaSet, owner metav1.Object) error

Helper: Create or Update ReplicaSet

func (*NfsServerReconciler) CreateOrUpdateService

func (r *NfsServerReconciler) CreateOrUpdateService(ctx context.Context, svc *corev1.Service, owner metav1.Object) error

Helper: Create or Update Service

func (*NfsServerReconciler) Reconcile

func (r *NfsServerReconciler) 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 NfsServer 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.21.0/pkg/reconcile

func (*NfsServerReconciler) SetupWithManager

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