Skip to content
Snippets Groups Projects
Commit e264a1ba authored by Simon Ehrenstein's avatar Simon Ehrenstein
Browse files

Add SchedulerNamePatcher for Deployments

parent d4ead8a5
No related branches found
No related tags found
6 merge requests!159Re-implementation of Theodolite with Kotlin/Quarkus,!157Update Graal Image in CI pipeline,!113Resolve "Add KDocs for all classes, interfaces, public methods",!112Add Kdoc,!103Allow using the random scheduler in benchmarks,!83WIP: Re-implementation of Theodolite with Kotlin/Quarkus
......@@ -25,6 +25,7 @@ class PatcherManager {
patcherDefinition.container,
patcherDefinition.variableName
)
"SchedulerNamePatcher" -> SchedulerNamePatcher(resource)
else -> throw IllegalArgumentException("Patcher type ${patcherDefinition.type} not found")
}
}
......
package theodolite.patcher
import io.fabric8.kubernetes.api.model.KubernetesResource
import io.fabric8.kubernetes.api.model.apps.Deployment
class SchedulerNamePatcher(private val k8sResource: KubernetesResource): Patcher {
override fun <String> patch(value: String) {
if (k8sResource is Deployment) {
k8sResource.spec.template.spec.schedulerName = value as kotlin.String;
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment