Documentation
¶
Overview ¶
Package controllers provides Kubernetes controllers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
Controller defines the interface for a Kubernetes controller.
type CronJobController ¶
type CronJobController struct {
// contains filtered or unexported fields
}
CronJobController manages CronJob resources.
func (*CronJobController) Name ¶
func (c *CronJobController) Name() string
Name returns the controller name.
func (*CronJobController) Run ¶
func (c *CronJobController) Run(ctx context.Context)
Run starts the CronJob reconciliation loop.
type DeploymentController ¶
type DeploymentController struct {
// contains filtered or unexported fields
}
DeploymentController manages Deployment resources.
func (*DeploymentController) Name ¶
func (c *DeploymentController) Name() string
Name returns the controller name.
func (*DeploymentController) Run ¶
func (c *DeploymentController) Run(ctx context.Context)
Run starts the Deployment reconciliation loop.
type EndpointController ¶
type EndpointController struct {
// contains filtered or unexported fields
}
EndpointController manages Endpoint resources.
func (*EndpointController) Name ¶
func (c *EndpointController) Name() string
Name returns the controller name.
func (*EndpointController) Run ¶
func (c *EndpointController) Run(ctx context.Context)
Run starts the Endpoint reconciliation loop. It watches pods and rebuilds the Endpoints object for every service whose selector matches the pod.
type GarbageCollector ¶
type GarbageCollector struct {
// contains filtered or unexported fields
}
GarbageCollector removes orphaned Kubernetes resources.
func (*GarbageCollector) Name ¶
func (c *GarbageCollector) Name() string
Name returns the controller name.
func (*GarbageCollector) Run ¶
func (c *GarbageCollector) Run(ctx context.Context)
Run starts the garbage collection loop.
type JobController ¶
type JobController struct {
// contains filtered or unexported fields
}
JobController manages Job resources.
func (*JobController) Name ¶
func (c *JobController) Name() string
Name returns the controller name.
func (*JobController) Run ¶
func (c *JobController) Run(ctx context.Context)
Run starts the Job reconciliation loop. It watches both Jobs and Pods so that pod phase transitions (success/failure) drive job reconciliation even when the Job object itself is unchanged.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager runs and manages a set of Kubernetes controllers.
func NewManager ¶
NewManager creates a new controller manager with all built-in controllers registered.
func (*Manager) Register ¶
func (m *Manager) Register(c Controller)
Register adds a controller to the manager.
type NamespaceController ¶
type NamespaceController struct {
// contains filtered or unexported fields
}
NamespaceController manages Namespace resources.
func (*NamespaceController) Name ¶
func (c *NamespaceController) Name() string
Name returns the controller name.
func (*NamespaceController) Run ¶
func (c *NamespaceController) Run(ctx context.Context)
Run starts the Namespace reconciliation loop.
type NodeController ¶
type NodeController struct {
// contains filtered or unexported fields
}
NodeController manages Node resources.
func (*NodeController) Name ¶
func (c *NodeController) Name() string
Name returns the controller name.
func (*NodeController) Run ¶
func (c *NodeController) Run(ctx context.Context)
Run starts the Node reconciliation loop.
type PVCProvisionerController ¶ added in v0.12.0
type PVCProvisionerController struct {
// contains filtered or unexported fields
}
PVCProvisionerController is a local-path style dynamic provisioner. It watches PersistentVolumeClaims and, for each unbound claim on a provisionable storage class, creates a host directory, publishes a matching PersistentVolume (hostPath) and binds the two. This is the single-node, no-CSI-gRPC path: on one node with one process, CreateVolume is just mkdir and the bind is a store update — exactly what a real external-provisioner would do over CSI, minus the protobuf round-trip to talk to ourselves.
func NewPVCProvisionerController ¶ added in v0.12.0
func NewPVCProvisionerController(s store.Store, logger *slog.Logger, dir string) *PVCProvisionerController
NewPVCProvisionerController creates the provisioner rooted at dir.
func (*PVCProvisionerController) Name ¶ added in v0.12.0
func (c *PVCProvisionerController) Name() string
func (*PVCProvisionerController) Run ¶ added in v0.12.0
func (c *PVCProvisionerController) Run(ctx context.Context)
type ReplicaSetController ¶
type ReplicaSetController struct {
// contains filtered or unexported fields
}
ReplicaSetController manages ReplicaSet resources.
func (*ReplicaSetController) Name ¶
func (c *ReplicaSetController) Name() string
Name returns the controller name.
func (*ReplicaSetController) Run ¶
func (c *ReplicaSetController) Run(ctx context.Context)
Run starts the ReplicaSet reconciliation loop.
type ServiceAccountController ¶
type ServiceAccountController struct {
// contains filtered or unexported fields
}
ServiceAccountController manages ServiceAccount resources.
func (*ServiceAccountController) Name ¶
func (c *ServiceAccountController) Name() string
Name returns the controller name.
func (*ServiceAccountController) Run ¶
func (c *ServiceAccountController) Run(ctx context.Context)
Run starts the ServiceAccount reconciliation loop.
type ServiceController ¶
type ServiceController struct {
// contains filtered or unexported fields
}
ServiceController manages Service resources.
func (*ServiceController) Name ¶
func (c *ServiceController) Name() string
Name returns the controller name.
func (*ServiceController) Run ¶
func (c *ServiceController) Run(ctx context.Context)
Run starts the Service reconciliation loop.