Class Reconciler
- All Implemented Interfaces:
Iterable<ComponentType>
,Channel
,ComponentType
,Eligible
,Manager
In particular, the reconciler generates and updates:
-
A
PVC
for storage used by all VMs as a common repository for CDROM images. -
A
ConfigMap
that defines the configuration file for the runner. -
A
PVC
for 1 MiB of persistent storage used by the Runner (referred to as the “runnerDataPvc”) -
The PVCs for the VM’s disks.
-
(Optional) A load balancer
Service
that allows the user to access a VM’s console without knowing which node it runs on.
The reconciler is part of the Controller
component. It’s
configuration properties are therefore defined in
"/Manager":
"/Controller":
"/Reconciler":
...
The reconciler supports the following configuration properties:
-
runnerDataPvc.storageClassName
: The storage class name to be used for the “runnerDataPvc” (the small volume used by the runner for information such as the EFI variables). By default, nostorageClassName
is generated, which causes Kubernetes to use storage from the default storage class. Define this if you want to use a specific storage class. -
cpuOvercommit
: The amount by which the current cpu count from the VM definition is divided when generating theresources
properties for the VM (defaults to 2). -
ramOvercommit
: The amount by which the current ram size from the VM definition is divided when generating theresources
properties for the VM (defaults to 1.25). -
loadBalancerService
: If defined, causes a load balancer service to be created. This property may be a boolean or YAML that defines additional labels or annotations to be merged into the service defintion. Here’s an example for using MetalLb as “internal load balancer”:loadBalancerService: annotations: metallb.universe.tf/loadBalancerIPs: 192.168.168.1 metallb.universe.tf/ip-allocated-from-pool: single-common metallb.universe.tf/allow-shared-ip: single-common
This makes all VM consoles available at IP address 192.168.168.1 with the port numbers from the VM definitions.
-
loggingProperties
: If defined, specifies the default logging properties to be used by the runners managed by the controller. This property is a string that holds the content of a logging.properties file.
-
Before version 3.4, the operator created a
↩StatefulSet
that created the pod.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jgrapes.core.Channel
Channel.Default
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final com.fasterxml.jackson.databind.ObjectMapper
The Constant mapper. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Configures the component.void
Reset the VM by incrementing the reset count and doing a partial reconcile (configmap only).void
onVmDefChanged
(VmDefChanged event, VmChannel channel) Handles the change event.Methods inherited from class org.jgrapes.core.Component
channel, component, defaultCriterion, isEligibleFor, setName
Methods inherited from class org.jgrapes.core.internal.ComponentVertex
activeEventPipeline, addHandler, attach, channelReplacements, children, componentPath, componentVertex, detach, fire, initComponentsHandlers, iterator, name, newEventPipeline, newEventPipeline, parent, registerAsGenerator, root, toString, unregisterAsGenerator
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
mapper
The Constant mapper.
-
-
Constructor Details
-
Reconciler
Instantiates a new reconciler.- Parameters:
componentChannel
- the component channel
-
-
Method Details
-
onConfigurationUpdate
Configures the component.- Parameters:
event
- the event
-
onVmDefChanged
@Handler public void onVmDefChanged(VmDefChanged event, VmChannel channel) throws io.kubernetes.client.openapi.ApiException, TemplateException, IOException Handles the change event.- Parameters:
event
- the eventchannel
- the channel- Throws:
io.kubernetes.client.openapi.ApiException
- the api exceptionTemplateException
- the template exceptionIOException
- Signals that an I/O exception has occurred.
-
onResetVm
@Handler public void onResetVm(ResetVm event, VmChannel channel) throws io.kubernetes.client.openapi.ApiException, IOException, TemplateException Reset the VM by incrementing the reset count and doing a partial reconcile (configmap only).- Parameters:
event
- the eventchannel
- the channel- Throws:
IOException
io.kubernetes.client.openapi.ApiException
TemplateException
-