Class Reconciler
- All Implemented Interfaces:
Iterable<ComponentType>,Channel,ComponentType,Eligible,Manager
In particular, the reconciler generates and updates:
-
A
PVCfor storage used by all VMs as a common repository for CDROM images. -
A
ConfigMapthat defines the configuration file for the runner. -
A
PVCfor 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
Servicethat 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, nostorageClassNameis 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 theresourcesproperties for the VM (defaults to 2). -
ramOvercommit: The amount by which the current ram size from the VM definition is divided when generating theresourcesproperties 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-commonThis 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
↩StatefulSetthat created the pod.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jgrapes.core.Channel
Channel.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final com.fasterxml.jackson.databind.ObjectMapperThe Constant mapper. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConfigures the component.voidReset the VM by incrementing the reset count and doing a partial reconcile (configmap only).voidonVmResourceChanged(VmResourceChanged event, VmChannel channel) Handles the change event.Methods inherited from class org.jgrapes.core.Component
channel, component, defaultCriterion, isEligibleFor, setNameMethods 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, unregisterAsGeneratorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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
-
onVmResourceChanged
@Handler public void onVmResourceChanged(VmResourceChanged 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:
IOExceptionio.kubernetes.client.openapi.ApiExceptionTemplateException
-