Documentation
¶
Index ¶
- Constants
- type NfsServerReconciler
- func (r *NfsServerReconciler) CheckNfsServerReady(ctx context.Context, nfsServer *nfsv1alpha1.NfsServer) (bool, string, string)
- func (r *NfsServerReconciler) CreateOrUpdateReplicaSet(ctx context.Context, rs *appsv1.ReplicaSet, owner metav1.Object) error
- func (r *NfsServerReconciler) CreateOrUpdateService(ctx context.Context, svc *corev1.Service, owner metav1.Object) error
- func (r *NfsServerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *NfsServerReconciler) SetupWithManager(mgr ctrl.Manager) error
Constants ¶
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 ¶
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 ¶
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.