ADD: add posibility to start a pod with multiple containers

This commit is contained in:
Henry Winkel
2024-03-12 15:23:37 +01:00
parent e38214f4d0
commit 263aaa6a71
4 changed files with 102 additions and 12 deletions

View File

@@ -4,6 +4,7 @@
#include "nlohmann/json_fwd.hpp"
#include "yaml-cpp/node/node.h"
#include <map>
#include <memory>
#include <string>
#include <vector>
#include <yaml-cpp/yaml.h>
@@ -22,12 +23,15 @@
namespace kubecontrol
{
class KubePod
{
public:
KubePod(std::string Owner, std::string Uuid, std::string ContainerImage,std::string Namespace = "simulator") ;
KubePod(std::string Owner, std::string Uuid, std::string Component, std::string ContainerImage,std::string Namespace = "simulator");
std::string getUUID();
std::string getOwner();
std::string getIp();
@@ -46,6 +50,8 @@ namespace kubecontrol
void setComponent(std::string component);
std::string getComponent();
void addContainer(std::string name,std::string image, std::shared_ptr<std::map<std::string, std::string>> envs = nullptr, std::string PullPolicy = "Always");
/**
* @brief sets the name of the pod
* @param string - term to be displayed
@@ -78,11 +84,13 @@ namespace kubecontrol
static const int MaxWaitTimeInSeconds;
std::string Owner_;
std::string Uuid_;
std::string Name_;
std::string Component_;
std::string ContainerImage_;
std::vector<YAML::Node> ContainerImages_;
// std::string ContainerImage_;
std::string ContainerRegistry_;
std::string PathToYaml_;
std::string Namespace_;