ADD: added new config file and added a debug message in podcontroller constructor
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <cstdlib>
|
||||
#include <exception>
|
||||
#include <kubecontrol/PodController.hpp>
|
||||
#include <math.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -14,7 +15,10 @@ namespace kubecontrol
|
||||
{
|
||||
PodController::PodController(std::string pathToKubectlConfig)
|
||||
{
|
||||
YAML::Node config = YAML::LoadFile(pathToKubectlConfig);
|
||||
LOG_S(INFO)<< "Path To Yaml: " <<pathToKubectlConfig;
|
||||
|
||||
try {
|
||||
YAML::Node config = YAML::LoadFile(pathToKubectlConfig);
|
||||
|
||||
BearerToken_ = config["users"][0]["user"]["token"].as<std::string>();
|
||||
|
||||
@@ -32,6 +36,10 @@ namespace kubecontrol
|
||||
}
|
||||
|
||||
ApiCall_ = "/api/v1/namespaces/hwinkel/pods/";
|
||||
} catch (std::exception& e) {
|
||||
LOG_S(ERROR)<< e.what();
|
||||
throw e.what();
|
||||
}
|
||||
}
|
||||
|
||||
std::string PodController::getServerAddress()
|
||||
|
||||
Reference in New Issue
Block a user