Documentation ¶
Index ¶
- Constants
- type GoodnightDeploymentReconciler
- func (r *GoodnightDeploymentReconciler) EnterSandman(ctx context.Context, s SleepyDeployment) error
- func (r *GoodnightDeploymentReconciler) LoadDeployments(ctx context.Context)
- func (r *GoodnightDeploymentReconciler) Monitor(ctx context.Context)
- func (r *GoodnightDeploymentReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *GoodnightDeploymentReconciler) SetupWithManager(mgr ctrl.Manager) error
- type SleepList
- type SleepyDeployment
Constants ¶
View Source
const ( TimeLayout = "15:04" GoodnightPrefix = "goodnight.joshmeyer.dev" AwakeTimeLabel = "goodnight.joshmeyer.dev/awake-time" AwakeReplicasLabel = "goodnight.joshmeyer.dev/awake-replicas" SleepTimeLabel = "goodnight.joshmeyer.dev/sleep-time" SleepReplicasLabel = "goodnight.joshmeyer.dev/sleep-replicas" IsSleepingLabel = "goodnight.joshmeyer.dev/sleeping" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoodnightDeploymentReconciler ¶
GoodnightDeploymentReconciler reconciles a GoodnightDeployment object
func (*GoodnightDeploymentReconciler) EnterSandman ¶
func (r *GoodnightDeploymentReconciler) EnterSandman(ctx context.Context, s SleepyDeployment) error
func (*GoodnightDeploymentReconciler) LoadDeployments ¶
func (r *GoodnightDeploymentReconciler) LoadDeployments(ctx context.Context)
func (*GoodnightDeploymentReconciler) Monitor ¶
func (r *GoodnightDeploymentReconciler) Monitor(ctx context.Context)
func (*GoodnightDeploymentReconciler) Reconcile ¶
func (r *GoodnightDeploymentReconciler) 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 GoodnightDeployment 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.19.0/pkg/reconcile
func (*GoodnightDeploymentReconciler) SetupWithManager ¶
func (r *GoodnightDeploymentReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type SleepList ¶
type SleepList struct { sync.RWMutex SleepyDeployments map[string]SleepyDeployment }
type SleepyDeployment ¶
Click to show internal directories.
Click to hide internal directories.