Skip to content
Snippets Groups Projects
Commit 63ef0f8e authored by Lorenz Boguhn's avatar Lorenz Boguhn
Browse files

Add loadServiceManager to yaml loader

parent 81c31f08
No related branches found
No related tags found
4 merge requests!159Re-implementation of Theodolite with Kotlin/Quarkus,!157Update Graal Image in CI pipeline,!83WIP: Re-implementation of Theodolite with Kotlin/Quarkus,!78Resolve "Implement Quarkus/Kotlin protype"
......@@ -2,6 +2,7 @@ package theodolite.execution
import io.fabric8.kubernetes.api.model.ConfigMap
import io.fabric8.kubernetes.api.model.Service
import io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinition
import io.fabric8.kubernetes.api.model.apps.Deployment
import io.fabric8.kubernetes.client.NamespacedKubernetesClient
import mu.KotlinLogging
......@@ -26,19 +27,18 @@ class YamlLoader(client: NamespacedKubernetesClient) {
return service
}
/**
* Parses a Service from a servive yaml
* @param path of the yaml file
* @return service from fabric8
*/
fun loadService(path: String): Service {
fun loadServiceMonitor(path: String): CustomResourceDefinition {
val service = loadGenericRessource(path, { x: String -> client.services().load(x).get() })
return service
val serviceMonitor =
loadGenericRessource(path, { x: String -> client.customResourceDefinitions().load(x).get() })
return serviceMonitor
}
/**
* Parses a Deployment from a Deployment yaml
* @param path of the yaml 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