ADD: added guid usage to identify a pod

This commit is contained in:
hwinkel
2023-08-07 21:30:53 +02:00
parent bc6617e100
commit 1c4c883648
11 changed files with 126 additions and 17 deletions

View File

@@ -0,0 +1,22 @@
#include <kubecontrol/PodController.hpp>
namespace kubecontrol
{
PodController::PodController(std::string pathToKubectlConfig)
{
YAML::Node config = YAML::LoadFile(pathToKubectlConfig);
BearerToken_ = config["users"][0]["user"]["token"].as<std::string>();
ServerAddress_ = config["clusters"][0]["cluster"]["server"].as<std::string>();
ApiCall_ = "/api/v1/namespaces/hwinkel/pods/";
}
std::string PodController::getServerAddress()
{
return this->ServerAddress_;
}
}